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
TODO Autogenerated method stub
@Override public void noteUserActivity() { throw new UnsupportedOperationException("noteUserActivity"); }
{ "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
Set the size of a work time slice before work is deferred again
public void setTimeSlice(int millis) { timeSliceMillis = millis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "public void setWork(Duration work)\r\n {\r\n m_work = work;\r\n }", "private void maybeScheduleSlice(double when) {\n if (nextSliceRunTime > when) {\n timer.schedule(when);\n nextSliceRunTime = when;\n }\n }", "private void maybeScheduleSlice() {\n if (nextSliceRunTime > 0) {\n timer.schedule();\n nextSliceRunTime = 0;\n }\n }", "public void setTicksCount(int size) {\n\t\t\n\t}", "public abstract void adjustSize(long size);", "public void increaseSize() {\n Estimate[] newQueue = new Estimate[queue.length * 2];\n\n for (int i = 0; i < queue.length; i++) {\n newQueue[i] = queue[i];\n }\n\n queue = newQueue;\n }", "public void setLocalSize(int size);", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "void setSpikesPerChunk(VariableAmount count);", "private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }", "public void set_size(int s);", "public void setSliceSize(int newSize) {\n ArrayList<Integer> newSlice = new ArrayList<>(slice);\n if (newSize > slice.size()) {\n if (slice.size() == 0) {\n newSlice = new ArrayList<>(Collections.nCopies(newSize, 0));\n patternSpecific = new ArrayList<>(Collections.nCopies(newSize, 0));\n } else {\n // If the new size is larger, then add a few extra values\n newSlice.addAll(new ArrayList<>(Collections.nCopies(newSize - newSlice.size(), newSlice.get(newSlice.size() - 1))));\n patternSpecific.addAll(new ArrayList<>(Collections.nCopies(newSize - patternSpecific.size(), patternSpecific.get(patternSpecific.size() - 1)))); // Also modify the patternSpecific array\n }\n } else if (newSize < newSlice.size()) {\n // If the new size is smaller, then remove the extra values\n newSlice.subList(newSize, newSlice.size()).clear(); // Remove the extra elements\n patternSpecific.subList(newSize, patternSpecific.size()).clear(); // Remove the extra elements (Also modify the patternSpecific array)\n } else {\n return;\n }\n\n // Assign the new slice value\n setSlice(newSlice);\n }", "synchronized protected void enlargeArrays() {\n \t\tenlargeArrays(5);\n \t}", "@Override\n\tpublic void setSizeToCache(int sizeToCache) {\n\t\t\n\t}", "public test346(int size) {\n \tqueue = new LinkedList<>(); \n \tcap = size;\n }", "public void grow(int cap) {}", "public void setThreadPoolSize(int size) {\r\n if(size <= 0) {\r\n throw new IllegalArgumentException(\"size invalid: \" + size + \". The size of the threadpool must be greater than 0.\");\r\n }\r\n threadPoolSize = size;\r\n }", "public void setChunkAsReclaimed(){\n this.setState(State.RECLAIMED);\n this.remNetworkCopy(Server.getInstance().getId());\n }", "@Override\n public void sizeChanged(IntBuffer collection) {\n semaphore.release();\n }", "public void setLength(int length) {\n\t\tloadProgress.setLength(length);\n\t}", "public void setSize(int size) {\n\t\tdist = new double[size];\n\t\tprev = new Node[size];\n\t\tready = new boolean[size];\n\t}", "private void updateQueueSize() {\n\t\tsims.minQS = state.queueSize < sims.minQS ? state.queueSize : sims.minQS;\n\t\tsims.maxQS = state.queueSize > sims.maxQS ? state.queueSize : sims.maxQS;\n\t}", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "private void queueResize() {\n queue = Arrays.copyOf(queue, queue.length + 1);\n }", "public void setSize(int size){\n n = size;\n //makes new array and changes the toSort array\n randomArray(n);\n toSort = origArray.clone();\n }", "private void initReadBlockingTask(int size){ \n for (int i=0; i < size; i++){\n getReadTasks().offer(newReadBlockingTask(false));\n }\n }", "@Override\r\n\tpublic void setSequenceSize(int x) {\n\t\tsizeNum = x;\r\n\t\tupdate();\r\n\t}", "public void setNumTasks(int n) {\n if (latch != null && latch.getCount() > 0) {\n throw new IllegalStateException(\"Method called during wait period\");\n }\n\n latch = new CountDownLatch(n);\n }", "public TransactionBuilder setCacheSize(long size);", "@Override\n public void internalWorked(double work) {\n if (usedUp || nestedBeginTasks != 1) {\n return;\n }\n\n double realWork = scale * work;\n super.internalWorked(realWork);\n sentToParent += realWork;\n if (sentToParent >= parentTicks) {\n usedUp = true;\n }\n }", "@Override\n\t\t\tprotected void beforeExecute(Thread t, Runnable r) {\n\t\t\t\tint qsize = getQueue().size();\n\t\t\t\tif(initCorePoolSize>0&&getCorePoolSize()<getMaximumPoolSize()\n\t\t\t\t\t&& qsize > 0 && (qsize%divisor) == 0){\n\t\t\t\t\tsetCorePoolSize(getCorePoolSize()+1); // 进行动态增加\n\t\t\t\t}\n\t\t\t}", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "worker(long workOn) {\n this.workOn = workOn;\n }", "public void setSize(int newSize);", "public void setSize(int newSize);", "public void setLength( int length ) { setCapacity( length ); this.length = length; }", "public void setFstThreads(int size){\n if(size < 1){\n this.fstThreads = DEFAULT_FST_THREADS;\n } else {\n this.fstThreads = size;\n }\n }", "private void resize() {\n Object[] newQueue = new Object[(int) (queue.length * 1.75)];\n System.arraycopy(queue, startPos, newQueue, 0, queue.length - startPos);\n\n currentPos = queue.length - startPos;\n startPos = 0;\n queue = newQueue;\n\n }", "private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }", "public TimeSliceQueue(int size, int resolution) {\n this(size, resolution, 0);\n }", "public SynchronousTimeLimitedTask() {\n _steps = new ArrayDeque<BooleanSupplier>();\n }", "public void setInitialStepSize(final T initialStepSize) {\n if (initialStepSize.subtract(minStep).getReal() < 0 ||\n initialStepSize.subtract(maxStep).getReal() > 0) {\n initialStep = getField().getOne().negate();\n } else {\n initialStep = initialStepSize;\n }\n }", "public void setMaxSize(int size) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n maxSize = size;\n if (maxSize != 0 && minSize > maxSize) {\n minSize = maxSize;\n log.warn(\"pool min size set to \" + minSize + \" to stay <= max size\");\n }\n }", "public void initialize(int size);", "@Override\n public void add(E work) {\n if(isFull()) {\n throw new IllegalStateException();\n }\n array[end] = work;\n end = (end + 1) % capacity();\n size++;\n }", "public void setToInitialState(int dimension, int numberOfEmptySlots);", "public void setSize(int size);", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public synchronized void setSize(int lower, int upper) {\n \t\tthis.lower = lower;\n \t\tthis.upper = upper;\n \t\tadjustThreadCount();\n \t}", "public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}", "public void setLengthOfStay(int len) {\n this.length_of_stay=len;\n }", "public void resetTimeLimit();", "public void setSize(int size){\n this.size = size;\n }", "private void reallocateIfOverfilled() {\r\n\t\tif ((size * 1.0 / table.length) > MAX_FULLNESS_PERCENTAGE) {\r\n\t\t\treallocateArray();\r\n\t\t}\r\n\t}", "public void setSize(long value) {\n this.size = value;\n }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}", "public void setMinSize(int size) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n minSize = size;\n if (maxSize != 0 && minSize > maxSize) {\n maxSize = minSize;\n log.warn(\"pool max size set to \" + maxSize + \" to stay >= min size\");\n }\n }", "private void unscheduleSlice() {\n nextSliceRunTime = Double.MAX_VALUE;\n timer.cancel();\n }", "public void grow(int n) {\r\n\t\t// implementation not shown\r\n\t}", "public Builder setServerWorkIterations(int value) {\n \n serverWorkIterations_ = value;\n onChanged();\n return this;\n }", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "void resize(int newSize);", "protected abstract int getTaskLength();", "public void setSize(int size) {\r\n this.size = size;\r\n }", "private void setFinalSize()\n {\n if (! m_isEmpty)\n return;\n m_isEmpty = false;\n setSize(m_finalSize);\n if (m_finalLocation != null)\n setLocation(m_finalLocation);\n }", "public void increaseSize(int size) {\n int arraySize = container.length;\n if (size > arraySize) {\n int newSize = arraySize * 2;\n container = Arrays.copyOf(container, newSize);\n }\n }", "private void setMemorySize() { }", "@Override\r\n\tpublic void worked(int work) {\n\t}", "private void handleShrinking( GameState state )\r\n\t{\n\t\t\r\n\t\tint shrinkLength = (int)(shrinkPercent * entities.length);\r\n\t\t\r\n\t\tif ( size < shrinkLength )\r\n\t\t{\r\n\t\t\tshrinkTime += state.seconds;\r\n\t\t\t\r\n\t\t\tif ( shrinkTime >= shrinkReadyTime )\r\n\t\t\t{\r\n\t\t\t\tentities = Arrays.copyOf( entities, shrinkLength );\r\n\t\t\t\tshrinkTime = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tshrinkTime = 0;\r\n\t\t}\r\n\t}", "public void setCacheSize(int size) {\n\t\t_cacheSize = size;\n\t}", "private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }", "private void startHeavyLifting(int first, int count)\n {\n }", "void freeze() {\n setState(State.FROZEN); // prevent new puts to this chunk\n while (pendingOps.get() != 0) ;\n }", "private void resize(int capacity) {\r\n assert capacity >= n;\r\n Item[] temp = (Item[]) new Object[capacity];\r\n for (int i = 0; i < n; i++) {\r\n temp[i] = list[(first + i) % list.length];\r\n }\r\n list = temp;\r\n first = 0;prior=list.length-1;\r\n last = n-1;latter=n;}", "void assignSize (int size) {\n array = new int[size];\n }", "public void setHasMoreJobs( boolean hasMoreJobs ) ;", "public void resetRunCount() {\n\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "Integer backlogCapacity();", "@Override\n public void worked(int work) {\n internalWorked(work);\n\t}", "public void initialize(int size) {\n setMaxSize(size);\n }", "public CacheThreadPool(final int size)\n {\n synchronized (m_lock)\n {\n m_pool = new PooledThread[size];\n \n // We assume that a list is expanded once it reaches half of its capacity\n // and it doesn't harm if the assumption is wrong.\n m_index = new ArrayList(size + 1 + (size / 2));\n }\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void sizeHasBeenSet() {\n isSizeSet = true;\n }", "public void autoSize() {\n\t\t//no op\n\t}", "private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}", "@Override\r\n\tpublic void internalWorked(double work) {\n\r\n\t}", "public void setSize(Integer size) {\n this.size = size;\n }", "private void growQueue() {\n Runnable[] oldQ = queue;\n int oldSize = oldQ.length;\n int newSize = oldSize << 1;\n if (newSize > MAXIMUM_QUEUE_CAPACITY)\n throw new RejectedExecutionException(\"Queue capacity exceeded\");\n Runnable[] newQ = queue = new Runnable[newSize];\n\n int b = base;\n int bf = b + oldSize;\n int oldMask = oldSize - 1;\n int newMask = newSize - 1;\n do {\n int oldIndex = b & oldMask;\n Runnable t = oldQ[oldIndex];\n if (t != null && !casSlotNull(oldQ, oldIndex, t))\n t = null;\n setSlot(newQ, b & newMask, t);\n } while (++b != bf);\n pool.signalWork();\n }", "void incNetSize(){\r\n\t\t\t\tif (size<500)size+=50;\r\n\t\t\t\telse System.out.println(\"Max net size reached!\");\r\n\t\t\t}", "@Override\r\n\tpublic void setSequenceSize(int size) {\n\t\tthis.sequence = \"Sequence length: \"+size;\r\n\t\tupdate();\r\n\t}", "public SynchronousTimeLimitedTask(Queue<BooleanSupplier> steps) {\n _steps = steps;\n }" ]
[ "0.57286817", "0.570409", "0.56671226", "0.5658356", "0.5634705", "0.55915684", "0.5535549", "0.5534126", "0.5471959", "0.54606545", "0.5454453", "0.54464996", "0.5414811", "0.5375105", "0.5368977", "0.5354704", "0.5347116", "0.53327644", "0.5298269", "0.52760947", "0.52703506", "0.526435", "0.5243292", "0.5228664", "0.52248305", "0.5210489", "0.52013457", "0.51979643", "0.5178344", "0.51780516", "0.51666224", "0.51632065", "0.51563907", "0.51367503", "0.51216877", "0.511909", "0.511909", "0.5089742", "0.5085407", "0.50716597", "0.5065958", "0.506589", "0.50539774", "0.50498825", "0.5048485", "0.5046034", "0.5032759", "0.503238", "0.50221", "0.50218505", "0.50204957", "0.50188154", "0.5011696", "0.49988115", "0.49983248", "0.49914125", "0.4984918", "0.4980371", "0.49766314", "0.49664357", "0.49547413", "0.49471548", "0.49444032", "0.49401033", "0.49098197", "0.49096763", "0.49052182", "0.48952594", "0.4890124", "0.48832846", "0.48815846", "0.48772696", "0.48763895", "0.4869066", "0.48665583", "0.48663375", "0.48632434", "0.4862743", "0.48589054", "0.48569614", "0.48558435", "0.48547092", "0.48547092", "0.48547092", "0.48547092", "0.48540503", "0.48539054", "0.48522466", "0.4850791", "0.484668", "0.48439527", "0.48439527", "0.48421404", "0.4838969", "0.48381773", "0.48348138", "0.4834625", "0.48298", "0.4828707", "0.48247063", "0.48216435" ]
0.0
-1
Do a unit of work from the given priority
private boolean workUnit(Priority priority, int maxMillis) { jobs.removeFirst(priority); Schedulable job = jobs.getRemovedJob(); if (job == null) { return false; } double start = timer.getTime(); TaskInfo taskInfo = taskInfos.get(job); Timer profilingTimer = null; if (taskInfo != null && Timing.isEnabled()) { Timing.enterScope(taskInfo.scopeValues); profilingTimer = Timing.start("schedule " + job.getClass().getSimpleName()); } try { if (job instanceof IncrementalTask) { boolean isFinished = !jobs.getRemovedJobAsProcess().execute(); if (isFinished) { // Remove all trace cancel(job); } else { TaskInfo task = taskInfos.get(job); // If the job has more work to do, we add it back into the job queue, unless it has has // already been cancelled during execution (which would imply !hasJob) if (task != null && hasJob(job)) { // if it is a repeating job, add it to a delay before we contiune if (task.calculateNextExecuteTime(start)) { delayedJobs.addDelayedJob(task); } else if (!delayedJobs.has(task.id)) { jobs.add(priority, job); } } } } else { Task task = jobs.getRemovedJobAsTask(); // Remove all trace. cancel(job); task.execute(); } } finally { if (profilingTimer != null) { Timing.stop(profilingTimer); Timing.exitScope(); } } int timeSpent = (int) ( timer.getTime() - start); // This will only be useful when debugging in deobfuscated mode. triggerOnJobExecuted(job, timeSpent); return hasTasks(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }", "public void updatePriority(){\n\t\tpriority = (int) priority / 2;\n\t}", "public abstract int priority();", "int priority();", "int priority();", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "public void setPriority(Priority priority);", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "int getPriority( int priority );", "public void setPriority(int priority){\n this.priority = priority;\n }", "public void notifyAll(int priority) {}", "private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }", "@Test\n public void priorityTest() {\n // TODO: test priority\n }", "public void setPriority(double priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public abstract double getPriority();", "public void setPriority(java.lang.Object priority) {\n this.priority = priority;\n }", "private void operationTask(javax.servlet.http.HttpServletRequest request) {\n\t\t//System.out.println(\"operation=\" + operation); //temp\n\t\tif (\"savePriority\".equals(getOperation())) {\n\t\t\tString[] priorM = request.getParameterValues(\"vo.priority\");\n\t\t\tfor (int i = 0; i < priorM.length; i++) {\n\t\t\t\t//System.out.println(\"priorM[\" + i + \"]=\" + priorM[i]); //temp\n\t\t\t\tLeasePriorCntForAct_VO vo = ((LeasePriorCntForAct_TO) getList().get(i)).getVo();\n\t\t\t\t//System.out.println(vo); //temp\n\t\t\t\tInteger fromPriority = vo.getPriority();\n\t\t\t\tInteger toPriority = null;\n\t\t\t\ttry {\n\t\t\t\t\ttoPriority = new Integer(priorM[i]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Недопустимый ввод для приоритета:'\" + priorM[i] + \"'\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tvo.setPriority(toPriority);\n\t\t\t\tLeasePriorCntForAct_VO findVO = CDBC_LeasePriorCntForAct_Object.find(vo.getIdact(), vo.getLeasedocument());\n\t\t\t\tif (findVO != null) {\n\t\t\t\t\tInteger findPriority = findVO.getPriority();\n\t\t\t\t\tif (!toPriority.equals(findPriority)) {\n\t\t\t\t\t\tCDBC_LeasePriorCntForAct_Object.edit(vo);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!toPriority.equals(CDBC_LeasePriorCntForAct_Object.DEFAULT_PRIORITY)) {\n\t\t\t\t\t\tCDBC_LeasePriorCntForAct_Object.add(vo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresetMass();\n\t\t}\n\t}", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "public void assignPriority(){\n\t /**\n\t * Uses a simple algorithm, where user priority and difficulty are weighted equally\n\t * Weight is given highest flat priority\n\t * Due date is given lowest priority\n\t * This implementation could be changed without affecting the overall algorithm\n\t */\n\t int user_priority_factor = user_priority * 3;\n\t int difficulty_factor = difficulty * 3;\n\t int weight_factor = weight * 5;\n\t \n\t //Assigns a priority based on the due date\n\t\tswitch(dueDate){\n\t\tcase 'M':\n\t\t\tduedate_priority = 6;\n\t\t\tbreak;\n\t\tcase 'T':\n\t\t duedate_priority = 5;\n\t\t\tbreak;\n\t\tcase 'W':\n\t\t duedate_priority = 4;\n\t\t\tbreak;\n\t\tcase 'R':\n\t\t duedate_priority = 3;\n\t\t\tbreak;\n\t\tcase 'F':\n\t\t\tduedate_priority = 2;\n\t\t\tbreak;\n\t\tcase 'S':\n\t\t\tduedate_priority = 1;\n\t\t\tbreak;\n\t\tcase 'N':\n\t\t\tduedate_priority = 7;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tint duedate_factor = duedate_priority * 2;\n\t priority = user_priority_factor + difficulty_factor + weight_factor\n\t + duedate_factor;\n\t}", "public void evolve() {\n\t\tfurniturePriority++;\r\n\t}", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "void setPriority(int priority);", "void setPriority(int priority);", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "@Override\n\tpublic void execute()\n\t{\n\t\tif( this.player == null )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure the player has opened the priority container\n\t\tif( !( this.player.openContainer instanceof ContainerPriority ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( this.mode )\n\t\t{\n\t\tcase Packet_S_Priority.MODE_SET:\n\t\t\t// Set the priority\n\t\t\t( (ContainerPriority)this.player.openContainer ).onClientRequestSetPriority( this.priority );\n\t\t\tbreak;\n\n\t\tcase Packet_S_Priority.MODE_ADJUST:\n\t\t\t// Adjust the priority\n\t\t\t( (ContainerPriority)this.player.openContainer ).onClientRequestAdjustPriority( this.priority );\n\t\t\tbreak;\n\n\t\tcase Packet_S_Priority.MODE_REQUEST:\n\t\t\t// Request the priority\n\t\t\t( (ContainerPriority)this.player.openContainer ).onClientRequestPriority();\n\t\t\tbreak;\n\t\t}\n\t}", "public abstract int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "public void changePriority(E e, P p) throws NoSuchElementException;", "private void selectPriority(String priority) {\n delegationDefaultCreationScreen.priorityField.click();\n delegationDefaultCreationScreen.picker.sendKeys(priority);\n delegationDefaultCreationScreen.doneButton.click();\n }", "public void setPriority(int data) {\n priority = data;\n }", "@Test\n public void testNoTopUpTasksWithHighPriority() throws Exception {\n\n // SETUP: Set a Task to High Priority\n SchedStaskTable lSchedStask1 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 101 ) );\n lSchedStask1.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask1.update();\n\n SchedStaskTable lSchedStask2 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 102 ) );\n lSchedStask2.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask2.update();\n\n SchedStaskTable lSchedStask3 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 400 ) );\n lSchedStask3.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask3.update();\n\n SchedStaskTable lSchedStask4 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 500 ) );\n lSchedStask4.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask4.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had no results\n assertEquals( 0, iDataSet.getRowCount() );\n\n // TEARDOWN: Undo the setup changes\n lSchedStask1.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask1.update();\n\n lSchedStask2.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask2.update();\n\n lSchedStask3.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask3.update();\n\n lSchedStask4.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask4.update();\n }", "public static void main(String[] args) {\n\t\tLab_11_ThreadPriority n=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n1=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n2=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n3=new Lab_11_ThreadPriority();\n\t\tn.start();\n\t\tn1.start();\n\t\tn2.start();\n\t\tn3.start();\n\t\tn.setPriority(NORM_PRIORITY);\n\t\tn1.setPriority(MAX_PRIORITY);\n\t\tn2.setPriority(MIN_PRIORITY);\n\t\t\n\t}", "public void setPriority(@NotNull Priority priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "AbstractBinaryOperator(Priority priority) {\n this.priority = priority;\n }", "public int getPriority();", "public int getPriority();", "public byte getWorkPriority() {\n return 80;\n }", "public void setPriority(int r) {\n priority = r;\n }", "public abstract boolean setPriority(int priority);", "private void runBest() {\n }", "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "Entity determinePriorityTarget();", "public void setPriority(boolean priority) {\n this.priority = priority;\n }", "public void act() {\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.act();\n\t\t\n\t\tif (hasPriority == Priority.ARMY && armyQueue.size() > 0) {\n\t\t\t//Tell ArmyManager to build top unit in queue\n\t\t}\n\t\telse if (hasPriority == Priority.BUILDINGS && buildingQueue.size() > 0) {\n\t\t\t//Tell BuildManager to build top building in queue\n\t\t}\n\t\telse if (hasPriority == Priority.WORKERS) {\n\t\t\t//ResourceManager has requested more workers\n\t\t}\n\t}", "public void setPriority(int priority) {\n Lib.assertTrue(Machine.interrupt().disabled());\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n recalculateThreadScheduling();\n update();\n }", "public static void main(String[] arg) {\n\t\tMyPriorityQueue pq = new MyPriorityQueue();\n\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.enqueue(3, \"candy\");\t// low priority\n\t\tpq.enqueue(1, \"milk\");\t// high priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.enqueue(2, \"banana\");// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> milk come out first although it was not the first one enter the queue!\n\t\tpq.peek();\n\t\tpq.enqueue(3, \"gum\");\t// low priority\n\t\tpq.dequeue();\t\t\t// ----> cheese come out next\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// low priority\n\t\tpq.dequeue();\t\t\t// apple come out after ALL high priority items had dequeued.\n\t\tpq.dequeue();\t\t\t// ----> banana\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.peek();\n\t\tpq.enqueue(1, \"fish\");\t// high priority\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> fish\n\t\tpq.dequeue();\t\t\t// ----> apple\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.dequeue();\t\t\t// ----> candy\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// medium priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.peek();\n\t\n\t}", "public void setPriority(int priority) \n {\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n lastEffectivePriority = -1; //Possible need to update effective priority\n }", "private int getPriority(Order order) {\n if (order.getVip()) {\n return vipPriority;\n } else if (order.getFood()) {\n return foodPriority;\n } else {\n return otherPriority;\n }\n }", "private boolean workAll(Priority priority, int maxMillis, double endTime) {\n if (controller.isRunnable(priority) && jobs.numJobsAtPriority(priority) != 0) {\n boolean moreWork;\n boolean moreTime;\n do {\n moreWork = workUnit(priority, maxMillis);\n // TODO(user):\n // Add the following:\n //\n // double duration = finish - start;\n // if (duration > MAX_DURATION_MS && Debug.errorClient().shouldLog()) {\n // Debug.errorClient().log(\"HIGH priority task took a whopping: \"\n // + ((int) duration) + \"ms to run\");\n // }\n //\n // after dependencies are cleaned up such that Debug does not depend on Scheduler, so that\n // Scheduler can depend on Debug without a cycle.\n moreTime = timer.getTime() < endTime;\n } while (moreWork && moreTime);\n\n return moreTime;\n }\n return true;\n }", "public void setPriority( int priority )\n\t{\n\t\tmPriority = priority;\n\t\t\n\t\tmUpdated = true;\n\t}", "public void setPriority(int value) {\n this.priority = value;\n }", "@Override\n\tpublic void run() {\n\t\t\tList<TaskTO> taskTOList = PriortyScheduler.getPriorityList(getEmployeeTO().getTaskTOList());\n\t\t\tfor(TaskTO taskTO : taskTOList){\n\t\t\t\tSystem.out.println(getEmployeeTO().getEmpName()+\">>\"+taskTO.getTaskName()+\">>\"+taskTO.getTimeTake());\n\t\t\t}\n\t\t\n\t}", "public void setPriority(boolean priority){\n\t\tthis.priority = priority;\n\t}", "public static void sendPriorityDelta( final int priority, final EntityPlayer player )\n\t{\n\t\tPacket_S_Priority packet = newPacket( player, MODE_ADJUST );\n\n\t\t// Set the priority delta\n\t\tpacket.priority = priority;\n\n\t\t// Send it\n\t\tNetworkHandler.sendPacketToServer( packet );\n\t}", "public void requestElevatorPickUp(int floorId, UserPriority priority) {\n\t\televatorManager.requestPickup(new ElevatorManagerRequest(floorId, priority));\n\t}", "public static void main(String[] args) {\n\t\tB b1=new B();\n\t\tB b2=new B();\n\t\tB b3=new B();\n\t\tThread t=new Thread(b1);\n\t\tThread t1=new Thread(b2);\n\t\tThread t2=new Thread(b2);\n\t\tt.setName(\"金\");\n\t t1.setName(\"玉\");\n\t t2.setName(\"宝\");\n\t\t//System.out.println(\"总的线程数目:\"+Thread.activeCount());\n\t\tSystem.out.println(\"main的优先权值为:\"+Thread.currentThread().getPriority());\n\t\tSystem.out.println(\"t的优先权值为:\"+t.getPriority());\n\t\tSystem.out.println(\"t1的优先权值为:\"+t1.getPriority());\n\t\tSystem.out.println(\"t2的优先权值为:\"+t2.getPriority());\n\t\tt.start();\n\t\tt1.start();\n\t\tt2.start();//只会执行方法run()中的\n\t\tt.setPriority(10);\n\t\tt2.setPriority(7);\n\t\tt1.setPriority(3);\n\t\t\n\t\t//设定优先权值\n\t\ttry {\n\t\t\tThread.sleep(1800);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(t.getName()+\"执行:\"+b1.Counter()+\"次\");\n\t\tSystem.out.println(t1.getName()+\"执行:\"+b2.Counter()+\"次\");\n\t\tSystem.out.println(t2.getName()+\"执行:\"+b3.Counter()+\"次\");\n\n\t}", "public void setPriority(Boolean priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(BigDecimal priority) {\n\t\tthis.priority = priority;\n\t}", "public static void main(String[] args) {\n\n\t\tThread Th1 = new MyThreadPriority(\"First\",1);\n\t\t// actually we only need constructor\n\t\t\n\t\tThread Th2 = new MyThreadPriority(\"Second\",5);\n\t\t\n\t\tThread Th3 = new MyThreadPriority(\"Third\",10);\n\n\t}", "private void performPhysicalTask() {\r\n\t\tlong millis = (long) ((100 - getAveragePhysicalScore()) * 100.0);\r\n\r\n\t\ttry {\r\n\t\t\tMain.Log(\"Team \" + getName() + \" performing physical task for \" + millis + \" millis\");\r\n\t\t\tsleep(millis);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tfor (int i=0; i<10; i++) {\r\n\t\t\tfinal Thread thread = new ThreadPriority(\"Thread-\" + (i+1));\r\n\t\t\tif (i != 9) {\r\n\t\t\t\tthread.setPriority(Thread.MIN_PRIORITY);\r\n\t\t\t} else {\r\n\t\t\t\tthread.setPriority(Thread.MAX_PRIORITY);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthread.start();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n FirstComeFirstServed FCFS = new FirstComeFirstServed();\n\n ShortestJobFirst SJF = new ShortestJobFirst();\n ShortestRemainingTime SRT = new ShortestRemainingTime();\n RoundRobin RR = new RoundRobin();\n NonpreemptiveHighestPriorityFirst NP_HPF = new NonpreemptiveHighestPriorityFirst();\n PreemptiveHighestPriorityFirst P_HPF = new PreemptiveHighestPriorityFirst();\n NonpreemptiveHighestPriorityFirstAging NP_HPF_AG = new NonpreemptiveHighestPriorityFirstAging();\n PreemptiveHighestPriorityFirstAging P_HPF_AG = new PreemptiveHighestPriorityFirstAging();\n\n\n PriorityQueue<Process>[] priorityQueues = new PriorityQueue[COUNT_ALGORITHM + 1];\n int [] SEEDS = new int[]{1234, 117777,33317,17111, 19191};\n\n for (int j = 0; j < ROUND; j++) {\n System.out.format(\"\\n### Start Running Round %d ###\\n\", j);\n // write your code here\n priorityQueues[0] = ProcessGenerator.generateJobs (SEEDS[j], 20);\n\n // make a copy for each algorithm\n for (int i = 1; i < COUNT_ALGORITHM + 1; i++) {\n priorityQueues[i] = new PriorityQueue<Process>(priorityQueues[0]);\n }\n\n // print the process list in ascending order\n while (!priorityQueues[COUNT_ALGORITHM].isEmpty()) {\n System.out.println(priorityQueues[COUNT_ALGORITHM].poll());\n }\n\n\n // Add different scheduling algorithms here\n System.out.println(\"\\nFisrt come first servered\");\n FCFS.schedule(priorityQueues[0]);\n\n System.out.println(\"\\nShortest Job First\");\n SJF.schedule(priorityQueues[1]);\n\n System.out.println(\"\\nShortest remaining time\");\n SRT.schedule(priorityQueues[2]);\n System.out.println(\"\\nRoundRobin\");\n RR.schedule(priorityQueues[4]);\n\n System.out.println(\"\\nNonpreemptive Highest Priority First\");\n NP_HPF.schedule(priorityQueues[5]);\n\n System.out.println(\"\\nNonpreemptive Highest Priority First (Aging)\");\n NP_HPF_AG.schedule(priorityQueues[6]);\n\n System.out.println(\"\\nPreemptive Highest Priority First\");\n P_HPF.schedule(priorityQueues[7]);\n\n System.out.println(\"\\nPreemptive Highest Priority First (Aging)\");\n P_HPF_AG.schedule(priorityQueues[8]);\n\n\n }\n\n\n System.out.println(\"\\n\");\n System.out.format(\"==================== 5 Round Average Statistics ====================\\n\");\n System.out.format(\"%10s %20s %20s %20s\\n\", \"Algorithm\", \"Turnaround\", \"Waiting\", \"Response\");\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"FCFS\",\n FCFS.getStats().getAvgTurnaroundTime(),\n FCFS.getStats().getAvgWaitingTime(),\n FCFS.getStats().getAvgResponseTime());\n\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SJF\",\n SJF.getStats().getAvgTurnaroundTime(),\n SJF.getStats().getAvgWaitingTime(),\n SJF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SRT\",\n SRT.getStats().getAvgTurnaroundTime(),\n SRT.getStats().getAvgWaitingTime(),\n SRT.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"RR\",\n RR.getStats().getAvgTurnaroundTime(),\n RR.getStats().getAvgWaitingTime(),\n RR.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SJF\",\n SJF.getStats().getAvgTurnaroundTime(),\n SJF.getStats().getAvgWaitingTime(),\n SJF.getStats().getAvgResponseTime());\n\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"NP_HPF\",\n NP_HPF.getStats().getAvgTurnaroundTime(),\n NP_HPF.getStats().getAvgWaitingTime(),\n NP_HPF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"P_HPF\",\n P_HPF.getStats().getAvgTurnaroundTime(),\n P_HPF.getStats().getAvgWaitingTime(),\n P_HPF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"NP_HPF_AG\",\n NP_HPF_AG.getStats().getAvgTurnaroundTime(),\n NP_HPF_AG.getStats().getAvgWaitingTime(),\n NP_HPF_AG.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"P_HPF_AG\",\n P_HPF_AG.getStats().getAvgTurnaroundTime(),\n P_HPF_AG.getStats().getAvgWaitingTime(),\n P_HPF_AG.getStats().getAvgResponseTime());\n\n }", "private void scheduleDriver(Order order) {\n val pickupTask = newPickupTask(this, order.getId());\n driverDepot.schedulePickup(pickupTask, order);\n }", "public static void sendPriority( final int priority, final EntityPlayer player )\n\t{\n\t\tPacket_S_Priority packet = newPacket( player, MODE_SET );\n\n\t\t// Set the priority\n\t\tpacket.priority = priority;\n\n\t\t// Send it\n\t\tNetworkHandler.sendPacketToServer( packet );\n\t}", "private void scheduleJob(Priority priority, Schedulable job) {\n if (controller.isSuppressed(priority, job) && priority != Priority.INTERNAL_SUPPRESS) {\n scheduleJob(Priority.INTERNAL_SUPPRESS, job);\n return;\n }\n\n TaskInfo info = taskInfos.get(job);\n\n // Cancel job if already scheduled\n if (info != null) {\n\n // Optimisation: nothing's changed, just return.\n if (priority == info.priority) {\n return;\n }\n\n cancel(job);\n }\n\n info = createTask(priority, job);\n jobs.add(priority, job);\n\n maybeScheduleSlice();\n }", "public int getEffectivePriority() {\n Lib.assertTrue(Machine.interrupt().disabled());\n\n\n return getWinningPriority();\n }", "@Test\n public void launchesEventhandlerThreadpoolPriorityTest() {\n // TODO: test launchesEventhandlerThreadpoolPriority\n }", "public static void main (String []args) throws FileNotFoundException {\n\t\tArrayList<Item> priorities = new ArrayList<Item>();\n\t\t\n\t\t// pq.id.100K1.1\n\t\t// pq.id.100K4.1\n\t\t// pq.id.10K1.2\n\t\t// pqsort.100K.3\n\t\t\n\t\t// do this to retrieve large cases via internet.\n\t\t//java.net.URL u;\n\t\t//Scanner s = new Scanner (u.openStream());\n\t\t\n\t\tFile f = new File (\"tests\\\\algs\\\\model\\\\performance\\\\pq_random\\\\pqsort.1K.1\");\n\t\tScanner sc = new Scanner (f);\n\t\twhile (sc.hasNext()) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif (s.startsWith(\"pqh\")) continue;\n\t\t\tif (s.startsWith(\"com\")) continue;\n\t\t\t\n\t\t\tif (s.startsWith(\"dmn\")) {\n\t\t\t\tpriorities.add(sentinel);\n\t\t\t} else {\n\t\t\t\tStringTokenizer st = new StringTokenizer(s, \" \");\n\t\t\t\tst.nextToken();\n\t\t\t\tDouble d = Double.parseDouble(st.nextToken());\n\t\t\t\tInteger i = Integer.parseInt(st.nextToken());\n\t\t\t\tpriorities.add(new Item (i, d));\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\t\n\t\t// Now ready to measure PQ.\n\t\tIPQueue ipq = new ArrayPQ();\n\t\t//IPQueue ipq = new BalancedTreePQ();\n\t\t\n\t\tTrialSuite minTS = new TrialSuite ();\n\t\tTrialSuite insTS = new TrialSuite ();\n\t\tlong n0 = System.currentTimeMillis();\n\t\tfor (int i = 0; i < priorities.size(); i++) {\n\t\t\tItem it = priorities.get(i);\n\t\t\tif (it == sentinel) {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.minimum();\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tminTS.addTrial(1, n1, n2);\n\t\t\t} else {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.insert(it.priority, it.item);\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tinsTS.addTrial(1, n1, n2);\n\t\t\t}\n\t\t}\n\t\tlong e0 = System.currentTimeMillis();\n\t\tSystem.out.println ((e0 - n0) + \" milliseconds for completion.\");\n\t\tSystem.out.println (\"min\");\n\t\tSystem.out.println (minTS.computeTable());\n\t\tSystem.out.println (\"insert\");\n\t\tSystem.out.println (insTS.computeTable());\n\t}", "public void setPriority(String priority) {\n\t\tthis.ticketPriority = priority;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint item;\n\t\tpriority c=new priority();\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\titem=sc.nextInt();\n\t\t\tc.add(item);\n\t\t\t\n\t\t}\n\t\t//c.highestremove();\n\t\tc.hightest();\n\tc.display();\n\t\t//c.display();\n\n\t}", "public static void main(String[] args) {\n\t\tQueue<Integer> integerPriorityQueue = new PriorityQueue<>(7);\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tintegerPriorityQueue.add(new Integer(rand.nextInt(100)));\r\n\t\t}\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tInteger in = integerPriorityQueue.poll();\r\n\t\t\tSystem.out.println(\"Processing Integer:\" + in);\r\n\t\t}\r\n\r\n\t\t// PriorityQueue example with Comparator\r\n\t\tQueue<Customer> customerPriorityQueue = new PriorityQueue<>(7, idComparator);\r\n\t\taddDataToQueue(customerPriorityQueue);\r\n\r\n\t\tpollDataFromQueue(customerPriorityQueue);\r\n\r\n\t}", "public Priority getPriority();", "private void _updateStatistics(String priority) {\n _numDropped++;\n if (\"0\".equals(priority)) {\n _numGuides++;\n } else if (\"1\".equals(priority)) {\n _numP1++;\n } else if (\"2\".equals(priority)) {\n _numP2++;\n } else if (\"3\".equals(priority)) {\n _numP3++;\n }\n }", "public void generatePriority() {\n\t\tpriority = .25 * frequency + .25 * age + .25 * links + .25 * money;\n\t}", "public int priority(){\n return 0; //TODO codavaj!!\n }", "public void changePriority(Object o,int newPriority) {\n for(int a=0;a<nodes.size();a++)\n if(((Node)nodes.elementAt(a)).data==o)\n insert(removeAt(a),newPriority);\n }", "public synchronized void setThreadPriority(int threadPriority)\n/* */ {\n/* 200 */ if (threadPriority < 1) {\n/* 201 */ this.threadPriority = 1;\n/* */ }\n/* 203 */ else if (threadPriority > 10) {\n/* 204 */ this.threadPriority = 10;\n/* */ } else\n/* 206 */ this.threadPriority = threadPriority;\n/* 207 */ notifyAll();\n/* */ }", "@Override\n \tpublic int priority() {\n \t\treturn 10;\n \t}", "public void addProcesso(ProcessoPrioridade p) {\r\n\t\tthis.getEscalonadores().get(p.getPrioridade()-1).addProcesso(p);\r\n\t\tfor (int i=p.getPrioridade(); this.getEscalonadores().size()> i; i++) {\r\n\t\t\tif (this.getEscalonadores().get(i).temProcessosExecutando()) {\r\n\t\t\t\tthis.getEscalonadores().get(i).executandoVaiParaEspera();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getEscalonadores().get(p.getPrioridade()-1).temProcessosExecutando()){\r\n\t\t\tfor (int i=p.getPrioridade()-2 ; 0 <= i; i--) {\r\n\t\t\t\tif(this.getEscalonadores().get(i).temProcessosExecutando()) {\r\n\t\t\t\t\tthis.getEscalonadores().get(p.getPrioridade()-1).executandoVaiParaEspera();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int addWorkGroup(int priority, WorkGroup wg) {\r\n \treturn addWorkGroup(priority, wg, new TrueCondition(), 0L);\r\n }", "private void setPriority(final Integer priority) {\n Story story = (Story) getTableRow().getItem();\n if (priority != null) {\n try {\n getModel().changeStoryPriority(story, priority);\n }\n catch (CustomException e) {\n addFormError(textField, \"{NanError}\");\n }\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().changeStoryPriority(story, null);\n } catch (CustomException e) {\n ErrorReporter.get().reportError(e, \"Failed to set priority\");\n }\n });\n }\n }", "public int getPriority(){\n return 2;\n }", "public void setPriority(@RequestPriority int priority) {\n this.priority = priority;\n }", "public int incrementPriority() {\n\t\treturn this.priority.incrementAndGet();\n\t}", "public void setPriority(String arg, String compcode, String left_paren, String right_paren, String and_or) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.PRIORITY.toString(), arg, compcode, left_paren, right_paren, and_or);\n\t}", "public Iterator findTasksOfPriority(String requestedPriority) {\n ArrayList<TodoItem> priorityList = new ArrayList<TodoItem>();\n // TODO: Add source code that will find and return all tasks of the requestedPriority\n Iterator iterator = todoItems.iterator();\n while(iterator.hasNext()) {\n TodoItem todoItem = (TodoItem)iterator.next();\n if(todoItem.getPriority().equals(requestedPriority)) {\n priorityList.add(todoItem);\n }\n }\n\n return priorityList.iterator();\n }", "default byte getPriority() {\n\t\treturn 0;\n\t}", "protected void processTemporalRule(){\n RuleThread currntThrd;\n Thread currntThrdParent; // the parent of the current thread;\n int currntOperatingMode;\n int currntThrdPriority ;\n\n if( temporalRuleQueue.getHead()!= null){\n\n //If the rule thread is the top level, trigger the rule.\n currntThrd=temporalRuleQueue.getHead();\n while(currntThrd!= null){\n currntThrdPriority = currntThrd.getPriority ();\n currntThrdParent = currntThrd.getParent();\n\n if (currntThrd.getOperatingMode() == RuleOperatingMode.READY\n && !(currntThrd.getParent() == applThrd ||\n currntThrd.getParent().getClass().getName().equals(\"EventDispatchThread\")||\n currntThrd.getParent().getName ().equals (Constant.LEDReceiverThreadName)\n )){\n if(ruleSchedulerDebug)\n\t\t \t\t System.out.println(\"Changing mode of \"+currntThrd.getName()+\"from READY to EXE\");\n\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\t\t\t\t currntThrd.setScheduler(this);\n currntThrd.start();\n int rulePriority = 0;\n currntThrdParent = currntThrd;\n if(currntThrdParent instanceof RuleThread){\n rulePriority = currntThrd.getRulePriority();\n }\n currntThrd = currntThrd.next;\n while(currntThrd != null && currntThrd instanceof RuleThread &&\n currntThrd.getRulePriority() == rulePriority\n \t\t\t\t\t\t\t && currntThrd.getParent() == currntThrdParent ){\n if(ruleSchedulerDebug)\n \t\t\t System.out.print(\" start child thread =>\");\n\n currntThrd.print();\n currntThrd.setScheduler(this);\n if(\tcurrntThrd.getOperatingMode()== RuleOperatingMode.READY ){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n currntThrd.start();\n }\n \t\t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n // case 1.2:\n else if (currntThrd != null &&\tcurrntThrd.getOperatingMode() == RuleOperatingMode.EXE){\n \t\t\t\tcurrntThrd = currntThrd.next;\n\n }\n // case 1.3:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.WAIT){\n\t\t\t\t if(currntThrd.next == null){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\n// ;\n // All its childs has been completed.\n // This currntThread's operating mode will be changed to FINISHED.\n }\n\t\t\t\t\telse{\n // check whether its neighbor is its child\n\t\t\t\t\t\tif(currntThrd.next.getParent() == currntThrdParent){\n if(ruleSchedulerDebug){\n\t \t\t\t\t\t System.out.println(\"\\n\"+currntThrd.getName()+\" call childRecurse \"+currntThrd.next.getName());\n\t\t \t\t\t\t\tcurrntThrd.print();\n }\n\n childRecurse(currntThrd, temporalRuleQueue);\n }\n }\n currntThrd = currntThrd.next;\n }\n // case 1.4:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.FINISHED){\n if(ruleSchedulerDebug){\n\t\t\t\t\t System.out.println(\"delete \"+currntThrd.getName() +\" rule thread from rule queue.\");\n\t\t\t\t\t\tcurrntThrd.print();\n }\n processRuleList.deleteRuleThread(currntThrd,temporalRuleQueue);\n \tcurrntThrd = currntThrd.next;\n }\n else{\n \t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n }\n }" ]
[ "0.6218584", "0.61967146", "0.6174983", "0.6172542", "0.6172542", "0.61102825", "0.6110089", "0.6099981", "0.6091297", "0.6052449", "0.60517097", "0.59997183", "0.5993406", "0.59893197", "0.596954", "0.596954", "0.59631366", "0.5886863", "0.588577", "0.58819973", "0.58661586", "0.582472", "0.58186805", "0.58186805", "0.58186805", "0.58186805", "0.58186805", "0.58186805", "0.58186805", "0.58186805", "0.58107364", "0.58053076", "0.58053076", "0.5794456", "0.5784756", "0.5765096", "0.5765096", "0.5765096", "0.575141", "0.5740734", "0.57341653", "0.5722599", "0.5703209", "0.5691376", "0.5672627", "0.56683826", "0.56513757", "0.56513757", "0.560625", "0.56054807", "0.557012", "0.55546093", "0.5545896", "0.55392873", "0.5528315", "0.5524327", "0.55206186", "0.55199355", "0.5502417", "0.5497771", "0.5495358", "0.5482638", "0.54710615", "0.5469209", "0.54664826", "0.5466004", "0.5461628", "0.54528683", "0.54504776", "0.54503304", "0.5437766", "0.54342556", "0.5425989", "0.5407671", "0.54065543", "0.54006433", "0.53962797", "0.5388742", "0.53881395", "0.53833926", "0.53821003", "0.537731", "0.53753984", "0.535744", "0.53481174", "0.5333733", "0.53299874", "0.5329951", "0.531905", "0.53173465", "0.5311733", "0.5309982", "0.5302281", "0.52971286", "0.52867526", "0.5274191", "0.52668303", "0.5266654", "0.5262931", "0.5249545" ]
0.5678796
44
Try to execute all the jobs at the given priority. At least 1 job at the given priority will be executed.
private boolean workAll(Priority priority, int maxMillis, double endTime) { if (controller.isRunnable(priority) && jobs.numJobsAtPriority(priority) != 0) { boolean moreWork; boolean moreTime; do { moreWork = workUnit(priority, maxMillis); // TODO(user): // Add the following: // // double duration = finish - start; // if (duration > MAX_DURATION_MS && Debug.errorClient().shouldLog()) { // Debug.errorClient().log("HIGH priority task took a whopping: " // + ((int) duration) + "ms to run"); // } // // after dependencies are cleaned up such that Debug does not depend on Scheduler, so that // Scheduler can depend on Debug without a cycle. moreTime = timer.getTime() < endTime; } while (moreWork && moreTime); return moreTime; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void scheduleOrExecuteJob() {\n try {\n for (TaskScheduler entry : this.schedulers.values()) {\n StandardTaskScheduler scheduler = (StandardTaskScheduler) entry;\n // Maybe other thread close&remove scheduler at the same time\n synchronized (scheduler) {\n this.scheduleOrExecuteJobForGraph(scheduler);\n }\n }\n } catch (Throwable e) {\n LOG.error(\"Exception occurred when schedule job\", e);\n }\n }", "private boolean workUnit(Priority priority, int maxMillis) {\n jobs.removeFirst(priority);\n Schedulable job = jobs.getRemovedJob();\n\n if (job == null) {\n return false;\n }\n\n double start = timer.getTime();\n\n TaskInfo taskInfo = taskInfos.get(job);\n Timer profilingTimer = null;\n if (taskInfo != null && Timing.isEnabled()) {\n Timing.enterScope(taskInfo.scopeValues);\n profilingTimer = Timing.start(\"schedule \" + job.getClass().getSimpleName());\n }\n try {\n if (job instanceof IncrementalTask) {\n boolean isFinished = !jobs.getRemovedJobAsProcess().execute();\n\n if (isFinished) {\n // Remove all trace\n cancel(job);\n } else {\n TaskInfo task = taskInfos.get(job);\n // If the job has more work to do, we add it back into the job queue, unless it has has\n // already been cancelled during execution (which would imply !hasJob)\n if (task != null && hasJob(job)) {\n // if it is a repeating job, add it to a delay before we contiune\n if (task.calculateNextExecuteTime(start)) {\n delayedJobs.addDelayedJob(task);\n } else if (!delayedJobs.has(task.id)) {\n jobs.add(priority, job);\n }\n }\n }\n } else {\n Task task = jobs.getRemovedJobAsTask();\n // Remove all trace.\n cancel(job);\n task.execute();\n }\n } finally {\n if (profilingTimer != null) {\n Timing.stop(profilingTimer);\n Timing.exitScope();\n }\n }\n\n int timeSpent = (int) ( timer.getTime() - start);\n\n // This will only be useful when debugging in deobfuscated mode.\n triggerOnJobExecuted(job, timeSpent);\n\n return hasTasks();\n }", "public void executeQueue() {\n\tLog.d(TaskExecutor.class.getName(), \"Execute \" + mQueue.size() + \" Tasks\");\n\tfor (Task task : mQueue) {\n\t if (!mTaskExecutor.getQueue().contains(task))\n\t\texecuteTask(task);\n\t}\n }", "public static void main(String[] args) {\n FirstComeFirstServed FCFS = new FirstComeFirstServed();\n\n ShortestJobFirst SJF = new ShortestJobFirst();\n ShortestRemainingTime SRT = new ShortestRemainingTime();\n RoundRobin RR = new RoundRobin();\n NonpreemptiveHighestPriorityFirst NP_HPF = new NonpreemptiveHighestPriorityFirst();\n PreemptiveHighestPriorityFirst P_HPF = new PreemptiveHighestPriorityFirst();\n NonpreemptiveHighestPriorityFirstAging NP_HPF_AG = new NonpreemptiveHighestPriorityFirstAging();\n PreemptiveHighestPriorityFirstAging P_HPF_AG = new PreemptiveHighestPriorityFirstAging();\n\n\n PriorityQueue<Process>[] priorityQueues = new PriorityQueue[COUNT_ALGORITHM + 1];\n int [] SEEDS = new int[]{1234, 117777,33317,17111, 19191};\n\n for (int j = 0; j < ROUND; j++) {\n System.out.format(\"\\n### Start Running Round %d ###\\n\", j);\n // write your code here\n priorityQueues[0] = ProcessGenerator.generateJobs (SEEDS[j], 20);\n\n // make a copy for each algorithm\n for (int i = 1; i < COUNT_ALGORITHM + 1; i++) {\n priorityQueues[i] = new PriorityQueue<Process>(priorityQueues[0]);\n }\n\n // print the process list in ascending order\n while (!priorityQueues[COUNT_ALGORITHM].isEmpty()) {\n System.out.println(priorityQueues[COUNT_ALGORITHM].poll());\n }\n\n\n // Add different scheduling algorithms here\n System.out.println(\"\\nFisrt come first servered\");\n FCFS.schedule(priorityQueues[0]);\n\n System.out.println(\"\\nShortest Job First\");\n SJF.schedule(priorityQueues[1]);\n\n System.out.println(\"\\nShortest remaining time\");\n SRT.schedule(priorityQueues[2]);\n System.out.println(\"\\nRoundRobin\");\n RR.schedule(priorityQueues[4]);\n\n System.out.println(\"\\nNonpreemptive Highest Priority First\");\n NP_HPF.schedule(priorityQueues[5]);\n\n System.out.println(\"\\nNonpreemptive Highest Priority First (Aging)\");\n NP_HPF_AG.schedule(priorityQueues[6]);\n\n System.out.println(\"\\nPreemptive Highest Priority First\");\n P_HPF.schedule(priorityQueues[7]);\n\n System.out.println(\"\\nPreemptive Highest Priority First (Aging)\");\n P_HPF_AG.schedule(priorityQueues[8]);\n\n\n }\n\n\n System.out.println(\"\\n\");\n System.out.format(\"==================== 5 Round Average Statistics ====================\\n\");\n System.out.format(\"%10s %20s %20s %20s\\n\", \"Algorithm\", \"Turnaround\", \"Waiting\", \"Response\");\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"FCFS\",\n FCFS.getStats().getAvgTurnaroundTime(),\n FCFS.getStats().getAvgWaitingTime(),\n FCFS.getStats().getAvgResponseTime());\n\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SJF\",\n SJF.getStats().getAvgTurnaroundTime(),\n SJF.getStats().getAvgWaitingTime(),\n SJF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SRT\",\n SRT.getStats().getAvgTurnaroundTime(),\n SRT.getStats().getAvgWaitingTime(),\n SRT.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"RR\",\n RR.getStats().getAvgTurnaroundTime(),\n RR.getStats().getAvgWaitingTime(),\n RR.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"SJF\",\n SJF.getStats().getAvgTurnaroundTime(),\n SJF.getStats().getAvgWaitingTime(),\n SJF.getStats().getAvgResponseTime());\n\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"NP_HPF\",\n NP_HPF.getStats().getAvgTurnaroundTime(),\n NP_HPF.getStats().getAvgWaitingTime(),\n NP_HPF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"P_HPF\",\n P_HPF.getStats().getAvgTurnaroundTime(),\n P_HPF.getStats().getAvgWaitingTime(),\n P_HPF.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"NP_HPF_AG\",\n NP_HPF_AG.getStats().getAvgTurnaroundTime(),\n NP_HPF_AG.getStats().getAvgWaitingTime(),\n NP_HPF_AG.getStats().getAvgResponseTime());\n\n System.out.format(\"%10s %20.3f %20.3f %20.3f\\n\", \"P_HPF_AG\",\n P_HPF_AG.getStats().getAvgTurnaroundTime(),\n P_HPF_AG.getStats().getAvgWaitingTime(),\n P_HPF_AG.getStats().getAvgResponseTime());\n\n }", "public static void main(String[] args) {\n\t\tfor (int i=0; i<10; i++) {\r\n\t\t\tfinal Thread thread = new ThreadPriority(\"Thread-\" + (i+1));\r\n\t\t\tif (i != 9) {\r\n\t\t\t\tthread.setPriority(Thread.MIN_PRIORITY);\r\n\t\t\t} else {\r\n\t\t\t\tthread.setPriority(Thread.MAX_PRIORITY);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthread.start();\r\n\t\t}\r\n\t}", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority){\n this.priority = priority;\n }", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public static void main(String[] args) {\n\t\tLab_11_ThreadPriority n=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n1=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n2=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n3=new Lab_11_ThreadPriority();\n\t\tn.start();\n\t\tn1.start();\n\t\tn2.start();\n\t\tn3.start();\n\t\tn.setPriority(NORM_PRIORITY);\n\t\tn1.setPriority(MAX_PRIORITY);\n\t\tn2.setPriority(MIN_PRIORITY);\n\t\t\n\t}", "@Test\n\tpublic void evaluarPrioridadEmpleadosTest1() {\n\t\tLOGGER.info(\"*****************************evaluarPrioridadEmpleadosTest1*****************************\");\n\n\t\t\n\t\tQueue<Empleado> colaEmpleados = new PriorityBlockingQueue<>(100, new ComparadorDeEmpleados());\n\n\t\tOperador operador1 = new Operador(\"001\", \"pedro\", \"\");\n\t\tOperador operador2 = new Operador(\"002\", \"pablo\", \"\");\n\t\tOperador operador3 = new Operador(\"003\", \"jorge\", \"\");\n\t\tOperador operador4 = new Operador(\"004\", \"nestor\", \"\");\n\n\t\tSupervisor supervisor = new Supervisor(\"005\", \"carlos\", null);\n\t\tSupervisor supervisor2 = new Supervisor(\"006\", \"pedro\", \"\");\n\t\tSupervisor supervisor3 = new Supervisor(\"007\", \"jorge\", \"\");\n\n\t\tDirector director = new Director(\"008\", \"esteban\", \"\");\n\n\t\tcolaEmpleados.add(director);\n\t\tcolaEmpleados.add(operador1);\n\t\tcolaEmpleados.add(operador2);\n\t\tcolaEmpleados.add(supervisor);\n\t\tcolaEmpleados.add(operador4);\n\t\tcolaEmpleados.add(supervisor2);\n\t\tcolaEmpleados.add(supervisor3);\n\t\tcolaEmpleados.add(operador3);\n\n\t\tint size = colaEmpleados.size();\n\t\tfor (int i = 1; i <= size; i++) {\n\t\t\tEmpleado empleado = colaEmpleados.poll();\n\n\t\t\tif (i <= 4) {\n\t\t\t\tAssert.assertTrue(empleado instanceof Operador);\n\t\t\t} else if (i <= 7) {\n\t\t\t\tAssert.assertTrue(empleado instanceof Supervisor);\n\t\t\t} else if (i == 8) {\n\t\t\t\tAssert.assertTrue(empleado instanceof Director);\n\t\t\t}\n\t\t}\n\n\t}", "public void notifyAll(int priority) {}", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }", "public static void HQPriorityAttack(RobotInfo[] enemies, int[] atkOrder) throws GameActionException {\n //Initiate\n int targetIdx = -1, targetType = 1;\n double minHP = 100000;\n \n //Check for weakest of highest priority enemy type\n for(int i=0; i<enemies.length; i++) {\n int type = enemies[i].type.ordinal();\n if(isInSplashRegion(enemies[i].location,HQLocation)) {\n if(atkOrder[type] > targetType) {\n //More important enemy to attack\n targetType = atkOrder[type];\n minHP = enemies[i].health;\n targetIdx = i;\n } else if(atkOrder[type] == targetType && enemies[i].health < minHP) {\n //Same priority enemy but lower health\n minHP = enemies[i].health;\n targetIdx = i;\n }\n }\n }\n if (targetIdx != -1) {\n //Attack\n MapLocation loc = enemies[targetIdx].location;\n if(rc.canAttackLocation(loc)) {\n rc.attackLocation(loc);\n } else {\n //Check if can hit with splash\n loc = loc.add(loc.directionTo(HQLocation));\n if(rc.canAttackLocation(loc)) {\n rc.attackLocation(loc);\n }\n }\n }\n }", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "private void scheduleJob(Priority priority, Schedulable job) {\n if (controller.isSuppressed(priority, job) && priority != Priority.INTERNAL_SUPPRESS) {\n scheduleJob(Priority.INTERNAL_SUPPRESS, job);\n return;\n }\n\n TaskInfo info = taskInfos.get(job);\n\n // Cancel job if already scheduled\n if (info != null) {\n\n // Optimisation: nothing's changed, just return.\n if (priority == info.priority) {\n return;\n }\n\n cancel(job);\n }\n\n info = createTask(priority, job);\n jobs.add(priority, job);\n\n maybeScheduleSlice();\n }", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "@Override\n\tpublic void pauseAllJobs() throws SchedulerException {\n\t\tscheduler.pauseAll();\n\t}", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "@Test\n public void priorityTest() {\n // TODO: test priority\n }", "public abstract int priority();", "public void tryEvaluateAllRules(IBoardAgent oBoard, IPieceAgent oPiece, Map<String, IMoveCandidate> mpCandidatePositions) {\n\t\tm_oLogger.writeLog(LogLevel.DETAILED, \"Evaluating selected move candidate. Piece=\" + oPiece.toLog(), \"tryEvaluateAllRules\", \"DefaultRuleProcessor\");\n\n\t\tIPositionAgent oPosition = oPiece.getPosition();\n\t\tIPlayerAgent oPlayer = oPiece.getPlayer();\n\t\t\n\t\tif (oPosition == null) {\n\t\t\tm_oLogger.writeLog(LogLevel.ERROR, \"Piece is not attached to the Position.\", \"tryEvaluateAllRules\", \"DefaultRuleProcessor\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (oPlayer == null) {\n\t\t\tm_oLogger.writeLog(LogLevel.ERROR, \"No Player is attached to the Position.\", \"tryEvaluateAllRules\", \"DefaultRuleProcessor\");\n\t\t\treturn;\n\t\t}\n\n\t\t// As one or more Rules can be defined against a Piece, and a Rule itself may have further rules, therefore, adding them in a Queue\n\t\t// so that while traversing a Rule if we encounter by another Rule, we would simply add it to this Queue and repeat the same process.\n\t\tQueue<RuleProcessorData> qData = new LinkedList<RuleProcessorData>();\t\t\n \tfor (IRuleAgent oRule : oPosition.getPiece().getRules()) {\n \t\toRule.reset(); \t\t\n \t\tqData.add(new RuleProcessorData(oRule, oPosition, null));\n \t}\n \t\n\t\ttryFindPossibleCandidateMovePositions(oPiece, oPosition, oPlayer, qData, mpCandidatePositions);\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(java.lang.Object priority) {\n this.priority = priority;\n }", "public void setPriority(BigDecimal priority) {\n\t\tthis.priority = priority;\n\t}", "private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }", "@Override\n\tpublic void execute()\n\t{\n\t\tif( this.player == null )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Ensure the player has opened the priority container\n\t\tif( !( this.player.openContainer instanceof ContainerPriority ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( this.mode )\n\t\t{\n\t\tcase Packet_S_Priority.MODE_SET:\n\t\t\t// Set the priority\n\t\t\t( (ContainerPriority)this.player.openContainer ).onClientRequestSetPriority( this.priority );\n\t\t\tbreak;\n\n\t\tcase Packet_S_Priority.MODE_ADJUST:\n\t\t\t// Adjust the priority\n\t\t\t( (ContainerPriority)this.player.openContainer ).onClientRequestAdjustPriority( this.priority );\n\t\t\tbreak;\n\n\t\tcase Packet_S_Priority.MODE_REQUEST:\n\t\t\t// Request the priority\n\t\t\t( (ContainerPriority)this.player.openContainer ).onClientRequestPriority();\n\t\t\tbreak;\n\t\t}\n\t}", "public static void main(String[] arg) {\n\t\tMyPriorityQueue pq = new MyPriorityQueue();\n\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.enqueue(3, \"candy\");\t// low priority\n\t\tpq.enqueue(1, \"milk\");\t// high priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.enqueue(2, \"banana\");// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> milk come out first although it was not the first one enter the queue!\n\t\tpq.peek();\n\t\tpq.enqueue(3, \"gum\");\t// low priority\n\t\tpq.dequeue();\t\t\t// ----> cheese come out next\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// low priority\n\t\tpq.dequeue();\t\t\t// apple come out after ALL high priority items had dequeued.\n\t\tpq.dequeue();\t\t\t// ----> banana\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.peek();\n\t\tpq.enqueue(1, \"fish\");\t// high priority\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> fish\n\t\tpq.dequeue();\t\t\t// ----> apple\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.dequeue();\t\t\t// ----> candy\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// medium priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.peek();\n\t\n\t}", "public void setPriority(Priority priority);", "@NotNull\n List<PriorityClass> getAllPriorityClasses();", "public void prioritizeAll(int size) throws Exception {\n\t\tCoverage coverage = new Coverage();\n\t\tList<TestSuite> suites = getSuites();\t\n\t\tList<TestCase> allTests = coverage.getAllTests(suites);\n\t\tpriorj.prioritizeAll(size, allTests);\n\t}", "private void queueCrawlJob(\n UUID datasetKey, boolean isAbcda, boolean isDwca, boolean isCamtrapDp, int priority, byte[] dataBytes) {\n try {\n // This could in theory fail when two coordinators are running at the same time. They'll have\n // confirmed if this\n // node exists or not earlier but in the meantime another Coordinator might have created it.\n // That means the\n // Exception we throw does not necessarily tell us enough. But this is an edge-case and I feel\n // it's not worth\n // trying to figure out why this failed.\n curator\n .create()\n .creatingParentsIfNeeded()\n .forPath(CrawlerNodePaths.getCrawlInfoPath(datasetKey), dataBytes);\n if (isAbcda) {\n abcdaQueue.put(datasetKey, priority);\n } else if (isDwca) {\n dwcaQueue.put(datasetKey, priority);\n } else if (isCamtrapDp) {\n camtrapDpQueue.put(datasetKey, priority);\n } else {\n xmlQueue.put(datasetKey, priority);\n }\n } catch (Exception e) {\n throw new ServiceUnavailableException(\"Error communicating with ZooKeeper\", e);\n }\n }", "@Override\n \tpublic int priority() {\n \t\treturn 10;\n \t}", "public void setPriority(boolean priority) {\n this.priority = priority;\n }", "private void selectPriority(String priority) {\n delegationDefaultCreationScreen.priorityField.click();\n delegationDefaultCreationScreen.picker.sendKeys(priority);\n delegationDefaultCreationScreen.doneButton.click();\n }", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "static Exception executeAll(\r\n ExecutorService executorService, \r\n Collection<Callable<Object>> callables) \r\n throws InterruptedException\r\n {\r\n CompletionService<Object> completionService =\r\n new ExecutorCompletionService<Object>(executorService);\r\n int n = callables.size();\r\n List<Future<Object>> futures = new ArrayList<Future<Object>>(n);\r\n Exception caughtException = null;\r\n try\r\n {\r\n for (Callable<Object> callable : callables)\r\n {\r\n futures.add(completionService.submit(callable));\r\n }\r\n for (int i = 0; i < n; ++i)\r\n {\r\n try\r\n {\r\n Future<Object> future = completionService.take();\r\n future.get();\r\n } \r\n catch (ExecutionException e)\r\n {\r\n logger.fine(\"Exception during execution: \" + e);\r\n caughtException = e;\r\n break;\r\n }\r\n }\r\n } \r\n catch (RejectedExecutionException e)\r\n {\r\n // This should not happen: When the executor is shut down,\r\n // then no more executions should be scheduled\r\n logger.severe(\"Cannot schedule execution: \" + e);\r\n caughtException = e;\r\n }\r\n finally\r\n {\r\n if (caughtException != null)\r\n {\r\n logger.info(\"Canceling execution of remaining tasks\");\r\n for (Future<Object> f : futures)\r\n {\r\n f.cancel(true);\r\n }\r\n }\r\n }\r\n return caughtException;\r\n }", "public void executeAll()\n {\n this.queue.clear();\n this.queue_set = false;\n this.resetComputation();\n while(executeNext()) {}\n }", "@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();", "public void checkForPriority(int i) throws IllegalCommandArgumentException {\n if (wordsOfInput[i].indexOf(\"!\") == 0) {\n if ((!containsStartDate || !containsStartTime) && index > i) {\n index = i;\n tpsIndex = i;\n }\n String priority = wordsOfInput[i].substring(1);\n if (priority.matches(\"h|high\")) {\n builder.priority(Constants.PRIORITY_HIGH);\n } else if (priority.matches(\"m|mid|middle|medium\")) {\n builder.priority(Constants.PRIORITY_MID);\n } else if (priority.matches(\"l|low\")) {\n builder.priority(Constants.PRIORITY_LOW);\n } else {\n throw new IllegalCommandArgumentException(Constants.FEEDBACK_INVALID_PRIORITY,\n Constants.CommandParam.PRIORITY);\n }\n }\n }", "private void doScheduleCrawl(UUID datasetKey, int priority, Platform platform) {\n checkNotNull(datasetKey, \"datasetKey can't be null\");\n\n // We first have to check if the dataset can be crawled.\n Dataset dataset = checkDataset(datasetService.get(datasetKey), datasetKey);\n Optional<Endpoint> endpoint = getEndpointToCrawl(dataset);\n if (!endpoint.isPresent()) {\n metrics.noValidEndpoint();\n throw new IllegalArgumentException(\"No eligible endpoints for dataset [\" + datasetKey + \"]\");\n }\n\n // Ask the source how many records it has\n Long declaredCount = updateOrRetrieveDeclaredRecordCount(dataset, endpoint.get(), datasetKey);\n\n // This object holds all information needed by Crawlers to crawl the endpoint\n CrawlJob crawlJob = getCrawlJob(datasetKey, dataset, endpoint.get(), declaredCount, platform);\n MDC.put(\"attempt\", String.valueOf(crawlJob.getAttempt()));\n\n byte[] dataBytes = serializeCrawlJob(crawlJob);\n queueCrawlJob(\n datasetKey,\n isAbcdArchive(endpoint.get()),\n isDarwinCoreArchive(endpoint.get()),\n isCamtrapDpArchive(endpoint.get()),\n priority,\n dataBytes);\n LOG.info(\"Crawling endpoint [{}] for dataset [{}]\", endpoint.get().getUrl(), datasetKey);\n writeDeclaredRecordCount(datasetKey, declaredCount);\n }", "@Override\r\n\tpublic void execute() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].execute();\r\n\t\t}\r\n\t}", "public void setPriority(@EntityInstance int i, @IntRange(from = 0, to = 7) int priority) {\n nSetPriority(mNativeObject, i, priority);\n }", "public void setPriority(Boolean priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "public void setPriority(double priority) {\n\t\tthis.priority = priority;\n\t}", "AbstractBinaryOperator(Priority priority) {\n this.priority = priority;\n }", "int priority();", "int priority();", "private void setPriority(final Integer priority) {\n Story story = (Story) getTableRow().getItem();\n if (priority != null) {\n try {\n getModel().changeStoryPriority(story, priority);\n }\n catch (CustomException e) {\n addFormError(textField, \"{NanError}\");\n }\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().changeStoryPriority(story, null);\n } catch (CustomException e) {\n ErrorReporter.get().reportError(e, \"Failed to set priority\");\n }\n });\n }\n }", "void setPriority(\n com.nhcsys.webservices.getmessages.getmessagestypes.v1.PriorityType.Enum priority);", "public void setPriority(boolean priority){\n\t\tthis.priority = priority;\n\t}", "@PostConstruct\n\tpublic void scheduleAllJobs() {\n\t\tschedulerService.startAllActiveSchedulers();\n\t}", "public void setPriority(@NotNull Priority priority) {\r\n this.priority = priority;\r\n }", "public IndexedList<Task> search(TaskPriority priority) {\n\t\tLinkedList<Task> result=new LinkedList<Task>();\n\t\tfor(Task task : tasks) {\n\t\t\tif(task.getPriority()==priority)\n\t\t\t\tresult.add(task);\n\t\t}\n\t\treturn result;\n\t}", "AgentPolicyBuilder setJobPriority(JobPriority jobPriority);", "public static void main(String[] args) {\n\t\tQueue<Integer> integerPriorityQueue = new PriorityQueue<>(7);\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tintegerPriorityQueue.add(new Integer(rand.nextInt(100)));\r\n\t\t}\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tInteger in = integerPriorityQueue.poll();\r\n\t\t\tSystem.out.println(\"Processing Integer:\" + in);\r\n\t\t}\r\n\r\n\t\t// PriorityQueue example with Comparator\r\n\t\tQueue<Customer> customerPriorityQueue = new PriorityQueue<>(7, idComparator);\r\n\t\taddDataToQueue(customerPriorityQueue);\r\n\r\n\t\tpollDataFromQueue(customerPriorityQueue);\r\n\r\n\t}", "@Override\n\tpublic void execute() {\n\t\tfor(int i=0;i<coms.length;i++)\n\t\t\tcoms[i].execute();\n\t}", "@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "public void act() {\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.act();\n\t\t\n\t\tif (hasPriority == Priority.ARMY && armyQueue.size() > 0) {\n\t\t\t//Tell ArmyManager to build top unit in queue\n\t\t}\n\t\telse if (hasPriority == Priority.BUILDINGS && buildingQueue.size() > 0) {\n\t\t\t//Tell BuildManager to build top building in queue\n\t\t}\n\t\telse if (hasPriority == Priority.WORKERS) {\n\t\t\t//ResourceManager has requested more workers\n\t\t}\n\t}", "public void updatePriority(){\n\t\tpriority = (int) priority / 2;\n\t}", "public void setPriority(int priority) \n {\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n lastEffectivePriority = -1; //Possible need to update effective priority\n }", "public void execute() {\n\t\tfor (Command command : commands) {\n\t\t\tcommand.execute();\n\t\t}\n\t}", "public abstract boolean setPriority(int priority);", "public Iterator findTasksOfPriority(String requestedPriority) {\n ArrayList<TodoItem> priorityList = new ArrayList<TodoItem>();\n // TODO: Add source code that will find and return all tasks of the requestedPriority\n Iterator iterator = todoItems.iterator();\n while(iterator.hasNext()) {\n TodoItem todoItem = (TodoItem)iterator.next();\n if(todoItem.getPriority().equals(requestedPriority)) {\n priorityList.add(todoItem);\n }\n }\n\n return priorityList.iterator();\n }", "private void startAllDownloads() {\n\t\tif (!downloading && jobs != null && jobs.size() > 0) {\n\t\t\tfor (DownloadJob nextJob : jobs) {\n\t\t\t\tAppLogger.log(TAG, \"job \" + nextJob.getJobId() + \" working=\" + nextJob.isWorking());\n\t\t\t\tif (!nextJob.isWorking()) {\n\t\t\t\t\tstartDownloadJob(nextJob);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// for (DownloadJob job : jobs) {\n\t\t\t// AppLogger.log(TAG, \"job \" + job.generateJobId() + \" working=\" +\n\t\t\t// job.isWorking());\n\t\t\t// if (!job.isWorking()) {\n\t\t\t// startDownloadJob(job);\n\t\t\t// }\n\t\t\t// }\n\t\t}\n\t}", "public void execute() throws ProcbatchDisparadorEmailException {\n\t\tdisparadorEmailExecutor.execute(this);\n\t}", "public int priority(){\n return 0; //TODO codavaj!!\n }", "public static void main(String[] args)\n\t{\n\t\t// data added with the same priority value as already-preasent data, have less\n\t\t// priority than objects with the same priority value that were there before\n\t\t// being added.\n\t\tSystem.out.println(\"Data given all have equal priority so data\\nis ordered by the order it is provided in:\");\n\t\tPriorityQueue<String> q = new PriorityQueue<String>();\n\t\tq.add(\"highest\", 8);\n\t\tq.add(\"second highest\", 8);\n\t\tq.add(\"third highest\", 8);\n\t\tq.add(\"fourth highest\", 8);\n\t\tq.add(\"fifth highest\", 8);\n\t\tq.add(\"least\", 8);\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\n\t\t// sorting data provided in ascending order\n\t\tSystem.out.println(\"-------------\\nData given in ascending priority order:\");\n\t\tPriorityQueue<String> r = new PriorityQueue<String>();\n\t\tr.add(\"one\", 1);\n\t\tr.add(\"two\", 2);\n\t\tr.add(\"three\", 3);\n\t\tr.add(\"four\", 4);\n\t\tr.add(\"five\", 5);\n\t\tr.add(\"six\", 6);\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\n\t\t// sorting data provided in descending order\n\t\tSystem.out.println(\"-------------\\nData given in descending priority order:\");\n\t\tPriorityQueue<String> s = new PriorityQueue<String>();\n\t\ts.add(\"six\", 6);\n\t\ts.add(\"five\", 5);\n\t\ts.add(\"four\", 4);\n\t\ts.add(\"three\", 3);\n\t\ts.add(\"two\", 2);\n\t\ts.add(\"one\", 1);\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\n\t\t// sorting data provided in a mixed order\n\t\tSystem.out.println(\"-------------\\nData given in a mixed priority order:\");\n\t\tPriorityQueue<String> t = new PriorityQueue<String>();\n\t\tt.add(\"four\", 4);\n\t\tt.add(\"six\", 6);\n\t\tt.add(\"two\", 2);\n\t\tt.add(\"three\", 3);\n\t\tt.add(\"one\", 1);\n\t\tt.add(\"five\", 5);\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\n\t\t// sorting data provided in a mixed priority order including some repitition and\n\t\t// negative values\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nincluding repitition and negative priority:\");\n\t\tPriorityQueue<String> u = new PriorityQueue<String>();\n\t\tu.add(\"-two\", -2);\n\t\tu.add(\"two\", 2);\n\t\tu.add(\"zero\", 0);\n\t\tu.add(\"one\", 1);\n\t\tu.add(\"zero again\", 0);\n\t\tu.add(\"-one\", -1);\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\n\t\t// sorting data provided in a mixed priority order and is of type Double this\n\t\t// time\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nbut using double as the objects this time:\");\n\t\tPriorityQueue<Double> v = new PriorityQueue<Double>();\n\t\tv.add(.002, 2);\n\t\tv.add(.006, 6);\n\t\tv.add(.005, 5);\n\t\tv.add(.001, 1);\n\t\tv.add(.004, 4);\n\t\tv.add(.003, 3);\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t}", "public void executWaiting() {\n for (Runnable action : this.todo) {\n runAction( action );\n }\n }", "@Override\r\n\tpublic int setPriority(int priority) {\n\t\treturn 0;\r\n\t}", "public abstract int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "@Test\n public void launchesEventhandlerThreadpoolPriorityTest() {\n // TODO: test launchesEventhandlerThreadpoolPriority\n }", "public void setPriority(int priority) {\n Lib.assertTrue(Machine.interrupt().disabled());\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n recalculateThreadScheduling();\n update();\n }", "ActionSequenceQueue prioritize(ActionSequenceQueue actionSequences);", "public void changePriority(E e, P p) throws NoSuchElementException;", "void setPriority(int priority);", "void setPriority(int priority);", "public static void main(String[] args) {\n KafkaConfig kafkaConfig = KafkaUtil.getKafkaConfig();\n System.out.println(kafkaConfig.toString());\n\n // push data to kafka\n SavedState savedState = new SavedState();\n\n producers = new HashMap<Priority, KafkaProducer<String, String>>() {\n {\n put(Priority.MAX_PRIORITY, KafkaUtil.initProducer());\n put(Priority.MEDIUM_PRIORITY, KafkaUtil.initProducer());\n put(Priority.MIN_PRIORITY, KafkaUtil.initProducer());\n }\n };\n\n // create thread for consumer\n executor = Executors.newFixedThreadPool(3);\n executor.execute(new MaxPriorityThread(savedState));\n executor.execute(new MediumPriorityThread(savedState));\n executor.execute(new MinPriorityThread(savedState));\n executor.shutdown();\n\n Random random = new Random();\n for (int i = 0; i <= 10; ++i) {\n int rand = i; // random.nextInt(6);\n logger.info(\"Random number is: \" + rand);\n\n\n if (rand % 2 == 0) {\n String maxPriority = Priority.MAX_PRIORITY.getNameTopic();\n logger.info(\"Topic of max priority is: \" + maxPriority);\n ProducerRecord<String, String> record = new ProducerRecord<>(Priority.MAX_PRIORITY.getNameTopic(), String.valueOf(rand));\n logger.info(\"Data is sent to Max Priority Thread: \" + record.value());\n producers.get(Priority.MAX_PRIORITY).send(record);\n } else if (rand % 3 == 0) {\n String mediumPriority = Priority.MEDIUM_PRIORITY.getNameTopic();\n logger.info(\"Topic of medium priority is: \" + mediumPriority);\n ProducerRecord<String, String> record = new ProducerRecord<>(Priority.MEDIUM_PRIORITY.getNameTopic(), String.valueOf(rand));\n logger.info(\"Data is sent to Medium Priority Thread: \" + record.value());\n producers.get(Priority.MEDIUM_PRIORITY).send(record);\n } else if (rand % 5 == 0) {\n String minPriority = Priority.MIN_PRIORITY.getNameTopic();\n logger.info(\"Topic of min priority is: \" + minPriority);\n ProducerRecord<String, String> record = new ProducerRecord<>(Priority.MIN_PRIORITY.getNameTopic(), String.valueOf(rand));\n logger.info(\"Data is sent to Min Priority Thread: \" + record.value());\n producers.get(Priority.MIN_PRIORITY).send(record);\n }\n }\n }", "@Override\r\n\tpublic void setPriority(int arg0) throws NotesApiException {\n\r\n\t}", "@Test\n public void testNoTopUpTasksWithHighPriority() throws Exception {\n\n // SETUP: Set a Task to High Priority\n SchedStaskTable lSchedStask1 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 101 ) );\n lSchedStask1.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask1.update();\n\n SchedStaskTable lSchedStask2 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 102 ) );\n lSchedStask2.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask2.update();\n\n SchedStaskTable lSchedStask3 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 400 ) );\n lSchedStask3.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask3.update();\n\n SchedStaskTable lSchedStask4 = SchedStaskTable.findByPrimaryKey( new TaskKey( 4650, 500 ) );\n lSchedStask4.setTaskPriority( new RefTaskPriorityKey( 4650, \"HIGH\" ) );\n lSchedStask4.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had no results\n assertEquals( 0, iDataSet.getRowCount() );\n\n // TEARDOWN: Undo the setup changes\n lSchedStask1.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask1.update();\n\n lSchedStask2.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask2.update();\n\n lSchedStask3.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask3.update();\n\n lSchedStask4.setTaskPriority( new RefTaskPriorityKey( 4650, \"LOW\" ) );\n lSchedStask4.update();\n }", "int getPriority( int priority );", "public void setPriority(int value) {\n this.priority = value;\n }", "public int getPriority();", "public int getPriority();", "public void setPriority( int priority )\n\t{\n\t\tmPriority = priority;\n\t\t\n\t\tmUpdated = true;\n\t}", "public void setPriority(int r) {\n priority = r;\n }", "public static void main(String[] args) {\n\t\tB b1=new B();\n\t\tB b2=new B();\n\t\tB b3=new B();\n\t\tThread t=new Thread(b1);\n\t\tThread t1=new Thread(b2);\n\t\tThread t2=new Thread(b2);\n\t\tt.setName(\"金\");\n\t t1.setName(\"玉\");\n\t t2.setName(\"宝\");\n\t\t//System.out.println(\"总的线程数目:\"+Thread.activeCount());\n\t\tSystem.out.println(\"main的优先权值为:\"+Thread.currentThread().getPriority());\n\t\tSystem.out.println(\"t的优先权值为:\"+t.getPriority());\n\t\tSystem.out.println(\"t1的优先权值为:\"+t1.getPriority());\n\t\tSystem.out.println(\"t2的优先权值为:\"+t2.getPriority());\n\t\tt.start();\n\t\tt1.start();\n\t\tt2.start();//只会执行方法run()中的\n\t\tt.setPriority(10);\n\t\tt2.setPriority(7);\n\t\tt1.setPriority(3);\n\t\t\n\t\t//设定优先权值\n\t\ttry {\n\t\t\tThread.sleep(1800);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(t.getName()+\"执行:\"+b1.Counter()+\"次\");\n\t\tSystem.out.println(t1.getName()+\"执行:\"+b2.Counter()+\"次\");\n\t\tSystem.out.println(t2.getName()+\"执行:\"+b3.Counter()+\"次\");\n\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}" ]
[ "0.5277217", "0.518151", "0.5144041", "0.50374967", "0.5016345", "0.5015462", "0.5015462", "0.49691004", "0.49437982", "0.49248758", "0.4912534", "0.4910316", "0.49056226", "0.48970383", "0.48935407", "0.48896378", "0.48660463", "0.48601216", "0.4839843", "0.4810326", "0.48079142", "0.48077527", "0.47972578", "0.4796421", "0.47897017", "0.47786593", "0.4770739", "0.47669837", "0.4764412", "0.47615308", "0.47568357", "0.47557643", "0.47550923", "0.47501403", "0.47422296", "0.47376373", "0.47362092", "0.47330934", "0.47175255", "0.4717481", "0.469621", "0.46815172", "0.46728516", "0.46721816", "0.46695858", "0.46685594", "0.46564257", "0.46564117", "0.46536487", "0.46536487", "0.46502367", "0.46461612", "0.46460104", "0.464429", "0.4637836", "0.46341592", "0.46204785", "0.46120727", "0.46098584", "0.45960027", "0.45796654", "0.45796654", "0.45796654", "0.45796654", "0.45796654", "0.45796654", "0.45796654", "0.45796654", "0.45796052", "0.45675454", "0.4565308", "0.45382598", "0.4531571", "0.45247757", "0.45230162", "0.4519111", "0.4514089", "0.4509127", "0.45063156", "0.44995174", "0.44921017", "0.44921017", "0.44921017", "0.44834903", "0.4483108", "0.4476478", "0.4475089", "0.4472434", "0.4472434", "0.44707602", "0.44673336", "0.44666713", "0.445882", "0.44581842", "0.44441715", "0.44441715", "0.4430382", "0.44249904", "0.4415315", "0.44088084" ]
0.5544392
0
Work for the specified period or until there is no more work to do, whichever comes first
private void workSlice(int maxMillis) { double now = timer.getTime(); if (controller.isRunnable(Priority.CRITICAL)) { // Always do all critical tasks in one go while (workUnit(Priority.CRITICAL, maxMillis)) {} } Schedulable delayedJob; while ((delayedJob = delayedJobs.getDueDelayedJob(now)) != null) { TaskInfo info = taskInfos.get(delayedJob); jobs.add(info.priority, delayedJob); } // // Run HIGH priority tasks to the exclusion of MEDIUM and LOW priority tasks. // Also, always run at least one unit of HIGH priority, regardless of how long the previous // CRITICAL tasks took. // double end = now + maxMillis; for (Priority p : Priority.values()) { if (!workAll(p, maxMillis, end)) { return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}", "public void wagesTillCondition() {\n\t\twhile (true) {\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\ttotalHrs = totalHrs + workingHrs;\n\t\t\ttotalDays = totalDays + 1;\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\tif (totalHrs == 100 || totalDays == 20) {\n\t\t\t\tSystem.out.println(totalSalary);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic boolean startWork(int delay) {\r\n\t\t\r\n\t\tif (!isInProcess() && haveWork() && !isDrawCalled) {\r\n\t\t\t\r\n\t\t\tif (EnginesManager.PARALLEL_WORK) {\r\n\t\t\t\ttaskTimer.schedule(new ScheduleTask(), delay);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\titerate();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public SleepRange onLoop() {\n for(MiningTask mt : miningTasks) {\n SleepRange sleep = mt.onLoop();\n if(sleep != SleepRange.NULL) {\n return sleep;\n }\n }\n return DEFAULT;\n }", "@Override\n public void work() {\n if (!lnd_.isRpcReady())\n return;\n\n if (!started_) {\n // NOTE: start protocol to recover in-flight payments' state:\n // - get all payments w/ 'sending' state from db\n // - get all payments from lnd\n // - find 'sending' payments within lnd payments\n // - update found payments, reset state for not-found\n // - delete all payments from lnd to clear it\n // - started_ = true, can process new payments now\n if (!starting_) {\n starting_ = true;\n List<Job> sendingJobs = dao_.getSendingJobs();\n checkPayments(sendingJobs);\n }\n return;\n }\n\n if (!notified_ && nextWorkTime_ > System.currentTimeMillis())\n return;\n\n // reset\n notified_ = false;\n\n List<Job> pending = dao_.getPendingJobs(System.currentTimeMillis());\n for (Job job: pending) {\n WalletData.SendPayment p = (WalletData.SendPayment)job.objects.get(0);\n if (p.paymentHashHex() != null || p.isKeysend()) {\n queryRoutes(job, p);\n } else if (p.paymentRequest() != null) {\n decodePayment(job, p);\n }\n }\n\n nextWorkTime_ = System.currentTimeMillis() + WORK_INTERVAL;\n }", "public void holdForWorkXX()\n {\n if (cFixedServiceTimed)\n {\n hold(mServerConfig.mServiceTime);\n out();\n return;\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n hold(cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n break;\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n hold( tBase + cRandom.negexp(tDelta));\n break;\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n hold( tBase + cRandom.poisson(tDelta));\n break;\n\n case cHoldUniform:\n hold(cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n break;\n }\n out();\n }", "private void breathe(int period) {\n\t\ttry {\n\t\t\tThread.sleep(period);\n\t\t} catch (InterruptedException ie) {\n\t\t\tlogger.error(\"interrupted while breathing\", ie);\n\t\t}\n\t}", "public void teleopPeriodic() {\r\n Scheduler.getInstance().run();\r\n OI.poll();\r\n }", "public void cycle() {\r\n processTask(); // tune relative frequency?\r\n processConcept(); // use this order to check the new result\r\n }", "private void schedulerSleep() {\n\n\t\ttry {\n\n\t\t\tThread.sleep(timeSlice);\n\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t;\n\n\t}", "public TimePeriod notWorking(TimePeriod period);", "private void maybeScheduleSlice(double when) {\n if (nextSliceRunTime > when) {\n timer.schedule(when);\n nextSliceRunTime = when;\n }\n }", "public void initAlgorithm() {\n executor.scheduleAtFixedRate(scheduledThoughtsProducer::periodicalThoughtsCheck, 1, 5,TimeUnit.MINUTES);\n// executor.scheduleAtFixedRate(scheduledThoughtsProducer::periodicalThoughtsCheck, 2, 10,TimeUnit.SECONDS);\n\n // every day perform random thought dice roll\n // also roll for random time: 10am - 9pm\n Cron4j.scheduler.schedule(Cron4j.EVERY_DAY_AT_10_AM, () -> {\n int produceThoughtDice = (int) (Math.random() * 3); // 66% yes, 33% no\n if (produceThoughtDice < 2) {\n int timeShift = (int) (Math.random() * 12); // 0-11\n executor.schedule(scheduledThoughtsProducer::periodicalThoughtProduceSuitable, timeShift, TimeUnit.HOURS);\n } else {\n System.out.println(\"Thought not produced today because of the dice: \" + produceThoughtDice);\n }\n });\n// Cron4j.scheduler.schedule(Cron4j.EVERY_MINUTE, () -> {\n// executor.schedule(scheduledThoughtsProducer::periodicalThoughtProduceSuitable, 0, TimeUnit.SECONDS);\n// });\n\n // every week perform a statistical overview\n // should be not very long and with a lot of variations\n Cron4j.scheduler.schedule(Cron4j.EVERY_WEEK_SUNDAY_18_PM, () -> {\n// Cron4j.scheduler.schedule(Cron4j.EVERY_MINUTE, () -> {\n executor.schedule(scheduledThoughtsProducer::periodicalWeeklyThoughts, 0, TimeUnit.SECONDS);\n });\n\n // start the scheduler\n Cron4j.scheduler.start();\n }", "public void run() {\n try {\n arrive();\n\n //Wait for the daily developer standup\n team.getStandupBarrier().await();\n int lunchtime = 2400;\n\n working(lunchtime, false);\n \n int dillyDallyBeforeLunch = rng.nextInt((80 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeLunch);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Goes to lunch at \" + team.getLead().getPM().getClockTime());\n\n int lunchDuration = rng.nextInt((600 - 300) + 1) + 300;\n Thread.sleep(lunchDuration);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Leaves lunch at \" + team.getLead().getPM().getClockTime());\n \n //Go to final meeting somewhere between 4:00 and 4:15\n int workInterval = rng.nextInt((4950 - 4800) + 1) + 4800;\n working(workInterval, false);\n\n System.out.println(\"Developer \" + this.getName() +\n \" Goes to afternoon meeting at \" + team.getLead().getPM().getClockTime());\n \n //Wait for that afternoon meeting to kick off\n team.getLead().getPM().getAfternoonMeetingBarrier().await();\n\n //After the meeting, get ready to go home and end the day\n int dillyDallyBeforeHome = rng.nextInt((150 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeHome);\n\n //Leave after afternoon meeting is complete\n System.out.println(\"Developer \" + this.getName() +\n \" is heading home at \" + team.getLead().getPM().getClockTime());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void maybeScheduleSlice() {\n if (nextSliceRunTime > 0) {\n timer.schedule();\n nextSliceRunTime = 0;\n }\n }", "@NonNull\n @Override\n public Result doWork() {\n\n Log.d(TAG, \"doWork: \");\n savedata();\n createNotification();\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(MyWorkManager.class)\n .setInitialDelay(5, TimeUnit.SECONDS).build();\n WorkManager.getInstance().enqueueUniqueWork(\"aaa\", ExistingWorkPolicy.APPEND, oneTimeWorkRequest);\n\n\n return Result.success();\n\n }", "public synchronized void start(long period){\n\t\ttickHandle = scheduler.scheduleAtFixedRate(tickTask, 0, period, TimeUnit.MILLISECONDS);\t \n\t}", "private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }", "@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "private boolean workAll(Priority priority, int maxMillis, double endTime) {\n if (controller.isRunnable(priority) && jobs.numJobsAtPriority(priority) != 0) {\n boolean moreWork;\n boolean moreTime;\n do {\n moreWork = workUnit(priority, maxMillis);\n // TODO(user):\n // Add the following:\n //\n // double duration = finish - start;\n // if (duration > MAX_DURATION_MS && Debug.errorClient().shouldLog()) {\n // Debug.errorClient().log(\"HIGH priority task took a whopping: \"\n // + ((int) duration) + \"ms to run\");\n // }\n //\n // after dependencies are cleaned up such that Debug does not depend on Scheduler, so that\n // Scheduler can depend on Debug without a cycle.\n moreTime = timer.getTime() < endTime;\n } while (moreWork && moreTime);\n\n return moreTime;\n }\n return true;\n }", "protected boolean pickAndExecuteAnAction() {\n\t//print(\"in waiter scheduler\");\n\t//Starts the break cycle if onBreak == true\n\tif(onBreak && working ) {\n\t initiateBreak();\n\t return true;\n\t}\n\n\t//Once all the customers have been served\n\t//then the waiter can actually go on break\n\tif(!working && customers.isEmpty() && !startedBreak) {\n\t goOnBreak();\n\t return true;\n\t}\n\n\tif(!onBreak && !working){\n\t endBreak();\n\t}\n\n\t\n\t//Runs through the customers for each rule, so \n\t//the waiter doesn't serve only one customer at a time\n\tif(!customers.isEmpty()){\n\t //System.out.println(\"in scheduler, customers not empty:\");\n\t //Gives food to customer if the order is ready\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_READY) {\n\t\t giveFoodToCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\t //Clears the table if the customer has left\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.IS_DONE) {\n\t\t clearTable(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Seats the customer if they need it\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.NEED_SEATED){\n\t\t seatCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Gives all pending orders to the cook\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_PENDING){\n\t\t giveOrderToCook(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Takes new orders for customers that are ready\n\t for(MyCustomer c:customers){\n\t\t//print(\"testing for ready to order\"+c.state);\n\t\tif(c.state == CustomerState.READY_TO_ORDER) {\n\t\t takeOrder(c);\n\t\t return true;\n\t\t}\n\t }\t \n\t}\n\tif (!currentPosition.equals(originalPosition)) {\n\t moveToOriginalPosition();\n\t return true;\n\t}\n\n\t//we have tried all our rules and found nothing to do. \n\t// So return false to main loop of abstract agent and wait.\n\t//print(\"in scheduler, no rules matched:\");\n\treturn false;\n }", "public Period getNextPeriod() throws PeriodNotFoundException;", "@Override\n\tprotected boolean until() {\n\t\treturn true;\n\t}", "public void run() {\n\t\t\tfinal double IDLE_PERIOD = workloadConfiguration.getPaymentPeriod();\n\n\t\t\ttry {\n\t\t\t\t// Initial payment cycle time is the time since workload startup.\n\t\t\t\tdouble lastCycleTime = Utilities.getTime() - startTime;\n\n\t\t\t\t// Pay until interrupted\n\t\t\t\twhile (!Thread.interrupted()) {\n\t\t\t\t\tdouble cycleStartTime = Utilities.getTime();\n\n\t\t\t\t\t// Distributes quota (tokens) to the builders.\n\t\t\t\t\tpayAllBuilders(lastCycleTime);\n\n\t\t\t\t\t// Idle for the specified period\n\t\t\t\t\tUtilities.idle(IDLE_PERIOD - (Utilities.getTime() - cycleStartTime));\n\n\t\t\t\t\t// Measure the time taken by the cycle just completed, including any idle time.\n\t\t\t\t\tlastCycleTime = Utilities.getTime() - cycleStartTime;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\treturn;\n\t\t\t} catch (Throwable e) {\n\t\t\t\tEvent.RUNTIME_EXCEPTION.issue(e, \"Failure in payer thread.\");\n\t\t\t}\n\t\t}", "public void createWeekScenarioBug10265_ParChangeWithFreeP()\n throws Exception {\n long usageStartTime = DateTimeHandling\n .calculateMillis(\"2013-02-28 06:00:00\");\n BillingIntegrationTestBase.setDateFactoryInstance(usageStartTime);\n\n VOServiceDetails serviceDetails = serviceSetup\n .createPublishAndActivateMarketableService(\n basicSetup.getSupplierAdminKey(),\n \"RARCHANGE_WEEK_FREEP\", TestService.EXAMPLE_ASYNC,\n TestPriceModel.EXAMPLE_PERUNIT_WEEK_ROLES_PARS_FREEP,\n technicalServiceAsync, supplierMarketplace);\n\n setCutOffDay(basicSetup.getSupplierAdminKey(), 1);\n\n VORoleDefinition role = VOServiceFactory.getRole(serviceDetails,\n \"ADMIN\");\n\n container.login(basicSetup.getCustomerAdminKey(),\n ROLE_ORGANIZATION_ADMIN);\n VOSubscriptionDetails subDetails = subscrSetup.subscribeToService(\n \"RARCHANGE_WEEK_FREEP\", serviceDetails,\n basicSetup.getCustomerUser1(), role);\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-28 07:00:00\"));\n subDetails = subscrSetup.completeAsyncSubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-02-28 23:00:00\"));\n subDetails = subscrSetup.modifyParameterForSubscription(subDetails,\n DateTimeHandling.calculateMillis(\"2013-02-28 23:00:00\"),\n \"MAX_FOLDER_NUMBER\", \"7\");\n // ASYNC\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 00:00:00\"));\n subDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n subDetails = subscrSetup.modifyParameterForSubscription(subDetails,\n DateTimeHandling.calculateMillis(\"2013-03-01 01:00:01\"),\n \"MAX_FOLDER_NUMBER\", \"3\");\n // ASYNC - update one second later because not possible otherwise\n BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling\n .calculateMillis(\"2013-03-01 01:00:02\"));\n subDetails = subscrSetup.completeAsyncModifySubscription(\n basicSetup.getSupplierAdminKey(),\n basicSetup.getCustomerAdmin(), subDetails);\n\n long usageEndTime = DateTimeHandling\n .calculateMillis(\"2013-03-03 07:00:00\");\n BillingIntegrationTestBase.setDateFactoryInstance(usageEndTime);\n subscrSetup.unsubscribeToService(subDetails.getSubscriptionId());\n\n resetCutOffDay(basicSetup.getSupplierAdminKey());\n\n BillingIntegrationTestBase.updateSubscriptionListForTests(\n \"RARCHANGE_WEEK_FREEP\", subDetails);\n }", "private void applyRaceStartPenalty()\n {\n for(int i = 0; i < getDrivers().getSize(); i++)\n {\n getDrivers().getDriver(i).setAccumulatedTime(0); // set to default\n int driverRanking = getDrivers().getDriver(i).getRanking();\n int timePenalty = 10;\n switch(driverRanking)\n {\n case 1: timePenalty = 0; break;\n case 2: timePenalty = 3; break;\n case 3: timePenalty = 5; break;\n case 4: timePenalty = 7; break;\n }\n getDrivers().getDriver(i).setAccumulatedTime(timePenalty);\n }\n }", "private void jobFilter_20_Schedule1st() {\n\t\tjobFilter_12_Stop();\r\n\r\n\t\tJOB_LOCK.lock();\r\n\t\t{\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// this is the initial run of the filter job\r\n\t\t\t\t_filterJob1stRun = true;\r\n\r\n\t\t\t\t_sortedAndFilteredPhotos = new Photo[0];\r\n\r\n\t\t\t\t_currentExifRunId++;\r\n\r\n\t\t\t\t_jobFilter.schedule();\r\n\r\n\t\t\t} finally {\r\n\t\t\t\tJOB_LOCK.unlock();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * hide status message for the first delay, because when nothing is filtered, the UI is\r\n\t\t * flickering with an initial message\r\n\t\t */\r\n\t\tupdateUI_StatusMessageInUIThread(UI.EMPTY_STRING);\r\n\t}", "public void advance() {\n\n if (length == Length.DAILY) {\n startDate.add(Calendar.DATE, 1);\n } else if (length == Length.WEEKLY) {\n startDate.add(Calendar.WEEK_OF_YEAR, 1);\n } else if (length == Length.BIWEEKLY) {\n startDate.add(Calendar.DATE, 14);\n } else if (length == Length.MONTHLY) {\n startDate.add(Calendar.MONTH, 1);\n } else if (length == Length.YEARLY) {\n startDate.add(Calendar.YEAR, 1);\n }\n\n calculateEndDate();\n\n }", "public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n \t//armSlack();\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n \tTimer.delay(0.005);\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }", "@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}", "@Test\n public void repeatingTask_changeRepeatPeriod_nextWeekDate() {\n LocalDate testDate = LocalDateTime.now().minusWeeks(1).minusDays(1).toLocalDate();\n LocalTime testTime = LocalTime.of(8, 30);\n LocalDateTime testDateTime = LocalDateTime.of(testDate, testTime);\n Event testEvent = new Event(\"8 days ago\", \"CS2113T\", testDateTime, testDateTime.plusHours(4),\n \"testing\");\n testTaskList.addTask(testEvent);\n // Set to 1w\n RepeatCommand testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.WEEKLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n // Set to 1d\n testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.DAILY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n\n assertEquals(repeatEvent.getPeriodCounter(), 0);\n assertEquals(repeatEvent.getNextDateTime(), LocalDateTime.of(LocalDate.now().plusWeeks(1), testTime));\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\r\n\tpublic void worked(int work) {\n\t}", "@Test\n public void testCreateBookingReportJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-28\");\n LocalDate endDate = LocalDate.parse( \"2018-10-23\" );\n while ( currentDate.isBefore( endDate ) ) {\n BookingReportJob workerJob = new BookingReportJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 4 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 5 ); // dates are inclusive, +1\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile(true) {//模拟某人不停取钱\n\t\t\tboolean flag = bC.withdrowMoney(1);\n\t\t\t//停止条件\n\t\t\tif(flag==false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "int getWaitTime(int arrival_time, QNode temp) {\r\n\t \t //1. this is the case when the first person arrives before 9 a.m.\r\n\t \t if (arrival_time <32400) {\r\n\t \t\t //for the wait time of the first person\r\n\t\t \t if (size== maxSize) {\r\n\t\t \t\t\t this.front.wait_time = 32400-arrival_time;\r\n\t\t \t\t\t this.front.service_timeEnding = 32700;\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \r\n\t\t \t }\r\n\t\t \t //for the rest of them\r\n\t\t \t else {\r\n\t\t \t\t //if there is no waiting\r\n\t\t \t\t if (temp.service_timeEnding< arrival_time) {\r\n\t\t \t\t\t this.front.wait_time= 0;\r\n\t\t \t\t\t this.front.service_timeEnding = arrival_time +300;\r\n\t\t \t\t\t if (this.front.arrival_time+this.front.wait_time+300 !=this.front.service_timeEnding) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \t\t\t \r\n\t\t \t\t }\r\n\t\t \t\t //if there is waiting and there is person before you\r\n\t\t \t\t else {\r\n\t\t\t\t \tthis.front.wait_time = temp.service_timeEnding - arrival_time;\r\n\t\t\t\t \tthis.front.service_timeEnding = arrival_time +this.front.wait_time +300;\r\n\t\t\t\t \tif (this.front.service_timeEnding< this.front.wait_time) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t\t\t \t//save wait time\r\n\t\t\t\t \tsavewait.add(this.front.wait_time);\r\n\t\t\t\t \treturn this.front.wait_time;\r\n\t\t \t\t \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 //this is the case when the first person arrives after 9\r\n\t \t else {\r\n\t \t\t //for the first person arriving\r\n\t\t \t if (size ==maxSize ) {\r\n\t\t \t\t\t this.front.wait_time = 0;\r\n\t\t \t\t\t this.front.service_timeEnding = arrival_time +300;\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \t }\r\n\t\t \t //for the rest of them\r\n\t\t \t else {\r\n\t\t \t\t //if there is no waiting\r\n\t\t \t\t if (temp.service_timeEnding< arrival_time) {\r\n\t\t \t\t\t this.front.wait_time= 0;\r\n\t\t \t\t\t this.front.service_timeEnding = arrival_time +300;\r\n\t\t \t\t\t if (this.front.service_timeEnding!= this.front.wait_time) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t \t\t\t savewait.add(this.front.wait_time);\r\n\t\t \t\t\t return this.front.wait_time;\r\n\t\t \t\t\t \r\n\t\t \t\t }\r\n\t\t \t\t //if there is a waiting\r\n\t\t \t\t else {\r\n\t\t\t\t \tthis.front.wait_time = temp.service_timeEnding - arrival_time;\r\n\t\t\t\t \tthis.front.service_timeEnding = arrival_time +this.front.wait_time +300;\r\n\t\t\t\t \tif (this.front.service_timeEnding!= this.front.wait_time) {\r\n\t\t \t\t\t\t numberCustomers++;\r\n\t\t \t\t\t }\r\n\t\t\t\t \tsavewait.add(this.front.wait_time);\r\n\t\t\t\t \treturn this.front.wait_time;\r\n\t\t \t\t\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 }\r\n\t \t }\r\n\t }", "@Test\n public void takeWhile() {\n Observable.interval(100, TimeUnit.SECONDS, mTestScheduler)\n .map(num -> num + 1)\n .take(7)\n .takeWhile(aLong -> aLong != 4)\n .subscribe(mList::add);\n\n mTestScheduler.advanceTimeBy(1000, TimeUnit.SECONDS);\n assertEquals(mList, Arrays.asList(1L, 2L, 3L));\n }", "WhileStart createWhileStart();", "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "@Test\n public void testLast3DayAll() {\n long t1 = new DateTime(\"2020-10-10T10:10:00\").getMillis();\n long t2 = new DateTime(\"2020-10-11T10:10:00\").getMillis();\n long t3 = new DateTime(\"2020-10-12T10:10:00\").getMillis();\n long t4 = new DateTime(\"2020-10-13T10:10:00\").getMillis();\n long taskAId1 = taskService.createTaskByJobId(jobAId, t1, t1, TaskType.SCHEDULE);\n long taskAId2 = taskService.createTaskByJobId(jobAId, t2, t2, TaskType.SCHEDULE);\n long taskAId3 = taskService.createTaskByJobId(jobAId, t3, t3, TaskType.SCHEDULE);\n long taskBId1 = taskService.createTaskByJobId(jobBId, t1, t1, TaskType.SCHEDULE);\n long taskBId2 = taskService.createTaskByJobId(jobBId, t2, t2, TaskType.SCHEDULE);\n long taskBId3 = taskService.createTaskByJobId(jobBId, t3, t3, TaskType.SCHEDULE);\n\n DAGDependChecker checker = new DAGDependChecker(jobCId);\n Map<Long, JobDependStatus> jobDependMap = Maps.newHashMap();\n DependencyExpression dependencyExpression = new TimeOffsetExpression(\"d(3)\");\n DependencyStrategyExpression dependencyStrategy = new DefaultDependencyStrategyExpression(CommonStrategy.ALL.getExpression());\n JobDependStatus statusC2A = new JobDependStatus(jobCId, jobAId, dependencyExpression, dependencyStrategy);\n JobDependStatus statusC2B = new JobDependStatus(jobCId, jobBId, dependencyExpression, dependencyStrategy);\n jobDependMap.put(jobAId, statusC2A);\n jobDependMap.put(jobBId, statusC2B);\n checker.setJobDependMap(jobDependMap);\n\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n\n taskService.updateStatus(taskAId1, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n taskService.updateStatus(taskAId2, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n taskService.updateStatus(taskAId3, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n\n taskService.updateStatus(taskBId1, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n taskService.updateStatus(taskBId2, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n taskService.updateStatus(taskBId3, TaskStatus.SUCCESS);\n Assert.assertEquals(true, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), t4));\n\n taskService.deleteTaskAndRelation(taskAId1);\n taskService.deleteTaskAndRelation(taskAId2);\n taskService.deleteTaskAndRelation(taskAId3);\n taskService.deleteTaskAndRelation(taskBId1);\n taskService.deleteTaskAndRelation(taskBId2);\n taskService.deleteTaskAndRelation(taskBId3);\n }", "private void _wait() {\n\t\tfor (int i = 1000; i > 0; i--)\n\t\t\t;\n\t}", "public long runScheduledPendingTasks() {\n/* */ try {\n/* 597 */ return this.loop.runScheduledTasks();\n/* 598 */ } catch (Exception e) {\n/* 599 */ recordException(e);\n/* 600 */ return this.loop.nextScheduledTask();\n/* */ } \n/* */ }", "static void scheduleWork(final boolean shortInterval) {\n if (shortInterval) {\n _cancelWork(false);\n //PPApplication.sleep(5000);\n _scheduleWork(true);\n\n /*PPApplication.startHandlerThreadPPScanners();\n final Handler __handler = new Handler(PPApplication.handlerThreadPPScanners.getLooper());\n __handler.post(() -> {\n// PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThreadPPScanners\", \"START run - from=SearchCalendarEventsWorker.scheduleWork\" + \" shortInterval=true\");\n _cancelWork();\n PPApplication.sleep(5000);\n _scheduleWork(true);\n });*/\n }\n else\n _scheduleWork(false);\n }", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "@Override\n\tpublic boolean doJobs() {\n\n\t\tERRCODE = \"0\";\n\t\tERRDESC = \"succ\";\n\n\t\tcalPrice();\n\n\t\treturn true;\n\n\t}", "@Override\n public synchronized boolean hasPeriodPassed(double period) {\n if (get() > period) {\n // Advance the start time by the period.\n // Don't set it to the current time... we want to avoid drift.\n m_startTime += period * 1000;\n return true;\n }\n return false;\n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "private void calculate() throws InterruptedException {\n\tfor (int i = 1; i <= 100; i++) {\n\t Thread.sleep(100);\n\t update(i);\n\t}\n }", "public void processDate(boolean periodStart) {\n Calendar cal = Calendar.getInstance();\n if (year == null) {\n year = cal.get(Calendar.YEAR);\n }\n if (week != null) {\n cal.set(Calendar.WEEK_OF_YEAR, week);\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, (periodStart) ? Calendar.MONDAY : Calendar.SUNDAY);\n week = null;\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (season != null) {\n if (\"Spring\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 2 : 4);\n } else if (\"Summer\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 5 : 7);\n } else if (\"Autumn\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 8 : 10);\n } else if (\"Winter\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 11 : 1);\n }\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n season = null;\n }\n if (month != null) {\n cal.set(Calendar.MONTH, TimeConstants.getMonthIndex(month));\n }\n if (day != null && day == 99) {\n cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (day == null) {\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n }", "private void runBest() {\n }", "public void run() {\n long start = System.nanoTime();\n try {\n activeCount.inc();\n long delay = start - nextExecutionTime;//实践执行时间-理论应该执行的实际点\n taskExecutionDelay.record(delay, TimeUnit.NANOSECONDS);\n // real logic\n if (isPeriodic())\n runPeriodic();\n else\n ScheduledFutureTask.super.run();\n } finally {\n activeCount.dec();\n taskExecutionTime.record(System.currentTimeMillis() - start, TimeUnit.MILLISECONDS);\n }\n }", "private void doSomeWork() throws ExoPlaybackException, IOException {\n boolean z;\n boolean z2;\n int i;\n long uptimeMillis = this.clock.uptimeMillis();\n updatePeriods();\n if (this.playbackInfo.playbackState == 1 || this.playbackInfo.playbackState == 4) {\n this.handler.removeMessages(2);\n return;\n }\n MediaPeriodHolder playingPeriod = this.queue.getPlayingPeriod();\n if (playingPeriod == null) {\n scheduleNextWork(uptimeMillis, 10);\n return;\n }\n TraceUtil.beginSection(\"doSomeWork\");\n updatePlaybackPositions();\n if (playingPeriod.prepared) {\n long elapsedRealtime = SystemClock.elapsedRealtime() * 1000;\n playingPeriod.mediaPeriod.discardBuffer(this.playbackInfo.positionUs - this.backBufferDurationUs, this.retainBackBufferFromKeyframe);\n int i2 = 0;\n boolean z3 = true;\n boolean z4 = true;\n while (true) {\n Renderer[] rendererArr = this.renderers;\n if (i2 >= rendererArr.length) {\n break;\n }\n Renderer renderer = rendererArr[i2];\n if (renderer.getState() != 0) {\n renderer.render(this.rendererPositionUs, elapsedRealtime);\n z3 = z3 && renderer.isEnded();\n boolean z5 = playingPeriod.sampleStreams[i2] != renderer.getStream();\n boolean z6 = z5 || (!z5 && playingPeriod.getNext() != null && renderer.hasReadStreamToEnd()) || renderer.isReady() || renderer.isEnded();\n z4 = z4 && z6;\n if (!z6) {\n renderer.maybeThrowStreamError();\n }\n }\n i2++;\n }\n z2 = z3;\n z = z4;\n } else {\n playingPeriod.mediaPeriod.maybeThrowPrepareError();\n z2 = true;\n z = true;\n }\n long j = playingPeriod.info.durationUs;\n if (z2 && playingPeriod.prepared && ((j == -9223372036854775807L || j <= this.playbackInfo.positionUs) && playingPeriod.info.isFinal)) {\n setState(4);\n stopRenderers();\n } else if (this.playbackInfo.playbackState == 2 && shouldTransitionToReadyState(z)) {\n setState(3);\n if (this.playWhenReady) {\n startRenderers();\n }\n } else if (this.playbackInfo.playbackState == 3 && (this.enabledRenderers.length != 0 ? !z : !isTimelineReady())) {\n this.rebuffering = this.playWhenReady;\n i = 2;\n setState(2);\n stopRenderers();\n if (this.playbackInfo.playbackState == i) {\n for (Renderer renderer2 : this.enabledRenderers) {\n renderer2.maybeThrowStreamError();\n }\n }\n if ((!this.playWhenReady && this.playbackInfo.playbackState == 3) || this.playbackInfo.playbackState == 2) {\n scheduleNextWork(uptimeMillis, 10);\n } else if (this.enabledRenderers.length != 0 || this.playbackInfo.playbackState == 4) {\n this.handler.removeMessages(2);\n } else {\n scheduleNextWork(uptimeMillis, 1000);\n }\n TraceUtil.endSection();\n }\n i = 2;\n if (this.playbackInfo.playbackState == i) {\n }\n if (!this.playWhenReady) {\n }\n if (this.enabledRenderers.length != 0) {\n }\n this.handler.removeMessages(2);\n TraceUtil.endSection();\n }", "public void askToRepeat(Engine direct) {\r\n\t\t\r\n\t\tif (direct.haveWork()) {\r\n\t\t\t\r\n\t\t\tif (!direct.isInProcess()) {\r\n\t\t\t\t\r\n\t\t\t\tLog.d(\"core\", \"Scheduler: Direct is finished iteration; start new one;\");\r\n\t\t\t\tint delay = 1;\r\n\t\t\t\tdirect.startWork(delay);\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\t\tLog.w(\"core\", \"Scheduler: Direct ignore command cz was in process;\");\r\n\t\t\t}\r\n \t}\r\n\t}", "protected abstract String scheduler_next();", "public void retryRequired(){\n startFetching(query);\n }", "protected void runEachDay() {\n \n }", "@Override\n public void run() {\n\n\n\n System.out.println(\"run scheduled jobs.\");\n\n\n checkBlackOutPeriod();\n\n\n\n checkOfficeActionPeriod1();\n\n checkAcceptedFilings();\n\n checkNOAPeriod();\n checkFilingExtensions();\n\n\n\n }", "@Override\r\n\tpublic void run() {\r\n\t\twhile (true){\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tlogger.log(Level.SEVERE, e.toString(), e );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tDate now = new Date();\r\n\t\t\t\r\n\t\t\tfor (Item item : items.values()){\r\n\t\t\t\t\r\n\t\t\t\tif (item.getStatus() == Status.NOT_STARTED && item.getStart().before(now))\r\n\t\t\t\t\titem.setStatus(Status.ONGOING);\r\n\t\t\t\t\r\n\t\t\t\telse if (item.getStatus() == Status.ONGOING && item.getEnd().before(now)){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(item.getHighestBid() != null){\r\n\t\t\t\t\t\tBid winningBid = item.getHighestBid();\r\n\t\t\t\t\t\tif(winningBid.amount > item.getReserve()){\r\n\t\t\t\t\t\t\titem.setStatus(Status.SOLD);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnote(new Notification(winningBid.userID, Notification.TYPE.SUCCESSFUL_BUY, \"you have won item '\"+item.ID + \"' from seller '\"+item.vendorID));\r\n\t\t\t\t\t\t\tnote(new Notification(item.vendorID, Notification.TYPE.SUCCESSFUL_SALE, \"you have sold item '\"+item.ID + \"' to buyer '\"+item.getHighestBid().userID));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tusers.get(winningBid.userID).addWonItem(winningBid.itemID);\r\n\t\t\t\t\t\t\tlogger.fine(\"item \" + item.ID + \"sold successfully \" );\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tcloseUnsuccessfulItem(item);\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcloseUnsuccessfulItem(item);\r\n\t\t\t\t\t\r\n\t\t\t\t\tfinishedItems.put(item.ID, item);\r\n\t\t\t\t\titems.remove(item.ID);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "@Override\n public void teleopPeriodic()\n {\n commonPeriodic();\n }", "public void toNow() {\r\n double now = currentSimulationTime();\r\n double passed_time = now - lastTime - suspendetTime;\r\n\r\n if (MathTools.less(0, passed_time)) {\r\n if (currentStep != null) {\r\n\r\n // get the demand of the first job\r\n double demand = running_processes.get(currentStep);\r\n demand -= passed_time;\r\n SuspendableFCFSResource.this.remainingDemand -= passed_time;\r\n \r\n // avoid trouble caused by rounding issues\r\n demand = MathTools.equalsDouble(demand, 0) ? 0.0 : demand;\r\n\r\n assert demand >= 0 : \"Remaining demand (\" + demand + \") smaller than zero! at simulation time: \"\r\n + now;\r\n\r\n running_processes.put(currentStep, demand);\r\n }\r\n }\r\n lastTime = now;\r\n suspendetTime = 0;\r\n }", "public void testPeriodic() {\n Scheduler.getInstance().run();\n }", "public void ServiceJob(FJJob job, double time) {\n if (job == null) return;\n if (remaining_workers == 0) return;\n if (FJSimulator.DEBUG) System.out.println(\"begin service on job: \"+job.path_log_id+\" \"+time);\n\n // if the patience flag is set, then check the job queue to see if\n // this job can wait for more workers to become idle\n /*\n if (this.patient_job==null && patience) {\n \tif (this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) {\n \t\tthis.patient_job = job;\n \t\t// compute how many workers we want to have idle before we start\n \t\t//this.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t/**\n \t\t * Just waiting for one more worker, always, is kind-of dumb. If there is only\n \t\t * one worker available, waiting for a 2nd doubles the parallelism of the next job.\n \t\t * Also, if a lot of jobs are in service, the expected waiting time until the\n \t\t * next departure is shorter. OTOH, if almost all workers are already idle, then\n \t\t * the benefit of one more worker is negligible, and less jobs in progress means a\n \t\t * longer expected wait until another becomes available. So when deciding whether\n \t\t * to be patient or not, we should consider:\n \t\t * - the number of currently idle workers\n \t\t * - the fraction of currently idle workers\n \t\t * - the number of jobs in progress (and how many workers they have)\n \t\t * - \n \t\t * /\n \t\tint num_jobs_in_progress = this.activeJobs.size();\n \t\tdouble idle_fraction = (1.0*remaining_workers)/(1.0*num_workers);\n \t\tint busy_workers = num_workers - remaining_workers;\n \t\tdouble workers_per_job = (1.0*busy_workers)/(1.0*num_jobs_in_progress);\n \t\t\n \t\t// the expected factor to be gained by a job departing\n \t\tdouble rr = workers_per_job / remaining_workers;\n \t\t\n \t\tif ((rr >= 1.5) && (num_jobs_in_progress >= num_workers/4.0)) {\n \t\t\tthis.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t\tSystem.out.println(\"** Setting a job to be patient rr=\"+rr);\n \t\t} else {\n \t\t\tSystem.out.println(\"-- J=\"+num_jobs_in_progress+\"\\t I=\"+remaining_workers+\"\\t B=\"+busy_workers+\"\\t rr=\"+rr);\n \t\t\tthis.idle_workers_needed = remaining_workers;\n \t\t}\n \t}\n }\n */\n\n /*\n * Try a really restrictive version of BackPressure and Patience.\n * Jobs are only patient in the case where there is only one available\n * worker, and at least k/2 jobs in progress. Also the only time the job\n * takes all workers is the case of a patient job.\n */\n if (this.patient_job==null && patience) {\n \tif ((this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) \n \t\t\t&& (remaining_workers==1)\n \t\t\t&& (activeJobs.size() >= num_workers/2)) {\n \t\tthis.patient_job = job;\n \t\t\tthis.idle_workers_needed = remaining_workers + 1;\n \t}\n }\n\n \n // if we are going to wait for more workers, just return\n //TODO: if the job queue is no longer empty, should just start the job?\n boolean servicing_patient_job = false;\n if (patience && this.patient_job!=null) {\n \tif (this.patient_job != job) {\n \t\tSystem.err.println(\"ERROR: trying to service a job when another is being patient!\");\n \t\tSystem.exit(1);\n \t}\n \t\n \tif (remaining_workers < idle_workers_needed) {\n \t\t//System.out.println(\"Being patient for job remaining_workers=\"+remaining_workers+\" idle_workers_needed=\"+idle_workers_needed);\n \t\treturn;\n \t}\n \t\n \t// we're going to service the job that's been waiting\n \tthis.patient_job = null;\n \tidle_workers_needed = 0;\n \tservicing_patient_job = true;\n \t//System.out.println(\"Servicing a patient job \"+remaining_workers);\n }\n \n // pick out some number of workers to use\n // if the job queue is below some threshold, take all the workers\n int nworkers = (remaining_workers == 1) ? 1 : remaining_workers/2;\n //if (this.job_queue.isEmpty()) {\n if (this.job_queue.isEmpty() && servicing_patient_job) {\n \t//System.out.println(\" ** giving a patient job all the workers: \"+remaining_workers);\n \tnworkers = remaining_workers;\n }\n \n activeJobs.add(job);\n Vector<Integer> worker_pool = new Vector<Integer>();\n job2workers.put(job, worker_pool);\n for (int w=0; (w<num_workers && worker_pool.size()<nworkers); w++) {\n if (worker2job[w] == null) {\n worker_pool.add(w);\n worker2job[w] = job;\n remaining_workers--;\n }\n }\n \n //System.out.println(\"worker_pool.size() = \"+worker_pool.size()+\" nworkers = \"+nworkers+\" activeJobs.size() = \"+activeJobs.size()+\" queue size = \"+this.job_queue.size());\n \n // assign the job's tasks to the workers\n int worker_index = 0;\n FJTask t = null;\n while ((t = job.nextTask()) != null) {\n workers[0][worker_pool.get(worker_index)].queue.add(t);\n //System.out.println(\"assigning task \"+t+\" to worker \"+worker_pool.get(worker_index));\n worker_index = (worker_index + 1) % nworkers;\n }\n \n // These newly allocated workers will be idle. Put them to work.\n feedWorkers(time);\n }", "@Override\n public void execute(LazyWorkerExchangeInfo lazyWorkerExchangeInfo) {\n int i = 1;\n StringBuilder sb = new StringBuilder();\n List<BagItems> bagItemsList = lazyWorkerExchangeInfo.getWorkDaysList();\n for (BagItems bagItem : bagItemsList) {\n bagItem.getItems().sort((a,b)-> a.compareTo(b));\n\n Integer[] w = bagItem.getItems().toArray(new Integer[bagItem.getItems().size()]);\n int N = bagItem.getItems().size();\n\n int cnt = 0;\n int step = 0;\n int end = N - 1;\n while (step <= end) {\n int top = w[end--];\n int mult = 1;\n while (step <= end && top * mult < 50) {\n step++;\n mult++;\n }\n if (top * mult >= 50) cnt++;\n }\n sb.append(\"Case #\").append(i).append(\":\").append(cnt).append(\"<br/>\");\n }\n lazyWorkerExchangeInfo.setOutputResult(sb.toString());\n }", "protected abstract void scheduleSuspicions();", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic boolean isStoppingConditionReached() {\n\n\t\tlong currentComputingTime = System.currentTimeMillis() - iterationStartingTime;\n\n\t\tif (Configurator.eINSTANCE.isSearchBudgetByTime()) // byTime\n\t\t\treturn super.isStoppingConditionReached() || currentComputingTime > durationThreshold;\n\t\tif (Configurator.eINSTANCE.isSearchBudgetByPrematureConvergence()) // byPrematureConvergence\n\t\t\treturn super.isStoppingConditionReached() || isStagnantState();\n\t\t// computeStagnantState\n\t\tif (Configurator.eINSTANCE.isSearchBudgetByPrematureConvergenceAndTime()) // byBoth\n\t\t\treturn super.isStoppingConditionReached() || isStagnantState() || currentComputingTime > durationThreshold;\n\t\treturn super.isStoppingConditionReached(); // classic\n\n\t}", "public void teleopPeriodic() {\n if (m_tpFirstRun) {\n System.out.println(\"Default teleopPeriodic() method... Override me!\");\n m_tpFirstRun = false;\n }\n }", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public void run() {\n\n RuleThread currntThrd;\n\t\tRuleQueue ruleQueue;\n \tRuleThread tempThrd;\n\t //\tRuleThread t;\n\t\tRuleQueue currRuleQueue;\n\n\t\tint ruleOperatingMode =0;\n\t\tint\ttempThrdPriority =0;\n\t\twhile(true){\n //if(ruleSchedulerDebug)\n\t\t\t // System.out.println(\"Looping in rulescheduler\");\n\n // When there is no rule at imm rule queue and process deferred rule\n\t\t\t// flag is false, then go sleep.\n\n if( deferredFlag == false && temporalRuleQueue.getHead() == null && immRuleQueue.getHead() == null){\n if(ruleSchedulerDebug) {\n\t\t\t\t\tSystem.out.println(\"There is no rule in any of these rule queues.\");\n System.out.println(\"Scheduler sleep\");\n }\n synchronized (this){\n\t\t\t\t\ttry{\n\t\t\t\t\t\twait();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(InterruptedException ie) {\n\t\t\t\t\t\tif(ruleSchedulerDebug)\n\t\t\t\t\t\t\tSystem.out.println(\"InterruptedException caught\");\n\t\t\t\t\t\tie.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(ruleSchedulerDebug)\n\t\t\t\t\tSystem.out.println(\"Scheduler awake\");\n }\n\n // Execute the rules in temporal rule queue\n if(temporalRuleQueue.getHead() != null){\n processTemporalRule() ;\n\n }\n\n // Finish executing all the deferred rules\n\n\t\t\tif( deferredFlag == true && immRuleQueue.getHead() == null){\n\n \t\t\t// transaction complete\n\t \t\t// reset the deferredFlag to be false when all the deferred rules are already executed\n\n\t\t\t\tdeferredFlag = false \t;\n\t\t\t\tif(deffRuleQueueOne.getHead() == null){\n\t\t\t\t\tif(ruleSchedulerDebug)\n\t\t\t\t\t\tSystem.out.println(\"All rules in rule queues are already executed.\");\n\t\t\t\t}\n\t\t\t}\n\n\n\n // Start executing a deferred rule.\n else if ( deferredFlag == true && immRuleQueue.getHead() != null){\n processRuleQueue(deffRuleQueueOne);\n\n\t\t\t}\n\n //****************************************************************\n\t\t\t// When there is a rule at imm rule queue and process deferred rule\n\t\t\t// \tflag is false, then trigger a rule.\n\n else if( immRuleQueue.getHead() != null && deferredFlag == false){\n processRuleQueue(immRuleQueue);\n }\n\t\t}\n\t}", "public void alternateFunction()\n\t{\n\t\tstart();\n\t\trunAlgorithm();\n\t}", "private void runWork()\r\n\t{\r\n\t\tRunnable transferPending = new Runnable()\r\n\t\t{\r\n\r\n\t\t\tpublic void run()\r\n\t\t\t{\r\n\t\t\t\ttransferPendingCellData();\r\n\t\t\t\tfireTableDataChanged(); // causes the table to be updated\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\twhile(noStopRequested)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// refresh the plans vector\r\n\t\t\t\tplans = new java.util.LinkedList(Control.getInstance().getPlanObjects());\r\n\t\t\t\tcreatePendingCellData();\r\n\t\t\t\tSwingUtilities.invokeAndWait(transferPending);\r\n\t\t\t\tThread.sleep(2000L); // the REFRESH rate is set at two seconds\r\n\t\t\t}catch(InvocationTargetException tx)\r\n\t\t\t{\r\n\t\t\t\tlogger.error(\"runWork - InvocationTargetException building cell data: \", tx);\r\n\t\t\t\tstopRequest();\r\n\t\t\t}catch(InterruptedException x)\r\n\t\t\t{\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testCreateAllocationScraperWorkerJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-25\");\n LocalDate endDate = LocalDate.parse( \"2018-10-06\" );\n while ( currentDate.isBefore( endDate ) ) {\n CloudbedsAllocationScraperWorkerJob workerJob = new CloudbedsAllocationScraperWorkerJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setAllocationScraperJobId( 440052 ); // dbpurge job (no recs)\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 7 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 7 ); // calendar page shows 2 weeks at a time\n }\n }", "@Override\r\n\tpublic void internalWorked(double work) {\n\r\n\t}", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\n public void worked(int work) {\n internalWorked(work);\n\t}", "protected abstract long waitToTravel();", "abstract public void computeSchedule();", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "private void restartPullingTask() {\n try {\n Thread.sleep(15000);\n ensureOpenSubscription.apply();\n } catch (Exception ex) {\n if (ex instanceof SubscriptionInUseException || ex instanceof SubscriptionDoesNotExistExeption) {\n // another client has connected to the subscription or it has been deleted meanwhile - we cannot open it so we need to finish\n onCompletedNotification();\n return;\n }\n\n restartPullingTask();\n return;\n }\n//TODO: startPullingTask = startPullingDocs();\n startPullingDocs(); //TODO: delete me!\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "private boolean allWorkComplete(int attempt) {\n boolean workComplete = (sm == null || syncManager.getFilesInTransfer().isEmpty()) &&\n list.getListSizeIncludingReservedFiles() <= 0;\n\n if (!workComplete || (workComplete && attempt > 2)) {\n return workComplete;\n } else {\n // Wait before another attempt\n SyncProcessManagerImpl.this.sleep(2000);\n return allWorkComplete(attempt + 1);\n }\n }", "private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name of the stock.\r\n // MAXWAIT is 20 minutes, since we are 1 second loops.\r\n // 60 loops is 1 minute and 20 of those is 20 minutes\r\n final int MAXWAIT = 60 * 20;\r\n int counter = 0;\r\n do\r\n {\r\n try\r\n {\r\n Thread.currentThread().sleep(ONE_SECOND);\r\n }\r\n catch (InterruptedException exc)\r\n {\r\n // Do Nothing - Try again\r\n }\r\n if (counter++ > MAXWAIT)\r\n { // Abort the Lookup for historic data\r\n this.cancel();\r\n return -1;\r\n }\r\n }\r\n while (\"\".equals(sd.getSymbol().getDataSz().trim()));\r\n\r\n return 0;\r\n }", "private void fillWeek(Boolean canRepeatPoint) {\n Map<Long, List<Long>> workerPointMap = new LinkedHashMap<>();\n for (DayDTO day : week.getDays()) {\n // Generamos una lista con los trabajadores que ya han sido ocupados para este dia.\n List<Long> busyWorkersToday = checkBusyBreaks(day);\n for (TouristPointDTO touristPoint : touristPoints) {\n // Comprobamos que no existen turnos para este dia en este punto establecido ya.\n if (checkPointNotAssignedDay(day, touristPoint)) {\n // Comprobamos que existena algun trabajador con horas disponibles del equipo que necesitamos.\n if (haveAvailableHours(touristPoint)) {\n Iterator<Map.Entry<TouristInformerDTO, Double>> iterator = availableWorkersHours.entrySet().iterator();\n Map.Entry<TouristInformerDTO, Double> entry = iterator.next();\n // Si el trabajador no es correcto, busca el siguiente trabajador (si hay mas).\n while (iterator.hasNext()\n && !isCorrectWorker(workerPointMap, busyWorkersToday, touristPoint, entry, day,\n canRepeatPoint)) {\n entry = iterator.next();\n }\n // Si el trabajador es correcto lo asocia al punto ese dia.\n if (isCorrectWorker(workerPointMap, busyWorkersToday, touristPoint, entry, day,\n canRepeatPoint)) {\n associateShift(day, touristPoint, entry.getKey(), workerPointMap);\n // Actualizamos la lista de trabajadores ocupados para hoy\n busyWorkersToday.add(entry.getKey().getId());\n // Actualizamos las horas disponibles de esta semana para el trabajador\n entry.setValue(entry.getValue() - touristPoint.getTime());\n } else {\n errorPoints.add(new TouristPointDayProblemDTO(touristPoint, day));\n }\n } else {\n errorPoints.add(new TouristPointDayProblemDTO(touristPoint, day));\n }\n }\n }\n orderByAvailableHours();\n }\n }", "public static void alarmTest1() {\n\tint durations[] = {1000, 10*1000, 100*1000};\n\tlong t0, t1;\n\tfor (int d : durations) {\n\t t0 = Machine.timer().getTime();\n\t ThreadedKernel.alarm.waitUntil (d);\n\t t1 = Machine.timer().getTime();\n\t System.out.println (\"alarmTest1: waited for \" + (t1 - t0) + \" ticks\");\n\t}\n }", "public void testPeriodic() {\n\n\t}", "@Override\r\n\tpublic void doTimeStep() {\n\t\tthis.run(Critter.getRandomInt(8));\r\n\t}", "private void processStartInsideCase(RatedPeriod rate, RateWrapper rateWrapper) {\n\n }", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "public void toNow() {\r\n // in suspending state, the current step must be non-interruptable\r\n if (currentStep != null && !currentStep.isInterruptable()) {\r\n double now = currentSimulationTime();\r\n double passed_time = now - lastTime;\r\n\r\n if (MathTools.less(0, passed_time)) {\r\n // get the demand of the first job\r\n double demand = running_processes.get(currentStep);\r\n demand -= passed_time;\r\n\r\n // avoid trouble caused by rounding issues\r\n demand = MathTools.equalsDouble(demand, 0) ? 0.0 : demand;\r\n\r\n assert demand >= 0 : \"Remaining demand (\" + demand + \") smaller than zero! at simulation time: \"\r\n + now;\r\n\r\n running_processes.put(currentStep, demand);\r\n }\r\n lastTime = now;\r\n }\r\n }", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "public void run() {\n\n\t\tSimulation.logEvent(SimulationEvent.cookStarting(this));\n\t\ttry {\n\t\t\twhile(true) {\n\t\t\t\t//YOUR CODE GOES HERE...\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Synchronized on listofOrders\n\t\t\t\t * get the customer order\n\t\t\t\t * notifyAll the threads that is waiting for listofOrders.\n\t\t\t\t * \n\t\t\t\t * get all the orders by the customer\n\t\t\t\t * Synchronized on machine (grill,coffee,fries)\n\t\t\t\t * wait if the capacity of the machine is full\n\t\t\t\t * once the capacity is available \n\t\t\t\t * makefood()\n\t\t\t\t * notify all the threads waiting for the machine\n\t\t\t\t * \n\t\t\t\t * Synchornized on finishedfood\n\t\t\t\t * wait till the food is completed\n\t\t\t\t * notify all the cook once the food is complete\n\t\t\t\t */\n\t\t\t\t\n\n\t\t\t\t//get the customer currently up next\n\t\t\t\tsynchronized(Simulation.listOfOrders){\n\n\t\t\t\t\twhile(Simulation.listOfOrders.isEmpty()){\n\t\t\t\t\t\tSimulation.listOfOrders.wait();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrCustomer = checkPriorityCustomer(Simulation.listOfOrders);\n\t\t\t\t\t//Simulation.orderList.remove();\n\t\t\t\t\tSimulation.logEvent(SimulationEvent.cookReceivedOrder(this, currCustomer.getOrder(), currCustomer.getOrderNum()));\n\t\t\t\t\tSimulation.listOfOrders.notifyAll();\n\t\t\t\t}\n\t\t\t\t//sends food to specific machine\n\t\t\t\tfor(int index = 0; index < currCustomer.getOrder().size(); index++){\n\t\t\t\t\tFood currFood = currCustomer.getOrder().get(index);\n\t\t\t\t\tif(currFood.equals(FoodType.burger)){\n\t\t\t\t\t\tsynchronized(Simulation.grill.foodList){\n\t\t\t\t\t\t\twhile(!(Simulation.grill.foodList.size() < Simulation.grill.capacity)){\n\t\t\t\t\t\t\t\tSimulation.grill.foodList.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSimulation.logEvent(SimulationEvent.cookStartedFood(this, FoodType.burger , currCustomer.getOrderNum()));\n\t\t\t\t\t\t\tSimulation.grill.makeFood(this, currCustomer.getOrderNum());\n\t\t\t\t\t\t\tSimulation.grill.foodList.notifyAll();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(currFood.equals(FoodType.fries)){\n\t\t\t\t\t\tsynchronized(Simulation.burner.foodList){\n\t\t\t\t\t\t\twhile(!(Simulation.burner.foodList.size() < Simulation.burner.capacity)){\n\t\t\t\t\t\t\t\tSimulation.burner.foodList.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSimulation.logEvent(SimulationEvent.cookStartedFood(this, FoodType.fries , currCustomer.getOrderNum()));\n\t\t\t\t\t\t\tSimulation.burner.makeFood(this,currCustomer.getOrderNum());\n\t\t\t\t\t\t\tSimulation.burner.foodList.notifyAll();\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}else{\n\t\t\t\t\t\tsynchronized(Simulation.braun.foodList){\n\t\t\t\t\t\t\twhile(!(Simulation.braun.foodList.size() < Simulation.braun.capacity)){\n\t\t\t\t\t\t\t\tSimulation.braun.foodList.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSimulation.logEvent(SimulationEvent.cookStartedFood(this, FoodType.coffee , currCustomer.getOrderNum()));\n\t\t\t\t\t\t\tSimulation.braun.makeFood(this,currCustomer.getOrderNum());\n\t\t\t\t\t\t\tSimulation.braun.foodList.notifyAll();\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\tsynchronized(completedFood){\n\t\t\t\t\twhile(!(completedFood.size() == currCustomer.getOrder().size())){\n\t\t\t\t\t\tcompletedFood.wait();\n\t\t\t\t\t\tcompletedFood.notifyAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSimulation.logEvent(SimulationEvent.cookCompletedOrder(this, currCustomer.getOrderNum()));\n\t\t\t\t\n\t\t\t\tsynchronized(Simulation.finishedOrder){\n\t\t\t\t\tSimulation.finishedOrder.put(currCustomer, true);\n\t\t\t\t\tSimulation.finishedOrder.notifyAll();\n\t\t\t\t}\n\t\t\t\tcompletedFood = new LinkedList<Food>();\n\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch(InterruptedException e) {\n\t\t\t// This code assumes the provided code in the Simulation class\n\t\t\t// that interrupts each cook thread when all customers are done.\n\t\t\t// You might need to change this if you change how things are\n\t\t\t// done in the Simulation class.\n\t\t\tSimulation.logEvent(SimulationEvent.cookEnding(this));\n\t\t}\n\t}", "@Override\n protected void execute() {\n double timePassed = Timer.getFPGATimestamp() - timePoint;\n\n boolean rumbleOver = (state == RUMBLE && timePassed > timeOn);\n boolean breakOver = (state == BREAK && timePassed > timeOff);\n\n if (rumbleOver) {\n rumble(false);\n if (repeatCount >= 0)\n repeatCount--;\n } else if (breakOver)\n rumble(true);\n }" ]
[ "0.6152179", "0.56841475", "0.5598185", "0.55969876", "0.5527278", "0.5518916", "0.5433748", "0.5425437", "0.5419661", "0.53739184", "0.53366596", "0.5334116", "0.5314471", "0.53134763", "0.5301393", "0.5278788", "0.5272891", "0.5257386", "0.5256589", "0.5238049", "0.52322793", "0.5229865", "0.52164406", "0.51748145", "0.5171398", "0.5166535", "0.51306087", "0.5124888", "0.5124545", "0.5122588", "0.51124036", "0.51113445", "0.51111555", "0.5096929", "0.5074227", "0.50655043", "0.50648755", "0.5058624", "0.5055023", "0.5051865", "0.50488865", "0.5043005", "0.50407004", "0.50253606", "0.5023139", "0.50212574", "0.50212574", "0.5016531", "0.49999142", "0.49943605", "0.4985151", "0.49826252", "0.4980213", "0.4975959", "0.49740538", "0.4971854", "0.49704048", "0.49692264", "0.49620733", "0.49585775", "0.4955641", "0.49528483", "0.49479243", "0.49457508", "0.49402905", "0.4938763", "0.49380004", "0.49379396", "0.49379396", "0.49379396", "0.49379396", "0.4933338", "0.49182203", "0.49158925", "0.49121168", "0.49116972", "0.490037", "0.48885942", "0.48806912", "0.48789188", "0.487626", "0.4873919", "0.48706713", "0.48612595", "0.48612595", "0.48612595", "0.48551896", "0.48538613", "0.48536575", "0.48485804", "0.48431364", "0.48388243", "0.4827615", "0.48265746", "0.4825136", "0.48198608", "0.48172396", "0.48165348", "0.48140803", "0.48112005" ]
0.5748449
1
Ensure a work slice is scheduled to run at the next available opportunity
private void maybeScheduleSlice() { if (nextSliceRunTime > 0) { timer.schedule(); nextSliceRunTime = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void maybeScheduleSlice(double when) {\n if (nextSliceRunTime > when) {\n timer.schedule(when);\n nextSliceRunTime = when;\n }\n }", "@Test\n public void collectionTaskInTheWorkScopeOfCommittedWPEnabled() throws Exception {\n\n // Given a work package with Collection Required boolean set to TRUE\n final TaskKey lWorkPackage = createWorkPackage();\n\n schedule( lWorkPackage, true );\n\n SchedStaskTable lStaskTable = InjectorContainer.get().getInstance( SchedStaskDao.class )\n .findByPrimaryKey( lWorkPackage );\n\n // Then Collection Required param of work package set to TRUE\n assertTrue( lStaskTable.isCollectionRequiredBool() );\n }", "@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}", "protected abstract void scheduleSuspicions();", "@Test\n public void collectionTaskInTheWorkScopeOfCommittedWPDisabled() throws Exception {\n\n // Given a work package with Collection Required boolean set to TRUE\n final TaskKey lWorkPackage = createWorkPackage();\n\n schedule( lWorkPackage, false );\n\n SchedStaskTable lStaskTable = InjectorContainer.get().getInstance( SchedStaskDao.class )\n .findByPrimaryKey( lWorkPackage );\n\n // Then Collection Required param of work package set to FALSE\n assertFalse( lStaskTable.isCollectionRequiredBool() );\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "private void scheduleNext() {\n lock.lock();\n try {\n active = tasks.poll();\n if (active != null) {\n executor.execute(active);\n terminating.signalAll();\n } else {\n //As soon as a SerialExecutor is empty, we remove it from the executors map.\n if (lock.isHeldByCurrentThread() && isEmpty() && this == serialExecutorMap.get(identifier)) {\n serialExecutorMap.remove(identifier);\n terminating.signalAll();\n if (state == State.SHUTDOWN && serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n }\n }\n } finally {\n lock.unlock();\n }\n }", "private void workSlice(int maxMillis) {\n double now = timer.getTime();\n\n if (controller.isRunnable(Priority.CRITICAL)) {\n // Always do all critical tasks in one go\n while (workUnit(Priority.CRITICAL, maxMillis)) {}\n }\n\n Schedulable delayedJob;\n while ((delayedJob = delayedJobs.getDueDelayedJob(now)) != null) {\n TaskInfo info = taskInfos.get(delayedJob);\n jobs.add(info.priority, delayedJob);\n }\n\n //\n // Run HIGH priority tasks to the exclusion of MEDIUM and LOW priority tasks.\n // Also, always run at least one unit of HIGH priority, regardless of how long the previous\n // CRITICAL tasks took.\n //\n double end = now + maxMillis;\n for (Priority p : Priority.values()) {\n if (!workAll(p, maxMillis, end)) {\n return;\n }\n }\n }", "@Override\r\n\tpublic boolean startWork(int delay) {\r\n\t\t\r\n\t\tif (!isInProcess() && haveWork() && !isDrawCalled) {\r\n\t\t\t\r\n\t\t\tif (EnginesManager.PARALLEL_WORK) {\r\n\t\t\t\ttaskTimer.schedule(new ScheduleTask(), delay);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\titerate();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void schedulerSleep() {\n\n\t\ttry {\n\n\t\t\tThread.sleep(timeSlice);\n\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t;\n\n\t}", "private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }", "public void scheduleJobs();", "@Test\n public void testNoSkipDelayedBy()\n throws Exception\n {\n workflowConfig.getNestedOrSetEmpty(\"schedule\")\n .set(\"daily>\", \"12:00:00\");\n\n // Indicate that there is no active attempt for this workflow\n when(sessionStore.getActiveAttemptsOfWorkflow(eq(PROJECT_ID), eq(WORKFLOW_NAME), anyInt(), any(Optional.class)))\n .thenReturn(ImmutableList.of());\n\n // Run the schedule executor at now + 1\n scheduleExecutor.runScheduleOnce(now.plusSeconds(1));\n\n // Verify the task was started.\n verify(scheduleExecutor).startSchedule(any(StoredSchedule.class), any(Scheduler.class), any(StoredWorkflowDefinitionWithProject.class));\n\n // Verify that the schedule progressed to the next time\n verify(scs).updateNextScheduleTimeAndLastSessionTime(SCHEDULE_ID, nextScheduleTime, now);\n }", "private void initialBlockOnMoarRunners() throws InterruptedException\n {\n lock.lock();\n try\n {\n if (taskQueue.isEmpty() && runners > 1)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n }\n }\n finally\n {\n lock.unlock();\n }\n }", "protected boolean pickAndExecuteAnAction() {\n\t//print(\"in waiter scheduler\");\n\t//Starts the break cycle if onBreak == true\n\tif(onBreak && working ) {\n\t initiateBreak();\n\t return true;\n\t}\n\n\t//Once all the customers have been served\n\t//then the waiter can actually go on break\n\tif(!working && customers.isEmpty() && !startedBreak) {\n\t goOnBreak();\n\t return true;\n\t}\n\n\tif(!onBreak && !working){\n\t endBreak();\n\t}\n\n\t\n\t//Runs through the customers for each rule, so \n\t//the waiter doesn't serve only one customer at a time\n\tif(!customers.isEmpty()){\n\t //System.out.println(\"in scheduler, customers not empty:\");\n\t //Gives food to customer if the order is ready\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_READY) {\n\t\t giveFoodToCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\t //Clears the table if the customer has left\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.IS_DONE) {\n\t\t clearTable(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Seats the customer if they need it\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.NEED_SEATED){\n\t\t seatCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Gives all pending orders to the cook\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_PENDING){\n\t\t giveOrderToCook(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Takes new orders for customers that are ready\n\t for(MyCustomer c:customers){\n\t\t//print(\"testing for ready to order\"+c.state);\n\t\tif(c.state == CustomerState.READY_TO_ORDER) {\n\t\t takeOrder(c);\n\t\t return true;\n\t\t}\n\t }\t \n\t}\n\tif (!currentPosition.equals(originalPosition)) {\n\t moveToOriginalPosition();\n\t return true;\n\t}\n\n\t//we have tried all our rules and found nothing to do. \n\t// So return false to main loop of abstract agent and wait.\n\t//print(\"in scheduler, no rules matched:\");\n\treturn false;\n }", "public SynchronousTimeLimitedTask() {\n _steps = new ArrayDeque<BooleanSupplier>();\n }", "@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t\n\t\t\t}", "public boolean shouldContinueExecuting()\n {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "public void a() {\n NamedRunnable active;\n synchronized (this.mTasks) {\n if (!this.mTasks.isEmpty()) {\n this.mActive = this.mTasks.remove(0);\n } else {\n this.mActive = null;\n com.alipay.mobile.common.task.Log.v(TAG, \"mTasks is empty.\");\n }\n active = this.mActive;\n }\n if (active != null) {\n com.alipay.mobile.common.task.Log.d(TAG, \"StandardPipeline.scheduleNext()\");\n if (this.a != null) {\n this.a.execute(active);\n return;\n }\n throw new RuntimeException(\"The StandardPipeline's Executor is null.\");\n }\n com.alipay.mobile.common.task.Log.d(TAG, \"StandardPipeline.scheduleNext(mTasks is empty)\");\n }", "public long runScheduledPendingTasks() {\n/* */ try {\n/* 597 */ return this.loop.runScheduledTasks();\n/* 598 */ } catch (Exception e) {\n/* 599 */ recordException(e);\n/* 600 */ return this.loop.nextScheduledTask();\n/* */ } \n/* */ }", "@Override\r\n\tpublic void worked(int work) {\n\t}", "private void runScheduleTasks() {\r\n // To minimize the time the lock is held, make a copy of the array\r\n // with the tasks while holding the lock then release the lock and\r\n // execute the tasks\r\n List<Runnable> tasksCopy;\r\n synchronized (taskLock) {\r\n if (tasks.isEmpty()) { return; } \r\n tasksCopy = tasks;\r\n tasks = new ArrayList<Runnable>(4);\r\n }\r\n for (Runnable task : tasksCopy) {\r\n task.run();\r\n } \r\n }", "public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }", "@Override\n protected void schedule() throws Exception {\n try {\n List<Slave> slaves = getSlaves();\n for (Slave slave : slaves) {\n int tc = tasksNode.getNumAssignedTasks(slave.getId());\n if (tc < 10) {\n for (int i = tc; i < 10; i++) {\n int k = counter.incrementAndGet();\n final String j = \"task-\" + k;\n Task t = new Task() {\n @Override\n public String getId() {\n return j;\n }\n\n @Override\n public byte[] getData() throws Exception {\n return new byte[0];\n }\n };\n\n tasksNode.addTask(t, slave.getId());\n if (k >= TOTAL_RECORDS){\n System.out.println(\"Stopping server [\" + getServerId() + \"]\");\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n\n }\n tasksNode.watch(monitor);\n synchronized (monitor) {\n monitor.wait(PAUSE_BETWEEN_TASK_SCHEDULE);\n }\n }", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "private void seedScheduleCanaryCheck(CanaryEndpoint canaryEndpoint) {\n\n scheduledExecutorService.schedule(\n queryCanaryEndpoint(canaryEndpoint),\n nextInt(1, 10),\n TimeUnit.SECONDS);\n }", "public void calibrateAndRunTask(){\n calibrateMaxConcurrentActions();\n\n runTasks();\n }", "@InSequence(1)\n @Test\n public void worksAfterDeployment() throws InterruptedException {\n int sum = sendMessages(10);\n runJob();\n Assert.assertEquals(10, collector.getLastItemCount());\n Assert.assertEquals(sum, collector.getLastSum());\n Assert.assertEquals(1, collector.getNumberOfJobs());\n }", "@Test\n public void testCreateAllocationScraperWorkerJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-25\");\n LocalDate endDate = LocalDate.parse( \"2018-10-06\" );\n while ( currentDate.isBefore( endDate ) ) {\n CloudbedsAllocationScraperWorkerJob workerJob = new CloudbedsAllocationScraperWorkerJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setAllocationScraperJobId( 440052 ); // dbpurge job (no recs)\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 7 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 7 ); // calendar page shows 2 weeks at a time\n }\n }", "public boolean shouldContinueExecuting() {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}", "private void scheduleJob() {\n\n }", "@Test\n public void tryToExecuteTasksWhenAllLeasesAreAlreadyReserved() throws Exception {\n DateTime timeSlice = dateTimeService.getTimeSlice(now().minusMinutes(1), standardMinutes(1));\n String tenantId = \"test1\";\n String type1 = \"test1\";\n int interval = 5;\n int window = 15;\n int segment0 = 0;\n int segment1 = 1;\n int segmentOffset = 0;\n\n TaskExecutionHistory executionHistory = new TaskExecutionHistory();\n TaskType taskType1 = new TaskType().setName(type1).setSegments(5).setSegmentOffsets(1);\n\n session.execute(queries.createTask.bind(type1, tenantId, timeSlice.toDate(), segment0, \"test1.metric1.5min\",\n ImmutableSet.of(\"test1.metric1\"), interval, window));\n session.execute(queries.createTask.bind(type1, tenantId, timeSlice.toDate(), segment1, \"test1.metric2.5min\",\n ImmutableSet.of(\"test1.metric2\"), interval, window));\n session.execute(queries.createLease.bind(timeSlice.toDate(), type1, segmentOffset));\n\n String owner = \"host2\";\n Lease lease = new Lease(timeSlice, type1, segmentOffset, owner, false);\n boolean acquired = leaseService.acquire(lease).toBlocking().first();\n assertTrue(acquired, \"Should have acquired lease\");\n\n LeaseService leaseService = new LeaseService(rxSession, queries);\n TaskServiceImpl taskService = new TaskServiceImpl(rxSession, queries, leaseService, singletonList(taskType1));\n taskService.subscribe(taskType1, task -> executionHistory.add(task.getTarget()));\n\n Thread t1 = new Thread(() -> taskService.executeTasks(timeSlice));\n t1.start();\n\n AtomicReference<Exception> executionErrorRef = new AtomicReference<>();\n Runnable executeTasks = () -> {\n try {\n Thread.sleep(1000);\n session.execute(queries.deleteTasks.bind(lease.getTaskType(), lease.getTimeSlice().toDate(), segment0));\n session.execute(queries.deleteTasks.bind(lease.getTaskType(), lease.getTimeSlice().toDate(), segment1));\n leaseService.finish(lease).toBlocking().first();\n } catch (Exception e) {\n executionErrorRef.set(e);\n }\n };\n Thread t2 = new Thread(executeTasks);\n t2.start();\n\n t2.join(10000);\n t1.join(10000);\n\n assertNull(executionErrorRef.get(), \"Did not expect an exception to be thrown from other client, but \" +\n \"got: \" + executionErrorRef.get());\n\n assertTrue(executionHistory.getExecutedTasks().isEmpty(), \"Did not expect this task service to execute any \" +\n \"tasks but it executed \" + executionHistory.getExecutedTasks());\n assertTasksPartitionDeleted(type1, timeSlice, segment0);\n assertTasksPartitionDeleted(type1, timeSlice, segment1);\n assertLeasePartitionDeleted(timeSlice);\n\n // We do not need to verify that tasks are rescheduled or that new leases are\n // created since the \"other\" clients would be doing that.\n }", "public abstract void schedule();", "private void runWork()\r\n\t{\r\n\t\tRunnable transferPending = new Runnable()\r\n\t\t{\r\n\r\n\t\t\tpublic void run()\r\n\t\t\t{\r\n\t\t\t\ttransferPendingCellData();\r\n\t\t\t\tfireTableDataChanged(); // causes the table to be updated\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\twhile(noStopRequested)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// refresh the plans vector\r\n\t\t\t\tplans = new java.util.LinkedList(Control.getInstance().getPlanObjects());\r\n\t\t\t\tcreatePendingCellData();\r\n\t\t\t\tSwingUtilities.invokeAndWait(transferPending);\r\n\t\t\t\tThread.sleep(2000L); // the REFRESH rate is set at two seconds\r\n\t\t\t}catch(InvocationTargetException tx)\r\n\t\t\t{\r\n\t\t\t\tlogger.error(\"runWork - InvocationTargetException building cell data: \", tx);\r\n\t\t\t\tstopRequest();\r\n\t\t\t}catch(InterruptedException x)\r\n\t\t\t{\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "protected void runBeforeIterations() {}", "@Test\n public void testDefaultConcurrentOvertimeExecution()\n throws Exception\n {\n workflowConfig.getNestedOrSetEmpty(\"schedule\")\n .set(\"daily>\", \"12:00:00\");\n\n // Indicate that there is an active attempt for this workflow\n when(sessionStore.getActiveAttemptsOfWorkflow(eq(PROJECT_ID), eq(WORKFLOW_NAME), anyInt(), any(Optional.class)))\n .thenReturn(ImmutableList.of(attempt));\n\n // Run the schedule executor...\n scheduleExecutor.runScheduleOnce(now);\n\n // Verify that another attempt was started\n verify(scheduleExecutor).startSchedule(any(StoredSchedule.class), any(Scheduler.class), any(StoredWorkflowDefinitionWithProject.class));\n\n // Verify that the schedule progressed to the next time\n verify(scs).updateNextScheduleTimeAndLastSessionTime(SCHEDULE_ID, nextScheduleTime, now);\n }", "public void step(SimState simState) {\n if (state.agents.length > 0 && state.agents[0] instanceof EquitableAgent) {\n boolean shouldGenTasks = true;\n for(int i = 0; i < state.numAgents; i++) {\n EquitableAgent a = (EquitableAgent)state.agents[i];\n if (!EquitablePartitions.nearlyEqual(a.getRateInMyPolygon(), 1.0 / state.numAgents, .05)) {\n shouldGenTasks = false;\n }\n }\n if(shouldGenTasks) {\n generateTasks();\n }else if (state.schedule.getSteps() == 30000) {\n EquitableAgent a = (EquitableAgent)state.agents[0];\n a.setEp(null);\n }\n }else {\n generateTasks();\n }\n }", "protected void afterTimeSlices()\n\t\tthrows DbCompException\n\t{\n//AW:AFTER_TIMESLICES\n // This code will be executed once after each group of time slices.\n // For TimeSlice algorithms this is done once after all slices.\n // For Aggregating algorithms, this is done after each aggregate\n // period.\n ComputationDAI compdao = tsdb.makeComputationDAO(); \n ArrayList<TimeSeriesIdentifier> tsids = new ArrayList<TimeSeriesIdentifier>();\n TimeSeriesDAI tsdai = tsdb.makeTimeSeriesDAO();\n TimeSeriesIdentifier itsid = getParmTsId(\"input\");\n CTimeSeries icts = new CTimeSeries(itsid.getKey(),itsid.getInterval(),itsid.getTableSelector());\n try {\n tsdai.fillTimeSeriesMetadata(icts);\n int fillDependentCompIds = tsdb.fillDependentCompIds(icts, comp.getAppId() );\n } catch (DbIoException ex) {\n Logger.getLogger(QueueFromFixedTS.class.getName()).log(Level.SEVERE, null, ex);\n } catch (BadTimeSeriesException ex) {\n Logger.getLogger(QueueFromFixedTS.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n HashSet<DbKey> dependentCompIds = icts.getDependentCompIds();\n for( DbKey key: dependentCompIds){\n if( !key.equals( this.comp.getKey() )){ // we don't want an endless loop\n DbComputation mycomp;\n try {\n mycomp = compdao.getComputationById(key);\n if( mycomp.hasGroupInput() && mycomp.isEnabled() ){\n for( DbCompParm parm: mycomp.getParmList() ){\n debug3(parm.getDataTypeId().toString());\n if( parm.isInput() && parm.getSiteDataTypeId().isNull() ){ \n DataType dt = parm.getDataType();\n TsGroup group = mycomp.getGroup();\n //group.addIntervalCode(parm.getInterval());\n //group.addVersion( parm.getVersion() );\n group.addOtherMember(\"version\", parm.getVersion());\n group.addDataTypeId(dt.getKey());\n group.setTransient(); \n group.clearExpandedList();\n //group.refilter(tsdb);\n tsids = tsdb.expandTsGroup(group); \n break; // we got what we need\n }\n\n }\n }\n \n CTimeSeries cts = null;\n for( TimeSeriesIdentifier tsid: tsids ){\n debug3(\"inserting data for \" + tsid.getUniqueString() );\n cts = new CTimeSeries(tsid.getKey(), tsid.getInterval(), tsid.getTableSelector() ); \n tsdai.fillTimeSeries(cts, dates);\n // a little odd, but we are just trying to requeue data\n TimedVariable tv = null;\n for( int i = 0; i < cts.size(); i++ ){\n tv = cts.sampleAt(i);\n tv.setFlags( tv.getFlags() | VarFlags.TO_WRITE );\n }\n tsdai.saveTimeSeries(cts);\n debug3(\"saved data to database\");\n \n }\n \n \n } catch (DbIoException ex) {\n warning(\"database connection failed\");\n } catch (NoSuchObjectException ex) {\n debug3(\"no comp for key \" + key);\n } catch (BadTimeSeriesException ex) {\n debug3(\"could read timeseries data\");\n }\n \n \n }\n \n }\n tsdai.close();\n compdao.close();\n \n//AW:AFTER_TIMESLICES_END\n;\n\t}", "private Constraint bookImmediatelySubsequentTasks(ConstraintFactory factory) {\n return factory.from(TaskAssignment.class)\n .filter(TaskAssignment::isTaskAssigned)\n .filter(TaskAssignment::hasPrecedingTask)\n // TODO filter for it being scheduled immediately following it's preceding task\n .penalizeConfigurable(\"Immediately preceding task conflict\");\n }", "@Override\n protected void compute() {\n\n if(this.workLoad > 16){\n System.out.println(\"Splitting Workload :: \"+this.workLoad);\n List<MyRecursiveAction> subTasks = new ArrayList<>();\n subTasks.addAll(createSubTasks());\n\n subTasks.forEach(tasks -> {\n tasks.fork();\n });\n }else{\n System.out.println(\"Doing Workload myself :: \"+this.workLoad);\n }\n }", "@Override\n\tpublic void DoGoToWaiting(int offset) {\n\t\t\n\t}", "abstract public void computeSchedule();", "@Test\n public void testNextWaiting() {\n }", "private void run() {\n log.log(Level.INFO, \"Starting multiple evaluation of {0} tasks\", tasks.size());\n boolean done = tasks.isEmpty();\n while (!done) {\n boolean hasFreeTasks = true;\n while (hasCapacity() && hasFreeTasks) {\n File task = getFreeTask();\n if (task == null) {\n hasFreeTasks = false;\n } else {\n EvaluatorHandle handle = new EvaluatorHandle();\n if (handle.createEvaluator(task, log, isResume)) {\n log.fine(\"Created new evaluation handler\");\n evaluations.add(handle);\n }\n }\n }\n\n log.log(Level.INFO, \"Tasks in progress: {0}, Unfinished tasks: {1}\", new Object[]{evaluations.size(), tasks.size()});\n try {\n Thread.sleep(5000);\n } catch (InterruptedException ex) {\n //Bla bla\n }\n checkRunningEvaluations();\n done = tasks.isEmpty();\n }\n\n }", "@Override\n\t\tpublic void scheduleForExecution(SlotProvider slotProvider) {\n\t\t\tsynchronized (this) {\n\t\t\t\tdone = true;\n\t\t\t\tthis.notifyAll();\n\t\t\t}\n\t\t}", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "private void unscheduleSlice() {\n nextSliceRunTime = Double.MAX_VALUE;\n timer.cancel();\n }", "@Override\n public void start(int totalTasks) {\n }", "@NonNull\n @Override\n public Result doWork() {\n\n Log.d(TAG, \"doWork: \");\n savedata();\n createNotification();\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(MyWorkManager.class)\n .setInitialDelay(5, TimeUnit.SECONDS).build();\n WorkManager.getInstance().enqueueUniqueWork(\"aaa\", ExistingWorkPolicy.APPEND, oneTimeWorkRequest);\n\n\n return Result.success();\n\n }", "@ScheduledMethod(shuffle=false) // Prevent call order shuffling\r\n\tpublic void reschedule()\r\n\t{\r\n\t\t// Reschedule step calls for the object according to the updated parameters\r\n\t\tISchedule schedule = RunEnvironment.getInstance().getCurrentSchedule();\r\n\t double next_tick = stepSchedule.getNextTime();\r\n\t double current_tick = schedule.getTickCount();\r\n\t\t\r\n\t\tif (!schedule.removeAction(stepSchedule))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Couldn't remove the action from the queue. Scheduling another reschedule.\");\r\n\t\t\tScheduleParameters sch_params = ScheduleParameters.createOneTime(current_tick + 0.000001);\r\n\t\t schedule.schedule(sch_params, this, \"reschedule\");\r\n\t\t return;\r\n\t\t}\r\n\t\t\r\n\t ScheduleParameters sch_params = ScheduleParameters.createRepeating(next_tick + 0.000001, Math.round(1 / velocity.speed));\r\n\t stepSchedule = schedule.schedule(sch_params, this, \"step\");\r\n\t}", "private void runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs =\n mQcConstants.ALLOWED_TIME_PER_PERIOD_WORKING_MS - contributionMs;\n\n // Session straddles edge of bucket window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - HOUR_IN_MILLIS, remainingTimeMs, 2), false);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 2 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime = now - HOUR_IN_MILLIS + 2 * HOUR_IN_MILLIS\n + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }", "void onPartialSchedule(State state, Bound bound);", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "private void schedule( TaskKey aWorkPackage, boolean aCollectionReqBool ) throws Exception {\n ScheduleInternalTO lTO = new ScheduleInternalTO();\n lTO.setSchedDates( new Date(), new Date() );\n lTO.setWorkOrderNo( WORK_ORDER_NO, \"\" );\n lTO.setCollectionRequired( aCollectionReqBool );\n\n STaskBean staskBean = new STaskBean();\n staskBean.setSessionContext( new SessionContextFake() );\n staskBean.schedule( aWorkPackage, lTO, AUTHORIZING_HR );\n\n }", "public void run() {\n long start = System.nanoTime();\n try {\n activeCount.inc();\n long delay = start - nextExecutionTime;//实践执行时间-理论应该执行的实际点\n taskExecutionDelay.record(delay, TimeUnit.NANOSECONDS);\n // real logic\n if (isPeriodic())\n runPeriodic();\n else\n ScheduledFutureTask.super.run();\n } finally {\n activeCount.dec();\n taskExecutionTime.record(System.currentTimeMillis() - start, TimeUnit.MILLISECONDS);\n }\n }", "@Override\n protected void triggerFirstIteration() throws IllegalActionException {\n }", "public void doStart() {\n if (this.mActive == null) {\n a();\n } else {\n com.alipay.mobile.common.task.Log.v(TAG, \"StandardPipeline.start(a task is running, so don't call scheduleNext())\");\n }\n }", "public void run() {\n try {\n arrive();\n\n //Wait for the daily developer standup\n team.getStandupBarrier().await();\n int lunchtime = 2400;\n\n working(lunchtime, false);\n \n int dillyDallyBeforeLunch = rng.nextInt((80 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeLunch);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Goes to lunch at \" + team.getLead().getPM().getClockTime());\n\n int lunchDuration = rng.nextInt((600 - 300) + 1) + 300;\n Thread.sleep(lunchDuration);\n \n System.out.println(\"Developer \" + this.getName() +\n \" Leaves lunch at \" + team.getLead().getPM().getClockTime());\n \n //Go to final meeting somewhere between 4:00 and 4:15\n int workInterval = rng.nextInt((4950 - 4800) + 1) + 4800;\n working(workInterval, false);\n\n System.out.println(\"Developer \" + this.getName() +\n \" Goes to afternoon meeting at \" + team.getLead().getPM().getClockTime());\n \n //Wait for that afternoon meeting to kick off\n team.getLead().getPM().getAfternoonMeetingBarrier().await();\n\n //After the meeting, get ready to go home and end the day\n int dillyDallyBeforeHome = rng.nextInt((150 - 10) + 1) + 10;\n Thread.sleep(dillyDallyBeforeHome);\n\n //Leave after afternoon meeting is complete\n System.out.println(\"Developer \" + this.getName() +\n \" is heading home at \" + team.getLead().getPM().getClockTime());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testTopUpTasksOutsidePlanningYield() throws Exception {\n\n // SETUP: Data Setup for running the Function\n EvtSchedDeadTable lEvtSchedDead =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:500:0:23\" ) );\n lEvtSchedDead.setIntervalQt( 0.0 );\n lEvtSchedDead.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had only 3 tasks. Top-up task fall outsidte planning yield should\n // not be found\n assertEquals( 3, iDataSet.getRowCount() );\n\n iDataSet.addSort( \"sched_id\", true );\n\n // assigned task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assign task with deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 102 ), \"ASSIGNEDTASK102\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE,\n DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ),\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // loose task with no deadline\n iDataSet.next();\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null,\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n // TEARDOWN: Undo the setup changes\n lEvtSchedDead.setIntervalQt( 15000.0 );\n }", "@Test\n public void testMaybeScheduleStartAlarmLocked_Ej_SmallRollingQuota() {\n // saveTimingSession calls maybeScheduleCleanupAlarmLocked which interferes with these tests\n // because it schedules an alarm too. Prevent it from doing so.\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked_Ej_SRQ\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n setStandbyBucket(WORKING_INDEX);\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs = mQcConstants.EJ_LIMIT_WORKING_MS - contributionMs;\n\n // Session straddles edge of bucket window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), true);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 23 * HOUR_IN_MILLIS, remainingTimeMs, 2), true);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 24 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime =\n now + HOUR_IN_MILLIS + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, WORKING_INDEX);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "@Override\n public void worked(int work) {\n internalWorked(work);\n\t}", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "@Override\r\n\tpublic void doTimeStep() {\n\t\tthis.run(Critter.getRandomInt(8));\r\n\t}", "private boolean shouldApply() {\n return nextRandomInt() >= unappliedJobCutoff;\n }", "@Override\n public void run() {\n\n\n\n System.out.println(\"run scheduled jobs.\");\n\n\n checkBlackOutPeriod();\n\n\n\n checkOfficeActionPeriod1();\n\n checkAcceptedFilings();\n\n checkNOAPeriod();\n checkFilingExtensions();\n\n\n\n }", "private synchronized boolean pushWorkToExecutor(StealStrategy s) {\n if (relocated.size() > 0) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Found work on relocated list: \" + relocated.size()\n + \" jobs\");\n }\n while (relocated.size() > 0) {\n ActivityRecord ar = (ActivityRecord) relocated.removeFirst();\n lookup.remove(ar.identifier());\n wrapper.addPrivateActivity(ar);\n }\n\n // System.out.println(\"ST: \" + identifier +\n // \" Pushed from relocated\");\n return true;\n }\n\n // Else: push one restricted activity to our executor\n if (restricted.size() > 0) {\n ActivityRecord ar = restricted.steal(wrapper.getContext(), s);\n if (ar != null) {\n lookup.remove(ar.identifier());\n wrapper.addPrivateActivity(ar);\n // System.out.println(\"ST: \" + identifier +\n // \" Pushed from restricted\");\n return true;\n }\n }\n\n // Else: push one stolen activity to our executor\n if (stolen.size() > 0) {\n ActivityRecord ar = stolen.steal(wrapper.getContext(), s);\n if (ar != null) {\n lookup.remove(ar.identifier());\n wrapper.addPrivateActivity(ar);\n // System.out.println(\"ST: \" + identifier +\n // \" Pushed from stolen\");\n return true;\n }\n }\n\n // Else: push one fresh activity to our executor\n if (fresh.size() > 0) {\n ActivityRecord ar = fresh.steal(wrapper.getContext(), s);\n if (ar != null) {\n lookup.remove(ar.identifier());\n wrapper.addPrivateActivity(ar);\n // System.out.println(\"ST: \" + identifier +\n // \" Pushed from fresh\");\n return true;\n }\n }\n\n // System.out.println(\"ST: \" + identifier + \" Failed to push any work \"\n // + relocated.size() + \" \" + restricted.size() + \" \" + stolen.size() +\n // \" \" + fresh.size() + \" \" + lookup.size());\n return false;\n }", "private void scheduleRecurringTasks() {\n\t\t//created directories expected by the system to exist\n\t\tUtil.initializeDataDirectories();\n\n\t\tTestManager.initializeTests();\n\n\t\t// Gets all the periodic tasks and runs them.\n\t\t// If you need to create a new periodic task, add another enum instance to PeriodicTasks.PeriodicTask\n\t\tSet<PeriodicTasks.PeriodicTask> periodicTasks = EnumSet.allOf(PeriodicTasks.PeriodicTask.class);\n\t\tfor (PeriodicTasks.PeriodicTask task : periodicTasks) {\n\t\t\tif (R.IS_FULL_STAREXEC_INSTANCE || !task.fullInstanceOnly) {\n\t\t\t\ttaskScheduler.scheduleWithFixedDelay(task.task, task.delay, task.period.get(), task.unit);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tPaginationQueries.loadPaginationQueries();\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"unable to correctly load pagination queries\");\n\t\t\tlog.error(e.getMessage(), e);\n\t\t}\n\t}", "public void test800324() {\n TaskSeries s1 = new TaskSeries(\"S1\");\n s1.add(new Task(\"Task 1\", new SimpleTimePeriod(new Date(), new Date())));\n s1.add(new Task(\"Task 2\", new SimpleTimePeriod(new Date(), new Date())));\n s1.add(new Task(\"Task 3\", new SimpleTimePeriod(new Date(), new Date())));\n TaskSeriesCollection tsc = new TaskSeriesCollection();\n tsc.add(s1);\n try {\n tsc.getStartValue(0, 3);\n assertTrue(false);\n } catch (IndexOutOfBoundsException e) {\n }\n try {\n tsc.getEndValue(0, 3);\n assertTrue(false);\n } catch (IndexOutOfBoundsException e) {\n }\n try {\n tsc.getSubIntervalCount(0, 3);\n assertTrue(false);\n } catch (IndexOutOfBoundsException e) {\n }\n }", "@Override\n public final boolean doIt() throws JobException {\n tasks = new LinkedHashMap<TaskKey,TaskJob>();\n prepareTasks();\n (new MergeJob()).startJob();\n return true;\n }", "public void prepareFreezingTaskBounds() {\n for (int stackNdx = this.mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; stackNdx--) {\n ((TaskStack) this.mTaskStackContainers.getChildAt(stackNdx)).prepareFreezingTaskBounds();\n }\n }", "protected abstract String scheduler_next();", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "private void scheduledTask() {\n connectToNewViews();\n removeDisconnectedViews();\n try {\n Thread.sleep(SCHEDULED_TASK_PERIOD);\n // Scheduling future execution\n\n synchronized (threadPool) {\n if (!threadPool.isShutdown()) {\n threadPool.execute(this::scheduledTask);\n }\n }\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_MaxExecution() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + 8 * MINUTE_IN_MILLIS), 4 * HOUR_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time will phase out, so should use bucket limit.\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Close to boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - MINUTE_IN_MILLIS),\n 4 * HOUR_IN_MILLIS - 5 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(5 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Far from boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (20 * HOUR_IN_MILLIS), 4 * HOUR_IN_MILLIS - 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "protected abstract long waitToTravel();", "@Override\n protected void triggerNextIteration() throws IllegalActionException {\n }", "protected void runAfterIterations() {}", "public void executWaiting() {\n for (Runnable action : this.todo) {\n runAction( action );\n }\n }", "void freeze() {\n setState(State.FROZEN); // prevent new puts to this chunk\n while (pendingOps.get() != 0) ;\n }", "@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}", "Boolean getSequentialScheduling();", "@Test\n public void testMaybeScheduleStartAlarmLocked_WorkingSet() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n\n JobStatus jobStatus = createJobStatus(\"testMaybeScheduleStartAlarmLocked_WorkingSet\", 1);\n setStandbyBucket(standbyBucket, jobStatus);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobStatus, null);\n // No sessions saved yet.\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(0)).setWindow(\n anyInt(), anyLong(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n\n // Test with timing sessions out of window.\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 10 * HOUR_IN_MILLIS, 5 * MINUTE_IN_MILLIS, 1), false);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(0)).setWindow(\n anyInt(), anyLong(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n\n // Test with timing sessions in window but still in quota.\n final long end = now - (2 * HOUR_IN_MILLIS - 5 * MINUTE_IN_MILLIS);\n // Counting backwards, the quota will come back one minute before the end.\n final long expectedAlarmTime =\n end - MINUTE_IN_MILLIS + 2 * HOUR_IN_MILLIS + mQcConstants.IN_QUOTA_BUFFER_MS;\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n new TimingSession(now - 2 * HOUR_IN_MILLIS, end, 1), false);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(0)).setWindow(\n anyInt(), anyLong(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n\n // Add some more sessions, but still in quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - HOUR_IN_MILLIS, MINUTE_IN_MILLIS, 1), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (50 * MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 1), false);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(0)).setWindow(\n anyInt(), anyLong(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n\n // Test when out of quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 30 * MINUTE_IN_MILLIS, 5 * MINUTE_IN_MILLIS, 1), false);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n\n // Alarm already scheduled, so make sure it's not scheduled again.\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "private void runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs = mQcConstants.MAX_EXECUTION_TIME_MS - contributionMs;\n\n // Session straddles edge of 24 hour window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 20 * HOUR_IN_MILLIS, remainingTimeMs, 300), false);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 24 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime = now - 20 * HOUR_IN_MILLIS\n + 24 * HOUR_IN_MILLIS\n + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "public void run()\n\t{\n\t\tthis.partition();\n\t}", "@Issue(\"JENKINS-38536\")\n @Test\n public void testPartlyCompletedParallels() throws Exception {\n String jobScript = \"\"+\n \"echo 'first stage'\\n\" +\n \"parallel 'long' : { sleep 60; }, \\n\" + // Needs to be in-progress\n \" 'short': { sleep 2; }\"; // Needs to have completed, and SemaphoreStep alone doesn't cut it\n\n // This must be amateur science fiction because the exposition for the setting goes on FOREVER\n ForkScanner scan = new ForkScanner();\n TestVisitor tv = new TestVisitor();\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"parallelTimes\");\n job.setDefinition(new CpsFlowDefinition(jobScript, true));\n WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();\n Thread.sleep(4000); // Allows enough time for the shorter branch to finish and write its BlockEndNode\n FlowExecution exec = run.getExecution();\n List<FlowNode> heads = exec.getCurrentHeads();\n scan.setup(heads);\n scan.visitSimpleChunks(tv, new NoOpChunkFinder());\n FlowNode endNode = exec.getNode(tv.filteredCallsByType(TestVisitor.CallType.PARALLEL_END).get(0).getNodeId().toString());\n Assert.assertEquals(\"sleep\", endNode.getDisplayFunctionName());\n sanityTestIterationAndVisiter(heads);\n run.doKill(); // Avoid waiting for long branch completion\n }", "@Override\n public void apply(Operation operation) {\n try {\n waitingOperations.put(operation);\n } catch (InterruptedException ex) {\n //handle\n }\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "public static boolean addressNonWaiting(){\n boolean addressedSomething = false;\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n // see if we can allocate resources\n\n\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n\n if(instructionType == Type.initiate){\n currTask.startTime = time;\n addressedSomething = true;\n //System.out.println(\"Task \" + currTask.taskNumber + \" was initiated\");\n }else if(instructionType == Type.request){\n if(request(currInstruction)){\n addressedSomething = true;\n //System.out.println(\"Task \" + currTask.taskNumber + \" had its request completed\");\n }else{\n //System.out.println(\"Task \" + currTask.taskNumber + \" could not be completed\");\n }\n }// when it is time to add the waitingInstructions what you should do is something along the lines of\n else if(instructionType == Type.compute){\n int numberCycles = currInstruction.numberCycles;\n if(currTask.computeTime == 0){\n currTask.computeTime = currInstruction.numberCycles;\n }\n currTask.computeTime -= 1;\n\n //System.out.println(\"Task \" + currTask.taskNumber + \" computes \" + (currInstruction.numberCycles - currTask.computeTime));\n\n addressedSomething = true;\n }else if(instructionType == Type.release){\n int amountReleased = currInstruction.resourceAmount;\n release(resourceType, amountReleased, currTask);\n //System.out.println(\"Task \" + currTask.taskNumber + \" released its resources\");\n addressedSomething = true;\n }else{ // if its terminate\n currTask.terminateTime = time;\n // System.out.println(\"Task \" + currTask.taskNumber + \" terminates at time t = \" + time);\n terminatedCount ++;\n releaseAll(currTask);\n addressedSomething = true;\n }\n if(currTask.computeTime == 0){\n taskPointers[i] ++;\n }\n }\n\n }\n return addressedSomething;\n }", "@Test\n public void testMaybeScheduleStartAlarmLocked_Ej_BucketChange() {\n // saveTimingSession calls maybeScheduleCleanupAlarmLocked which interferes with these tests\n // because it schedules an alarm too. Prevent it from doing so.\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked_Ej_BucketChange\", 1), null);\n }\n\n setDeviceConfigLong(QcConstants.KEY_EJ_LIMIT_ACTIVE_MS, 30 * MINUTE_IN_MILLIS);\n setDeviceConfigLong(QcConstants.KEY_EJ_LIMIT_WORKING_MS, 20 * MINUTE_IN_MILLIS);\n setDeviceConfigLong(QcConstants.KEY_EJ_LIMIT_FREQUENT_MS, 15 * MINUTE_IN_MILLIS);\n setDeviceConfigLong(QcConstants.KEY_EJ_LIMIT_RARE_MS, 10 * MINUTE_IN_MILLIS);\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Affects active bucket\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 12 * HOUR_IN_MILLIS, 9 * MINUTE_IN_MILLIS, 3), true);\n // Affects active and working buckets\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 4 * HOUR_IN_MILLIS, 5 * MINUTE_IN_MILLIS, 3), true);\n // Affects active, working, and frequent buckets\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - HOUR_IN_MILLIS, 5 * MINUTE_IN_MILLIS, 10), true);\n // Affects all buckets\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 5 * MINUTE_IN_MILLIS, 10 * MINUTE_IN_MILLIS, 3), true);\n\n InOrder inOrder = inOrder(mAlarmManager);\n\n // Start in ACTIVE bucket.\n setStandbyBucket(ACTIVE_INDEX);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, ACTIVE_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(0))\n .setWindow(anyInt(), anyLong(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n inOrder.verify(mAlarmManager, timeout(1000).times(0))\n .cancel(any(AlarmManager.OnAlarmListener.class));\n\n // And down from there.\n setStandbyBucket(WORKING_INDEX);\n final long expectedWorkingAlarmTime =\n (now - 4 * HOUR_IN_MILLIS) + (24 * HOUR_IN_MILLIS)\n + mQcConstants.IN_QUOTA_BUFFER_MS;\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, WORKING_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedWorkingAlarmTime), anyLong(),\n eq(TAG_QUOTA_CHECK), any(), any());\n\n setStandbyBucket(FREQUENT_INDEX);\n final long expectedFrequentAlarmTime =\n (now - HOUR_IN_MILLIS) + (24 * HOUR_IN_MILLIS) + mQcConstants.IN_QUOTA_BUFFER_MS;\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, FREQUENT_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedFrequentAlarmTime), anyLong(),\n eq(TAG_QUOTA_CHECK), any(), any());\n\n setStandbyBucket(RARE_INDEX);\n final long expectedRareAlarmTime =\n (now - 5 * MINUTE_IN_MILLIS) + (24 * HOUR_IN_MILLIS)\n + mQcConstants.IN_QUOTA_BUFFER_MS;\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, RARE_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedRareAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n\n // And back up again.\n setStandbyBucket(FREQUENT_INDEX);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, FREQUENT_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedFrequentAlarmTime), anyLong(),\n eq(TAG_QUOTA_CHECK), any(), any());\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, WORKING_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedWorkingAlarmTime), anyLong(),\n eq(TAG_QUOTA_CHECK), any(), any());\n\n setStandbyBucket(ACTIVE_INDEX);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, ACTIVE_INDEX);\n }\n inOrder.verify(mAlarmManager, timeout(1000).times(0))\n .setWindow(anyInt(), anyLong(), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n inOrder.verify(mAlarmManager, timeout(1000).times(1))\n .cancel(any(AlarmManager.OnAlarmListener.class));\n }", "@Test\n public void testNoTopUpTasksDueAfterSchedWindow() throws Exception {\n\n // SETUP: Data Setup for running the Function\n EvtSchedDeadTable lEvtSchedDead =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:102:0:21\" ) );\n lEvtSchedDead.setDeadlineDate( DateUtils.parseDateTimeString( \"15-MAY-2007 10:00\" ) );\n lEvtSchedDead.update();\n\n EvtSchedDeadTable lEvtSchedDead2 =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:500:0:23\" ) );\n lEvtSchedDead2.setDeadlineDate( DateUtils.parseDateTimeString( \"15-MAY-2007 10:00\" ) );\n lEvtSchedDead2.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had only 2 tasks with no deadline\n assertEquals( 2, iDataSet.getRowCount() );\n\n // loose task with no deadline\n iDataSet.next();\n\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null, // no\n // deadline\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assigned task with no deadline\n iDataSet.next();\n\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null, // no\n // deadline\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n // TEARDOWN: Undo the Setup Changes\n lEvtSchedDead.setDeadlineDate( DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ) );\n lEvtSchedDead.update();\n\n lEvtSchedDead2.setDeadlineDate( DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ) );\n lEvtSchedDead2.update();\n }", "protected void runBeforeIteration() {}", "public void pathwayScan() {\n ScanPathwayBasedAssocSwingWorker worker = new ScanPathwayBasedAssocSwingWorker();\n // buildTask = buildTask.create(buildingThread); //the task is not started yet\n buildTask = RP.create(worker); //the task is not started yet\n buildTask.schedule(0); //start the task\n }", "@Override\r\n public void run() {\r\n if (node.isPredecessorSet()) {\r\n // Create the task and set the timer\r\n task = new CheckPredecessorTimer(node);\r\n (new Timer()).schedule(task, CHECK_PERIOD);\r\n\r\n node.checkPredecessor();\r\n }\r\n }", "void event(long t) {\n\r\n \r\n\r\n Job temp;\r\n if (this.TempListMigrating.front != null) { //if there are any new migrating tasks\r\n TempListMigrating.insertionSortIdentifier(this.TempListMigrating.front); //order the TempList, from smallest-largest\r\n\r\n while (this.TempListMigrating.front != null) {\r\n //TempList.calculateD(t);\r\n temp = TempListMigrating.remove();\r\n int assignedProcessor = this.getNextProcessor(temp);\r\n\r\n //add this task to the processor\r\n this.servers[this.Tasks[temp.identifier].index[assignedProcessor]].addToMigratingPool(temp);\r\n\r\n }\r\n }\r\n\r\n while (this.TempListFixed.front != null) {\r\n\r\n temp = TempListFixed.remove();\r\n this.servers[this.Tasks[temp.identifier].index[0]].pool.insertionSortDeadline(temp, t);\r\n\r\n }\r\n\r\n //add things to the processor now\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n if (this.servers[i].executing.top != null) { //not empty, there is a job present\r\n //check for migrating tasks\r\n if (this.servers[i].migratingPool.front != null) {\r\n //there are migrating Tasks, and something on the stack\r\n if (this.Tasks[this.servers[i].executing.top.identifier].numMigrations < 2 || this.Tasks[this.servers[i].executing.top.identifier].fixed == true) { //executing is a fixed task\r\n if (servers[i].migratingPool.front != null) {\r\n //switch\r\n temp = servers[i].executing.top;\r\n servers[i].executing.top = servers[i].migratingPool.remove();\r\n servers[i].pool.insertionSortDeadline(temp, t);\r\n this.preemptions++;\r\n\r\n }\r\n } //if both migrating tasks\r\n else if (this.servers[i].migratingPool.front.identifier < servers[i].executing.top.identifier) {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n } else if (this.servers[i].pool.front != null)//check for fixed tasks\r\n {\r\n if (this.servers[i].pool.front.deadline < servers[i].executing.top.deadline) {\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n }\r\n\r\n } else if (this.servers[i].migratingPool.front != null) //it was empty, add now migrating\r\n {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top=temp;\r\n \r\n \r\n\r\n } else if (this.servers[i].pool.front != null) //executing was empty, and migratingPool was empty, add from fixed list\r\n {\r\n\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n }\r\n\r\n }\r\n }", "@Override\n public void internalWorked(double work) {\n if (usedUp || nestedBeginTasks != 1) {\n return;\n }\n\n double realWork = scale * work;\n super.internalWorked(realWork);\n sentToParent += realWork;\n if (sentToParent >= parentTicks) {\n usedUp = true;\n }\n }", "public void testPeriodic() {\n Scheduler.getInstance().run();\n }", "private boolean allWorkComplete(int attempt) {\n boolean workComplete = (sm == null || syncManager.getFilesInTransfer().isEmpty()) &&\n list.getListSizeIncludingReservedFiles() <= 0;\n\n if (!workComplete || (workComplete && attempt > 2)) {\n return workComplete;\n } else {\n // Wait before another attempt\n SyncProcessManagerImpl.this.sleep(2000);\n return allWorkComplete(attempt + 1);\n }\n }", "public interface Work {\n \n public static final int UNDETERMINED_AMOUNT = -1;\n \n /**\n * Calling this method causes the work to be performed, similar to run() in Runnable.\n * The implementation of this method must regularly call mayContinue()\n * on its ContinuationArbiter, and terminate ASAP if it returns false.\n *\n * The Work may receive an InterruptedException if it is aborted during execution.\n * is free to throw an InterruptedException if it is interrupted\n * (wich will be ignored), or it may catch the exception and exit nicely.\n */\n public void execute() throws InterruptedException;\n \n /**\n * The WorkManager will call this method to designate a ContinuationArbiter \n * to the Work before it executes the Work. The Work must then use that \n * arbiter regularly during execution to ask if it may continue \n * and to signal progress.\n * The Work must make sure that calls to the arbiter occur only in the execution Thread.\n *\n * @post The Work only calls mayContinue on the designated ContinuationArbiter.\n */\n public void setContinuationArbiter(ContinuationArbiter arbiter);\n \n /**\n * Returns a description of the work (to be shown in the GUI).\n * WorkManager will only call this method on the same thread as execute, \n * so it is not required to make this method threadsafe with regard to execute.\n */\n public String getDescription();\n \n /**\n * Returns the total amount of Work to be done.\n * Note that the WorkManager expects an amount of work has been done\n * on each call of mayContinue().\n * Must return a positive integer value or UNDETERMINED_AMOUNT.\n * WorkManager will only call this method on the same thread as execute, \n * so it is not required to make this method threadsafe with regard to execute.\n */\n public int getTotalAmount();\n \n /**\n * Returns the amount of Work that has been done already.\n * Must return a positive integer value or UNDETERMINED_AMOUNT.\n * WorkManager will only call this method on the same thread as execute, \n * so it is not required to make this method threadsafe with regard to execute.\n */\n public int getAmountDone();\n \n /**\n * Returns whether this work can cope with interrupts when an abort is requested.\n * If false, the Work will not receive interrupts from the WorkManager, and \n * the only effect of an abort will be that mayContinue returns false.\n */\n public boolean isInterruptible();\n \n /**\n * Returns whether this work can be aborted by the user.\n * This is only reflected in the GUI. Programs can always (try to) abort a Work, \n * regardless of the value of the abortable property.\n * Aborting a Work only has effect when the work calls mayContinue()\n * (which will return false) or while it is waiting (it will be interrupted).\n */\n public boolean isAbortable();\n \n /**\n * Returns whether this work can be paused by the user.\n * This is only reflected in the GUI. Programs can always (try to) pause a Work, \n * regardless of the value of the pausable property.\n * Aborting a Work only has effect when the work calls mayContinue(),\n * which will not return until the Work is unpaused.\n */\n public boolean isPausable();\n}" ]
[ "0.6595093", "0.62082034", "0.6127824", "0.5902836", "0.58719504", "0.5824107", "0.5596765", "0.5575671", "0.5518965", "0.5518832", "0.5517489", "0.54845345", "0.5464025", "0.5455654", "0.54324037", "0.54306257", "0.54301333", "0.54265094", "0.54264235", "0.5419947", "0.5398122", "0.5383961", "0.538001", "0.5356252", "0.53561854", "0.5352881", "0.53433347", "0.5336155", "0.53208715", "0.53171307", "0.53156346", "0.5313929", "0.5311767", "0.53025377", "0.52941513", "0.528754", "0.5285634", "0.5283547", "0.5280266", "0.5276915", "0.5275098", "0.5268316", "0.5257822", "0.52569157", "0.52528137", "0.52401364", "0.52382207", "0.5232969", "0.5226356", "0.5219292", "0.52188253", "0.5217077", "0.52066123", "0.5205413", "0.520199", "0.5201081", "0.5198284", "0.5189836", "0.51883465", "0.5168492", "0.51606953", "0.5160686", "0.51533556", "0.51463723", "0.5131401", "0.512698", "0.51258636", "0.5122775", "0.5120448", "0.51194525", "0.5114312", "0.510961", "0.5106174", "0.5104132", "0.510378", "0.50958973", "0.50938123", "0.50936943", "0.5090774", "0.5072069", "0.5064992", "0.50623834", "0.5062368", "0.50553876", "0.50551283", "0.50525486", "0.5051663", "0.50447595", "0.50418276", "0.5039711", "0.50383043", "0.50330526", "0.50189984", "0.50184053", "0.5013263", "0.5005348", "0.50048816", "0.50038326", "0.5003699", "0.5002219" ]
0.7285145
0
Ensure a work slice is scheduled to run no later than the given time
private void maybeScheduleSlice(double when) { if (nextSliceRunTime > when) { timer.schedule(when); nextSliceRunTime = when; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void maybeScheduleSlice() {\n if (nextSliceRunTime > 0) {\n timer.schedule();\n nextSliceRunTime = 0;\n }\n }", "private void schedulerSleep() {\n\n\t\ttry {\n\n\t\t\tThread.sleep(timeSlice);\n\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t;\n\n\t}", "public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }", "public static void aroundForTime(Task t, long time) {\n\t\ttry {\n\t\t\tThread.sleep(time);\n\t\t\tt.complete();\n\t\t\tThread.sleep(time);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Scheduled(fixedRate = 60_000)\n public void checkEventTime() {\n isTimeService.findAll().forEach(event -> {\n if (event.getSchedulledTime().isBefore(LocalDateTime.now())) {\n this.producer.sendReachTimeMessage(new IsTime(event.getMessageId()));\n this.isTimeService.deleteById(event.getSchedulledId());\n }\n });\n// log.info(\"Schedulled time check.\");\n }", "boolean hasDesiredTime();", "void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}", "public void checkTime() throws InterruptedByTimeoutException\n {\n if (System.currentTimeMillis() - this.start > TIME)\n throw new InterruptedByTimeoutException();\n }", "protected abstract void scheduleSuspicions();", "private void runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs =\n mQcConstants.ALLOWED_TIME_PER_PERIOD_WORKING_MS - contributionMs;\n\n // Session straddles edge of bucket window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - HOUR_IN_MILLIS, remainingTimeMs, 2), false);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 2 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime = now - HOUR_IN_MILLIS + 2 * HOUR_IN_MILLIS\n + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "private void sleepByScheduleTime() throws InterruptedException\n\t{\n\t\tjava.util.Calendar calendar = java.util.Calendar.getInstance();\n\t\tcalendar.setTime(new java.util.Date(System.currentTimeMillis()));\n\t\tint currHour = calendar.get(calendar.HOUR_OF_DAY);\n\t\tif ((24 - currHour) * 60 < 2 * FtpData.SCHEDULE_TIME)\n\t\t{\n\t\t\tsleep((FtpData.SCHEDULE_TIME + 1) * 60000); // 00h:01\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsleep(FtpData.SCHEDULE_TIME * 60000); // n * minutes;\n\t\t}\n\t}", "@Test\n public void collectionTaskInTheWorkScopeOfCommittedWPEnabled() throws Exception {\n\n // Given a work package with Collection Required boolean set to TRUE\n final TaskKey lWorkPackage = createWorkPackage();\n\n schedule( lWorkPackage, true );\n\n SchedStaskTable lStaskTable = InjectorContainer.get().getInstance( SchedStaskDao.class )\n .findByPrimaryKey( lWorkPackage );\n\n // Then Collection Required param of work package set to TRUE\n assertTrue( lStaskTable.isCollectionRequiredBool() );\n }", "@Test\n public void collectionTaskInTheWorkScopeOfCommittedWPDisabled() throws Exception {\n\n // Given a work package with Collection Required boolean set to TRUE\n final TaskKey lWorkPackage = createWorkPackage();\n\n schedule( lWorkPackage, false );\n\n SchedStaskTable lStaskTable = InjectorContainer.get().getInstance( SchedStaskDao.class )\n .findByPrimaryKey( lWorkPackage );\n\n // Then Collection Required param of work package set to FALSE\n assertFalse( lStaskTable.isCollectionRequiredBool() );\n }", "private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }", "private void runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs = mQcConstants.MAX_EXECUTION_TIME_MS - contributionMs;\n\n // Session straddles edge of 24 hour window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 20 * HOUR_IN_MILLIS, remainingTimeMs, 300), false);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 24 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime = now - 20 * HOUR_IN_MILLIS\n + 24 * HOUR_IN_MILLIS\n + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "public synchronized boolean sleep(final long time, final TimeUnit timeUnit) {\n return timeUnit.convert(System.nanoTime() - this.last,\n TimeUnit.NANOSECONDS) >= time;\n }", "@Test\n public void testDefaultConcurrentOvertimeExecution()\n throws Exception\n {\n workflowConfig.getNestedOrSetEmpty(\"schedule\")\n .set(\"daily>\", \"12:00:00\");\n\n // Indicate that there is an active attempt for this workflow\n when(sessionStore.getActiveAttemptsOfWorkflow(eq(PROJECT_ID), eq(WORKFLOW_NAME), anyInt(), any(Optional.class)))\n .thenReturn(ImmutableList.of(attempt));\n\n // Run the schedule executor...\n scheduleExecutor.runScheduleOnce(now);\n\n // Verify that another attempt was started\n verify(scheduleExecutor).startSchedule(any(StoredSchedule.class), any(Scheduler.class), any(StoredWorkflowDefinitionWithProject.class));\n\n // Verify that the schedule progressed to the next time\n verify(scs).updateNextScheduleTimeAndLastSessionTime(SCHEDULE_ID, nextScheduleTime, now);\n }", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}", "public boolean isReadyForAction(long time) {\n return System.currentTimeMillis() - lastAction > time;\n }", "@Scheduled(fixedDelay = 3000)\n\tpublic void scheduleTaskWithFixedDelay() {\n\t\tlog.info(\"Fixed Delay Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t\t//Sleep TimeUnit\n//\t\ttry {\n//\t\t\tTimeUnit.SECONDS.sleep(5);\n//\t\t} catch (Exception e) {\n//\t\t\tlog.error(\"Ran into an error {}\", e);\n//\t throw new IllegalStateException(e);\n//\t\t}\n\t}", "public void forceTimeout() {\n getTimeoutScheduler().forceExecute();\n }", "private void unscheduleSlice() {\n nextSliceRunTime = Double.MAX_VALUE;\n timer.cancel();\n }", "@Test\n public void testNoSkipDelayedBy()\n throws Exception\n {\n workflowConfig.getNestedOrSetEmpty(\"schedule\")\n .set(\"daily>\", \"12:00:00\");\n\n // Indicate that there is no active attempt for this workflow\n when(sessionStore.getActiveAttemptsOfWorkflow(eq(PROJECT_ID), eq(WORKFLOW_NAME), anyInt(), any(Optional.class)))\n .thenReturn(ImmutableList.of());\n\n // Run the schedule executor at now + 1\n scheduleExecutor.runScheduleOnce(now.plusSeconds(1));\n\n // Verify the task was started.\n verify(scheduleExecutor).startSchedule(any(StoredSchedule.class), any(Scheduler.class), any(StoredWorkflowDefinitionWithProject.class));\n\n // Verify that the schedule progressed to the next time\n verify(scs).updateNextScheduleTimeAndLastSessionTime(SCHEDULE_ID, nextScheduleTime, now);\n }", "boolean allowRetry(int retry, long startTimeOfExecution);", "public SynchronousTimeLimitedTask() {\n _steps = new ArrayDeque<BooleanSupplier>();\n }", "@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_UpdatedAllowedTime() {\n setDeviceConfigLong(QcConstants.KEY_ALLOWED_TIME_PER_PERIOD_WORKING_MS,\n mQcConstants.ALLOWED_TIME_PER_PERIOD_WORKING_MS / 2);\n\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }", "DurationTracker timeSpentTaskWait();", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "public boolean isScheduled(){\n //System.out.println(\"nextrun: \" + nextrun.getTime() + \" nu: \" + System.currentTimeMillis());\n if (nextrun != null){\n long next = nextrun.getTime();\n \n return next < System.currentTimeMillis();\n }else{\n //null => instance has never run before & should run asap\n return true;\n }\n }", "public void testFairTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "private void scheduleDelayedJob(Priority priority, Schedulable job,\n int minimumTime, int interval) {\n if (controller.isSuppressed(priority, job) && priority != Priority.INTERNAL_SUPPRESS) {\n scheduleDelayedJob(Priority.INTERNAL_SUPPRESS, job, minimumTime, interval);\n return;\n }\n\n TaskInfo info = taskInfos.get(job);\n if (info != null) {\n cancel(job);\n }\n\n double now = timer.getTime();\n double startTime = now + minimumTime;\n\n info = createDelayedTask(priority, job, startTime, interval);\n delayedJobs.addDelayedJob(info);\n\n maybeScheduleSlice(startTime);\n }", "@Test\n public void testGetRemainingEJExecutionTimeLocked_BeginningOfTime() {\n // Set time to 3 minutes after boot.\n advanceElapsedClock(-JobSchedulerService.sElapsedRealtimeClock.millis());\n advanceElapsedClock(3 * MINUTE_IN_MILLIS);\n\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(MINUTE_IN_MILLIS, MINUTE_IN_MILLIS, 2), true);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(150 * SECOND_IN_MILLIS, 15 * SECOND_IN_MILLIS, 5), true);\n\n final long[] limits = mQuotaController.getEJLimitsMs();\n for (int i = 0; i < limits.length; ++i) {\n setStandbyBucket(i);\n assertEquals(\"Got wrong remaining EJ execution time for bucket #\" + i,\n i == NEVER_INDEX ? 0 : (limits[i] - 75 * SECOND_IN_MILLIS),\n mQuotaController.getRemainingEJExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "public static void syncTimer(long period, RunResult<Boolean> runnable) {\n\t\tnew BukkitRunnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(!runnable.run()) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}.runTaskTimer(AreaShop.getInstance(), 0, period);\n\t}", "public void schedule(Runnable job, long delay, TimeUnit unit);", "private void setupCheckLockTimerTask(String processName, LocalDateTime until, LockRestorer lockerRestorer,\n LocalDateTime now, String unlockKey) {\n if (lockerRestorer != null) {\n final long delayTime = getDelayTimeInMilliseconds(now, until);\n final long renewTime = Duration.between(now, until).toMillis();\n processMap.put(processName + unlockKey, lockerRestorer);\n final CheckLockTimerTask timerTask = new CheckLockTimerTask(this, processName, unlockKey, renewTime);\n if (scheduledExecutorService == null) {\n final Map<String, ScheduledExecutorService> scheduledExecutors = applicationContext.getBeansOfType(ScheduledExecutorService.class);\n if (scheduledExecutors.size() > 0) {\n if (scheduledExecutors.size() == 1) {\n scheduledExecutorService = scheduledExecutors.values().iterator().next();\n } else {\n scheduledExecutorService = scheduledExecutors.get(preferredScheduledExecutorService);\n }\n }\n Assert.notNull(scheduledExecutorService, \"Scheduled executor service not found!\");\n }\n scheduledExecutorService.scheduleAtFixedRate(timerTask, delayTime, renewTime, TimeUnit.MILLISECONDS);\n }\n }", "public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }", "@Test\n public void testDelay() {\n long future = System.currentTimeMillis() + (rc.getRetryDelay() * 1000L);\n\n rc.delay();\n\n assertTrue(System.currentTimeMillis() >= future);\n }", "private boolean checkTime(){\n\t\treturn false;\r\n\t}", "@DisplayName(\"Test that the task stops running once the predicate is true when the test is slow\")\n @Test\n @Timeout(10)\n void testRunNoMorePredicateDeterministicSlowWithDelay() {\n ForegroundTask task = Tasks.foregroundTask()\n .withBudget(Budgets.iterationBudget()\n .withMaxIterations(5)\n .withInitialDelay(Duration.ofSeconds(1))\n .withInterval(Duration.ofSeconds(1))\n .build())\n .build();\n\n task.run(this::taskPredicateWithDeterministicStopSlow, Integer.valueOf(3));\n assertTrue(taskCount < maxIterations);\n }", "private static void timerTest4() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\tcalendar.set(Calendar.MINUTE, 20);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tDate time = calendar.getTime();\n\n\t\tTimer timer = new Timer();\n\t\tSystem.out.println(\"wait ....\");\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.out.println(\"timertest4\");\n\n\t\t\t}\n\t\t}, time, 24 * 60 * 60 * 1000);\n\n\t}", "void Ending(long t) //to be called after each second, decrements\r\n {\n boolean check = false;\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n //move deadlines of migrating tasks\r\n Job temp = servers[i].migratingPool.front;\r\n\r\n while (temp != null) {\r\n temp.deadline--;\r\n temp = temp.next;\r\n\r\n }\r\n //fixed tasks\r\n temp = servers[i].pool.front;\r\n while (temp != null) {\r\n temp.deadline--;\r\n temp = temp.next;\r\n\r\n }\r\n\r\n if (servers[i].checkDeadlineEDFOS(t) == true) { //if something empties\r\n check = true; //call event later\r\n }\r\n\r\n }//end of server num looop\r\n\r\n if (check == true) {\r\n event(t);\r\n }\r\n\r\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "@Override\n public void timeout(CellPath path)\n {\n retry(task, SMALL_DELAY);\n }", "private interface CheckedTimedConditionRunnable {\n boolean run(Condition c, long timeLimit, TimeUnit unit) throws Exception;\n }", "@Override\n public void run() {\n time_ = (int) (System.currentTimeMillis() - startTime_) / 1000;\n updateUI();\n\n if (time_ >= maxTime_) {\n // Log.v(VUphone.tag, \"TimerTask.run() entering timeout\");\n handler_.post(new Runnable() {\n public void run() {\n report(true);\n }\n });\n }\n }", "@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_UpdatedMaxTime() {\n setDeviceConfigLong(QcConstants.KEY_MAX_EXECUTION_TIME_MS,\n mQcConstants.MAX_EXECUTION_TIME_MS / 2);\n\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }", "public void testTimedOffer() {\n final SynchronousQueue q = new SynchronousQueue();\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n\n threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.offer(new Object(), LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success){}\n }\n });\n\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public void check(int time)\n {\n if(time < 0)\n {\n throw new IllegalArgumentException();\n }\n }", "boolean hasStartTime();", "@Override\n\tpublic boolean isScheduled();", "boolean hasExecutionTime();", "private void seedScheduleCanaryCheck(CanaryEndpoint canaryEndpoint) {\n\n scheduledExecutorService.schedule(\n queryCanaryEndpoint(canaryEndpoint),\n nextInt(1, 10),\n TimeUnit.SECONDS);\n }", "public void updateWaitingTime(){\n waitingTime = waitingTime - 1;\n }", "boolean hasSolverTimeLimitSeconds();", "private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We cannot wait for the request infinitely, but we also cannot remove the object\n * from the queue - FIXME in case of situation when queue of waiting objects grow to X we have to\n * brake connection.\n */\n\n Iterator<RedisQueryRequest> iterator = queue.iterator();\n int i = 0;\n long timeNow = System.currentTimeMillis();\n /*\n * we are tracking 'i' because we want to do only some work, not all the work.\n * we cannot take too much time in timeout checking.\n */\n\n while (iterator.hasNext() && i < 100) {\n RedisQueryRequest current = iterator.next();\n if (current.isTimeouted()) {\n //already been here.\n continue;\n }\n long whenRequestStarted = current.getRequestTimeStart();\n long requestTimeUntilNow = timeNow - whenRequestStarted;\n if (requestTimeUntilNow >= 1000) {\n LOG.error(\"Timeouted request detected\");\n current.markTimeouted();\n current.getCompletableFuture().completeExceptionally(new TimeoutException(\"Timeout occurred.\"));\n }\n\n i++;\n }\n\n }, 100, 100, TimeUnit.MILLISECONDS);\n }", "public void schedule() {\n\t\tnew Timer().schedule(getTask(), TIME);\n\t}", "private void workSlice(int maxMillis) {\n double now = timer.getTime();\n\n if (controller.isRunnable(Priority.CRITICAL)) {\n // Always do all critical tasks in one go\n while (workUnit(Priority.CRITICAL, maxMillis)) {}\n }\n\n Schedulable delayedJob;\n while ((delayedJob = delayedJobs.getDueDelayedJob(now)) != null) {\n TaskInfo info = taskInfos.get(delayedJob);\n jobs.add(info.priority, delayedJob);\n }\n\n //\n // Run HIGH priority tasks to the exclusion of MEDIUM and LOW priority tasks.\n // Also, always run at least one unit of HIGH priority, regardless of how long the previous\n // CRITICAL tasks took.\n //\n double end = now + maxMillis;\n for (Priority p : Priority.values()) {\n if (!workAll(p, maxMillis, end)) {\n return;\n }\n }\n }", "@Override\n public void timeout(CellPath path) {\n retry(task, SMALL_DELAY);\n }", "public boolean hasDesiredTime() {\n return desiredTime_ != null;\n }", "@Override\n\tboolean allow() {\n\t\tlong curTime = System.currentTimeMillis()/1000 * 1000;\n\t\tlong boundary = curTime - 1000;\n\t\tsynchronized (log) {\n\t\t\t//1. Remove old ones before the lower boundary\n\t\t\twhile (!log.isEmpty() && log.element() <= boundary) {\n\t\t\t\tlog.poll();\n\t\t\t}\n\t\t\t//2. Add / log the new time\n\t\t\tlog.add(curTime);\n\t\t\tboolean allow = log.size() <= maxReqPerUnitTime;\n\t\t\tSystem.out.println(curTime + \", log size = \" + log.size()+\", allow=\"+allow);\n\t\t\treturn allow;\n\t\t}\n\t}", "private boolean isReqTimeFresh(Date reqTime, String username) {\r\n\t\tDate oldReqTime = oldRequestTimes.get(username); \r\n\t\tif(oldReqTime!= null && oldReqTime.equals(reqTime))\r\n\t\t\tthrow new RuntimeException(\"This request has been sent before.\");\r\n\t\t\r\n\t\tDate current = new Date();\r\n\t\treturn current.getTime() - 750 < reqTime.getTime() && reqTime.getTime() < current.getTime() + 750;\r\n\t}", "public void testTimedCallable() throws Exception {\n final ExecutorService[] executors = {\n Executors.newSingleThreadExecutor(),\n Executors.newCachedThreadPool(),\n Executors.newFixedThreadPool(2),\n Executors.newScheduledThreadPool(2),\n };\n\n final Runnable sleeper = new CheckedInterruptedRunnable() {\n public void realRun() throws InterruptedException {\n delay(LONG_DELAY_MS);\n }};\n\n List<Thread> threads = new ArrayList<Thread>();\n for (final ExecutorService executor : executors) {\n threads.add(newStartedThread(new CheckedRunnable() {\n public void realRun() {\n Future future = executor.submit(sleeper);\n assertFutureTimesOut(future);\n }}));\n }\n for (Thread thread : threads)\n awaitTermination(thread);\n for (ExecutorService executor : executors)\n joinPool(executor);\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_MaxExecution() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + 8 * MINUTE_IN_MILLIS), 4 * HOUR_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time will phase out, so should use bucket limit.\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Close to boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - MINUTE_IN_MILLIS),\n 4 * HOUR_IN_MILLIS - 5 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(5 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Far from boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (20 * HOUR_IN_MILLIS), 4 * HOUR_IN_MILLIS - 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "@Override\r\n\tpublic void doTimeStep() {\n\t\tthis.run(Critter.getRandomInt(8));\r\n\t}", "public boolean hasDesiredTime() {\n return desiredTimeBuilder_ != null || desiredTime_ != null;\n }", "@Test\n public void testTask() throws InterruptedException {\n\n SchedulingRunnable task1 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task1, \"0/15 * * * * ?\");\n Thread.sleep(10000);\n\n SchedulingRunnable task2 = new SchedulingRunnable(\"demoTask\", \"taskWithParams\", \"aaa\",\"111\");\n cronTaskRegistrar.addCronTask(task2, \"0/8 * * * * ?\");\n // 便于观察\n\n Thread.sleep(3000000);\n }", "public void sleep() throws InterruptedException, IllegalArgumentException, Time.Ex_TimeNotAvailable, Time.Ex_TooLate\n {\n // The current time.\n AbsTime now;\n // The duration to wait.\n RelTime duration;\n\n // Make error if NEVER.\n if (isNEVER()) {\n throw new IllegalArgumentException(\"this == NEVER\");\n }\n\n // Don't do anything if ASAP.\n if (!isASAP()) {\n\n // Calculate the time now.\n now = new AbsTime();\n\n // Figure out how long to wait for.\n duration = Time.diff(this, now);\n\n // If duration is negative, throw the Ex_TooLate exception.\n if (duration.getValue() < 0L) {\n throw new Time.Ex_TooLate();\n }\n\n // Do the wait.\n duration.sleep();\n }\n }", "private void scheduledTask() {\n connectToNewViews();\n removeDisconnectedViews();\n try {\n Thread.sleep(SCHEDULED_TASK_PERIOD);\n // Scheduling future execution\n\n synchronized (threadPool) {\n if (!threadPool.isShutdown()) {\n threadPool.execute(this::scheduledTask);\n }\n }\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }", "@DisplayName(\"Test that the task does not run for more than the max iterations when using a predicate and an initial delay\")\n @Test\n @Timeout(10)\n void testRunNoMorePredicate() {\n ForegroundTask task = Tasks.foregroundTask()\n .withBudget(Budgets.iterationBudget()\n .withMaxIterations(5)\n .withInitialDelay(Duration.ZERO)\n .withInterval(Duration.ofSeconds(1))\n .build())\n .build();\n\n task.run(this::taskPredicate, new Object());\n assertEquals(maxIterations, taskCount);\n }", "public Duration scheduleWithDelay(Runnable connectTast) {\n Duration delaySinceLastSchedule = Duration.between(lastSchedule, Instant.now());\n if (retrySequence.getMaxDelay().multipliedBy(2).minus(delaySinceLastSchedule).isNegative()) {\n // yes\n lastDelay = Duration.ZERO;\n } else {\n // no\n lastDelay = retrySequence.nextDelay(lastDelay)\n .orElseThrow(() -> new RuntimeException(\"may retries reached\"));\n }\n \n lastSchedule = Instant.now();\n ScheduledExceutor.common().schedule(connectTast, lastDelay.toMillis(), TimeUnit.MILLISECONDS);\n \n return lastDelay;\n }", "public void scheduleNow(Runnable r) {\n ctx.requireStarted();\n ctx.getRunLoop().scheduleNow(r);\n }", "@Test\n public void repairSingleTableRepairedInSubRanges()\n {\n long startTime = System.currentTimeMillis();\n\n TableReference tableReference = myTableReferenceFactory.forTable(\"test\", \"table1\");\n\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2), true);\n\n schedule(tableReference);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS)\n .until(() -> isRepairedSince(tableReference, startTime));\n\n verifyTableRepairedSince(tableReference, startTime);\n verify(mockFaultReporter, never())\n .raise(any(RepairFaultReporter.FaultCode.class), anyMap());\n }", "@Scheduled(fixedRate = 2000, initialDelay = 5000)\n\tpublic void scheduleTaskWithInitialDelay() {\n\t\tlog.info(\"Fixed Rate Task With Initial Delay :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()));\n\t}", "public abstract boolean isScheduled();", "public TimePeriod notWorking(TimePeriod period);", "@Test\r\n void timeoutNotExceeded() {\n assertTimeout(ofMinutes(2), () -> {\r\n // Perform task that takes less than 2 minutes.\r\n });\r\n }", "public void testFairTimedPollWithOffer() {\n final SynchronousQueue q = new SynchronousQueue(true);\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n threadAssertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n q.poll(LONG_DELAY_MS, TimeUnit.MILLISECONDS);\n\t\t\tthreadShouldThrow();\n } catch (InterruptedException success) { }\n }\n });\n try {\n t.start();\n Thread.sleep(SMALL_DELAY_MS);\n assertTrue(q.offer(zero, SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n t.interrupt();\n t.join();\n } catch (Exception e){\n unexpectedException();\n }\n }", "public boolean isScheduled();", "public boolean firedRecently(double time);", "@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}", "protected void scheduleExpiry()\n {\n long dtExpiry = 0L;\n int cDelay = OldOldCache.this.m_cExpiryDelay;\n if (cDelay > 0)\n {\n dtExpiry = getSafeTimeMillis() + cDelay;\n }\n setExpiryMillis(dtExpiry);\n }", "protected void doAWTimeSlice()\n\t\tthrows DbCompException\n\t{\n//AW:TIMESLICE\n dates.add(_timeSliceBaseTime);\n//AW:TIMESLICE_END\n\t}", "@DisplayName(\"Test that the task does not run for more than the max iterations when using a supplier\")\n @Test\n // @Timeout(10)\n void testRunNoMoreSupplier() {\n ForegroundTask task = Tasks.foregroundTask()\n .withBudget(Budgets.iterationBudget()\n .withMaxIterations(5)\n .withInitialDelay(Duration.ZERO)\n .withInterval(Duration.ofSeconds(1))\n .build())\n .build();\n\n task.run(this::booleanSupplier);\n assertEquals(maxIterations, taskCount);\n\n Duration duration = task.elapsed();\n assertNotNull(duration);\n assertFalse(duration.isNegative());\n assertFalse(duration.isZero());\n assertTrue(duration.toMillis() > 0);\n }", "public void timeLogic(int time){\n //Add logic to decide time increments at which tickets will be granted\n }", "boolean hasCollectEndTime();", "boolean hasWaitTime();", "ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);", "@Override\n protected void rescheduleAfterArrival (final J job, final double time)\n {\n if (job == null)\n throw new IllegalArgumentException ();\n if ((! isJob (job)) || isJobInServiceArea (job))\n throw new IllegalArgumentException ();\n final DJ delegateJob = getDelegateJob (job);\n getEncapsulatedQueue ().arrive (time, delegateJob);\n }", "@Test\n public void testNoTopUpTasksDueAfterSchedWindow() throws Exception {\n\n // SETUP: Data Setup for running the Function\n EvtSchedDeadTable lEvtSchedDead =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:102:0:21\" ) );\n lEvtSchedDead.setDeadlineDate( DateUtils.parseDateTimeString( \"15-MAY-2007 10:00\" ) );\n lEvtSchedDead.update();\n\n EvtSchedDeadTable lEvtSchedDead2 =\n EvtSchedDeadTable.findByPrimaryKey( new EventDeadlineKey( \"4650:500:0:23\" ) );\n lEvtSchedDead2.setDeadlineDate( DateUtils.parseDateTimeString( \"15-MAY-2007 10:00\" ) );\n lEvtSchedDead2.update();\n\n // ACTION: Execute the Query\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n\n // TEST: Confirm the Data had only 2 tasks with no deadline\n assertEquals( 2, iDataSet.getRowCount() );\n\n // loose task with no deadline\n iDataSet.next();\n\n testRow( new TaskKey( 4650, 101 ), \"ASSIGNEDTASK101\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null, // no\n // deadline\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 4650, \"REQ\", \"CHECK\",\n DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 0.0, null, null, null, null,\n null );\n\n // assigned task with no deadline\n iDataSet.next();\n\n testRow( new TaskKey( 4650, 400 ), \"LOOSETASK\", new AircraftKey( 4650, 100 ),\n new AssemblyKey( 4650, \"ASCD\" ), \"Aircraft\", RefSchedPriorityKey.NONE, null, // no\n // deadline\n new RefTaskPriorityKey( 4650, \"LOW\" ), 0, 0, \"REQ\", null, null, 0.0, null, null, null,\n null, null );\n\n // TEARDOWN: Undo the Setup Changes\n lEvtSchedDead.setDeadlineDate( DateUtils.parseDateTimeString( \"25-MAY-2007 21:30\" ) );\n lEvtSchedDead.update();\n\n lEvtSchedDead2.setDeadlineDate( DateUtils.parseDateTimeString( \"26-MAY-2007 19:45\" ) );\n lEvtSchedDead2.update();\n }", "@Override\n protected void execute() {\n double now = Timer.getFPGATimestamp();\n double deltaT = now - startT;\n if(deltaT < 1){\n Robot.hatchIntake.hatchSolenoid(false);\n }else if(deltaT > 1 && deltaT < 1.5){\n Robot.hatchIntake.hatchSolenoid(true);\n }\n }", "public void testTimedPoll() {\n try {\n SynchronousQueue q = new SynchronousQueue();\n assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n } catch (InterruptedException e){\n\t unexpectedException();\n\t}\n }", "void kickQueueProcessor() {\n\n long timeNow = this.tools.getTimestamp();\n this.lastKicked = timeNow;\n\n // ideally, we would run the queue at this time\n final long latestTimeToRun = timeNow + this.config.getProcessQueueIntervalShort();\n\n // only update the run time if we are bringing it forward not pushing it back\n this.runAgainAfterMs.getAndUpdate(previousTimeToRunNext ->\n (previousTimeToRunNext > latestTimeToRun) ? latestTimeToRun : previousTimeToRunNext);\n }", "private boolean workUnit(Priority priority, int maxMillis) {\n jobs.removeFirst(priority);\n Schedulable job = jobs.getRemovedJob();\n\n if (job == null) {\n return false;\n }\n\n double start = timer.getTime();\n\n TaskInfo taskInfo = taskInfos.get(job);\n Timer profilingTimer = null;\n if (taskInfo != null && Timing.isEnabled()) {\n Timing.enterScope(taskInfo.scopeValues);\n profilingTimer = Timing.start(\"schedule \" + job.getClass().getSimpleName());\n }\n try {\n if (job instanceof IncrementalTask) {\n boolean isFinished = !jobs.getRemovedJobAsProcess().execute();\n\n if (isFinished) {\n // Remove all trace\n cancel(job);\n } else {\n TaskInfo task = taskInfos.get(job);\n // If the job has more work to do, we add it back into the job queue, unless it has has\n // already been cancelled during execution (which would imply !hasJob)\n if (task != null && hasJob(job)) {\n // if it is a repeating job, add it to a delay before we contiune\n if (task.calculateNextExecuteTime(start)) {\n delayedJobs.addDelayedJob(task);\n } else if (!delayedJobs.has(task.id)) {\n jobs.add(priority, job);\n }\n }\n }\n } else {\n Task task = jobs.getRemovedJobAsTask();\n // Remove all trace.\n cancel(job);\n task.execute();\n }\n } finally {\n if (profilingTimer != null) {\n Timing.stop(profilingTimer);\n Timing.exitScope();\n }\n }\n\n int timeSpent = (int) ( timer.getTime() - start);\n\n // This will only be useful when debugging in deobfuscated mode.\n triggerOnJobExecuted(job, timeSpent);\n\n return hasTasks();\n }", "public void testFairInterruptedTimedPoll() {\n Thread t = new Thread(new Runnable() {\n public void run() {\n try {\n SynchronousQueue q = new SynchronousQueue(true);\n assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));\n } catch (InterruptedException success){\n }\n }});\n t.start();\n try {\n Thread.sleep(SHORT_DELAY_MS);\n t.interrupt();\n t.join();\n }\n catch (InterruptedException ie) {\n\t unexpectedException();\n }\n }", "public void schedule() {\n cancel();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n runnable.run();\n }\n }, delay);\n }", "@Override\r\n public void run() {\r\n if (node.isPredecessorSet()) {\r\n // Create the task and set the timer\r\n task = new CheckPredecessorTimer(node);\r\n (new Timer()).schedule(task, CHECK_PERIOD);\r\n\r\n node.checkPredecessor();\r\n }\r\n }", "@DisplayName(\"Test that the task stops running once the predicate is true\")\n @Test\n @Timeout(10)\n void testRunNoMorePredicateDeterministic() {\n ForegroundTask task = Tasks.foregroundTask()\n .withBudget(Budgets.iterationBudget()\n .withMaxIterations(5)\n .withInitialDelay(Duration.ZERO)\n .withInterval(Duration.ofSeconds(1))\n .build())\n .build();\n\n task.run(this::taskPredicateWithDeterministicStop, Integer.valueOf(3));\n assertEquals(3, taskCount);\n }", "@Test\n public void testMaybeScheduleStartAlarmLocked_Ej_SmallRollingQuota() {\n // saveTimingSession calls maybeScheduleCleanupAlarmLocked which interferes with these tests\n // because it schedules an alarm too. Prevent it from doing so.\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked_Ej_SRQ\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n setStandbyBucket(WORKING_INDEX);\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs = mQcConstants.EJ_LIMIT_WORKING_MS - contributionMs;\n\n // Session straddles edge of bucket window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), true);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 23 * HOUR_IN_MILLIS, remainingTimeMs, 2), true);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 24 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime =\n now + HOUR_IN_MILLIS + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, WORKING_INDEX);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }", "@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }" ]
[ "0.70928293", "0.5861567", "0.5733028", "0.57216704", "0.5704452", "0.5676888", "0.5674124", "0.5670762", "0.56065404", "0.55555034", "0.55435616", "0.5478035", "0.5460195", "0.54589826", "0.5435906", "0.5404873", "0.53953683", "0.5372847", "0.5372847", "0.5367414", "0.5365028", "0.5347392", "0.5347238", "0.53455544", "0.53400606", "0.53386277", "0.5331691", "0.5315505", "0.53025246", "0.52997816", "0.5291291", "0.5266493", "0.5260663", "0.5256772", "0.52504843", "0.5241142", "0.5236503", "0.5227183", "0.5196334", "0.51803946", "0.5176994", "0.5165425", "0.5164468", "0.516302", "0.51568073", "0.51553315", "0.5151464", "0.5151239", "0.51495606", "0.5146229", "0.5132807", "0.51257885", "0.5120869", "0.5115037", "0.51051724", "0.51025766", "0.5102359", "0.5101333", "0.50997514", "0.50991726", "0.50908107", "0.5089994", "0.5088754", "0.5070819", "0.50649965", "0.5062772", "0.5058029", "0.505604", "0.50414246", "0.5040302", "0.50384927", "0.5037858", "0.50341934", "0.5032004", "0.50285447", "0.5028472", "0.50265795", "0.50089836", "0.5008137", "0.49987465", "0.4991857", "0.49911332", "0.49894425", "0.49872598", "0.49870458", "0.4975583", "0.49705058", "0.49678093", "0.49622226", "0.496112", "0.49608767", "0.4957374", "0.49473688", "0.49452925", "0.4942428", "0.49402013", "0.49299908", "0.49274462", "0.4924652", "0.4924212" ]
0.66487014
1
Don't run the next slice
private void unscheduleSlice() { nextSliceRunTime = Double.MAX_VALUE; timer.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void nextSlice() {\n\t\tfinal int nextIndex = \n\t\t\t\t((mBuffer[mLimit]&0xff)<<24) + ((mBuffer[1+mLimit]&0xff)<<16) + \n\t\t\t\t((mBuffer[2+mLimit]&0xff)<<8) + (mBuffer[3+mLimit]&0xff);\n\n\t\tmLevel = BytePool.nextLevelArray[mLevel];\n\t\tfinal int newSize = BytePool.levelSizeArray[mLevel];\n\n\t\tmBufferUpto = nextIndex / BytePool.BYTE_BLOCK_SIZE;\n\t\tmBufferOffset = mBufferUpto * BytePool.BYTE_BLOCK_SIZE;\n\n\t\tmBuffer = mPool.getBufferAt(mBufferUpto);\n\t\tmUpto = nextIndex & BytePool.BYTE_BLOCK_MASK;\n\n\t\tif (nextIndex + newSize >= mEndIndex) {\n\t\t\t// We are advancing to the final slice\n\t\t\tassert mEndIndex - nextIndex > 0;\n\t\t\tmLimit = mEndIndex - mBufferOffset;\n\t\t} else {\n\t\t\t// This is not the final slice (subtract 4 for the\n\t\t\t// forwarding address at the end of this new slice)\n\t\t\tmLimit = mUpto+newSize-4;\n\t\t}\n\t}", "private void maybeScheduleSlice() {\n if (nextSliceRunTime > 0) {\n timer.schedule();\n nextSliceRunTime = 0;\n }\n }", "private void maybeScheduleSlice(double when) {\n if (nextSliceRunTime > when) {\n timer.schedule(when);\n nextSliceRunTime = when;\n }\n }", "public abstract void onLoadMore(int skipStart);", "public void beginSlice() throws IOException {}", "public boolean eliminateLoop(){ return false; }", "public void skip()\n {\n skip(1);\n }", "@Override\r\n\tpublic Buffer slice(int start, int end) {\n\t\t\r\n\t\treturn null;\r\n\t}", "void skip();", "protected void checkSlice(int slice) {\n\tif (slice < 0 || slice >= slices) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at slice=\"+slice);\n}", "void startIndexing();", "@Override\n public boolean step() {\n return false;\n }", "public void endSlice() throws IOException {}", "@Override\n\tpublic void skip() {\n\t}", "private void startHeavyLifting(int first, int count)\n {\n }", "public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public void run()\n\t{\n\t\tthis.partition();\n\t}", "private static boolean sliceIsValid(final int[] slice, final int flowOrderLength) {\n int consecutiveZeros = 0;\n for ( int key : slice ) {\n if ( key != 0 ) {\n consecutiveZeros = 0;\n } else {\n consecutiveZeros++;\n if ( consecutiveZeros >= (flowOrderLength - 1) ) {\n return false;\n }\n }\n }\n\n // if here, not found -> valid\n return true;\n }", "Buffer slice();", "public abstract void blockNext();", "protected void runBeforeIteration() {}", "public boolean drill(int edge, int layer, int slice, int flags) throws EdgeOutOfRangeException, LayerOutOfRangeException, SliceOutOfRangeException, DataDirectorException {\n return true;\n }", "public ByteBuf slice(int index, int length)\r\n/* 65: */ {\r\n/* 66: 82 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 67: 83 */ return super.slice(index, length);\r\n/* 68: */ }", "void skip(int n);", "@Test\n\tpublic void testGetSlice() {\n\t}", "public void skip(){\n if (!this.hasNext()) return;\n \n this.checkNext();\n \n if (!this.allStatesIterator.hasNext()){\n this.allStatesIterator = new IntegerIterator(1);\n this.allStatesIterator.skip();\n \n if(!this.allSubsetsIterator.hasNext()){\n this.allSubsetsIterator = new SubsetIterator(this.numberOfStates);\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n this.currentTransitions = this.allTransitionsIterator.next();\n }\n else{\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n }\n }\n else{\n this.currentInitialStateId = this.allStatesIterator.next();\n }\n }", "protected boolean advance()\n/* */ {\n/* 66 */ while (++this.m_offset < this.m_array.length) {\n/* 67 */ if (this.m_array[this.m_offset] != null) {\n/* 68 */ return true;\n/* */ }\n/* */ }\n/* 71 */ return false;\n/* */ }", "@Override\n public void run() {\n if (mImagePagerAdapter.getImageIdList().size() > 0) {\n if (i == 0) {\n i = 1;\n viewPager.setInterval(2000);\n viewPager.startAutoScroll();\n }\n }\n }", "@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}", "public ByteBuf slice()\r\n/* 59: */ {\r\n/* 60: 76 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 61: 77 */ return super.slice();\r\n/* 62: */ }", "public boolean changeEdgeCurrentSlice(int edge, int slice) throws EdgeOutOfRangeException, SliceOutOfRangeException, DataDirectorException {\n if (slice < 0 || slice >= pageCount)\n return false;\n currentPage = slice;\n //m_fetchedRowCount = 0;\n return true;\n }", "public void skip(int factor)\n {\n int length = this.getMorphCount();\n this.resetTime();\n\n if (length == 0)\n {\n return;\n }\n\n if (factor > 0)\n {\n this.index = length - 1;\n }\n else if (factor < 0)\n {\n this.index = -1;\n }\n }", "@Override\n public void run() {\n if (mItem != 0) {\n\n if (isFrist == true) {\n mCurrentItem = 0;\n isFrist = false;\n } else {\n if (mCurrentItem == bannerListView.size() - 1) {\n mCurrentItem = 0;\n } else {\n mCurrentItem++;\n }\n }\n viewpager.setCurrentItem(mCurrentItem);\n }\n viewpager.postDelayed(mPagerAction, 2500);\n }", "public abstract void unblockNext();", "@Override\n public boolean hasNext() {\n return curIndex < maxIndex || super.hasNext();\n }", "public int eatSlice() {\n System.out.println(\"You ate one slice of pizza\");\n this.slices -= 1;\n return this.slices;\n }", "private void checkForNullSlices(final JSONObject album, JSONObject slice, ArrayList<AlbumSlice> slices) throws JSONException, ExecutionException, InterruptedException {\n if(slice.getString(\"slice_url\").equals(\"null\")\n && slice.getInt(\"user\") == UserSessionDetails.user_id) {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n //createAlbumOnDropbox(album.getString(\"name\"));\n //String sharedLink = getSharedLink(\"/\" + album.getString(\"name\") + \"/\" + \"catalog.txt\");\n String sharedLink = album.get(\"name\") + \"/\" + UserSessionDetails.user_id;\n registerSharedLinkOnCentralServer(album.getInt(\"id\"), sharedLink);\n } catch (JSONException | InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n } else {\n slices.add(new AlbumSlice(slice.getInt(\"user\"), new Url(slice.getString(\"slice_url\"))));\n }\n }", "@Test\n\tpublic void testSetSliceWithoutUpdate() {\n\t}", "@Override\n public Spliterator<SampleDescriptor> trySplit() {\n Spliterator<SampleDescriptor> retVal;\n // If there is only one sample left we don't split.\n int remaining = this.samples.size() - this.pos;\n if (remaining <= 1)\n retVal = null;\n else {\n // Compute the size for the entire list. This will be our running total of the size of the\n // remaining samples.\n long total = this.length();\n // Set up the new list.\n List<SampleDescriptor> newList = new ArrayList<SampleDescriptor>(remaining - 1);\n long newTotal = 0;\n // Loop until the old list is almost empty or it is smaller or equal to the new list, moving samples\n // from the end of the old list to the beginning of the new list.\n for (int tail = this.samples.size() - 1; tail > this.pos && newTotal < total; tail--) {\n // Move the last element in the old list to the new list.\n SampleDescriptor popped = this.samples.remove(tail);\n newList.add(popped);\n // Adjust the lengths.\n long len = popped.estimatedSize();\n total -= len;\n newTotal += len;\n }\n // Create a spliterator from the new list.\n retVal = new Splitter(newList);\n }\n return retVal;\n }", "@Override\n public boolean tryAdvance(Consumer<? super SampleDescriptor> action) {\n boolean retVal;\n if (pos < samples.size()) {\n // Here we have another sample to process.\n retVal = true;\n action.accept(samples.get(pos));\n pos++;\n } else {\n // Denote we are at the end.\n retVal = false;\n }\n return retVal;\n }", "@Override public void run() {\n\t\t\t// Handle the base case:\n\t\t\tif(len - start < 2) {\n\t\t\t\t// Arrive at the base-case state & return:\n\t\t\t\tph.arrive();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TODO: Select an optimal pivot point:\n\t\t\tint pivot = start;\n\n\t\t\t// Perform the necessary swap operations:\n\t\t\tfor(int i = start; i < len; ++i) {\n\t\t\t\tif(data[i] < data[pivot]) {\n\t\t\t\t\tint tmp = data[pivot];\n\t\t\t\t\tdata[pivot] = data[i];\n\t\t\t\t\tdata[i] = data[pivot + 1];\n\t\t\t\t\tdata[pivot + 1] = tmp;\n\t\t\t\t\t++pivot;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle the single-threaded case:\n\t\t\tif(this.pool == null) {\n\t\t\t\t// Store local variables temporarily:\n\t\t\t\tint start = this.start;\n\t\t\t\tint len = this.len;\n\n\t\t\t\t// Do the first half:\n\t\t\t\tthis.len = pivot;\n\t\t\t\trun();\n\n\t\t\t\t// Prepare for the second half of the array:\n\t\t\t\tthis.len = len;\n\t\t\t} else {\n\t\t\t\t\t// Register a task to process the first half of the array:\n\t\t\t\t\t// TODO: Don't do this if that thread's base-case is met\n\t\t\t\t\tpool.submit(new Sorter(this.pool, this.ph, data, start, pivot));\n\t\t\t}\n\n\t\t\t// Recursively process the second half of the array:\n\t\t\tstart = pivot + 1;\n\t\t\trun();\n\t\t}", "public boolean hasNext()\n/* */ {\n/* 73 */ return this.m_offset < this.m_limit;\n/* */ }", "public void nextHard() {\n\t\titerator.next();\n\t}", "public static void sliceTo4x4(final Context context, final onSuccessLoadBitmap onSuccessLoadBitmap, String imageUrl) {\n\n new ConvertUrlToBitmap().execute(imageUrl);\n\n final Handler handler = new Handler();\n Runnable runnable = new Runnable() {\n\n @Override\n public void run() {\n try{\n //do your code here\n System.out.println(bitmapList.size());\n if(bitmapList.size()==16)onSuccessLoadBitmap.onSliceSuccess(bitmapList);\n }\n catch (Exception e) {\n\n }\n finally{\n //also call the same runnable to call it at regular interval\n if(!downloadselesai)handler.postDelayed(this, 1000);\n }\n }\n };\n handler.post(runnable);\n\n /*\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample11));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample12));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample13));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample14));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample21));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample22));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample23));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample24));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample31));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample32));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample33));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample34));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample41));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample42));\n bitmapList.add(UtilKt.toBitmap(context, R.drawable.sample43));*/\n\n\n\n\n }", "private synchronized void loadSecondaryBlock(boolean next) {\n int step = (next) ? 1 : -2;\n if ((currentBlock + step) < 0) return;//return early if we are already at the beginning\n Controller.INSTANCE.run(() -> {\n String content = fullContent.get(currentBlock) + fullContent.get(currentBlock + step);\n mine.setContent(content);\n return Unit.INSTANCE;\n });\n }", "private final void m139911a(RecyclerView.Recycler recycler) {\n View view;\n View view2;\n Iterator it = C32598n.m150608b(0, getItemCount()).iterator();\n while (it.hasNext()) {\n int nextInt = ((IntIterator) it).nextInt();\n View viewForPosition = recycler.getViewForPosition(nextInt);\n C32569u.m150513a((Object) viewForPosition, C6969H.m41409d(\"G7B86D603BC3CAE3BA809955CC4ECC6C04F8CC72AB023A23DEF019E00E2EAD0DE7D8ADA14F6\"));\n addView(viewForPosition);\n measureChildWithMargins(viewForPosition, 0, 0);\n int decoratedMeasuredWidth = getDecoratedMeasuredWidth(viewForPosition);\n int decoratedMeasuredHeight = getDecoratedMeasuredHeight(viewForPosition);\n if (this.f101761k) {\n removeAndRecycleView(viewForPosition, recycler);\n } else if (this.f101753c < this.f101754d) {\n if (this.f101762l && (view2 = this.f101763m) != null) {\n this.f101762l = false;\n if (view2 == null) {\n C32569u.m150511a();\n }\n m139910a(view2, this.f101764n, this.f101765o);\n this.f101763m = null;\n }\n if (this.f101753c == this.f101754d - 1 && this.f101756f + decoratedMeasuredWidth + this.f101759i > getWidth()) {\n this.f101761k = true;\n removeAndRecycleView(viewForPosition, recycler);\n } else if (nextInt == getItemCount() - 1 || nextInt == getItemCount() - 2) {\n if (this.f101756f + decoratedMeasuredWidth + this.f101759i < getWidth()) {\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n } else if (this.f101756f + decoratedMeasuredWidth + this.f101759i > getWidth() && this.f101756f + decoratedMeasuredWidth < getWidth()) {\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n m139909a(decoratedMeasuredHeight);\n this.f101757g = this.f101755e + this.f101758h;\n } else if (this.f101756f + decoratedMeasuredWidth > getWidth()) {\n m139909a(decoratedMeasuredHeight);\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n }\n } else if (this.f101756f + decoratedMeasuredWidth <= getWidth()) {\n m139910a(viewForPosition, decoratedMeasuredWidth, decoratedMeasuredHeight);\n } else if (this.f101753c != this.f101754d - 1) {\n m139909a(decoratedMeasuredHeight);\n this.f101762l = true;\n this.f101763m = viewForPosition;\n this.f101764n = decoratedMeasuredWidth;\n this.f101765o = decoratedMeasuredHeight;\n }\n } else if (this.f101762l && (view = this.f101763m) != null) {\n if (view == null) {\n C32569u.m150511a();\n }\n removeAndRecycleView(view, recycler);\n this.f101762l = false;\n this.f101763m = null;\n }\n }\n }", "public abstract void startArray();", "public static boolean shouldProcessSlice(OBSlice x) throws Exception {\n return x.size() <= maxSliceSize;\n }", "@Override\n\tpublic void removeFromBeginning() {\n\t}", "private void run() {\n List<Point> points = Arrays.asList(this.points);\n Collections.sort(points);\n for (int i=0; i < points.size(); i++) {\n Point p0 = points.get(i);\n List<Point> cp = new ArrayList<>(points); // clone\n Collections.sort(cp, p0.SLOPE_ORDER);\n for (int s=0, e; s < cp.size(); s=e) {\n for (e=s; e < cp.size() && p0.SLOPE_ORDER.compare(cp.get(s) , cp.get(e)) == 0; e++);\n if (e-s+1>= 4) {\n List<Point> r = new ArrayList<>(cp.subList(s, e));\n r.add(p0);\n Collections.sort(r);\n if (r.get(0).equals(p0)) {\n Point[] ret = r.toArray(new Point[e-s+1]);\n StdOut.println(this.toString(ret));\n this.drawLine(ret);\n }\n }\n }\n }\n }", "private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }", "protected abstract void recombineNext();", "protected void runBeforeIterations() {}", "protected int _sliceOffset(int absRank) {\n\treturn absRank;\n}", "public ByteBuf retainedSlice(int index, int length)\r\n/* 77: */ {\r\n/* 78: 94 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 79: 95 */ return super.retainedSlice(index, length);\r\n/* 80: */ }", "public void startOver() {\n this.pagesRead = 0;\n }", "private static void test() {\n\t\tint i = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[++i] = 0;\n\t\tprintArray(arr);\n\t\ti = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[i++] = 0;\n\t\tprintArray(arr);\n\t\t\n\t}", "public boolean take();", "private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }", "@Override\n protected long skip0(@Positive long count) throws IOException {\n int countI = (int) min(count, this.delegate.remaining());\n PNioBuffers.skipForRead(this.delegate, countI); //count is always at least 1L, so it'll always be valid\n return countI;\n }", "public ByteBuf readSlice(int length)\r\n/* 101: */ {\r\n/* 102:118 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 103:119 */ return super.readSlice(length);\r\n/* 104: */ }", "public Spliterator<T> trySplit() {\n/* 1309 */ HoldingConsumer<? super T> holdingConsumer = new HoldingConsumer();\n/* 1310 */ long l = this.est;\n/* 1311 */ if (l > 1L && tryAdvance(holdingConsumer)) {\n/* 1312 */ int i = this.batch + 1024;\n/* 1313 */ if (i > l)\n/* 1314 */ i = (int)l; \n/* 1315 */ if (i > 33554432)\n/* 1316 */ i = 33554432; \n/* 1317 */ Object[] arrayOfObject = new Object[i];\n/* 1318 */ byte b = 0; \n/* 1319 */ do { arrayOfObject[b] = holdingConsumer.value; } while (++b < i && tryAdvance(holdingConsumer));\n/* 1320 */ this.batch = b;\n/* 1321 */ if (this.est != Long.MAX_VALUE)\n/* 1322 */ this.est -= b; \n/* 1323 */ return new Spliterators.ArraySpliterator<>(arrayOfObject, 0, b, characteristics());\n/* */ } \n/* 1325 */ return null;\n/* */ }", "@Override\n public void start() {\n if (size > 0) {\n cursor = head;\n prev = null;\n } else {\n cursor = null; }\n }", "public void skip() {\t\n\t\tif(nItems < 2) {\n\t\t\treturn;\n\t\t}\n\t\tCustomer temp = new Customer(queArray[front].getName(), queArray[front].getPartySize());\n\t\tqueArray[front] = queArray[front+1];\n\t\tqueArray[front+1] = temp;\n\t}", "private boolean zzRefill() {\r\n\t\treturn zzCurrentPos>=s.offset+s.count;\r\n\t}", "void loadNext();", "private void firstNetworkCall() {\n startIndex = 0;\n getBlockListNetworkCall(getActivity(), startIndex, maxItems);\n }", "private boolean zzRefill() {\n\t\treturn zzCurrentPos>=s.offset+s.count;\n\t}", "private boolean zzRefill() {\n\t\treturn zzCurrentPos>=s.offset+s.count;\n\t}", "private void doFirstRow(){\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\n\t}", "private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n if (!currentIterator.hasNext()) {\n // we want advance to next iterator only when this iterator is exhausted\n if (index < intMaps.length - 1) {\n // we can advance to next iterator only if currentIterator is not the last iterator\n ++index;\n if (!fetched[index]) {\n GetAllCustomMap.this.fetchValuesForIndex(index);\n }\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n // we can not advance to next iterator because this iterator is the last iterator\n }\n } else {\n // we do not want to advance to next iterator because this iterator is not fully exhausted\n }\n }\n }", "public void run() {\n getPage(page + 1, false);\n }", "@Override\n public void unDraw() {\n index--;\n }", "public void skipPrint()\n {\n skipPrint(0);\n }", "public void partition();", "@Override\r\n\tpublic void skip() {\n\t\tSystem.out.println(\"Skip\");\r\n\t}", "protected void iteration() {\n\t\t\tmHandler.removeCallbacks(mIteration);\n\t\t\tif (mVisible) {\n\t\t\t\tmHandler.postDelayed(mIteration, 1000 / 25);\n\t\t\t}\n\t\t}", "private boolean notTooManySkips(ArrayList<Integer> jValues)\r\n\t{\r\n\t\tint length = jValues.size();\r\n\t\tint span = jValues.get(jValues.size() - 1) - jValues.get(0) + 1;\r\n\r\n\t\treturn span - length <= MAX_SKIPS;\r\n\t}", "void seekToFirst();", "protected Sampler nextIsASampler(Sampler element) throws NextIsNullException {\n incrementCurrent();\n return element;\n }", "public abstract int start(int i);", "public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }", "Buffer slice(int start, int length);", "default Spliterator.OfInt getNextVertices(int vidx) {\n class MySpliterator extends AbstractIntSpliterator{\n int index;\n int limit;\n public MySpliterator (int vidx, int lo, int hi) {\n super(hi,ORDERED|NONNULL|SIZED|SUBSIZED);\n limit=hi;\n index=lo;\n }\n @Override\n public boolean tryAdvance(@Nonnull IntConsumer action) {\n if (index<limit) {\n action.accept(getNext(vidx,index++));\n return true;\n }\n return false;\n }\n @Nullable\n public MySpliterator trySplit() {\n int hi = limit, lo = index, mid = (lo + hi) >>> 1;\n return (lo >= mid) ? null : // divide range in half unless too small\n new MySpliterator(vidx, lo, index = mid);\n }\n \n }\n return new MySpliterator(vidx,0,getNextCount(vidx));\n }", "@Test\n public void test8() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1354,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test8\");\n Integer[] integerArray0 = new Integer[9];\n ResettableListIterator<Integer> resettableListIterator0 = IteratorUtils.arrayListIterator(integerArray0);\n assertEquals(true, resettableListIterator0.hasNext());\n }", "private static void iterator() {\n\t\t\r\n\t}", "private void doNextRow(){\n\t\tmove();\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\t\n\t}", "public boolean next() {\n\t\twhile (true)\n\t\t{\n\t\t\tif (cp.next()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tif (atLaskChunk())\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"AtLastChunk\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tmoveTo(currentChunkNum + 1);\n\t\t}\n\t}", "private final void m75324a(SectionResponse sectionResponse) {\n int i = 0;\n if (!sectionResponse.paging.hasPrevious) {\n this.f53730h = false;\n }\n if (!sectionResponse.paging.hasNext) {\n this.f53731i = false;\n }\n switch (C15272b.f53896a[this.f53741t.ordinal()]) {\n case 1:\n this.f53730h = sectionResponse.paging.hasPrevious;\n this.f53731i = sectionResponse.paging.hasNext;\n this.f53728f.clear();\n this.f53733k = false;\n List<Section> list = sectionResponse.sectionList;\n C32569u.m150513a((Object) list, C6969H.m41409d(\"G7B86C60AB03EB82CA81D954BE6ECCCD9458AC60E\"));\n int i2 = 0;\n for (T t : list) {\n if (!this.f53730h && i2 == 0) {\n t.chapter.isFirst = true;\n }\n C32569u.m150513a((Object) t, C6969H.m41409d(\"G7A86D60EB63FA5\"));\n m75323a((Section) t, sectionResponse);\n i2++;\n }\n m75349e().notifyDataSetChanged();\n Iterator<T> it = this.f53728f.iterator();\n int i3 = 0;\n while (true) {\n if (it.hasNext()) {\n T next = it.next();\n if (!(!C32569u.m150517a((Object) this.f53727e, (Object) C6969H.m41409d(\"G6E8FDA18BE3C9420E216\")))) {\n if (!(next instanceof Section) || !next.learningRecord.isLastLearned) {\n i3++;\n } else {\n i = i3;\n }\n }\n }\n }\n ((RecyclerView) mo78146a(R.id.recyclerView)).scrollToPosition(i);\n break;\n case 2:\n ArrayList arrayList = new ArrayList();\n List<Section> list2 = sectionResponse.sectionList;\n C32569u.m150513a((Object) list2, C6969H.m41409d(\"G7B86C60AB03EB82CA81D954BE6ECCCD9458AC60E\"));\n int i4 = 0;\n for (T t2 : list2) {\n if (!this.f53730h && i4 == 0) {\n t2.chapter.isFirst = true;\n }\n Boolean bool = t2.isFirst;\n C32569u.m150513a((Object) bool, C6969H.m41409d(\"G7A86D60EB63FA567EF1DB641E0F6D7\"));\n if (bool.booleanValue() && sectionResponse.extra.showChapterName) {\n Chapter chapter = t2.chapter;\n C32569u.m150513a((Object) chapter, C6969H.m41409d(\"G7A86D60EB63FA567E5069158E6E0D1\"));\n arrayList.add(chapter);\n }\n C32569u.m150513a((Object) t2, C6969H.m41409d(\"G7A86D60EB63FA5\"));\n arrayList.add(t2);\n i4++;\n }\n this.f53728f.addAll(0, arrayList);\n m75349e().notifyItemRangeInserted(0, arrayList.size());\n break;\n case 3:\n int size = this.f53728f.size();\n List<Section> list3 = sectionResponse.sectionList;\n C32569u.m150513a((Object) list3, C6969H.m41409d(\"G7B86C60AB03EB82CA81D954BE6ECCCD9458AC60E\"));\n for (T t3 : list3) {\n C32569u.m150513a((Object) t3, C6969H.m41409d(\"G7A86D60EB63FA5\"));\n m75323a((Section) t3, sectionResponse);\n }\n m75349e().notifyItemRangeInserted(size, this.f53728f.size() - size);\n break;\n }\n if (!(TextUtils.isEmpty(sectionResponse.extra.updateText) || C32569u.m150517a((Object) this.f53735m, (Object) C6969H.m41409d(\"G7A8FDC19BA\")) || this.f53733k)) {\n if (!sectionResponse.paging.hasNext) {\n List<Object> list4 = this.f53728f;\n String str = sectionResponse.extra.updateText;\n C32569u.m150513a((Object) str, C6969H.m41409d(\"G7B86C60AB03EB82CA80B885CE0E48DC27987D40EBA04AE31F2\"));\n list4.add(str);\n this.f53733k = true;\n }\n m75349e().notifyItemRangeInserted(this.f53728f.size(), 1);\n }\n }", "public void nextSet(){\n this.fillVector();\n }", "protected void clearRangeTest() {\n\tneedRangeTest = false;\n }", "@SuppressWarnings(\"unused\")\n\tvoid example15() {\n\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// the trimmed list has length 2,000 and is indexed from 0 to 1,999 returning data from\n\t\t// locations 1,000 - 2,999 in the original list.\n\t\t\n\t}", "public void linearize() {\r\n Object[] temp = new Object[size];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n }", "@SuppressWarnings(\"unused\")\n\tvoid example17() {\n\t\t\n\t\t// make a list of 10,000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> original =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.FLT.construct(), 10000);\n\n\t\t// make a list that is a subset of the previous list (numbers from locations 1,000 - 2,999)\n\t\t\n\t\tIndexedDataSource<Float32Member> trimmed = new TrimmedDataSource<>(original, 1000, 2000);\n\t\t\n\t\t// then create a new memory copy of those 2000 numbers\n\t\t\n\t\tIndexedDataSource<Float32Member> theCopy = DeepCopy.compute(G.FLT, trimmed);\n\t}", "protected boolean hasNextStep() {\n\t\treturn iteration == 0;\n\t}", "boolean isAutoSkip();", "protected abstract boolean computeHasNext();", "private void compactIfNeeded() {\n\n // if the scan point is more than 25% into the buffer, compact...\n if( buffer.position() >= (buffer.capacity() >> 2 ) ) {\n int newLimit = buffer.limit() - buffer.position();\n buffer.compact();\n buffer.position( 0 );\n buffer.limit( newLimit );\n }\n }", "@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }", "@Override\n public void run() {\n Collection<Model> temp = generate(currentPage, 10);\n\n //Remove progress model_item\n mModel.remove(mModel.size() - 1);\n adapter.notifyItemRemoved(mModel.size() - 1);\n\n //Update model and view\n mModel.addAll(temp);\n adapter.setLoaded();\n //Not effective but suitable for demonstration\n adapter.notifyDataSetChanged();\n }" ]
[ "0.670998", "0.6542609", "0.5852959", "0.58069205", "0.5773396", "0.5741341", "0.56914496", "0.5687896", "0.5681969", "0.553246", "0.54884136", "0.54277843", "0.5412626", "0.536727", "0.5367251", "0.5366416", "0.53402954", "0.532512", "0.52810043", "0.5240061", "0.52389574", "0.5221898", "0.5213151", "0.5196488", "0.5194328", "0.5193214", "0.51888907", "0.5170273", "0.51687145", "0.51545405", "0.5137829", "0.51192725", "0.5111349", "0.5107255", "0.5102141", "0.5098086", "0.5071037", "0.5068311", "0.50659025", "0.50657797", "0.50426257", "0.50364363", "0.5035324", "0.50322056", "0.5020647", "0.5013493", "0.50098324", "0.5009763", "0.5004478", "0.5004455", "0.49965003", "0.49941057", "0.49929684", "0.4992924", "0.49928564", "0.49910071", "0.49881095", "0.49608544", "0.49591526", "0.49539277", "0.49530315", "0.49469307", "0.49359098", "0.49299136", "0.49287215", "0.49268183", "0.4926319", "0.49250522", "0.49250522", "0.49207872", "0.49187323", "0.49092487", "0.49075776", "0.4904938", "0.49030071", "0.4902951", "0.4899146", "0.48988223", "0.4892578", "0.48921207", "0.48890468", "0.48850733", "0.48818898", "0.48807335", "0.4878294", "0.4874155", "0.486221", "0.48599973", "0.48567113", "0.48551154", "0.4854092", "0.48525447", "0.48517147", "0.484731", "0.48429763", "0.48403135", "0.4838038", "0.483672", "0.48289979", "0.48230982" ]
0.631396
2
/ Code from template association_GetOne
public Customer getCustomer() { return customer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TypeAssociation getAssocieCommeObjetAdresse();", "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Person\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tIterator i = results.iterator();\r\n\t\tPerson result = (Person)i.next();\r\n\t\ttoXML(result);\r\n\t\tPerson result2 = (Person)fromXML(result);\r\n\t\t\r\n\t\tassertNotNull(result2);\r\n\t\tassertNotNull(result2.getId().getExtension()); \r\n\t\tassertEquals(II_ROOT_GLOBAL_CONSTANT_VALUE,result2.getId().getRoot());\r\n\t\tassertNotNull(result2.getName());\r\n\t\t\r\n\t\tAddress address = result2.getLivesAt();\r\n\t\tassertNotNull(address);\r\n\t\tassertNotNull(address.getId());\r\n\t\tassertNotNull(address.getZip());\r\n\t\tassertEquals(\"1\",address.getId().getExtension());\r\n\t}", "@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}", "public tudresden.ocl20.core.jmi.uml15.core.Association getAssociation()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{ \t\t\n \t\treturn instance.getAssociation(this.refMofId());\n \t} \n \t\n\t\treturn super_getAssociation();\t\n }", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public T caseAssocRelationshipDefinition(AssocRelationshipDefinition object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "public String getAssociationId() {\n return this.associationId;\n }", "Optional<HousingAssociation> findOne(Long id);", "FetchFirst createFetchFirst();", "public String getAssociatedObject() {\n return associatedObject;\n }", "@Test\n public void testAssocOneWithNullAssoc() {\n\n Database server = DB.getDefault();\n\n final ProductConfiguration pc = new ProductConfiguration();\n pc.setName(\"PC1\");\n server.save(pc);\n\n CalculationResult r = new CalculationResult();\n final Double charge = 100.0;\n r.setCharge(charge);\n r.setProductConfiguration(pc);\n r.setGroupConfiguration(null);\n server.save(r);\n }", "public Shipping3VO findByPk(Integer pk, boolean fetchRelation1) {\r\n\t\ttry {\r\n\t\t\treturn (Shipping3VO) entityManager.createQuery(FIND_BY_PK(fetchRelation1)).setParameter(\"pk\", pk)\r\n\t\t\t\t\t.getSingleResult();\r\n\t\t} catch (NoResultException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "TypeAssociation getAssocieCommeObjetAction();", "private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "public void testOneAssociatedObjectNestedSearch2() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Address\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tIterator i = results.iterator();\r\n\t\t\r\n\t\tAddress result = (Address)i.next();\r\n\t\ttoXML(result);\r\n\t\tAddress result2 = (Address)fromXML(result);\r\n\t\t\r\n\t\tassertNotNull(result2);\r\n\t\tassertNotNull(result2.getId().getExtension()); \r\n\t\tassertEquals(II_ROOT_GLOBAL_CONSTANT_VALUE,result2.getId().getRoot());\r\n\t\tassertNotNull(result2.getZip());\r\n\t\tassertEquals(\"1\",result2.getId().getExtension());\r\n\t}", "@Override\r\n\tpublic Invigilate getOne(Integer no) {\n\t\treturn invigilateMapper.selectByPrimaryKey(no);\r\n\t}", "public A getFirst() { return first; }", "@Override\r\n\tpublic OrderInfo selectOne() {\n\t\treturn null;\r\n\t}", "public interface ClinicRepository extends JpaRepository<Clinic,Long> {\n\n @Query(\"select distinct clinic from Clinic clinic left join fetch clinic.diagnostics left join fetch clinic.metros left join fetch clinic.specialitys\")\n List<Clinic> findAllWithEagerRelationships();\n\n @Query(\"select clinic from Clinic clinic left join fetch clinic.diagnostics left join fetch clinic.metros left join fetch clinic.specialitys where clinic.id =:id\")\n Clinic findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n Optional<Clinic> findOneByDocdocId(Long docdocId);\n\n}", "@SuppressWarnings( \"unchecked\" )\n public static <T> AssociationFunction<T> association( Association<T> association )\n {\n return ( (AssociationReferenceHandler<T>) Proxy.getInvocationHandler( association ) ).association();\n }", "@Test\n public void testConvertPhenotypeAssociation() {\n assertThat( searchService.loadValueObject( SearchResult.from( PhenotypeAssociation.class, phenotypeAssociation, 1.0, \"test object\" ) ) )\n .extracting( \"resultObject\" )\n .isSameAs( phenotypeAssociation );\n assertThat( searchService.loadValueObjects( Collections.singleton( SearchResult.from( PhenotypeAssociation.class, phenotypeAssociation, 1.0, \"test object\" ) ) ) )\n .extracting( \"resultObject\" )\n .containsExactly( phenotypeAssociation );\n }", "public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}", "public Reference individual() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_INDIVIDUAL);\n }", "public Author getAuthorProfile(int authorId);", "@SuppressWarnings(\"unchecked\")\r\n public <T> T loadAssociation(Object bean, Association association) {\r\n // check if target property is set\r\n String targetAlias = association.getAlias();\r\n TypedField targetTf = FieldUtils.getBeanTypedField(bean.getClass(), targetAlias);\r\n if(targetTf == null) {\r\n return null;\r\n }\r\n Object value;\r\n try {\r\n value = targetTf.get(bean);\r\n if (value != null) { // if value is set, returns\r\n return (T) value;\r\n } else if (bean instanceof Updatable) {\r\n Set<String> changed = ((Updatable) bean).changed();\r\n if (changed != null && changed.contains(targetTf.getName())) {\r\n return null;\r\n }\r\n }\r\n\r\n Class<?> klass = targetTf.getPropertyType();\r\n\r\n Relation[] relations = association.getRelations();\r\n List<Condition> restrictions = new ArrayList<>();\r\n for (Relation relation : relations) {\r\n // from source FK\r\n String fkAlias = relation.getFrom().getColumn().getAlias();\r\n TypedField tf = FieldUtils.getBeanTypedField(bean.getClass(), fkAlias);\r\n if(tf != null) {\r\n value = tf.get(bean);\r\n restrictions.add(relation.getTo().getColumn().is(Definition.raw(value)));\r\n }\r\n }\r\n\r\n Query query = query(association.getTableTo()).all()\r\n .where(restrictions);\r\n if (Collection.class.isAssignableFrom(klass)) {\r\n Class<?> genKlass = FieldUtils.getTypeGenericClass(targetTf.getType());\r\n value = query.list(genKlass);\r\n if (Set.class.isAssignableFrom(klass)) {\r\n value = new LinkedHashSet<Object>((Collection<?>) value);\r\n } else if (List.class.isAssignableFrom(klass)) {\r\n value = new ArrayList<Object>((Collection<?>) value);\r\n }\r\n } else {\r\n value = query.select(klass);\r\n }\r\n\r\n targetTf.set(bean, value);\r\n\r\n } catch (Exception ex) {\r\n throw new PersistenceException(\"Unable to retrieve association \" + association + \" for \" + bean, ex);\r\n }\r\n\r\n return (T) value;\r\n }", "int getOtherId();", "abstract public Assoc getAssoc();", "@Override\n\tpublic Map<String, Object> findOne(Long arg0) {\n\t\treturn null;\n\t}", "public void GetOneItem( Standard_Transient anentity) {\n OCCwrapJavaJNI.Interface_EntityIterator_GetOneItem(swigCPtr, this, Standard_Transient.getCPtr(anentity) , anentity);\n }", "public Association association(ComplexEObject ceo)\n {\n if (_inverseFieldName == null)\n {\n return new Association(this, ceo);\n }\n else\n {\n return new Association(this, ceo, inverseField());\n }\n }", "EReference getAnEReference();", "public String getOneOrMany()\n\t{\n\t\treturn oneOrMany;\n\t}", "@Override\n\t\tpublic Relationship getSingleRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}", "public Object getId1() {\n return this.getId();\n }", "@Override\r\n\tpublic Optional<Producto> getOne(Producto entity) throws Exception {\n\t\treturn null;\r\n\t}", "public T caseIdentPrimary(IdentPrimary object)\n {\n return null;\n }", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}", "public Object getFirst() {\n if (first == null)\n return null;\n return first.getInfo();\n }", "public T caseRelationshipNavigation(RelationshipNavigation object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic T queryJoinFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryJoinObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}", "public ObjectProp getRelationship() {\n return relationship;\n }", "@Override\n\tpublic Editore getOneById(int id) {\n\t\treturn null;\n\t}", "public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }", "Person fetchPersonById(Person person);", "@Override\n\tpublic Editore getOneByName(String name) {\n\t\treturn null;\n\t}", "@Override\n\tprotected Class<ResourcesRelatedDetail> getEntity() {\n\t\treturn ResourcesRelatedDetail.class;\n\t}", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "@objid (\"a721af22-ba64-4339-a50c-349201da2a69\")\n EList<BpmnDataAssociation> getSourceOfDataAssociation();", "public static com.matisse.reflect.MtRelationship getGestionaRelationship(com.matisse.MtDatabase db) {\n return (com.matisse.reflect.MtRelationship)db.getCachedObject(gestionaCID);\n }", "public Association loadAssociation(String handle) {\n\n Connection connection = IdentityDatabaseUtil.getDBConnection();\n PreparedStatement prepStmt = null;\n ResultSet results = null;\n\n try {\n prepStmt = connection.prepareStatement(OpenIDSQLQueries.LOAD_ASSOCIATION);\n prepStmt.setString(1, handle);\n results = prepStmt.executeQuery();\n\n if (results.next()) {\n log.debug(\"Loading association \" + handle);\n return buildAssociationObject(results);\n }\n connection.commit();\n } catch (SQLException e) {\n log.error(\"Failed to load the association \" + handle, e);\n } finally {\n IdentityDatabaseUtil.closeAllConnections(connection, results, prepStmt);\n }\n if(log.isDebugEnabled()) {\n log.debug(\"Failed to load the association \" + handle + \" from the database\");\n }\n return null;\n }", "TypeAssociation getConcerneTraitementObjectifTraitementObjectif();", "public String getInverseRelationshipName ();", "@Override\n\tpublic Product fetchOneProduct(int ID) {\n\t\tSystem.out.println(\"Getting One Product Data\");\n\t\tSystem.out.println(\"ID: \" + ID);\n\t\tSession session = sessionFactory.openSession();\n\t\tProduct product = null;\n\t\tString HQL =\"from Product where id = :id\";\n\t\tQuery query = session.createQuery(HQL,Product.class);\n\t\tquery.setParameter(\"id\", ID);\n\t\tList<Product> list = query.getResultList();\n//\t\tSystem.out.println(query.getResultList());\n\t\tif (list != null && list.size() == 1) {\n\t\t\tSystem.out.println(\"Found product\");\n\t\t\tproduct = list.get(0);\n\t\t}\n\t\treturn product;\n\t}", "@Override\n\tpublic Pedido findOne(Long arg0) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void oneToOneNoBind() {\n\t\tSystem.out.println(\"============oneToOneNoBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", oneToOne(), u.ID(), \"=\", a.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getChildNode(Address.class);\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getParentNode(User.class);\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}", "public E queryOne() {\n limit(2);\n List<E> result = queryList();\n if (result.size() != 1) {\n return null;\n } else {\n return result.get(0);\n }\n }", "private synchronized Association buildAssociationObject(ResultSet results) {\n\n Association assoc = null;\n String assocHandle = null;\n\n try {\n\n assocHandle = results.getString(1);\n String assocType = results.getString(2);\n java.util.Date expireIn = new java.util.Date(results.getTimestamp(3).getTime());\n String macKey = results.getString(4);\n String assocStore = results.getString(5);\n\n // we check if params are missing\n if (assocHandle == null || assocType == null || expireIn == null || macKey == null || assocStore == null) {\n log.error(\"Required data missing. Cannot build the Association object\");\n return null;\n }\n\n // Here we check if we are loading the correct associations\n if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED)) {\n log.error(\n \"Invalid association data found. Tried to load a Private Association but found a Shared Association\");\n return null;\n } else if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE)) {\n log.error(\n \"Invalid association data found. Tried to load a Shared Association but found a Private Association\");\n return null;\n }\n\n // Checks for association handle\n if (Association.TYPE_HMAC_SHA1.equals(assocType)) {\n assoc = Association.createHmacSha1(assocHandle, Base64.decode(macKey), expireIn);\n\n } else if (Association.TYPE_HMAC_SHA256.equals(assocType)) {\n assoc = Association.createHmacSha256(assocHandle, Base64.decode(macKey), expireIn);\n\n } else {\n log.error(\"Invalid association type \" + assocType + \" loaded from database\");\n return null;\n }\n\n } catch (SQLException e) {\n log.error(\"Failed to build the Association for \" + assocHandle + \". Error while accessing the database.\",\n e);\n } finally {\n IdentityDatabaseUtil.closeResultSet(results);\n }\n\n log.debug(\"Association \" + assocHandle + \" loaded successfully from the database.\");\n return assoc;\n }", "Object getId();", "@Override\r\n\t\t\tpublic void retrieved(ID target) {\n\t\t\t\t\r\n\t\t\t}", "EReference getRelationReference();", "TrustedIdProviderInner innerModel();", "boolean isFirstJoinKit();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface VehiculeRepository extends JpaRepository<Vehicule,Long> {\n \n @Query(\"select distinct vehicule from Vehicule vehicule left join fetch vehicule.noms\")\n List<Vehicule> findAllWithEagerRelationships();\n\n @Query(\"select vehicule from Vehicule vehicule left join fetch vehicule.noms where vehicule.id =:id\")\n Vehicule findOneWithEagerRelationships(@Param(\"id\") Long id);\n \n}", "final Integer getIdFromObjectPerson(Object value) {\n Integer id = (Integer) ((AbstractPerson) value).getId();\n return id;\n }", "@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}", "TNavigation selectByPrimaryKey(Long navigationId);", "public T caseAssociationType(AssociationType object) {\n\t\treturn null;\n\t}", "public Object[] getAssocOneIdValues(Object bean);", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException;", "Optional<DomainRelationshipDTO> findOne(UUID id);", "public Conge find( Integer idConge ) ;", "@Override\n public Product getProductById(long id, boolean retrieveAssociation) throws Exception\n {\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM Products WHERE productId = ?\");\n query.setLong(1, id);\n _da.setSqlCommandText(query);\n ResultSet productResult = _da.callCommandGetRow();\n if(productResult.next())\n return buildProduct(productResult, retrieveAssociation);\n\n return null;\n }", "Object getRefid();", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public Long getPersonaId();", "RelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);", "public Image getOne();", "@Override\n\tpublic Pessoa findOne(Integer arg0) {\n\t\treturn null;\n\t}", "Collection<? extends Object> getHadithReferenceNo();", "@Override\n @Transactional(readOnly = true)\n public Optional<Proposal> findOne(Long id) {\n log.debug(\"Request to get Proposal : {}\", id);\n return proposalRepository.findOneWithEagerRelationships(id);\n }", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@SuppressWarnings(\"unused\")\npublic interface CooperadoRepository extends JpaRepository<Cooperado,Long> {\n\n @Query(\"select distinct cooperado from Cooperado cooperado left join fetch cooperado.especialidades\")\n List<Cooperado> findAllWithEagerRelationships();\n\n @Query(\"select cooperado from Cooperado cooperado left join fetch cooperado.especialidades where cooperado.id =:id\")\n Cooperado findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n Cooperado findFirstByUserLogin(String login);\n}", "public String getParticulierAssociation() {\r\n\t\treturn particulierAssociation;\r\n\t}", "@Override\n public Iterable<Integer> relatedToFirst(final int a) {\n if (!isValid(a)) {\n throw new IllegalArgumentException(\"relatedToFirst(\" + a + \")\" +\n \" violates precondition.\");\n }\n\n return relation.get(a);\n//# END TODO\n }", "protected abstract T getId(P object);", "public ResultMap<Association> associations(QName associationTypeQName, Pagination pagination);", "protected BusinessObject getReferencedObject () {\n\t\treturn this;\n\t}", "OrganizationResourceInner innerModel();", "public boolean isAssocId();", "@Override\n public CerereDePrietenie findOne(Long aLong) {\n// String SQL = \"SELECT id,id_1,id_2,status,datac\"\n// + \"FROM cereredeprietenie \"\n// + \"WHERE id = ?\";\n//\n// try (Connection conn = connect();\n// PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n//\n// pstmt.setInt(1, Math.toIntExact(aLong));\n// ResultSet rs = pstmt.executeQuery();\n//\n// while(rs.next()) {\n// Long id = rs.getLong(\"id\");\n// Long id_1 = rs.getLong(\"id_1\");\n// Long id_2 = rs.getLong(\"id_2\");\n//\n// String status = rs.getString(\"status\");\n// LocalDateTime data = rs.getObject( 5,LocalDateTime.class);\n//\n// Utilizator u1=repository.findOne(id_1);\n// Utilizator u2=repository.findOne(id_2);\n//\n// CerereDePrietenie u =new CerereDePrietenie(u1,u2);\n// u.setId(id);\n// u.setStatus(status);\n// u.setData(data);\n// return u;\n// }\n//\n//\n// } catch (SQLException ex) {\n// System.out.println(ex.getMessage());\n// }\n//\n// return null;\n List<CerereDePrietenie> list=new ArrayList<>();\n findAll().forEach(list::add);\n for(CerereDePrietenie cerere: list){\n if(cerere.getId() == aLong)\n return cerere;\n }\n return null;\n }", "public Object caseEReferencesRelation(EReferencesRelation object) {\n\t\treturn null;\n\t}", "public ResultMap<Association> associations(QName associationTypeQName);", "Corretor findOne(Long id);" ]
[ "0.5778246", "0.5689367", "0.564824", "0.56278914", "0.5623358", "0.5579948", "0.5575003", "0.5575003", "0.55603206", "0.55489886", "0.5540335", "0.5508506", "0.5482944", "0.5445042", "0.54379225", "0.5306714", "0.52725923", "0.52722836", "0.5247", "0.52430207", "0.52301955", "0.52226835", "0.5211489", "0.5210925", "0.51985013", "0.5186645", "0.5182016", "0.5178825", "0.51756644", "0.5167283", "0.5165691", "0.5162046", "0.51569813", "0.5141829", "0.513192", "0.5126839", "0.51263523", "0.51258254", "0.512577", "0.5121745", "0.51070666", "0.5101555", "0.50983864", "0.50947326", "0.50838476", "0.5081622", "0.5077983", "0.50774217", "0.5073021", "0.5068434", "0.5062039", "0.5061781", "0.5052176", "0.5050067", "0.50426865", "0.50382215", "0.50255716", "0.5019719", "0.5018291", "0.5017341", "0.5015124", "0.5009296", "0.5005135", "0.49987453", "0.49966964", "0.49963638", "0.49928185", "0.49900806", "0.4980345", "0.49789265", "0.49757668", "0.49644276", "0.49609172", "0.4956386", "0.49515104", "0.4950413", "0.494999", "0.49496338", "0.49415308", "0.49393815", "0.49391684", "0.4938234", "0.49368367", "0.49224013", "0.4920617", "0.49178562", "0.49067098", "0.4906184", "0.4904713", "0.48992813", "0.4897864", "0.48954067", "0.4894211", "0.48895308", "0.48869714", "0.48826185", "0.48822826", "0.48815697", "0.4878674", "0.4873056", "0.487298" ]
0.0
-1
/ Code from template association_GetMany
public TimeSlot getTimeSlot(int index) { TimeSlot aTimeSlot = timeSlots.get(index); return aTimeSlot; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "public ResultMap<Association> associations();", "Collection<AssociationEnd> getAssociations();", "public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException;", "public abstract List<AbstractRelationshipTemplate> getIngoingRelations();", "public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }", "public String[] listRelations();", "public XIterable<ArticleX> relateds() {\n\t\tfinal IteratorList<ReadNode> relateds = node().refChildren(\"related\").iterator() ;\n\t\treturn XIterable.create(domain(), relateds.toList(), MapUtil.<String, String>newMap(), ArticleX.class) ;\n\t}", "Relations getGroupOfRelations();", "private void checkMappedByManyToMany(DeployBeanPropertyAssocMany<?> prop) {\n // get the bean descriptor that holds the mappedBy property\n String mappedBy = prop.getMappedBy();\n if (mappedBy == null) {\n if (targetDescriptor(prop).isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n return;\n }\n\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocMany<?> mappedAssocMany = mappedManyToMany(prop, mappedBy, targetDesc);\n\n // define the relationships/joins on this side as the\n // reverse of the other mappedBy side ...\n DeployTableJoin mappedIntJoin = mappedAssocMany.getIntersectionJoin();\n DeployTableJoin mappendInverseJoin = mappedAssocMany.getInverseJoin();\n\n String intTableName = mappedIntJoin.getTable();\n\n DeployTableJoin tableJoin = prop.getTableJoin();\n mappedIntJoin.copyTo(tableJoin, true, targetDesc.getBaseTable());\n\n DeployTableJoin intJoin = new DeployTableJoin();\n mappendInverseJoin.copyTo(intJoin, false, intTableName);\n prop.setIntersectionJoin(intJoin);\n\n DeployTableJoin inverseJoin = new DeployTableJoin();\n mappedIntJoin.copyTo(inverseJoin, false, intTableName);\n prop.setInverseJoin(inverseJoin);\n\n if (targetDesc.isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n }", "public ResultMap<Association> associations(Pagination pagination);", "boolean isOneToMany();", "boolean isMany();", "@SuppressWarnings( \"unchecked\" )\n public static <T> ManyAssociationFunction<T> manyAssociation( ManyAssociation<T> association )\n {\n return ( (ManyAssociationReferenceHandler<T>) Proxy.getInvocationHandler( association ) ).manyAssociation();\n }", "public Iterable<Relationship> getRelationships();", "@Override\n\tprotected void cutOffLazyCollections(Direction entity) {\n\t}", "public List<HasFormAssociation> listFormAssociations();", "@Override\n public List<PatientCaseDto> getMany() {\n return null;\n }", "@Test\n\tpublic void manyToManyTest() {\n\t\tSystem.out.println(\"============manyToManyTest=========\");\n\t\tUser u = new User();\n\t\tRole r = new Role();\n\t\tPrivilege p = new Privilege();\n\t\tUserRole ur = new UserRole();\n\t\tRolePrivilege rp = new RolePrivilege();\n\t\tDao.getDefaultContext().setShowSql(true);\n\t\tList<User> users = Dao.queryForEntityList(User.class,\n\t\t\t\tu.pagination(1, 10, //\n\t\t\t\t\t\tselect(), u.all(), \",\", ur.all(), \",\", r.all(), \",\", rp.all(), \",\", p.all(), from(), u.table(), //\n\t\t\t\t\t\t\" left join \", ur.table(), \" on \", oneToMany(), u.ID(), \"=\", ur.UID(), bind(), //\n\t\t\t\t\t\t\" left join \", r.table(), \" on \", oneToMany(), r.ID(), \"=\", ur.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", rp.table(), \" on \", oneToMany(), r.ID(), \"=\", rp.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", p.table(), \" on \", oneToMany(), p.ID(), \"=\", rp.PID(), bind(), //\n\t\t\t\t\t\t\" order by \", u.ID(), \",\", r.ID(), \",\", p.ID()));\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Role> roles = user.getUniqueNodeSet(Role.class);\n\t\t\tfor (Role role : roles)\n\t\t\t\tSystem.out.println(\"\\t\" + role.getRoleName());\n\t\t\tSet<Privilege> privs = user.getUniqueNodeSet(Privilege.class);\n\t\t\tfor (Privilege priv : privs)\n\t\t\t\tSystem.out.println(\"\\t\" + priv.getPrivilegeName());\n\t\t}\n\t}", "public ResultMap<Association> associations(QName associationTypeQName, Pagination pagination);", "@Override\n\tvoid addOneToManyJoin(QueryBuilder sb, Relation relation, EFieldAccessType fieldReferenceType, SourceReference from, SourceReference to) {\n\t\t\n\t\t\n\t\tfinal String entityAliasName = from.getVarName();\n\t\tfinal String collectionAttrName = relation.getFrom().getAttribute().getName();\n\n\t\t// final String joinVarName = \"join\" + joinParamIdx++;\n\n\t\tfinal String joinVarName = to.getVarName();\n\t\t\n\t\taddOneToManyJoin(sb, entityAliasName, collectionAttrName, joinVarName);\n\t}", "private void checkMappedByOneToMany(DeployBeanInfo<?> info, DeployBeanPropertyAssocMany<?> prop) {\n if (prop.isElementCollection()) {\n // skip mapping check\n return;\n }\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n if (targetDesc.isDraftableElement()) {\n // automatically turning on orphan removal and CascadeType.ALL\n prop.setModifyListenMode(BeanCollection.ModifyListenMode.REMOVALS);\n prop.getCascadeInfo().setSaveDelete(true, true);\n }\n\n if (prop.hasOrderColumn()) {\n makeOrderColumn(prop);\n }\n\n if (prop.getMappedBy() == null) {\n // if we are doc store only we are done\n // this allows the use of @OneToMany in @DocStore - Entities\n if (info.getDescriptor().isDocStoreOnly()) {\n prop.setUnidirectional();\n return;\n }\n\n if (!findMappedBy(prop)) {\n if (!prop.isO2mJoinTable()) {\n makeUnidirectional(prop);\n }\n return;\n }\n }\n\n // check that the mappedBy property is valid and read\n // its associated join information if it is available\n String mappedBy = prop.getMappedBy();\n\n // get the mappedBy property\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedManyToOne(prop, targetDesc, mappedBy);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyTo(tableJoin, true, tableJoin.getTable());\n }\n\n PropertyForeignKey foreignKey = mappedAssocOne.getForeignKey();\n if (foreignKey != null) {\n ConstraintMode onDelete = foreignKey.getOnDelete();\n switch (onDelete) {\n case SET_DEFAULT:\n case SET_NULL:\n case CASCADE: {\n // turn off cascade delete when we are using the foreign\n // key constraint to cascade the delete or set null\n prop.getCascadeInfo().setDelete(false);\n }\n }\n }\n }", "public Set<Relation> getRelations();", "List<ObjectRelation> getObjectRelations(int otId) throws AccessDeniedException;", "public ResultMap<Association> associations(QName associationTypeQName);", "public Collection<Reference> getReferences();", "@Test\n @Transactional\n public void ManyToManyQuery() {\n SysRole role = roleDao.findOne(4l);\n role.getUsers().forEach(u-> System.out.println(u));\n }", "public abstract List<AbstractRelationshipTemplate> getOutgoingRelations();", "public String getInverseRelationshipName ();", "protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}", "public Map<String, HasFormAssociation> fetchFormAssociations();", "private void indirectAssociations_DeriveIndirectInheritance() {\n try{\n \tList<FamixAssociation> indirectInheritanceAssociations = new ArrayList<FamixAssociation>();\n\t for (FamixAssociation directAssociation : theModel.associations) {\n if (directAssociation.to == null || directAssociation.from == null || directAssociation.to.equals(\"\") || directAssociation.from.equals(\"\")){ \n \tnumberOfNotConnectedWaitingAssociations ++;\n }\n else if (directAssociation instanceof FamixInheritanceDefinition){ \n \t\t\t\tindirectInheritanceAssociations.addAll(indirectAssociations_AddIndirectInheritanceAssociation(directAssociation.from, directAssociation.to, directAssociation.lineNumber));\n\t\t\t\t}\n\t\t\t}\n\t for (FamixAssociation indirectInheritanceAssociation : indirectInheritanceAssociations) {\n\t \taddToModel(indirectInheritanceAssociation);\n\t }\n } catch (Exception e) {\n\t this.logger.debug(new Date().toString() + \" \" + e);\n\t e.printStackTrace();\n }\n }", "@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }", "@Test\n\tpublic void oneToManyNoBind2() {\n\t\tSystem.out.println(\"============oneToManyNoBind2=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<Email> emails = Dao.queryForEntityList(Email.class, select(), u.all(), \",\", e.all(), from(), u.table(),\n\t\t\t\t\",\", e.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (Email email : emails) {\n\t\t\tSystem.out.println(email.getEmailName());\n\t\t\tUser user = email.getParentNode(User.class);\n\t\t\tSystem.out.println(\"\\t\" + user.getUserName());\n\t\t}\n\t}", "@Override\n public void onRelationshipMapLoaded() {\n }", "public void executeOneToManyAssociationsCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT *\n // FROM Supplier s\n Criteria criteria = session.createCriteria(Supplier.class);\n\n // INNER JOIN Product p\n // ON s.id = p.supplier_id\n // WHERE p.price > 25;\n criteria.createCriteria(\"products\").add(Restrictions.gt(\"price\", new Double(25.0)));\n\n displaySupplierList(criteria.list());\n transaction.commit();\n }", "public interface CollectionField extends RelationField {\n\n}", "public ResultMap<Association> associations(Direction direction, Pagination pagination);", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations getFurtherRelations();", "Collect getColl();", "public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}", "public Map<String, Set<String>> getRelatedEntities() {\n return relatedEntities;\n }", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "public Vector<String> getAffectedItemOnRelatedProject(Context context, String[] args) throws Exception {\n logger.debug(\"pss.slc.ui.SLCUIUtil:getAffectedItemOnRelatedProject :Start\");\n Vector<String> vAffectedItem = new Vector<String>();\n try {\n HashMap programMap = (HashMap) JPO.unpackArgs(args);\n HashMap paramList = (HashMap) programMap.get(\"paramList\");\n String strProjectRelList = (String) paramList.get(\"projectRelList\");\n if (UIUtil.isNotNullAndNotEmpty(strProjectRelList)) {\n String[] strRelId = strProjectRelList.split(\",\");\n StringList slRelSelect = new StringList();\n slRelSelect.add(\"to.name\");\n slRelSelect.add(\"to.id\");\n MapList mlAffectedItem = DomainRelationship.getInfo(context, strRelId, slRelSelect);\n\n for (Object obj : mlAffectedItem) {\n Map mAffectedItem = (Map) obj;\n StringBuffer output = new StringBuffer(\" \");\n output.append(\"<tr><td width=\\\"60%\\\">\");\n output.append(\"<a href=\\\"javascript:emxTableColumnLinkClick('../common/emxTree.jsp?objectId=\");\n output.append((String) mAffectedItem.get(\"to.id\"));\n output.append(\"', '700', '600', 'false', 'insert', '')\\\" class=\\\"object\\\">\");\n output.append(\" \" + (String) mAffectedItem.get(\"to.name\"));\n output.append(\"</a></td>\");\n output.append(\"</tr>\");\n vAffectedItem.add(output.toString());\n }\n }\n } catch (Exception e) {\n logger.error(\"ERROR in pss.slc.ui.SLCUIUtil:getAffectedItemOnRelatedProject : \" + e.getMessage());\n }\n logger.debug(\"pss.slc.ui.SLCUIUtil:getAffectedItemOnRelatedProject :End\");\n return vAffectedItem;\n }", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "com.microsoft.schemas.crm._2011.contracts.ArrayOfObjectiveRelation getObjectives();", "Collection<? extends WrappedIndividual> getHas();", "public ResultMap<Association> associations(QName associationTypeQName, Direction direction, Pagination pagination);", "public OMCollection getTarget() {\r\n return IServer.associationHasTarget().dr(this).range();\r\n }", "@ManyToMany//(cascade = {CascadeType.PERSIST, CascadeType.MERGE})\n public List<Person> getParticipants() {\n return participants;\n }", "private void readEntityDeploymentAssociations() {\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n readDeployAssociations(info);\n }\n }", "Product getPProducts();", "@Override\n\tpublic <T> List<T> findMany(Map<String, CustmerCriteria> params, Class<T> entityClass) throws Exception {\n\t\treturn null;\n\t}", "TypeAssociation getAssocieCommeObjetAdresse();", "private void addOneToManyJoin(QueryBuilder sb, String entityAliasName, String collectionAttrName, String joinVarName) {\n\t\tsb.append(\" \")\n\t\t .append(entityAliasName).append(\".\").append(collectionAttrName)\n\t\t .append(\" \")\n\t\t .append(joinVarName);\n\t}", "Table getReferences();", "private Collection getRelatedClassValidationList (\n\t\tPersistenceFieldElement field)\n\t{\n\t\tString relatedClass = getRelatedClass(field);\n\t\tArrayList list = new ArrayList();\n\n\t\t// even though this is really already included in the validation \n\t\t// step, we only want to add the extra steps if the field exists\n\t\tif ((relatedClass != null) && \n\t\t\tgetModel().hasField(getClassName(), field.getName()))\n\t\t{\n\t\t\tMappingClassElement relatedClassElement = \n\t\t\t\tgetMappingClass(relatedClass);\n\n\t\t\tlist.add(createClassExistenceComponent(relatedClass, field));\n\t\t\tlist.add(createClassPersistenceComponent(relatedClass, field));\n\t\t\tlist.add(createSchemaExistenceComponent(relatedClass, field));\n\t\t\tlist.add(createRelatedSchemaMatchesComponent(relatedClass, field));\n\n\t\t\tif (relatedClassElement != null)\n\t\t\t{\n\t\t\t\tArrayList tables = relatedClassElement.getTables();\n\t\t\t\tMappingTableElement primaryTable = null;\n\t\t\t\tboolean hasTables = ((tables != null) && (tables.size() > 0));\n\n\t\t\t\tif (hasTables)\n\t\t\t\t{\n\t\t\t\t\tprimaryTable = (MappingTableElement)tables.get(0);\n\t\t\t\t\tlist.add(createTableExistenceComponent(\n\t\t\t\t\t\tprimaryTable.getTable(), field));\n\t\t\t\t}\n\n\t\t\t\tif (isRelationship(field))\n\t\t\t\t{\n\t\t\t\t\tRelationshipElement relElement = (RelationshipElement)field;\n\t\t\t\t\tObject rel = getMappingClass(getClassName()).\n\t\t\t\t\t\tgetField(field.getName());\n\n\t\t\t\t\tlist.add(createInverseFieldComponent(relElement));\n\t\t\t\t\tlist.add(createInverseMappingComponent(relElement));\n\n\t\t\t\t\t// verify that the columns from the primary table \n\t\t\t\t\t// of the related class are actually from that table\n\t\t\t\t\t// since it could have been changed\n\t\t\t\t\tif ((rel != null) && isRelationship(rel))\n\t\t\t\t\t{\n\t\t\t\t\t\tMappingRelationshipElement relationship = \n\t\t\t\t\t\t\t(MappingRelationshipElement)rel;\n\t\t\t\t\t\tArrayList columns = \n\t\t\t\t\t\t\trelationship.getAssociatedColumns();\n\t\t\t\t\t\tIterator iterator = null;\n\n\t\t\t\t\t\tif ((columns == null) || (columns.size() == 0))\n\t\t\t\t\t\t\tcolumns = relationship.getColumns();\n\n\t\t\t\t\t\tif (columns != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList tableNames = new ArrayList();\n\n\t\t\t\t\t\t\tif (hasTables)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tIterator tableIterator = tables.iterator();\n\n\t\t\t\t\t\t\t\twhile (tableIterator.hasNext())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttableNames.add(((MappingTableElement)\n\t\t\t\t\t\t\t\t\t\ttableIterator.next()).getName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\titerator = columns.iterator();\n\n\t\t\t\t\t\t\twhile (iterator.hasNext())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlist.add(createRelatedTableMatchesComponent(\n\t\t\t\t\t\t\t\t\trelatedClass, field, tableNames, \n\t\t\t\t\t\t\t\t\t(String)iterator.next()));\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}\n\t\t}\n\n\t\treturn list;\n\t}", "@objid (\"a721af22-ba64-4339-a50c-349201da2a69\")\n EList<BpmnDataAssociation> getSourceOfDataAssociation();", "List<IViewRelation> getViewRelations();", "static protected void collectAssociations(NamedElement element,\n\t\t\tList<Association> list) {\n\t\tif (element instanceof Package) {\n\t\t\tfor (Iterator i = ((Package) element).getMembers().iterator(); i\n\t\t\t\t\t.hasNext();) {\n\t\t\t\tNamedElement ne = (NamedElement) i.next();\n\t\t\t\tcollectAssociations(ne, list);\n\t\t\t}\n\t\t}\n\t\tif (element instanceof Association) {\n\t\t\tlist.add((Association) element);\n\t\t}\n\t}", "public ReadOnlyIterator<Relation> getRelations();", "public List<MediaRelation> loadMediaRelations();", "@Override\n\t\tpublic Iterable<Relationship> getRelationships() {\n\t\t\treturn null;\n\t\t}", "@objid (\"ef92d9d1-93c5-49d4-9ec8-65c4eb806567\")\n EList<BpmnDataAssociation> getTargetOfDataAssociation();", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }", "public List<ForeignKey> getForeignKeysIn();", "private void extractRelatedTriples(Formula context, N3Element.Object ref) {\n\t\tif (ref instanceof Exvar) {\n\t\t\tRDFResource sub = context.get(ref.toString());\n\t\t\tif (sub != null) {\n\t\t\t\trelated.add(sub);\n\t\t\t\tfor (VerbObject obj : sub.verbObjects) {\n\t\t\t\t\textractRelatedTriples(context, obj.object);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (ref instanceof List) {\n\t\t\tfor (Object o : (List<?>) ref) {\n\t\t\t\tif (o instanceof N3Element.Object) {\n\t\t\t\t\textractRelatedTriples(context, (N3Element.Object) o);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ResultMap<Association> associations(Direction direction);", "public interface HasRelation {\r\n\r\n\tpublic boolean addRelation(Relation relation);\r\n\tpublic boolean removeRelation(Relation relation);\r\n\tpublic List<Relation> getRelations();\r\n}", "Iterator<Column> referencedColumns();", "RolloutInner innerModel();", "Collection getCommunities();", "public interface IRelationService<DependenciesBean, AssociationTreeBean> {\n\n /**\n * Method to obtain a list of dependencies.\n *\n * @param path the resource path.\n *\n * @return the list of dependencies.\n * @throws RegistryException if the operation failed.\n */\n DependenciesBean getDependencies(String path) throws RegistryException;\n\n /**\n * Method to add an association (or dependency).\n *\n * @param path the resource path.\n * @param type the type of association. If the type of association is 'depends' a\n * dependency will be created.\n * @param associationPaths the list of associations to be added.\n *\n * @throws RegistryException if the operation failed.\n */\n void addAssociation(String path, String type, String associationPaths,\n String operation) throws RegistryException;\n\n // TODO: FIXME: The operation parameter is not required. Get rid of that and fix the\n // addAssociation method on the BE service.\n\n /**\n * Method to obtain a list of associations.\n * \n * @param path the resource path.\n * @param type the type of association.\n *\n * @return the list of associations.\n * @throws RegistryException if the operation failed.\n */\n AssociationTreeBean getAssociationTree(String path, String type) throws RegistryException;\n}", "TypeAssociationEXT getConcerneUniteUnite();", "public InHouseAppIdPolicyIdMapping[] getAssociations() {\r\n\t\treturn associations;\r\n\t}", "List<CompositionSpaceToDraftAssociation> getAll() throws OXException;", "public ObservableList<Part> getAllAssociatedParts() {\n return associatedParts;\n }", "public ObservableList<Part> getAllAssociatedParts() {\n return associatedParts;\n }", "private final List<Element> getReferences(final Document doc, final boolean wantSingle, boolean wantMulti) {\r\n return this.desc.getReferences(doc, getName(), wantSingle, wantMulti);\r\n }", "@Override\n\tprotected List<Entry> doRetrieveCollections()\n\t{\n\t\tif ( mScholar == null ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn mScholar.getCollectionsBySection( mSection );\n\t}", "public List<Object> selectByManyToMany(Class sourceClass, Class referenceClass) {\n Connection connection = ConnectionPoll.getConnection();\n ManyToManySelect manyToManySelect = new ManyToManySelect(connection, CanUseAuto.class);\n List<Object> list = manyToManySelect.selectAllfromM2MTable(sourceClass, referenceClass);\n ConnectionPoll.releaseConnection(connection);\n return list;\n }", "@Override\n public ArrayList<Product> getAllProducts(boolean retrieveAssociation) throws Exception\n {\n ArrayList<Product> returnList = new ArrayList<Product>();\n\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM Products\");\n _da.setSqlCommandText(query);\n ResultSet products = _da.callCommandGetResultSet();\n\n while(products.next())\n {\n Product product = buildProduct(products, retrieveAssociation);\n returnList.add(product);\n }\n\n return returnList;\n }", "private void addFromAssociation(final String elementName, final String collectionRole)\n \t\t\tthrows QueryException {\n \t\t//q.addCollection(collectionName, collectionRole);\n \t\tQueryableCollection persister = getCollectionPersister( collectionRole );\n \t\tType collectionElementType = persister.getElementType();\n \t\tif ( !collectionElementType.isEntityType() ) {\n \t\t\tthrow new QueryException( \"collection of values in filter: \" + elementName );\n \t\t}\n \n \t\tString[] keyColumnNames = persister.getKeyColumnNames();\n \t\t//if (keyColumnNames.length!=1) throw new QueryException(\"composite-key collection in filter: \" + collectionRole);\n \n \t\tString collectionName;\n \t\tJoinSequence join = new JoinSequence( getFactory() );\n \t\tcollectionName = persister.isOneToMany() ?\n \t\t\t\telementName :\n \t\t\t\tcreateNameForCollection( collectionRole );\n \t\tjoin.setRoot( persister, collectionName );\n \t\tif ( !persister.isOneToMany() ) {\n \t\t\t//many-to-many\n \t\t\taddCollection( collectionName, collectionRole );\n \t\t\ttry {\n \t\t\t\tjoin.addJoin( ( AssociationType ) persister.getElementType(),\n \t\t\t\t\t\telementName,\n \t\t\t\t\t\tJoinType.INNER_JOIN,\n \t\t\t\t\t\tpersister.getElementColumnNames(collectionName) );\n \t\t\t}\n \t\t\tcatch ( MappingException me ) {\n \t\t\t\tthrow new QueryException( me );\n \t\t\t}\n \t\t}\n \t\tjoin.addCondition( collectionName, keyColumnNames, \" = ?\" );\n \t\t//if ( persister.hasWhere() ) join.addCondition( persister.getSQLWhereString(collectionName) );\n \t\tEntityType elemType = ( EntityType ) collectionElementType;\n \t\taddFrom( elementName, elemType.getAssociatedEntityName(), join );\n \n \t}", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}", "protected CcddJTableHandler getAssociationsTable()\n {\n return assnsTable;\n }", "public java.lang.Object[] getRelationsAsReference() {\n return relationsAsReference;\n }", "@Override\n\tprotected Class<ResourcesRelatedDetail> getEntity() {\n\t\treturn ResourcesRelatedDetail.class;\n\t}", "public ListProperty<Author> titlesProperty(){return authors;}", "Collection<Feature> getReference();", "@Query(\"select classe from Classe classe join fetch classe.ecole\")\n public Iterable<Classe> findAll();", "@XmlTransient\n Collection<Copiaelettronica> getCopiaelettronicaCollection();", "public boolean containsRelations();", "public ResultMap<Association> associations(QName associationTypeQName, Direction direction);", "@Override\r\n public MetadataDescriptor getReferenceDescriptor() {\r\n if (isDirectEmbeddableCollection()) {\r\n return getEmbeddableAccessor().getDescriptor();\r\n } else {\r\n return super.getReferenceDescriptor();\r\n }\r\n }", "public Collection getGeneralization()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{\n \t\tCollection col = new ArrayList();\n \t\tcol = instance.getGeneralization(this.refMofId());\n \t\t\n \t\treturn col; \t\t\n \t}\n \n \treturn super_getGeneralization();\n }", "@XmlTransient\n Collection<Libro> getLibroCollection1();", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }" ]
[ "0.6567237", "0.6121949", "0.6012878", "0.5752647", "0.57506186", "0.57374895", "0.572223", "0.5711253", "0.56566805", "0.5653733", "0.5627824", "0.56035984", "0.55836254", "0.5575329", "0.55649805", "0.55471134", "0.55385244", "0.5531943", "0.55218977", "0.5458734", "0.54560524", "0.5438264", "0.5438104", "0.54315805", "0.5408865", "0.5402509", "0.5384736", "0.53686094", "0.5348071", "0.53468716", "0.53139025", "0.53050035", "0.5296422", "0.5281749", "0.52756643", "0.5269468", "0.5261329", "0.52516365", "0.5248396", "0.52273715", "0.5202613", "0.5182985", "0.51822156", "0.51751417", "0.5170483", "0.5170174", "0.5170174", "0.51662356", "0.5154242", "0.514236", "0.511359", "0.5086074", "0.50775653", "0.5066812", "0.50664955", "0.5057486", "0.50565803", "0.5045411", "0.5043318", "0.50409853", "0.5033685", "0.5022583", "0.5022486", "0.50153065", "0.5007068", "0.50061363", "0.50041604", "0.50006926", "0.49915117", "0.49861598", "0.49738374", "0.49722168", "0.49657235", "0.49649474", "0.49557072", "0.4955068", "0.4936646", "0.49350515", "0.49330953", "0.4932915", "0.4932915", "0.49316716", "0.49268728", "0.49227488", "0.4919093", "0.4914708", "0.49118468", "0.49077407", "0.49017587", "0.48982298", "0.4897504", "0.48957622", "0.48936412", "0.48811138", "0.48807916", "0.48749587", "0.48731622", "0.4873101", "0.4861101", "0.48432744", "0.48397383" ]
0.0
-1
/ Code from template association_GetOne
public ServiceCombo getServices() { return services; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TypeAssociation getAssocieCommeObjetAdresse();", "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Person\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tIterator i = results.iterator();\r\n\t\tPerson result = (Person)i.next();\r\n\t\ttoXML(result);\r\n\t\tPerson result2 = (Person)fromXML(result);\r\n\t\t\r\n\t\tassertNotNull(result2);\r\n\t\tassertNotNull(result2.getId().getExtension()); \r\n\t\tassertEquals(II_ROOT_GLOBAL_CONSTANT_VALUE,result2.getId().getRoot());\r\n\t\tassertNotNull(result2.getName());\r\n\t\t\r\n\t\tAddress address = result2.getLivesAt();\r\n\t\tassertNotNull(address);\r\n\t\tassertNotNull(address.getId());\r\n\t\tassertNotNull(address.getZip());\r\n\t\tassertEquals(\"1\",address.getId().getExtension());\r\n\t}", "@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}", "public tudresden.ocl20.core.jmi.uml15.core.Association getAssociation()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{ \t\t\n \t\treturn instance.getAssociation(this.refMofId());\n \t} \n \t\n\t\treturn super_getAssociation();\t\n }", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public T caseAssocRelationshipDefinition(AssocRelationshipDefinition object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "public String getAssociationId() {\n return this.associationId;\n }", "Optional<HousingAssociation> findOne(Long id);", "FetchFirst createFetchFirst();", "public String getAssociatedObject() {\n return associatedObject;\n }", "@Test\n public void testAssocOneWithNullAssoc() {\n\n Database server = DB.getDefault();\n\n final ProductConfiguration pc = new ProductConfiguration();\n pc.setName(\"PC1\");\n server.save(pc);\n\n CalculationResult r = new CalculationResult();\n final Double charge = 100.0;\n r.setCharge(charge);\n r.setProductConfiguration(pc);\n r.setGroupConfiguration(null);\n server.save(r);\n }", "public Shipping3VO findByPk(Integer pk, boolean fetchRelation1) {\r\n\t\ttry {\r\n\t\t\treturn (Shipping3VO) entityManager.createQuery(FIND_BY_PK(fetchRelation1)).setParameter(\"pk\", pk)\r\n\t\t\t\t\t.getSingleResult();\r\n\t\t} catch (NoResultException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "TypeAssociation getAssocieCommeObjetAction();", "private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "public void testOneAssociatedObjectNestedSearch2() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Address\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tIterator i = results.iterator();\r\n\t\t\r\n\t\tAddress result = (Address)i.next();\r\n\t\ttoXML(result);\r\n\t\tAddress result2 = (Address)fromXML(result);\r\n\t\t\r\n\t\tassertNotNull(result2);\r\n\t\tassertNotNull(result2.getId().getExtension()); \r\n\t\tassertEquals(II_ROOT_GLOBAL_CONSTANT_VALUE,result2.getId().getRoot());\r\n\t\tassertNotNull(result2.getZip());\r\n\t\tassertEquals(\"1\",result2.getId().getExtension());\r\n\t}", "@Override\r\n\tpublic Invigilate getOne(Integer no) {\n\t\treturn invigilateMapper.selectByPrimaryKey(no);\r\n\t}", "public A getFirst() { return first; }", "@Override\r\n\tpublic OrderInfo selectOne() {\n\t\treturn null;\r\n\t}", "public interface ClinicRepository extends JpaRepository<Clinic,Long> {\n\n @Query(\"select distinct clinic from Clinic clinic left join fetch clinic.diagnostics left join fetch clinic.metros left join fetch clinic.specialitys\")\n List<Clinic> findAllWithEagerRelationships();\n\n @Query(\"select clinic from Clinic clinic left join fetch clinic.diagnostics left join fetch clinic.metros left join fetch clinic.specialitys where clinic.id =:id\")\n Clinic findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n Optional<Clinic> findOneByDocdocId(Long docdocId);\n\n}", "@SuppressWarnings( \"unchecked\" )\n public static <T> AssociationFunction<T> association( Association<T> association )\n {\n return ( (AssociationReferenceHandler<T>) Proxy.getInvocationHandler( association ) ).association();\n }", "@Test\n public void testConvertPhenotypeAssociation() {\n assertThat( searchService.loadValueObject( SearchResult.from( PhenotypeAssociation.class, phenotypeAssociation, 1.0, \"test object\" ) ) )\n .extracting( \"resultObject\" )\n .isSameAs( phenotypeAssociation );\n assertThat( searchService.loadValueObjects( Collections.singleton( SearchResult.from( PhenotypeAssociation.class, phenotypeAssociation, 1.0, \"test object\" ) ) ) )\n .extracting( \"resultObject\" )\n .containsExactly( phenotypeAssociation );\n }", "public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}", "public Reference individual() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_INDIVIDUAL);\n }", "public Author getAuthorProfile(int authorId);", "@SuppressWarnings(\"unchecked\")\r\n public <T> T loadAssociation(Object bean, Association association) {\r\n // check if target property is set\r\n String targetAlias = association.getAlias();\r\n TypedField targetTf = FieldUtils.getBeanTypedField(bean.getClass(), targetAlias);\r\n if(targetTf == null) {\r\n return null;\r\n }\r\n Object value;\r\n try {\r\n value = targetTf.get(bean);\r\n if (value != null) { // if value is set, returns\r\n return (T) value;\r\n } else if (bean instanceof Updatable) {\r\n Set<String> changed = ((Updatable) bean).changed();\r\n if (changed != null && changed.contains(targetTf.getName())) {\r\n return null;\r\n }\r\n }\r\n\r\n Class<?> klass = targetTf.getPropertyType();\r\n\r\n Relation[] relations = association.getRelations();\r\n List<Condition> restrictions = new ArrayList<>();\r\n for (Relation relation : relations) {\r\n // from source FK\r\n String fkAlias = relation.getFrom().getColumn().getAlias();\r\n TypedField tf = FieldUtils.getBeanTypedField(bean.getClass(), fkAlias);\r\n if(tf != null) {\r\n value = tf.get(bean);\r\n restrictions.add(relation.getTo().getColumn().is(Definition.raw(value)));\r\n }\r\n }\r\n\r\n Query query = query(association.getTableTo()).all()\r\n .where(restrictions);\r\n if (Collection.class.isAssignableFrom(klass)) {\r\n Class<?> genKlass = FieldUtils.getTypeGenericClass(targetTf.getType());\r\n value = query.list(genKlass);\r\n if (Set.class.isAssignableFrom(klass)) {\r\n value = new LinkedHashSet<Object>((Collection<?>) value);\r\n } else if (List.class.isAssignableFrom(klass)) {\r\n value = new ArrayList<Object>((Collection<?>) value);\r\n }\r\n } else {\r\n value = query.select(klass);\r\n }\r\n\r\n targetTf.set(bean, value);\r\n\r\n } catch (Exception ex) {\r\n throw new PersistenceException(\"Unable to retrieve association \" + association + \" for \" + bean, ex);\r\n }\r\n\r\n return (T) value;\r\n }", "int getOtherId();", "abstract public Assoc getAssoc();", "@Override\n\tpublic Map<String, Object> findOne(Long arg0) {\n\t\treturn null;\n\t}", "public void GetOneItem( Standard_Transient anentity) {\n OCCwrapJavaJNI.Interface_EntityIterator_GetOneItem(swigCPtr, this, Standard_Transient.getCPtr(anentity) , anentity);\n }", "public Association association(ComplexEObject ceo)\n {\n if (_inverseFieldName == null)\n {\n return new Association(this, ceo);\n }\n else\n {\n return new Association(this, ceo, inverseField());\n }\n }", "EReference getAnEReference();", "public String getOneOrMany()\n\t{\n\t\treturn oneOrMany;\n\t}", "@Override\n\t\tpublic Relationship getSingleRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}", "public Object getId1() {\n return this.getId();\n }", "@Override\r\n\tpublic Optional<Producto> getOne(Producto entity) throws Exception {\n\t\treturn null;\r\n\t}", "public T caseIdentPrimary(IdentPrimary object)\n {\n return null;\n }", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}", "public Object getFirst() {\n if (first == null)\n return null;\n return first.getInfo();\n }", "public T caseRelationshipNavigation(RelationshipNavigation object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic T queryJoinFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryJoinObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}", "public ObjectProp getRelationship() {\n return relationship;\n }", "@Override\n\tpublic Editore getOneById(int id) {\n\t\treturn null;\n\t}", "public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }", "Person fetchPersonById(Person person);", "@Override\n\tpublic Editore getOneByName(String name) {\n\t\treturn null;\n\t}", "@Override\n\tprotected Class<ResourcesRelatedDetail> getEntity() {\n\t\treturn ResourcesRelatedDetail.class;\n\t}", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "@objid (\"a721af22-ba64-4339-a50c-349201da2a69\")\n EList<BpmnDataAssociation> getSourceOfDataAssociation();", "public static com.matisse.reflect.MtRelationship getGestionaRelationship(com.matisse.MtDatabase db) {\n return (com.matisse.reflect.MtRelationship)db.getCachedObject(gestionaCID);\n }", "public Association loadAssociation(String handle) {\n\n Connection connection = IdentityDatabaseUtil.getDBConnection();\n PreparedStatement prepStmt = null;\n ResultSet results = null;\n\n try {\n prepStmt = connection.prepareStatement(OpenIDSQLQueries.LOAD_ASSOCIATION);\n prepStmt.setString(1, handle);\n results = prepStmt.executeQuery();\n\n if (results.next()) {\n log.debug(\"Loading association \" + handle);\n return buildAssociationObject(results);\n }\n connection.commit();\n } catch (SQLException e) {\n log.error(\"Failed to load the association \" + handle, e);\n } finally {\n IdentityDatabaseUtil.closeAllConnections(connection, results, prepStmt);\n }\n if(log.isDebugEnabled()) {\n log.debug(\"Failed to load the association \" + handle + \" from the database\");\n }\n return null;\n }", "TypeAssociation getConcerneTraitementObjectifTraitementObjectif();", "public String getInverseRelationshipName ();", "@Override\n\tpublic Product fetchOneProduct(int ID) {\n\t\tSystem.out.println(\"Getting One Product Data\");\n\t\tSystem.out.println(\"ID: \" + ID);\n\t\tSession session = sessionFactory.openSession();\n\t\tProduct product = null;\n\t\tString HQL =\"from Product where id = :id\";\n\t\tQuery query = session.createQuery(HQL,Product.class);\n\t\tquery.setParameter(\"id\", ID);\n\t\tList<Product> list = query.getResultList();\n//\t\tSystem.out.println(query.getResultList());\n\t\tif (list != null && list.size() == 1) {\n\t\t\tSystem.out.println(\"Found product\");\n\t\t\tproduct = list.get(0);\n\t\t}\n\t\treturn product;\n\t}", "@Override\n\tpublic Pedido findOne(Long arg0) {\n\t\treturn null;\n\t}", "@Test\n\tpublic void oneToOneNoBind() {\n\t\tSystem.out.println(\"============oneToOneNoBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", oneToOne(), u.ID(), \"=\", a.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getChildNode(Address.class);\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getParentNode(User.class);\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}", "public E queryOne() {\n limit(2);\n List<E> result = queryList();\n if (result.size() != 1) {\n return null;\n } else {\n return result.get(0);\n }\n }", "private synchronized Association buildAssociationObject(ResultSet results) {\n\n Association assoc = null;\n String assocHandle = null;\n\n try {\n\n assocHandle = results.getString(1);\n String assocType = results.getString(2);\n java.util.Date expireIn = new java.util.Date(results.getTimestamp(3).getTime());\n String macKey = results.getString(4);\n String assocStore = results.getString(5);\n\n // we check if params are missing\n if (assocHandle == null || assocType == null || expireIn == null || macKey == null || assocStore == null) {\n log.error(\"Required data missing. Cannot build the Association object\");\n return null;\n }\n\n // Here we check if we are loading the correct associations\n if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED)) {\n log.error(\n \"Invalid association data found. Tried to load a Private Association but found a Shared Association\");\n return null;\n } else if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE)) {\n log.error(\n \"Invalid association data found. Tried to load a Shared Association but found a Private Association\");\n return null;\n }\n\n // Checks for association handle\n if (Association.TYPE_HMAC_SHA1.equals(assocType)) {\n assoc = Association.createHmacSha1(assocHandle, Base64.decode(macKey), expireIn);\n\n } else if (Association.TYPE_HMAC_SHA256.equals(assocType)) {\n assoc = Association.createHmacSha256(assocHandle, Base64.decode(macKey), expireIn);\n\n } else {\n log.error(\"Invalid association type \" + assocType + \" loaded from database\");\n return null;\n }\n\n } catch (SQLException e) {\n log.error(\"Failed to build the Association for \" + assocHandle + \". Error while accessing the database.\",\n e);\n } finally {\n IdentityDatabaseUtil.closeResultSet(results);\n }\n\n log.debug(\"Association \" + assocHandle + \" loaded successfully from the database.\");\n return assoc;\n }", "Object getId();", "@Override\r\n\t\t\tpublic void retrieved(ID target) {\n\t\t\t\t\r\n\t\t\t}", "EReference getRelationReference();", "TrustedIdProviderInner innerModel();", "boolean isFirstJoinKit();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface VehiculeRepository extends JpaRepository<Vehicule,Long> {\n \n @Query(\"select distinct vehicule from Vehicule vehicule left join fetch vehicule.noms\")\n List<Vehicule> findAllWithEagerRelationships();\n\n @Query(\"select vehicule from Vehicule vehicule left join fetch vehicule.noms where vehicule.id =:id\")\n Vehicule findOneWithEagerRelationships(@Param(\"id\") Long id);\n \n}", "final Integer getIdFromObjectPerson(Object value) {\n Integer id = (Integer) ((AbstractPerson) value).getId();\n return id;\n }", "@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}", "TNavigation selectByPrimaryKey(Long navigationId);", "public T caseAssociationType(AssociationType object) {\n\t\treturn null;\n\t}", "public Object[] getAssocOneIdValues(Object bean);", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException;", "Optional<DomainRelationshipDTO> findOne(UUID id);", "public Conge find( Integer idConge ) ;", "@Override\n public Product getProductById(long id, boolean retrieveAssociation) throws Exception\n {\n PreparedStatement query = _da.getCon().prepareStatement(\"SELECT * FROM Products WHERE productId = ?\");\n query.setLong(1, id);\n _da.setSqlCommandText(query);\n ResultSet productResult = _da.callCommandGetRow();\n if(productResult.next())\n return buildProduct(productResult, retrieveAssociation);\n\n return null;\n }", "Object getRefid();", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public Long getPersonaId();", "RelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);", "public Image getOne();", "@Override\n\tpublic Pessoa findOne(Integer arg0) {\n\t\treturn null;\n\t}", "Collection<? extends Object> getHadithReferenceNo();", "@Override\n @Transactional(readOnly = true)\n public Optional<Proposal> findOne(Long id) {\n log.debug(\"Request to get Proposal : {}\", id);\n return proposalRepository.findOneWithEagerRelationships(id);\n }", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@SuppressWarnings(\"unused\")\npublic interface CooperadoRepository extends JpaRepository<Cooperado,Long> {\n\n @Query(\"select distinct cooperado from Cooperado cooperado left join fetch cooperado.especialidades\")\n List<Cooperado> findAllWithEagerRelationships();\n\n @Query(\"select cooperado from Cooperado cooperado left join fetch cooperado.especialidades where cooperado.id =:id\")\n Cooperado findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n Cooperado findFirstByUserLogin(String login);\n}", "public String getParticulierAssociation() {\r\n\t\treturn particulierAssociation;\r\n\t}", "@Override\n public Iterable<Integer> relatedToFirst(final int a) {\n if (!isValid(a)) {\n throw new IllegalArgumentException(\"relatedToFirst(\" + a + \")\" +\n \" violates precondition.\");\n }\n\n return relation.get(a);\n//# END TODO\n }", "protected abstract T getId(P object);", "public ResultMap<Association> associations(QName associationTypeQName, Pagination pagination);", "protected BusinessObject getReferencedObject () {\n\t\treturn this;\n\t}", "OrganizationResourceInner innerModel();", "public boolean isAssocId();", "@Override\n public CerereDePrietenie findOne(Long aLong) {\n// String SQL = \"SELECT id,id_1,id_2,status,datac\"\n// + \"FROM cereredeprietenie \"\n// + \"WHERE id = ?\";\n//\n// try (Connection conn = connect();\n// PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n//\n// pstmt.setInt(1, Math.toIntExact(aLong));\n// ResultSet rs = pstmt.executeQuery();\n//\n// while(rs.next()) {\n// Long id = rs.getLong(\"id\");\n// Long id_1 = rs.getLong(\"id_1\");\n// Long id_2 = rs.getLong(\"id_2\");\n//\n// String status = rs.getString(\"status\");\n// LocalDateTime data = rs.getObject( 5,LocalDateTime.class);\n//\n// Utilizator u1=repository.findOne(id_1);\n// Utilizator u2=repository.findOne(id_2);\n//\n// CerereDePrietenie u =new CerereDePrietenie(u1,u2);\n// u.setId(id);\n// u.setStatus(status);\n// u.setData(data);\n// return u;\n// }\n//\n//\n// } catch (SQLException ex) {\n// System.out.println(ex.getMessage());\n// }\n//\n// return null;\n List<CerereDePrietenie> list=new ArrayList<>();\n findAll().forEach(list::add);\n for(CerereDePrietenie cerere: list){\n if(cerere.getId() == aLong)\n return cerere;\n }\n return null;\n }", "public Object caseEReferencesRelation(EReferencesRelation object) {\n\t\treturn null;\n\t}", "public ResultMap<Association> associations(QName associationTypeQName);", "Corretor findOne(Long id);" ]
[ "0.5778246", "0.5689367", "0.564824", "0.56278914", "0.5623358", "0.5579948", "0.5575003", "0.5575003", "0.55603206", "0.55489886", "0.5540335", "0.5508506", "0.5482944", "0.5445042", "0.54379225", "0.5306714", "0.52725923", "0.52722836", "0.5247", "0.52430207", "0.52301955", "0.52226835", "0.5211489", "0.5210925", "0.51985013", "0.5186645", "0.5182016", "0.5178825", "0.51756644", "0.5167283", "0.5165691", "0.5162046", "0.51569813", "0.5141829", "0.513192", "0.5126839", "0.51263523", "0.51258254", "0.512577", "0.5121745", "0.51070666", "0.5101555", "0.50983864", "0.50947326", "0.50838476", "0.5081622", "0.5077983", "0.50774217", "0.5073021", "0.5068434", "0.5062039", "0.5061781", "0.5052176", "0.5050067", "0.50426865", "0.50382215", "0.50255716", "0.5019719", "0.5018291", "0.5017341", "0.5015124", "0.5009296", "0.5005135", "0.49987453", "0.49966964", "0.49963638", "0.49928185", "0.49900806", "0.4980345", "0.49789265", "0.49757668", "0.49644276", "0.49609172", "0.4956386", "0.49515104", "0.4950413", "0.494999", "0.49496338", "0.49415308", "0.49393815", "0.49391684", "0.4938234", "0.49368367", "0.49224013", "0.4920617", "0.49178562", "0.49067098", "0.4906184", "0.4904713", "0.48992813", "0.4897864", "0.48954067", "0.4894211", "0.48895308", "0.48869714", "0.48826185", "0.48822826", "0.48815697", "0.4878674", "0.4873056", "0.487298" ]
0.0
-1
/ Code from template association_SetOneToMany
public boolean setCustomer(Customer aCustomer) { boolean wasSet = false; if (aCustomer == null) { return wasSet; } Customer existingCustomer = customer; customer = aCustomer; if (existingCustomer != null && !existingCustomer.equals(aCustomer)) { existingCustomer.removeBooking(this); } customer.addBooking(this); wasSet = true; return wasSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isOneToMany();", "protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}", "@Override\n\tvoid addOneToManyJoin(QueryBuilder sb, Relation relation, EFieldAccessType fieldReferenceType, SourceReference from, SourceReference to) {\n\t\t\n\t\t\n\t\tfinal String entityAliasName = from.getVarName();\n\t\tfinal String collectionAttrName = relation.getFrom().getAttribute().getName();\n\n\t\t// final String joinVarName = \"join\" + joinParamIdx++;\n\n\t\tfinal String joinVarName = to.getVarName();\n\t\t\n\t\taddOneToManyJoin(sb, entityAliasName, collectionAttrName, joinVarName);\n\t}", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "public void executeOneToManyAssociationsCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT *\n // FROM Supplier s\n Criteria criteria = session.createCriteria(Supplier.class);\n\n // INNER JOIN Product p\n // ON s.id = p.supplier_id\n // WHERE p.price > 25;\n criteria.createCriteria(\"products\").add(Restrictions.gt(\"price\", new Double(25.0)));\n\n displaySupplierList(criteria.list());\n transaction.commit();\n }", "Relations getGroupOfRelations();", "private void addOneToManyJoin(QueryBuilder sb, String entityAliasName, String collectionAttrName, String joinVarName) {\n\t\tsb.append(\" \")\n\t\t .append(entityAliasName).append(\".\").append(collectionAttrName)\n\t\t .append(\" \")\n\t\t .append(joinVarName);\n\t}", "public boolean isOneToMany() {\n\t\treturn singluarAttribute == null;\n\t}", "@Test\n\tpublic void oneToManyNoBind2() {\n\t\tSystem.out.println(\"============oneToManyNoBind2=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<Email> emails = Dao.queryForEntityList(Email.class, select(), u.all(), \",\", e.all(), from(), u.table(),\n\t\t\t\t\",\", e.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (Email email : emails) {\n\t\t\tSystem.out.println(email.getEmailName());\n\t\t\tUser user = email.getParentNode(User.class);\n\t\t\tSystem.out.println(\"\\t\" + user.getUserName());\n\t\t}\n\t}", "private void checkMappedByOneToMany(DeployBeanInfo<?> info, DeployBeanPropertyAssocMany<?> prop) {\n if (prop.isElementCollection()) {\n // skip mapping check\n return;\n }\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n if (targetDesc.isDraftableElement()) {\n // automatically turning on orphan removal and CascadeType.ALL\n prop.setModifyListenMode(BeanCollection.ModifyListenMode.REMOVALS);\n prop.getCascadeInfo().setSaveDelete(true, true);\n }\n\n if (prop.hasOrderColumn()) {\n makeOrderColumn(prop);\n }\n\n if (prop.getMappedBy() == null) {\n // if we are doc store only we are done\n // this allows the use of @OneToMany in @DocStore - Entities\n if (info.getDescriptor().isDocStoreOnly()) {\n prop.setUnidirectional();\n return;\n }\n\n if (!findMappedBy(prop)) {\n if (!prop.isO2mJoinTable()) {\n makeUnidirectional(prop);\n }\n return;\n }\n }\n\n // check that the mappedBy property is valid and read\n // its associated join information if it is available\n String mappedBy = prop.getMappedBy();\n\n // get the mappedBy property\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedManyToOne(prop, targetDesc, mappedBy);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyTo(tableJoin, true, tableJoin.getTable());\n }\n\n PropertyForeignKey foreignKey = mappedAssocOne.getForeignKey();\n if (foreignKey != null) {\n ConstraintMode onDelete = foreignKey.getOnDelete();\n switch (onDelete) {\n case SET_DEFAULT:\n case SET_NULL:\n case CASCADE: {\n // turn off cascade delete when we are using the foreign\n // key constraint to cascade the delete or set null\n prop.getCascadeInfo().setDelete(false);\n }\n }\n }\n }", "public Set<Relation> getRelations();", "@Test\n\tpublic void testAddLinkOkMultNtoNLinkedHashSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\n\tpublic void manyToManyTest() {\n\t\tSystem.out.println(\"============manyToManyTest=========\");\n\t\tUser u = new User();\n\t\tRole r = new Role();\n\t\tPrivilege p = new Privilege();\n\t\tUserRole ur = new UserRole();\n\t\tRolePrivilege rp = new RolePrivilege();\n\t\tDao.getDefaultContext().setShowSql(true);\n\t\tList<User> users = Dao.queryForEntityList(User.class,\n\t\t\t\tu.pagination(1, 10, //\n\t\t\t\t\t\tselect(), u.all(), \",\", ur.all(), \",\", r.all(), \",\", rp.all(), \",\", p.all(), from(), u.table(), //\n\t\t\t\t\t\t\" left join \", ur.table(), \" on \", oneToMany(), u.ID(), \"=\", ur.UID(), bind(), //\n\t\t\t\t\t\t\" left join \", r.table(), \" on \", oneToMany(), r.ID(), \"=\", ur.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", rp.table(), \" on \", oneToMany(), r.ID(), \"=\", rp.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", p.table(), \" on \", oneToMany(), p.ID(), \"=\", rp.PID(), bind(), //\n\t\t\t\t\t\t\" order by \", u.ID(), \",\", r.ID(), \",\", p.ID()));\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Role> roles = user.getUniqueNodeSet(Role.class);\n\t\t\tfor (Role role : roles)\n\t\t\t\tSystem.out.println(\"\\t\" + role.getRoleName());\n\t\t\tSet<Privilege> privs = user.getUniqueNodeSet(Privilege.class);\n\t\t\tfor (Privilege priv : privs)\n\t\t\t\tSystem.out.println(\"\\t\" + priv.getPrivilegeName());\n\t\t}\n\t}", "@Test\n\tpublic void oneToManyNoBind() {\n\t\tSystem.out.println(\"============oneToManyNoBind1=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", e.all(), from(), u.table(), \",\",\n\t\t\t\te.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Email> emails = user.getChildNodeSet(Email.class);\n\t\t\tfor (Email email : emails) {\n\t\t\t\tSystem.out.println(\"\\t\" + email.getEmailName());\n\t\t\t\tAssert.assertTrue(user == email.getParentNode(User.class));\n\t\t\t}\n\t\t}\n\t}", "public Relations() {\n relations = new ArrayList();\n }", "protected void insertOneToManyColumns(T object) {\n\t\tIterator<ColumnOneToManyMap> it = tableMap.getOneToManyColumns();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tColumnOneToManyMap oneToManyColumnMap = it.next();\r\n\t\t\tinsertIntoDatabase(object,oneToManyColumnMap);\r\n\t\t}\r\n\t}", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "Cascade createCascade();", "public ResultMap<Association> associations();", "public boolean containsRelations();", "public String[] listRelations();", "@Override\n\tprotected void cutOffLazyCollections(Direction entity) {\n\t}", "public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }", "public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }", "@SuppressWarnings({\"unchecked\"})\n public <T extends FamixAssociation> List<T> queryAssociationsBetweenEntitySets(\n List<? extends AbstractFamixEntity> set1, \n List<? extends AbstractFamixEntity> set2, \n java.lang.Class<T> associationType) throws EvolizerRuntimeException {\n\n associationType = (associationType != null) ? associationType : (Class<T>) org.evolizer.famix.model.entities.FamixAssociation.class;\n\n List<T> associations = new ArrayList<T>();\n try {\n Criteria invocationQuery = getHibernateSession().createCriteria(associationType).add(\n Restrictions.or(\n Restrictions.and(Restrictions.in(\"from\", set1), Restrictions.in(\"to\", set2)),\n Restrictions.and(Restrictions.in(\"to\", set1), Restrictions.in(\"from\", set2))\n )\n );\n\n associations = invocationQuery.list();\n } catch (HibernateException he) {\n fLogger.error(\"Error in queryAssociationsBetweenEntities \" + he.getMessage());\n throw new EvolizerRuntimeException(\"Error in queryAssociationsBetweenEntitySets\", he);\n } catch (EvolizerException ee) {\n fLogger.error(\"Error in queryAssociationsBetweenEntities \" + ee.getMessage());\n throw new EvolizerRuntimeException(\"Error in queryAssociationsBetweenEntitySets\", ee);\n }\n\n return associations;\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Override\n public void onRelationshipMapLoaded() {\n }", "public String getInverseRelationshipName ();", "public Map<String, Set<String>> getRelatedEntities() {\n return relatedEntities;\n }", "public interface HasRelation {\r\n\r\n\tpublic boolean addRelation(Relation relation);\r\n\tpublic boolean removeRelation(Relation relation);\r\n\tpublic List<Relation> getRelations();\r\n}", "private void checkMappedByManyToMany(DeployBeanPropertyAssocMany<?> prop) {\n // get the bean descriptor that holds the mappedBy property\n String mappedBy = prop.getMappedBy();\n if (mappedBy == null) {\n if (targetDescriptor(prop).isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n return;\n }\n\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocMany<?> mappedAssocMany = mappedManyToMany(prop, mappedBy, targetDesc);\n\n // define the relationships/joins on this side as the\n // reverse of the other mappedBy side ...\n DeployTableJoin mappedIntJoin = mappedAssocMany.getIntersectionJoin();\n DeployTableJoin mappendInverseJoin = mappedAssocMany.getInverseJoin();\n\n String intTableName = mappedIntJoin.getTable();\n\n DeployTableJoin tableJoin = prop.getTableJoin();\n mappedIntJoin.copyTo(tableJoin, true, targetDesc.getBaseTable());\n\n DeployTableJoin intJoin = new DeployTableJoin();\n mappendInverseJoin.copyTo(intJoin, false, intTableName);\n prop.setIntersectionJoin(intJoin);\n\n DeployTableJoin inverseJoin = new DeployTableJoin();\n mappedIntJoin.copyTo(inverseJoin, false, intTableName);\n prop.setInverseJoin(inverseJoin);\n\n if (targetDesc.isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n }", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}", "public abstract List<AbstractRelationshipTemplate> getIngoingRelations();", "private void addFromAssociation(final String elementName, final String collectionRole)\n \t\t\tthrows QueryException {\n \t\t//q.addCollection(collectionName, collectionRole);\n \t\tQueryableCollection persister = getCollectionPersister( collectionRole );\n \t\tType collectionElementType = persister.getElementType();\n \t\tif ( !collectionElementType.isEntityType() ) {\n \t\t\tthrow new QueryException( \"collection of values in filter: \" + elementName );\n \t\t}\n \n \t\tString[] keyColumnNames = persister.getKeyColumnNames();\n \t\t//if (keyColumnNames.length!=1) throw new QueryException(\"composite-key collection in filter: \" + collectionRole);\n \n \t\tString collectionName;\n \t\tJoinSequence join = new JoinSequence( getFactory() );\n \t\tcollectionName = persister.isOneToMany() ?\n \t\t\t\telementName :\n \t\t\t\tcreateNameForCollection( collectionRole );\n \t\tjoin.setRoot( persister, collectionName );\n \t\tif ( !persister.isOneToMany() ) {\n \t\t\t//many-to-many\n \t\t\taddCollection( collectionName, collectionRole );\n \t\t\ttry {\n \t\t\t\tjoin.addJoin( ( AssociationType ) persister.getElementType(),\n \t\t\t\t\t\telementName,\n \t\t\t\t\t\tJoinType.INNER_JOIN,\n \t\t\t\t\t\tpersister.getElementColumnNames(collectionName) );\n \t\t\t}\n \t\t\tcatch ( MappingException me ) {\n \t\t\t\tthrow new QueryException( me );\n \t\t\t}\n \t\t}\n \t\tjoin.addCondition( collectionName, keyColumnNames, \" = ?\" );\n \t\t//if ( persister.hasWhere() ) join.addCondition( persister.getSQLWhereString(collectionName) );\n \t\tEntityType elemType = ( EntityType ) collectionElementType;\n \t\taddFrom( elementName, elemType.getAssociatedEntityName(), join );\n \n \t}", "public interface IPersistentSet<T> extends IPersistent, IResource, Set<T>, ITable<T> \r\n{\r\n /**\r\n * Perform join of two sorted set. This method can be used to incrementally\r\n * join two or more inverse lists (represented using IPersistentSet collections).\r\n * For example, assume that we need to implement own primitive full text search engine\r\n * (please notice that Perst has builtin full text search engine).\r\n * So we have inverse index keyword-&gt;list of documents with occurrences of this keyword.\r\n * Given full text query (set of keywords) we need to locate all documents\r\n * which contains all specified keywords. It can be done in this way:\r\n * <code>\r\n * class FullTextSearchEngine extends PersistentResource {\r\n * Index&lt;IPersistentSet&lt;Document&gt;&gt; inverseIndex;\r\n * public FullTextSearchEngine(Storage storage) { \r\n * super(storage);\r\n * inverseIndex = storage.&lt;IPersistentSet&lt;Document&gt;&gt;createIndex(String.class, true);\r\n * }\r\n * public IterableIterator&lt;Document&gt; search(Collection&lt;String&gt; keywords) {\r\n * IterableIterator&lt;Document&lt; result = null;\r\n * for (String keyword : keywords) {\r\n * IPersistentSet&lt;Document&gt; occurrences = inverseIndex.get(keyword); \r\n * if (occurrences == null) {\r\n * return null;\r\n * }\r\n * result = occurrences.join(result);\r\n * }\r\n * return result;\r\n * }\r\n * }\r\n * </code>\r\n * \r\n * @param iterator set of object ordered by OID. Usually it is iterator of IPersistentSet class.\r\n * This parameter may be null, in this case iterator of the target persistent set is returned.\r\n * @return iterator through result of two sets join. Join is performed incrementally so join\r\n * of two large sets will not consume a lot of memory and first results of such join\r\n * can be obtains fast enough.\r\n */\r\n public IterableIterator<T> join(Iterator<T> iterator);\r\n}", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "public void unidirectionalOneToManyDeleteTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityC c1 = new EntityC();\n c1.setName(\"EntityC1\");\n EntityD d1 = new EntityD();\n d1.setName(\"EntityD1\");\n\n c1.getDs().add(d1);\n\n em.persist(c1);\n\n em.getTransaction().commit();\n\n Integer idC1 = c1.getId();\n Integer idD1 = d1.getId();\n \n em.getTransaction().begin();\n \n // remove the owning side\n em.remove(c1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityC c1 should have been removed!\", \n em.createQuery(\"SELECT c FROM EntityC c WHERE c.id = ?1\").setParameter(1, idC1).getResultList().size() == 0);\n assertTrue(\"EntityD d1 should have been removed!\", \n em.createQuery(\"SELECT d FROM EntityD d WHERE d.id = ?1\").setParameter(1, idD1).getResultList().size() == 0);\n\n em.close();\n }", "public KoleksiRelationExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "private void makeUnidirectional(DeployBeanPropertyAssocMany<?> oneToMany) {\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(oneToMany);\n Class<?> owningType = oneToMany.getOwningType();\n if (!oneToMany.getCascadeInfo().isSave()) {\n // The property MUST have persist cascading so that inserts work.\n Class<?> targetType = oneToMany.getTargetType();\n String msg = \"Error on \" + oneToMany + \". @OneToMany MUST have \";\n msg += \"Cascade.PERSIST or Cascade.ALL because this is a unidirectional \";\n msg += \"relationship. That is, there is no property of type \" + owningType + \" on \" + targetType;\n throw new PersistenceException(msg);\n }\n\n // mark this property as unidirectional\n oneToMany.setUnidirectional();\n // specify table and table alias...\n BeanTable beanTable = beanTable(owningType);\n // define the TableJoin\n DeployTableJoin oneToManyJoin = oneToMany.getTableJoin();\n if (!oneToManyJoin.hasJoinColumns()) {\n throw new RuntimeException(\"No join columns found to satisfy the relationship \" + oneToMany);\n }\n createUnidirectional(targetDesc, owningType, beanTable, oneToManyJoin);\n }", "boolean isSetFurtherRelations();", "@Test\n\tpublic void testAddLinkOkMultNtoNTreeSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(TreeSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(TreeSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n // remove the owning side\n em.remove(b1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() == 0);\n\n em.close();\n }", "public interface CollectionField extends RelationField {\n\n}", "boolean isMany();", "public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}", "private PSRelationshipConfigSet loadRelationshipConfigSet()\n throws PSException\n {\n return new PSRelationshipConfigSet(PSConfigManager.getInstance()\n .getXMLConfig(PSConfigurationFactory.RELATIONSHIPS_CFG)\n .getDocumentElement(), null, null);\n }", "Collection<AssociationEnd> getAssociations();", "@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }", "void unsetFurtherRelations();", "private void setRelationships(Map<String, StringBuilder> tablesSQLMap, \n\t\t\tTable table) {\n\t\tfor(String tableName : table.getRelationships().keySet()) {\n\t\t\tStringBuilder createStatement = tablesSQLMap.get(tableName);\n\t\t\tint length;\n\t\t\tStringBuilder constraint;\n\t\t\t\n\t\t\tswitch(table.getRelationships().get(tableName)) {\n\t\t\t\tcase MANYTOMANY:\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase ONETOMANY:\n\t\t\t\t\tconstraint = new StringBuilder();\n\t\t\t\t\tconstraint\n\t\t\t\t\t\t.append(\",\\n\\t\"+table.getTableName()+\"_id \")\n\t\t\t\t\t\t.append(ColumnType.INTEGER.getValue())\n\t\t\t\t\t\t.append(\" \"+ColumnConstraint.NOT_NULL.getValue()+\", \\n\\t\");\n\t\t\t\t\t\n\t\t\t\t\tconstraint\n\t\t\t\t\t\t.append(TableConstraint.FOREIGN_KEY.getValue())\n\t\t\t\t\t\t.append(\" (\"+tableName+\"_id)\")\n\t\t\t\t\t\t.append(\" \"+TableConstraint.REFERENCES)\n\t\t\t\t\t\t.append(\" \"+table.getTableName()+\"(\"+table.getTableName()+\"_id)\")\n\t\t\t\t\t\t.append(\" \"+TableConstraint.DELETE_CASCADE.getValue());\n\t\t\t\t\t\n\t\t\t\t\tlength = createStatement.length();\n\t\t\t\t\tcreateStatement.replace(length-6, length-5, constraint.toString());\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase ONETOONE:\n\t\t\t\t\tconstraint = new StringBuilder();\n\t\t\t\t\tconstraint\n\t\t\t\t\t\t.append(\",\\n\\t\"+table.getTableName()+\"_id \")\n\t\t\t\t\t\t.append(ColumnType.INTEGER.getValue())\n\t\t\t\t\t\t.append(\" \"+ColumnConstraint.NOT_NULL.getValue()+\", \\n\\t\");\n\t\t\t\t\t\n\t\t\t\t\tconstraint.append(TableConstraint.CONSTRAINT.getValue()+\" \")\n\t\t\t\t\t\t.append(\"fk_\"+table.getTableName()+\"_id\"+\" \")\n\t\t\t\t\t\t.append(TableConstraint.FOREIGN_KEY.getValue())\n\t\t\t\t\t\t.append(\" (\"+table.getTableName()+\"_id)\")\n\t\t\t\t\t\t.append(\" \"+TableConstraint.REFERENCES)\n\t\t\t\t\t\t.append(\" \"+table.getTableName()+\"(\"+table.getTableName()+\"_id)\")\n\t\t\t\t\t\t.append(\" \"+TableConstraint.DELETE_CASCADE.getValue());\n\t\t\t\t\t\n\t\t\t\t\tlength = createStatement.length();\n\t\t\t\t\tcreateStatement.replace(length-6, length-5, constraint.toString());\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void createAggregatedRelationship (AbstractStructureElement from, AbstractStructureElement to, ArrayList<KDMRelationship> relations) {\n\t\tif (from.getAggregated().size() > 0) {\r\n\t\t\t//System.out.println(\"MAIOR QUE 1, TODO\");\r\n\r\n\t\t\t//Andre - pega os aggragated que ja estão no from\r\n\t\t\tEList<AggregatedRelationship> aggregatedFROM = from.getAggregated();\t\t\r\n\r\n\t\t\t//Andre - começa um for nesses aggregated\r\n\t\t\tfor (int i = 0; i < aggregatedFROM.size(); i++) {\r\n\r\n\t\t\t\t//Andre - verifica se o aggregated que ja existe tem o mesmo destino que o que esta pra ser criado \r\n\t\t\t\tif (to.getName().equalsIgnoreCase(aggregatedFROM.get(i).getTo().getName())) {\r\n\r\n\t\t\t\t\t//Andre - se tiver o mesmo destino ele adiciona as relacoes novas e atualiza a densidade, depois disso ele pega e sai do for\r\n\t\t\t\t\t//ADICIONAR\r\n\r\n\t\t\t\t\taggregatedFROM.get(i).setDensity(aggregatedFROM.get(i).getDensity()+relations.size());\r\n\t\t\t\t\taggregatedFROM.get(i).getRelation().addAll(relations);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Andre - se for o ultimo aggregated do for e mesmo assim não encontrou o com o mesmo destino que esta pra ser criado \r\n\t\t\t\t//Andre - entao cria um novo aggregated para ser adicionado\r\n\t\t\t\t//se chegar no ultimo e nao encontrar\r\n\t\t\t\tif (i == (aggregatedFROM.size()-1)) {\r\n\r\n\t\t\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\t\t\tnewRelationship.setFrom(from);\r\n\t\t\t\t\tnewRelationship.setTo(to);\r\n\t\t\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t//Andre - se não tiver um agrregated na layer from adiciona um com as relacoes que podem entre duas layers\r\n\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\tnewRelationship.setFrom(from);\r\n\t\t\tnewRelationship.setTo(to);\r\n\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t}\r\n\r\n\t\t//Fernando - Limpando lista \r\n\t\trelations.clear();\r\n\t\tfrom = null;\r\n\t\tto = null;\r\n\r\n\r\n\t}", "public ResultMap<Association> associations(Pagination pagination);", "public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException;", "@Test\n @Transactional\n public void ManyToManyQuery() {\n SysRole role = roleDao.findOne(4l);\n role.getUsers().forEach(u-> System.out.println(u));\n }", "public void testListFK()\r\n throws Exception\r\n {\r\n try\r\n {\r\n addClassesToSchema(new Class[] {ShapeHolder3b.class, Rectangle3b.class, Circle3b.class, Square3b.class});\r\n\r\n PersistenceManager pm = pmf.getPersistenceManager();\r\n Transaction tx = pm.currentTransaction();\r\n Object id;\r\n try\r\n {\r\n // Create container and some shapes\r\n tx.begin();\r\n ShapeHolder3b container = new ShapeHolder3b(r.nextInt());\r\n Circle3 circle = new Circle3(r.nextInt(), 1.75);\r\n container.getShapeList().add(circle);\r\n Rectangle3b rectangle = new Rectangle3b(r.nextInt(), 1.0, 2.0);\r\n container.getShapeList().add(rectangle);\r\n assertEquals(2,container.getShapeList().size());\r\n pm.makePersistent(container);\r\n tx.commit();\r\n id = pm.getObjectId(container);\r\n pm.close();\r\n\r\n pm = pmf.getPersistenceManager();\r\n tx = pm.currentTransaction();\r\n tx.begin();\r\n ShapeHolder3b actual = (ShapeHolder3b) pm.getObjectById(id);\r\n assertEquals(2,actual.getShapeList().size());\r\n tx.commit();\r\n }\r\n finally\r\n {\r\n if (tx.isActive())\r\n {\r\n tx.rollback();\r\n }\r\n \r\n pm.close();\r\n }\r\n \r\n // TODO Extend this to then query the elements in the collection\r\n }\r\n finally\r\n {\r\n clean(Circle3b.class);\r\n clean(Rectangle3b.class);\r\n clean(ShapeHolder3b.class);\r\n }\r\n }", "public ResultMap<Association> associations(QName associationTypeQName);", "EReference getRelationReference();", "SelectSubSet createSelectSubSet();", "public Iterable<Relationship> getRelationships();", "@Override\n protected void setEmbeddableKeys() {\n }", "public ResultMap<Association> associations(QName associationTypeQName, Pagination pagination);", "private void generateBidirectionalCollectionChangeWorkUnits(AuditSync verSync, EntityPersister entityPersister,\n String entityName, Object[] newState, Object[] oldState,\n SessionImplementor session) {\n if (!verCfg.getGlobalCfg().isGenerateRevisionsForCollections()) {\n return;\n }\n \n // Checks every property of the entity, if it is an \"owned\" to-one relation to another entity.\n // If the value of that property changed, and the relation is bi-directional, a new revision\n // for the related entity is generated.\n String[] propertyNames = entityPersister.getPropertyNames();\n \n for (int i=0; i<propertyNames.length; i++) {\n String propertyName = propertyNames[i];\n RelationDescription relDesc = verCfg.getEntCfg().getRelationDescription(entityName, propertyName);\n if (relDesc != null && relDesc.isBidirectional() && relDesc.getRelationType() == RelationType.TO_ONE) {\n // Checking for changes\n Object oldValue = oldState == null ? null : oldState[i];\n Object newValue = newState == null ? null : newState[i];\n \n if (!Tools.entitiesEqual(session, oldValue, newValue)) {\n // We have to generate changes both in the old collection (size decreses) and new collection\n // (size increases).\n if (newValue != null) {\n // relDesc.getToEntityName() doesn't always return the entity name of the value - in case\n // of subclasses, this will be root class, no the actual class. So it can't be used here.\n String toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n if (newValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) newValue;\n \t toEntityName = session.bestGuessEntityName(newValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object from the proxy to later read its state. \n \t\t\t\t\t\t\tnewValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(newValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \tid = (Serializable) idMapper.mapToIdFromEntity(newValue);\n \t}\n \n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, newValue));\n }\n \n if (oldValue != null) {\n \tString toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n \tif(oldValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) oldValue;\n \t toEntityName = session.bestGuessEntityName(oldValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object as we'll read it's state anyway.\n \t\t\t\t\t\t\toldValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(oldValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \t\t\t\t\t\t\tid = (Serializable) idMapper.mapToIdFromEntity(oldValue);\n \t}\n \t\t\t\t\t\t\n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, oldValue));\n }\n }\n }\n }\n }", "public abstract List<AbstractRelationshipTemplate> getOutgoingRelations();", "private void markDuplicateRelationships(EntityInstanceImpl ei)\n {\n EntityInstanceImpl parent = ei.getParent();\n EntityDef entityDef = ei.getEntityDef();\n\n // Duplicate relationship searching phase I, see if a linked instance to\n // the target instance in the same object instance represents the\n // same relationship type AND has the same parent.\n for ( EntityInstanceImpl linked : ei.getLinkedInstances() )\n {\n // Check to make sure linked EI has a parent--it is possible for a root\n // to be flagged as included and we don't care about roots.\n if ( linked.isDeleted() || linked.getParent() == null )\n continue;\n\n if ( ei.isExcluded() )\n {\n if ( ! linked.isExcluded() )\n continue;\n }\n else\n {\n if ( ! linked.isIncluded() )\n continue;\n }\n\n EntityDef linkedEntityDef = linked.getEntityDef();\n\n // Linked EI must have the same relationship and it can't be derived.\n if ( linkedEntityDef.getErRelToken() == entityDef.getErRelToken() ||\n linkedEntityDef.isDerivedPath() )\n {\n continue;\n }\n\n // Now check to see if the parents are linked.\n EntityInstanceImpl linkParent = linked.getParent();\n for ( EntityInstanceImpl parentLinked : linkParent.getLinkedInstances() )\n {\n if ( parentLinked == parent )\n {\n if ( ei.isExcluded() )\n linked.dbhExcluded = true;\n else\n linked.dbhIncluded = true;\n\n break;\n }\n }\n } // for each linked instance...\n\n // Duplicate relationship searching, phase II, see if the parent of\n // the instance has a linked instance representing the same relationship\n // type which is also a child of one of the targets linked instances.\n\n // If the parent isn't linked then there are no duplicate relationships.\n if ( parent.getLinkedInstances().size() == 0 )\n return;\n\n for ( EntityInstanceImpl linked : parent.getLinkedInstances() )\n {\n // Check for appropriate include/exclude flag.\n if ( ei.isExcluded() )\n {\n if ( ! linked.isExcluded() )\n continue;\n }\n else\n {\n if ( ! linked.isIncluded() )\n continue;\n }\n\n EntityDef linkedEntityDef = linked.getEntityDef();\n\n // Check to see if the relationship for the EI linked to the parent is\n // the same as the relationship of the original EI.\n if ( linkedEntityDef.getErRelToken() != entityDef.getErRelToken() )\n continue; // Nope.\n\n // OK, we have an EI ('linked') that has the same relationship as\n // ei. Check to see if the parent of 'linked' (grandParent)\n // is linked with ei. If they are linked then 'linked'\n // has the same physical relationship as ei.\n EntityInstanceImpl grandParent = linked.getParent();\n for ( EntityInstanceImpl gp : ei.getLinkedInstances() )\n {\n if ( gp == grandParent )\n {\n if ( ei.isExcluded() )\n linked.dbhExcluded = true;\n else\n linked.dbhIncluded = true;\n\n break;\n }\n }\n } // for each linked instance of parent...\n }", "public void delRelations();", "@Test\n\tpublic void testRemoveViaSetLinkWithInverse() {\n\t\tAddress adr = new Address();\n\t\tadr.getType().setIdGenerator(new IdGeneratorNumeric());\n\t\tAssert.assertEquals(1, ((IdNumeric) adr.getId()).getNumber());\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tadr.addInhabitant(martin);\n\t\tadr.addInhabitant(jojo);\n\n\t\tCollection<Person> persons = new ArrayList<Person>();\n\t\tpersons.add(martin);\n\t\tadr.setInhabitants(persons);\n\n\t\tAssert.assertEquals(1, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\tadr.setInhabitants(new ArrayList<Person>());\n\n\t\tAssert.assertEquals(0, adr.getInhabitants().size());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\tadr.setInhabitants(null);\n\n\t\tAssert.assertNull(adr.getInhabitants());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "public Set<JavaproductModel> getproductList(Set<JavaproductModel> SetOfproductList){\n\n /* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the list of product resources that are needed.*/\n String strHibernateQuery = \"FROM JavaproductModel\";\n Query hibernateQuery = hibernateSession.createQuery(strHibernateQuery);\n SetOfproductList = new HashSet(hibernateQuery.list());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return SetOfproductList;\n }", "public interface MerchandiserEntities {\n\n static Entity outletEntity() {\n return new Entity(\n Entities.OUTLET_ENTITY,\n OutletModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletModel.name),\n field(OutletModel.address),\n field(OutletModel.qrCode),\n field(OutletModel.location, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationGps, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationNetwork, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.images, JavaType.ARRAY, hasManyOutletImages())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_TABLE,\n OutletTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletModel.name, OutletTable.name),\n column(OutletModel.address, OutletTable.address),\n column(OutletModel.qrCode, OutletTable.qr_code)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n Entities.locationMapping(OutletModel.location, OutletTable.location_id),\n Entities.locationMapping(OutletModel.locationGps, OutletTable.location_id_gps),\n Entities.locationMapping(OutletModel.locationNetwork, OutletTable.location_id_network),\n outletImagesMapping()\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneLocation() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n Entities.LOCATION_ENTITY\n );\n }\n\n static Relationship hasManyOutletImages() {\n return new Relationship(\n Relationship.Type.ONE_TO_MANY,\n Relationship.Name.HAS_MANY,\n Entities.OUTLET_IMAGE_ENTITY\n );\n }\n\n static VirtualRelationMappingImpl outletImagesMapping() {\n return new VirtualRelationMappingImpl(\n Entities.OUTLET_IMAGE_TABLE,\n Entities.OUTLET_IMAGE_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletModel.images,\n new RelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.YES,\n RelationMappingOptions.CascadeDelete.YES,\n true\n )\n );\n }\n\n static Entity outletImageEntity() {\n return new Entity(\n Entities.OUTLET_IMAGE_ENTITY,\n OutletImageModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletImageModel.title),\n field(OutletImageModel.description),\n field(OutletImageModel.uri),\n field(OutletImageModel.file),\n field(OutletImageModel.fileName),\n field(OutletImageModel.height),\n field(OutletImageModel.width),\n field(OutletImageModel.outlet, JavaType.OBJECT, hasOneOutlet())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_IMAGE_TABLE,\n OutletImageTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletImageModel.title, OutletImageTable.title),\n column(OutletImageModel.description, OutletImageTable.description),\n column(OutletImageModel.uri, OutletImageTable.uri),\n column(OutletImageModel.file, OutletImageTable.file),\n column(OutletImageModel.fileName, OutletImageTable.file_name),\n column(OutletImageModel.height, OutletImageTable.height),\n column(OutletImageModel.width, OutletImageTable.width)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n new DirectRelationMappingImpl(\n OUTLET_TABLE,\n OUTLET_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletImageModel.outlet,\n new DirectRelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.NO,\n RelationMappingOptions.CascadeDelete.NO,\n true,\n DirectRelationMappingOptions.LoadAndDelete.LOAD_AND_DELETE\n )\n )\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneOutlet() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n OUTLET_ENTITY\n );\n }\n\n static Entity locationEntity() {\n return new Entity(\n LOCATION_ENTITY,\n LocationModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n Entities.field(LocationModel.lat),\n Entities.field(LocationModel.lng),\n Entities.field(LocationModel.accuracy)\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n LOCATION_TABLE,\n LocationTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n Entities.column(LocationModel.lat, LocationTable.lat),\n Entities.column(LocationModel.lng, LocationTable.lng),\n Entities.column(LocationModel.accuracy, LocationTable.accuracy)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n Entities.baseRelationMappingsArray()\n )\n );\n }\n}", "private void generateRDFTriplesFromReferencingRow(\n \t\t\tSesameDataSet sesameDataSet, TriplesMap triplesMap, SubjectMap sm,\n \t\t\tSubjectMap psm, Set<GraphMap> pogm, Set<GraphMap> sgm,\n \t\t\tPredicateObjectMap predicateObjectMap, int n) throws SQLException,\n \t\t\tR2RMLDataError, UnsupportedEncodingException {\n \t\tMap<ColumnIdentifier, byte[]> smFromRow = applyValueToChildRow(sm, n);\n \t\tboolean nullFound = false;\n \t\tfor (ColumnIdentifier value : smFromRow.keySet())\n \t\t\tif (smFromRow.get(value) == null) {\n \t\t\t\tlog.debug(\"[R2RMLEngine:genereateRDFTriplesFromRow] NULL found, this object will be ignored.\");\n \t\t\t\tnullFound = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\tif (nullFound)\n \t\t\treturn;\n \t\tResource subject = (Resource) extractValueFromTermMap(sm, smFromRow,\n \t\t\t\ttriplesMap);\n \t\tlog.debug(\"[R2RMLEngine:generateRDFTriplesFromReferencingRow] Generate subject : \"\n \t\t\t\t+ subject.stringValue());\n \t\t// 4. Let predicates be the set of generated RDF terms that result from\n \t\t// applying each of the predicate-object map's predicate maps to\n \t\t// child_row\n \t\tSet<URI> predicates = new HashSet<URI>();\n \t\tfor (PredicateMap pm : predicateObjectMap.getPredicateMaps()) {\n \t\t\tMap<ColumnIdentifier, byte[]> pmFromRow = applyValueToChildRow(pm, n);\n \t\t\tURI predicate = (URI) extractValueFromTermMap(pm, pmFromRow,\n \t\t\t\t\ttriplesMap);\n \t\t\tlog.debug(\"[R2RMLEngine:generateRDFTriplesFromReferencingRow] Generate predicate : \"\n \t\t\t\t\t+ predicate);\n \t\t\tpredicates.add(predicate);\n \t\t}\n \t\t// 5. Let object be the generated RDF term that results from applying\n \t\t// psm to parent_row\n \t\tMap<ColumnIdentifier, byte[]> omFromRow = applyValueToParentRow(psm, n);\n \t\tResource object = (Resource) extractValueFromTermMap(psm, omFromRow,\n \t\t\t\tpsm.getOwnTriplesMap());\n \t\tlog.debug(\"[R2RMLEngine:generateRDFTriplesFromReferencingRow] Generate object : \"\n \t\t\t\t+ object);\n \t\t// 6. Let subject_graphs be the set of generated RDF terms that result\n \t\t// from applying each graph map of sgm to child_row\n \t\tSet<URI> subject_graphs = new HashSet<URI>();\n \t\tfor (GraphMap graphMap : sgm) {\n \t\t\tMap<ColumnIdentifier, byte[]> sgmFromRow = applyValueToChildRow(graphMap, n);\n \t\t\tURI subject_graph = (URI) extractValueFromTermMap(graphMap,\n \t\t\t\t\tsgmFromRow, triplesMap);\n \t\t\tlog.debug(\"[R2RMLEngine:generateRDFTriplesFromReferencingRow] Generate subject graph : \"\n \t\t\t\t\t+ subject_graph);\n \t\t\tsubject_graphs.add(subject_graph);\n \t\t}\n \t\t// 7. Let predicate-object_graphs be the set of generated RDF terms\n \t\t// that result from applying each graph map in pogm to child_row\n \t\tSet<URI> predicate_object_graphs = new HashSet<URI>();\n \t\tfor (GraphMap graphMap : pogm) {\n \t\t\tMap<ColumnIdentifier, byte[]> pogmFromRow = applyValueToChildRow(graphMap, n);\n \t\t\tURI predicate_object_graph = (URI) extractValueFromTermMap(\n \t\t\t\t\tgraphMap, pogmFromRow, triplesMap);\n \t\t\tlog.debug(\"[R2RMLEngine:generateRDFTriplesFromReferencingRow] Generate predicate object graph : \"\n \t\t\t\t\t+ predicate_object_graph);\n \t\t\tpredicate_object_graphs.add(predicate_object_graph);\n \t\t}\n \t\t// 8. For each predicate in predicates, add triples to the output\n \t\t// dataset\n \t\tfor (URI predicate : predicates) {\n \t\t\t// If neither sgm nor pogm has any graph maps: rr:defaultGraph;\n \t\t\t// otherwise: union of subject_graphs and predicate-object_graphs\n \t\t\tSet<URI> targetGraphs = new HashSet<URI>();\n \t\t\ttargetGraphs.addAll(subject_graphs);\n \t\t\ttargetGraphs.addAll(predicate_object_graphs);\n \t\t\taddTriplesToTheOutputDataset(sesameDataSet, subject, predicate,\n \t\t\t\t\tobject, targetGraphs);\n \t\t}\n \t}", "public XIterable<ArticleX> relateds() {\n\t\tfinal IteratorList<ReadNode> relateds = node().refChildren(\"related\").iterator() ;\n\t\treturn XIterable.create(domain(), relateds.toList(), MapUtil.<String, String>newMap(), ArticleX.class) ;\n\t}", "@Override\n public void newBundlesAdded(Set<Bundle> set) {\n// System.err.println(\"newBundlesAdded(set.size = \" + set.size() + \")\");\n Bundles as_bundles = getRTParent().getRootBundles().subset(set);\n for (int i=0;i<active_relationships.size();i++) {\n// System.err.println(\" newBundlesAdded(): Adding In Relationship \" + i + \" \\\"\" + active_relationships.get(i) + \"\\\"... bundles.size() = \" + as_bundles.size());\n addRelationship(active_relationships.get(i), false, as_bundles);\n }\n }", "Table getReferences();", "TypeAssociationEXT getConcerneUniteUnite();", "@Override\n protected void set(java.util.Collection<org.tair.db.locusdetail.IPolymorphismSite> list) {\n polymorphismSite = list;\n // Add the primary keys to the serialized key list if there are any.\n if (polymorphismSite != null) {\n for (com.poesys.db.dto.IDbDto object : polymorphismSite) {\n polymorphismSiteKeys.add(object.getPrimaryKey());\n }\n }\n }", "private void indirectAssociations_DeriveIndirectInheritance() {\n try{\n \tList<FamixAssociation> indirectInheritanceAssociations = new ArrayList<FamixAssociation>();\n\t for (FamixAssociation directAssociation : theModel.associations) {\n if (directAssociation.to == null || directAssociation.from == null || directAssociation.to.equals(\"\") || directAssociation.from.equals(\"\")){ \n \tnumberOfNotConnectedWaitingAssociations ++;\n }\n else if (directAssociation instanceof FamixInheritanceDefinition){ \n \t\t\t\tindirectInheritanceAssociations.addAll(indirectAssociations_AddIndirectInheritanceAssociation(directAssociation.from, directAssociation.to, directAssociation.lineNumber));\n\t\t\t\t}\n\t\t\t}\n\t for (FamixAssociation indirectInheritanceAssociation : indirectInheritanceAssociations) {\n\t \taddToModel(indirectInheritanceAssociation);\n\t }\n } catch (Exception e) {\n\t this.logger.debug(new Date().toString() + \" \" + e);\n\t e.printStackTrace();\n }\n }", "private boolean setForeignKeys( EntityInstanceImpl ei )\n {\n final EntityDef entityDef = ei.getEntityDef();\n final Set<EntityInstanceImpl> srcInstances = fkSourcesForEi.get( ei );\n if ( srcInstances == null || srcInstances.size() == 0 )\n return true; // No FKs to set.\n\n // Loop through all the source instances for ei's FKs.\n // Use an iterator because we may need to remove the srcInstance.\n for ( Iterator<EntityInstanceImpl> iter = srcInstances.iterator(); iter.hasNext(); )\n {\n EntityInstanceImpl srcInstance = iter.next();\n\n // If the source instance hasn't had been created yet then we need to wait\n // and try again later.\n if ( requiresCreate( srcInstance ) )\n continue;\n\n // The RelRecord that defines the relationship between ei and srcInstance\n // will be in the entity that is a child (or descendant) of the parent. Find which\n // entity is below the other.\n DataRecord dataRecord;\n EntityInstanceImpl childInstance;\n if ( srcInstance.getDepth() < ei.getDepth() )\n {\n // ei is under srcInstance\n dataRecord = entityDef.getDataRecord();\n childInstance = ei;\n }\n else\n {\n // srcInstance is under ei.\n dataRecord = srcInstance.getEntityDef().getDataRecord();\n childInstance = srcInstance;\n }\n\n final RelRecord relRecord = dataRecord.getRelRecord();\n final RelFieldParser p = new RelFieldParser();\n\n // Loop through the relationships for childInstance and find the one(s)\n // for srcInstance-ei\n for ( final RelField relField : relRecord.getRelFields() )\n {\n p.parse( relField, childInstance );\n\n // We only want the relField that copies a FK from srcInstance to ei.\n if ( p.srcInstance != srcInstance )\n continue;\n\n assert p.relInstance == ei;\n\n if ( ei.isCreated() || ei.isIncluded() )\n {\n p.copySrcToRel();\n\n // We've copied the FK to ei. Remove srcInstance from the list of required sources.\n iter.remove();\n }\n else\n {\n // If the foreign key is a key to the target entity, then\n // we cannot null the key because we would lose the\n // capability of updating the entity (in this case it\n // better be deleted!!!)\n assert ! p.relAttributeDef.isKey();\n assert ei.isExcluded(); // EI is hidden and we've ignored deleted EIs above.\n\n // If the EI is excluded and the min cardinality is 1, we'll get an error\n // if we set the FK to null. We will assume that a different entity is being\n // included which will set the FK to a non-null value. We can assume this because\n // the OI has passed cardinality validation and if no EI was being included it\n // would have thrown a validation exception.\n if ( entityDef.getMinCardinality() == 0)\n p.relInstance.getAttribute( p.relAttributeDef ).setInternalValue( null, true );\n }\n\n // Turn off the dbh flag to make sure that the DBHandler updates\n // the instance.\n ei.dbhUpdated = false;\n\n } // for each rel field...\n }\n\n // If fkSourcesForEi contains an entry for ei then we are done setting FKs only\n // if there are no more source instances for ei.\n if ( fkSourcesForEi.containsKey( ei ) )\n return fkSourcesForEi.get( ei ).size() == 0;\n\n return true;\n }", "List<ObjectRelation> getObjectRelations(int otId) throws AccessDeniedException;", "private void generateRDFTriplesFromReferencingObjectMap(\n \t\t\tSesameDataSet sesameDataSet, TriplesMap triplesMap, SubjectMap sm,\n \t\t\tSet<GraphMap> sgm, PredicateObjectMap predicateObjectMap,\n \t\t\tReferencingObjectMap referencingObjectMap) throws SQLException,\n \t\t\tR2RMLDataError, UnsupportedEncodingException {\n \t\tSubjectMap psm = referencingObjectMap.getParentTriplesMap()\n \t\t\t\t.getSubjectMap();\n \t\t// 2. Let pogm be the set of graph maps of the predicate-object map\n \t\tSet<GraphMap> pogm = predicateObjectMap.getGraphMaps();\n \t\t// 3. Let n be the number of columns in the logical table of the triples\n \t\t// map\n \t\tint n = meta.getColumnCount();\n \t\t// 4. Let rows be the result of evaluating the joint SQL query of the\n \t\t// referencing object map\n \t\treferencingRows = constructJointTable(referencingObjectMap);\n \t\t// 5. For each row in rows, apply the following method\n \t\twhile (referencingRows.next())\n \t\t\tgenerateRDFTriplesFromReferencingRow(sesameDataSet, triplesMap, sm,\n \t\t\t\t\tpsm, pogm, sgm, predicateObjectMap, n);\n \t}", "public void addRelation(String value) {\n/* 262 */ addStringToBag(\"relation\", value);\n/* */ }", "public Set<JavaaccountModel> getaccountList(Set<JavaaccountModel> SetOfaccountList){\n\n /* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the list of account resources that are needed.*/\n String strHibernateQuery = \"FROM JavaaccountModel\";\n Query hibernateQuery = hibernateSession.createQuery(strHibernateQuery);\n SetOfaccountList = new HashSet(hibernateQuery.list());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return SetOfaccountList;\n }", "public Collection<Reference> getReferences();", "public void setRelatedTo(java.lang.String value);", "public List<ForeignKey> getForeignKeysIn();", "@Override\n public void updateBys() { updateLabelLists(getRTParent().getEntityTagTypes()); fillCommonRelationshipsMenu(); }", "@Test\n\tpublic void testAddLinkInvalidSameLinkTwiceArrayList() {\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tTypePropertyCollection proptype = (TypePropertyCollection) adr.getProperty(\"inhabitants\").getType();\n\t\tClass<?> colClassBefore = proptype.getCollectionClass();\n\t\ttry {\n\t\t\tproptype.setCollectionClass(ArrayList.class);\n\t\t\tAssert.assertSame(ArrayList.class, proptype.getCollectionClass());\n\t\t\tAssert.assertNull(adr.getInhabitants());\n\t\t\tAssert.assertNull(martin.getAddress());\n\n\t\t\t// add the same Person to the Address as inhabitant twice\n\t\t\tadr.addInhabitant(martin);\n\t\t\ttry {\n\t\t\t\t// should Assert.fail because of the association end with\n\t\t\t\t// multiplicity\n\t\t\t\t// 1\n\t\t\t\tadr.addInhabitant(martin);\n\t\t\t\tAssert.fail(\"expected ValidationException exception\");\n\t\t\t} catch (ValidationException e) {\n\t\t\t\tAssert.assertTrue(true);\n\t\t\t}\n\t\t} finally {\n\t\t\tproptype.setCollectionClass(colClassBefore);\n\t\t}\n\t}", "RelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);", "Set<II> getIds();", "@Override\n \tpublic void addIsCitedBy(Reference reference) {\n \t\tList<Reference> isCitedBy = getIsCitedBy();\n \t\t// check for existing relationship\n \t\tif (reference == null || isCitedBy.contains(reference))\n \t\t\treturn;\n \t\t// add both sides of relationship\n \t\treference.getCitationList().add(this);\n \t\tisCitedBy.add(reference);\n \t}", "public interface EntityTable<T extends Entity> extends Set<T>, Serializable {\n\n\t/**\n\t * Get all Entities stored in this table at a specified location. Note that the members of this Collection\n\t * may change over time. This method makes two guarantees: that at the time of being called, all members of\n\t * this Set with the specified Location will be present in the Collection; and that all future members of the\n\t * Collection will also have that Location.\n\t *\n\t * @param loc the Location to find Entities from\n\t * @return a Collection view of the entities with Location loc\n\t */\n\tSet<T> get(Location loc);\n\n\tstatic <T extends Entity> EntityTable<T> unmodifiable(EntityTable<T> et) {\n\t\treturn new UnmodifiableEntityTable<>(et);\n\t}\n\n\t/**\n\t * Basic wrapper class to prevent external modification\n\t */\n\tclass UnmodifiableEntityTable<E extends Entity> implements EntityTable<E> {\n\n\t\tprivate final EntityTable<E> parent;\n\n\t\tpublic UnmodifiableEntityTable(EntityTable<E> parent) {\n\t\t\tthis.parent = parent;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean add(E e) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic Iterator iterator() {\n\t\t\treturn parent.iterator();\n\t\t}\n\n\t\t@Override\n\t\tpublic int size() {\n\t\t\treturn parent.size();\n\t\t}\n\n\t\t@Override\n\t\tpublic Set<E> get(Location loc) {\n\t\t\tSet<E> out = parent.get(loc);\n\t\t\t//System.out.println(out);\n\t\t\treturn out;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn parent.isEmpty();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn parent.contains(o);\n\t\t}\n\n\t\t@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn parent.toArray();\n\t\t}\n\n\t\t@Override\n\t\tpublic Object[] toArray(Object[] a) {\n\t\t\treturn parent.toArray(a);\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean remove(Object o) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean containsAll(Collection c) {\n\t\t\treturn parent.containsAll(c);\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean addAll(Collection c) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean retainAll(Collection c) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean removeAll(Collection c) {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\n\t\t@Override\n\t\tpublic void clear() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t}\n\t}\n}", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "public void loadAssociations() {\n\n\t\tinitListSettingNames();\n\n\t\taddDefaultAssociations();\n\t}", "private void generateBidirectionalCollectionChangeWorkUnits(AuditSync verSync, AbstractCollectionEvent event,\n PersistentCollectionChangeWorkUnit workUnit) {\n if (!verCfg.getGlobalCfg().isGenerateRevisionsForCollections()) {\n return;\n }\n \n // Checking if this is not a bidirectional relation - then, a revision needs also be generated for\n // the other side of the relation.\n RelationDescription relDesc = verCfg.getEntCfg().getRelationDescription(event.getAffectedOwnerEntityName(),\n workUnit.getReferencingPropertyName());\n \n // relDesc can be null if this is a collection of simple values (not a relation).\n if (relDesc != null && relDesc.isBidirectional()) {\n String relatedEntityName = relDesc.getToEntityName();\n IdMapper relatedIdMapper = verCfg.getEntCfg().get(relatedEntityName).getIdMapper();\n \n for (PersistentCollectionChangeData changeData : workUnit.getCollectionChanges()) {\n Object relatedObj = changeData.getChangedElement();\n Serializable relatedId = (Serializable) relatedIdMapper.mapToIdFromEntity(relatedObj);\n \n verSync.addWorkUnit(new CollectionChangeWorkUnit(event.getSession(), relatedEntityName, verCfg,\n \t\t\t\t\t\trelatedId, relatedObj));\n }\n }\n }", "@Override\r\n\tpublic void addAssociations(Criteria criteria) {\r\n\r\n\t\tif (immunization.getPatient() != null) {\r\n\t\t\tcriteria = criteria.add(Restrictions.eq(\"patient.id\", immunization\r\n\t\t\t\t\t.getPatient().getId()));\r\n\t\t}\r\n\r\n\t\tif (immunization.getVaccine() != null) {\r\n\t\t\tcriteria = criteria.add(Restrictions.eq(\"vaccine.id\", immunization\r\n\t\t\t\t\t.getVaccine().getId()));\r\n\t\t}\r\n\r\n\t}", "BSet createBSet();", "protected void setEmbeddableKeys() {\n }", "void setAssociatedObject(IEntityObject relatedObj);", "@OneToMany (fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy = \"employeeEntity\")\n\n public Set<InventoryBookEntity> getInventoryBookEntities() {\n return inventoryBookEntities;\n }", "@Override\n\t\tpublic Iterable<Relationship> getRelationships() {\n\t\t\treturn null;\n\t\t}", "@Override\n \tpublic void setIsPartOf(Reference isPartOf) {\n \t\t// do nothing if relationship not changed\n \t\tif (this.isPartOf == isPartOf)\n \t\t\treturn;\n \t\t// remove from inverse relationship\n \t\tif (this.isPartOf != null) {\n \t\t\tthis.isPartOf.getContains().remove(this);\n \t\t}\n \t\t// set forward relationship\n \t\tthis.isPartOf = isPartOf;\n \t\tif (isPartOf == null)\n \t\t\treturn;\n \t\t// set inverse relationship\n \t\tisPartOf.getContains().add(this);\n \t}", "public void addRelations(T model);" ]
[ "0.68162", "0.60618997", "0.6006999", "0.59040445", "0.588496", "0.58689445", "0.5859331", "0.5838866", "0.57942027", "0.57346684", "0.57047653", "0.5690567", "0.5664171", "0.56603974", "0.5589287", "0.55782676", "0.5568571", "0.5504814", "0.5476821", "0.5468078", "0.54156375", "0.538956", "0.53776944", "0.5341262", "0.5317779", "0.5297959", "0.5280853", "0.5264775", "0.52569824", "0.52445793", "0.5243811", "0.52379197", "0.52337", "0.5232076", "0.5210702", "0.5183073", "0.5181309", "0.51812327", "0.5179575", "0.5159978", "0.5158559", "0.5155562", "0.51403874", "0.5126172", "0.51113796", "0.5108761", "0.50987184", "0.5085697", "0.5076933", "0.50543535", "0.50479066", "0.5045098", "0.50403965", "0.50370383", "0.50260586", "0.5024949", "0.50163865", "0.501552", "0.4999545", "0.49920288", "0.49793354", "0.49746832", "0.4967735", "0.49648663", "0.49593854", "0.49518463", "0.49493754", "0.49466074", "0.49409348", "0.4939418", "0.4933184", "0.49310285", "0.49163705", "0.4897366", "0.48916575", "0.48891953", "0.48891062", "0.48727745", "0.48654857", "0.48571548", "0.4852969", "0.48524302", "0.48472744", "0.48472", "0.4841574", "0.4833217", "0.48323628", "0.48252112", "0.4821199", "0.48194256", "0.4810226", "0.48091775", "0.48088083", "0.48069513", "0.48012978", "0.47987318", "0.47978872", "0.47972608", "0.47830665", "0.47796655", "0.47776487" ]
0.0
-1
/ Code from template association_MinimumNumberOfMethod
public static int minimumNumberOfTimeSlots() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getMinInstances();", "int getMinimalIterationCount();", "public abstract int getMinimumArguments();", "int getMinInstances();", "int getMaxCount();", "int getMaxCount();", "int sizeOfRelatedArray();", "public abstract int numOfSameTypeNeighbourToReproduce();", "public int size() {\n\t\treturn minimums.size();\n\t}", "int countAssociations();", "@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}", "public abstract Integer getNumberOfElements();", "int getConstraintsCount();", "int getNumberOfNecessaryAttributes();", "int cardinality();", "public abstract int getNbMinColumns( );", "public abstract int getCntOther();", "Object getNumberMatched();", "public static int minimumNumberOfLineItems() {\n return 0;\n }", "int numberOfCandidates();", "public abstract int numOfEmptyToReproduce();", "int getMaximalIterationCount();", "public int countOfGenerations ();", "public int getNrOfAssociations() {\n int size = 0;\n for (PriorityCollection associations : memory.values()) {\n size += associations.size();\n }\n return size;\n }", "int getNumItems();", "public int getMinionCount() {\r\n\t\treturn this.minions;\r\n\t}", "int getOverriddenCount();", "int getGenerations();", "public abstract int preN();", "public static int minimumNumberOfPayments() {\n return 0;\n }", "default int getMemberCount() {\r\n return Range.UNINITALIZED;\r\n }", "int getRequestedValuesCount();", "public abstract int getMaximumArguments();", "@Override\n protected int getMinEntries(final PropertyContext context) {\n return 2;\n }", "long getMaxItemFindings();", "int getMaxSetSize(Object modelID) throws Exception;", "@Override\n\tpublic int max() {\n\t\treturn 4;\n\t}", "@Override\n\tpublic int getMaximumNumberOfItemsForInOperator() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getPropertyCount() {\n\t\treturn 5;\n\t}", "@Override\n\tpublic int getPropertyCount() {\n\t\treturn 5;\n\t}", "@objid (\"258318a3-c0bd-4ddc-971b-1e72b90fcbb1\")\n String getMultiplicityMin();", "int getOtherIdsCount();", "public int getNumberOfElements();", "public long numCandidates();", "public int getCardinality();", "public int getLowerBound ()\n\t{\n\t\treturn getRelationshipImpl().getLowerBound();\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 4;\n\t}", "public int getMinimumVertexCount()\r\n {\r\n return theMinimumVertexCount;\r\n }", "int getNumberOfInfantry();", "public void InitializeMaxNumInstances(int num) {\n }", "public Integer getInterestedInItemsCount();", "public int getNumOfClasses();", "Long getNumberOfElement();", "int getAnnotationsLimit();", "static void minimumBribes(int[] q) {\n\n\t\ttry {\n\t\t\tSystem.out.println(amountOfPeopleBribed(q));\n\t\t} catch (TooManyBribedPeople e) {\n\t\t\tSystem.out.println(\"Too chaotic\");\n\t\t}\n\t}", "public int getMaxGenerations() { return maxGenerations; }", "int getNumParameters();", "int getNumOfRetrievelRequest();", "int getNumOfRetrievelRequest();", "int getMaxNumberOfRows();", "@Override\n public int[] getNumNondefaultElements() {\n return base.getNumNondefaultElements();\n }", "protected int defaultNumAttributes() {\n return 10;\n }", "int sizeOfControlPersonsArray();", "public abstract int getMinimumValue();", "public int GetNMissing();", "public static void main(String[] args) {\n\t\tRange_Addition_II_598 r=new Range_Addition_II_598();\n\t\tint m=3;\n\t\tint n=3;\t\t\n\t\tint[][] ops=new int[][]{\t\t\t\n\t\t};\n\t\tSystem.out.println(r.maxCount(m, n, ops));\n\t}", "public abstract int numOfFoodCellToReproduce();", "public abstract int getMaxChildren();", "int getLimit();", "int getLimit();", "public int getMinimumInteger() {\n/* 190 */ return (int)this.min;\n/* */ }", "int getMaxInstances();", "@Override\n public int getNbObjets() {\n return _listeEquipement.getNbMaxEq();\n }", "int getPartsCount();", "int getPartsCount();", "public int donnePoidsMax() { return this.poidsMax; }", "public int getMinSelectCount() {\n return mMinSelectCount;\n }", "@Override\n\tpublic int cardinality() {\n\t\treturn 2;\n\t}", "@Test\n public void test_kmin_Integer_Collection5() {\n List<Integer> i5 = new ArrayList<Integer>();\n i5.add(3);\n i5.add(7);\n i5.add(3);\n i5.add(3);\n i5.add(1);\n i5.add(9);\n i5.add(1);\n i5.add(1);\n i5.add(1);\n i5.add(5);\n int actual = Selector.kmin(i5, 2, new CompareIntegerAscending());\n int expected = 3;\n Assert.assertEquals(\"Failed in duplicate, size 10 list\", expected, actual);\n }", "int getMissingCount();", "public abstract int deepRowCount();", "public int size (){\n return N;\n }", "Limit createLimit();", "public int numberOfOccorrence();", "public abstract int getCntPrepaid();", "public int getCountMin() {\n\t\treturn countMin;\n\t}", "int getN();", "public int getMinIntValue();", "public int getNumberOfAvailableGenotypeCalls();", "public int size(){return n;}", "int getParentIdCount();", "public int getMinInstances() {\n return minInstances;\n }", "public int getNumGruppoPacchetti();", "public int numMines() {\n\t /*return the total number of mines in the field*/\n return numMines; \n }", "int sizeOfClassificationArray();", "int sizeOfControlPersonsExtArray();", "public int size(){\r\n\t\treturn N;\r\n\t}", "public int nEigenOneOrGreater(){\n if(!this.pcaDone)this.pca();\n return this.greaterThanOneLimit;\n }", "int getSuperClassesCount();", "public abstract int getMaxIntermediateSize();", "public abstract void countLaunchingActivities(int num);" ]
[ "0.62703955", "0.6212025", "0.6137485", "0.6095629", "0.59732234", "0.59732234", "0.5958377", "0.5932724", "0.584557", "0.5832059", "0.58308935", "0.5776048", "0.57328427", "0.57298136", "0.5718645", "0.5687772", "0.5666648", "0.5666123", "0.5659134", "0.5649407", "0.56426466", "0.56371987", "0.5627658", "0.56162095", "0.55914235", "0.5569042", "0.55599016", "0.5558229", "0.5555934", "0.55191714", "0.5516322", "0.5515831", "0.5509612", "0.55087394", "0.5484482", "0.5456766", "0.54507995", "0.54447216", "0.5441577", "0.5441577", "0.5441567", "0.5433012", "0.54255456", "0.54034877", "0.5395792", "0.53926253", "0.5391161", "0.53882647", "0.53624487", "0.53601", "0.53571355", "0.5354816", "0.53377324", "0.53342164", "0.53339666", "0.5333173", "0.5325326", "0.5324462", "0.5324462", "0.5315879", "0.53112835", "0.5308125", "0.5307166", "0.5304604", "0.5295013", "0.5293016", "0.52915573", "0.5282536", "0.52818495", "0.52818495", "0.52809167", "0.52682006", "0.52670103", "0.5262275", "0.5262275", "0.52605516", "0.52519745", "0.5249248", "0.52304035", "0.52274", "0.52273226", "0.5224809", "0.52223086", "0.5220666", "0.5210448", "0.52075154", "0.5206859", "0.5206469", "0.5192483", "0.51912767", "0.5190951", "0.5188848", "0.51759285", "0.51748896", "0.5174398", "0.51673305", "0.5155909", "0.5155753", "0.51557386", "0.5154503", "0.5152642" ]
0.0
-1
/ Code from template association_AddManyToManyMethod
public boolean addTimeSlot(TimeSlot aTimeSlot) { boolean wasAdded = false; if (timeSlots.contains(aTimeSlot)) { return false; } timeSlots.add(aTimeSlot); if (aTimeSlot.indexOfAppointment(this) != -1) { wasAdded = true; } else { wasAdded = aTimeSlot.addAppointment(this); if (!wasAdded) { timeSlots.remove(aTimeSlot); } } return wasAdded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void manyToManyTest() {\n\t\tSystem.out.println(\"============manyToManyTest=========\");\n\t\tUser u = new User();\n\t\tRole r = new Role();\n\t\tPrivilege p = new Privilege();\n\t\tUserRole ur = new UserRole();\n\t\tRolePrivilege rp = new RolePrivilege();\n\t\tDao.getDefaultContext().setShowSql(true);\n\t\tList<User> users = Dao.queryForEntityList(User.class,\n\t\t\t\tu.pagination(1, 10, //\n\t\t\t\t\t\tselect(), u.all(), \",\", ur.all(), \",\", r.all(), \",\", rp.all(), \",\", p.all(), from(), u.table(), //\n\t\t\t\t\t\t\" left join \", ur.table(), \" on \", oneToMany(), u.ID(), \"=\", ur.UID(), bind(), //\n\t\t\t\t\t\t\" left join \", r.table(), \" on \", oneToMany(), r.ID(), \"=\", ur.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", rp.table(), \" on \", oneToMany(), r.ID(), \"=\", rp.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", p.table(), \" on \", oneToMany(), p.ID(), \"=\", rp.PID(), bind(), //\n\t\t\t\t\t\t\" order by \", u.ID(), \",\", r.ID(), \",\", p.ID()));\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Role> roles = user.getUniqueNodeSet(Role.class);\n\t\t\tfor (Role role : roles)\n\t\t\t\tSystem.out.println(\"\\t\" + role.getRoleName());\n\t\t\tSet<Privilege> privs = user.getUniqueNodeSet(Privilege.class);\n\t\t\tfor (Privilege priv : privs)\n\t\t\t\tSystem.out.println(\"\\t\" + priv.getPrivilegeName());\n\t\t}\n\t}", "private void checkMappedByManyToMany(DeployBeanPropertyAssocMany<?> prop) {\n // get the bean descriptor that holds the mappedBy property\n String mappedBy = prop.getMappedBy();\n if (mappedBy == null) {\n if (targetDescriptor(prop).isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n return;\n }\n\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocMany<?> mappedAssocMany = mappedManyToMany(prop, mappedBy, targetDesc);\n\n // define the relationships/joins on this side as the\n // reverse of the other mappedBy side ...\n DeployTableJoin mappedIntJoin = mappedAssocMany.getIntersectionJoin();\n DeployTableJoin mappendInverseJoin = mappedAssocMany.getInverseJoin();\n\n String intTableName = mappedIntJoin.getTable();\n\n DeployTableJoin tableJoin = prop.getTableJoin();\n mappedIntJoin.copyTo(tableJoin, true, targetDesc.getBaseTable());\n\n DeployTableJoin intJoin = new DeployTableJoin();\n mappendInverseJoin.copyTo(intJoin, false, intTableName);\n prop.setIntersectionJoin(intJoin);\n\n DeployTableJoin inverseJoin = new DeployTableJoin();\n mappedIntJoin.copyTo(inverseJoin, false, intTableName);\n prop.setInverseJoin(inverseJoin);\n\n if (targetDesc.isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n }", "@Test\n @Transactional\n public void ManyToManyQuery() {\n SysRole role = roleDao.findOne(4l);\n role.getUsers().forEach(u-> System.out.println(u));\n }", "@ManyToMany//(cascade = {CascadeType.PERSIST, CascadeType.MERGE})\n public List<Person> getParticipants() {\n return participants;\n }", "@Override\n\tvoid addOneToManyJoin(QueryBuilder sb, Relation relation, EFieldAccessType fieldReferenceType, SourceReference from, SourceReference to) {\n\t\t\n\t\t\n\t\tfinal String entityAliasName = from.getVarName();\n\t\tfinal String collectionAttrName = relation.getFrom().getAttribute().getName();\n\n\t\t// final String joinVarName = \"join\" + joinParamIdx++;\n\n\t\tfinal String joinVarName = to.getVarName();\n\t\t\n\t\taddOneToManyJoin(sb, entityAliasName, collectionAttrName, joinVarName);\n\t}", "@SuppressWarnings( \"unchecked\" )\n public static <T> ManyAssociationFunction<T> manyAssociation( ManyAssociation<T> association )\n {\n return ( (ManyAssociationReferenceHandler<T>) Proxy.getInvocationHandler( association ) ).manyAssociation();\n }", "boolean isOneToMany();", "public void insertManyToManyValues(Class sourceClass, Class referenceClass, int sourceId, int referenceId) {\n Connection connection = ConnectionPoll.getConnection();\n ManyToManyHandler manyToManyHandler = new ManyToManyHandler(connection);\n try {\n manyToManyHandler.insertM2M(sourceClass, referenceClass, sourceId, referenceId);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n ConnectionPoll.releaseConnection(connection);\n }", "int addRoleMenuList(List<UacRoleMenu> addUacRoleMenuList);", "com.microsoft.schemas.crm._2011.contracts.ArrayOfObjectiveRelation addNewObjectives();", "private void addOneToManyJoin(QueryBuilder sb, String entityAliasName, String collectionAttrName, String joinVarName) {\n\t\tsb.append(\" \")\n\t\t .append(entityAliasName).append(\".\").append(collectionAttrName)\n\t\t .append(\" \")\n\t\t .append(joinVarName);\n\t}", "public void addRelations(T model);", "public interface CollectionField extends RelationField {\n\n}", "boolean isMany();", "public void addAssociation(String mPackage, Class type, RefObject a, RefObject b) throws CreationException {\n\t\t\n\t\ttrace.addTrace(TraceType.CREATION, \"Create Association of type \" + type.getSimpleName() + \" in target model.\");\n\t\t\n\t\tRefPackage pkg = loadBasePackage(mPackage);\n\t\tCollection<RefAssociation> assos = pkg.refAllAssociations();\n\t\tfor(RefAssociation ass:assos) {\n\t\t\t/* \n\t\t\t * The return type of java.lang.Class.getInterfaces()\n\t\t\t * has changed in Java 1.6.\n\t\t\t * To compile this file using Java 1.6 or later, change the\n\t\t\t * generic of the List 'interfaces' from List<Class> to\n\t\t\t * List<Class<?>>. \n\t\t\t */\n\t\t\tList<Class> interfaces = Arrays.asList(ass.getClass().getInterfaces());\n\t\t\tif(interfaces.contains(type)) {\n\t\t\t\tMethod add = null;\n\t\t\t\tMethod[] methods = ass.getClass().getMethods();\n\t\t\t\tfor(Method m : methods) {\n\t\t\t\t\tif (m.getName().equals(\"add\")) {\n\t\t\t\t\t\tadd = m;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (add == null) {\n\t\t\t\t\tthrow new CreationException(ADD_METHOD_NOT_FOUND + type.getSimpleName());\n\t\t\t\t}\n\t\t\t\n\t\t\t\tObject[] parameters = {a,b};\n\t\t\t\ttry {\n\t\t\t\t\tadd.invoke(ass, parameters);\n\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\t\t\n\t\t}", "protected void insertOneToManyColumns(T object) {\n\t\tIterator<ColumnOneToManyMap> it = tableMap.getOneToManyColumns();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tColumnOneToManyMap oneToManyColumnMap = it.next();\r\n\t\t\tinsertIntoDatabase(object,oneToManyColumnMap);\r\n\t\t}\r\n\t}", "public List<HasFormAssociation> listFormAssociations();", "private void addFromAssociation(final String elementName, final String collectionRole)\n \t\t\tthrows QueryException {\n \t\t//q.addCollection(collectionName, collectionRole);\n \t\tQueryableCollection persister = getCollectionPersister( collectionRole );\n \t\tType collectionElementType = persister.getElementType();\n \t\tif ( !collectionElementType.isEntityType() ) {\n \t\t\tthrow new QueryException( \"collection of values in filter: \" + elementName );\n \t\t}\n \n \t\tString[] keyColumnNames = persister.getKeyColumnNames();\n \t\t//if (keyColumnNames.length!=1) throw new QueryException(\"composite-key collection in filter: \" + collectionRole);\n \n \t\tString collectionName;\n \t\tJoinSequence join = new JoinSequence( getFactory() );\n \t\tcollectionName = persister.isOneToMany() ?\n \t\t\t\telementName :\n \t\t\t\tcreateNameForCollection( collectionRole );\n \t\tjoin.setRoot( persister, collectionName );\n \t\tif ( !persister.isOneToMany() ) {\n \t\t\t//many-to-many\n \t\t\taddCollection( collectionName, collectionRole );\n \t\t\ttry {\n \t\t\t\tjoin.addJoin( ( AssociationType ) persister.getElementType(),\n \t\t\t\t\t\telementName,\n \t\t\t\t\t\tJoinType.INNER_JOIN,\n \t\t\t\t\t\tpersister.getElementColumnNames(collectionName) );\n \t\t\t}\n \t\t\tcatch ( MappingException me ) {\n \t\t\t\tthrow new QueryException( me );\n \t\t\t}\n \t\t}\n \t\tjoin.addCondition( collectionName, keyColumnNames, \" = ?\" );\n \t\t//if ( persister.hasWhere() ) join.addCondition( persister.getSQLWhereString(collectionName) );\n \t\tEntityType elemType = ( EntityType ) collectionElementType;\n \t\taddFrom( elementName, elemType.getAssociatedEntityName(), join );\n \n \t}", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Override\n\t\tpublic void onUserListMemberAddition(User arg0, User arg1, UserList arg2) {\n\t\t\t\n\t\t}", "public List<Object> selectByManyToMany(Class sourceClass, Class referenceClass) {\n Connection connection = ConnectionPoll.getConnection();\n ManyToManySelect manyToManySelect = new ManyToManySelect(connection, CanUseAuto.class);\n List<Object> list = manyToManySelect.selectAllfromM2MTable(sourceClass, referenceClass);\n ConnectionPoll.releaseConnection(connection);\n return list;\n }", "@ManyToMany(targetEntity = Team.class)\r\n @JoinTable(name = \"team_product\", joinColumns = { @JoinColumn(name = \"Product_id\") }, inverseJoinColumns = { @JoinColumn(name = \"Team_id\") })\r\n @BatchSize(size = 5)\r\n @JSON(include = false)\r\n @NotAudited\r\n public Collection<Team> getTeams() {\r\n return teams;\r\n }", "public void ShowInTeacherList(){\n \n for (TeacherBean tb : t_list) {\n this.t_model.addElement(tb); \n }\n}", "@Test\n\tpublic void oneToManyNoBind2() {\n\t\tSystem.out.println(\"============oneToManyNoBind2=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<Email> emails = Dao.queryForEntityList(Email.class, select(), u.all(), \",\", e.all(), from(), u.table(),\n\t\t\t\t\",\", e.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (Email email : emails) {\n\t\t\tSystem.out.println(email.getEmailName());\n\t\t\tUser user = email.getParentNode(User.class);\n\t\t\tSystem.out.println(\"\\t\" + user.getUserName());\n\t\t}\n\t}", "GroupQueryBuilder addAssociatedUsers(Collection<User> users);", "public void addFriendList(FriendList list);", "@Override\n public boolean supportsUpdateSetAssociationId() {\n return false;\n }", "@Override\n\tpublic <T> void insertMany(List<T> list) throws Exception {\n\t\t\n\t}", "public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n // remove the owning side\n em.remove(b1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() == 0);\n\n em.close();\n }", "@Override\n \tpublic void addIsCitedBy(Reference reference) {\n \t\tList<Reference> isCitedBy = getIsCitedBy();\n \t\t// check for existing relationship\n \t\tif (reference == null || isCitedBy.contains(reference))\n \t\t\treturn;\n \t\t// add both sides of relationship\n \t\treference.getCitationList().add(this);\n \t\tisCitedBy.add(reference);\n \t}", "private void checkMappedByOneToMany(DeployBeanInfo<?> info, DeployBeanPropertyAssocMany<?> prop) {\n if (prop.isElementCollection()) {\n // skip mapping check\n return;\n }\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n if (targetDesc.isDraftableElement()) {\n // automatically turning on orphan removal and CascadeType.ALL\n prop.setModifyListenMode(BeanCollection.ModifyListenMode.REMOVALS);\n prop.getCascadeInfo().setSaveDelete(true, true);\n }\n\n if (prop.hasOrderColumn()) {\n makeOrderColumn(prop);\n }\n\n if (prop.getMappedBy() == null) {\n // if we are doc store only we are done\n // this allows the use of @OneToMany in @DocStore - Entities\n if (info.getDescriptor().isDocStoreOnly()) {\n prop.setUnidirectional();\n return;\n }\n\n if (!findMappedBy(prop)) {\n if (!prop.isO2mJoinTable()) {\n makeUnidirectional(prop);\n }\n return;\n }\n }\n\n // check that the mappedBy property is valid and read\n // its associated join information if it is available\n String mappedBy = prop.getMappedBy();\n\n // get the mappedBy property\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedManyToOne(prop, targetDesc, mappedBy);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyTo(tableJoin, true, tableJoin.getTable());\n }\n\n PropertyForeignKey foreignKey = mappedAssocOne.getForeignKey();\n if (foreignKey != null) {\n ConstraintMode onDelete = foreignKey.getOnDelete();\n switch (onDelete) {\n case SET_DEFAULT:\n case SET_NULL:\n case CASCADE: {\n // turn off cascade delete when we are using the foreign\n // key constraint to cascade the delete or set null\n prop.getCascadeInfo().setDelete(false);\n }\n }\n }\n }", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "public void add() {\n preAdd();\n EntitySelect<T> entitySelect = getEntitySelect();\n entitySelect.setMultiSelect(true);\n getEntitySelect().open();\n }", "public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }", "@Override\n protected void setEmbeddableKeys() {\n }", "public static void createLinkTablesForMrefs(Model model, MolgenisOptions options) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"add linktable entities for mrefs...\");\r\n\t\t// find the multi-ref fields\r\n\t\tfor (Entity xref_entity_from : model.getEntities())\r\n\t\t{\r\n\r\n\t\t\t// iterate through all fields including those inherited from\r\n\t\t\t// interfaces\r\n\t\t\tfor (Field xref_field_from : xref_entity_from.getImplementedFieldsOf(new MrefField()))\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// retrieve the references to the entity+field\r\n\t\t\t\t\tEntity xref_entity_to = xref_field_from.getXrefEntity();\r\n\t\t\t\t\tField xref_field_to = xref_field_from.getXrefField();\r\n\r\n\t\t\t\t\t// TODO: check whether this link is already present\r\n\r\n\t\t\t\t\t// create the new entity for the link, if explicitly named\r\n\t\t\t\t\tString mref_name = xref_field_from.getMrefName(); // explicit\r\n\r\n\t\t\t\t\t// if mref_name longer than 30 throw error\r\n\t\t\t\t\tif (options.db_driver.toLowerCase().contains(\"oracle\") && mref_name.length() > 30)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new MolgenisModelException(\"mref_name cannot be longer then 30 characters, found: \"\r\n\t\t\t\t\t\t\t\t+ mref_name);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// check if the mref already exists\r\n\t\t\t\t\tEntity mrefEntity = null;\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmrefEntity = model.getEntity(mref_name);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// if mref entity doesn't exist: create\r\n\t\t\t\t\tif (mrefEntity == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmrefEntity = new Entity(mref_name, mref_name, model.getDatabase());\r\n\t\t\t\t\t\tmrefEntity.setNamespace(xref_entity_from.getNamespace());\r\n\t\t\t\t\t\tmrefEntity.setAssociation(true);\r\n\t\t\t\t\t\tmrefEntity.setDescription(\"Link table for many-to-many relationship '\"\r\n\t\t\t\t\t\t\t\t+ xref_entity_from.getName() + \".\" + xref_field_from.getName() + \"'.\");\r\n\t\t\t\t\t\tmrefEntity.setSystem(true);\r\n\r\n\t\t\t\t\t\t// create id field to ensure ordering\r\n\t\t\t\t\t\tField idField = new Field(mrefEntity, new IntField(), \"autoid\", \"autoid\", true, false, false,\r\n\t\t\t\t\t\t\t\tnull);\r\n\t\t\t\t\t\tidField.setHidden(true);\r\n\t\t\t\t\t\tidField.setDescription(\"automatic id field to ensure ordering of mrefs\");\r\n\t\t\t\t\t\tmrefEntity.addField(idField);\r\n\t\t\t\t\t\tmrefEntity.addKey(idField.getName(), \"unique auto key to ensure ordering of mrefs\");\r\n\r\n\t\t\t\t\t\t// create the fields for the linktable\r\n\t\t\t\t\t\tField field;\r\n\t\t\t\t\t\tVector<String> unique = new Vector<String>();\r\n\r\n\t\t\t\t\t\tfield = new Field(mrefEntity, new XrefField(), xref_field_from.getMrefRemoteid(), null, false,\r\n\t\t\t\t\t\t\t\tfalse, false, null);\r\n\t\t\t\t\t\tfield.setXRefVariables(xref_entity_to.getName(), xref_field_to.getName(),\r\n\t\t\t\t\t\t\t\txref_field_from.getXrefLabelNames());\r\n\t\t\t\t\t\tif (xref_field_from.isXrefCascade()) field.setXrefCascade(true);\r\n\t\t\t\t\t\tmrefEntity.addField(field);\r\n\r\n\t\t\t\t\t\tunique.add(field.getName());\r\n\r\n\t\t\t\t\t\t// add all the key-fields of xref_entity_from\r\n\t\t\t\t\t\tfor (Field key : xref_entity_from.getKeyFields(Entity.PRIMARY_KEY))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfield = new Field(mrefEntity, new XrefField(), xref_field_from.getMrefLocalid(), null,\r\n\t\t\t\t\t\t\t\t\tfalse, false, false, null);\r\n\r\n\t\t\t\t\t\t\t// null xreflabel\r\n\t\t\t\t\t\t\tfield.setXRefVariables(xref_entity_from.getName(), key.getName(), null);\r\n\r\n\t\t\t\t\t\t\tmrefEntity.addField(field);\r\n\t\t\t\t\t\t\tunique.add(field.getName());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// create the unique combination\r\n\t\t\t\t\t\tmrefEntity.addKey(unique, false, null);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// if mrefEntity does not exist, check xref_labels\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// field is xref_field, does it have label(s)?\r\n\t\t\t\t\t\tField xrefField = mrefEntity.getAllField(xref_field_to.getName());\r\n\r\n\t\t\t\t\t\t// verify xref_label\r\n\t\t\t\t\t\tif (xrefField != null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// logger.debug(\"adding xref_label \"+xref_field_to.getXrefLabelNames()+\"'back' for \"+xrefField.getName());\r\n\t\t\t\t\t\t\txrefField.setXrefLabelNames(xref_field_from.getXrefLabelNames());\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// set the linktable reference in the xref-field\r\n\t\t\t\t\txref_field_from.setMrefName(mrefEntity.getName());\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "public void addAuthorizedItems(int... id2) {\n\t\tfor(int m : id2) this.authorizedItems.add(m);\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations addNewFurtherRelations();", "public void addToInsertSelects(entity.LoadInsertSelect element);", "protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}", "@Transient\r\n\t@ManyToMany\r\n\t@AccelaQuery(queryClass=\"com.accela.aa.datamanager.service.EmptyQueryImpl\", \r\n\t\tisQl=false, targetEntity=VirtualXentityPermissionModel.class)\t\r\n\t@XmlElementWrapper(name = \"xentityPermissionModels\")\r\n\t@XmlElement(name = \"xentityPermissionModel\")\r\n\tpublic List<VirtualXentityPermissionModel> getXentityPermissionModels()\r\n\t{\r\n\t\treturn xentityPermissionModels;\r\n\t}", "void addAssociation(Association association);", "@Override\n\tpublic void addPhotos(Iterable<Photo> photos) {\n\t\t\n\t}", "public void executeOneToManyAssociationsCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT *\n // FROM Supplier s\n Criteria criteria = session.createCriteria(Supplier.class);\n\n // INNER JOIN Product p\n // ON s.id = p.supplier_id\n // WHERE p.price > 25;\n criteria.createCriteria(\"products\").add(Restrictions.gt(\"price\", new Double(25.0)));\n\n displaySupplierList(criteria.list());\n transaction.commit();\n }", "@Override\n\tpublic void save(List<User> entity) {\n\t\t\n\t}", "@Override\n\tprotected void cutOffLazyCollections(Direction entity) {\n\t}", "@Test\n\tpublic void testAddLinkOkMultNtoNLinkedHashSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "CollectionParameter createCollectionParameter();", "public void addIngredientRecipe(ArrayList<IngredientRecipePOJO> ingr);", "public abstract java.util.Vector setDB2ListItems();", "public void addFriend() {\n\n /* if (ageOK == true) {\n for (int i = 0; i < listRelationships.size(); i++) {\n if (firstFriend.equalsIgnoreCase(list.get(i).getFirstFriend())) {\n listRelationships.get(i).setFriends(secondFriend);\n System.out.println(listRelationships.get(i));\n System.out.println();\n\n } else if (secondFriend.equalsIgnoreCase(list.get(i).getSecondFriend())) {\n listRelationships.get(i).setFriends(firstFriend);\n System.out.println(listRelationships.get(i));\n System.out.println();\n }\n }\n } */\n }", "protected void setEmbeddableKeys() {\n }", "@Override\n public void onRelationshipMapLoaded() {\n }", "public void createManyToManyTable(Class sourceClass, Class referenceClass) {\n Connection connection = ConnectionPoll.getConnection();\n ManyToManyHandler manyToManyHandler = new ManyToManyHandler(connection);\n try {\n manyToManyHandler.createMtMTable(sourceClass, referenceClass);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n ConnectionPoll.releaseConnection(connection);\n }", "@Override\n\tpublic void setTargetListTwo(Page page, HttpServletRequest request) {\n\t\t\n\t}", "@Override\r\n\tpublic void addAssociations(Criteria criteria) {\r\n\r\n\t\tif (immunization.getPatient() != null) {\r\n\t\t\tcriteria = criteria.add(Restrictions.eq(\"patient.id\", immunization\r\n\t\t\t\t\t.getPatient().getId()));\r\n\t\t}\r\n\r\n\t\tif (immunization.getVaccine() != null) {\r\n\t\t\tcriteria = criteria.add(Restrictions.eq(\"vaccine.id\", immunization\r\n\t\t\t\t\t.getVaccine().getId()));\r\n\t\t}\r\n\r\n\t}", "public interface ICriteriaAdd {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table young_seckill_promotion_product_relation\n *\n * @mbg.generated\n * @project https://github.com/itfsw/mybatis-generator-plugin\n */\n Criteria add(Criteria add);\n }", "public void addEducation(Education e) {\n ed.add(e);\n}", "public void updateAnimalList(){\r\n // if (animals != null && animals.size() > 0)\r\n // {\r\n // \r\n // }\r\n // else\r\n // {\r\n animals.clear();\r\n \r\n for (fit5042.assign.repository.entity.Animal animal : animalManagedBean.getAllAnimals())//for each animal entry in the Entity Class Animal, get all animals\r\n {\r\n animals.add(animal); //add Animal data to the ArrayList<Animal> animals\r\n }\r\n \r\n setAnimal(animals); //set the global ArrayList attribute with the local ArrayList attribute\r\n // }\r\n }", "@Override\n public void updateBys() { updateLabelLists(getRTParent().getEntityTagTypes()); fillCommonRelationshipsMenu(); }", "int insertSelective(MyUserRoleRelation record);", "@Override\n public void addBundle(Context context, Item item, Bundle b) throws SQLException, AuthorizeException\n {\n // Check authorisation\n authorizeService.authorizeAction(context, item, Constants.ADD);\n\n log.info(LogManager.getHeader(context, \"add_bundle\", \"item_id=\"\n + item.getID() + \",bundle_id=\" + b.getID()));\n\n // Check it's not already there\n if (item.getBundles().contains(b)) {\n // Bundle is already there; no change\n return;\n }\n\n // now add authorization policies from owning item\n // hmm, not very \"multiple-inclusion\" friendly\n authorizeService.inheritPolicies(context, item, b);\n\n // Add the bundle to in-memory list\n item.addBundle(b);\n b.setItems(Arrays.asList(item));\n\n // Insert the mapping\n context.addEvent(new Event(Event.ADD, Constants.ITEM, item.getID(), Constants.BUNDLE, b.getID(), b.getName()));\n }", "public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }", "public abstract List<AbstractRelationshipTemplate> getIngoingRelations();", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "public interface FriendRelationshipRepositoryCustom {\n Set<Long> getFriendSet(Long uid);\n Set<Long> getOnlineFriendSet(Long uid);\n Set<Long> getOfflineFriendSet(Long uid);\n}", "protected void onAdd( E entity, int index )\r\n\t{\r\n\t\t\r\n\t}", "com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();", "@Override\n \tpublic void addAuthor(Author author) {\n \t\tList<Author> authorList = getAuthorList();\n \t\t// check for existing relationship\n \t\tif (author == null || authorList.contains(author))\n \t\t\treturn;\n \t\t// add both sides of relationship\n \t\tauthor.getAuthorReferences().add(this);\n \t\tauthorList.add(author);\n \t}", "@Override\n public void updateEntityTagTypes(Set<String> types) { updateLabelLists(types); fillCommonRelationshipsMenu(); }", "@Override\n\tpublic String addBatchMatStoreEmpSet(List<Map<String, Object>> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}", "public void addToModel(Map<String, Set<List<String>>> fom) {\n if (! fom.containsKey(relationString)) {\n fom.put(relationString, new HashSet<>());\n }\n List<String> args = new ArrayList<>();\n args.add(obj.toString());\n for (MinecraftObject o: otherobj) {\n args.add(o.toString());\n }\n fom.get(relationString).add(args);\n }", "public void createClassManyManyBIENDSub(final ClassManyManyBIENDSub classManyManyBIENDSub) throws DaoException {\n\t\tLOG.debug(\"Create a new ClassManyManyBIENDSub entity\");\n\t\ttry {\n\t\t\tSession session = HibernateUtil.currentSession();\n\t\t\tsession.save(classManyManyBIENDSub);\n\t\t} catch (HibernateException e) {\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "@Override\n\t\tpublic void onUserListCreation(User arg0, UserList arg1) {\n\t\t\t\n\t\t}", "public ResultMap<Association> associations();", "private void toBeAddedEntities()\n\t{\n\t\tif( entitiesToAdd.isEmpty() )\n\t\t{\n\t\t\treturn ;\n\t\t}\n\n\t\tfinal List<Event<?>> events = MalletList.<Event<?>>newList() ;\n\n\t\tfinal int size = entitiesToAdd.size() ;\n\t\tfor( int i = 0; i < size; ++i )\n\t\t{\n\t\t\tfinal Entity entity = entitiesToAdd.get( i ) ;\n\t\t\thookEntity( eventSystem, events, entity ) ;\n\t\t\tentities.add( entity ) ;\n\t\t}\n\t\tentitiesToAdd.clear() ;\n\t\t\n\t\tif( size > capacity )\n\t\t{\n\t\t\t// If the size of entitiesToAdd exceeds our capacity then \n\t\t\t// we want to resize the array - it's easy for an \n\t\t\t// array to expand, it's much harder to shrink it!\n\t\t\tentitiesToAdd = MalletList.<Entity>newList( capacity ) ;\n\t\t}\n\t}", "@Override\n\tpublic void save(List<Field> entity) {\n\t\t\n\t}", "private void addRelationShip() {\n ParseObject story = ParseObject.createWithoutData(\"Story\", objectId);\n\n // Get current User\n ParseUser user = ParseUser.getCurrentUser();\n\n // Create relationship collumn UserLove\n ParseRelation relation = user.getRelation(\"StoryLove\");\n\n // Add story to Relation\n relation.add(story);\n\n // user save relation\n user.saveInBackground(new SaveCallback() {\n\n @Override\n public void done(ParseException e) {\n if (e == null) {\n Toast.makeText(StoryDetails.this, \"User like this story, go to YourFavorite to see!!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error saving: \" + e.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n });\n\n\n ParseObject post = new ParseObject(\"UserStory\");\n // Create an LoveStory relationship with the current user\n\n ParseRelation<ParseUser> relation1 = post.getRelation(\"UserLove\");\n ParseRelation<ParseObject> relation2 = post.getRelation(\"StoryLove\");\n relation1.add(user);\n relation2.add(story);\n // Save the post and return\n post.saveInBackground(new SaveCallback() {\n\n @Override\n public void done(ParseException e) {\n if (e == null) {\n Toast.makeText(StoryDetails.this, \"You like this story, go to YourFavorite to see!!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error saving: \" + e.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n });\n\n }", "public void addRelation(String value) {\n/* 262 */ addStringToBag(\"relation\", value);\n/* */ }", "@Test\n\tpublic void oneToManyNoBind() {\n\t\tSystem.out.println(\"============oneToManyNoBind1=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", e.all(), from(), u.table(), \",\",\n\t\t\t\te.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Email> emails = user.getChildNodeSet(Email.class);\n\t\t\tfor (Email email : emails) {\n\t\t\t\tSystem.out.println(\"\\t\" + email.getEmailName());\n\t\t\t\tAssert.assertTrue(user == email.getParentNode(User.class));\n\t\t\t}\n\t\t}\n\t}", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "public void addRelatedEntities(Map<String, Set<String>> relatedEntities) {\n for (Entry<String, Set<String>> relatedEntity : relatedEntities.entrySet()) {\n Set<String> thisRelatedEntity =\n this.relatedEntities.get(relatedEntity.getKey());\n if (thisRelatedEntity == null) {\n this.relatedEntities.put(\n relatedEntity.getKey(), relatedEntity.getValue());\n } else {\n thisRelatedEntity.addAll(relatedEntity.getValue());\n }\n }\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "private String addClassAssociations() {\n\n symplifyClassRelationMap();\n\n String result = \"\";\n Set<String> keys = classRelationMap.keySet(); // get all keys\n\n for (String key : keys) {\n\n String[] classes = key.split(\"-\");\n\n if (mapIfInterface.get(classes[0])) result += \"[<interface>;\" + classes[0] + \"]\";\n else result += \"[\" + classes[0] + \"]\";\n\n result += classRelationMap.get(key); // Add connection\n\n if (mapIfInterface.get(classes[1])) result += \"[<interface>;\" + classes[1] + \"]\";\n else result += \"[\" + classes[1] + \"]\";\n\n result += \",\";\n }\n return result;\n }", "public void addToLikedCars(List<String> likedCars);", "public void insertRolePermission(int roleId, List<Integer> permissionIdList, Timestamp createTime, Timestamp updateTime){\n for (int permissionId : permissionIdList) {\r\n rolePermissionDao.insertRolePermission(roleId, permissionId, createTime, updateTime);\r\n }\r\n }", "int insertBatch(List<SystemRoleUserMapperMo> list);", "void addAll(Collection<Book> books);", "private void addEntityMultipleMatch(Map params, String[] shopMap) {\n\n\t\tparams.put(IReportDAO.MULTIPLE_MATCH, shopMap);\n\n\t}", "void setAssociatedObject(IEntityObject relatedObj);", "public void setTaggedFriends(Collection<User> taggedFriends) {\n\tthis.taggedFriends = taggedFriends;\n}", "private HashSet addGranteeAndRoles(HashSet set) {\n\n RoleManager rm = getRoleManager();\n String candidateRole;\n\n set.add(sName);\n\n Iterator it = roles.iterator();\n\n while (it.hasNext()) {\n candidateRole = (String) it.next();\n\n if (!set.contains(candidateRole)) {\n try {\n rm.getGrantee(candidateRole).addGranteeAndRoles(set);\n } catch (HsqlException he) {\n throw new RuntimeException(he.getMessage());\n }\n }\n }\n\n return set;\n }", "@SuppressWarnings({\"unchecked\"})\n public <T extends FamixAssociation> List<T> queryAssociationsBetweenEntitySets(\n List<? extends AbstractFamixEntity> set1, \n List<? extends AbstractFamixEntity> set2, \n java.lang.Class<T> associationType) throws EvolizerRuntimeException {\n\n associationType = (associationType != null) ? associationType : (Class<T>) org.evolizer.famix.model.entities.FamixAssociation.class;\n\n List<T> associations = new ArrayList<T>();\n try {\n Criteria invocationQuery = getHibernateSession().createCriteria(associationType).add(\n Restrictions.or(\n Restrictions.and(Restrictions.in(\"from\", set1), Restrictions.in(\"to\", set2)),\n Restrictions.and(Restrictions.in(\"to\", set1), Restrictions.in(\"from\", set2))\n )\n );\n\n associations = invocationQuery.list();\n } catch (HibernateException he) {\n fLogger.error(\"Error in queryAssociationsBetweenEntities \" + he.getMessage());\n throw new EvolizerRuntimeException(\"Error in queryAssociationsBetweenEntitySets\", he);\n } catch (EvolizerException ee) {\n fLogger.error(\"Error in queryAssociationsBetweenEntities \" + ee.getMessage());\n throw new EvolizerRuntimeException(\"Error in queryAssociationsBetweenEntitySets\", ee);\n }\n\n return associations;\n }", "@Test\n public void testCreateUserWithManyRoles() {\n Set<Role> roles = new HashSet<>();\n roles.add(roleRepo.findRoleByRolename(\"ROLE_ADMIN\"));\n roles.add(roleRepo.findRoleByRolename(\"ROLE_USER\"));\n\n User user = new User(\"test\", \"Testing\", \"test@mail.ru\", 111, \"test\", roles);\n em.persist(user);\n }", "private static void addObjectsInList () {\n //Create objects Users\n User userFirst = new User (1, \"Иван\", \"Иванович\", \"Иванов\", \"MC234567, 15.08.2010\", \"г. Жодино, ул. Калиновского 5-8\",\n \"+375296785643\", \"ivan\", \"123\", \"ivanov_iv@gmail.com\", 2);\n User userSecond = new User (2, \"Петр\", \"Петрович\", \"Петров\", \"MC 456789, 12.06.1999\", \"г. Минск, ул. Энгельса 6-8\",\n \"+375447774323\", \"petr\", \"456\", \"petrov_p@gmail.com\", 1);\n users.add(userFirst);\n users.add(userSecond);\n //Create object Role\n Role roleFirst = new Role (1,\"Admin\");\n Role roleSecond = new Role (2,\"User\");\n roles.add(roleFirst);\n roles.add(roleSecond);\n //Create object Account\n Account accountFirst = new Account(1, 250, \"Working\", 1);\n Account accountSecond = new Account(2, 547, \"Working\", 1);\n Account accountThird = new Account(3, 3456, \"Working\", 1);\n accounts.add(accountFirst);\n accounts.add(accountSecond);\n accounts.add(accountThird);\n //Create object payment\n Payment paymentFirst = new Payment (1, 1, \"Перевод средств\",2, Date.valueOf(\"2016-07-13\"), 50);\n Payment paymentSecond = new Payment (2, 3, \"Перевод средств\",1, Date.valueOf(\"2016-07-01\"), 100);\n Payment paymentThird = new Payment (3, 2, \"Перевод средств\",1, Date.valueOf(\"2016-06-06\"), 10);\n payments.add(paymentFirst);\n payments.add(paymentSecond);\n payments.add(paymentThird);\n }", "@Override\n public void newBundlesAdded(Set<Bundle> set) {\n// System.err.println(\"newBundlesAdded(set.size = \" + set.size() + \")\");\n Bundles as_bundles = getRTParent().getRootBundles().subset(set);\n for (int i=0;i<active_relationships.size();i++) {\n// System.err.println(\" newBundlesAdded(): Adding In Relationship \" + i + \" \\\"\" + active_relationships.get(i) + \"\\\"... bundles.size() = \" + as_bundles.size());\n addRelationship(active_relationships.get(i), false, as_bundles);\n }\n }", "public void addStudent(Student student) {\t\r\n\t\t//Adds student to list of students taking module\r\n\t\tStudentList.add(student);\r\n\t\t\r\n\t\t// adds module to students list of modules\r\n\t\tstudent.AddModuleList(ModuleName);\r\n}", "public String[] listRelations();", "int insert(MyUserRoleRelation record);", "public void addList(String name){\n }" ]
[ "0.6356516", "0.6022616", "0.5676975", "0.56387013", "0.5484234", "0.5416379", "0.5316727", "0.53160334", "0.5298133", "0.5263356", "0.52617455", "0.5241081", "0.51993495", "0.51882887", "0.5161878", "0.5150679", "0.51444876", "0.5121887", "0.5113707", "0.5103871", "0.51005167", "0.5083551", "0.50753224", "0.5069181", "0.5048591", "0.5009821", "0.5005377", "0.49960047", "0.49826357", "0.49823996", "0.49793422", "0.49694064", "0.4967979", "0.49284208", "0.4924669", "0.49193925", "0.49152622", "0.4914011", "0.4910938", "0.4890384", "0.48672903", "0.486578", "0.48603094", "0.48453802", "0.48329774", "0.4825207", "0.48229474", "0.48209614", "0.48083994", "0.4803448", "0.4801825", "0.47973138", "0.4795329", "0.4769379", "0.47686005", "0.47669327", "0.47601995", "0.47545442", "0.47526532", "0.47510427", "0.47510114", "0.4747997", "0.47456738", "0.47415715", "0.47330603", "0.47327468", "0.47274125", "0.47266638", "0.4723761", "0.471751", "0.4715877", "0.47084326", "0.4683003", "0.46811333", "0.4676356", "0.4674768", "0.46669152", "0.465364", "0.46527216", "0.46285757", "0.46273258", "0.46256492", "0.46244726", "0.46216077", "0.4619341", "0.4618287", "0.46172047", "0.4611413", "0.4606131", "0.4596692", "0.45900598", "0.4583062", "0.45808777", "0.45806038", "0.4574074", "0.45733038", "0.4572724", "0.457077", "0.45691377", "0.4566351", "0.4565146" ]
0.0
-1
/ Code from template association_RemoveMany
public boolean removeTimeSlot(TimeSlot aTimeSlot) { boolean wasRemoved = false; if (!timeSlots.contains(aTimeSlot)) { return wasRemoved; } int oldIndex = timeSlots.indexOf(aTimeSlot); timeSlots.remove(oldIndex); if (aTimeSlot.indexOfAppointment(this) == -1) { wasRemoved = true; } else { wasRemoved = aTimeSlot.removeAppointment(this); if (!wasRemoved) { timeSlots.add(oldIndex,aTimeSlot); } } return wasRemoved; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }", "void unsetFurtherRelations();", "public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n // remove the owning side\n em.remove(b1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() == 0);\n\n em.close();\n }", "void removeRelated(int i);", "public void delRelations();", "void clearAssociations();", "public void delIncomingRelations();", "@Override\n \tpublic void removeIsCitedBy(Reference reference) {\n \t\tList<Reference> isCitedBy = getIsCitedBy();\n \t\t// check for no existing relationship\n \t\tif (reference == null || !isCitedBy.contains(reference))\n \t\t\treturn;\n \t\t// remove both sides of relationship\n \t\treference.getCitationList().remove(this);\n \t\tisCitedBy.remove(reference);\n \n \t}", "public void unidirectionalOneToManyDeleteTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityC c1 = new EntityC();\n c1.setName(\"EntityC1\");\n EntityD d1 = new EntityD();\n d1.setName(\"EntityD1\");\n\n c1.getDs().add(d1);\n\n em.persist(c1);\n\n em.getTransaction().commit();\n\n Integer idC1 = c1.getId();\n Integer idD1 = d1.getId();\n \n em.getTransaction().begin();\n \n // remove the owning side\n em.remove(c1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityC c1 should have been removed!\", \n em.createQuery(\"SELECT c FROM EntityC c WHERE c.id = ?1\").setParameter(1, idC1).getResultList().size() == 0);\n assertTrue(\"EntityD d1 should have been removed!\", \n em.createQuery(\"SELECT d FROM EntityD d WHERE d.id = ?1\").setParameter(1, idD1).getResultList().size() == 0);\n\n em.close();\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public void deleteCause() {\n\t\tfor (Relation relation : causeRelations) {\n\t\t\trelation.causeFrom.effectRelations.remove(relation);\n\t\t}\n\t\tfor (Relation relation : effectRelations) {\n\t\t\trelation.causeTo.causeRelations.remove(relation);\n\t\t}\n\t}", "void removeRelationship(DbRelationship rel) {\n objectList.remove(rel);\n fireTableDataChanged();\n }", "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 }", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public void removeResourceCollection()\r\n {\r\n getSemanticObject().removeProperty(swb_resourceCollectionInv);\r\n }", "@Override\n\tpublic void excluir() {\n\t\t\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 }", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\tjava.util.Enumeration links = _getLinks().elements();\n\twhile (links.hasMoreElements()) {\n\t\ttry {\n\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) (links.nextElement())).remove();\n\t\t}\n\t\tcatch (javax.ejb.FinderException e) {} //Consume Finder error since I am going away\n\t}\n}", "@Override\n public void removeFromDb() {\n }", "public void disableRemoveAssociation() {\n teams_removeAssociation.setDisable(false);\n teams_addAssociation.setDisable(true);\n }", "@Override\n\tpublic void remove() { }", "public void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) {\n AggregateCollectionChangeRecord collectionChangeRecord = (AggregateCollectionChangeRecord)changeSet.getChangesForAttributeNamed(this.getAttributeName());\n\n if (collectionChangeRecord == null) {\n //if there is no change for this attribute then create a changeSet for it. no need to modify the resulting\n // change record as it should be built from the clone which has the changes allready\n Object cloneObject = ((UnitOfWorkChangeSet)changeSet.getUOWChangeSet()).getUOWCloneForObjectChangeSet(changeSet);\n Object cloneCollection = this.getRealAttributeValueFromObject(cloneObject, session);\n collectionChangeRecord = (AggregateCollectionChangeRecord)convertToChangeRecord(cloneCollection, changeSet, session);\n changeSet.addChange(collectionChangeRecord);\n } else {\n collectionChangeRecord.getChangedValues().remove(changeSetToRemove);\n }\n }", "public void entityRemoved() {}", "@PreRemove\r\n public void preRemove() {\r\n\r\n }", "private void removeUserAssociations(Collection<Long> ids) throws ServiceException {\n\t\ttry{\n\t\t\t// remove the user from all user groups\n\t\t\tUserGroupUserDao uguDao = (UserGroupUserDao)super.context.getBean(\"userGroupUserDao\");\n\t\t\tuguDao.deleteUsersById(ids);\n\n\t\t\t// remove the user from all restricted incidents\n\t\t\tRestrictedIncidentUserDao riuDao = (RestrictedIncidentUserDao)context.getBean(\"restrictedIncidentUserDao\");\n\t\t\triuDao.deleteUsersById(ids);\n\t\t\t\n\t\t\t// remove the user from all shared work areas\n\t\t\tWorkAreaUserDao wauDao = (WorkAreaUserDao)context.getBean(\"workAreaUserDao\");\n\t\t\twauDao.deleteUserFromSharedWorkAreas(ids);\n\t\t\t//the work area shared out flag needs to be updated after removing users from shared work areas\n\t\t\tWorkAreaDao waDao = (WorkAreaDao)context.getBean(\"workAreaDao\");\n\t\t\twaDao.updateSharedOutFlag();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tsuper.handleException(e);\n\t\t}\n\t}", "@Override\n public void remove() {\n }", "@Override\n\tpublic void onRemove() {\n\n\t}", "void removeRelation(IViewRelation relation);", "@Override\n public void remove() {\n }", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "public void removeCarritoDeCompras (Long compradorId) {\r\n\r\n CompradorEntity compradorEntity = compradorPersistence.find(compradorId); \r\n CarritoDeComprasEntity carroEntity = carroPersistence.find(compradorEntity.getCarritoDeCompras().getId());\r\n carroPersistence.delete(compradorEntity.getListaDeDeseos().getId());\r\n compradorEntity.setListaDeDeseos(null);\r\n carroEntity.setComprador(null);\r\n \r\n}", "@Override\n\t\tprotected void deleteRelations(EspStatusDTO espStatusDTO) throws SQLException {\n\t\t\t\n\t\t}", "public void deleteClassManyManyBIENDSub(ClassManyManyBIENDSub classManyManyBIENDSub) throws DaoException {\n\t\tLOG.debug(\"Delete the entity Class_Many_Many_BI_END_Sub with id =\" + classManyManyBIENDSub.getId());\n\t\ttry {\n\t\t\tSession session = HibernateUtil.currentSession();\n\t\t\tsession.delete(classManyManyBIENDSub);\n\t\t} catch (HibernateException e) {\n\t\t\tthrow new DaoException(e);\n\t\t}\n\t}", "public void removeLastAssociation()\n\t{\n\t\tfinal Association a = associations.elementAt(associations.size()-1);\n\t\ta.B.assCount--;\n\t\ta.A.assCount--;\n\t\tassociations.remove(associations.size()-1);\n\t\tuser_responses--;\n\t}", "@PreRemove\n private void removeRolesFromUsers() {\n for (User user : users) {\n user.getRoles().remove(this);\n }\n }", "protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\t\tjava.util.List links = _getLinks();\n\t\tfor (int i = 0; i < links.size(); i++) {\n\t\t\ttry {\n\t\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) links.get(i)).remove();\n\t\t\t} catch (javax.ejb.FinderException e) {\n\t\t\t} //Consume Finder error since I am going away\n\t\t}\n\t}", "private void removeAlbumFromCollection() {\n //\n }", "public abstract void onRemove();", "public void remove(ComplexCar[] cars) throws DatabaseTestException;", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "@Override\n public void cascadeRemove(RDFPersistent rootRDFEntity, RDFEntityManager rdfEntityManager) {\n //Preconditions\n assert rdfEntityManager != null : \"rdfEntityManager must not be null\";\n assert roles != null : \"roles must not be null\";\n assert !roles.isEmpty() : \"roles must not be empty for node \" + name;\n\n stateValueBindings.stream().forEach((stateValueBinding) -> {\n stateValueBinding.cascadeRemove(\n rootRDFEntity,\n rdfEntityManager);\n });\n roles.stream().forEach((role) -> {\n role.cascadeRemove(\n rootRDFEntity,\n rdfEntityManager);\n });\n rdfEntityManager.remove(this);\n }", "private void disconnectRel(Context context, StringList sLRERelIdsToBeDeleted) throws Exception\r\n \t\t{\r\n \t\t try {\r\n \t\t\t// Iterate the stringList containing the Rel ids to delete\r\n \t\t\tString [] stArrRelIdToDel = new String[sLRERelIdsToBeDeleted.size()];\r\n\r\n \t\t for (int m = 0; m < sLRERelIdsToBeDeleted.size(); m++) {\r\n \t\t \tstArrRelIdToDel[m] = (String) sLRERelIdsToBeDeleted.get(m);\r\n \t\t }\r\n\r\n \t\t // Call DomainRelationship's disconnect method to delete all the Rel ids in the String array in a single transaction\r\n \t\t DomainRelationship.disconnect(context, stArrRelIdToDel);\r\n\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\te.printStackTrace();\r\n \t\t\t\tthrow new FrameworkException(\"Relationship disconnect Failed :\"+e.getMessage());\r\n \t\t\t}\r\n \t\t}", "public void supprimerCollection(){\r\n collection.clear();\r\n }", "public void removed() {\n }", "public void remove() {\r\n super.remove();\r\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "@Override\n\tprotected void removeAllInner() throws DaoManagerException {\n\t\t\n\t}", "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "public void remove () {}", "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 }", "void removeConstraintRelation(IViewRelation relation);", "public Collection<V> remove(Object obj) {\n Collection collection = (Collection) this.Pu.remove(obj);\n if (collection == null) {\n return null;\n }\n Collection<V> ry = AbstractMapBasedMultimap.this.ry();\n ry.addAll(collection);\n AbstractMapBasedMultimap.this.Ps = AbstractMapBasedMultimap.this.Ps - collection.size();\n collection.clear();\n return ry;\n }", "@Override\n \tpublic void removeAuthor(Author author) {\n \t\tList<Author> authorList = getAuthorList();\n \t\t// check for existing relationship\n \t\tif (author == null || !authorList.contains(author))\n \t\t\treturn;\n \t\t// add both sides of relationship\n \t\tauthor.getAuthorReferences().remove(this);\n \t\tauthorList.remove(author);\n \t}", "ArrayMap<Integer,DefinedProperty> relDelete( long relId );", "public void removeAssociatedPart(ActionEvent actionEvent) {\n Part selectedAssociatedPart;\n selectedAssociatedPart = (Part) partsTableView.getSelectionModel().getSelectedItem();\n associatedPartTableViewHolder.remove(selectedAssociatedPart);\n\n associatedPartsTableView.setItems(associatedPartTableViewHolder);\n }", "@Override\r\n\tpublic void onRemove() {\n\r\n\t}", "@Override\n\tpublic void remove(Post entity) {\n\t\t\n\t}", "public void removeByObject()\r\n\t{\n\t}", "@Override\n\tpublic void remove(Object o) {\n\t\t\n\t}", "public void execute() {\n TerroristAgent agent = (TerroristAgent)((TNSRole)oldRole).getAgent();\n Hashtable relationshipTable = agent.getRelationshipTable();\n String relationshipName = null;\n Vector relationshipNames = ((TNSRole)oldRole).getRelationships();\n Iterator i = relationshipNames.iterator();\n while (i.hasNext()) {\n relationshipName = (String)i.next();\n Object temp = relationshipTable.get(relationshipName);\n if (temp instanceof Vector) {\n Vector removeRelationships = (Vector)temp;\n Vector copyOfRelationshipVector = new Vector();\n Iterator i2 = removeRelationships.iterator();\n while (i2.hasNext()) {\n Relationship r = (Relationship)i2.next();\n copyOfRelationshipVector.add(r);\n } // end while\n i2 = copyOfRelationshipVector.iterator();\n while (i2.hasNext()) {\n Relationship removeRelationship = (Relationship)i2.next();\n // System.out.println(\"Attempting to remove \" + agent.getEntityName() + \" from relationship \" + removeRelationship.toString());\n if (removeRelationship.getMembers().contains(agent)) {\n removeRelationship.removeAgent(agent);\n } else {\n // System.out.println(\"Not in this relationship.\");\n } // end if-else\n } // end while\n /* System.out.println(\"Remaining relationships\");\n i2 = removeRelationships.iterator();\n while (i2.hasNext()) {\n Relationship r = (Relationship)i2.next();\n System.out.println(r.toString());\n } // end while*/\n relationshipTable.remove(relationshipName);\n } // end if\n } // end while\n agent.removeRole(oldRole);\n Role addRole = createRole(newRole, agent);\n ((TerroristAgent)agent).addRole(addRole);\n }", "@Override\r\n\tpublic void delete(Iterable<? extends Candidat> entities) {\n\r\n\t}", "private void removeCrossReference ()\n\t{\n\t\tif (crossReference != null)\n\t\t{\n\t\t\tcrossReferences.remove (crossReference);\n\t\t}\n\t}", "public void ejbRemove() {\n }", "public void ejbRemove() {\n }", "public void removeFromCollections() {\n \n if (assignmentResponse != null) {\n Set parentCollection = assignmentResponse.getAnswers();\n if (parentCollection != null) parentCollection.remove(this);\n }\n if (question != null) {\n Set parentCollection = question.getAnswers();\n if (parentCollection != null) parentCollection.remove(this);\n }\n Vital3Utils.removeMultipleFromCollections(comments);\n }", "public void remove() {\r\n //\r\n }", "@Override\n\tpublic void removeOrder(Order order) {\n\t\t\n\t}", "public void testRemoveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.removeAddresses(new long[]{address.getId()}, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public List<UsersRobots> deleteAssociation(UsersRobots usersRobots) throws EntityException {\n if(!transaction.isActive()) {\n transaction.begin();\n }\n boolean exist = findExist(usersRobots);\n if(exist == true){\n entityManager.remove(entityManager.contains(usersRobots)? usersRobots: entityManager.merge(usersRobots));\n entityManager.getTransaction().commit();\n }\n return findByUserId(usersRobots.getIdUser());\n }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void filter1NRelations() {\n this.relations.removeIf(Relationship::isOneToOne);\n }", "public abstract void onRemoveAction();", "protected void removeReference()\n {\n }", "public void remove() {\n\n }", "public void remove() {\n/* 1379 */ super.remove();\n/* 1380 */ this.inventoryMenu.removed(this);\n/* 1381 */ if (this.containerMenu != null) {\n/* 1382 */ this.containerMenu.removed(this);\n/* */ }\n/* */ }", "@Override\n public boolean isOrphanRemoval(ManagedType<?> ownerType, String elementCollectionPath, String attributeName) {\n return false;\n }", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "public void removeFromCallbacks(entity.LoadCallback element);", "public void remove(){\n }", "void relRemoveProperty( long relId, int propertyKey );" ]
[ "0.69206935", "0.68907785", "0.6777011", "0.6762104", "0.67426556", "0.65347314", "0.65266925", "0.6170084", "0.6045351", "0.6002109", "0.6002109", "0.5998336", "0.5993485", "0.5926731", "0.58976436", "0.58242613", "0.58242613", "0.58242613", "0.58242613", "0.58242613", "0.58242613", "0.58242613", "0.58242613", "0.581363", "0.5804431", "0.5796388", "0.5790718", "0.5790718", "0.57868826", "0.5771856", "0.57452494", "0.5736188", "0.57212967", "0.5721145", "0.5719319", "0.5713853", "0.57026136", "0.5674148", "0.5671681", "0.5664097", "0.5661282", "0.5643149", "0.563186", "0.56276816", "0.5602818", "0.55938005", "0.5591187", "0.5554745", "0.5550913", "0.5546118", "0.554552", "0.55391", "0.5530834", "0.55303717", "0.5528922", "0.552831", "0.5513607", "0.5513607", "0.5513607", "0.5513607", "0.5513607", "0.5513607", "0.5513607", "0.550969", "0.55035716", "0.5502181", "0.55000716", "0.54933023", "0.5491766", "0.5483223", "0.5477827", "0.54719144", "0.54684514", "0.54632914", "0.54396474", "0.54365635", "0.5426339", "0.54237443", "0.542248", "0.5417937", "0.5417937", "0.54110175", "0.53998345", "0.53897923", "0.5385986", "0.5383512", "0.538263", "0.538263", "0.538263", "0.538263", "0.538263", "0.5376637", "0.5374833", "0.5373567", "0.53679085", "0.53645694", "0.5357744", "0.5346087", "0.5344285", "0.5340802", "0.53360707" ]
0.0
-1
/ Code from template association_AddIndexControlFunctions
public boolean addTimeSlotAt(TimeSlot aTimeSlot, int index) { boolean wasAdded = false; if(addTimeSlot(aTimeSlot)) { if(index < 0 ) { index = 0; } if(index > numberOfTimeSlots()) { index = numberOfTimeSlots() - 1; } timeSlots.remove(aTimeSlot); timeSlots.add(index, aTimeSlot); wasAdded = true; } return wasAdded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VTID(10)\n int getIndex();", "public void onIndexUpdate();", "InstAssignIndex createInstAssignIndex();", "public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }", "@Override\n public void setupIndex() {\n List lst = DBClient.getList(\"SELECT a FROM AppMenu a WHERE a.moduleName='MyBranchMemberExt'\");\n if (lst!=null && !lst.isEmpty()) {\n return;\n }\n AppMenu.createAppMenuObj(\"MyBranchMemberExt\", \"Main\", \"Branch Member\", 110).save();\n AppMenu.createAppMenuObj(\"MyCenterMemberExt\", \"Main\", \"Center Member\", 120).save();\n AppMenu.createAppMenuObj(\"SearchAllMembersOnlyExt\", \"Main\", \"Search Member\", 130).save();\n AppMenu.createAppMenuObj(\"ReferenceForm\", \"Reference\", \"Reference\", 200).save();\n runUniqueIndex(8, \"firstName\", \"lastName\");\n }", "public void addIndex() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"index\",\n null,\n childrenNames());\n }", "boolean isNewIndex();", "public abstract void updateIndex();", "public ATExpression base_indexExpression();", "protected abstract int applyGetIndex(CControlManager mgr, CDasherNode node);", "public boolean indexAllowed() {\r\n return true;\r\n }", "protected void addIndexPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Edge_index_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Edge_index_feature\", \"_UI_Edge_type\"),\n\t\t\t\t HenshinPackage.Literals.EDGE__INDEX,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "@Override\n\tpublic void VisitGetIndexNode(GetIndexNode Node) {\n\n\t}", "public void setIndexEditAttributeValue() throws ServiceException {\r\n\t\t\tString index = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"index\");\r\n\t\t\tif(CommonUtils.isStringNotEmpty(index)){\r\n\t\t\t\tLong record = Integer.valueOf(index).longValue();\r\n\t\t\t\twsrdModel.setIndex(record);\r\n\t\t\t\tUiAirplaneModel model = uiAirplaneModel.getAirplaneList().get(Integer.valueOf(index));\r\n\t\t\t\t\r\n\t\t\t\tif(ObjectUtil.isListNotEmpty(model.getApNamesList())){\r\n\t\t\t\t\tfor(UiAirplaneModel val : model.getApNamesList()){\r\n\t\t\t\t\t\tval.setInputDisplayItem(false);\r\n\t\t\t\t\t\tval.setOutputDisplayItem(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tuiAirplaneModel.setSelectedEditGrp(showGroupsName(model));\r\n\t\t\t\tuiAirplaneModel.setApNamesList(model.getApNamesList());\r\n\t\t\t}else{\r\n\t\t\t\twsrdModel.setIndex(null);\r\n\t\t\t\tUiAirplaneModel model = uiAirplaneModel.getNewAirplane().get(0);\r\n\t\t\t\tloadAirPopup(model.getAirplaneNames());\r\n\t\t\t\tuiAirplaneModel.setSelectedGrp(showGroupsName(model));\r\n\t\t\t}\r\n\t\t\twsrdModel.setDuplicateErrorMsg(\"showPop1('AirplaneNamesPanel')\");\r\n\t\t}", "private IndexOperations getIndexOperations() {\n return elasticsearchOperations.indexOps(itemClazz);\n }", "@Override\n\tpublic void indexObject(List<ModelKey> list) throws ASException {\n\t\t\n\t}", "@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }", "@Override\n\tpublic void indexObject(ModelKey obj) throws ASException {\n\t\t\n\t}", "public indexing() {\n initComponents();\n }", "public abstract void selectAllIndexes();", "indexSet createindexSet();", "boolean getIsIndexOnKeys();", "public void onPostIndexManagement() {\n for (OClass c : classes.values()) {\n if (c instanceof OClassImpl) ((OClassImpl) c).onPostIndexManagement();\n }\n for (OClass c : views.values()) {\n if (c instanceof OClassImpl) ((OClassImpl) c).onPostIndexManagement();\n }\n }", "IndexNameReference createIndexNameReference();", "public boolean qualifyIndexName() {\n \t\treturn true;\n \t}", "public String index() {\r\n\t\treturn \"index\";\r\n\t}", "private IiconstraintIndexes() {\n\t\tsuper(\"iiconstraint_indexes\", org.jooq.util.ingres.ingres.$ingres.$INGRES);\n\t}", "boolean isIndex();", "public void enableIndexAutoCreation() {\n client.setIndexAutoCreationEnabled(true);\n }", "public void beforeIndexCreated(Index index) {\n\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsList() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asList() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public int index();", "void createIndex(){\n int index=0;\n for(int i=0;i<ancogs.size();i++)\n if(!cogToIndex.containsKey(ancogs.get(i).getValue2()))\n cogToIndex.put(ancogs.get(i).getValue2(), index++);\n}", "public void addIndex(){\n\t\tdbCol=mdb.getCollection(\"genericCollection\");\n\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\tdbCol.ensureIndex(new BasicDBObject(\"RandomGeo\", \"2d\"));\n\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\tSystem.out.println(\"Mongo Index Timer \"+Long.toString(stop));\n\t}", "List<IndexFieldStatus> getIndexFieldStatus();", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "boolean hasIndex();", "public List<Index> getIndexes();", "public abstract int getNumIndexes();", "@Test\n public void fieldIndexFilter() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create an INDEX field which will display an entry for each XE field found in the document.\n // Each entry will display the XE field's Text property value on the left side\n // and the page containing the XE field on the right.\n // If the XE fields have the same value in their \"Text\" property,\n // the INDEX field will group them into one entry.\n FieldIndex index = (FieldIndex) builder.insertField(FieldType.FIELD_INDEX, true);\n\n // Configure the INDEX field only to display XE fields that are within the bounds\n // of a bookmark named \"MainBookmark\", and whose \"EntryType\" properties have a value of \"A\".\n // For both INDEX and XE fields, the \"EntryType\" property only uses the first character of its string value.\n index.setBookmarkName(\"MainBookmark\");\n index.setEntryType(\"A\");\n\n Assert.assertEquals(\" INDEX \\\\b MainBookmark \\\\f A\", index.getFieldCode());\n\n // On a new page, start the bookmark with a name that matches the value\n // of the INDEX field's \"BookmarkName\" property.\n builder.insertBreak(BreakType.PAGE_BREAK);\n builder.startBookmark(\"MainBookmark\");\n\n // The INDEX field will pick up this entry because it is inside the bookmark,\n // and its entry type also matches the INDEX field's entry type.\n FieldXE indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Index entry 1\");\n indexEntry.setEntryType(\"A\");\n\n Assert.assertEquals(\" XE \\\"Index entry 1\\\" \\\\f A\", indexEntry.getFieldCode());\n\n // Insert an XE field that will not appear in the INDEX because the entry types do not match.\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Index entry 2\");\n indexEntry.setEntryType(\"B\");\n\n // End the bookmark and insert an XE field afterwards.\n // It is of the same type as the INDEX field, but will not appear\n // since it is outside the bookmark's boundaries.\n builder.endBookmark(\"MainBookmark\");\n builder.insertBreak(BreakType.PAGE_BREAK);\n indexEntry = (FieldXE) builder.insertField(FieldType.FIELD_INDEX_ENTRY, true);\n indexEntry.setText(\"Index entry 3\");\n indexEntry.setEntryType(\"A\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.INDEX.XE.Filtering.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.INDEX.XE.Filtering.docx\");\n index = (FieldIndex) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX, \" INDEX \\\\b MainBookmark \\\\f A\", \"Index entry 1, 2\\r\", index);\n Assert.assertEquals(\"MainBookmark\", index.getBookmarkName());\n Assert.assertEquals(\"A\", index.getEntryType());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"Index entry 1\\\" \\\\f A\", \"\", indexEntry);\n Assert.assertEquals(\"Index entry 1\", indexEntry.getText());\n Assert.assertEquals(\"A\", indexEntry.getEntryType());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(2);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"Index entry 2\\\" \\\\f B\", \"\", indexEntry);\n Assert.assertEquals(\"Index entry 2\", indexEntry.getText());\n Assert.assertEquals(\"B\", indexEntry.getEntryType());\n\n indexEntry = (FieldXE) doc.getRange().getFields().get(3);\n\n TestUtil.verifyField(FieldType.FIELD_INDEX_ENTRY, \" XE \\\"Index entry 3\\\" \\\\f A\", \"\", indexEntry);\n Assert.assertEquals(\"Index entry 3\", indexEntry.getText());\n Assert.assertEquals(\"A\", indexEntry.getEntryType());\n }", "public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }", "public int getIndex() { return this.index; }", "public void afterIndexCreated(IndexService indexService) {\n\n }", "public void testAddingNewIndexWhenIndexContainsFKColumns() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null,\n true, null));\n PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs);\n setPrimaryKey(tableSchema1);\n\n List<String[]> fkCols = new ArrayList<String[]>();\n String[] fcol1 =\n {\"col1\", \"etable\", \"ecol1\"};\n fkCols.add(fcol1);\n PSJdbcForeignKey fk = new PSJdbcForeignKey(fkCols.iterator(), PSJdbcTableComponent.ACTION_DELETE);\n List<PSJdbcForeignKey> fks = new ArrayList<>();\n fks.add(fk);\n tableSchema1.setForeignKeys(fks,true);\n\n List<String> indexCols = new ArrayList<String>();\n indexCols.add(\"col1\");\n indexCols.add(\"col2\");\n PSJdbcIndex index1 = new PSJdbcIndex(\"IX_Name\", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE);\n tableSchema1.setIndex(index1);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema1.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes().next();\n\n // Makes sure if the table schema has not changed\n assertTrue((tableSchema1.equals(tableSchema2)));\n\n }", "@Override\n public int getTypeIndexID() {\n return typeIndexID;\n }", "public void createIndex(Configuration configuration){\n }", "public void SelectIndexById(String Name, int Value) {\n\t\t\r\n\t}", "protected void onAdd( E entity, int index )\r\n\t{\r\n\t\t\r\n\t}", "Expression getIndexExpr();", "@Override\n public void visit(Index node) {\n }", "public int getIndex(\n )\n {return index;}", "@ApiModelProperty(value = \"The index of the entity as it was found in the investment tables.\")\n public Integer getIndex() {\n return index;\n }", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "public void setNoIndex() {\n noIndex= true;\n }", "@AutoEscape\n public String getModelIndexRangePolicy();", "static String composeIndexName() {\n\t\treturn TYPE.toLowerCase();\n\t}", "int getIndex(){\r\n\t\treturn index;\r\n\t}", "public H_index() {\n\t\tsuper();\n\t}", "public int getIndex(){\r\n \treturn index;\r\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "public void testAddingNewIndexWithoutIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n PSJdbcTableSchema tableSchema = createTableSchema(coldefs);\n setPrimaryKey(tableSchema);\n PSJdbcForeignKey fk = createForeignKey(tableSchema);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n\n Iterator<?> itIndex = tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE);\n PSJdbcIndex index = (PSJdbcIndex) itIndex.next();\n String IndexName = index.getName();\n String fkcolname = fk.getForeignKeyColumnNames().get(0);\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the index name has taken the first foreign key column name.\n assertTrue((StringUtils.equalsIgnoreCase(IndexName, \"IX_\" + fkcolname)));\n\n // Makes sure if the createForeignkeyIndexes attribute for mysql.\n assertTrue(dataTypeMap.isCreateForeignKeyIndexes());\n\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "void addIndexForRepository(long repositoryId);", "public boolean isIndex() { return this.isIndex; }", "@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}", "boolean getIsIndexOnValues();", "void itemAddedToIndex(Object key, Object o);", "public abstract int getIndex();", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "public void setIndex(int index) { this.index = index; }", "public interface Index {\n\t\n\tvoid index(AddOnInfoAndVersions infoAndVersions) throws Exception;\n\t\n\tCollection<AddOnInfoSummary> search(AddOnType type, String query) throws Exception;\n\t\n\tCollection<AddOnInfoAndVersions> getAllByType(AddOnType type) throws Exception;\n\t\n\tCollection<AddOnInfoAndVersions> getByTag(String tag) throws Exception;\n\t\n\tAddOnInfoAndVersions getByUid(String uid) throws Exception;\n}", "@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITERID ON CONFFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITEEID ON PENDFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITERID ON PENDFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_RID ON MANIPULATION (RID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_CREATORID ON MANIPULATION (CREATORID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCES_WALLUSERID ON RESOURCES (WALLUSERID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCE_CREATORID ON RESOURCES (CREATORID)\");\n \n System.out.println(\"Indexes Built\");\n }\n catch (Exception ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in building indexes!\");\n }\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public com.guidewire.datamodel.IndexDocument.Index addNewIndex()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().add_element_user(INDEX$12);\r\n return target;\r\n }\r\n }", "public void testAddingNewIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null,\n true, null));\n PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs);\n setPrimaryKey(tableSchema1);\n PSJdbcForeignKey fk = createForeignKey(tableSchema1);\n\n List<String> indexCols = new ArrayList<String>();\n indexCols.add(\"col3\");\n PSJdbcIndex index1 = new PSJdbcIndex(\"IX_col1\", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE);\n tableSchema1.setIndex(index1);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema1.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next();\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema1.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema1.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the number of foreign key columns and eqal to that of\n // index columns.\n assertTrue(fk.getForeignKeyColumnNames().size() == newIndex.getIndexColumnNames().size());\n\n // Makes sure if the new index that got created has the same set of\n // columns as foreign key.\n assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames()));\n\n // Makes sure if the index name of newly created index has a unique name.\n assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName()));\n\n }", "public void setNameIndex(int index);", "boolean isIndexed();", "boolean isIndexed();", "public void index(List<Entity> entities) {\n\t\t\n\t}", "@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "int getSelectedClientIndex();", "private void createIndexLink()\r\n \t{\r\n \t\tif (pageTitle.contains(\"Ruby on Rails\")) {\r\n \t\t\tSimpleLogger.verbose(\" TOC file: not creating index link (no stichwort.htm*\");\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tSimpleLogger.verbose(\" TOC file: creating index link...\");\r\n \t\tElement indexLink = (Element) xPathQuery(XPath.TOC_HEADING_2.query).get(0).copy();\r\n \t\tString fileExtension = \".htm\";\r\n \t\tif (((Element) indexLink.getChild(0)).getAttribute(\"href\").getValue().contains(\".html\"))\r\n \t\t\tfileExtension = \".html\";\r\n \t\t((Element) indexLink.getChild(0)).getAttribute(\"href\").setValue(\"stichwort\" + fileExtension);\r\n \t\t((Text) indexLink.getChild(0).getChild(0)).setValue(\"Index\");\r\n \t\tbodyTag.appendChild(indexLink);\r\n \r\n \t}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "@java.lang.Override\n public int getIndex() {\n return index_;\n }", "default int getIndex() {\n return meta(\"nlpcraft:nlp:index\");\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodtoArray() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.toArray() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }", "public interface FieldIndex<T> extends GenericIndex<T> \r\n{ \r\n /**\r\n * Put new object in the index. \r\n * @param obj object to be inserted in index. Object should contain indexed field. \r\n * Object can be not yet peristent, in this case\r\n * its forced to become persistent by assigning OID to it.\r\n * @return <code>true</code> if object is successfully inserted in the index, \r\n * <code>false</code> if index was declared as unique and there is already object with such value\r\n * of the key in the index. \r\n */\r\n public boolean put(T obj);\r\n\r\n /**\r\n * Associate new object with the key specified by object field value. \r\n * If there is already object with such key in the index, \r\n * then it will be removed from the index and new value associated with this key.\r\n * @param obj object to be inserted in index. Object should contain indexed field. \r\n * Object can be not yet peristent, in this case\r\n * its forced to become persistent by assigning OID to it.\r\n * @return object previously associated with this key, <code>null</code> if there was no such object\r\n */\r\n public T set(T obj);\r\n\r\n /**\r\n * Assign to the integer indexed field unique autoicremented value and \r\n * insert object in the index. \r\n * @param obj object to be inserted in index. Object should contain indexed field\r\n * of integer (<code>int</code> or <code>long</code>) type.\r\n * This field is assigned unique value (which will not be reused while \r\n * this index exists) and object is marked as modified.\r\n * Object can be not yet peristent, in this case\r\n * its forced to become persistent by assigning OID to it.\r\n * @exception StorageError(StorageError.INCOMPATIBLE_KEY_TYPE) when indexed field\r\n * has type other than <code>int</code> or <code>long</code>\r\n */\r\n public void append(T obj);\r\n\r\n /**\r\n * Remove object with specified key from the unique index\r\n * @param key value of removed key\r\n * @return removed object\r\n * @exception StorageError(StorageError.KEY_NOT_FOUND) exception if there is no such key in the index,\r\n * or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.\r\n */\r\n public T remove(Key key);\r\n\r\n /**\r\n * Remove object with specified key from the unique index\r\n * @param key value of removed key\r\n * @return removed object\r\n * @exception StorageError(StorageError.KEY_NOT_FOUND) exception if there is no such key in the index,\r\n * or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.\r\n */\r\n public T removeKey(Object key);\r\n\r\n /**\r\n * Check if index contains specified object instance.\r\n * @param obj object to be searched in the index. Object should contain indexed field. \r\n * @return <code>true</code> if object is present in the index, <code>false</code> otherwise\r\n */\r\n public boolean containsObject(T obj);\r\n\r\n /**\r\n * Locate objects with the same value of the key as specified object\r\n * @param obj object specifying search key value\r\n * @return selection iterator\r\n */\r\n public IterableIterator<T> queryByExample(T obj);\r\n\r\n /**\r\n * Get class obejct objects which can be inserted in this index\r\n * @return class specified in Storage.createFielIndex method\r\n */\r\n public Class getIndexedClass();\r\n\r\n /**\r\n * Get fields used as a key\r\n * @return array of index key fields\r\n */\r\n public Field[] getKeyFields();\r\n\r\n /**\r\n * Select members of the collection using search predicate\r\n * This iterator doesn't support remove() method.\r\n * To make it possible to update, remove or add members to the index \r\n * during iteration it is necessary to set \"perst.concurrent.iterator\"\r\n * property (by default it is not supported because it cause extra overhead during iteration)\r\n * @param predicate JSQL condition\r\n * @return iterator through members of the collection matching search condition\r\n */\r\n public IterableIterator<T> select(String predicate);\r\n\r\n /**\r\n * Check if field index is case insensitive\r\n * @return true if index ignore case of string keys\r\n */\r\n boolean isCaseInsensitive(); \r\n}", "public final ReadOnlyIntegerProperty editingIndexProperty() {\n\n return this.getWrappedControl().editingIndexProperty();\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodAsSet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.asSet() pf\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public void testAddIndex() {\r\n list.add(\"B\");\r\n list.add(0, \"A\");\r\n assertEquals(\"A\", list.get(0));\r\n assertEquals(2, list.size());\r\n list.add(2, \"D\");\r\n assertEquals(\"D\", list.get(2));\r\n list.add(2, \"C\");\r\n assertEquals(\"C\", list.get(2));\r\n }" ]
[ "0.62282884", "0.6139239", "0.6106571", "0.60332745", "0.5996198", "0.5985802", "0.59287894", "0.5906153", "0.58878297", "0.58813554", "0.5850469", "0.5828226", "0.5787967", "0.5786512", "0.5768444", "0.57633126", "0.57430255", "0.5742481", "0.57271016", "0.5710372", "0.56604135", "0.5622634", "0.5619332", "0.56188965", "0.5617836", "0.5617188", "0.5544007", "0.5542632", "0.5537429", "0.55118525", "0.55032104", "0.54899764", "0.54803437", "0.54773927", "0.5472398", "0.5442191", "0.54360265", "0.54360265", "0.54360265", "0.54360265", "0.54360265", "0.54360265", "0.5429084", "0.5428576", "0.54021525", "0.53782225", "0.5367678", "0.5363089", "0.53606516", "0.535908", "0.5353739", "0.53513676", "0.53512335", "0.5350756", "0.5347464", "0.53461546", "0.53431785", "0.5339075", "0.5332131", "0.5329622", "0.53285295", "0.5322614", "0.5321108", "0.5317884", "0.5305278", "0.53016335", "0.5300037", "0.52977717", "0.5295193", "0.52947205", "0.52831805", "0.5282247", "0.52809143", "0.52781487", "0.52781487", "0.52781487", "0.52614546", "0.5260128", "0.5258931", "0.52491456", "0.52420396", "0.5233734", "0.5233304", "0.5230485", "0.5227416", "0.5227416", "0.52264124", "0.522346", "0.5220907", "0.52197665", "0.5217802", "0.52147937", "0.5213351", "0.5210087", "0.52037597", "0.5200155", "0.5195998", "0.5194517", "0.51924413", "0.51868314", "0.5185019" ]
0.0
-1
/ Code from template association_SetUnidirectionalOne
public boolean setServices(ServiceCombo aNewServices) { boolean wasSet = false; if (aNewServices != null) { services = aNewServices; wasSet = true; } return wasSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeUnidirectional(DeployBeanPropertyAssocMany<?> oneToMany) {\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(oneToMany);\n Class<?> owningType = oneToMany.getOwningType();\n if (!oneToMany.getCascadeInfo().isSave()) {\n // The property MUST have persist cascading so that inserts work.\n Class<?> targetType = oneToMany.getTargetType();\n String msg = \"Error on \" + oneToMany + \". @OneToMany MUST have \";\n msg += \"Cascade.PERSIST or Cascade.ALL because this is a unidirectional \";\n msg += \"relationship. That is, there is no property of type \" + owningType + \" on \" + targetType;\n throw new PersistenceException(msg);\n }\n\n // mark this property as unidirectional\n oneToMany.setUnidirectional();\n // specify table and table alias...\n BeanTable beanTable = beanTable(owningType);\n // define the TableJoin\n DeployTableJoin oneToManyJoin = oneToMany.getTableJoin();\n if (!oneToManyJoin.hasJoinColumns()) {\n throw new RuntimeException(\"No join columns found to satisfy the relationship \" + oneToMany);\n }\n createUnidirectional(targetDesc, owningType, beanTable, oneToManyJoin);\n }", "TypeAssociationEXT getConcerneUniteUnite();", "public String getInverseRelationshipName ();", "@Test\n\tpublic void oneToOneNoBind() {\n\t\tSystem.out.println(\"============oneToOneNoBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", oneToOne(), u.ID(), \"=\", a.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getChildNode(Address.class);\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getParentNode(User.class);\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}", "EReference getRelationReference();", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "@Test\n\tpublic void oneToManyNoBind() {\n\t\tSystem.out.println(\"============oneToManyNoBind1=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", e.all(), from(), u.table(), \",\",\n\t\t\t\te.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Email> emails = user.getChildNodeSet(Email.class);\n\t\t\tfor (Email email : emails) {\n\t\t\t\tSystem.out.println(\"\\t\" + email.getEmailName());\n\t\t\t\tAssert.assertTrue(user == email.getParentNode(User.class));\n\t\t\t}\n\t\t}\n\t}", "private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }", "void unsetFurtherRelations();", "@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}", "@Test\n\tpublic void oneToManyNoBind2() {\n\t\tSystem.out.println(\"============oneToManyNoBind2=========\");\n\t\tUser u = new User();\n\t\tEmail e = new Email();\n\t\tList<Email> emails = Dao.queryForEntityList(Email.class, select(), u.all(), \",\", e.all(), from(), u.table(),\n\t\t\t\t\",\", e.table(), \" where \", oneToMany(), u.ID(), \"=\", e.UID(), bind());\n\t\tfor (Email email : emails) {\n\t\t\tSystem.out.println(email.getEmailName());\n\t\t\tUser user = email.getParentNode(User.class);\n\t\t\tSystem.out.println(\"\\t\" + user.getUserName());\n\t\t}\n\t}", "@Test\n\tpublic void testRemoveViaSetLinkWithInverse() {\n\t\tAddress adr = new Address();\n\t\tadr.getType().setIdGenerator(new IdGeneratorNumeric());\n\t\tAssert.assertEquals(1, ((IdNumeric) adr.getId()).getNumber());\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tadr.addInhabitant(martin);\n\t\tadr.addInhabitant(jojo);\n\n\t\tCollection<Person> persons = new ArrayList<Person>();\n\t\tpersons.add(martin);\n\t\tadr.setInhabitants(persons);\n\n\t\tAssert.assertEquals(1, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\tadr.setInhabitants(new ArrayList<Person>());\n\n\t\tAssert.assertEquals(0, adr.getInhabitants().size());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\tadr.setInhabitants(null);\n\n\t\tAssert.assertNull(adr.getInhabitants());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\t}", "@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }", "EReference getModelReference();", "public void unidirectionalOneToManyDeleteTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityC c1 = new EntityC();\n c1.setName(\"EntityC1\");\n EntityD d1 = new EntityD();\n d1.setName(\"EntityD1\");\n\n c1.getDs().add(d1);\n\n em.persist(c1);\n\n em.getTransaction().commit();\n\n Integer idC1 = c1.getId();\n Integer idD1 = d1.getId();\n \n em.getTransaction().begin();\n \n // remove the owning side\n em.remove(c1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityC c1 should have been removed!\", \n em.createQuery(\"SELECT c FROM EntityC c WHERE c.id = ?1\").setParameter(1, idC1).getResultList().size() == 0);\n assertTrue(\"EntityD d1 should have been removed!\", \n em.createQuery(\"SELECT d FROM EntityD d WHERE d.id = ?1\").setParameter(1, idD1).getResultList().size() == 0);\n\n em.close();\n }", "public Object caseEReferencesRelation(EReferencesRelation object) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface VehiculeRepository extends JpaRepository<Vehicule,Long> {\n \n @Query(\"select distinct vehicule from Vehicule vehicule left join fetch vehicule.noms\")\n List<Vehicule> findAllWithEagerRelationships();\n\n @Query(\"select vehicule from Vehicule vehicule left join fetch vehicule.noms where vehicule.id =:id\")\n Vehicule findOneWithEagerRelationships(@Param(\"id\") Long id);\n \n}", "Cascade createCascade();", "public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}", "public T caseAssocRelationshipDefinition(AssocRelationshipDefinition object) {\n\t\treturn null;\n\t}", "public final void mT__102() throws RecognitionException {\n try {\n int _type = T__102;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:72:8: ( 'association-one-to-one' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:72:10: 'association-one-to-one'\n {\n match(\"association-one-to-one\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Override\n\tpublic void orphan(DBSet db, boolean asPack) \n\t{\n\t\tdb.getAddressPersonMap().removeItem(this.recipient.getAddress());\n\t\tdb.getPersonAddressMap().removeItem(this.key, this.recipient.getAddress());\n\n\t\t//UPDATE REFERENCE OF CREATOR\n\t\t// not needthis.creator.setLastReference(this.reference, db);\t\t\n\t\t//UPDATE REFERENCE OF RECIPIENT\n\t\tthis.recipient.removeReference(db);\n\t}", "@Test\n\tpublic void testSetValueMult1to1OverwriteInverse() {\n\n\t\t// set up\n\t\tPerson martin = new Person(\"\\\"Bl�mel\\\" \\\"Martin\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Bl�mel\\\" \\\"Johannes\\\" \\\"19641014\\\"\");\n\t\tTestUser user = new TestUser(\"admin\");\n\t\tuser.setPerson(jojo);\n\t\tAssert.assertSame(jojo, user.getPerson());\n\t\tAssert.assertSame(user, jojo.getUser());\n\t\tAssert.assertNull(martin.getUser());\n\n\t\t// test: relink martin to user (other way round)\n\t\tmartin.setUser(user);\n\t\tAssert.assertSame(martin, user.getPerson());\n\t\tAssert.assertSame(user, martin.getUser());\n\t\tAssert.assertNull(jojo.getUser());\n\t}", "EReference getAnEReference();", "public interface One extends RelationQuantifier\n{\n}", "@Test\n public void testAssocOneWithNullAssoc() {\n\n Database server = DB.getDefault();\n\n final ProductConfiguration pc = new ProductConfiguration();\n pc.setName(\"PC1\");\n server.save(pc);\n\n CalculationResult r = new CalculationResult();\n final Double charge = 100.0;\n r.setCharge(charge);\n r.setProductConfiguration(pc);\n r.setGroupConfiguration(null);\n server.save(r);\n }", "@Override\n\t\tpublic Relationship getSingleRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}", "Column referencedColumn();", "void setAssociatedObject(IEntityObject relatedObj);", "EReference createEReference();", "protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}", "@Override\n public boolean supportsUpdateSetAssociationId() {\n return false;\n }", "public <A> void createUnidirectional(DeployBeanDescriptor<?> targetDesc, Class<A> targetType, BeanTable beanTable, DeployTableJoin oneToManyJoin) {\n\n // create the 'shadow' unidirectional property\n // which is put on the target descriptor\n DeployBeanPropertyAssocOne<A> unidirectional = new DeployBeanPropertyAssocOne<>(targetDesc, targetType);\n unidirectional.setUndirectionalShadow();\n unidirectional.setNullable(false);\n unidirectional.setDbRead(true);\n unidirectional.setDbInsertable(true);\n unidirectional.setDbUpdateable(false);\n unidirectional.setBeanTable(beanTable);\n unidirectional.setName(beanTable.getBaseTable());\n unidirectional.setJoinType(true);\n unidirectional.setJoinColumns(oneToManyJoin.columns(), true);\n\n targetDesc.setUnidirectional(unidirectional);\n }", "boolean isOneToMany();", "public M csmiRelationNull(){if(this.get(\"csmiRelationNot\")==null)this.put(\"csmiRelationNot\", \"\");this.put(\"csmiRelation\", null);return this;}", "public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}", "public void relate(HNode id, Object o);", "Relationship createRelationship();", "@Override\n\tpublic Instances relationalValue(final Attribute att) {\n\t\treturn null;\n\t}", "RelationalDependency createRelationalDependency();", "@ManyToOne(fetch=FetchType.LAZY)\n\t@JoinColumn(name=\"Kunde_ID\", nullable=false)\n\tpublic Person getPerson1() {\n\t\treturn this.person1;\n\t}", "@Test(description = \"update interface with one relationship for non existing interface\")\n public void updateOneRelationship4NonExisting()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestType\");\n data.create();\n\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel);\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select relationship dump\"),\n rel.getName(),\n \"check that only one relationship is defined\");\n }", "@Test\n\tpublic void oneToOneWithBind() {\n\t\tSystem.out.println(\"============oneToOneWithBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tu.configMapping(oneToOne(), u.ID(), a.UID(), bind(u.ADDRESS(), a.USER()));\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", u.ID(), \"=\", a.UID());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getAddress();\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getUser();\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}", "public Related() {\n }", "@Override\n\tpublic String associatedEntityName(String field) {\n\t\treturn null;\n\t}", "public void onRelationshipChanged();", "public String getOneOrMany()\n\t{\n\t\treturn oneOrMany;\n\t}", "TypeAssociation getConcerneTraitementObjectifTraitementObjectif();", "public T caseRelationshipNavigation(RelationshipNavigation object) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}", "RelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);", "FK findFrom(ENTITY entity);", "public T caseRelationAdded(RelationAdded object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}", "public void setNilCascadeType()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2011.metadata.CascadeType target = null;\r\n target = (com.microsoft.schemas.xrm._2011.metadata.CascadeType)get_store().find_element_user(CASCADETYPE$0, 0);\r\n if (target == null)\r\n {\r\n target = (com.microsoft.schemas.xrm._2011.metadata.CascadeType)get_store().add_element_user(CASCADETYPE$0);\r\n }\r\n target.setNil();\r\n }\r\n }", "public Object caseForeignKey(ForeignKey object) {\r\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface TurmaRepository extends JpaRepository<Turma,Long> {\n \n @Query(\"select distinct turma from Turma turma left join fetch turma.inscritos left join fetch turma.horarios\")\n List<Turma> findAllWithEagerRelationships();\n\n @Query(\"select turma from Turma turma left join fetch turma.inscritos left join fetch turma.horarios where turma.id =:id\")\n Turma findOneWithEagerRelationships(@Param(\"id\") Long id);\n \n}", "private void markDuplicateRelationships(EntityInstanceImpl ei)\n {\n EntityInstanceImpl parent = ei.getParent();\n EntityDef entityDef = ei.getEntityDef();\n\n // Duplicate relationship searching phase I, see if a linked instance to\n // the target instance in the same object instance represents the\n // same relationship type AND has the same parent.\n for ( EntityInstanceImpl linked : ei.getLinkedInstances() )\n {\n // Check to make sure linked EI has a parent--it is possible for a root\n // to be flagged as included and we don't care about roots.\n if ( linked.isDeleted() || linked.getParent() == null )\n continue;\n\n if ( ei.isExcluded() )\n {\n if ( ! linked.isExcluded() )\n continue;\n }\n else\n {\n if ( ! linked.isIncluded() )\n continue;\n }\n\n EntityDef linkedEntityDef = linked.getEntityDef();\n\n // Linked EI must have the same relationship and it can't be derived.\n if ( linkedEntityDef.getErRelToken() == entityDef.getErRelToken() ||\n linkedEntityDef.isDerivedPath() )\n {\n continue;\n }\n\n // Now check to see if the parents are linked.\n EntityInstanceImpl linkParent = linked.getParent();\n for ( EntityInstanceImpl parentLinked : linkParent.getLinkedInstances() )\n {\n if ( parentLinked == parent )\n {\n if ( ei.isExcluded() )\n linked.dbhExcluded = true;\n else\n linked.dbhIncluded = true;\n\n break;\n }\n }\n } // for each linked instance...\n\n // Duplicate relationship searching, phase II, see if the parent of\n // the instance has a linked instance representing the same relationship\n // type which is also a child of one of the targets linked instances.\n\n // If the parent isn't linked then there are no duplicate relationships.\n if ( parent.getLinkedInstances().size() == 0 )\n return;\n\n for ( EntityInstanceImpl linked : parent.getLinkedInstances() )\n {\n // Check for appropriate include/exclude flag.\n if ( ei.isExcluded() )\n {\n if ( ! linked.isExcluded() )\n continue;\n }\n else\n {\n if ( ! linked.isIncluded() )\n continue;\n }\n\n EntityDef linkedEntityDef = linked.getEntityDef();\n\n // Check to see if the relationship for the EI linked to the parent is\n // the same as the relationship of the original EI.\n if ( linkedEntityDef.getErRelToken() != entityDef.getErRelToken() )\n continue; // Nope.\n\n // OK, we have an EI ('linked') that has the same relationship as\n // ei. Check to see if the parent of 'linked' (grandParent)\n // is linked with ei. If they are linked then 'linked'\n // has the same physical relationship as ei.\n EntityInstanceImpl grandParent = linked.getParent();\n for ( EntityInstanceImpl gp : ei.getLinkedInstances() )\n {\n if ( gp == grandParent )\n {\n if ( ei.isExcluded() )\n linked.dbhExcluded = true;\n else\n linked.dbhIncluded = true;\n\n break;\n }\n }\n } // for each linked instance of parent...\n }", "@OneToOne(fetch = FetchType.EAGER)\n/* */ @PrimaryKeyJoinColumn\n/* 56 */ public VfeWorkflowsAdp getVfeWorkflowsAdp() { return this.vfeWorkflowsAdp; }", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public Object getId1() {\n return this.getId();\n }", "@Override\n public TransferRelation getTransferRelation() {\n return null;\n }", "public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }", "public boolean isPureFK() { // derived property\n return !_additionalFK && !_referrerAsOne;\n }", "TypeAssociation getConcerneZoneAutreElementControle();", "private void indirectAssociations_DeriveIndirectInheritance() {\n try{\n \tList<FamixAssociation> indirectInheritanceAssociations = new ArrayList<FamixAssociation>();\n\t for (FamixAssociation directAssociation : theModel.associations) {\n if (directAssociation.to == null || directAssociation.from == null || directAssociation.to.equals(\"\") || directAssociation.from.equals(\"\")){ \n \tnumberOfNotConnectedWaitingAssociations ++;\n }\n else if (directAssociation instanceof FamixInheritanceDefinition){ \n \t\t\t\tindirectInheritanceAssociations.addAll(indirectAssociations_AddIndirectInheritanceAssociation(directAssociation.from, directAssociation.to, directAssociation.lineNumber));\n\t\t\t\t}\n\t\t\t}\n\t for (FamixAssociation indirectInheritanceAssociation : indirectInheritanceAssociations) {\n\t \taddToModel(indirectInheritanceAssociation);\n\t }\n } catch (Exception e) {\n\t this.logger.debug(new Date().toString() + \" \" + e);\n\t e.printStackTrace();\n }\n }", "public ObjectProp getRelationship() {\n return relationship;\n }", "@Override\r\n public BaseVO refer(BaseVO baseVO) {\n return null;\r\n }", "TypeAssociation getAssocieCommeObjetAdresse();", "public T caseRegularRelationshipDefinition(RegularRelationshipDefinition object) {\n\t\treturn null;\n\t}", "public Object generalPK() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic boolean insertOneEdge(NodeRelation nodeRelation) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "public Long getRelateId() {\n return relateId;\n }", "public void filter1NRelations() {\n this.relations.removeIf(Relationship::isOneToOne);\n }", "public interface IRelationship<A extends IAttribute> extends IErdNode\n{\n\n /**\n * check the relationship, if the two connected entities are the same\n *\n * @return recursive\n */\n boolean isRecursive();\n\n /**\n * check if this relationship is a weak relationship\n * -> one of the entities is weak\n *\n * @return weak\n */\n boolean isWeakRelationship();\n\n /**\n * return the description of the relationship\n *\n * @return description\n */\n String getDescription();\n\n /**\n * create new attribute to relationship\n *\n * @param p_id name of the attribute\n * @param p_property of the attribute\n * @return self-reference\n */\n A createAttribute( @NonNull final String p_id, @Nonnull final String p_property );\n\n /**\n * get all connected attributes from the relationship in a map\n *\n * @return map with all attributes\n */\n Map<String, IAttribute> getConnectedAttributes();\n\n /**\n * connect entity incl. cardinality to the relationship\n *\n * @param p_entity name of the entity\n * @param p_cardinality cardinality\n * @return self-reference\n */\n IEntity<A> connectEntity( @NonNull final IEntity<IAttribute> p_entity, @NonNull final String p_cardinality );\n\n /**\n * return the connected entities in a map\n *\n * @return connected entities\n */\n Map<String, Collection<String>> getConnectedEntities();\n\n}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public String getInverseRelationshipName ()\n\t{\n\t\treturn getRelationshipImpl().getInverseRelationshipName();\n\t}", "public T caseRelationCopied(RelationCopied object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean isAssociatedEntity(String field) {\n\t\treturn false;\n\t}", "public void setRelatedTo(java.lang.String value);", "public Association association(ComplexEObject ceo)\n {\n if (_inverseFieldName == null)\n {\n return new Association(this, ceo);\n }\n else\n {\n return new Association(this, ceo, inverseField());\n }\n }", "Relation createRelation();", "private Long getEntityRelationId(EntityRelationshipType eachRelation) {\n\t\treturn getRelationTypeId(eachRelation);\n\t}", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "@Dump(compound = true)\n public BwRelatedTo getRelatedTo() {\n return relatedTo;\n }", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "@Test(description = \"export interface with one single relationship\")\n public void exportWithOneRelationship()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestRelationship\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel);\n data.create();\n\n inter.checkExport(inter.export());\n }", "@Override\n\tprotected void cutOffLazyCollections(Direction entity) {\n\t}", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn true;\n\t}", "@ManyToOne\n public Person getAuthor() {\n return author;\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public T caseRelationChange(RelationChange object) {\n\t\treturn null;\n\t}", "public Object caseEClassesRelation(EClassesRelation object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public void clearPolymorphismTairObjectId() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "private void clearOtherId() {\n \n otherId_ = 0;\n }" ]
[ "0.6051375", "0.6048561", "0.5847553", "0.5826683", "0.5783374", "0.5700248", "0.54744095", "0.54563314", "0.5451727", "0.54054266", "0.5404027", "0.5388324", "0.5383629", "0.5379442", "0.53769636", "0.53724897", "0.5331416", "0.5315853", "0.5303185", "0.5302602", "0.5269297", "0.5241048", "0.52332383", "0.5208701", "0.5207816", "0.5203076", "0.5194855", "0.51934654", "0.5181149", "0.5178713", "0.5167842", "0.51583254", "0.5153337", "0.513522", "0.5124016", "0.51141936", "0.5112843", "0.5110645", "0.5094768", "0.50850445", "0.50825304", "0.5077585", "0.5063757", "0.50570446", "0.5051877", "0.50509644", "0.5046483", "0.5043583", "0.50341976", "0.50334716", "0.5008228", "0.5000016", "0.49968752", "0.49950752", "0.49871707", "0.49871707", "0.49807036", "0.49686632", "0.49645066", "0.49516195", "0.49459904", "0.49365103", "0.49339154", "0.49311274", "0.4928424", "0.4925514", "0.4922547", "0.49224025", "0.4920845", "0.4918478", "0.49151504", "0.4909855", "0.49089795", "0.49041378", "0.4898367", "0.48965746", "0.48896855", "0.4869791", "0.4866974", "0.48614696", "0.48614696", "0.48555285", "0.4855387", "0.48543546", "0.4845251", "0.48389202", "0.48348144", "0.48338437", "0.48324448", "0.483232", "0.48314115", "0.48303893", "0.48291427", "0.4824257", "0.48197535", "0.4817527", "0.48165262", "0.48133117", "0.48129892", "0.48116887", "0.48097894" ]
0.0
-1
getting the item1 from the given orderId under entityManager
@Override @Transactional(value = "jpaTransactionManager") public JPAOrderItem updateUsingQueryMethod(Integer orderId) { Integer itemNum = 1; JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum); jpaOrderItemRepository.updateByQueryNoClear(orderId); // Once again getting the same item#1 from the given orderId to check the state jpaOrderItem = jpaOrderItemRepository.findOne(itemNum); return jpaOrderItem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OrderItemDto getOrderItem(long id) throws SQLException;", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "public Order getOrderById(long orderId);", "ClOrderInfo selectByPrimaryKey(String orderId);", "Order getByID(String id);", "@Transactional(readOnly = true)\n public Optional<OrderItems> findOne(Long id) {\n log.debug(\"Request to get OrderItems : {}\", id);\n return orderItemsRepository.findById(id);\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "Order getOrder(int id) throws ServiceException;", "@Transactional\n public OrderEntity findEager(Long orderId) {\n log.infof(\"Find order with id [%d]\", orderId);\n final TypedQuery<OrderEntity> query = em.createQuery(\"select o from OrderEntity o \" +\n \"join fetch o.shipmentAddress sa \" +\n \"join fetch o.billingAddress ba \" +\n \"left join fetch o.orderItems oi \" +\n \"where o.orderId = :orderId\", OrderEntity.class);\n query.setParameter(\"orderId\", orderId);\n return query.getSingleResult();\n }", "@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryWithClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check\r\n // the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "NjOrderWork2 selectByPrimaryKey(String id);", "Order getOrder(String orderId) throws OrderBookOrderException;", "public List<OrderItem> searchOrderItem(int idOrderItem) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, idOrderItem);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "TradeItem getTradeItem(long id);", "public OrderItem findOrderItemById(int id)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.findById(id);\n\t\tif(orderIt==null)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t \"Id-ul nu exista!\",\n\t\t\t\t \"Update error\",\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t\t\tthrow new NoSuchElementException(\"OrderItem=ul cu id-ul:\"+id+\" nu a fost gasit\");\n\t\t}\n\t\treturn orderIt;\n\t}", "public interface OrderItemRepository extends JpaRepository<OrderItem, Integer>, JpaSpecificationExecutor {\n\t@Query(\"SELECT oi FROM OrderItem oi WHERE oi.order.orderId = ?1\")\n\tList<OrderItem> findByOrderId(String orderId);\n}", "public List<OrderItems> getAllOrderItemsByOrderId(int orderId){\n\t\tSystem.out.println(\"service\");\n\t\tList<OrderItems> orderItemsRecords = orderItemsRepo.getAllOrderItemsByOrderId(orderId);\n\t\tList<OrderItems> orderItems= new ArrayList();\n\t\tfor(OrderItems items: orderItemsRecords) \n\t\t\tif(items.getOrders().getOrderId() == orderId)\n\t\t\t\torderItems.add(items);\t\t\n\t\tSystem.out.println(orderItems);\n\t\treturn orderItems;\t\n\t}", "@Override\n\tpublic Orderi get(Integer id) {\n\t\t\n\t\treturn (Orderi)getHibernateTemplate().get(Orderi.class, id);\n\t}", "List<LineItem> listLineItemByOrderId(Integer orderId);", "public List<Order> findOrder(int orderId) {\n\t\tList<Order> orders=new ArrayList<Order>();\n\t\tQuery query=em.createQuery(\"from Order where order_Id=:orderId\"+\" and block_id is null\");\n\t\tquery.setParameter(\"orderId\",orderId);\n\t\t//System.out.println(query);\n\t\torders=query.getResultList();\n\t\t//System.out.println(orders.get(0));\n\n\t\treturn orders;\n\n\t}", "OrderDetails selectByPrimaryKey(Integer id);", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "Order requireById(Long orderId);", "@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }", "ItemStockDO selectByPrimaryKey(Integer id);", "ItemStockDO selectByPrimaryKey(Integer id);", "public ComplexOrderTO getOrder(long storeID, long orderId) throws NotInDatabaseException;", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "@ResponseBody\n @RequestMapping(method = RequestMethod.POST, value = \"/{orderId}/item}\")\n public ResultData viewItem(@PathVariable(\"orderId\") String orderId) {\n ResultData result = new ResultData();\n Map<String, Object> condition = new HashMap<>();\n condition.put(\"orderId\", orderId);\n List<Integer> status = new ArrayList<>(Arrays.asList(OrderStatus.PAYED.getCode(), OrderStatus.PATIAL_SHIPMENT.getCode(), OrderStatus.FULLY_SHIPMENT.getCode(), OrderStatus.FINISHIED.getCode()));\n condition.put(\"status\", status);\n ResultData response = orderService.fetchOrder(condition);\n if (response.getResponseCode() == ResponseCode.RESPONSE_OK) {\n Order order = ((List<Order>) response.getData()).get(0);\n\n }\n return result;\n }", "@Override\n\tpublic Porder getPorderById(Integer porderid) {\n \t\n \treturn entityManager.find(Porder.class,porderid);\n }", "OrderDetail selectByPrimaryKey(String detailId);", "@Override\n public Item get(long idItem) throws EntityNotFound;", "@Override\n\tpublic HsExchangeOrder selectByPrimaryKey(HsExchangeOrder order) {\n\t\treturn hsExchangeOrderDbService.selectByPrimaryKey(order.getId());\n\t}", "public Item getByID(Integer id) {\r\n Item item = null;\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n item = (Item) session.get(Item.class, id);\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return item;\r\n }", "public OrderEntity LoadSingleOrder(int id) throws ClassNotFoundException, SQLException{\n\t\tOrderEntity o = new OrderEntity();\r\n\t\tConnectDB db = new ConnectDB();\r\n\t\tdb.connect();\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM cart WHERE ID = \" + id;\r\n\t\t\tResultSet rs = db.st.executeQuery(sql);\r\n\t\t\t//System.out.print(rs.getString(\"Username\"));\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\t\t\r\n\t\t\t\to.setId(rs.getInt(\"id\"));\r\n\t\t\t\to.setId_customer(rs.getInt(\"id_customer\"));\r\n\t\t\t\to.setTotal_price(rs.getInt(\"price_sum\"));\r\n\t\t\t\to.setAddress(rs.getString(\"address\"));\r\n\t\t\t\to.setDate(rs.getString(\"date_delivery\"));\r\n\t\t\t\to.setStatus(rs.getInt(\"status\"));\r\n\t\t\t\t\r\n\t\t\t\t//list.add(p);\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdb.st.close();\r\n\t\t\tdb.con.close();\r\n\t\t\t\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\treturn o;\r\n\t}", "OrderPO selectByPrimaryKey(Integer id);", "public List<OrderDetail> getOrderDetailByOrder(Long orderId);", "Optional<Order> findByUserId(long userId);", "@RequestMapping(\"/{orderId}/items\")\n public Flux<Item> getItemsOfOrder(@PathVariable(\"orderId\") int orderId)\n throws JsonProcessingException {\n Order order = orderRepository.getOrderById(orderId);\n\n // Get every item in order\n return HystrixCommands.from(itemInfo.getItemsFromOrderCall(order))\n .fallback(itemInfo.getItemsFromOrderFallback())\n .commandName(\"getItemsFromOrderCall\")\n .toFlux();\n }", "public JSONObject fetchOrder(long orderId) throws Exception;", "@Override\n\tpublic Item findItemById(Long id) {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Item> q = cb.createQuery(Item.class);\n\t\t Root<Item> c = q.from(Item.class);\n\t\t ParameterExpression<Long> p = cb.parameter(Long.class);\n\t\t q.select(c).where(cb.equal(c.get(\"id\"), p));\n\t\t TypedQuery<Item> query = entityManager.createQuery(q);\n\t\t query.setParameter(p, id);\n\t\t Item i = query.getSingleResult();\n\t\treturn i;\n\t}", "OrderDTO findBy(String id);", "CartDO selectByPrimaryKey(Integer id);", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "public Item getItemById(Integer itemId);", "public List<Item> readAllOrderItem(Long orderId) {\n\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t\t\t+ \"WHERE oi.order_id = \" + orderId + \";\";\n\t\t\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\t\torderItemList.add(item);\n\t\t\t}\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public List<OrderItem> searchOrderIdOrder(int OrderIdOrder) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT order_Item.*, product.*, category.* FROM order_Item, product, category WHERE order_Item.product_id_Product = product.id_Product AND product.category_id_Category = category.id_Category AND order_Item.order_id_Order = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, OrderIdOrder);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n oi.setIdProduct(rs.getInt(\"id_Product\"));\n oi.setCategoryIdCategory(rs.getInt(\"category_id_Category\"));\n oi.setColor(rs.getString(\"color\"));\n oi.setFinishingProcess(rs.getString(\"finishing_Process\"));\n oi.setCubaType(rs.getString(\"cuba_Type\"));\n oi.setDescription(rs.getString(\"description\"));\n oi.setStock(rs.getInt(\"stock\"));\n oi.setUnitaryValue(rs.getDouble(\"unitary_Value\"));\n oi.setImageLink(rs.getString(\"image_Link\"));\n\n oi.setIdCategory(rs.getInt(\"id_Category\"));\n oi.setCategory(rs.getString(\"category\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "@Nullable\n public Order doRetrieveById(int id) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n Operator op = null;\n Order o = null;\n User u = null;\n\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.id=?;\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n o = new Order();\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n u = ud.doRetrieveByUsername(rs.getString(1));\n o.setUser(u);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n\n }\n st.close();\n cn.close();\n\n return o;\n } catch (SQLException e) {\n return null;\n }\n }", "public FoodEntity getFood(OrderEntity orderEntity);", "public void retrieveOrderContentById_Order(int i) {\n\t\tSystem.out.println(\"\\nMostrat detalls del Order \" + i);\n\t\tObjectSet result = db.queryByExample(new Order(i, null, null, null, null));\n\t\t\n\t\tOrder aConsultar = (Order) result.next();\n\t\taConsultar.getDetails().stream()\n\t\t\t\t.forEach(System.out::println);\n\t}", "public abstract CustomerOrder findOne(Long id);", "ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "NjOrderAttachment selectByPrimaryKey(String id);", "ExchangeOrder selectByPrimaryKey(String id);", "Item findById(String id);", "TRefundOrder selectByPrimaryKey(String refundorderid);", "UcOrderGuestInfo selectByPrimaryKey(Long id);", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "public MobileTaskAssignment getByOrder(String orderId) {\r\n\t\treturn (MobileTaskAssignment) sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.orderId = :orderId\")\r\n\t\t\t\t\t.setString(\"orderId\", orderId)\r\n\t\t\t\t\t.uniqueResult();\r\n\t}", "Optional<Order> findById(Long orderId);", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "Item findByNo(Long No);", "private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "GoodsPo selectByPrimaryKey(Long id);", "BusnessOrder selectByPrimaryKey(Integer id);", "ItoProduct selectByPrimaryKey(Integer id);", "public TireList findOrderedItems(){\n \n try{\n sql = \"Select * From OrderedItems Where OrderID = \" + getOrderID();\n ResultSet resultSetOrder = db.SelectDB(sql);\n \n Tire orderedTire;\n while(resultSetOrder.next()){\n orderedTire = new Tire();\n orderedTire.setQuantity(resultSetOrder.getInt(\"Quantity\"));\n ResultSet resultSetTire = db.SelectDB(\"Select * From Tire Where TireID = \" + resultSetOrder.getString(\"TireID\"));\n while(resultSetTire.next()){\n orderedTire.setStockID(resultSetTire.getString(\"TireID\"));\n orderedTire.setType(resultSetTire.getString(\"TireType\"));\n orderedTire.setSize(resultSetTire.getString(\"TireSize\"));\n orderedTire.setBrand(resultSetTire.getString(\"Brand\"));\n orderedTire.setStock(resultSetTire.getString(\"Stock\"));\n orderedTire.setPrice(resultSetTire.getString(\"Price\"));\n orderedTire.setVehicleType(resultSetTire.getString(\"VehicleType\"));\n orderedItems.addItem(orderedTire);\n }\n }\n }\n catch(SQLException e){\n System.out.println(\"Error generating list of Orders: \" + e);\n }\n return orderedItems;\n }", "@Override\n\t\tpublic long getItemId(int p1)\n\t\t\t{\n\t\t\t\treturn p1;\n\t\t\t}", "@Override\n\tpublic OrderEntity findOneByAccountId(Long id) {\n\t\treturn oder.findOneByAccountId(id);\n\t}", "HpItemParamItem selectByPrimaryKey(Long id);", "@Override\n\tpublic OrderDetail getById(String id) {\n\t\tOrderDetail detail = orderDetailDao.getById(id);\n\t\treturn detail;\n\t}", "@Override\r\n\tpublic PurchaseOrder getOnePurchaseOrderById(Integer purId) {\n\t\treturn ht.get(PurchaseOrder.class,purId);\r\n\t}", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public Items[] findWhereIdEquals(int id) throws ItemsDaoException;", "private Order getOrderWithId(int orderId) {\n\t\tfor (Order order : acceptedOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\t\tfor (Order order : newOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\n\t\t// Es wurde keine Order in dem OrderPool gefunden, die mit der OrderId\n\t\t// vom Spieler übereinstimmt.\n\t\tSystem.err\n\t\t\t\t.println(\"Die OrderId der Order ist nicht im PlayerOrderPool vorhanden\");\n\t\treturn null;\n\t}", "public Position1 getSinglePositionById(Integer posId) {\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from Position1 as position where position.position1Id = ?\",\n new Object[]{posId},\n new Type[]{Hibernate.INTEGER});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (Position1) results.get(0);\n }\n\n }", "Optional<ItemPedido> findOne(Long id);", "@Override\r\n\tpublic Order FindById(int IdOrder) {\n\t\treturn em.find(Order.class, IdOrder);\r\n\t}", "@Override\n\tpublic WxOrder queryOrderById(Integer id) {\n\t\treturn orderMapper.queryOrderById(id);\n\t}", "public Integer getOrderItemId() {\n return orderItemId;\n }", "EquipmentOrder selectByPrimaryKey(Long id);", "public List<OrderItem> searchOrderItem() throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n }\n \n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "Order getOrder(String orderNumber)\n throws FlooringMasteryPersistenceException;", "OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;", "public List<PurchaseOrderLine> findByOrderId(String orderId);", "public Entity2 findEntity2ById(String id) throws DaoException;", "public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}", "@Select({\n \"select\",\n \"id, orderid, name, price, userid\",\n \"from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n Order selectByPrimaryKey(Long id);", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "public Items findByPrimaryKey(int id) throws ItemsDaoException;", "@Override\n\tpublic RechargeOrder getByOrderID(String orderId) {\n\t\treturn null;\n\t}", "public Order get(int id) {\n\t\treturn orderDao.get(id);\n\t}", "private void pickupOrder(long orderId) {\n shelf.pull(orderId);\n }" ]
[ "0.71394473", "0.70707667", "0.68394345", "0.663403", "0.661683", "0.6597154", "0.6587524", "0.6512944", "0.6478985", "0.62944883", "0.627249", "0.6267327", "0.6224727", "0.61760265", "0.61715984", "0.6134064", "0.61336166", "0.6121333", "0.60997504", "0.60907114", "0.60732305", "0.607017", "0.6069567", "0.6050323", "0.60080594", "0.59988916", "0.59713364", "0.5970991", "0.5970991", "0.59650767", "0.5949224", "0.5943153", "0.59292424", "0.5911233", "0.5910606", "0.58801574", "0.58757114", "0.58700675", "0.58683264", "0.58677965", "0.586568", "0.58607465", "0.5844093", "0.583416", "0.58326554", "0.5830073", "0.58293706", "0.5826898", "0.5824661", "0.58238095", "0.5821945", "0.5806723", "0.57904875", "0.5754486", "0.57352966", "0.5717656", "0.57015824", "0.5697658", "0.56902707", "0.56888336", "0.5686255", "0.56861067", "0.5683336", "0.56824654", "0.56814486", "0.56695", "0.56628954", "0.5644219", "0.5637031", "0.56308633", "0.5627215", "0.5625416", "0.56226194", "0.561772", "0.5616773", "0.56165516", "0.55998385", "0.5589097", "0.55872566", "0.5586648", "0.5585973", "0.55816495", "0.5577492", "0.5571711", "0.5562726", "0.556248", "0.5557707", "0.5546937", "0.5546474", "0.5539165", "0.5535649", "0.5529037", "0.55229133", "0.55207604", "0.55080384", "0.54983634", "0.5486988", "0.5482583", "0.54802287", "0.54763466" ]
0.67081887
3
getting the item1 from the given orderId under entityManager
@Override @Transactional(value = "jpaTransactionManager") public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) { Integer itemNum = 1; JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum); jpaOrderItemRepository.updateByQueryWithClear(orderId); // Once again getting the same item#1 from the given orderId to check // the state jpaOrderItem = jpaOrderItemRepository.findOne(itemNum); return jpaOrderItem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OrderItemDto getOrderItem(long id) throws SQLException;", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "public Order getOrderById(long orderId);", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "ClOrderInfo selectByPrimaryKey(String orderId);", "Order getByID(String id);", "@Transactional(readOnly = true)\n public Optional<OrderItems> findOne(Long id) {\n log.debug(\"Request to get OrderItems : {}\", id);\n return orderItemsRepository.findById(id);\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "Order getOrder(int id) throws ServiceException;", "@Transactional\n public OrderEntity findEager(Long orderId) {\n log.infof(\"Find order with id [%d]\", orderId);\n final TypedQuery<OrderEntity> query = em.createQuery(\"select o from OrderEntity o \" +\n \"join fetch o.shipmentAddress sa \" +\n \"join fetch o.billingAddress ba \" +\n \"left join fetch o.orderItems oi \" +\n \"where o.orderId = :orderId\", OrderEntity.class);\n query.setParameter(\"orderId\", orderId);\n return query.getSingleResult();\n }", "@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}", "NjOrderWork2 selectByPrimaryKey(String id);", "Order getOrder(String orderId) throws OrderBookOrderException;", "public List<OrderItem> searchOrderItem(int idOrderItem) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, idOrderItem);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "TradeItem getTradeItem(long id);", "public OrderItem findOrderItemById(int id)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.findById(id);\n\t\tif(orderIt==null)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t \"Id-ul nu exista!\",\n\t\t\t\t \"Update error\",\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t\t\tthrow new NoSuchElementException(\"OrderItem=ul cu id-ul:\"+id+\" nu a fost gasit\");\n\t\t}\n\t\treturn orderIt;\n\t}", "public interface OrderItemRepository extends JpaRepository<OrderItem, Integer>, JpaSpecificationExecutor {\n\t@Query(\"SELECT oi FROM OrderItem oi WHERE oi.order.orderId = ?1\")\n\tList<OrderItem> findByOrderId(String orderId);\n}", "public List<OrderItems> getAllOrderItemsByOrderId(int orderId){\n\t\tSystem.out.println(\"service\");\n\t\tList<OrderItems> orderItemsRecords = orderItemsRepo.getAllOrderItemsByOrderId(orderId);\n\t\tList<OrderItems> orderItems= new ArrayList();\n\t\tfor(OrderItems items: orderItemsRecords) \n\t\t\tif(items.getOrders().getOrderId() == orderId)\n\t\t\t\torderItems.add(items);\t\t\n\t\tSystem.out.println(orderItems);\n\t\treturn orderItems;\t\n\t}", "@Override\n\tpublic Orderi get(Integer id) {\n\t\t\n\t\treturn (Orderi)getHibernateTemplate().get(Orderi.class, id);\n\t}", "List<LineItem> listLineItemByOrderId(Integer orderId);", "public List<Order> findOrder(int orderId) {\n\t\tList<Order> orders=new ArrayList<Order>();\n\t\tQuery query=em.createQuery(\"from Order where order_Id=:orderId\"+\" and block_id is null\");\n\t\tquery.setParameter(\"orderId\",orderId);\n\t\t//System.out.println(query);\n\t\torders=query.getResultList();\n\t\t//System.out.println(orders.get(0));\n\n\t\treturn orders;\n\n\t}", "OrderDetails selectByPrimaryKey(Integer id);", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "Order requireById(Long orderId);", "@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }", "ItemStockDO selectByPrimaryKey(Integer id);", "ItemStockDO selectByPrimaryKey(Integer id);", "public ComplexOrderTO getOrder(long storeID, long orderId) throws NotInDatabaseException;", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "@ResponseBody\n @RequestMapping(method = RequestMethod.POST, value = \"/{orderId}/item}\")\n public ResultData viewItem(@PathVariable(\"orderId\") String orderId) {\n ResultData result = new ResultData();\n Map<String, Object> condition = new HashMap<>();\n condition.put(\"orderId\", orderId);\n List<Integer> status = new ArrayList<>(Arrays.asList(OrderStatus.PAYED.getCode(), OrderStatus.PATIAL_SHIPMENT.getCode(), OrderStatus.FULLY_SHIPMENT.getCode(), OrderStatus.FINISHIED.getCode()));\n condition.put(\"status\", status);\n ResultData response = orderService.fetchOrder(condition);\n if (response.getResponseCode() == ResponseCode.RESPONSE_OK) {\n Order order = ((List<Order>) response.getData()).get(0);\n\n }\n return result;\n }", "@Override\n\tpublic Porder getPorderById(Integer porderid) {\n \t\n \treturn entityManager.find(Porder.class,porderid);\n }", "OrderDetail selectByPrimaryKey(String detailId);", "@Override\n public Item get(long idItem) throws EntityNotFound;", "@Override\n\tpublic HsExchangeOrder selectByPrimaryKey(HsExchangeOrder order) {\n\t\treturn hsExchangeOrderDbService.selectByPrimaryKey(order.getId());\n\t}", "public Item getByID(Integer id) {\r\n Item item = null;\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n item = (Item) session.get(Item.class, id);\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return item;\r\n }", "public OrderEntity LoadSingleOrder(int id) throws ClassNotFoundException, SQLException{\n\t\tOrderEntity o = new OrderEntity();\r\n\t\tConnectDB db = new ConnectDB();\r\n\t\tdb.connect();\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM cart WHERE ID = \" + id;\r\n\t\t\tResultSet rs = db.st.executeQuery(sql);\r\n\t\t\t//System.out.print(rs.getString(\"Username\"));\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\t\t\r\n\t\t\t\to.setId(rs.getInt(\"id\"));\r\n\t\t\t\to.setId_customer(rs.getInt(\"id_customer\"));\r\n\t\t\t\to.setTotal_price(rs.getInt(\"price_sum\"));\r\n\t\t\t\to.setAddress(rs.getString(\"address\"));\r\n\t\t\t\to.setDate(rs.getString(\"date_delivery\"));\r\n\t\t\t\to.setStatus(rs.getInt(\"status\"));\r\n\t\t\t\t\r\n\t\t\t\t//list.add(p);\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdb.st.close();\r\n\t\t\tdb.con.close();\r\n\t\t\t\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\treturn o;\r\n\t}", "OrderPO selectByPrimaryKey(Integer id);", "public List<OrderDetail> getOrderDetailByOrder(Long orderId);", "Optional<Order> findByUserId(long userId);", "@RequestMapping(\"/{orderId}/items\")\n public Flux<Item> getItemsOfOrder(@PathVariable(\"orderId\") int orderId)\n throws JsonProcessingException {\n Order order = orderRepository.getOrderById(orderId);\n\n // Get every item in order\n return HystrixCommands.from(itemInfo.getItemsFromOrderCall(order))\n .fallback(itemInfo.getItemsFromOrderFallback())\n .commandName(\"getItemsFromOrderCall\")\n .toFlux();\n }", "public JSONObject fetchOrder(long orderId) throws Exception;", "@Override\n\tpublic Item findItemById(Long id) {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Item> q = cb.createQuery(Item.class);\n\t\t Root<Item> c = q.from(Item.class);\n\t\t ParameterExpression<Long> p = cb.parameter(Long.class);\n\t\t q.select(c).where(cb.equal(c.get(\"id\"), p));\n\t\t TypedQuery<Item> query = entityManager.createQuery(q);\n\t\t query.setParameter(p, id);\n\t\t Item i = query.getSingleResult();\n\t\treturn i;\n\t}", "OrderDTO findBy(String id);", "CartDO selectByPrimaryKey(Integer id);", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "public Item getItemById(Integer itemId);", "public List<Item> readAllOrderItem(Long orderId) {\n\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t\t\t+ \"WHERE oi.order_id = \" + orderId + \";\";\n\t\t\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\t\torderItemList.add(item);\n\t\t\t}\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public List<OrderItem> searchOrderIdOrder(int OrderIdOrder) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT order_Item.*, product.*, category.* FROM order_Item, product, category WHERE order_Item.product_id_Product = product.id_Product AND product.category_id_Category = category.id_Category AND order_Item.order_id_Order = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, OrderIdOrder);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n oi.setIdProduct(rs.getInt(\"id_Product\"));\n oi.setCategoryIdCategory(rs.getInt(\"category_id_Category\"));\n oi.setColor(rs.getString(\"color\"));\n oi.setFinishingProcess(rs.getString(\"finishing_Process\"));\n oi.setCubaType(rs.getString(\"cuba_Type\"));\n oi.setDescription(rs.getString(\"description\"));\n oi.setStock(rs.getInt(\"stock\"));\n oi.setUnitaryValue(rs.getDouble(\"unitary_Value\"));\n oi.setImageLink(rs.getString(\"image_Link\"));\n\n oi.setIdCategory(rs.getInt(\"id_Category\"));\n oi.setCategory(rs.getString(\"category\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "@Nullable\n public Order doRetrieveById(int id) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n Operator op = null;\n Order o = null;\n User u = null;\n\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.id=?;\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n o = new Order();\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n u = ud.doRetrieveByUsername(rs.getString(1));\n o.setUser(u);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n\n }\n st.close();\n cn.close();\n\n return o;\n } catch (SQLException e) {\n return null;\n }\n }", "public FoodEntity getFood(OrderEntity orderEntity);", "public void retrieveOrderContentById_Order(int i) {\n\t\tSystem.out.println(\"\\nMostrat detalls del Order \" + i);\n\t\tObjectSet result = db.queryByExample(new Order(i, null, null, null, null));\n\t\t\n\t\tOrder aConsultar = (Order) result.next();\n\t\taConsultar.getDetails().stream()\n\t\t\t\t.forEach(System.out::println);\n\t}", "public abstract CustomerOrder findOne(Long id);", "ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);", "@Override\n\t\tpublic Object getItem(int p1)\n\t\t\t{\n\t\t\t\treturn is.get(p1);\n\t\t\t}", "NjOrderAttachment selectByPrimaryKey(String id);", "ExchangeOrder selectByPrimaryKey(String id);", "Item findById(String id);", "TRefundOrder selectByPrimaryKey(String refundorderid);", "UcOrderGuestInfo selectByPrimaryKey(Long id);", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "public MobileTaskAssignment getByOrder(String orderId) {\r\n\t\treturn (MobileTaskAssignment) sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.orderId = :orderId\")\r\n\t\t\t\t\t.setString(\"orderId\", orderId)\r\n\t\t\t\t\t.uniqueResult();\r\n\t}", "Optional<Order> findById(Long orderId);", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "Item findByNo(Long No);", "private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "GoodsPo selectByPrimaryKey(Long id);", "BusnessOrder selectByPrimaryKey(Integer id);", "ItoProduct selectByPrimaryKey(Integer id);", "public TireList findOrderedItems(){\n \n try{\n sql = \"Select * From OrderedItems Where OrderID = \" + getOrderID();\n ResultSet resultSetOrder = db.SelectDB(sql);\n \n Tire orderedTire;\n while(resultSetOrder.next()){\n orderedTire = new Tire();\n orderedTire.setQuantity(resultSetOrder.getInt(\"Quantity\"));\n ResultSet resultSetTire = db.SelectDB(\"Select * From Tire Where TireID = \" + resultSetOrder.getString(\"TireID\"));\n while(resultSetTire.next()){\n orderedTire.setStockID(resultSetTire.getString(\"TireID\"));\n orderedTire.setType(resultSetTire.getString(\"TireType\"));\n orderedTire.setSize(resultSetTire.getString(\"TireSize\"));\n orderedTire.setBrand(resultSetTire.getString(\"Brand\"));\n orderedTire.setStock(resultSetTire.getString(\"Stock\"));\n orderedTire.setPrice(resultSetTire.getString(\"Price\"));\n orderedTire.setVehicleType(resultSetTire.getString(\"VehicleType\"));\n orderedItems.addItem(orderedTire);\n }\n }\n }\n catch(SQLException e){\n System.out.println(\"Error generating list of Orders: \" + e);\n }\n return orderedItems;\n }", "@Override\n\t\tpublic long getItemId(int p1)\n\t\t\t{\n\t\t\t\treturn p1;\n\t\t\t}", "@Override\n\tpublic OrderEntity findOneByAccountId(Long id) {\n\t\treturn oder.findOneByAccountId(id);\n\t}", "HpItemParamItem selectByPrimaryKey(Long id);", "@Override\n\tpublic OrderDetail getById(String id) {\n\t\tOrderDetail detail = orderDetailDao.getById(id);\n\t\treturn detail;\n\t}", "@Override\r\n\tpublic PurchaseOrder getOnePurchaseOrderById(Integer purId) {\n\t\treturn ht.get(PurchaseOrder.class,purId);\r\n\t}", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public Items[] findWhereIdEquals(int id) throws ItemsDaoException;", "private Order getOrderWithId(int orderId) {\n\t\tfor (Order order : acceptedOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\t\tfor (Order order : newOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\n\t\t// Es wurde keine Order in dem OrderPool gefunden, die mit der OrderId\n\t\t// vom Spieler übereinstimmt.\n\t\tSystem.err\n\t\t\t\t.println(\"Die OrderId der Order ist nicht im PlayerOrderPool vorhanden\");\n\t\treturn null;\n\t}", "public Position1 getSinglePositionById(Integer posId) {\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from Position1 as position where position.position1Id = ?\",\n new Object[]{posId},\n new Type[]{Hibernate.INTEGER});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (Position1) results.get(0);\n }\n\n }", "Optional<ItemPedido> findOne(Long id);", "@Override\r\n\tpublic Order FindById(int IdOrder) {\n\t\treturn em.find(Order.class, IdOrder);\r\n\t}", "@Override\n\tpublic WxOrder queryOrderById(Integer id) {\n\t\treturn orderMapper.queryOrderById(id);\n\t}", "public Integer getOrderItemId() {\n return orderItemId;\n }", "EquipmentOrder selectByPrimaryKey(Long id);", "public List<OrderItem> searchOrderItem() throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n }\n \n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "Order getOrder(String orderNumber)\n throws FlooringMasteryPersistenceException;", "OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;", "public List<PurchaseOrderLine> findByOrderId(String orderId);", "public Entity2 findEntity2ById(String id) throws DaoException;", "public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}", "@Select({\n \"select\",\n \"id, orderid, name, price, userid\",\n \"from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n Order selectByPrimaryKey(Long id);", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "public Items findByPrimaryKey(int id) throws ItemsDaoException;", "@Override\n\tpublic RechargeOrder getByOrderID(String orderId) {\n\t\treturn null;\n\t}", "public Order get(int id) {\n\t\treturn orderDao.get(id);\n\t}", "private void pickupOrder(long orderId) {\n shelf.pull(orderId);\n }" ]
[ "0.71394473", "0.70707667", "0.68394345", "0.67081887", "0.663403", "0.661683", "0.6597154", "0.6587524", "0.6512944", "0.6478985", "0.62944883", "0.6267327", "0.6224727", "0.61760265", "0.61715984", "0.6134064", "0.61336166", "0.6121333", "0.60997504", "0.60907114", "0.60732305", "0.607017", "0.6069567", "0.6050323", "0.60080594", "0.59988916", "0.59713364", "0.5970991", "0.5970991", "0.59650767", "0.5949224", "0.5943153", "0.59292424", "0.5911233", "0.5910606", "0.58801574", "0.58757114", "0.58700675", "0.58683264", "0.58677965", "0.586568", "0.58607465", "0.5844093", "0.583416", "0.58326554", "0.5830073", "0.58293706", "0.5826898", "0.5824661", "0.58238095", "0.5821945", "0.5806723", "0.57904875", "0.5754486", "0.57352966", "0.5717656", "0.57015824", "0.5697658", "0.56902707", "0.56888336", "0.5686255", "0.56861067", "0.5683336", "0.56824654", "0.56814486", "0.56695", "0.56628954", "0.5644219", "0.5637031", "0.56308633", "0.5627215", "0.5625416", "0.56226194", "0.561772", "0.5616773", "0.56165516", "0.55998385", "0.5589097", "0.55872566", "0.5586648", "0.5585973", "0.55816495", "0.5577492", "0.5571711", "0.5562726", "0.556248", "0.5557707", "0.5546937", "0.5546474", "0.5539165", "0.5535649", "0.5529037", "0.55229133", "0.55207604", "0.55080384", "0.54983634", "0.5486988", "0.5482583", "0.54802287", "0.54763466" ]
0.627249
11
Safe disposing (just in case)
public void dispose() { if (this.filterEngine != null) { this.filterEngine.dispose(); this.filterEngine = null; } if (this.jsEngine != null) { this.jsEngine.dispose(); this.jsEngine = null; } if (this.logSystem != null) { this.logSystem.dispose(); this.logSystem = null; } if (this.webRequest != null) { this.webRequest.dispose(); this.webRequest = null; } if (this.updateAvailableCallback != null) { this.updateAvailableCallback.dispose(); this.updateAvailableCallback = null; } if (this.updateCheckDoneCallback != null) { this.updateCheckDoneCallback.dispose(); this.updateCheckDoneCallback = null; } if (this.filterChangeCallback != null) { this.filterChangeCallback.dispose(); this.filterChangeCallback = null; } if (this.showNotificationCallback != null) { this.showNotificationCallback.dispose(); this.showNotificationCallback = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void doDispose() {\n\t}", "private void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\t\tdestroy();\n\t}", "@Override\n\t\t\tpublic void dispose() {\n\t\t\t}", "public void dispose() {\n processDispose(false);\n }", "@Override\r\n\tpublic void dispose()\r\n\t{}", "@Override\n public void dispose() {\n }", "@Override\n public void dispose() {\n }", "@Override\n public void dispose() {\n }", "@Override\n public void dispose() {\n }", "@Override\n public void dispose() {\n }", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\n public void dispose() {\n \n }", "@Override\r\n\tprotected void dispose() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void dispose() {\n\t\t \n\t\t}", "@Override\r\n\tpublic void dispose() {\n\t}", "@Override\r\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "@Override\n\tpublic void dispose() {\n\t}", "public void dispose() {\r\n\t\tclose();\r\n\t}", "@Override\n\tpublic void dispose()\n\t{\n\t\t\n\t}", "@Override\n \t\t\tpublic void dispose() {\n \n \t\t\t}", "void dispose() {}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose()\n\t{\n\n\t}", "@Override\n public void dispose() {\n\n }", "public void dispose() {\n\t\t\t\r\n\t\t}", "public void dispose() {\n\t\t\r\n\t}", "public void dispose() {\n\t\t\r\n\t}", "public void dispose() {\n\t\t\r\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "@Override\n\tpublic void dispose() {\n\n\t}", "public void dispose() {\n\t\t}", "public void dispose() {\n\t\t}", "public void dispose() {\n\t}", "public void dispose() {\n\t}", "public void dispose() {\n\t}", "public void dispose() {\n\t}", "@Override\n public void dispose() {\n\n }", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}" ]
[ "0.81193244", "0.79199445", "0.7851954", "0.7780061", "0.7761624", "0.77416176", "0.77274334", "0.77051616", "0.77051616", "0.77051616", "0.77051616", "0.77051616", "0.76899344", "0.76899344", "0.76899344", "0.76899344", "0.76899344", "0.76899344", "0.76899344", "0.76899344", "0.7688125", "0.76831365", "0.7680944", "0.76421857", "0.76421857", "0.76283437", "0.76283437", "0.76283437", "0.76283437", "0.76283437", "0.76283437", "0.76283437", "0.76283437", "0.76195735", "0.7596107", "0.7589028", "0.75862426", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.7553583", "0.75263", "0.7518103", "0.7507331", "0.7494368", "0.7494368", "0.7494368", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74861753", "0.74798054", "0.74798054", "0.7479032", "0.7479032", "0.7479032", "0.7479032", "0.747853", "0.74723357", "0.74723357", "0.74723357", "0.74723357", "0.74723357", "0.74723357", "0.74723357" ]
0.0
-1
/ Issue 3364 ( introduced the feature to reenabled element hiding. Nothing changes for Adblock Plus for Android, as `this.elemhideEnabled` is `false`, which results in an empty list being returned and converted into a `(String[])null` in AdblockPlus.java, which is the only place this function here is called from Adblock Plus for Android. If element hiding is enabled, then this function now first checks for possible whitelisting of either the document or element hiding for the given URL and returns an empty list if so. This is needed to ensure correct functioning of e.g. acceptable ads.
public List<String> getElementHidingSelectors(final String url, final String[] referrerChainArray) { if (!this.elemhideEnabled || this.isDocumentWhitelisted(url, referrerChainArray) || this.isElemhideWhitelisted(url, referrerChainArray)) { return new ArrayList<String>(); } return this.filterEngine.getElementHidingSelectors(url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getHides() {\n return json.get(\"hides\") == null ? null : getListString(\"hides\");\n }", "boolean isCanSeeFriendlyInvisibles();", "boolean isHiddenFromList();", "protected boolean isAdvertisementDisabled(LocalDevice device) {\n/* 353 */ DiscoveryOptions options = getUpnpService().getRegistry().getDiscoveryOptions(device.getIdentity().getUdn());\n/* 354 */ return (options != null && !options.isAdvertised());\n/* */ }", "boolean shouldIgnoreExternalIntentHandlers(String url);", "public Collection findOtherPresentationsUnrestricted(Agent owner, String toolId, String showHidden);", "public void clickHideBroadcastsInSocialPanel() throws UIAutomationException{\t\t\r\n\t\telementController.requireElementSmart(fileName,\"Hide Broadcasts In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Hide Broadcasts In Social Panel\");\r\n\t\tUIActions.click(fileName,\"Hide Broadcasts In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Hide Broadcasts In Social Panel\");\r\n\t\t\r\n\t\t// Check by clicking on 'hide broadcasts' it changes to 'show all messages'\r\n\t\telementController.requireElementSmart(fileName,\"Show All Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show All Messages In Social Panel\");\r\n\t\tString linkTextInPage=UIActions.getText(fileName,\"Show All Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show All Messages In Social Panel\");\r\n\t\tString linkTextInXML=dataController.getPageDataElements(fileName,\"Show All Messages Name\" , \"Title\");\r\n\t\tif(!linkTextInPage.contains(linkTextInXML)){\r\n\t\t\tthrow new UIAutomationException( \"'\"+linkTextInXML +\"' not found\");\r\n\t\t}\r\n\t\t\r\n\t\t// Click on 'show All messages'\r\n\t\telementController.requireElementSmart(fileName,\"Show All Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show All Messages In Social Panel\");\r\n\t\tUIActions.click(fileName,\"Show All Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show All Messages In Social Panel\");\r\n\t\ttry{\r\n\t\t\tThread.sleep(5000);\r\n\t\t}\r\n\t\tcatch(Exception e ){}\r\n\t\t\r\n\t\t// Check by clicking on 'show all messages' it changes to 'hide broadcasts'\r\n\t\telementController.requireElementSmart(fileName,\"Hide Broadcasts In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Hide Broadcasts In Social Panel\");\r\n\t\tString showLinkTextInPage=UIActions.getText(fileName,\"Hide Broadcasts In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Hide Broadcasts In Social Panel\");\r\n\t\tString showLinkTextInXML=dataController.getPageDataElements(fileName,\"Hide Broadcasts Name\" , \"Title\");\r\n\t\tif(!showLinkTextInPage.contains(showLinkTextInXML)){\r\n\t\t\tthrow new UIAutomationException( \"'\"+showLinkTextInXML +\"' not found\");\r\n\t\t}\r\n\t}", "public List<String> getHidElementsOfDOM(WebElement rootElement) {\n\n List<String> hiddenElements = new ArrayList<String>();\n\n hiddenElements = (List<String>) ((JavascriptExecutor) this.driver).executeScript(\n this.excludeTagsJS + this.isDisPlayedJS + this.getElementXPathJS + this.getHiddenElementOfDOMJS +\n \"return getHiddenElementsOfDOM(arguments[0]);\",\n rootElement\n );\n return hiddenElements;\n }", "List<View> getViewsToDisableInAccessibility();", "@Override\n\tpublic void hideAds(Hashtable<String, String> adsInfo) {\n\n\t}", "List<WebURL> Filter(List<WebURL> urls){\n return null;\n }", "void setCanSeeFriendlyInvisibles(boolean canSeeFriendlyInvisibles);", "public void requestInvisibleMode() {\n final ModContainer activeModContainer = Loader.instance().activeModContainer();\n if (activeModContainer != null) {\n invisibleRequesters.add(activeModContainer.getName());\n } else {\n invisibleRequesters.add(\"null\");\n }\n }", "private void hideElements(){\n question.setVisibility(View.GONE);\n yes_for_joke.setVisibility(View.GONE);\n no_for_joke.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n }", "boolean isBlacklisted(DependencyNodeFunction function);", "String getDisabledByPolicyTitleForFinancedDevice();", "public java.util.List<java.lang.String> getDisallowUninstallApps() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: cm.android.mdm.manager.PackageManager2.getDisallowUninstallApps():java.util.List<java.lang.String>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.getDisallowUninstallApps():java.util.List<java.lang.String>\");\n }", "@Override\n public void adHidden(Ad ad) {\n\n }", "@Override\n public void adHidden(Ad ad) {\n\n }", "public boolean isWebShowing();", "ImmutableList<SchemaOrgType> getIsBasedOnUrlList();", "public ArchivePage verifyDoNotDisturbIsNotDisplayed() {\n\t\t\ttry {\n\t\t\t\tThread.sleep(15000);\n\t\t\t\tUtils.uBase.checkPageReady();\n\t\t\t\tAssert.assertFalse(Utils.uBase.imageCompare(\"DoNotDisturbBanner\"), \"Do not disturb banner is displayed\");\n\t\t\t\tAdvanceReporting.addLogs(\"pass\", \"Do not disturb banner is not displayed\");\n\t\t\t\tAdvanceReporting.addLogs(\"pass\", \"Do not disturb banner\",\"DoNotDisturbBanner\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tAdvanceReporting.addLogs(\"info\", \"Do not disturb banner is displayed\");\n\t\t\t\tAdvanceReporting.addLogs(\"fail\", \"Error Message: \"+e.getMessage());\n\t\t\t\te.printStackTrace(); Assert.fail();\n\t\t\t}\t\t\t\n\t\t\treturn this;\t\t\n\t\t}", "public static native boolean _isVisible(Element elem) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (elem.style.display != 'none');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;", "@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\tif (url.startsWith(\"http://www.cognustechnology.com/\")) {\n\t\t\t\t\t// authorization complete hide webview for now.\n//\t\t\t\t\twebview.setVisibility(View.GONE);\n\n\t\t\t\t\tUri uri = Uri.parse(url);\n\t\t\t\t\tLoader loader = new Loader();\n\t\t\t\t\tloader.execute(uri);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn super.shouldOverrideUrlLoading(view, url);\n\t\t\t}", "public boolean isGoneWithoutAd() {\n return hideWhenNoAd;\n }", "private List<String> listPolicyExemptAppsUnchecked() {\n String[] core = mContext.getResources().getStringArray(R.array.policy_exempt_apps);\n String[] vendor = mContext.getResources().getStringArray(R.array.vendor_policy_exempt_apps);\n\n int size = core.length + vendor.length;\n Set<String> apps = new ArraySet<>(size);\n for (String app : core) {\n apps.add(app);\n }\n for (String app : vendor) {\n apps.add(app);\n }\n\n return new ArrayList<>(apps);\n }", "public boolean isHidden();", "public List<AnnotatedLinkWrapper> getItemsUnfiltered() {\n return getDelegate().getExtendedItems().stream()\n .map(AnnotatedLinkWrapper::new)\n .filter(al -> al.getTarget() != null)\n .filter(al -> al.getTarget().isInProduction())\n .collect(Collectors.toList());\n }", "public static boolean elementAvailiable(String s) { // Check if page contains\n\t\tboolean available=false; \n\t\ttry {\n\t\t\tif(driver.getPageSource().contains(s)){\n\t\t\t\tavailable=true;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn available; \n\t}", "@Override\n public int getVisibility() {\n if (hideWhenNoAd && (hasAd() == false)) {\n return GONE;\n } else {\n return super.getVisibility();\n }\n }", "private void hideLinkViews(boolean makeHidden) {\n int viewState;\n if (makeHidden) {\n viewState = View.GONE;\n } else {\n viewState = View.VISIBLE;\n }\n ivLinkIcon.setVisibility(viewState);\n linkContainter.setVisibility(viewState);\n linkContainerBig.setVisibility(viewState);\n tvLinkUserName.setVisibility(viewState);\n tvLinkContent.setVisibility(viewState);\n }", "@Override\n public void adHidden(Ad ad) {\n\n }", "private void hideAddFeed() {\n addfeed.setVisible(false);\n\n if (Preferences.builtfeedsEnabled(getBaseContext())) {\n\n //hide built in feeds menu if enabled\n default_feeds.setVisible(false);\n\n } else {\n\n //hide xda menu item\n xda.setVisible(false);\n }\n\n }", "@Test\r\n\tpublic void hidingTest(){\r\n\t\tBlacklisting bl = new Blacklisting();\r\n\t\tConversation c = convoCopy.copy();\r\n\t\t\r\n\t\tList<String> hideWords = new ArrayList<String>();\r\n\t\thideWords.add(\"Hello\");\r\n\t\thideWords.add(\"like\");\r\n\t\thideWords.add(\"pie\");\r\n \t\r\n \t\r\n\t\tConversation hidden = bl.hideWord(c, hideWords);\r\n\r\n\t\tMessage[] redactedmsg = new Message[hidden.getMsg().size()];\r\n\t\thidden.getMsg().toArray(redactedmsg);\r\n\t\t\r\n\t\t\r\n\t\tassertEquals(hidden.getMsg().size(), 7);\r\n\r\n\t\tassertEquals(redactedmsg[0].getContent(), \"*redacted* there!\");\r\n\t\tassertEquals(redactedmsg[2].getContent(), \"I'm good thanks, do you *redacted* *redacted*?\");\r\n\t\tassertEquals(redactedmsg[4].getContent(), \"Hell yes! Are we buying some *redacted*?\");\r\n\t\tassertEquals(redactedmsg[5].getContent(), \"No, just want to know if there's anybody else in the *redacted* society...\");\r\n\t\tassertEquals(redactedmsg[6].getContent(), \"YES! I'm the head *redacted* eater there...\");\r\n\r\n\r\n\t\tSystem.out.println(\"Filtered by user ID: \" + hidden);\r\n\t}", "public List<String> getHideClasses() {\n\t\treturn hideClasses;\n\t}", "protected void hideOptions(){\n mOptionList.setClickable(false);\n mOptionList.setVisibility(View.INVISIBLE);\n }", "private void findHide() {\n \tif (this.pagesView != null) this.pagesView.setFindMode(false);\n \tthis.currentFindResultNumber = null;\n \tthis.currentFindResultPage = null;\n \tthis.findButtonsLayout.setVisibility(View.GONE);\n }", "boolean ignoreExternal();", "@Override\n public void onAdFailedToLoad(int errorCode) {\n sponsoredLinearLayout.setVisibility(View.GONE);\n adView.setVisibility(View.GONE);\n adProgressBar.setVisibility(View.GONE);\n adFailedLinearLayout.setVisibility(View.VISIBLE);\n }", "public Urls getNotApprovedUrls() {\n\t\tPropertySelector propertySelector = new PropertySelector(\"approved\");\n\t\tpropertySelector.defineEqual(Boolean.FALSE);\n\t\treturn getUrls(propertySelector);\n\t}", "public boolean isWhitelisted ( ) {\n\t\treturn extract ( handle -> handle.isWhitelisted ( ) );\n\t}", "@Override\n public void onAdFailedToLoad(LoadAdError adError) {\n adContainerView.setVisibility(View.GONE);\n }", "public void setGoneWithoutAd(boolean hide) {\n this.hideWhenNoAd = hide;\n }", "String getDefaultDisabledByPolicyContent();", "public void exitCollectWeb() {\n mActivity.mHolder.mWebLayout.setVisibility(View.GONE);\n isCollectWebPage = false;\n }", "private void checkOffensive(AccessibilityNodeInfo mNodeInfo) {\n int mDebugDepth = 0;\n if (mNodeInfo == null) return;\n String log =\"\";\n for (int i = 0; i < mDebugDepth; i++) {\n log += \".\";\n }\n\n Intent inte = new Intent(this,OverlayActivity.class);\n inte.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n if (mNodeInfo.getText() != null) {\n String replaceString=(mNodeInfo.getText().toString()).replace(\" \",\"%20\");\n Log.e(TAG, \"checkOffensive: \" + url+replaceString);\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url+replaceString,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try{\n //open overlay if offensiveness score greater than 0.8\n response += response.substring(response.indexOf(\":\") + 1, response.indexOf(\",\"));\n float response_float=Float.parseFloat(response);\n if (response_float > 0.7) {\n startActivity(inte);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n }\n },\n error -> Log.e(\"ERROR\", \"\" + error.getMessage()));\n\n RequestQueue requestQueue = Volley.newRequestQueue(MyAccessibilityService.this);\n requestQueue.add(stringRequest);\n }\n\n log+=\"(\"+mNodeInfo.getText() +\" <-- \"+\n mNodeInfo.getViewIdResourceName()+\")\";\n Log.d(TAG, log);\n if (mNodeInfo.getChildCount() < 1) return;\n mDebugDepth++;\n\n for (int i = 0; i < mNodeInfo.getChildCount(); i++) {\n checkOffensive(mNodeInfo.getChild(i));\n }\n mDebugDepth--;\n }", "private String getHideContentFlagGroupDownloadForm(String groupFile, String productName, List<ReportMessageTO> reportMessages) {\r\n\t\tString hideContentFlag = IApplicationConstants.FLAG_N;\r\n\t\tString currentAdminYear = inorsService.getCurrentAdminYear();\r\n\t\tint lastAdmYr = Integer.parseInt(currentAdminYear) - 1;\r\n\t\tint lastToLastAdmYr = Integer.parseInt(currentAdminYear) - 2;\r\n\t\tString lastAdminYear = String.valueOf(lastAdmYr);\r\n\t\tString lastToLastAdminYear = String.valueOf(lastToLastAdmYr);\r\n\t\tlogger.log(IAppLogger.INFO, \"currentAdminYear=\" + currentAdminYear);\r\n\t\tlogger.log(IAppLogger.INFO, \"lastAdminYear=\" + lastAdminYear);\r\n\t\tlogger.log(IAppLogger.INFO, \"lastToLastAdminYear=\" + lastToLastAdminYear);\r\n\t\tif (groupFile.equals(IApplicationConstants.EXTRACT_FILETYPE.ICL.toString())) {\r\n\t\t\t// Rule 1: Invitation Code Letters (IC) are available for the current ISTEP+ administration only.\r\n\t\t\t// Report Notification: Invitation Code Letters (IC) are available for the current ISTEP+ administration only.\r\n\t\t\tif (productName != null) {\r\n\t\t\t\tif (productName.startsWith(\"ISTEP+\")) {\r\n\t\t\t\t\tif ((productName.endsWith(currentAdminYear))) {\r\n\t\t\t\t\t\t// OK\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (groupFile.equals(IApplicationConstants.EXTRACT_FILETYPE.IPR.toString())) {\r\n\t\t\t// Rule 2: Image of student responses to Applied Skills test. For the two most recent ISTEP+ administrations. (Not available for IMAST or IREAD-3)\r\n\t\t\tif (productName != null) {\r\n\t\t\t\tif (productName.startsWith(\"ISTEP+\")) {\r\n\t\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t\t// OK\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (groupFile.equals(IApplicationConstants.EXTRACT_FILETYPE.ISR.toString())) {\r\n\t\t\t// Rule 3: ISTEP+ and IMAST Student Report (ISR) for the two most recent administrations.\r\n\t\t\t// Rule 4: IREAD-3 Student Report (ISR) for the 2013 and 2014 administrations (Spring and Summer).\r\n\t\t\tif (productName != null) {\r\n\t\t\t\tif (productName.startsWith(\"ISTEP+\")) {\r\n\t\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t\t// OK\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (productName.startsWith(\"IMAST\")) {\r\n\t\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t\t// OK\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (productName.startsWith(\"IREAD-3\")) {\r\n\t\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t\t// OK\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (groupFile.equals(IApplicationConstants.EXTRACT_FILETYPE.BOTH.toString())) {\r\n\t\t\t// Rule 2, 3 and 4\r\n\t\t\tif (productName.startsWith(\"ISTEP+\")) {\r\n\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t// OK\r\n\t\t\t\t} else {\r\n\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t}\r\n\t\t\t} else if (productName.startsWith(\"IMAST\")) {\r\n\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t// OK\r\n\t\t\t\t} else {\r\n\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t}\r\n\t\t\t} else if (productName.startsWith(\"IREAD-3\")) {\r\n\t\t\t\tif ((productName.endsWith(currentAdminYear)) || (productName.endsWith(lastAdminYear)) || (productName.endsWith(lastToLastAdminYear))) {\r\n\t\t\t\t\t// OK\r\n\t\t\t\t} else {\r\n\t\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\thideContentFlag = IApplicationConstants.FLAG_Y;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn hideContentFlag;\r\n\t}", "public static native void _setVisible(Element elem, boolean visible) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telem.style.display = visible ? '' : 'none';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;", "public ArrayList<BadDomain> getHTMLcontentOfMalwareDomainListCom() throws IOException {\n String url = \"https://www.malwaredomainlist.com/mdl.php\";\n ArrayList<BadDomain> badDomains = new ArrayList<BadDomain>();\n Document document = Jsoup.connect(url).timeout(0).get();\n /*try {//website responses late so we make the program wait...\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }*/\n Elements elements = document.getElementsByTag(\"tbody\");\n Elements rows = elements.select(\"tr\");\n //System.out.println(rows);\n\n\n rows.remove(0);\n rows.remove(1); //first two rows are not necessary\n\n for (Element row : rows){\n\n Elements columns = row.getElementsByTag(\"td\");\n ArrayList<String> entries = new ArrayList<String>();\n for (Element column : columns){\n if(!(column.text().equals(null)) && !(column.text().equals(\"⇑ ⇓\"))) {\n entries.add(column.text());\n }\n }\n if (entries.size() > 1){\n BadDomain badDomain = new BadDomain();\n //add relevant data\n if (!entries.get(0).equals(null)) badDomain.setDateOfDiscovery(entries.get(0));\n else badDomain.setDateOfDiscovery(\"Unknown\");\n ArrayList<String> domains = new ArrayList<String>();\n\n if (!entries.get(1).equals(null)) {\n domains.add(entries.get(1));\n badDomain.setDomainName(domains);\n }\n else{\n domains.add(\"Unknown\");\n badDomain.setDomainName(domains);\n }\n if (!entries.get(2).equals(null)) badDomain.setIpAddress(entries.get(2));\n else badDomain.setIpAddress(\"Unknown\");\n if (!entries.get(3).equals(null)) badDomain.setReverseLookupAddress(entries.get(3));\n else badDomain.setReverseLookupAddress(\"Unknown\");\n if (!entries.get(4).equals(null)) badDomain.setDescription(entries.get(4));\n else badDomain.setDescription(\"Unknown\");\n if (!entries.get(5).equals(null)) badDomain.setRegistrant(entries.get(5));\n else badDomain.setRegistrant(\"Unknown\");\n if (!entries.get(6).equals(null)) badDomain.setAsn(entries.get(6));\n else badDomain.setAsn(\"Unknown\");\n //System.out.println(badDomain.getDomainName()+\" \"+badDomain.getReverseLookupAddress() +\" \"+\n // badDomain.getIpAddress() +\" \"+badDomain.getDateOfDiscovery()+ \" \" +badDomain.getAsn() );\n\n badDomains.add(badDomain);\n }\n for (int i = 0; i < badDomains.size(); i++){ //merge same ip addresses' domain names\n for (int j = i+1; j < badDomains.size(); j++){\n if (badDomains.get(i).getIpAddress().equals(badDomains.get(j).getIpAddress())){\n String temp = badDomains.get(j).getDomainName().get(0);\n ArrayList<String> domainNames = badDomains.get(i).getDomainName();\n domainNames.add(temp);\n badDomains.get(j).setDomainName(domainNames);\n badDomains.remove(i);\n }\n }\n }\n }\n /*for(BadDomain bd : badDomains){\n System.out.print(\"ip: \" + bd.getIpAddress() + \"domain names: \");\n for(String s : bd.getDomainName())\n System.out.print(s + \" -- \");\n System.out.print(\"\\n\");\n }*/\n\n return badDomains;\n }", "@Override\r\n public List<String> getMatchedURIs(boolean arg0) {\n return null;\r\n }", "public void setExcludeUrls(String[] excludeUrls) {\n this.excludeUrls = excludeUrls;\n }", "public void cancel_outhiding() {\n\t\t_outcaptures.removeAllElements();\n\t\t_outhides.removeAllElements();\n\t}", "@ReactMethod\n public void AlertIfWhitelist(String title, String message, String dontShowAgainText, String positiveText, String negativeText) {\n final SharedPreferences settings = this.getCurrentActivity().getSharedPreferences(\"Whitelist\",Context.MODE_PRIVATE);\n final String saveIfSkip = \"skipWhitelistMessage\";\n boolean skipMessage = settings.getBoolean(saveIfSkip, false);\n // Show dialog only when \"do not show again\" hasn't been enabled yet\n if (!skipMessage) {\n final SharedPreferences.Editor editor = settings.edit();\n // Check if intent of the android whitelist apps activity is callable\n for (Intent intent : AUTO_START_INTENTS){\n if (isCallable(intent)) {\n // Prepare dialog\n final AppCompatCheckBox dontShowAgain = new AppCompatCheckBox(this.getCurrentActivity());\n dontShowAgain.setText(dontShowAgainText);\n dontShowAgain.setLeft(20);\n dontShowAgain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n editor.putBoolean(saveIfSkip, isChecked);\n editor.apply();\n }\n });\n\n final RelativeLayout layout = new RelativeLayout(this.getCurrentActivity());\n layout.setPadding(50,50,0,0);\n layout.addView(dontShowAgain);\n\n new AlertDialog.Builder(this.getCurrentActivity())\n .setTitle(title)\n .setMessage(message)\n .setView(layout)\n .setPositiveButton(positiveText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n try {\n for (Intent intent : AUTO_START_INTENTS)\n if (isCallable(intent)) {\n editor.putBoolean(saveIfSkip, true);\n editor.apply();\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\n reactContext.startActivity(intent);\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n })\n .setNegativeButton(negativeText, null)\n .show();\n break;\n }\n }\n }\n }", "default void hide() { }", "@Override\n\tpublic List<DecisionKnowledgeElement> getElementsLinkedWithOutwardLinks(DecisionKnowledgeElement element) {\n\t\treturn null;\n\t}", "private static void hideFilters(List<HealthDataFilter> allFilters) {\n Set<String> userHideFilterChoices = PreferenceUtility.getUserHideFilterChoices();\n if (userHideFilterChoices==null){\n if (AppConstant.DEBUG) Log.i(\"AppUtility:\"+\">\",\"Was no saved hidden filter\");\n return;\n }\n Iterator<HealthDataFilter> iterator = allFilters.iterator();\n while (iterator.hasNext()) {\n HealthDataFilter next = iterator.next();\n // if (next.getFilterName().equals(\"QUEENS\")){\n if (userHideFilterChoices.contains(next.getFilterName())){\n iterator.remove();\n }\n }\n }", "private static String[] getExcludeServices() {\n\t\tString[] excludeServicesList = null;\n\t\ttry {\n\t\t\texcludeServicesList = ATUIUtils.getDefault().getString(ATUI_EXCLUDE_SERVICES_LIST).trim().split(COMMA);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn excludeServicesList;\n\t}", "public void hideAutoBackupGuide() {\n // AutoBackupGuideActivity.java\n\n WebDriverWait wait = new WebDriverWait(driver, 30);\n wait.until(ExpectedConditions.elementToBeClickable(By.id(\"skipSet\")));\n\n driver.findElement(By.id(\"skipSet\")).click(); \n }", "@Override\n public void onAdLoaded() {\n sponsoredLinearLayout.setVisibility(View.VISIBLE);\n adView.setVisibility(View.VISIBLE);\n adProgressBar.setVisibility(View.GONE);\n adFailedLinearLayout.setVisibility(View.GONE);\n }", "@SuppressWarnings(\"unused\")\n public int[] getDisplayIds(boolean ignoredIncludeDisabled) {\n return getDisplayIds();\n }", "public void setHideClasses(List<String> hideClasses) {\n\t\tthis.hideClasses = hideClasses;\n\t}", "public void waitUntilElementDisappears(WebDriver driver, final String xpath) throws NumberFormatException, IOException {\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\t\t\ttry {\n\t\t\t\t\tExpectedCondition<Boolean> e = new ExpectedCondition<Boolean>() {\n\t\t\t\t public Boolean apply(WebDriver driver) {\n\t\t\t\t return (driver.findElements(By.xpath(xpath)).size() > 0);\n\t\t\t\t }\n\t\t\t\t };\n\t\t\t\t wait.until(e);}\n\t\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tif (driver.findElements(By.xpath(xpath)).size() > 0) { fileWriterPrinter(\"\\nElement is still visible!\\nXPATH: \" + xpath); }\n\t\t\t\t\t}\n\t\t\t\t fileWriterPrinter(\"Waiting time for Element disappearence: \" + waitTimeConroller(start, 30, xpath) + \" sec\\n\");\n\t\t\t\t}", "boolean isBlacklisted(ComputationTargetSpecification target);", "protected SoEnabledElementsList getEnabledElements() {\n\t \t\treturn enabledElements;\n\t \t}", "public boolean forElementNotVisible(WebElement element) {\n changeImplicitWait(250, TimeUnit.MILLISECONDS);\n try {\n return wait.until(ExtraExpectedConditions.invisibilityOfElementLocated(element));\n } finally {\n restoreDeaultImplicitWait();\n }\n }", "@Override\r\n\tpublic boolean isVisible()\r\n\t{\n\t\treturn !getFormScreen().getMode().equals(Mode.LIST_VIEW);\r\n\t}", "public void assertNotVisible(final String elementLocator);", "private void setExcludeUnlistedClasses(String value) {\n if (!_excludeUnlistedSet) {\n BigDecimal version = getPersistenceVersion();\n boolean excludeUnlisted;\n if (version.compareTo(VERSION_1_0) > 0) {\n excludeUnlisted = !(\"false\".equalsIgnoreCase(value));\n } else {\n excludeUnlisted = \"true\".equalsIgnoreCase(value);\n }\n _info.setExcludeUnlistedClasses(excludeUnlisted);\n _excludeUnlistedSet = true;\n }\n }", "private static boolean isChildrenBlacklistedViewGroup(@NonNull ViewGroup view) {\n return view instanceof ListView || view instanceof RecyclerView || view instanceof TabLayout;\n }", "public List<Long> getHiddenImpressionIdsForMessage(long messageId);", "java.lang.String getQueryVisibility();", "public List getDonts() {\n\t\tif (donts == null) {\n\t\t\tdonts = getFormattedPractices(\"/metadataFieldInfo/field/bestPractices/donts\");\n\t\t}\n\t\treturn donts;\n\t}", "private void checkDiscountAvailability() {\n if (discountList != null && discountList.size() > 0) {\n noDiscountText.setVisibility(View.GONE);\n discountRecyclerView.setVisibility(View.VISIBLE);\n } else {\n noDiscountText.setVisibility(View.VISIBLE);\n discountRecyclerView.setVisibility(View.GONE);\n }\n }", "@Override\n public void adNotDisplayed(Ad arg0) {\n\n }", "@Override\n public void adNotDisplayed(Ad arg0) {\n\n }", "public void clickLinkForHideFilters() {\r\n\t\twebAppDriver.clickElementByLinkText(\"Hide Filters >\");\r\n\t}", "private Protos.Offer filterBadResources(Protos.Offer offer) {\n Collection<Protos.Resource> goodResources = new ArrayList<>();\n Collection<Protos.Resource> badResources = new ArrayList<>();\n for (Protos.Resource resource : offer.getResourcesList()) {\n if (ResourceUtils.isProcessable(resource, frameworkRolesWhitelist)) {\n goodResources.add(resource);\n } else {\n badResources.add(resource);\n }\n }\n if (badResources.isEmpty()) {\n // Common shortcut: All resources are good. Just return the original offer.\n return offer;\n }\n\n // Build a new offer which only contains the good resources. Log the bad resources.\n LOGGER.info(\n \"Filtered {} resources from offer {}:\",\n badResources.size(),\n offer.getId().getValue());\n for (Protos.Resource badResource : badResources) {\n LOGGER.info(\" {}\", TextFormat.shortDebugString(badResource));\n }\n return offer.toBuilder()\n .clearResources()\n .addAllResources(goodResources)\n .build();\n }", "public abstract Collection<FeedProvider> getVisibleFeedProviders();", "private boolean getLinks() {\n return false;\n }", "boolean isBlacklisted(String functionIdentifier, FunctionParameters functionParameters);", "private void setVisibilityTextViewDebetableGoalsNowNotAvailable (String visibility) {\n\n RelativeLayout tmpNotAvailable = (RelativeLayout) viewFragmentDebetablGoalNow.findViewById(R.id.textViewOurGoalsFunctionNotAvailable);\n\n if (tmpNotAvailable != null) {\n\n switch (visibility) {\n\n case \"show\":\n tmpNotAvailable.setVisibility(View.VISIBLE);\n break;\n case \"hide\":\n tmpNotAvailable.setVisibility(View.GONE);\n break;\n }\n }\n }", "@Override\r\n public boolean shouldVisit(WebURL url) {\r\n String href = url.getURL().toLowerCase();\r\n return !FILTERS.matcher(href).matches() && href.startsWith(\"http://fksis.bsuir.by/\");\r\n// \"http://www.ics.uci.edu/\");\r\n }", "private boolean testURLIsValid(String itemName) {\n if (itemName.endsWith(\".html\")) {\n if (itemName.contains(\"manual\") || itemName.contains(\"MediaRecorder-iframe\")) {\n // return itemName.contains(\"none-manual\");\n return false;\n } else {\n return true;\n }\n }\n\n return false;\n }", "private boolean isValidExtension(String url){\n for (String ext : IGNORED_EXTENSIONS) {\n if (url.contains(ext)) {\n return false;\n }\n }\n return true;\n }", "@Override\n\tpublic List<DecisionKnowledgeElement> getElementsLinkedWithInwardLinks(DecisionKnowledgeElement element) {\n\t\treturn null;\n\t}", "public boolean isAdmissible();", "public void getApHideColumn(){\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(WsrdConstants.HIDESHOWCOLUMN);\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.SHOW_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setApShowHide(WsrdConstants.HIDE_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(true);\r\n\t\t}\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.HIDE_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setApShowHide(WsrdConstants.SHOW_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(false);\r\n\t\t\t\r\n\t\t}\r\n\t}", "boolean isBlacklisted(DependencyNodeFunction function, ComputationTargetSpecification target);", "public ArrayList<String> soupThatSite(String url) throws IOException {\n\n ArrayList<String> parsedDoc = new ArrayList<>();\n Document doc = Jsoup.connect(url).get();\n\n if (url.contains(\"cnn.com\")) {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\".zn-body__paragraph\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n } else {\n\n doc.select(\"h1\").stream().filter(Element::hasText).forEach(element1 -> {\n String str = element1.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n\n doc.select(\"p\").stream().filter(Element::hasText).forEach(element -> {\n String str = element.text();\n String clean = Jsoup.clean(str, Whitelist.basic());\n parsedDoc.add(clean);\n });\n }\n\n return parsedDoc;\n }", "public List<String> scrapDipartimenti() {\n return null;\n }", "public boolean isHidden() {\n return false;\n }", "public void unhideImpression(long impressionId, Location newLocation);", "void hide();", "private static ArrayList<Folder> hiddenFolders(Context context) {\n final String FILE_TYPE_NO_MEDIA = \".nomedia\";\n\n ArrayList<Folder> listOfHiddenFiles = new ArrayList<>();\n\n String nonMediaCondition = MediaStore.Files.FileColumns.MEDIA_TYPE\n + \"=\" + MediaStore.Files.FileColumns.MEDIA_TYPE_NONE;\n\n String where = nonMediaCondition + \" AND \"\n + MediaStore.Files.FileColumns.TITLE + \" LIKE ?\";\n\n String[] params = new String[]{\"%\" + FILE_TYPE_NO_MEDIA + \"%\"};\n\n Cursor cursor = context.getContentResolver().query(\n MediaStore.Files.getContentUri(\"external\"),\n new String[]{MediaStore.Files.FileColumns._ID,\n MediaStore.Files.FileColumns.DATA,\n MediaStore.Files.FileColumns.DISPLAY_NAME},\n where,\n params, null);\n\n // No Hidden file found\n if (cursor.getCount() == 0) {\n // showAll Nothing Found\n return listOfHiddenFiles;\n }\n\n ArrayList<File> ids = new ArrayList<>();\n\n // Add Hidden file name, path and directory in file object\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(MediaStore.Files.FileColumns._ID));\n\n Uri vidUri = Uri.withAppendedPath(MediaStore.Files.getContentUri(\"external\"), id);\n File file = new File(getRealPathFromHiddenURI(context, vidUri)).getParentFile();\n //Log.d(\"MEME\", file.getAbsolutePath());\n\n if (!ids.contains(file)) {\n ids.add(file);\n\n checkAndAddFolder(file, listOfHiddenFiles, true);\n }\n }\n cursor.close();\n\n return listOfHiddenFiles;\n }", "@Override\n\tpublic List<Advertisement> GetAdvertisement() {\n\t\treturn null;\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:47.216 -0500\", hash_original_method = \"51BD6C2B8F163ED4F443CF424054287F\", hash_generated_method = \"281E17EF19FE755B4B96522DAD89CE53\")\n \npublic void getAllowed(String origin, ValueCallback<Boolean> callback) {\n if (callback == null) {\n return;\n }\n if (origin == null) {\n callback.onReceiveValue(null);\n return;\n }\n if (WebViewCore.THREAD_NAME.equals(Thread.currentThread().getName())) {\n boolean allowed = nativeGetAllowed(origin);\n callback.onReceiveValue(new Boolean(allowed));\n } else {\n Map values = new HashMap<String, Object>();\n values.put(ORIGIN, origin);\n values.put(CALLBACK, callback);\n postMessage(Message.obtain(null, GET_ALLOWED, values));\n }\n }", "public boolean shouldHide() {\n\t\treturn hide;\n\t}", "@ApiStatus.Internal\n default boolean isListable() {\n \n return false;\n }", "public void showCollectWeb() {\n mActivity.mHolder.mWebLayout.setVisibility(View.VISIBLE);\n isCollectWebPage = true;\n }", "@DISPID(1611006052) //= 0x60060064. The runtime will prefer the VTID if present\n @VTID(128)\n void linkedExternalReferencesOnlyOnPublication(\n boolean oOnlyForPublishedElements);" ]
[ "0.56078935", "0.54071856", "0.5209088", "0.5083297", "0.5079164", "0.5039714", "0.5038161", "0.5011935", "0.50061196", "0.49939492", "0.49555853", "0.49336463", "0.4850799", "0.48331684", "0.4828332", "0.48273152", "0.48267984", "0.482345", "0.482345", "0.48025763", "0.47722578", "0.4753449", "0.47180945", "0.4702554", "0.46916023", "0.46794048", "0.46674857", "0.46581557", "0.46415198", "0.46337423", "0.46099868", "0.4605483", "0.46008328", "0.45998725", "0.45912874", "0.45714298", "0.45661396", "0.45559984", "0.45547625", "0.45516473", "0.45500997", "0.4512041", "0.44958767", "0.44945976", "0.44944018", "0.44585615", "0.44575003", "0.44446313", "0.44390333", "0.44368947", "0.44347474", "0.44307327", "0.44244856", "0.44183055", "0.44163138", "0.44102606", "0.44059467", "0.43971515", "0.43955234", "0.43917385", "0.43811247", "0.43789464", "0.43641493", "0.43632168", "0.43611768", "0.4350363", "0.43486336", "0.43484634", "0.43481934", "0.4346039", "0.43445992", "0.43436038", "0.4343389", "0.4341503", "0.4341503", "0.4340746", "0.43378565", "0.43360934", "0.43318206", "0.4328087", "0.43124565", "0.43065268", "0.43007413", "0.42991504", "0.4298644", "0.42971396", "0.42940438", "0.42934918", "0.4286472", "0.4282181", "0.42745793", "0.4267184", "0.426502", "0.4259441", "0.42498097", "0.42474937", "0.42470223", "0.4244232", "0.42420378", "0.42416203" ]
0.6666358
0
0 = jugar & 1 = salir
public Inicio() { super(600, 400, 1); prepararInicio(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getZero_or_one();", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "public static void Turno(){\n\t\tif (pl1){\n\t\t\tpl1=false;\n\t\t\tpl2=true;\t\n\t\t\tvalore = 1;\n\t\t}\n\t\telse{\n\t\t\tpl1=true;\n\t\t\tpl2=false;\n\t\t\tvalore = 2;\n\t\t}\n\t}", "protected String comprobarConsumoEnergetico(Letra letra){\r\n if(getConsumoEnergetico() == Letra.A | getConsumoEnergetico() == Letra.B | getConsumoEnergetico() == Letra.C \r\n | getConsumoEnergetico() == Letra.D | getConsumoEnergetico() == Letra.E | getConsumoEnergetico() == Letra.F){\r\n return \"Consumo energetico correcto; letra correcta\";\r\n }\r\n else{\r\n return \"Consumo energetico incorrecto; letra erronea\";\r\n }\r\n}", "int llegue(int a,int b,int c,int d){\n if(a==c && b==d){\n return 1;\n }else{return 0;}\n }", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "public boolean HayFlorEnLaEsquina(int avenida, int calle);", "public boolean HayPapelEnLaEsquina(int avenida, int calle);", "public int hayGanador() {\n\t\tif(marcador1==2) {\n\t\t\tresultado=1;\n\t\t\treturn 1;\n\t\t}\n\t\telse if(marcador2==2) {\n\t\t\tresultado=2;\n\t\t\treturn 2;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "private static int getSlotIndex(int par0, int par1)\n {\n return par0 & par1 - 1;\n }", "public static void main(String[] args) {\nint tamil = 75;\r\nint english = 50;\r\nif((tamil>=35)||(english>=35))\r\n System.out.println(\"You are passed in english and tamil\");\r\nelse\r\n\tSystem.out.println(\"You are failed!\");\r\n\t}", "public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }", "Bicho evolucionar(int bicho);", "public static void main(String[] args) {\n\t\t\n\t\tbyte no;\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"enter no\");\n\t\tno = sc.nextByte();\n\t\tbyte temp;\n\t\t\t\n\t\tfor (byte i = 7; i >=0; i--) {\n\n\t\t\tbyte fb = (byte) ((1) << i);\n\t\t\ttemp = (byte) (no & fb);\n\t\t\tif(temp!=0){\n\t\t\t\tSystem.out.print(\"1\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(\"0\");\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "private void asserEquals(int esperado, int resultado) {\n\t\t\r\n\t}", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "public Archangel buscarPower(String pow){\n\tboolean val = false;\n Archangel angel = null;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\tif(arch[i].getPower().equalsIgnoreCase(pow)){\n\t\t\tangel = arch[i];\n\t\t\tval = true;\n\t\t}\n\t}\n\t\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\nreturn angel;\n\n}", "public boolean kosong() {\r\n return ukuran == 0;\r\n }", "public abstract boolean habilidad1(Personaje caster, Peleable atacado);", "boolean mo1502i();", "protected static int tableIndex(int hc, int lm1)\n {\n hc ^= (hc >>> 20) ^ (hc >>> 12);\n hc ^= (hc >>> 7) ^ (hc >>> 4);\n return hc & lm1;\n }", "static void ori_with_acc(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(passed.substring(4));\n\t\tval1 = val1|val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "public boolean TiraLenguaje (String[]a , String[] b){\n \n boolean val1=true;\n String mod1=\"\";\n String comp=\"\";\n int ban=0;\n for (int i = 0; i < b.length; i++) {\n mod1=b[i];\n \n for (int j = 0; j < a.length; j++) { \n comp=a[j];\n if(comp.equals( mod1)){\n ban=1; \n break;\n }\n }\n \n if(ban==0){\n val1=false;\n return val1; \n } \n } \n return val1;\n \n }", "public int AmbosHijosR() { //Hecho por mi\n return AmbosHijosR(raiz);\n }", "public void turnoSuccessivo(int lancioCorrente) {\n }", "public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}", "private String preparaMensaje(String mensaje){\n String binario;\n int longitud = 0;\n String bi=\"\";\n longitud = mensaje.length() + 4;\n for( int i = 15; i>=0; i--){\n bi += ( ( ( longitud & ( 1<<i ) ) > 0 ) ? \"1\" : \"0\" ) ;\n }\n return binario = cadenaABinario(\" \") + bi + cadenaABinario(mensaje);\n }", "boolean verifications(int i, int j, int val) { \r\n return (verifCarre(i-i%nCarre, j-j%nCarre, val) && verifLigne(i, val) && verifColonne(j, val)); \r\n }", "public static void main(String[] args) {\n\t\tint n = (18 & 4) * (19 & 5);\r\n\t\tint a = (19 & 5);\r\n\t\tSystem.out.println(n);\r\n\t\tSystem.out.println(a);\r\n\t}", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public void operacionletradni(int dni, int result){\n this.result=dni%23;}", "public static void main(String[] args){\r\n String saludar = \"Hola Mundo desde Java\";\r\n System.out.println(saludar);\r\n System.out.println(\"saludar.toUpperCase(Locale.ROOT) = \" + saludar.toUpperCase(Locale.ROOT));\r\n\r\n Integer numero = 11;\r\n\r\n\r\n boolean valor = true;\r\n Integer numero2 = 5;\r\n if(valor){\r\n System.out.println(\"numero = \" + numero);\r\n numero2 = 10;\r\n }\r\n System.out.println(\"numero2 = \" + numero2);\r\n\r\n var numero3 = \"15\";\r\n\r\n String nombre;\r\n\r\n nombre = \"Juan\";\r\n\r\n if(numero >10){\r\n nombre = \"Andres\";\r\n }\r\n\r\n System.out.println(\"nombre = \" + nombre);\r\n\r\n System.out.println();\r\n\r\n }", "public static void main(String[] args) {\n var nilai = 75;\n String ucapan;\n if (nilai >= 75) {\n ucapan = \"Selamat Anda Lulus\";\n } else {\n ucapan = \"Silahkan Coba Lagi\";\n }\n\n // Dengan Ternary Operator\n String ucapan1 = nilai >= 75 ? \"Selamat Anda Lulus\": \"Silahkan Coba Lagi\";\n System.out.println(ucapan1);\n }", "public abstract boolean habilidad2(Personaje caster, Peleable atacado);", "private int Maj(int x, int y, int z) {\n return (x & y) ^ (x & z) ^ (y & z);\n }", "@Override\r\n public void convert(int wa) {\n hasil1 = wa / menit;\r\n String wat = Integer.toString(hasil1);\r\n hasil = wat + \" Menit \";\r\n }", "private static String or(String s, String t)\r\n\t{\r\n\t\tchar[] out = s.toCharArray();\r\n\t\tfor (int i = 0; i < out.length; i++)\r\n\t\t{\r\n\t\t\tif(out[i] == '0' && t.charAt(i) == '1')\r\n\t\t\t\tout[i] = '1';\r\n\t\t}\r\n\t\treturn new String(out);\r\n\t}", "public String verificationUtilisateur( int number, int number1) {\n\t\n\tfinal String SEPARATEUR = \"\";\n\t// car va avec number\n\tchar car;\n\t// car1 va avec number1\n\tchar car1;\n\tString code;\n\tStringBuilder codeSymbole = new StringBuilder() ;\n\t\n\t\n\t\n\tString proposition;\n\tcode = String.valueOf(number);\n\tproposition = String.valueOf(number1);\n\tString mot[] = proposition.split(SEPARATEUR);\n\t\n\tfor (int i = 0; i < mot.length; i++) {\n\tcar = code.charAt(i);\n\tcar1 = proposition.charAt(i);\n\t\n\t\n\tif ( car > car1) {\n\t\tcodeSymbole.append(\"+\");\n\t}else if (car == car1) {\n\t\tcodeSymbole.append(\"=\");\n\t}else {\n\t\tcodeSymbole.append(\"-\");\n\t}\n\n\t\n\t\n\t}\n\t//System.out.println(\"les indices sont\" + arraylist.get(0) + arraylist.get(1) + arraylist.get(2) + arraylist.get(3));\n\t\n\t\n\tSystem.out.println( codeSymbole.toString());\n\t\n\treturn codeSymbole.toString() ;\n}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public boolean HayObstaculo(int avenida, int calle);", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "private static int galoisMult(int a, int b)\n\t{\n\t\tint result = 0;\n\t\tfor (int i=0; i<8; i++)\n\t\t{\n\t\t\tif((b&1) == 1) //low bit of b set\n\t\t\t\tresult = result^a;\n\t\t\tboolean aHighSet = (a & 128) == 128; //8th bit of a set\n\t\t\ta <<= 1;\n\t\t\tassert (a&1) == 0;\n\t\t\t\n\t\t\ta &= 255; //getting rid of 9th bit\n\t\t\tassert ((a&256) != 256);\n\t\t\t\n\t\t\tif (aHighSet)\n\t\t\t\ta ^= (0x1b);\n\t\t\t\n\t\t\tb >>= 1;\n\t\t\tassert (b&128) != 128; //8 bit is zero\n\t\t}\n\t\treturn result;\n\t}", "public int AFaire(Button b) {\n if (b==fleches[0])\n return -1;\n else if (b==fleches[1])\n return -2;\n else if (b==fleches[2])\n return -3;\n else if (b==fleches[3])\n return -4;\n else if (b==fleches[4])\n return -5;\n else if (b==fleches[5])\n return -6;\n else return Integer.MAX_VALUE;\n }", "public static void main (String[] args) {\nSystem.out.println(\"Privet\");\r\n int a=20;\r\n int b=8;\r\n int c=a+b;\r\n int test;\r\n String s = \"Deleni po mod \";\r\n// boolean check1, check2;\r\n test=a%b;\r\n System.out.print(s);\r\n System.out.println(test);\r\n System.out.println(c);\r\n double d=35.9;\r\n\t\t double f=c+d;\r\n\t\t double tes=f%c; \r\n\t\t String s2=\"Delenie f/c\";\r\n\t\t \r\n\t\t System.out.println(f);\r\n\t\t System.out.println(s2);\r\n\t\t System.out.println(tes);\r\n\t\t System.out.println(s+s2);// s и s2\r\n\t\t if (f==61.9) {System.out.println(\"Proverka ok\"); } // if \r\n\t\t else {System.out.println(\"proverka not\");}}", "public static void main(String[] args) {\n\t\tint num = 8;\n\t\tint a = num & 1;\n\t\tSystem.out.println(a);\n\t\tif(a>0)\n\t\t\tSystem.out.println(\"Odd!\");\n\t\telse\n\t\t\tSystem.out.println(\"Even!\");\n\t}", "void mo28733a(boolean z, int i, String str, String str2);", "public int a(bzl ☃, bzg bzg1, int i, int j) {\r\n/* 13 */ if (i == -bzg1.a() && j == -bzg1.b() && bzg1.a() > -bzg1.c() && bzg1.a() <= 0 && bzg1.b() > -bzg1.d() && bzg1.b() <= 0) {\r\n/* 14 */ return 1;\r\n/* */ }\r\n/* */ \r\n/* 17 */ return (☃.a(10) == 0) ? 1 : bzy.c;\r\n/* */ }", "public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }", "static void ani_with_acc(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(passed.substring(4));\n\t\tval1 = val1&val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "public void Ganhou() {\n\t\tString[] g = new String[10]; \n\t\tg[0] = m[0][0] + m[0][1] + m[0][2];\n\t\tg[1] = m[1][0] + m[1][1] + m[1][2];\n\t\tg[2] = m[2][0] + m[2][1] + m[2][2];\n\t\t\n\t\tg[3] = m[0][0] + m[1][0] + m[2][0];\n\t\tg[4] = m[0][1] + m[1][1] + m[2][1];\n\t\tg[5] = m[0][2] + m[1][2] + m[2][2];\n\t\t\n\t\tg[6] = m[0][0] + m[1][1] + m[2][2];\n\t\tg[7] = m[2][0] + m[1][1] + m[0][2];\n\t\tg[8] = \"0\";\n\t\tg[9] = \"0\";\n\t\t\n\t\tfor(int i= 0; i<10; i++) {\n\t\t\tif(g[i].equals(\"XXX\")){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"X GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\temp = 0; \n\t\t\t\tbreak;\n\t\t\t} else if (g[i].equals(\"OOO\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"O GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (emp == 9) {\n\t\t\tJOptionPane.showMessageDialog(null,\"EMPATOU\");\t\n\t\t\tacabou = true;\n\t\t}\n\t}", "public String overLoadingMeth(String huruf) {\n for (int i = 0; i < normalword.length; i++) {\n for (int j = 0; j < 10; j++) {\n if (huruf.equalsIgnoreCase(normalword[i])) {\n valuenum = num[i];\n } else if (huruf.equalsIgnoreCase(normalword[i])) {\n valuenum = num[i];\n } else if (huruf.equalsIgnoreCase(normalword[i] + \" belas\")) {\n valuenum = num[1] + num[i];\n } else if (huruf.equalsIgnoreCase(normalword[i] + \" puluh\")) {\n valuenum = num[i] + num[0];\n } else if (huruf.equalsIgnoreCase(normalword[i] + \" puluh \" + normalword[j])) {\n valuenum = num[i] + num[j];\n } else if (huruf.equalsIgnoreCase(\"Seratus\")) {\n valuenum = num[1] + num[0] + num[0];\n }\n }\n }\n return valuenum;\n }", "static void andOp(){\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Ingrese el primer numero binario: \");\n String bin1 = scanner.nextLine();\n\n System.out.print(\"Ingrese el segundo numero binario: \");\n String bin2 = scanner.nextLine();\n\n int A = Integer.parseInt(bin1,2);\n int B = Integer.parseInt(bin2,2);\n\n System.out.print(\"A & B = \" + (A & B));\n }", "private static void menuno(int menuno2) {\n\t\t\r\n\t}", "private static long namuji(long a, long b) {\n\t\tlong temp = 0;\n\t\tif(b == 1 ) {\n\t\t\treturn a%C;\n\t\t}\n\t\tif(b%2==0) {\n\t\t\ttemp = namuji(a,b/2);\n\t\t\treturn (temp*temp)%C;\n\t\t}else {\n\t\t\ttemp = namuji(a,(b-1)/2);\n\t\t\tlong temp2 = (temp*temp)%C;\n\t\t\treturn (A*temp2)%C;\n\t\t}\n\t\t\n\t}", "private static int typeToIndex(String orbit) {\n int value = 0;\n switch (orbit){\n case \"Trefoil\": value = ORBIT_6_KNOT; break;\n case \"Trefoil2\": value = ORBIT_4_KNOT; break;\n case \"Simple3\": value = ORBIT_4_SIMPLE; break;\n case \"Simple4\": value = ORBIT_3_SIMPLE; break;\n case \"Simple5\": value = ORBIT_5_SIMPLE; break;\n case \"Chasing\": value = ORBIT_8; break;\n }\n return value;\n }", "public String hGenre(int tunnusnro) {\r\n List<Genre> kaikki = new ArrayList<Genre>();\r\n for (Genre genre : this.alkiot) {\r\n \t kaikki.add(genre);\r\n }\r\n for (int i = 0; i < kaikki.size(); i++) {\r\n if (tunnusnro == kaikki.get(i).getTunnusNro()) {\r\n return kaikki.get(i).getGenre();\r\n }\r\n }\r\n return \"ei toimi\";\r\n }", "static int type_of_ori(String passed){\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n\t\tint kiirus2 = 90;\n\t\t// int kiirus3 = 110;\n\t\t\n\t\tif (kiirus2 > 90) {\n\t\t\tSystem.out.println(\"Trahv\");\n\t\t} else if (kiirus2 == 90) {\n\t\t\tSystem.out.println(\"Ops, napikas\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Ei saa trahvi\");\n\t\t}\n\n\t}", "public abstract boolean habilidad3(Personaje caster, Peleable atacado);", "private int giveValue(int joueur, int adversaire, Grid grid) {\n return evaluate(joueur, grid) - evaluate(adversaire, grid);\n }", "String getZero_or_more();", "@Override\n public BinaryType andBinary(BinaryType BinaryType) {\n int n = BinaryType.getValue().length();\n StringBuilder resultado = new StringBuilder();\n for (int i = 0; i < n; i++){\n boolean b1 = BinaryType.getValue().charAt(i) == '1';\n boolean b2 = this.getValue().charAt(i) == '1';\n resultado.append((b1 && b2) ? '1' : '0');\n }\n return TypeFactory.getBinaryType(resultado.toString());\n }", "public String permutasi(int bil1, int bil2) {\n if(functions.permutasi(bil1, bil2) < 0){\n return \"tolong masukan a ≥ 0\"; \n }\n return (int)functions.permutasi(bil1, bil2)+\"\";\n }", "public int choixAttaque(Caracter monstre, Caracter player){\n Inventory inventaire = monstre.getInventory();\n Weapon armeSecondaire = inventaire.getSecondWeapon();\n Weapon armePrincipale = inventaire.getMainWeapon();\n Spell conso = inventaire.getSpell();\n \n if (armeSecondaire == null)\n {\n return 1;\n }\n else if(armeSecondaire != null)\n {\n if(armePrincipale.dmin + armePrincipale.dmax > armeSecondaire.dmin + armeSecondaire.dmax){\n return 1;\n }\n else{\n return 2;\n }\n }\n \n return 1;\n }", "public static void main(String[] args) {\n\t\tScanner ip = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Welcome to the Katapayadi Wizard! Enter the 1st syllable of the raga of your choice: \");\r\n\t\t\r\n\t\tString F = ip.nextLine();\r\n\t\tSystem.out.println(\"Great! Now enter the 2nd syllable of the raga of your choice: \");\r\n\t\t\r\n\t\tString S = ip.nextLine();\r\n\t\t//int firstIndex; \r\n\t\t\r\n\t\tString [] [] alphabets = {{\"nya\", \"ka\", \"kha\", \"ga\", \"gha\", \"nga\", \"cha\", \"ccha\", \"ja\", \"jha\"}, \r\n\t\t\t\t\t\t\t\t {\"na\", \"ta\", \"tah\",\"da\", \"dah\", \"nna\", \"tha\", \"ttha\", \"dha\", \"ddha\"},\r\n\t\t\t\t\t\t\t\t {\"null\",\"pa\", \"pha\",\"ba\",\"bha\",\"ma\", \"null\", \"null\", \"null\", \"null\", },\r\n\t\t\t\t\t\t\t\t {\"null\",\"ya\", \"ra\", \"la\", \"va\", \"se\", \"sha\", \"sa\", \"ha\",\"null\"}};\r\n\t\t\r\n\t\tint firstNum = getFirstIndex(alphabets, F);\r\n\t\tint secondNum = getSecondIndex(alphabets, S); \r\n\t\tint finalIndex = concat(firstNum, secondNum);\r\n\t\t\r\n\t\tString swaras1= swaraSthanam1(finalIndex);\r\n\t\t//String finalanswer = The [index]th melakartha: aro [swaras1] and ava [swaras2].\r\n\t\tSystem.out.println(firstNum);\r\n\t\tSystem.out.println(secondNum);\r\n\t\t\r\n\t\tSystem.out.println(finalIndex);\r\n\t\t\r\n\t\tSystem.out.println(swaras1);\r\n\t\t\r\n\t}", "private int fourOfaKind() {\n\t\tif (hand[1].getValueIndex() == hand[2].getValueIndex() && hand[2].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\tif (hand[0].getValueIndex() == hand[1].getValueIndex()\n\t\t\t\t\t|| hand[4].getValueIndex() == hand[3].getValueIndex()) {\n\t\t\t\tresult.setPrimaryValuePos(hand[3].getValueIndex());\n\t\t\t\t\n\t\t\t\tif( result.getPrimaryValuePos() == hand[4].getValueIndex()) {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[0].getValueIndex());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult.setSecondaryValuePos(hand[4].getValueIndex());\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n int number ;\n\n number=25;\n String result = \"\";\n\n //lets try with if\n if (number % 2 == 0){\n result = number + \" is even\";\n }else {\n result = number + \" is odd\";\n }\n\n //shortcut of println is sout\n System.out.println(result);\n\n //ternary\n //if == ?\n //else == :\n\n String result2= (number % 2 == 0) ? number + \" is even \" : number + \" is odd\" ;\n\n System.out.println(result2);\n\n System.out.println(\"**************\");\n\n //ben calisma yapiyorum\n int mert;\n mert=11;\n String sonuc= \"\";\n if ( mert % 2== 0){\n sonuc= mert+ \"is even\";\n }else {\n sonuc =mert+\"is odd\";\n }\n System.out.println(sonuc);\n\n\n String sonuc1 = (number%2==0) ? mert + \"is even\" : mert + \" is odd\";\n System.out.println(sonuc1);\n\n }", "public static int playIA(int joueur) {\n\r\n MorpionSituation situ = new MorpionSituation();\r\n situ = knownSituation();\r\n\r\n int coup = 0;\r\n\r\n if (situ == null) {\r\n MorpionSituation sit = new MorpionSituation(plateau);\r\n listeSituations.add(sit);\r\n situations[progress] = listeSituations.size() - 1;\r\n coup = randomPlayIA();\r\n if (joueur == 1)\r\n coupsJ1[progress] = coup;\r\n else\r\n coupsJ2[progress] = coup;\r\n return coup;\r\n } else {\r\n coup = selectPlayIA(situ.getResolution());\r\n if (joueur == 1)\r\n coupsJ1[progress] = coup;\r\n else\r\n coupsJ2[progress] = coup;\r\n return coup;\r\n }\r\n }", "public PhanSo(){\n tuSo = 0;\n mauSo = 1;\n }", "static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}", "public static void main(String[] args) {\n\t\tint i=10;\n\t\tSystem.out.println(Integer.toBinaryString(i));\n\t\tSystem.out.printf(\"%d --> %s \\n\",i<<1,Integer.toBinaryString(i<<1));\n\t\tSystem.out.printf(\"%d --> %s \\n\",i>>1, Integer.toBinaryString(i>>1));\n\t\t\n\t\tSystem.out.println(i&(1<<0));\n\t}", "public int pid_0101(String str) \n {\n \n int num_of_TC; \n char ON_OFF; \n String first_byte;\n first_byte=new String(str.substring(0,1));\n MathLib operations= new MathLib(); \n ON_OFF=operations.HexToBin(first_byte).charAt(0);//Bit 0\n if (ON_OFF=='1')//Then the lamp is ON\n {\n double d = Double.valueOf(operations.calculatorXF(str,\"AA\",\"A-128\"));\n num_of_TC= (int)d;\n if (num_of_TC<0) num_of_TC=0;\n }\n else \n num_of_TC=0; \n \n return num_of_TC;\n }", "public void hitunganRule2(){\n penebaranBibitSedikit = 1200;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu Penebaran Bibit\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen Lama\r\n if ((hariPanenLama >=100) && (hariPanenLama <=180)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a2 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a2 = nPanen;\r\n }\r\n \r\n //tentukan Z2\r\n z2 = (penebaranBibitSedikit + hariPanenLama) * 700;\r\n System.out.println(\"a2 = \" + String.valueOf(a2));\r\n System.out.println(\"z2 = \" + String.valueOf(z2));\r\n }", "public int getTrangthaiChiTiet();", "public void contarPosiciones() {\n if (tablero[0] == 1 && tablero[1] == 1 && tablero[2] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 1 && tablero[4] == 1 && tablero[5] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 1 && tablero[7] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[3] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 1 && tablero[4] == 1 && tablero[7] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[5] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[4] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[4] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n // posibilidades jugados dos\n if (tablero[0] == 2 && tablero[1] == 2 && tablero[2] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 2 && tablero[4] == 2 && tablero[5] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 2 && tablero[7] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[3] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 2 && tablero[4] == 2 && tablero[7] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[5] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[4] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[4] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if(tirar == 18 && !ganarJugadorUno && !ganarJugadorDos ){\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "public int tranzition(int qi,String letter) {\r\n \t\r\n \tif(qi==0&&letter.equals(\"a\")) {return 0;}\r\n \telse if (qi==0&&letter.equals(\"b\")) {return 1;}\r\n \telse if (qi==1&&letter.equals(\"a\")) {return 2;}\r\n \telse if (qi==1&&letter.equals(\"b\")) {return 1;}\r\n \telse if (qi==2&&letter.equals(\"a\")) {return 3;}\r\n \telse if (qi==2&&letter.equals(\"b\")) {return 1;}\r\n \telse if (qi==3&&letter.equals(\"a\")) {return 0;}\r\n \telse if (qi==3&&letter.equals(\"b\")) {return 1;}\r\n \telse return -1;\r\n \t\r\n }", "public static void main(String[] args) {\n\t\tint orgnum1=1634,orgnum;\r\n\t\tfloat res=0,rem=0;\r\n\t\torgnum=orgnum1;\r\n\t\r\n\t\twhile(orgnum!=0)\r\n\t\t{\r\n\t\trem=(orgnum%10);\t\r\n\t\tres+=(rem*rem*rem);\r\n\t\torgnum/=10;\r\n\t\t}\r\n\t\tSystem.out.println(\"res\"+ res + \" \"+ orgnum+\" n value\"+orgnum1);\r\n if(orgnum1==res)\r\n \tSystem.out.println(\"arms strong\");\r\n else\r\n \t System.out.println(\"not arms strong\");\r\n \t \r\n\t}", "public boolean isVampire(int i, int a1000, int a100, int a10, int a1) {\n boolean[] vars = new boolean[12];\n vars[0] = (a1000 * 10 + a100) * (a10 * 10 + a1) == i;\n vars[1] = (a1000 * 10 + a100) * (a10 + a1 * 10) == i;\n vars[2] = (a1000 + a100 * 10) * (a10 * 10 + a1) == i;\n vars[3] = (a1000 + a100 * 10) * (a10 + a1 * 10) == i;\n vars[4] = (a1000 * 10 + a10) * (a100 * 10 + a1) == i;\n vars[5] = (a1000 * 10 + a10) * (a100 + a1 * 10) == i;\n vars[6] = (a1000 + a10 * 10) * (a100 * 10 + a1) == i;\n vars[7] = (a1000 + a10 * 10) * (a100 + a1 * 10) == i;\n vars[8] = (a1000 * 10 + a1) * (a100 * 10 + a10) == i;\n vars[9] = (a1000 + a1 * 10) * (a100 * 10 + a10) == i;\n vars[10] = (a1000 * 10 + a1) * (a100 + a10 * 10) == i;\n vars[11] = (a1000 + a1 * 10) * (a100 + a10 * 10) == i;\n for (int j = 0; j < vars.length; j++) {\n if (vars[j] == true) {\n return true;\n }\n }\n return false;\n }", "public void encerrarJogo(){\n if (isAndamento()) {\n situacao = SituacaoJogoEnum.ENCERRADO;\n }\n }", "public static void main(String[] args) {\n\t\tint x = Integer.parseInt(args[0]), y = Integer.parseInt(args[1]);\n\t\tint z1 = x & y ; // and \n\t\tint z2 = x | y ; // or \n\t\tint z3 = x ^ y ; // xor \n\t\tint z4 = ~x ; // not \n\t\tSystem.out.print(\"x = \" + Integer.toBinaryString(x)\n\t\t\t\t+ \"\\ny = \" + Integer.toBinaryString(y)\n\t\t\t\t+ \"\\nz = x & y: \" + z1\n\t\t\t\t+ \"\\nz = x | y: \" + z2\n\t\t\t\t+ \"\\nz = x ^ y: \" + z3\n\t\t\t\t+ \"\\nz = ~x: \" + z4);\n\n\t}", "boolean mo1489a();", "public int getPapeles(int avenida, int calle);", "public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }", "public boolean Victoria(){\n boolean respuesta=false;\n if(!(this.palabra.contains(\"-\"))&& this.oportunidades>0 && !(this.palabra.isEmpty())){\n this.heGanado=true;\n respuesta=true;\n }\n return respuesta;\n }", "static void cmp_with_reg(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(registers.get(passed.charAt(4)));\n\t\tS = val1>=val2?false:true;\n\t\tval2 = 256-val2;\n\t\tval2%=256;\n\t\tval1+=val2;\n\t\tCS = val1>255?true:false;\n\t\tString b = Integer.toBinaryString(val1);\n\t\tint ones=0;\n\t\tfor(int i=0;i<b.length();i++)\n\t\t\tif(b.charAt(i)=='1')\n\t\t\t\tones++;\n\t\tZ = ones==0?true:false;\n\t\tP = ones%2==0?true:false;\n\t}", "private static int playblackjack(int i, int j) {\n\t\tif (i > 21 && j > 21) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (i > 21) {\n\t\t\treturn j;\n\t\t}\n\t\tif (j > 21) {\n\t\t\treturn i;\n\t\t}\n\t\tif (i > j) {\n\t\t\treturn i;\n\t\t} else {\n\t\t\treturn j;\n\t\t}\n\t}", "static int comb(int big, int smal) \n\t{ \n\t\treturn (int) ((long) fact[big] * invfact[smal] % mod \n\t\t\t\t* invfact[big - smal] % mod); \n\t}", "boolean mo4830a();", "void mo28732a(boolean z, int i, String str);", "@Override\r\n public boolean ubahStatus(int masukan) {\r\n if (masukan == 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "long mo1636a(long j, alb alb);", "public String kombinasi(int bil1, int bil2) {\n if(functions.kombinasi(bil1, bil2) < 0){\n return \"tolong masukan a ≥ 0\"; \n }\n return (int)functions.kombinasi(bil1, bil2)+\"\";\n }", "boolean mo56158b(int i, int i2);", "public void ejercicio03() {\r\n\t\tcabecera(\"03\", \"Comparar numeros\");\r\n\r\n // Inicio modificacion\r\n\t\t\r\n NumeroEntero n1 = new NumeroEntero(10);\r\n NumeroEntero n2 = new NumeroEntero(10);\r\n\r\n if (n1.comapreTo(n2) == -1){\r\n \t System.out.println(\"N1-> \"+n1);\r\n System.out.println(\"N1 es mayor que N2\");\r\n }\r\n else if (n1.comapreTo(n2) ==1) {\r\n System.out.println(\"N1 -> \"+n1);\r\n System.out.println(\"N1 es menor que N2\");\r\n }\r\n else{\r\n System.out.println(\"N1 y N2 son iguales -> N1 ->\"+n1+\" N2 -> \"+n2);\r\n }\r\n\r\n\t\t// Fin modificacion\r\n\t\t\r\n\t}", "private int transita(int q, char s) {\n\n\tint qf = 0;\n\tfor(Transicion t : d)\n\t if((qf = t.obtenerEstadoSiguiente(q, s)) != 0)\n\t\testadosAuxiliar.add(qf);\n\n\treturn qf;\n }", "private boolean verifSalon(String name, String nbJoueurs){\n boolean result=true;\n if(!(name.length()>0 && nbJoueurs.length()>0 && nbJoueurs.matches(\"[3-9]|10\"))) result=false;\n return result;\n }", "private static int Maj(int x, int y, int z) {\n\t\treturn (x & y) | (z & (x ^ y));\n\t}", "int otherPlayer(int player) {\n switch (player) {\n case 0: return 1;\n case 1: return 0;\n default: return 0;\n }\n }", "private void passAND() {\n\t\tif (currentIndex >= data.length || (data[currentIndex] != 'a' && data[currentIndex] != 'A')) {\n\t\t\tthrow new LexerException(\"Ulaz ne valja!\");\n\t\t}\n\t\tcurrentIndex++;\n\t\tif (currentIndex >= data.length || (data[currentIndex] != 'n' && data[currentIndex] != 'N')) {\n\t\t\tthrow new LexerException(\"Ulaz ne valja!\");\n\t\t}\n\t\tcurrentIndex++;\n\t\tif (currentIndex >= data.length || (data[currentIndex] != 'd' && data[currentIndex] != 'D')) {\n\t\t\tthrow new LexerException(\"Ulaz ne valja!\");\n\t\t}\n\t\tcurrentIndex++;\n\t}", "private static void setBitAtGivenPositions(int pos1, int pos2) {\n\t\tlong temp1 = 1l << pos1;\n\t\tlong temp2 = 1l << pos2;\n\t\tlong result = temp1 | temp2;\n\t\tSystem.out.println(result);\n\t}", "bdm mo1784a(akh akh);" ]
[ "0.5925544", "0.5709084", "0.55108297", "0.5449287", "0.5363404", "0.53473836", "0.5343474", "0.5250465", "0.5199062", "0.51826763", "0.5180668", "0.516729", "0.51406825", "0.5127241", "0.51082104", "0.5098848", "0.50901574", "0.5070678", "0.50693476", "0.5063865", "0.5063022", "0.50614023", "0.5060999", "0.50528455", "0.50453275", "0.50355124", "0.5023434", "0.5009323", "0.5005825", "0.50035954", "0.5002221", "0.49903494", "0.49819294", "0.49717915", "0.49565288", "0.4949358", "0.494921", "0.4940905", "0.49379906", "0.49377936", "0.49373987", "0.49274677", "0.49179658", "0.49164513", "0.49136928", "0.49132696", "0.4906778", "0.49044898", "0.49033946", "0.4900169", "0.48829213", "0.48787433", "0.48753294", "0.48668036", "0.48635387", "0.48585448", "0.48574677", "0.4849615", "0.48462704", "0.48417526", "0.4834268", "0.48229918", "0.48219234", "0.4820041", "0.48099518", "0.48060003", "0.48048013", "0.48043504", "0.4803591", "0.48035848", "0.47989824", "0.47989595", "0.4798702", "0.47971815", "0.47895938", "0.47799686", "0.47785363", "0.477685", "0.4772738", "0.4770509", "0.4769188", "0.4764381", "0.47610724", "0.47559625", "0.4754171", "0.47517622", "0.47496408", "0.47469613", "0.47454414", "0.47387132", "0.47357872", "0.4734296", "0.47277457", "0.47275963", "0.47270447", "0.47260743", "0.4725203", "0.4723883", "0.4720156", "0.471904", "0.47187656" ]
0.0
-1
Constructer for a ship observer
public ShipObserver(GridPane gridPane, String orientation, int row, int column){ this.gridPane = gridPane; this.orientation = orientation; this.column = column; this.row = row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Ship(){\n\t}", "static void RemoveObserver(Ship a_ship){}", "Shipment createShipment();", "private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}", "public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}", "public Ship(Harbour sp, int id) {\n \n this.sp = sp;\n this.id = id;\n enjoy = true;\n numSeats = 2;\n inship = new ArrayList<Passenger>();\n readyToboard = new Semaphore(0);// set a semaphore to whether is ready to go\n readyToLeave = new Semaphore(0);\n // your code here (local variable and semaphore initializations)\n }", "public SpaceShip() {\r\n\t\tsuper();\r\n\t\tthis.radius = 15;\r\n\t\tgameController.setSpaceShip(this);\r\n\t\tArrayList<Point> shipList = new ArrayList<Point>();\r\n\t\tshipList.add(new Point(-10, -10));\r\n\t\tshipList.add(new Point(-10, 10));\r\n\t\tshipList.add(new Point(15, 0));\r\n\t\tthis.addShape(new Polygon(shipList, Color.WHITE, false));\r\n\t\t// this.addShape(new Circle(radius, this.getCenterPoint().copy(),\r\n\t\t// Color.RED, false));\r\n\t}", "public AirLineListener() {\r\n\r\n }", "private void apply(ShipArrived event) {\n }", "public Cargo(){\n super(\"Cargo\");\n intake = new WPI_TalonSRX(RobotMap.cargoIntake);\n shoot = new WPI_TalonSRX(RobotMap.cargoShoot);\n }", "public ComponentMover() {\n\t}", "public Ship(int indexX, int indexY) {\n this(indexX, indexY, indexX, indexY);\n }", "public Ship(String name) {\r\n this.name = name;\r\n }", "public DynamicShipClass() {\n\t\tthis.ts = new Long(ts);\n\t}", "public BaseObservable() {\n obs = new Vector<>();\n }", "private void createShips() {\n //context,size, headLocation, bodyLocations\n Point point;\n Ship scout_One, scout_Two, cruiser, carrier, motherShip;\n if(player) {\n point = new Point(maxN - 1, 0); //row, cell\n scout_One = new Ship(1, point, maxN, \"Scout One\", player);\n ships.add(scout_One);\n point = new Point(maxN - 1, 1);\n scout_Two = new Ship(1, point, maxN, \"Scout Two\", player);\n ships.add(scout_Two);\n point = new Point(maxN - 2, 2);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n ships.add(cruiser);\n point = new Point(maxN - 2, 3);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n ships.add(carrier);\n point = new Point(maxN - 4, 5);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n ships.add(motherShip);\n\n }else{\n Random rand = new Random();\n int rowM = maxN-3;\n int colM = maxN -2;\n int row = rand.nextInt(rowM);\n int col = rand.nextInt(colM);\n point = new Point(row, col);\n motherShip = new Ship(12, point, maxN, \"MotherShip\", player);\n updateOccupiedCells(motherShip.getBodyLocationPoints());\n ships.add(motherShip);\n\n rowM = maxN - 1;\n colM = maxN -1;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n carrier = new Ship(4, point, maxN, \"Carrier\", player);\n updateOccupiedCells(carrier.getBodyLocationPoints());\n ships.add(carrier);\n checkIfOccupiedForSetShip(carrier, row, col, rowM, colM);\n\n\n rowM = maxN - 1;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n cruiser = new Ship(2, point, maxN, \"Cruiser\", player);\n updateOccupiedCells(cruiser.getBodyLocationPoints());\n ships.add(cruiser);\n checkIfOccupiedForSetShip(cruiser, row, col, rowM, colM);\n\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_Two = new Ship(1, point, maxN, \"Scout_Two\", player);\n updateOccupiedCells(scout_Two.getBodyLocationPoints());\n ships.add(scout_Two);\n checkIfOccupiedForSetShip(scout_Two, row, col, rowM, colM);\n\n rowM = maxN;\n colM = maxN;\n row = rand.nextInt(rowM);\n col = rand.nextInt(colM);\n point = new Point(row, col);\n scout_One = new Ship(1, point, maxN, \"Scout_One\", player);\n updateOccupiedCells(scout_One.getBodyLocationPoints());\n ships.add(scout_One);\n checkIfOccupiedForSetShip(scout_One, row, col, rowM, colM);\n\n\n\n\n }\n //Need an algorithm to set enemy ship locations at random without overlaps\n }", "Delivery createDelivery();", "public static void main(String args[]) {\nProducto p = new Producto(\"123456\", 1987.29f, 2123.10f);\r\nObservadorCodigoBarras ObsCodigo = new ObservadorCodigoBarras();\r\nObservadorCosto ObsCosto = new ObservadorCosto();\r\n// Agregando los Observadores para Producto!\r\np.addObserver(ObsCodigo);\r\np.addObserver(ObsCosto);\r\n// Crear y Manipular Cambios en el Producto.\r\nSystem.out.println(\"----Cambio de Codigo Barras---\");\r\np.setCodigoBarra(\"654321\");\r\nSystem.out.println(\"----Cambio de Costo---\");\r\np.setCosto(18879.6f);\r\n\r\n}", "private void observerStuff() {\r\n\t\tfor (PirateShip pirate : pirates) {\r\n\t\t\tship.registerObserver(pirate);\r\n\t\t}\r\n\t}", "public Observable()\n {\n observers = new HashSet<>();\n }", "public CombatShip(CombatShipBase initTypeBase, int initFaction) {\n baseShip = initTypeBase;\n faction = initFaction;\n }", "DeepSkyTarget(String name, IObserver observer) {\n\n super(name, observer);\n\n }", "private Observer<ArrayList<Station>> createStationListObserver() {\n return new Observer<ArrayList<Station>>() {\n @Override\n public void onChanged(@Nullable ArrayList<Station> newStationList) {\n\n }\n };\n }", "public Ship newShip(GameScreen screen){\n\t\tthis.ship = new Ship(screen);\n\t\treturn ship;\n\t}", "public Ship(List<Coordinate> coordinates) {\n\t\tfor (Coordinate coordinate : coordinates) {\n\t\t\tcoordinate.setIsHit(false);\n\t\t\tcoordinate.setIsSunk(false);\n\t\t}\n\t\tshipPositions = coordinates;\n\t}", "public New_shipment() {\n initComponents();\n init();\n \n }", "PlayerShip(PlayerShip toCopy) {\n\t\tsuper(toCopy);\n\t\tsetHSpeed(toCopy.getHSpeed());\n\t}", "private Notifier(){}", "public Notification(AGateway gateway)\r\n/* 11: */ {\r\n/* 12:31 */ setGateway(gateway);\r\n/* 13: */ }", "public EOObserverProxy(java.lang.Object target, com.webobjects.foundation.NSSelector action, int priority){\n //TODO codavaj!!\n }", "public Surgeon() {\n }", "public Cohete() {\n\n\t}", "public Gasto() {\r\n\t}", "public ObservationCB(ISPObservation obs) {\n _obs = obs;\n }", "public void constructorReturned(Spy spy, String constructionInfo);", "public Ship(float x, float y) {\r\n\t\tthis.bounds = new Rectangle(x, y, width, height);\r\n\t}", "public interface Iship {\t\n\t\n//gunpoints, places where the cannons stick out of a model, cannot have more than 2?\t\n\tpublic static final int[] PLAYER_GUNPOINTS = {3,60};\n\tpublic static final int[] GUNSHIP_GUNPOINTS = {8, 40};\n\tpublic static final int[] SIDEWAYS_GUNPOINTS = {12, 36};\n\tpublic static final int[] ADVANCED_GUNPOINTS = {0};\n\tpublic static final int[] MOTHERSHIP_GUNPOINTS = {36, 190, 56, 168, 84, 140};\n\tpublic static final int[] SUIBOSS_GUNPOINTS = {10, 200, 145, 60};\n\t\n//bullet destruction vals\npublic static final int PLAYER_BULLET_VAL = 50;\n\n//ship score vals\npublic static final int SUICIDE_SCORE_VAL = 15;\npublic static final int SHOOTER_SCORE_VAL = 25;\npublic static final int SIDEWAYS_SCORE_VAL = 50;\n\n//health values:\npublic static final int PLAYER_MAX_HEALTH = 100;\n\n//standard collision health value\npublic static final int COLLISION_DAMAGE = 10;\npublic static final int BULLET_DAMAGE = 15;\n\n//enemy type ids \npublic static final int SUICIDE_ID = 0;\npublic static final int GUNSHIP_ID = 1;\n\n//enemy health\npublic static final int REGULAR_ENEM_HEALTH = 1;\npublic static final int ELEVATED_ENEM_HEALTH = 2;\n\n//speeds \npublic static final float SHIP_SPEED_NORMAL = 0.2f;\n\n//methods\n\t\n\tpublic int[] getGunpoints(); //returns gun-barrel pixels\n\tpublic int getHealth(); //gets health\n\tpublic void setHealth(int newHealth); //sets the health\n}", "public Championship() {\n }", "ShipmentAttribute createShipmentAttribute();", "public void init() {\n\t\tfor(int i = 0; i < roamingAliens; ++i) {\n\t\t\tAlien alien = new Alien(ColorUtil.MAGENTA, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) alien); \n\t\t}\n\t\tfor(int i = 0; i < roamingAstronauts; ++i) {\n\t\t\tAstronaut astronaut = new Astronaut(ColorUtil.GREEN, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) astronaut);\n\t\t}\n\t\tgameObject.add((Spaceship.getSpaceship()));\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t\tthis.clearChanged();\n\t}", "public Ship() {\n rotation = Rotation.VERTICAL;\n }", "@Override\n public Stanza createFromParcel(Parcel source) {\n return new Stanza(source);\n }", "public Communicator() {\n\t}", "@Override\r\n Calzone build() {\r\n return new Calzone(this);\r\n }", "protected abstract void construct();", "public Communicator() {\n }", "public Communicator() {\n }", "public Telefone() {\n\t}", "public Notification()\n\t{\n\t\t\n\t}", "public Spaceship(int x, int y)\r\n\t{\r\n\t\tsuper(x, y);\r\n\t}", "public Ship(XGame game, Controller ctrl) {\r\n \tRADIUS = 8;\r\n \tlives = 5;\r\n \tspower = 100;\r\n \tshootdelay = 500; // amount of time in milliseconds between bullets\r\n \tbulletlife = 25; \r\n s = new Vector2D();\r\n v = new Vector2D();\r\n d = new Vector2D(2,2); \r\n this.game = game;\r\n this.ctrl = ctrl;\r\n reset(); // move the ship to its start position\r\n }", "@Override\r\n\tpublic void arrivalMessage(Ship ship){\r\n\t\tSystem.out.println(ship + \" arrives at arrival zone\");\r\n\t}", "public Telefone() {\n\t\t\n\t}", "public LineStroker() {\n }", "public Gate(){\n\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}", "public Ship(int l){\n this.lifePoints=l;\n }", "StockNotifier(PriceSubject sg) {\n\t\tthis.observerID = ++observerIDTracker;\n\t\tSystem.out.println(\"Analyser created : \"+this.observerID);\n\t\tsg.register(this);\n\t}", "private Observer<Station> createStationObserver() {\n return new Observer<Station>() {\n @Override\n public void onChanged(@Nullable Station newStation) {\n\n // check if this station parameters have changed\n if (mThisStation != null && newStation!= null &&\n mThisStation.getStreamUri().equals(newStation.getStreamUri())) {\n\n String newName = newStation.getStationName();\n long newImageSize = newStation.getStationImageSize();\n String newMetaData = newStation.getMetadata();\n\n String oldName = mThisStation.getStationName();\n long oldImageSize = mThisStation.getStationImageSize();\n String oldMetaData = mThisStation.getMetadata();\n\n // CASE: NAME\n if (!(newName.equals(oldName))) {\n updateStationNameView(newStation);\n }\n // CASE: IMAGE\n else if (newImageSize != oldImageSize) {\n updateStationImageView(newStation);\n }\n // CASE: METADATA\n else if (!(newMetaData.equals(oldMetaData))) {\n updateStationMetadataView(newStation);\n }\n // CASE: PLAYBACK STATE\n if (mPlaybackState != newStation.getPlaybackState()) {\n mPlaybackState = newStation.getPlaybackState();\n changeVisualState(newStation);\n }\n\n // update this station\n mThisStation = newStation;\n\n }\n }\n };\n }", "public MonHoc() {\n }", "public void createIsipship() {\r\n\t\tRandom randomGenerator = new Random();\r\n\t\tint posX = 840;\r\n\t\tint randomPosY = randomGenerator.nextInt(480); \r\n\t\tIsipEngineer isipEngineer = new IsipEngineer(posX, randomPosY);\r\n\t\tisipShips.add(isipEngineer);\r\n\t\t//rectangles.add(isipEngineer.r);\r\n\t}", "public BubbleFactory() {\n // TODO Auto-generated constructor stub\n }", "public Shipment(Person sender, Person receiver, int startTime,\r\n\t\t\tint transportDuration) {\r\n\t\tthis.sender = sender;\r\n\t\tthis.receiver = receiver;\r\n\t\tthis.startTime = startTime;\r\n\t\tthis.transportDuration = transportDuration; //wäre sinnvoller hier zu berechnen ?!\r\n\r\n\t\tshipmentID = shipmentCounter;\r\n\t\tshipmentCounter++;\r\n\t}", "public Boss(String line, String ship, String explosion, Point pos){\r\n\t\tsuper(line,pos,ship,explosion);\r\n\t\tposition=pos;\r\n\t\tbossHb = new Health(600, 10);\r\n\t\tinPosition=false;\r\n\t}", "public Notification() {\n\n\t}", "protected void onConstructor(E_ReplacementStrategies strat) {\n\t\tthis.Assemblyteam = new ArrayList<>();\n\t\tthis.strat = this.chooseReplacer(strat);\n\t\tthis.gatherTeam();\n\t}", "@Override\r\n\tpublic void ship(Robot t) {\n\t\t\r\n\t}", "public MotifCellFactoryObservable() {\r\n\t\tsuper();\r\n\t}", "public Obstacle(int x, int y) {\n super(x, y);\n }", "public Harbour() {\n int i;\n\n docks = new Ship[Assignment2.DESTINATIONS];\n \n \n // docks[] is an array containing the ships sitting on corresponding docks\n // Value null means the dock is empty\n for(i=0; i<Assignment2.DESTINATIONS; i++){\n docks[i] = null;\n }\n \n // your code here (local variable and semaphore initializations)\n\n }", "protected ArrayList<Ship> initiateShips(){\n ArrayList<Ship> initialShips = new ArrayList<>();\n\n //battleship\n for (int i=0;i<1;i++){\n Battleship battleship = new Battleship();\n initialShips.add(battleship);\n }\n\n //cruiser\n for (int i=0;i<2;i++){\n Cruiser cruiser = new Cruiser();\n initialShips.add(cruiser);\n }\n\n //destroyer\n for (int i=0;i<3;i++){\n Destroyer destroyer = new Destroyer();\n initialShips.add(destroyer);\n }\n\n //submarine\n for (int i=0;i<4;i++){\n Submarine submarine = new Submarine();\n initialShips.add(submarine);\n }\n\n return initialShips;\n }", "public BoardPanel(int x, int y, boolean isEnemy, EventHandler<MouseEvent> handler) {\n super();\n view = new BoardPanelView(x, y, handler);\n this.isEnemy = isEnemy;\n\n shipNumOnBoard = 0;\n\n }", "public LateDeliverableProcessorImpl() {\r\n // Empty\r\n }", "public F2_Ship4() {\n\n setH(100);\n setW(50); //Set the size of the ship\n\n setArt(\"Art/SpaceShips/Faction2/Ship4.png\"); //Set the artwork of the ship\n }", "void ship_setup() {\n ship = new Ship(level);\n ship_image_view = new ImageView(ship_image);\n ship_image_view.setX(ship.x_position);\n ship_image_view.setY(ship.y_position);\n ship_image_view.setFitWidth(Ship.SHIP_WIDTH);\n ship_image_view.setFitHeight(Ship.SHIP_HEIGHT);\n game_pane.getChildren().add(ship_image_view);\n }", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "public void setConstructingObstacle(Obstacle obstacle);", "ShipmentContactMech createShipmentContactMech();", "public AmishMart()\n {\n super(\"PokeMart\");\n\n eventArray[20][14] = new Teleport();\n eventArray[20][14].setCoord(5, 2, 18, 17);\n\n eventArray[15][13] = new ShopKeep();\n }", "private Road()\n\t{\n\t\t\n\t}", "private static void ClientObserver() {\n NewsAgency agency = new NewsAgency();\n\n // il canale televisivo le osserva, rilancia\n agency.addObserver( new NewsChannel( \"rai1\") );\n agency.addObserver( new NewsChannel( \"rai2\") );\n\n agency.setNews( \"30 e lode a tutti\" );\n agency.setNews( \"Data test\" );\n }", "protected Ship(int length) {\n this.length = length;\n size = 0;\n cells = new Cell[length];\n }", "public EdObservation()\n\t{\n\t\t_title = \"Observation\" ;\n\t\t_presSource = _w = new ObsGUI() ;\n\t\t_description = \"The observation is the smallest entity that can be scheduled.\" ;\n\n\t\t_obsTitle = _w.nameBox;\n\t\t_obsTitle.addWatcher( this ) ;\n\n\t\t_obsState = _w.obsState ;\n\n\t\t_w.jComboBox1.addActionListener( this ) ;\n\n\t\t_w.optional.addWatcher( this ) ;\n\t\t_w.standard.addWatcher( this ) ;\n\n\t\t// Added by MFO (22 February 2002)\n\t\tif( !OtCfg.telescopeUtil.supports( TelescopeUtil.FEATURE_FLAG_AS_STANDARD ) )\n\t\t{\n\t\t\t_w.standard.setText( \"Flag as Calibration\" ) ;\n\t\t\t_w.optional.setVisible( false ) ;\n\t\t\t_w.optional.deleteWatcher( this ) ;\n\t\t}\n\n\t\t_w.addRemainingCountListener(this);\n\n\t\t_w.obsStateLabel.setVisible( false ) ;\n\t\t_w.obsState.setVisible( false ) ;\n\t}", "public DoorEvent(int x, int y) {\r\n super(x, y, 18, true);\r\n }", "public Customer (int arrives)\n {\n arrivalTime = arrives;\n departureTime = 0;\n }", "@Override\n public String toString() {\n return \"Ship\";\n }", "@Nonnull\n public ShipConfiguration build() {\n return new ShipConfiguration(\n radius, movementSpeed, acceleration, traverseSpeed, hitPoints, engines, thrusters, sensors,\n defenses, weapons, energy);\n }", "private StoneContract() {\n }", "public Ship(Type type, CrewMember owner) {\n this.type = type;\n this.fuelAmount = type.fuelCapacity;\n this.hullStrength = type.hullStrength;\n this.cargoHold = new CargoHold(type.cargoCapacity);\n this.crew = new ArrayList<>();\n\n this.weapons = new ArrayList<>();\n this.equippedWeapons = new ArrayList<>();\n this.shields = new ArrayList<>();\n this.equippedShields = new ArrayList<>();\n this.gadgets = new ArrayList<>();\n this.equippedGadgets = new ArrayList<>();\n\n this.numWeapons = 0;\n this.numShields = 0;\n this.numGadgets = 0;\n\n this.maxShields = calculateMaxShields();\n this.currentShields = maxShields;\n\n this.owner = owner;\n }", "public Ships(ShipTypes type) {\n this.type = type;\n }", "public Mover(){\n \t\n }", "void registerObserver(BallStateObserver observer);", "TypicalCustomer(double arrivalTime, State state) {\n super(arrivalTime, state);\n }", "ShipmentGatewayConfig createShipmentGatewayConfig();", "public ShapeMaker(SubstrateMapDrawer drawer) {\r\n this.drawer = drawer;\r\n }", "public Dealer()\n {\n\n\n }", "public DetonationPdu(edu.nps.moves.jaxb.dis.DetonationPdu x)\n {\n super(x); // Call superclass constructor\n\n\n edu.nps.moves.dis.EntityID foo_0;\n if(x.getMunitionID() == null)\n foo_0 = new edu.nps.moves.dis.EntityID();\n else\n foo_0 = new edu.nps.moves.dis.EntityID(x.getMunitionID() );\n this.setMunitionID(foo_0);\n\n\n edu.nps.moves.dis.EventID foo_1;\n if(x.getEventID() == null)\n foo_1 = new edu.nps.moves.dis.EventID();\n else\n foo_1 = new edu.nps.moves.dis.EventID(x.getEventID() );\n this.setEventID(foo_1);\n\n\n edu.nps.moves.dis.Vector3Float foo_2;\n if(x.getVelocity() == null)\n foo_2 = new edu.nps.moves.dis.Vector3Float();\n else\n foo_2 = new edu.nps.moves.dis.Vector3Float(x.getVelocity() );\n this.setVelocity(foo_2);\n\n\n edu.nps.moves.dis.Vector3Double foo_3;\n if(x.getLocationInWorldCoordinates() == null)\n foo_3 = new edu.nps.moves.dis.Vector3Double();\n else\n foo_3 = new edu.nps.moves.dis.Vector3Double(x.getLocationInWorldCoordinates() );\n this.setLocationInWorldCoordinates(foo_3);\n\n\n edu.nps.moves.dis.BurstDescriptor foo_4;\n if(x.getBurstDescriptor() == null)\n foo_4 = new edu.nps.moves.dis.BurstDescriptor();\n else\n foo_4 = new edu.nps.moves.dis.BurstDescriptor(x.getBurstDescriptor() );\n this.setBurstDescriptor(foo_4);\n\n this.detonationResult = x.getDetonationResult();\n this.numberOfArticulationParameters = x.getNumberOfArticulationParameters();\n this.pad = x.getPad();\n this.articulationParameters = new ArrayList();\n for(int idx = 0; idx < x.getArticulationParameters().size(); idx++)\n {\n this.articulationParameters.add( new edu.nps.moves.dis.ArticulationParameter((edu.nps.moves.jaxb.dis.ArticulationParameter) x.getArticulationParameters().get(idx)));\n }\n }", "public OriDestEOImpl() {\n }", "public RailRoad() {}" ]
[ "0.66582835", "0.5963197", "0.5898064", "0.56738", "0.559497", "0.55677325", "0.54591835", "0.5433375", "0.54075605", "0.5399479", "0.5398881", "0.53926617", "0.5381489", "0.53749114", "0.53730285", "0.53589547", "0.53513545", "0.5334664", "0.5330482", "0.53187144", "0.53176224", "0.5313944", "0.5300771", "0.52883804", "0.52852726", "0.52689326", "0.5257248", "0.5249672", "0.5242236", "0.52287954", "0.5209636", "0.52089703", "0.52039593", "0.5201012", "0.51961946", "0.5193569", "0.5186828", "0.51785105", "0.5176437", "0.5173084", "0.51537305", "0.5142212", "0.5139374", "0.5133212", "0.5109312", "0.5098388", "0.5098388", "0.50931287", "0.50924546", "0.5092084", "0.5088884", "0.50880593", "0.5080234", "0.50789374", "0.50752074", "0.50736046", "0.5072122", "0.50602657", "0.50411034", "0.50351954", "0.5028705", "0.50230545", "0.5011297", "0.5009392", "0.5006741", "0.49983358", "0.49967775", "0.49940598", "0.4987789", "0.49867573", "0.49763668", "0.4975722", "0.4972418", "0.4969721", "0.49644384", "0.4962012", "0.49575925", "0.4956134", "0.49559182", "0.49480218", "0.49450088", "0.49389398", "0.49372846", "0.49366188", "0.49313137", "0.49262014", "0.4924742", "0.49237642", "0.4919357", "0.491323", "0.4912038", "0.49111688", "0.49098116", "0.48990044", "0.4897153", "0.48944175", "0.48841333", "0.48705783", "0.4869146", "0.4862168" ]
0.60725343
1
Updates the color of the cells in the ship
@Override public void update(Integer pushValue) { List cells = gridPane.getChildren(); if (orientation.equals("HORIZONTAL")){ Button button = (Button) cells.get(10*row + column + pushValue); button.setStyle("-fx-background-color: #ff0000"); System.out.println("HIT"); } if (orientation.equals("VERTICAL")){ Button button = (Button) cells.get(10*(row + pushValue) + column); button.setStyle("-fx-background-color: #ff0000"); System.out.println("HIT"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "public void update() {\n\t\t//Start updting the image\n\t\timg.loadPixels();\n\t\t\n\t\t//for every cell apply a color\n\t\tGridCell[] cells = grid.getCells();\n\t\tfor(int i = 0 ; i < cells.length; i++) {\n\t\t\timg.pixels[i] = cells[i].getMiniMapColor(ignoreDiscovered);\n\t\t}\n\t\t\n\t\t//Now update the image\n\t\timg.updatePixels();\n\t}", "private void setColor() {\n cell.setStroke(Color.GRAY);\n\n if (alive) {\n cell.setFill(aliveColor);\n } else {\n cell.setFill(deadColor);\n }\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 updateDisplay()\n {\n\t Color metal = new Color(153, 153, 153);\n\t Color background = new Color(0, 0, 0);\n\t Color sand = new Color(251, 251, 208);\n\t Color water = new Color(102, 179, 255);\n\t int rows = grid.length;\n\t int cols = grid[0].length;\n\t for(int i = 0; i < rows; i++) {\n\t\t for(int j = 0; j < cols; j++) {\n\t\t\t if(grid[i][j] == METAL) {\n\t\t\t\t //color should be gray or whatever\n\t\t\t\t display.setColor(i, j, metal);\n\t\t\t }\n\t\t\t else if(grid[i][j] == EMPTY) {\n\t\t\t\t display.setColor(i, j, background);\n\t\t\t }\n\t\t\t else if(grid[i][j] == SAND) {\n\t\t\t\t display.setColor(i, j, sand);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t display.setColor(i, j, water);\n\t\t\t }\n\t\t }\n\t }\n }", "private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "public void updateCellState(Move move)\r\n\t{\r\n\t\tCellState color = this.grid[move.getMovedMarbleInitialPosition(0).getX()][move.getMovedMarbleInitialPosition(0).getY()];\r\n\t\t\r\n\t\tfor(int i = 0;i < move.getMovedMarblesCount();i++)\r\n\t\t{\r\n\t\t\tthis.grid[move.getMovedMarbleInitialPosition(i).getX()][move.getMovedMarbleInitialPosition(i).getY()] = CellState.EMPTY;\r\n\t\t}\r\n\t\tfor(int i = 0; i < move.getMovedMarblesFinalCount();i++)\r\n\t\t{\r\n\t\t\tif(isPositionValid(move.getMovedMarbleFinalPosition(i)))\r\n\t\t\t{\r\n\t\t\t\tthis.grid[move.getMovedMarbleFinalPosition(i).getX()][move.getMovedMarbleFinalPosition(i).getY()] = color;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(color == CellState.BLACK_MARBLE) this.blackMarblesCount --;\r\n\t\t\t\tif(color == CellState.WHITE_MARBLE) this.whiteMarblesCount --;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateDisplay()\n {\n //Step 3\n\t Color color = null;\n //Hint - use a nested for loop\n\t for(int row = 0; row < grid.length; row++)\n\t {\n\t\t for(int col = 0; col < grid[0].length; col++)\n\t\t {\n\t\t\t if(grid[row][col] == EMPTY)\n\t\t\t {\n\t\t\t\t color = Color.BLACK;\n\t\t\t }\n\t\t\t else if(grid[row][col] == METAL)\n\t\t\t {\n\t\t\t\t color = Color.GRAY;\n\t\t\t }\n\t\t\t else if(grid[row][col] == SAND)\n\t\t\t {\n\t\t\t\t color = new Color(204, 186, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == WATER)\n\t\t\t {\n\t\t\t\t color = new Color(7, 125, 116);\n\t\t\t }\n\t\t\t else if(grid[row][col] == HELIUM)\n\t\t\t {\n\t\t\t\t color = Color.WHITE;\n\t\t\t }\n\t\t\t else if(grid[row][col] == BOUNCE)\n\t\t\t {\n\t\t\t\t color = new Color(255, 0, 200);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VIRUS)\n\t\t\t {\n\t\t\t\t color = new Color(153, 51, 204);\n\t\t\t }\n\t\t\t else if(grid[row][col] == FIRE)\n\t\t\t {\n\t\t\t\t color = new Color(229, 64, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VINE)\n\t\t\t {\n\t\t\t\t color = new Color(45, 102, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == TELEPORT)\n\t\t\t {\n\t\t\t\t color = new Color(255, 255, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == LASER)\n\t\t\t {\n\t\t\t\t color = new Color(245, 50, 41);\n\t\t\t }\n\t\t\t display.setColor(row, col, color);\n\t\t }\n\t }\n\t \n }", "public void step() {\n\t\t// calculate new values\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = cells[x + (y * gridX)];\n\t\t\t\tCell newCell = newCells[x + (y * gridX)];\n\n\t\t\t\tint neighborCount = sameNeighborCount(x, y);\n\n\t\t\t\tif (c.isActive) {\n\t\t\t\t\tif (neighborCount < 2) {\n\t\t\t\t\t\t// all alone, die of loneliness\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t\telse if (neighborCount > 3) {\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Dead cells can be reborn if surrounded by enough neighbors of the same\n\t\t\t\t\t// color. The cell will be reborn using the most prominent color.\n\t\t\t\t\tint populousColor = mostPopulousColor(x, y);\n\t\t\t\t\tif (populousColor > Integer.MIN_VALUE) {\n\t\t\t\t\t\tnewCell.isActive = true;\n\t\t\t\t\t\tnewCell.cellColor = populousColor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update to new state\n\t\tfor (int i = 0; i < cells.length; i++) {\n\t\t\tcells[i].isActive = newCells[i].isActive;\n\t\t\tcells[i].cellColor = newCells[i].cellColor;\n\t\t}\n\t}", "protected abstract void updateColor(final Color col, final boolean fill);", "private Color updateYourBoardHelper(int i, int j) {\n if (i == 0 && j == 0) {\n return Color.BLACK;\n }\n if (i == 0 || j == 0) {\n return Color.GRAY;\n }\n if (arePlayerShipsInitialized()) {\n try{\n TileStatus[][] b = p2.getPlayerStatusBoard();\n Color c = new Color(0);\n switch (b[j][i]) {\n case SHIP:\n case SUBSCANSHIP:\n case AIRCRAFTSCAN:\n switch (p2.getPlayerShipBoard()[j][i][0]) {\n case AIRCRAFTCARRIER:\n c = CARRIER_COLOR;\n break;\n case BATTLESHIP:\n c = BATTLESHIP_COLOR;\n break;\n case DESTROYER:\n c = DESTROYER_COLOR;\n break;\n case SUBMARINE:\n c = SUBMARINE_COLOR;\n break;\n case PATROLBOAT:\n c = PATROLBOAT_COLOR;\n break;\n default:\n break;\n }\n switch (p2.getPlayerShipBoard()[j][i][1]) {\n case AIRCRAFT1:\n if (!(((Aircraft) p2.getShip(5)).launched())) {\n c = AIRCRAFT1_COLOR;\n }\n break;\n case AIRCRAFT2:\n if (!(((Aircraft) p2.getShip(6)).launched())) {\n c = AIRCRAFT2_COLOR;\n }\n break;\n default:\n break;\n }\n break;\n case HIT:\n c = Color.RED;\n break;\n case MISS:\n c = Color.WHITE;\n break;\n case SUBSCANEMPTY:\n c = Color.CYAN;\n break;\n default:\n c = Color.DARK_GRAY;\n break;\n }\n return c;\n }catch(java.lang.NullPointerException n){\n System.err.println(\"Null pointer where p2 should be\");\n for(int ii=0; ii<7; ii++){\n for(int jj=0; jj<3; jj++){\n System.out.print(playerShips[ii][jj]+ \" \");\n }\n System.out.println();\n }\n// System.exit(1);\n return Color.DARK_GRAY;\n }\n } else{\n Color c = Color.DARK_GRAY;\n switch (yourBoard[i][j][0]) {\n case CR:\n if(yourBoard[i][j][1]==Statuses.AC1){\n c = AIRCRAFT1_COLOR;\n }else if(yourBoard[i][j][1]==Statuses.AC2){\n c = AIRCRAFT2_COLOR;\n }else{\n c = CARRIER_COLOR;\n }\n break;\n case BS:\n c = BATTLESHIP_COLOR;\n break;\n case DES:\n c = DESTROYER_COLOR;\n break;\n case SUB:\n c = SUBMARINE_COLOR;\n break;\n case PB:\n c = PATROLBOAT_COLOR;\n break;\n default:\n c = Color.DARK_GRAY;\n break;\n }\n return c;\n }\n }", "public static void update(){\n\t\t\n\t\tgraphFrame.setColor(color);\n\t}", "public void redraw(int [][] board)\n\t{\n\t\tfor(int i = 0; i < 20; ++i)\n\t\t{\n\t\t\tfor( int j = 0; j < 10; ++j)\n\t\t\t{\n\t\t\t\tswitch (board[i][j])\n\t\t\t\t{\n\t\t\t\t\t//empty\n\t\t\t\t\tcase 0:\tcolors[i][j] = Color.GRAY; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//J - shape\n\t\t\t\t\tcase 1:\tcolors[i][j] = Color.BLUE; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//Z shape\n\t\t\t\t\tcase 2:\tcolors[i][j] = Color.RED; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//L shape\n\t\t\t\t\tcase 3:\tcolors[i][j] = Color.ORANGE; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//S shape\n\t\t\t\t\tcase 4:\tcolors[i][j] = new Color(102,255,102); ;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//I shape\n\t\t\t\t\tcase 5:\tcolors[i][j] = Color.CYAN; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//O shape\n\t\t\t\t\tcase 6:\tcolors[i][j] = Color.YELLOW; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//T shape\n\t\t\t\t\tcase 7:\tcolors[i][j] = Color.PINK; \n\t\t\t\t\t\tbreak;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tview.getInGamePanel().getBoardGamePanel().redraw(colors);\t\n\t}", "public void update(Spaceship ship) {\n Log.d(\"Powerstate\", \"ShieldPowerState\");\n ship.paint.setColor(Color.argb(255,47,247,250));\n ship.isHit = false;\n\n\n }", "private void colorizeGrid() {\n for (int x = 0; x < field.length; x++) {\n for (int y = 0; y < field[0].length; y++) {\n field[x][y].setStyle(intersection.getColorCode(x, y));\n }\n }\n }", "abstract public void colorize(TCell c);", "public void updateBoard(Color color, int i, int y) {\r\n\t\tif (color == Color.yellow) {\r\n\t\t\tboard[i][y] = '1';\r\n\r\n\t\t} else if (color == Color.red) {\r\n\t\t\tboard[i][y] = '2';\r\n\t\t}\r\n\t}", "void setStone(int x, int y, int color);", "public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}", "@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }", "public void setCell(int color) {\r\n\t\tSound sound = Assets.manager.get(Assets.CLICK_SOUND);\r\n\t\tsound.play();\r\n\t\toccupied = color;\r\n\t\tif (color == -1) {\r\n\t\t\tpiece = new Image(Assets.manager.get(Assets.RED_TXT, Texture.class));\r\n\t\t} else {\r\n\t\t\tpiece = new Image(Assets.manager.get(Assets.YELLOW_TXT, Texture.class));\r\n\t\t}\r\n\t\tpiece.setPosition(img.getX() + OFFSET, img.getY() + OFFSET);\r\n\t\tstage.addActor(piece);\r\n\t}", "protected abstract void setCell(int x, int y, boolean state);", "public void update() {\n\t\t// Complete this method\n\n\t\tint [][]tempTable = new int [numberOfRows()][numberOfColumns()];\n\n\t\tfor ( int r = 0; r < numberOfRows(); r++ ){\n\t\t\tfor (int c = 0; c < numberOfColumns(); c++){\n\t\t\t\tif(neighborCount(r,c) == 3){//if there is exactly three\n\t\t\t\t\tif(gameGrid[r][c] == 0)//cell is born\n\t\t\t\t\t\ttempTable[r][c] = 1;//then you add one to your tempTable\t\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) == 2) || (neighborCount(r,c) == 3)){//if there is two or three\n\t\t\t\t\tif(gameGrid[r][c] == 1)//this is your existing cell\n\t\t\t\t\t\ttempTable[r][c] = 1;//then the cell remains\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) == 0) || (neighborCount(r,c) == 1)){//if there were two neighbors\n\t\t\t\t\tif(gameGrid[r][c] == 0)//if there is no cell\n\t\t\t\t\t\ttempTable[r][c] = 0;//a cell dies\n\t\t\t\t}\n\n\t\t\t\tif((neighborCount(r,c) > 3)){//if there is more than three\n\t\t\t\t\tif(gameGrid[r][c] == 1)//if there is no cell\n\t\t\t\t\t\ttempTable[r][c] = 0;//a cell dies\n\t\t\t\t}\n\n\t\t\t}//end of column for loop\n\t\t}//end of row for loop\n\t\tgameGrid = tempTable;\n\t}", "public void setBoardWithColor(BoardCell cell) {\r\n\t\tif(cell==null) throw new NullPointerException();\r\n\t\tfor(int row=0;row<getMaxRows();row++){\r\n\t\t\tfor(int col=0;col<getMaxCols();col++){\r\n\t\t\t\tboardcell[row][col]=cell;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic void setCell(Integer x, Integer y, Integer value) {\n\t\tgame[x][y] = value;\r\n\t}", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "public void update() {\n\t\tfor (Entry<String, Integer> entry : countMap.entrySet()) {\n\t\t\tcountMap.put(entry.getKey(), 0);\n\t\t}\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tCell c = newGrid[i][j];\n\t\t\t\tc.setRow(i);\n\t\t\t\tc.setCol(j);\n\t\t\t\tblocks[i][j].setFill(c.getColor());\n\t\t\t\tcurrentGrid[i][j] = newGrid[i][j];\n\t\t\t}\n\t\t}\n\t\tempty(newGrid);\n\t}", "public void update(Observable o, Object arg) {\n Cell a = (Cell)o;\n if (a.getState() == 0) {\n this.setBackground(Color.black);\n } else if (a.getState() == 1) {\n this.setBackground(Color.white);\n } else if (a.getState() == 2) {\n this.setBackground(Color.blue);\n } else {\n this.setBackground(Color.orange);\n }\n }", "public void chooseCellColor(){\n currentCellColor = cellColorPicker.getValue();\n draw();\n }", "void setRed(int x, int y, int value);", "@Override\n public void mouseReleased(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(updateYourBoardHelper(xx, yy));\n //potential problem here during initialization of ships?\n \n }", "public void setColor(int gnum, Color col);", "void updateBoard() {\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tfor (int y = 0; y < length; y++) {\r\n\t\t\t\tif (filled[x][y]) {\r\n\t\t\t\t\t// Draw filled square\r\n\t\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\t\tColor use = new Color(0, 0, 0);\r\n\t\t\t\t\tif (rand < .25) {\r\n\t\t\t\t\t\tuse = a;\r\n\t\t\t\t\t} else if (rand < .50) {\r\n\t\t\t\t\t\tuse = b;\r\n\t\t\t\t\t} else if (rand < .75) {\r\n\t\t\t\t\t\tuse = c;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tuse = d;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJSquare element = new JSquare(this.getWidth() / length, this.board.getHeight() / length, use, true);\r\n\t\t\t\t\telement.addMouseListener(this);\r\n\t\t\t\t\tboard.add(element);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Draw empty square\r\n\t\t\t\t\tJSquare element = new JSquare(this.getWidth() / length, this.board.getHeight() / length,\r\n\t\t\t\t\t\t\tnew Color(192, 192, 192), false);\r\n\t\t\t\t\telement.addMouseListener(this);\r\n\t\t\t\t\tboard.add(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateFields(MessageUpdate msg) {\n System.out.println(\"Updating board.\");\n\n if (msg.getOrigin().i != msg.getDestination().i || msg.getOrigin().j != msg.getDestination().j) {\n Color color = gameService.getPieceColor(msg.getOrigin().i, msg.getOrigin().j);\n\n gameService.setPieceColor(msg.getDestination().i, msg.getDestination().j, color);\n gameService.setPieceColor(msg.getOrigin().i, msg.getOrigin().j, null);\n\n gameService.repaintPanel();\n System.out.println(\"Board repainted.\");\n }\n\n checkIfMyTurn(msg.isCurrPlayer());\n }", "public void paint(Graphics g){\r\n super.paintComponent(g);\r\n for(int row = 0; row < 8; row++) {\r\n for (int col = 0; col < 8; col++) {\r\n if((row % 2 == 0 && col % 2 == 0) || (row % 2 != 0 && col % 2 != 0)){\r\n g.setColor(Color.gray.brighter()); //pale yellow\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n else{\r\n g.setColor(Color.gray.darker()); //dark brown\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n if ((currentPlayer.getColor()==checks[row][col])) {\r\n g.setColor(Color.darkGray.darker());\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.nextMove[row][col] == 1) {\r\n g.setColor(Color.getHSBColor(98,70,43));\r\n g.fillRect(col * tileSize, row * tileSize, tileSize, tileSize);\r\n }\r\n if (this.checks[row][col] != 0) {\r\n if (this.checks[row][col] == WHITE) {\r\n drawPiece(row, col, g, Color.yellow.brighter());\r\n if (row == 7)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n else{\r\n drawPiece(row, col, g, Color.black);\r\n if (row == 0)\r\n g.drawImage(crownImage, (col * tileSize)+6, (row * tileSize) + 6, tileSize - 12, tileSize - 12, null);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if(isOver && isGame){\r\n gameOverDisplay(g);\r\n }\r\n }", "@Override\n\t\tpublic void update(Graphics g) {\n\t\t\t\n\t\t\tImage pieceImg = null;\n\t\t\tif (board.square(row,column).isOccupied()) {\n\t\t\t\tint index = board.square(row,column).piece().imageIndex();\n\t\t\t\tpieceImg = pieceImages[index];\n\t\t\t}\n\t\t\tif (lightSquare)\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, lightSquareImg))); }\n\t\t\telse\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, darkSquareImg))); }\n\t\t}", "@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }", "private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }", "public void setDataColor(Color c)\r\n/* 48: */ {\r\n/* 49: 36 */ this.ballColor = c;repaint();\r\n/* 50: */ }", "private void update() {\n // Set for each cell\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n cell.setBackground(BKGD_DARK_GRAY);\n cell.setForeground(Color.WHITE);\n cell.setFont(new Font(\"Halvetica Neue\", Font.PLAIN, 36));\n cell.setBorder(new LineBorder(Color.BLACK, 0));\n cell.setHorizontalAlignment(JTextField.CENTER);\n cell.setCaretColor(new Color(32, 44, 53));\n cell.setDragEnabled(false);\n cell.setTransferHandler(null);\n\n // Add subgrid separators\n CellPosition pos = cell.getPosition();\n if (pos.getColumn() == 2 || pos.getColumn() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 2, new Color(146, 208, 80)));\n } else if (pos.getRow() == 2 || pos.getRow() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(146, 208, 80)));\n }\n if ((pos.getColumn() == 2 && pos.getRow() == 2) || (pos.getColumn() == 5 && pos.getRow() == 5)\n || (pos.getColumn() == 2 && pos.getRow() == 5) || (pos.getColumn() == 5 && pos.getRow() == 2)) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 2, new Color(146, 208, 80)));\n }\n\n // Validate User's Cell Input + Mouse Listeners\n cell.removeKeyListener(cellKeyListener);\n cell.removeMouseListener(cellMouseListener);\n if (cell.isLocked()) {\n cell.setEditable(false);\n cell.setHighlighter(null);\n } else {\n cell.setBackground(BKGD_LIGHT_GRAY);\n cell.addMouseListener(cellMouseListener);\n cell.addKeyListener(cellKeyListener);\n }\n if (cell.isEmpty()) {\n cell.setText(\"\");\n } else {\n cell.setText(String.valueOf(cell.getUserValue()));\n }\n\n // Adds cell to the view's grid\n this.view.getGamePanel().getGrid().add(cell);\n }\n\n }", "private void setCell(int x, int y, int newValue) {\n hiddenGrid[x][y] = newValue;\n }", "private void fixColorState() {\n\t\tfinal Spatial lines = this.getChild(LINES_NAME);\n \tTealWorldManager.getWorldManager().addRenderUpdater(new RenderUpdater(){\n \t\tpublic void update(Object arg) { \t\t\t\n \t\t\tboolean coloredVertices = (Boolean) arg;\n \t\t\tMaterialState ms = (MaterialState) lines.getRenderState(RenderState.StateType.Material);\n \t\t\tif(ms == null) {\n \t\t\t\tms = DisplaySystem.getDisplaySystem().getRenderer().createMaterialState();\n \t\t\t\tms.setColorMaterial(ColorMaterial.AmbientAndDiffuse);\n \t\t\t\tlines.setRenderState(ms);\n \t\t\t}\n \t\t\tms.setEnabled(coloredVertices);\n \t\t};\n \t}, this.coloredVertices);\n\t}", "public void refreshBoard(final ShipType ships[][], final ShotField shots[][]) {\n shotsBoard = shots;\n shipsBoard = ships;\n repaint();\n }", "private void yellow(){\n\t\tthis.arretes_fY();\n\t\tthis.coins_fY();\n\t\tthis.coins_a1Y();\n\t\tthis.coins_a2Y();\n\t\tthis.aretes_aY();\n\t\tthis.cube[49] = \"Y\";\n\t}", "public void update(GameModel model) {\n assert model.getRowCount() == this.rowCount && model.getColumnCount() == this.columnCount;\n //\n for (int row = 0; row < this.rowCount; row++){\n for (int column = 0; column < this.columnCount; column++){\n CellValue value = model.getCellValue(row, column);\n if (value == CellValue.WALL) {\n this.cellViews[row][column].setImage(this.wallImage);\n }\n else if (value == CellValue.PISTOLA) {\n this.cellViews[row][column].setImage(this.pistolaImage);\n }\n else if (value == CellValue.ALIENEGG) {\n this.cellViews[row][column].setImage(this.alienEggImage);\n }\n else {\n this.cellViews[row][column].setImage(null);\n }\n //verifique en qué dirección va astronauta y muestre la imagen correspondiente\n if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && (GameModel.getLastDirection() == GameModel.Direction.RIGHT || GameModel.getLastDirection() == GameModel.Direction.NONE)) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.LEFT) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.UP) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.DOWN) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n //hacer que los OVNIS \"parpadeen\" hacia el final de ovniEatingMode (mostrar imágenes OVNI regulares en actualizaciones alternas del contador)\n if (GameModel.isOvniEatingMode() && (Controller.getovniEatingModeCounter() == 6 ||Controller.getovniEatingModeCounter() == 4 || Controller.getovniEatingModeCounter() == 2)) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n //mostrar OVNIS azules en ovniEatingMode\n else if (GameModel.isOvniEatingMode()) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n }\n //display imágenes OVNIS regulares de lo contrario\n else {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n }\n }\n }", "private void paintTable()\r\n\t{\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void greyOutCell(int x, int y) {\n\t\tsquares[x][y].setBackground(Color.LIGHT_GRAY);\n\t}", "private void updateColor() {\n int redShift = red << 16; // red: 0xRR0000 <- 0xRR\n int greenShift = green << 8; // red: 0xGG00 <- 0xGG\n int blueShift = blue; // blue: 0xBB <- 0xBB\n int alphaShift = 0xff << 24; // alpha 0xff000000 <- 0xff // we don't want our color to be transparent.\n int color = alphaShift | redShift | greenShift | blueShift;\n viewColor.setBackgroundColor(color);\n }", "private void updateBoard(int column, int turn) {\n rowHeight = cfBoard.rowHeight(column);\n int color = cfBoard.getColor(rowHeight-1, column-1);\n switch(column) {\n case 1:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c1.setBackground(Color.BLACK);\n break;\n case 2:\n r1c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c1.setBackground(Color.BLACK);\n break;\n case 2:\n r2c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c1.setBackground(Color.BLACK);\n break;\n case 2:\n r3c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c1.setBackground(Color.BLACK);\n break;\n case 2:\n r4c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c1.setBackground(Color.BLACK);\n break;\n case 2:\n r5c1.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c1.setBackground(Color.BLACK);\n break;\n case 2:\n r6c1.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 2:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c2.setBackground(Color.BLACK);\n break;\n case 2:\n r1c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c2.setBackground(Color.BLACK);\n break;\n case 2:\n r2c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c2.setBackground(Color.BLACK);\n break;\n case 2:\n r3c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c2.setBackground(Color.BLACK);\n break;\n case 2:\n r4c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c2.setBackground(Color.BLACK);\n break;\n case 2:\n r5c2.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c2.setBackground(Color.BLACK);\n break;\n case 2:\n r6c2.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 3:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c3.setBackground(Color.BLACK);\n break;\n case 2:\n r1c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c3.setBackground(Color.BLACK);\n break;\n case 2:\n r2c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c3.setBackground(Color.BLACK);\n break;\n case 2:\n r3c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c3.setBackground(Color.BLACK);\n break;\n case 2:\n r4c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c3.setBackground(Color.BLACK);\n break;\n case 2:\n r5c3.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c3.setBackground(Color.BLACK);\n break;\n case 2:\n r6c3.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 4:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c4.setBackground(Color.BLACK);\n break;\n case 2:\n r1c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c4.setBackground(Color.BLACK);\n break;\n case 2:\n r2c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c4.setBackground(Color.BLACK);\n break;\n case 2:\n r3c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c4.setBackground(Color.BLACK);\n break;\n case 2:\n r4c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c4.setBackground(Color.BLACK);\n break;\n case 2:\n r5c4.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c4.setBackground(Color.BLACK);\n break;\n case 2:\n r6c4.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 5:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c5.setBackground(Color.BLACK);\n break;\n case 2:\n r1c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c5.setBackground(Color.BLACK);\n break;\n case 2:\n r2c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c5.setBackground(Color.BLACK);\n break;\n case 2:\n r3c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c5.setBackground(Color.BLACK);\n break;\n case 2:\n r4c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c5.setBackground(Color.BLACK);\n break;\n case 2:\n r5c5.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c5.setBackground(Color.BLACK);\n break;\n case 2:\n r6c5.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 6:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c6.setBackground(Color.BLACK);\n break;\n case 2:\n r1c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c6.setBackground(Color.BLACK);\n break;\n case 2:\n r2c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c6.setBackground(Color.BLACK);\n break;\n case 2:\n r3c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c6.setBackground(Color.BLACK);\n break;\n case 2:\n r4c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c6.setBackground(Color.BLACK);\n break;\n case 2:\n r5c6.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c6.setBackground(Color.BLACK);\n break;\n case 2:\n r6c6.setBackground(Color.RED);\n break;\n }\n }\n break;\n case 7:\n if(rowHeight == 1) {\n switch(color) {\n case 1:\n r1c7.setBackground(Color.BLACK);\n break;\n case 2:\n r1c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 2) {\n switch(color) {\n case 1:\n r2c7.setBackground(Color.BLACK);\n break;\n case 2:\n r2c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 3) {\n switch(color) {\n case 1:\n r3c7.setBackground(Color.BLACK);\n break;\n case 2:\n r3c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 4) {\n switch(color) {\n case 1:\n r4c7.setBackground(Color.BLACK);\n break;\n case 2:\n r4c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 5) {\n switch(color) {\n case 1:\n r5c7.setBackground(Color.BLACK);\n break;\n case 2:\n r5c7.setBackground(Color.RED);\n break;\n }\n }\n if(rowHeight == 6) {\n switch(color) {\n case 1:\n r6c7.setBackground(Color.BLACK);\n break;\n case 2:\n r6c7.setBackground(Color.RED);\n break;\n }\n }\n break;\n }\n \n if (turn%2 ==1) {\n turnButton.setBackground(Color.RED);\n jTextField1.setText(\"It's Red's turn.\");\n }\n if (turn%2 ==0) {\n turnButton.setBackground(Color.BLACK);\n jTextField1.setText(\"It's Black's turn.\");\n }\n \n }", "public void changeBoard(int columnnumber, int whoseTurn, Color color1, Color color2){ //changes the colour of the circles on the board\r\n \r\n if(whoseTurn==1){ \r\n if(erase>0){ //this if statement runs if a checker needs to be erased; (because AI was checking future game states)\r\n for(int i = 0; i<=5; i++){ //going from top to bottom to change the last entered checker\r\n if(arrayCircles[i][erase-1].getColor()==color1){\r\n arrayCircles[i][erase-1].setColor(Color.white); //removing the checker that was previously placed\r\n repaint();\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n for(int i = 5; i>=0; i--){\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){ //starting from row 5 (the bottom one) see if any of those within the column is null\r\n arrayCircles[i][columnnumber-1].setColor(color1); //if so, set that value to the colour of the player who inputted that columnnumber\r\n repaint(); //repainting the board so that it updates and is visible to viewers\r\n break; //break once the colour has been changed and a move has been made\r\n }\r\n }\r\n }\r\n }\r\n \r\n else if(whoseTurn==2){\r\n for(int i = 5; i>=0; i--){\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){ //if there is an open space, set its colour to the desired colour \r\n arrayCircles[i][columnnumber-1].setColor(color2);\r\n repaint();\r\n break;\r\n }\r\n }\r\n }\r\n \r\n else if(whoseTurn==3||whoseTurn==4){ //either the easyAI or the hardAI\r\n \r\n \r\n if(erase>0){ //this if statement erases the last placed coloured checker\r\n for(int i = 0; i<=5; i++){ //going from top to bottom to change the last entered checker to white\r\n if(arrayCircles[i][erase-1].getColor()==Color.magenta){\r\n arrayCircles[i][erase-1].setColor(Color.white); //sets it back to white\r\n repaint(); //repaints and breaks\r\n break;\r\n }\r\n }\r\n }\r\n else{\r\n for(int i = 5; i>=0; i--){ //setting the colour of the column to magenta (for the AI)\r\n if(arrayCircles[i][columnnumber-1].getColor()==Color.white){\r\n arrayCircles[i][columnnumber-1].setColor(color2);\r\n repaint();\r\n break;\r\n }\r\n }\r\n } \r\n }\r\n }", "public void updateBoard() {\n for(SnakePart s : snakePartList) {\n board[s.getSnakePartRowsOld()][s.getSnakePartCollsOld()] = ' ';\n board[s.getSnakePartRowsNew()][s.getSnakePartCollsNew()] = 'S';\n }\n \n for (SnakeEnemyPart e : snakeEnemyPartList) {\n board[e.getSnakeEnemyPartRowsOld()][e.getSnakeEnemyPartCollsOld()] = ' ';\n board[e.getSnakeEnemyPartRowsNew()][e.getSnakeEnemyPartCollsNew()] = 'E';\n }\n }", "protected abstract void updateShapeColor(Color color);", "public void update()\r\n {\r\n try\r\n {\r\n Thread.sleep(DELAY);\r\n }\r\n catch (InterruptedException delayException)\r\n {\r\n System.out.println(\"Uh-oh, unexpected exception occured\");\r\n System.out.println(\"This is probably the result of a unruly delay\");\r\n System.out.println(delayException);\r\n } // end of catch (InterruptedException delayException)\r\n\r\n //checkCellStatus(); \r\n\r\n checkCellStatus();\r\n \r\n System.out.print(\"\\f\");\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 if (cellGrid[columns][rows].isToBeAlive())\r\n {\r\n cellGrid[columns][rows].setAlive(true);\r\n }\r\n else\r\n {\r\n cellGrid[columns][rows].setAlive(false);\r\n } // end of if (cellGrid[columns][rows].isToBeAlive())\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n System.out.print(\"\\n\");\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "private void drawGame() {\r\n //For each each cell of the grid if there is a snake draw green,\r\n //an apple draw red or nothing draw white.\r\n for (int x = 0; x < gridWidth; x++) {\r\n for (int y = 0; y < gridHeight; y++) {\r\n if (isSnakeAt(new Coordinates(x, y))) {\r\n drawCell(x, y, Color.GREEN);\r\n } else if (apple.equals(new Coordinates(x, y))) {\r\n drawCell(x, y, Color.RED);\r\n } else {\r\n drawCell(x, y, Color.WHITE);\r\n }\r\n }\r\n }\r\n //Draw a grid around the game grid\r\n gc.strokeRect(0, 0, gridWidth * cellSize, gridHeight * cellSize); \r\n }", "private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }", "public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"yellow\");\n window.changeColor(\"black\");\n roof.changeColor(\"red\");\n sun.changeColor(\"yellow\");\n }\n }", "@Override\n\t\tpublic void transform()\n\t\t{\n\t\t\tif(!isRed)\n\t\t\t{\n\t\t\t\tcells[0].setCol(cells[0].getCol()+1);\n\t\t\t\tcells[1].setCol(cells[1].getCol()+1);\n\t\t\t\tcells[2].setCol(cells[2].getCol()-1);\n\t\t\t\tcells[3].setCol(cells[3].getCol()-1);\n\t\t\t\t//Changes colors to red\n\t\t\t\tfor(int i = 0; i < cells.length; i ++)\n\t\t\t\t{\n\t\t\t\t\tBlock temp = cells[i].getBlock();\n\t\t\t\t\tcells[i].setBlock(new Block(Color.RED,temp.isMagic()));\n\t\t\t\t}\n\t\t\t\tisRed = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcells[0].setCol(cells[0].getCol()-1);\n\t\t\t\tcells[1].setCol(cells[1].getCol()-1);\n\t\t\t\tcells[2].setCol(cells[2].getCol()+1);\n\t\t\t\tcells[3].setCol(cells[3].getCol()+1);\n\t\t\t\t//changes colors to green\n\t\t\t\tfor(int i = 0; i < cells.length; i ++)\n\t\t\t\t{\n\t\t\t\t\tBlock temp = cells[i].getBlock();\n\t\t\t\t\tcells[i].setBlock(new Block(Color.GREEN,temp.isMagic()));\n\t\t\t\t}\n\t\t\t\tisRed = false;\n\t\t\t}\n\t\t\t\n\t\t}", "public void toggle() {\n if (currentPlayer.equals(\"red\")) {\n currentColor = BLUE_COLOUR;\n currentPlayer = \"blue\";\n } else {\n currentColor = RED_COLOUR;\n currentPlayer = \"red\";\n }\n //change color of grid\n changeColor();\n }", "void setGreen(int x, int y, int value);", "private void renderGoalCell(Graphics g, GridLocation goalCell, GridLocation gridPosition){\n g.setColor(Color.YELLOW);\n g.fillRect(gridPosition.getX() + goalCell.getX()*CELL_SIZE, gridPosition.getY() + goalCell.getY()*CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }", "public void refreshDisplay(){\r\n for (int i = 0; i < 6; i++) {\r\n for (int j = 0; j < 7; j++) {\r\n switch (boardRep[i][j]) { //maybe not best style to have default red but whatever (change board\r\n case 0:\r\n boardSquares[i][j].setBackground(Color.WHITE);\r\n break;\r\n case 1:\r\n boardSquares[i][j].setBackground(Color.BLACK);\r\n break;\r\n default:\r\n boardSquares[i][j].setBackground(Color.RED);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n if (blackToPlay){ //change to move squares\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.BLACK);\r\n }\r\n } else{\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.RED);\r\n }\r\n }\r\n \r\n \r\n }", "private void changeStatus(int depth, int row, int col ,boolean[][][] VisitedCells){\n VisitedCells[depth][row][col] = true;\n }", "public void setAllExplored() {\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col].setIsExplored(true);\n }\n }\n }", "public void drawCell(int x, int y) {\n \n //Sets cell to occupied\n gameBoard[x][y] = 1;\n }", "private void setTable(){\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }", "void changeCellAt(int col, int row, String sexp);", "@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }", "public void setShip(int row, int column, boolean value) {\n\t\tthis.grid[row][column].setShip(value);\n\t}", "void setBlue(int x, int y, int value);", "public void onUpdateColor() {\n getVertexBufferObject().onUpdateColor(this);\n }", "public void setColor()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }", "public void setColor()\n {\n if (wall != null) // only if it's painted already...\n {\n wall.changeColor(\"red\");\n window.changeColor(\"black\");\n roof.changeColor(\"green\");\n sun.changeColor(\"yellow\");\n }\n }", "static void changeRed( Tile x ) {\n tiles.get(start).setBackground(white);\n x.setBackground(red);\n start = tiles.indexOf(x);\n }", "public void setAreaColor(Color c)\r\n/* 53: */ {\r\n/* 54: 37 */ this.areaColor = c;repaint();\r\n/* 55: */ }", "public void paint () {\n\t\tPaint.clear();\n\t\t\n\t\tPaint.setColor(Color.WHITE);\n\t\tPaint.fillRect(0,0,numcols_ * cellsize_,numrows_ * cellsize_);\n\t\tPaint.setColor(Color.GRAY);\n\t\tPaint.drawRect(0,0,numcols_ * cellsize_ - 1,numrows_ * cellsize_ - 1);\n\n\t\tfor ( int row = 0 ; row < numrows_ ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < numcols_ ; col++ ) {\n\t\t\t\tint x = col * cellsize_;\n\t\t\t\tint y = row * cellsize_;\n\n\t\t\t\tThing thing = at(row,col);\n\t\t\t\tif ( thing != null ) {\n\t\t\t\t\tthing.paint(x,y,cellsize_,cellsize_);\n\t\t\t\t}\n\t\t\t\tPaint.setColor(Color.GRAY);\n\t\t\t\tPaint.drawRect(x,y,cellsize_,cellsize_);\n\t\t\t}\n\t\t}\n\n\t}", "static void paintFill(Pixel[][] displayScreen, int x, int y, String originalColor, String newColor)\n {\n if (x<0 || y<0 || x >= displayScreen[0].length || y >= displayScreen.length) {return;}\n\n // If current cell is of a different color, we've reached a boundary.\n // TODO: why is this not [x][y] ?\n if (displayScreen[x][y].getColor() != originalColor) {return;}\n\n // OK, update color of current cell\n if (displayScreen[x][y].getColor() == originalColor)\n {\n displayScreen[x][y].setColor(newColor);\n\n // Pixel on left\n paintFill(displayScreen, x-1, y, originalColor, newColor);\n\n // On right\n paintFill(displayScreen, x+1, y, originalColor, newColor);\n\n // On top and bottom\n paintFill(displayScreen, x, y+1, originalColor, newColor);\n paintFill(displayScreen, x, y-1, originalColor, newColor);\n }\n\n\n }", "public void paint(Graphics g) {\n\n super.paint(g);\n \n //Fill the board with black if 0, red if 1\n for(int x = 0; x < gameBoard.length; x++) {\n for (int y = 0; y < gameBoard[0].length; y++) {\n \n //Draw red\n if (gameBoard[x][y] == 1) {\n\n g.setColor(Color.BLACK);\n g.fillRect(x*24, y*24, 24, 24);\n g.setColor(Color.RED);\n g.fillRect(x*24+1, y*24+1, 22, 22);\n\n //Draw black\n } else {\n\n g.setColor(Color.BLACK);\n g.fillRect(x*24, y*24, 24, 24);\n }\n }\n } \n }", "private void updateAllTiles() {\r\n mEntireBoard.updateDrawableState();\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large].updateDrawableState();\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small].updateDrawableState();\r\n }\r\n }\r\n }", "private void green(){\n\t\tthis.arretes_fG();\n\t\tthis.coins_fG();\n\t\tthis.coins_a1G();\n\t\tthis.coins_a2G();\n\t\tthis.aretes_aG();\n\t\tthis.cube[31] = \"G\";\n\t}", "private void updateGrid() {\n if (intersection != null) {\n colorizeGrid();\n for (int x = 0; x < field.length; x++) {\n for (int y = 0; y < field[0].length; y++) {\n field[x][y].setText(intersection.getLetterCode(x, y));\n }\n }\n }\n }", "public void updateDataCell();", "public void testSetCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.setCell(1, 2, MineSweeperCell.FLAGGED_MINE);\r\n assertBoard(board, \"OOOO\",\r\n \"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\");\r\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}", "public void setTileStatus(int x, int y, TileStatus ts) throws IndexOutOfBoundsException{\n if(x < 0 || y < 0 || x >= grid.length || y >= grid[0].length) {\n throw new IndexOutOfBoundsException(\"Il n'existe pas de tuile à la position (\"+x+\",\"+y+\")\");\n }\n grid[x][y].setStatus(ts);\n }", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n \n Color color;\n ImageIcon image;\n \n switch ( terrain )\n {\n case SAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sand.jpg\")); break;\n case FOREST : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\")); break;\n case WETLAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/forest.jpg\")); break;\n case SCRUB : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\")); break;\n case WATER : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\")); break;\n case BRICK : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick.jpg\")); break;\n default : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/gray.jpg\")); break; \n }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column));\n lblText.setHorizontalTextPosition((int) CENTER_ALIGNMENT);\n lblText.setVerticalTextPosition((int) CENTER_ALIGNMENT);\n \n setVisible(true);\n \n //Kiwifruit\n if( row == 6 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick2.jpg\"));\n }\n \n if( row == 0 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n \n if( row == 7 && column == 0 || row == 7 && column == 7 || row == 6 && column == 6 || row == 8 && column == 3 || row == 9 && column == 3 || row == 9 && column == 4 || row == 9 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassk.jpg\"));\n }\n \n if( row == 2 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n //Trap\n if(\"T\".equals(game.getOccupantStringRepresentation(row, column))){\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/trap.jpg\"));\n lblText.setIcon(image);\n }\n //Food\n //if(game.getOccupantStringRepresentation(row, column) == \"apple\" ) {\n //image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n //}\n if( row == 6 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 5 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassm.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 2 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubs.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 8 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grasso.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n //Predator\n if( row == 2 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 9 && column == 7 ||row == 5 && column == 2 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassp.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 3 && column == 4 || row == 6 && column == 4 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 4 && column == 1) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/waters.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\"));\n }\n }\n //Mystical Creature\n if( row == 7 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brickf.jpg\"));\n }\n \n if( row == 4 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandph.jpg\"));\n }\n \n if( row == 0 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandm.jpg\"));\n }\n \n if( row == 4 && column == 6 || row == 6 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubp.jpg\"));\n }\n \n if( row == 8 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassd.jpg\"));\n }\n \n \n //Hazard\n if( squareExplored && row == 2 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n\n \n if( squareExplored && row == 3 && column == 5 || squareExplored && row == 7 && column == 4 || squareExplored && row == 6 && column == 5 || squareExplored && row == 7 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 1 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 5 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if ( squareVisible && !squareExplored ) \n {\n\n }\n lblText.setIcon(image);\n \n // set border colour according to \n // whether the player is in the grid square or not\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n }\n else\n {\n lblText.setText(\"\");\n lblText.setIcon(null);\n setBorder(normalBorder);\n }\n }", "public void drawCell(Graphics g) {\n if (isVisited()) { // visited cells are white\n setCellColor(g, Color.WHITE);\n }\n if (isSolution()) { // cells that are part of the most optimal solution are yellow\n setCellColor(g, Color.YELLOW);\n }\n\n // draw the walls if there are any\n int col2 = col * CELL_DIMS;\n int row2 = row * CELL_DIMS;\n\n g.setColor(Color.BLACK); // walls are black\n if (walls[0]) // north wall\n g.drawLine(col2, row2, col2 + CELL_DIMS, row2);\n if (walls[1]) // east wall\n g.drawLine(col2 + CELL_DIMS, row2, col2 + CELL_DIMS, row2 + CELL_DIMS);\n if (walls[2]) // south wall\n g.drawLine(col2 + CELL_DIMS, row2 + CELL_DIMS, col2, row2 + CELL_DIMS);\n if (walls[3]) // west wall\n g.drawLine(col2, row2 + CELL_DIMS, col2, row2);\n }", "void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }", "public void renderBoard(){\n for (int k = 0; k < grid.length; k++)\n for (int m = 0; m < grid[k].length; m++)\n grid[k][m] = 0;\n\n // fill the 2D array using information for non-empty tiles\n for (Cell c : game.getNonEmptyTiles())\n grid[c.getRow()][c.getCol()] = c.getValue();\n }", "private void setToBackground(Color color) {\n\t\tfor (Loc l : currentPiece.getLocation()) {\n\t\t\tif (l.isOnBoard()) {\n\t\t\t\tboardTiles[l.row][l.col] = color;\n\t\t\t}\n\t\t}\n\t}", "void setColor(int r, int g, int b);", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(map.getImage(), mapX, mapY, mapWidth, mapHeight, null);\n //draw hexagon\n for (int j = 0; j < BOARD_HEIGHT; j++) {\n for (int i = 0; i < BOARD_WIDTH; i++) {\n gridCell.setCellIndex(i, j);\n if (mapCells[j][i] != 0) {\n gridCell.computeCorners(mCornersX, mCornersY);\n// g.setColor((mapCells[j][i] == L_ON) ? Color.ORANGE : Color.GRAY);\n// g.fillPolygon(mCornersX, mCornersY, NUM_HEX_CORNERS);\n g.drawPolygon(mCornersX, mCornersY, NUM_HEX_CORNERS);\n }\n }\n }\n }", "public void updateBoard(int[][] board, int piece){\r\n this.board=board;\r\n this.piece=piece;\r\n columns = board.length;\r\n rows = board[0].length;\r\n save = Math.min((size / columns), (size / rows));\r\n this.repaint();\r\n repaint();\r\n }", "private void updateStatus(int row, int col) {\n\t\tCell cell = grid.getGridIndex(row, col);\n\t\tcell.calculateNextState(grid.getNeighbors(row, col));\n\t\tif (cell instanceof Neighbor) {\n\t\t\tNeighbor person = (Neighbor) cell;\n\t\t\tString name = person.getClass().getName();\n\t\t\tif (!cellSizes.containsKey(name)) {\n\t\t\t\tcellSizes.put(name, 0);\n\t\t\t}\n\t\t\tcellSizes.put(name, cellSizes.get(name) + 1);\n\t\t\tif (!person.Satisfied())\n\t\t\t\tupsetNeighbors.add(person);\n\t\t} else {\n\t\t\tavailableSpaces.add(cell);\n\t\t}\n\t}", "private void updateColorMap() {\n //if (colorMap == null) {\n colorMap = ColorUtil.buildColorMap(colorBar.getCurrentColors(),\n null);\n /* } else {\n colorMap = ColorUtil.updateColorMap(colorBar.getCurrentColors(),\n colorMap);\n }*/\n cmapParams.setColorMap(colorMap);\n cmapParams.setColorMapName(null);\n ((AbstractNcEditor) EditorUtil.getActiveEditor()).refresh();\n }", "private void updateView(Connect4MoveMessage message) {\n\t\tif(message.getColor() == message.YELLOW) {\n\t\t\tSystem.out.println(message.getColor());\n\t\t\tchangeColor(message.getRow(),message.getColumn(),Color.YELLOW);\n\t\t} else if (message.getColor() == message.RED) {\n\t\t\tSystem.out.println(message.getColor());\n\t\t\tchangeColor(message.getRow(),message.getColumn(),Color.RED);\n\t\t}else {\n\t\t\tchangeColor(message.getRow(),message.getColumn(),Color.WHITE);\n\t\t}\n\t\t\n\t}", "public void changeColourSquare(int i) {\n //determines the y-index of the move, set to 0 as a default\n int colourPlace = 0;\n //searches from the top (bottom of the display) down to 0 (the top of the display)\n for (int y = currentBoard.getSizeY() - 1; y >= 0; y--) {\n //saves y + 1 to colourPlace ( + 1 offset is due to using a board where the \n //move at int i was made before this function call) when the piece is 0 and exits the loop\n if (currentBoard.getBoardValue(i, y) == 0) {\n colourPlace = y + 1;\n y = -1;\n }\n }\n\n //determines which colour to use based on the value of turn\n if (turn) {\n squares[i][colourPlace].setBackground(Color.red);\n } else {\n squares[i][colourPlace].setBackground(Color.blue);\n }\n\n }", "public abstract void setCells(int x, int y, int [][] pattern);", "public void updateColoredTileListAfterOrange(){\n\t\tArrayList<Tile> tiles = null;\n\t\tif(Game.getInstance().getTurn().getLastPieceMoved() != null) {\n\t\t\tif(Game.getInstance().getTurn().getLastPieceMoved().getEatingCntr() > 0 || Game.getInstance().getTurn().isLastTileRed()) {\n\t\t\t\ttiles = Game.getInstance().getTurn().getLastPieceMoved().getPossibleMoves(Game.getInstance().getCurrentPlayerColor());\n\t\t\t}\n\t\t}else {\n\t\t\ttiles = Board.getInstance().getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\n\t\t}\n\n\t\tArrayList<Tile> coloredTilesToRemove=new ArrayList<Tile>();\t\t\n\t\tfor(Tile t:this.coloredTilesList) {\n\t\t\tif(tiles.contains(t)) {\n\n\t\t\t\tcoloredTilesToRemove.add(t);\n\t\t\t}\n\n\t\t}\n\n\t\tthis.coloredTilesList.removeAll(coloredTilesToRemove);\n\t\tthis.coloredTilesList.addAll(this.orangeTiles);\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\t}", "private void setOnBoard(Ship currentShip) {\n\t\tchar letter;\n\t\tboolean validInput = false;\n\t\tint letterValue;\n\t\tint num;\n\t\tString coord;\n\t\tString orient;\n//\t\tString[][] backup = radar.clone();\n\t\tString[][] loopBackup = new String[10][10];\n\t\t//System.out.println(\"loop backup: \" + loopBackup.toString());\n\t\t\n\t\twhile(!validInput) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(this);\n\t\t\t\tSystem.out.println(\"Where would you like the \" + currentShip.getShipType() + \" of size \" + currentShip.getSize() + \"?\");\n\t\t\t\tSystem.out.println(\"Give a coordinate. Ex: A2, F6, d9, etc...\");\n\t\t\t\tSystem.out.println(\">\");\n\t\t\t\tcoord = input.nextLine();\n\t\t\t\tSystem.out.println(\"Would you like to set it vertical (V) or horizontal (H)?\");\n\t\t\t\tSystem.out.println(\"(input V or H for the respective orientation, lowercase is fine)\");\n\t\t\t\tSystem.out.println(\">\");\n\t\t\t\t\n\t\t\t\twhile(!validInput) {\n\t\t\t\t\torient = input.nextLine();\n\t\t\t\t\t\n\t\t\t\t\tletter = coord.toUpperCase().charAt(0);\n\t\t\t\t\tletterValue = (int) letter;\n\t\t\t\t\tletterValue -= 65;\n\t\t\t\t\tnum = Integer.parseInt(coord.substring(1));\n\t\t\t\t\tnum -= 1;\n\t\t\t\t\tString tempCoor;\n\t\t\t\t\tloopBackup = backup(radar);\n\t\t\t\t\t\n\t\t\t\t\tif(orient.toUpperCase().equals(\"H\")) {\n\t\t\t\t\t\tfor(int i = 0; i <= currentShip.getSize() - 1; i++) {\n\t\t\t\t\t\t\tif(radar[letterValue][num].equals(\"X \"))\n\t\t\t\t\t\t\t\tradar[100][0].toString();\n\t\t\t\t\t\t\ttempCoor = radar[letterValue][num];\n\t\t\t\t\t\t\tcurrentShip.addCoordinate(tempCoor);\n\t\t\t\t\t\t\tradar[letterValue][num] = \"X \";\n\n\t\t\t\t\t\t\tnum++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalidInput = true;\n\t\t\t\t\t\t//loopBackup = radar.clone();\n\t\t\t\t\t} else if(orient.toUpperCase().equals(\"V\")){\n\t\t\t\t\t\tfor(int i = 0; i <= currentShip.getSize() - 1; i++) {\n\t\t\t\t\t\t\tif(radar[letterValue][num].equals(\"X \"))\n\t\t\t\t\t\t\t\tradar[100][0].toString();\n\t\t\t\t\t\t\ttempCoor = radar[letterValue][num];\n\t\t\t\t\t\t\tcurrentShip.addCoordinate(tempCoor);\n\t\t\t\t\t\t\tradar[letterValue][num] = \"X \";\n\n\t\t\t\t\t\t\tletterValue++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalidInput = true;\n\t\t\t\t\t\t//loopBackup = radar.clone();\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} catch(Exception e) {\n\t\t\t\tSystem.out.println(\"Ship is out of bounds. Try again.\");\n\t\t\t\tcurrentShip.getCoordinates().clear();\n\t\t\t\tradar = backup(loopBackup);\n\t\t\t}\n\t\t}\n\n\t\t\n\t}", "public void update(Color col){\n\t\tfloat grayScale = ((float)(col.getRed() * 0.30 / 255 + col.getGreen() * 0.59 / 255 + col.getBlue() * 0.11 / 255));\t\n\t\tcolor.setBackground(col);\n\t\tgray.setBackground(new Color(grayScale, grayScale, grayScale));\n\t}" ]
[ "0.72326124", "0.6808804", "0.66662645", "0.65336514", "0.65201265", "0.63840264", "0.6277593", "0.6200551", "0.61883897", "0.6183847", "0.6182289", "0.61347395", "0.612801", "0.60724515", "0.60476834", "0.6042611", "0.5949561", "0.5947791", "0.5932593", "0.59262437", "0.59067804", "0.5893279", "0.5886597", "0.58854246", "0.5863095", "0.5862749", "0.58376503", "0.58344513", "0.5819629", "0.5803431", "0.57904536", "0.57600176", "0.5752777", "0.5749888", "0.57421106", "0.5730893", "0.5725717", "0.57037026", "0.56989264", "0.5691475", "0.5682487", "0.56824696", "0.5671503", "0.56692797", "0.56685984", "0.5657242", "0.5655305", "0.5638929", "0.5637765", "0.5637736", "0.56327134", "0.56312966", "0.56185067", "0.561404", "0.561267", "0.5603006", "0.559684", "0.55956703", "0.55902207", "0.5588839", "0.5583654", "0.5580305", "0.5577848", "0.5577253", "0.5574961", "0.55748826", "0.5569824", "0.5566446", "0.5558166", "0.5554246", "0.55432075", "0.55299175", "0.5528617", "0.55267745", "0.55243534", "0.5522568", "0.5522549", "0.5497851", "0.5488403", "0.54837453", "0.54804355", "0.5473675", "0.54683197", "0.5450281", "0.5438884", "0.5436976", "0.543252", "0.542748", "0.54236156", "0.5420378", "0.54181707", "0.5416812", "0.5415308", "0.54110235", "0.5409688", "0.5404825", "0.5400254", "0.5399071", "0.5388986", "0.5388327", "0.53798914" ]
0.0
-1
Package names that have classes in them.
@Model public Collection<String> choices2Act() { return applicationFeatureRepository.packageNamesContainingClasses(ApplicationMemberType.PROPERTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<String> getClassesInPackage(String packageUniqueName) {\n List<String> result = new ArrayList<String>();\n if (theModel.packages.containsKey(packageUniqueName)){\n \tTreeSet<String> children = theModel.packages.get(packageUniqueName).children;\n \tif ((children != null)){\n \t\tfor (String uniqueName : children){\n \t\t\tFamixClass foundClass = theModel.classes.get(uniqueName);\n \t\t\tif (foundClass != null){\n \t\t\t\tresult.add(uniqueName);\n \t\t\t\tif (foundClass.hasInnerClasses){\n \t\t\t\t\tresult.addAll(foundClass.children);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }\n return result;\n }", "private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 656 */ String str = param2Class.getName();\n/* 657 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }", "private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 654 */ String str = param2Class.getName();\n/* 655 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }", "Set<String> classNames(String packageName, String except) throws Exception;", "Set<Class<?>> getClassSet(String packageName);", "boolean hasClassname();", "Set<String> classNames(String packageName, String except, String except2) throws Exception;", "public static List<String> getClassNamesFromPackage(String argPackageName,\r\n\t\t\tboolean argIterateInnerClasses) {\r\n\t\tList<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();\r\n\t\tclassLoadersList.add(ClasspathHelper.contextClassLoader());\r\n\t\tclassLoadersList.add(ClasspathHelper.staticClassLoader());\r\n\t\tConfigurationBuilder configurationBuilder = null;\r\n\t\tif (argIterateInnerClasses) {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forClassLoader(classLoadersList\r\n\t\t\t\t\t\t\t\t\t.toArray(new ClassLoader[0])));\r\n\t\t} else {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forPackage(argPackageName,\r\n\t\t\t\t\t\t\t\t\tnew ClassLoader[0]));\r\n\t\t}\r\n\t\tReflections reflections = new Reflections(configurationBuilder);\r\n\t\tSet<Class<? extends Object>> classes = reflections\r\n\t\t\t\t.getSubTypesOf(Object.class);\r\n\t\tif (Precondition.checkNotEmpty(classes)) {\r\n\t\t\tList<String> simpleClassNamesList = new ArrayList<String>();\r\n\t\t\tIterator<Class<? extends Object>> s = classes.iterator();\r\n\t\t\tlogger.info(\"Loading Class Names: \");\r\n\t\t\twhile (s.hasNext()) {\r\n\t\t\t\tClass<? extends Object> st = s.next();\r\n\t\t\t\tif (!st.isInterface()) {\r\n\t\t\t\t\tString simpleClassName = st.getName();\r\n\t\t\t\t\tsimpleClassNamesList.add(simpleClassName);\r\n\t\t\t\t\tlogger.info(\"Class Names: \" + simpleClassName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn simpleClassNamesList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String removeJavaPackageName(String className) {\n int idx = className.lastIndexOf('.');\n if (idx >= 0) {\n return className.substring(idx + 1);\n } else {\n return className;\n }\n }", "public static String getPackageName(String longClassName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longClassName, \".\");\r\n\t\tfinal StringBuilder sb = new StringBuilder();\r\n\t\tString last = longClassName;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\tlast = tk.nextToken();\r\n\t\t\tif (tk.hasMoreTokens()) {\r\n\t\t\t\tsb.append(last);\r\n\t\t\t\tsb.append(\".\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn sb.toString().substring(0, sb.toString().length() - 1);\r\n\t}", "public abstract List<String> scanAllClassNames();", "private void checkClassName(String className) throws ClassNotFoundException {\n StringTokenizer tokenizer = new StringTokenizer(className, \".\");\n boolean first = true;\n while (tokenizer.hasMoreTokens()) {\n String token = tokenizer.nextToken();\n // Each dot-separated piece must be a valid identifier\n // and the first token can also be \"*\". (Note that\n // numeric class ids are not permitted. They must\n // match a loaded class.)\n if (!Utils.isJavaIdentifier(token) && !(first && token.equals(\"*\"))) {\n throw new ClassNotFoundException();\n }\n first = false;\n }\n }", "public void testClassName() {\n\t\tClassName name = this.compiler.createClassName(\"test.Example\");\n\t\tassertEquals(\"Incorrect package\", \"generated.officefloor.test\", name.getPackageName());\n\t\tassertTrue(\"Incorrect class\", name.getClassName().startsWith(\"Example\"));\n\t\tassertEquals(\"Incorrect qualified name\", name.getPackageName() + \".\" + name.getClassName(), name.getName());\n\t}", "public static String getPackageName(Class<?> c) {\n\t\tString fullyQualifiedName = c.getName();\n\t\tint lastDot = fullyQualifiedName.lastIndexOf('.');\n\t\tif (lastDot == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn fullyQualifiedName.substring(0, lastDot);\n\t}", "private boolean checkBasePackages(String className){\n\n if (basePackage == null){\n return false;\n }\n else {\n return className.startsWith(basePackage);\n }\n // This block is function support major framework identity.\n // Not support UI now.\n // if(className.startsWith(\"sun\")){\n // return true;\n // }\n // else if (className.startsWith(\"java\"))\n // {\n // return true;\n // }\n // else{\n // return false;\n // }\n }", "public static List<Class> getSubClasses(final String packageName) {\r\n\t\tfinal List<Class> listClasses = new ArrayList<>();\r\n\t\tSystem.err.println(\"getSubClasses \" + packageName);\r\n\t\t\r\n\t\t// System.err.println(\"java.class.path : \" +\r\n\t\t// System.getProperty(\"java.class.path\"));\r\n\t\tfinal String javaClassPaths[] = System.getProperty(\"java.class.path\").split(\";\");\r\n\t\tfor (final String s : javaClassPaths) {\r\n\t\t\tif (s.endsWith(\".jar\")) {\r\n\t\t\t\t// processJarFile(s, clazz1);\r\n\t\t\t} else {\r\n\t\t\t\tfinal File dirClasses = new File(s);\r\n\t\t\t\tfinal File dirPackage = new File(dirClasses, packageToPath(packageName));\r\n\t\t\t\tif (dirPackage.exists()) {\r\n\t\t\t\t\tfinal String[] names = dirPackage.list();\r\n\t\t\t\t\tfor (final String name : names) {\r\n\r\n\t\t\t\t\t\tif ((name.indexOf(\"$\") < 0) && (name.indexOf(\".class\") > 0)) {\r\n\t\t\t\t\t\t\tfinal String sName = name.substring(0, name.indexOf(\".\"));\r\n\t\t\t\t\t\t\tfinal String className = packageName + \".\" + sName;\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfinal Class clazz = UtilReflection.class.getClassLoader().loadClass(className);\r\n\t\t\t\t\t\t\t\tlistClasses.add(clazz);\r\n\t\t\t\t\t\t\t} catch (final ClassNotFoundException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"ClassNotFound :\" + e.getMessage());\r\n\t\t\t\t\t\t\t}\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}\r\n\t\t}\r\n\t\treturn listClasses;\r\n\t}", "java.lang.String getPackage();", "public static String getClassNameNoPackage(Class<?> aClass) {\n \t\n String fullClassName = aClass.getName();\n int index = fullClassName.lastIndexOf('.');\n String className = null;\n \n //in this case, there is no package name\n if(index==-1) {\n \treturn fullClassName;\n }\n else {\n className = fullClassName.substring(index+1);\n return className;\n } \n }", "public String findPackageForTest(String testClassName);", "public static Collection<Class> getClassesForPackage(String packageName)\n throws Exception {\n String packagePath = packageName.replace(\".\", \"/\");\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Set<URL> jarUrls = new HashSet<URL>();\n\n while (classLoader != null) {\n if (classLoader instanceof URLClassLoader) {\n for (URL url : ((URLClassLoader) classLoader).getURLs()) {\n if (url.getFile().endsWith(\".jar\")) // may want better way to detect jar files\n {\n jarUrls.add(url);\n } // if\n } // for\n } // if\n\n classLoader = classLoader.getParent();\n } // while\n\n Set<Class> classes = new HashSet<Class>();\n\n for (URL url : jarUrls) {\n JarInputStream stream = new JarInputStream(url.openStream()); // may want better way to open url connections\n JarEntry entry = stream.getNextJarEntry();\n\n while (entry != null) {\n String name = entry.getName();\n\n if (name.endsWith(\".class\") && name.substring(0,\n packagePath.length()).equals(packagePath)) {\n classes.add(Class.forName(name.substring(0,\n name.length() - 6).replace(\"/\", \".\")));\n } // if\n\n entry = stream.getNextJarEntry();\n } // while\n\n stream.close();\n } // for\n\n return classes;\n }", "@Test\n public void testGetClassesInPackage() throws Exception\n {\n\n WarMachine machine = TestHelpers.createWarMachine(WarNames.SERVLET);\n\n Set<String> clist1 = machine.getClassesInPackage(\"com.example.servlet\", false);\n assertEquals(\"number of classes in WEB-INF, non-recursive\", 1, clist1.size());\n assertTrue(\"searching for file in WEB-INF, non-recursive\", clist1.contains(\"com.example.servlet.SomeServlet\"));\n\n Set<String> clist2 = machine.getClassesInPackage(\"net.sf.practicalxml.xpath\", false);\n assertEquals(\"number of classes in JAR, non-recursive\", 13, clist2.size());\n assertTrue(\"searching for classes in JAR, non-recursive\", clist2.contains(\"net.sf.practicalxml.xpath.XPathWrapper\"));\n\n Set<String> clist3 = machine.getClassesInPackage(\"net.sf.practicalxml.xpath\", true);\n assertEquals(\"number of classes in JAR, recursive\", 17, clist3.size());\n assertTrue(\"searching for classes in JAR, recursive\", clist3.contains(\"net.sf.practicalxml.xpath.XPathWrapper\"));\n assertTrue(\"searching for classes in JAR, recursive\", clist3.contains(\"net.sf.practicalxml.xpath.function.Constants\"));\n }", "public static String getPackageName(String className) {\n String packageName = getQualifier(className);\n return packageName != null ? packageName : \"\";\n }", "private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "@SuppressWarnings(\"unchecked\")\n public void loadClasses(String pckgname) throws ClassNotFoundException {\n File directory = null;\n try {\n ClassLoader cld = Thread.currentThread().getContextClassLoader();\n String path = \"/\" + pckgname.replace(\".\", \"/\");\n URL resource = cld.getResource(path);\n if (resource == null) {\n throw new ClassNotFoundException(\"sem classes no package \" + path);\n }\n directory = new File(resource.getFile());\n }\n catch (NullPointerException x) {\n throw new ClassNotFoundException(pckgname + \" (\" + directory + \") package invalido\");\n }\n if (directory.exists()) {\n String[] files = directory.list();\n for (int i = 0; i < files.length; i++) {\n if (files[i].endsWith(\".class\") && !files[i].contains(\"$\")) {\n Class cl = Class.forName(pckgname + '.' + files[i].substring(0, files[i].length() - 6));\n Method methods[] = cl.getDeclaredMethods();\n boolean ok = false;\n for (Method m : methods) {\n if ((m.getReturnType().equals(List.class) || m.getReturnType().isArray()) && m.getParameterTypes().length == 0) {\n ok = true;\n break;\n }\n }\n if (ok) {\n classes.add(cl);\n }\n }\n }\n }\n else {\n throw new ClassNotFoundException(pckgname + \" package invalido\");\n }\n }", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}", "private static Class[] getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes.toArray(new Class[classes.size()]);\n }", "String getClassName(Element e) {\n // e has to be a TypeElement\n TypeElement te = (TypeElement)e;\n String packageName = elementUtils.getPackageOf(te).getQualifiedName().toString();\n String className = te.getQualifiedName().toString();\n if (className.startsWith(packageName + \".\")) {\n String classAndInners = className.substring(packageName.length() + 1);\n className = packageName + \".\" + classAndInners.replace('.', '$');\n }\n return className;\n }", "public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }", "public static List<Class<?>> getClasses( String packageName, String regexFilter ) throws Exception {\n\t\tPattern regex = null;\n\t\tif( regexFilter != null ) {\n\t\t\tregex = Pattern.compile( regexFilter );\n\t\t}\n\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace( '.', '/' );\n\t\tEnumeration<URL> resources = classLoader.getResources( path );\n\n\t\tList<String> dirs = new ArrayList<String>();\n\t\twhile( resources.hasMoreElements() ) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add( resource.getFile() );\n\t\t}\n\n\t\tTreeSet<String> classes = new TreeSet<String>();\n\t\tfor( String directory : dirs ) {\n\t\t\tclasses.addAll( findClasses( directory, packageName, regex ) );\n\t\t}\n\n\t\tArrayList<Class<?>> classList = new ArrayList<Class<?>>();\n\t\tfor( String clazz : classes ) {\n\t\t\tclassList.add( Class.forName( clazz ) );\n\t\t}\n\n\t\treturn classList;\n\t}", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "public abstract String packageName();", "private static Class[] getClasses(String packageName)\n\t\t\tthrows ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread()\n\t\t\t\t.getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes.toArray(new Class[classes.size()]);\n\t}", "private String[] getPackageNames() {\n return mContext.getPackageManager().getPackagesForUid(Binder.getCallingUid());\n }", "public static List<Class<?>>\n getClassListInPackage(String packageName, boolean isRecursion, String postfix) throws IOException, ClassNotFoundException {\n\n LOG.info(\"get Class in package \" + packageName);\n\n List<Class<?>> lct = new ArrayList<>();\n\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n URL url = loader.getResource(packageName.replace(\".\", \"/\"));\n\n if (url != null) {\n String protocol = url.getProtocol();\n if (protocol.equals(\"file\")) {\n lct = getClassNameFromFile(url.getPath(), packageName, isRecursion, postfix);\n } else if (protocol.equals(\"jar\")) {\n JarFile jarFile = ((JarURLConnection) url.openConnection()).getJarFile();\n lct = getClassNameFromJar(jarFile, packageName, isRecursion, postfix);\n }\n }\n\n return lct;\n }", "java.lang.String getClassName();", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName) throws ClassNotFoundException, IOException\n {\n return getClasses(packageName, null);\n }", "private static String packageName(String cn) {\n int index = cn.lastIndexOf('.');\n return (index == -1) ? \"\" : cn.substring(0, index);\n }", "private String fixClassName(String strClassName) {\r\n\t\tstrClassName = strClassName.replace('\\\\', '.');\r\n\t\tstrClassName = strClassName.replace('/', '.');\r\n\t\tstrClassName = strClassName.substring(0, strClassName.length() - 6);\r\n\t\t// remove \".class\"\r\n\t\treturn strClassName;\r\n\t}", "public String getPackageName() {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n if (fq != null) {\n return fq.getPackageName();\n }\n String typeName = getTypeName();\n int lastDot = typeName.lastIndexOf('.');\n return lastDot < 0 ? \"\" : typeName.substring(0, lastDot);\n }", "@Override\r\n\tpublic List<String> getJavaPackages() {\n\t\treturn null;\r\n\t}", "String getClassName();", "String getClassName();", "String getClassName();", "private static String getFQClassName(final String root, final String path) {\r\n\t\t//Remove root from front of path and \".class\" from end of path\r\n\t\tString trimmed = path.substring(path.indexOf(root) + root.length(), path.indexOf(\".class\"));\r\n\t\t\r\n\t\t//Replace backslashes with periods\r\n\t\treturn trimmed.replaceAll(Matcher.quoteReplacement(\"\\\\\"), \".\");\r\n\t}", "protected String getFullyQualifiedClassName(String classname)\n {\n return classname.contains(\".\") ? classname : \"org.apache.cassandra.hadoop.\" + classname;\n }", "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}", "public static Set<String> getSuperClasses(String clazzName, String packagePrefixToStop) throws Exception {\n\n final Set<String> superClasses = new HashSet<String>();\n\n Class<?> clazz = Class.forName(clazzName);\n for (Class<?> sc = clazz.getSuperclass(); sc != null && sc != Object.class && !sc.getName().startsWith(packagePrefixToStop);) {\n superClasses.add(sc.getName());\n sc = sc.getSuperclass();\n }\n\n return superClasses;\n }", "private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }", "Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);", "List<String> getSystemPackages();", "public String getClassName();", "protected void fixClassNames() {\n // Sort the class definitions so that they will appear in\n // ascending order based on the opening brace line. Note that\n // the opening brace line is more accurate in terms of computing\n // the names of inner classes. But we still use the first line\n // of code (beginLine) elsewhere.\n Collections.sort(classLines, new Comparator() {\n @Override\n\t\t\t\tpublic int compare(Object o1, Object o2) {\n ClassDefinition cd1 = (ClassDefinition) o1;\n ClassDefinition cd2 = (ClassDefinition) o2;\n return cd1.getBraceLine() - cd2.getBraceLine();\n }\n });\n\n // We will prepend the outer class names to the inner classes.\n // This has O(n^2) running time, which is not good but it's only\n // done once and the list is likely to be pretty short.\n // Anonymous inner classes fall within the widest containing\n // class, as opposed to the closest fitting inner class.\n\n List newClassNames = new ArrayList();\n int anonymousNum = 1;\n ClassDefinition outtermostClass = null;\n for (int ii = 0; ii < classLines.size(); ii++) {\n ClassDefinition cd = (ClassDefinition) classLines.get(ii);\n // Is this a new outtermost class (begin line after end line\n // of current outtermost class; if none, the answer is yes)?\n if (outtermostClass == null\n || outtermostClass.getEndLine() < cd.getBraceLine()) {\n // Yes, save reference to outtermostClass and reset the\n // anonymous class counter to one.\n outtermostClass = cd;\n anonymousNum = 1;\n }\n\n String classname = cd.getClassName();\n // Is this class an anonymous inner class?\n if (classname == ANONYMOUS_CLASS_NAME) {\n // Yes, give it the name of the outter most class plus\n // the anonymous number value.\n classname = outtermostClass.getClassName() + '$'\n + anonymousNum;\n anonymousNum++;\n } else {\n // Not an inner class; have to prepend the names of all\n // containing classes to this one.\n for (int jj = ii - 1; jj >= 0; jj--) {\n ClassDefinition cc = (ClassDefinition) classLines.get(jj);\n if ((cc.getBraceLine() <= cd.getBraceLine())\n && (cc.getEndLine() >= cd.getEndLine())) {\n classname = cc.getClassName() + '$' + classname;\n }\n }\n }\n\n // Append to another list so as not to pollute the original.\n newClassNames.add(classname);\n }\n\n boolean hasPackage = packageName != null && packageName.length() > 0;\n for (int ii = classLines.size() - 1; ii >= 0; ii--) {\n ClassDefinition cd = (ClassDefinition) classLines.get(ii);\n String newname = (String) newClassNames.get(ii);\n if (hasPackage) {\n // Add the package name to the front of the class names.\n cd.setClassName(packageName + '.' + newname);\n } else {\n cd.setClassName(newname);\n }\n }\n }", "private String resolveConstructor(String fullPackageName, String className) {\n\t\tif(\"java.util\".equals(fullPackageName) && \"ArrayList\".equals(className)) {\n\t\t\treturn \"Array\";\n\t\t} else if(\"java.util\".equals(fullPackageName) && \"HashMap\".equals(className)) {\n\t\t\treturn \"Map\";\n\t\t} else {\n\t\t\treturn className;\n\t\t}\n\t}", "private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "public boolean loadAdditionalPackages( String canonicalNameClassOrPkg) throws Exception;", "public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class<?>> classes = new ArrayList<Class<?>>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "public String getClazzName();", "String getImportedNamespace();", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "public void makePackageClassesHtmls(SizeBreakdown breakdown)\n throws IOException {\n for (String packageName : GlobalInformation.packageToClasses.keySet()) {\n \n TreeMap<Float, String> sortedClasses = new TreeMap<Float, String>(\n Collections.reverseOrder());\n float maxSize = 0f;\n \n int maxDepCount = 1;\n \n for (String className : GlobalInformation.packageToClasses.get(packageName)) {\n \n float curSize = 0f;\n if (!breakdown.classToPartialSize.containsKey(className)) {\n // This class not present in this code collection\n } else {\n curSize = breakdown.classToPartialSize.get(className);\n }\n \n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n \n if (curSize != 0f) {\n \n sortedClasses.put(curSize, className);\n if (curSize > maxSize) {\n maxSize = curSize;\n }\n if (depCount > maxDepCount) {\n maxDepCount = depCount;\n }\n }\n }\n \n PrintWriter outFile = new PrintWriter(\n getOutFile(classesInPackageFileName(breakdown, packageName)));\n \n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\"\");\n outFile.println(\"\\\"http://www.w3.org/TR/html4/strict.dtd\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=ISO-8859-1\\\">\");\n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"classLevel.css\\\" media=\\\"screen\\\">\");\n outFile.println(\"<title>Classes in package \\\"\" + packageName\n + \"\\\"</title>\");\n outFile.println(\"</head>\");\n outFile.println(\"<body>\");\n \n outFile.println(\"<center>\");\n outFile.println(\"<h2>Classes in package \\\"\" + packageName + \"\\\"</h2>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n outFile.println(\"</center>\");\n \n outFile.println(\"<div style=\\\"width:90%; height:80%; overflow-y:auto; overflow-x:auto; top: 120px; left:70px; position:absolute; background-color:white\\\"\");\n \n int yOffset = 0;\n for (Float size : sortedClasses.keySet()) {\n \n String className = sortedClasses.get(size);\n \n // TODO(kprobst): switch out the commented/uncommented lines below when\n // showing dependencies\n // float ratio = (size / maxSize) * 45;\n float ratio = (size / maxSize) * 85;\n \n if (ratio < 3) {\n ratio = 3;\n }\n \n // TODO(kprobst): not currently used, but will be for dependencies\n // get the dependency count\n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n float depRatio = ((float) depCount / (float) maxDepCount) * 45f;\n if (depRatio < 3.0) {\n depRatio = 3;\n }\n \n outFile.println(\"<div class=\\\"box\\\" style=\\\"width:\" + ratio\n + \"%; top: \" + yOffset + \"px; left: 60px;\\\">\");\n outFile.println(\"<div id=\\\"lb\\\">\");\n outFile.println(\"<div id=\\\"rb\\\">\");\n outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n outFile.println(\"<div id=\\\"content\\\">\");\n outFile.println(\"</div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div>\");\n \n // TODO(kprobst): not currently used, but will be for dependencies\n /*\n * outFile.println(\"<div class=\\\"box-right\\\" style=\\\"width:\" + depRatio\n * + \"%; top: \" + yOffset + \"px; left: 50%\\\">\");\n * outFile.println(\"<div id=\\\"lb\\\">\");\n * outFile.println(\"<div id=\\\"rb\\\">\");\n * outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n * outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n * outFile.println(\"<div id=\\\"content\\\">\"); outFile.println(\"</div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div>\");\n */\n \n int yOffsetText = yOffset + 8;\n outFile.printf(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:5px;\\\">%.1f</div>\\n\", size);\n if (GlobalInformation.displayDependencies == true) {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\"><a href=\\\"methodDependencies-\"\n + filename(packageName) + \".html#\" + className + \"\\\">\"\n + className + \"</a></div>\");\n } else {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\">\" + className + \"</div>\");\n }\n /*\n * //TODO(kprobst) make this a link String drillDownFileName = className\n * + \"Deps.html\"; outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\"\n * + yOffsetText + \"px; left:50%;\\\"><a href=\\\"\" + drillDownFileName +\n * \"\\\" target=\\\"_top\\\">Dependencies: \" + depCount + \"</a></div>\");\n */\n yOffset = yOffset + 25;\n }\n \n outFile.println(\"</div>\");\n outFile.println(\"</body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }\n }", "private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "@Override\n\tpublic void acceptPackage(String packageName) {\n\t\tignorePackages.removeIf(p -> packageName.startsWith(p + DOT));\n\t}", "private static String getSimpleClassName(String className) {\n\n\n\t\tString[] names = className.split(\"\\\\.\");\n\n\t\tfor (int i = 0; i < names.length; i++) {\n\t\t\tLog.d(\"\", \"names =\" + names[i]);\n\t\t}\n\n\t\treturn names[names.length - 1];\n\t}", "String getClassName() {\n final StringBuilder builder = new StringBuilder();\n final String shortName = getShortName();\n boolean upperCaseNextChar = true;\n for (final char c : shortName.toCharArray()) {\n if (c == '_' || c == '-') {\n upperCaseNextChar = true;\n continue;\n }\n\n if (upperCaseNextChar) {\n builder.append(Character.toUpperCase(c));\n upperCaseNextChar = false;\n } else {\n builder.append(c);\n }\n }\n builder.append(\"Messages\");\n return builder.toString();\n }", "private static List<Class<?>>\n getClassNameFromFile(String path, String packageName, boolean isRecursion, String postfix) {\n List<Class<?>> lct = new ArrayList<>();\n\n try {\n path = java.net.URLDecoder.decode(\n new String(path.getBytes(\"ISO-8859-1\"),\"UTF-8\"),\"UTF-8\");\n\n File file =new File(path);\n File[] files = file.listFiles();\n\n for (File childFile : files) {\n if (childFile.isDirectory()) {\n if (isRecursion) {\n lct.addAll(getClassNameFromFile(childFile.getPath(),\n packageName + \".\" +childFile.getName(), isRecursion, postfix));\n }\n } else {\n String fileName = childFile.getName();\n if (fileName.endsWith(postfix) && !fileName.contains(\"$\")) {\n System.out.println(fileName);\n lct.add(Class.forName(packageName + \".\" + fileName.replace(\".class\", \"\")));\n }\n }\n }\n }catch (UnsupportedEncodingException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return lct;\n }", "public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}", "private boolean startsWithAny(List<String> packagesToTreatAsOpaque, String qualifiedTypeName) {\n for (String packageName : packagesToTreatAsOpaque) {\n if (!Strings.isNullOrEmpty(packageName) && qualifiedTypeName.startsWith(packageName)) {\n return true;\n }\n }\n return false;\n }", "public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes;\n\t}", "private static String getPackage(final String fullName) {\n \t\treturn fullName.substring(0, fullName.lastIndexOf(\".\"));\n \t}", "void removePackagesRecursive(String... packageNames) {\n for (String packageName : packageNames) {\n testCaseClasses.removeAll(testCaseClassesInPackage(packageName));\n }\n }", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "abstract String getClassName();", "private static Collection<EClass> getAllClasses(String model)\n {\n Collection<EClass> result;\n if (Constants.SYSML_EXTENSION.equals(model.toLowerCase()))\n {\n result = new LinkedList<EClass>(SysMLPackage.Literals.REQUIREMENT.getEAllSuperTypes());\n result.add(SysMLPackage.Literals.REQUIREMENT);\n }\n else\n {\n result = new LinkedList<EClass>(UMLPackage.Literals.CLASS.getEAllSuperTypes());\n result.add(UMLPackage.Literals.CLASS);\n }\n\n return result;\n }", "static final void userFormClassNames(MemoryResultsSnapshot snapshot) {\n String[] classNames = snapshot == null ? null : snapshot.getClassNames();\n if (classNames != null) for (int i = 0; i < classNames.length; i++)\n classNames[i] = StringUtils.userFormClassName(classNames[i]);\n }", "protected String getPackageName(Class<?> type) {\n return type.getPackage().getName();\n }", "default HtmlFormatter shortenPackages() {\n return replace(\n PACKAGE_PATTERN,\n \"$2\"\n );\n }", "Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "TypePackage getTypePackage();", "public String getClassName(final String fullClassName) {\r\n\t\tint lastIndexPoint = fullClassName.lastIndexOf(\".\");\r\n\t\tString resultClassName = fullClassName.substring(lastIndexPoint + 1,\r\n\t\t\t\tfullClassName.length());\r\n\t\treturn resultClassName;\r\n\t}", "private static List<Class<?>>\n getClassNameFromJar(JarFile jarFile, String packageName, boolean isRecursion, String postfix) throws ClassNotFoundException {\n LOG.info(\"get Class List from jar \" + jarFile.getName());\n\n List<Class<?>> lc = new ArrayList<>();\n\n lc = jarFile.stream()\n .filter(f -> !f.isDirectory())\n .map(f -> f.getName().replace(\"/\", \".\"))\n .filter(f -> f.startsWith(packageName) && f.endsWith(postfix) && !f.contains(\"$\"))\n .map(f -> f.replace(postfix, \"\"))\n .map(f -> {\n try {\n return Class.forName(f);\n } catch (ClassNotFoundException e) {\n LOG.error(\"cast classstr \" + f + \" to class failed\");\n throw new RuntimeException(e);\n }\n })\n .collect(Collectors.toList());\n\n return lc;\n }", "public interface XPackage {\n\t\n\t/**\n\t * \n\t * @return\n\t * @throws IOException\n\t * @throws FileNotFoundException\n\t */\n\tpublic XCollection<XClass> getClasses();\n\n\t/**\n\t * \n\t * @param recursively\n\t * @return\n\t */\n\tpublic XCollection<XClass> getClasses(boolean recursively);\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic XPackage getParentPackage();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic XCollection<XPackage> getChildPackages();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic XCollection<XPackage> getChildPackages(boolean recursively);\n\n\t/**\n\t * \n\t * @param packageName\n\t * @return\n\t */\n\tpublic XPackage find(String packageName);\n\n}", "public static Collection<String> getFQClassNames(IType sigInterfaceType, String typeSignature) {\n\n\t\tSet<String> names = new HashSet<String>();\n\n\t\tgetFQTypeNames(sigInterfaceType, typeSignature, names);\n\n\t\treturn names;\n\t}", "public static Class inPackage(Package pcg, String clazz){\n try {\n List<Class> list = new ArrayList<>();\n\n list.addAll(new ClassesInPackageScanner().setResourceNameFilter((packageName, fileName) -> clazz.equalsIgnoreCase(RegexParser.getFileName(fileName))).scan(pcg.getName()));\n\n return Class.forName(list.get(0).getName());\n } catch (Exception e) {\n return null;\n }\n }", "public PackageName() {\n setFullyQualified(\"\");\n setShortName(\"\");\n }", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n\t\tList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tif (!directory.exists()) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\tclasses.addAll(findClasses(file, packageName + \".\" + file.getName()));\n\t\t\t} else if (file.getName().endsWith(\".class\")) {\n\t\t\t\tclasses.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "public ArrayList<String> getNamesOfClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<String> classes = new ArrayList<String>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add( cls.getIRI().getFragment() );\n\t\t\t\n\t\treturn classes;\n\t}", "private void writeClassesKey() {\n writeSpacesCorrespondingToNestedLevel(PKG_INFO_NEST_LEVEL);\n writer.println(\"classes:\");\n }", "public static TreeSet<String> findClasses( String path, String packageName, Pattern regex ) throws Exception {\n\t\tTreeSet<String> classes = new TreeSet<String>();\n\t\tif( path.startsWith( \"file:\" ) && path.contains( \"!\" ) ) {\n\t\t\tString[] split = path.split( \"!\" );\n\t\t\tURL jar = new URL( split[0] );\n\t\t\tZipInputStream zip = new ZipInputStream( jar.openStream() );\n\t\t\tZipEntry entry;\n\t\t\twhile( ( entry = zip.getNextEntry() ) != null ) {\n\t\t\t\tif( entry.getName().endsWith( \".class\" ) ) {\n\t\t\t\t\tString className = entry.getName().replaceAll( \"[$].*\", \"\" ).replaceAll( \"[.]class\", \"\" ).replace( '/', '.' );\n\t\t\t\t\tif( className.startsWith( packageName ) && ( regex == null || regex.matcher( className ).matches() ) ) {\n\t\t\t\t\t\tclasses.add( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFile dir = new File( path );\n\t\tif( !dir.exists() ) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = dir.listFiles();\n\t\tfor( File file : files ) {\n\t\t\tif( file.isDirectory() ) {\n\t\t\t\tassert !file.getName().contains( \".\" );\n\t\t\t\tclasses.addAll( findClasses( file.getAbsolutePath(), packageName + \".\" + file.getName(), regex ) );\n\t\t\t} else if( file.getName().endsWith( \".class\" ) ) {\n\t\t\t\tString className = packageName + '.' + file.getName().substring( 0, file.getName().length() - 6 );\n\t\t\t\tif( regex == null || regex.matcher( className ).matches() ) classes.add( className );\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "ClassType memberClassNamed(String name);", "@Override\n public String toString() {\n final StringBuilder s = new StringBuilder();\n final String annotations = getAnnotations();\n\n if (!Strings.isNullOrEmpty(getPackageName())) {\n s.append(String.format(\"package %s;\\n\", getPackageName()));\n }\n\n String lastRootPackageName = \"\";\n for (String className : imports.values().stream().sorted().collect(Collectors.toList())) {\n final String rootPackageName = className.substring(0, className.indexOf('.'));\n if (!lastRootPackageName.equals(rootPackageName)) {\n lastRootPackageName = rootPackageName;\n s.append(NEW_LINE);\n }\n s.append(String.format(\"import %s;\\n\", className));\n }\n\n s.append(NEW_LINE).append(annotations).append(super.toString());\n return s.toString();\n }", "public static boolean isPossiblyJavaClass(String s) {\n // Only match a small subset of possible class names to prevent false\n // positives:\n // - class must be qualified with a package name\n // - only letters in package name, starting with lower case\n // - class name must be in CamelCase, starting with upper case\n return javaClassPattern.matcher(s).matches();\n }", "private static List<Class> findClasses(File directory, String packageName)\n\t\t\tthrows ClassNotFoundException {\n\t\tList<Class> classes = new ArrayList<Class>();\n\t\tif (directory.exists()) {\n\t\t\tFile[] files = directory.listFiles();\n\t\t\tfor (File file : files) {\n\t\t\t\tif (file.isDirectory()) {\n\t\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\t\tclasses.addAll(findClasses(file,\n\t\t\t\t\t\t\tpackageName + \".\" + file.getName()));\n\t\t\t\t} else if (file.getName().endsWith(\".class\") && !file.getName().endsWith(\"Test.class\")) {\n\t\t\t\t\tclasses.add(Class.forName(packageName\n\t\t\t\t\t\t\t+ '.'\n\t\t\t\t\t\t\t+ file.getName().substring(0,\n\t\t\t\t\t\t\t\t\tfile.getName().length() - 6)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn classes;\n\t}", "public final void packageOrTypeName() throws RecognitionException {\n int packageOrTypeName_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"packageOrTypeName\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(424, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 50) ) { return ; }\n // Java.g:425:5: ( qualifiedName )\n dbg.enterAlt(1);\n\n // Java.g:425:9: qualifiedName\n {\n dbg.location(425,9);\n pushFollow(FOLLOW_qualifiedName_in_packageOrTypeName2001);\n qualifiedName();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 50, packageOrTypeName_StartIndex); }\n }\n dbg.location(426, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"packageOrTypeName\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }" ]
[ "0.6882417", "0.67378795", "0.6733047", "0.6581968", "0.6481555", "0.639221", "0.6387497", "0.6386911", "0.6353397", "0.633607", "0.6246212", "0.62076974", "0.62065303", "0.617428", "0.6150689", "0.6135593", "0.61181355", "0.61158085", "0.6020063", "0.60126954", "0.59943104", "0.5978991", "0.59700125", "0.5946595", "0.592088", "0.5915321", "0.5901794", "0.588916", "0.58872366", "0.5882329", "0.58712596", "0.58664477", "0.5846262", "0.5829795", "0.58239305", "0.58148867", "0.57936865", "0.5788137", "0.5785352", "0.57774734", "0.57699275", "0.5764996", "0.5764482", "0.5751079", "0.5751079", "0.5751079", "0.57483906", "0.5747281", "0.5733817", "0.57188857", "0.57184285", "0.5715392", "0.5700374", "0.56952906", "0.56842273", "0.56812716", "0.56721896", "0.5638835", "0.56384397", "0.56367856", "0.56353456", "0.5633836", "0.5629632", "0.5614805", "0.5613219", "0.5601618", "0.5596156", "0.5592249", "0.5565486", "0.5564958", "0.556098", "0.55508375", "0.55400056", "0.5537902", "0.55352396", "0.55312914", "0.5517594", "0.55166405", "0.5505694", "0.55056167", "0.54908884", "0.54882056", "0.5488182", "0.547868", "0.5474624", "0.5472665", "0.5471569", "0.5466877", "0.5459997", "0.5456884", "0.54532075", "0.5452529", "0.54471004", "0.5444533", "0.5442298", "0.54229647", "0.5418735", "0.5413514", "0.5413463", "0.5409182", "0.5408295" ]
0.0
-1
Class names for selected package.
@Model public Collection<String> choices3Act( final ApplicationPermissionRule rule, final ApplicationPermissionMode mode, final String packageFqn) { return applicationFeatureRepository.classNamesContainedIn(packageFqn, ApplicationMemberType.PROPERTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<String> getClassesInPackage(String packageUniqueName) {\n List<String> result = new ArrayList<String>();\n if (theModel.packages.containsKey(packageUniqueName)){\n \tTreeSet<String> children = theModel.packages.get(packageUniqueName).children;\n \tif ((children != null)){\n \t\tfor (String uniqueName : children){\n \t\t\tFamixClass foundClass = theModel.classes.get(uniqueName);\n \t\t\tif (foundClass != null){\n \t\t\t\tresult.add(uniqueName);\n \t\t\t\tif (foundClass.hasInnerClasses){\n \t\t\t\t\tresult.addAll(foundClass.children);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }\n return result;\n }", "public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }", "public static List<Class> getSubClasses(final String packageName) {\r\n\t\tfinal List<Class> listClasses = new ArrayList<>();\r\n\t\tSystem.err.println(\"getSubClasses \" + packageName);\r\n\t\t\r\n\t\t// System.err.println(\"java.class.path : \" +\r\n\t\t// System.getProperty(\"java.class.path\"));\r\n\t\tfinal String javaClassPaths[] = System.getProperty(\"java.class.path\").split(\";\");\r\n\t\tfor (final String s : javaClassPaths) {\r\n\t\t\tif (s.endsWith(\".jar\")) {\r\n\t\t\t\t// processJarFile(s, clazz1);\r\n\t\t\t} else {\r\n\t\t\t\tfinal File dirClasses = new File(s);\r\n\t\t\t\tfinal File dirPackage = new File(dirClasses, packageToPath(packageName));\r\n\t\t\t\tif (dirPackage.exists()) {\r\n\t\t\t\t\tfinal String[] names = dirPackage.list();\r\n\t\t\t\t\tfor (final String name : names) {\r\n\r\n\t\t\t\t\t\tif ((name.indexOf(\"$\") < 0) && (name.indexOf(\".class\") > 0)) {\r\n\t\t\t\t\t\t\tfinal String sName = name.substring(0, name.indexOf(\".\"));\r\n\t\t\t\t\t\t\tfinal String className = packageName + \".\" + sName;\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfinal Class clazz = UtilReflection.class.getClassLoader().loadClass(className);\r\n\t\t\t\t\t\t\t\tlistClasses.add(clazz);\r\n\t\t\t\t\t\t\t} catch (final ClassNotFoundException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"ClassNotFound :\" + e.getMessage());\r\n\t\t\t\t\t\t\t}\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}\r\n\t\t}\r\n\t\treturn listClasses;\r\n\t}", "Set<Class<?>> getClassSet(String packageName);", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "private static Class[] getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes.toArray(new Class[classes.size()]);\n }", "private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "private static Class[] getClasses(String packageName)\n\t\t\tthrows ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread()\n\t\t\t\t.getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class> classes = new ArrayList<Class>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes.toArray(new Class[classes.size()]);\n\t}", "public String getClassName();", "String getClassName();", "String getClassName();", "String getClassName();", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName) throws ClassNotFoundException, IOException\n {\n return getClasses(packageName, null);\n }", "public static Collection<Class> getClassesForPackage(String packageName)\n throws Exception {\n String packagePath = packageName.replace(\".\", \"/\");\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Set<URL> jarUrls = new HashSet<URL>();\n\n while (classLoader != null) {\n if (classLoader instanceof URLClassLoader) {\n for (URL url : ((URLClassLoader) classLoader).getURLs()) {\n if (url.getFile().endsWith(\".jar\")) // may want better way to detect jar files\n {\n jarUrls.add(url);\n } // if\n } // for\n } // if\n\n classLoader = classLoader.getParent();\n } // while\n\n Set<Class> classes = new HashSet<Class>();\n\n for (URL url : jarUrls) {\n JarInputStream stream = new JarInputStream(url.openStream()); // may want better way to open url connections\n JarEntry entry = stream.getNextJarEntry();\n\n while (entry != null) {\n String name = entry.getName();\n\n if (name.endsWith(\".class\") && name.substring(0,\n packagePath.length()).equals(packagePath)) {\n classes.add(Class.forName(name.substring(0,\n name.length() - 6).replace(\"/\", \".\")));\n } // if\n\n entry = stream.getNextJarEntry();\n } // while\n\n stream.close();\n } // for\n\n return classes;\n }", "java.lang.String getClassName();", "public static List<String> getClassNamesFromPackage(String argPackageName,\r\n\t\t\tboolean argIterateInnerClasses) {\r\n\t\tList<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();\r\n\t\tclassLoadersList.add(ClasspathHelper.contextClassLoader());\r\n\t\tclassLoadersList.add(ClasspathHelper.staticClassLoader());\r\n\t\tConfigurationBuilder configurationBuilder = null;\r\n\t\tif (argIterateInnerClasses) {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forClassLoader(classLoadersList\r\n\t\t\t\t\t\t\t\t\t.toArray(new ClassLoader[0])));\r\n\t\t} else {\r\n\t\t\tconfigurationBuilder = new ConfigurationBuilder().setScanners(\r\n\t\t\t\t\tnew SubTypesScanner(false), new ResourcesScanner())\r\n\t\t\t\t\t.setUrls(\r\n\t\t\t\t\t\t\tClasspathHelper.forPackage(argPackageName,\r\n\t\t\t\t\t\t\t\t\tnew ClassLoader[0]));\r\n\t\t}\r\n\t\tReflections reflections = new Reflections(configurationBuilder);\r\n\t\tSet<Class<? extends Object>> classes = reflections\r\n\t\t\t\t.getSubTypesOf(Object.class);\r\n\t\tif (Precondition.checkNotEmpty(classes)) {\r\n\t\t\tList<String> simpleClassNamesList = new ArrayList<String>();\r\n\t\t\tIterator<Class<? extends Object>> s = classes.iterator();\r\n\t\t\tlogger.info(\"Loading Class Names: \");\r\n\t\t\twhile (s.hasNext()) {\r\n\t\t\t\tClass<? extends Object> st = s.next();\r\n\t\t\t\tif (!st.isInterface()) {\r\n\t\t\t\t\tString simpleClassName = st.getName();\r\n\t\t\t\t\tsimpleClassNamesList.add(simpleClassName);\r\n\t\t\t\t\tlogger.info(\"Class Names: \" + simpleClassName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn simpleClassNamesList;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "Set<String> classNames(String packageName, String except) throws Exception;", "private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }", "public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}", "public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class<?>> classes = new ArrayList<Class<?>>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}", "public static List<Class<?>> getClasses( String packageName, String regexFilter ) throws Exception {\n\t\tPattern regex = null;\n\t\tif( regexFilter != null ) {\n\t\t\tregex = Pattern.compile( regexFilter );\n\t\t}\n\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace( '.', '/' );\n\t\tEnumeration<URL> resources = classLoader.getResources( path );\n\n\t\tList<String> dirs = new ArrayList<String>();\n\t\twhile( resources.hasMoreElements() ) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add( resource.getFile() );\n\t\t}\n\n\t\tTreeSet<String> classes = new TreeSet<String>();\n\t\tfor( String directory : dirs ) {\n\t\t\tclasses.addAll( findClasses( directory, packageName, regex ) );\n\t\t}\n\n\t\tArrayList<Class<?>> classList = new ArrayList<Class<?>>();\n\t\tfor( String clazz : classes ) {\n\t\t\tclassList.add( Class.forName( clazz ) );\n\t\t}\n\n\t\treturn classList;\n\t}", "private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}", "public static List<Class<?>> getClasses(String packageName) throws ClassNotFoundException, IOException {\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\n\t\tassert classLoader != null;\n\t\tString path = packageName.replace('.', '/');\n\t\tEnumeration<URL> resources = classLoader.getResources(path);\n\n\t\tList<File> dirs = new ArrayList<File>();\n\t\twhile (resources.hasMoreElements()) {\n\t\t\tURL resource = resources.nextElement();\n\t\t\tdirs.add(new File(resource.getFile()));\n\t\t}\n\t\tArrayList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tfor (File directory : dirs) {\n\t\t\tclasses.addAll(findClasses(directory, packageName));\n\t\t}\n\t\treturn classes;\n\t}", "public String getName_Class() {\n\t\treturn name;\n\t}", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "public String getClassname() {\n return classname;\n }", "public abstract List<String> scanAllClassNames();", "private List<Class> getClasses(final String scanPackage) {\n ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false);\n provider.addIncludeFilter(new AnnotationTypeFilter(ElementEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(VertexEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EdgeEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EmbeddedEntity.class));\n Set<BeanDefinition> beanDefinitionSet = provider.findCandidateComponents(scanPackage);\n List<Class> entityClasses = new ArrayList<>();\n for (BeanDefinition beanDefinition : beanDefinitionSet) {\n String beanClassName = beanDefinition.getBeanClassName();\n try {\n entityClasses.add(Class.forName(beanClassName));\n } catch (ClassNotFoundException e) {\n LOG.error(\"Generate class: {}'s schema error: \", beanClassName, e);\n }\n }\n return entityClasses;\n }", "public String getClassname() {\n\t\treturn classname;\n\t}", "public String[] readClasses();", "public List<String> getClassList() {\n return classlist;\n }", "public String getClassName(){\n\t\treturn classname;\n\t}", "@SuppressWarnings(\"unchecked\")\n public void loadClasses(String pckgname) throws ClassNotFoundException {\n File directory = null;\n try {\n ClassLoader cld = Thread.currentThread().getContextClassLoader();\n String path = \"/\" + pckgname.replace(\".\", \"/\");\n URL resource = cld.getResource(path);\n if (resource == null) {\n throw new ClassNotFoundException(\"sem classes no package \" + path);\n }\n directory = new File(resource.getFile());\n }\n catch (NullPointerException x) {\n throw new ClassNotFoundException(pckgname + \" (\" + directory + \") package invalido\");\n }\n if (directory.exists()) {\n String[] files = directory.list();\n for (int i = 0; i < files.length; i++) {\n if (files[i].endsWith(\".class\") && !files[i].contains(\"$\")) {\n Class cl = Class.forName(pckgname + '.' + files[i].substring(0, files[i].length() - 6));\n Method methods[] = cl.getDeclaredMethods();\n boolean ok = false;\n for (Method m : methods) {\n if ((m.getReturnType().equals(List.class) || m.getReturnType().isArray()) && m.getParameterTypes().length == 0) {\n ok = true;\n break;\n }\n }\n if (ok) {\n classes.add(cl);\n }\n }\n }\n }\n else {\n throw new ClassNotFoundException(pckgname + \" package invalido\");\n }\n }", "@Override\n\tpublic List<Classes> findAllClasses() {\n\t\tString sql = \"select * from classes\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tList<Classes> classesList = (List<Classes>) querys.getResultList();\n\t\treturn classesList;\n\t}", "java.lang.String getClass_();", "java.lang.String getClass_();", "public String getClassName(String path);", "private String[] getPackageNames() {\n return mContext.getPackageManager().getPackagesForUid(Binder.getCallingUid());\n }", "java.lang.String getPackage();", "public String getClassName() { return className; }", "@NotNull\n List<? extends ClassInfo> getClasses();", "public void makePackageClassesHtmls(SizeBreakdown breakdown)\n throws IOException {\n for (String packageName : GlobalInformation.packageToClasses.keySet()) {\n \n TreeMap<Float, String> sortedClasses = new TreeMap<Float, String>(\n Collections.reverseOrder());\n float maxSize = 0f;\n \n int maxDepCount = 1;\n \n for (String className : GlobalInformation.packageToClasses.get(packageName)) {\n \n float curSize = 0f;\n if (!breakdown.classToPartialSize.containsKey(className)) {\n // This class not present in this code collection\n } else {\n curSize = breakdown.classToPartialSize.get(className);\n }\n \n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n \n if (curSize != 0f) {\n \n sortedClasses.put(curSize, className);\n if (curSize > maxSize) {\n maxSize = curSize;\n }\n if (depCount > maxDepCount) {\n maxDepCount = depCount;\n }\n }\n }\n \n PrintWriter outFile = new PrintWriter(\n getOutFile(classesInPackageFileName(breakdown, packageName)));\n \n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\"\");\n outFile.println(\"\\\"http://www.w3.org/TR/html4/strict.dtd\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=ISO-8859-1\\\">\");\n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"classLevel.css\\\" media=\\\"screen\\\">\");\n outFile.println(\"<title>Classes in package \\\"\" + packageName\n + \"\\\"</title>\");\n outFile.println(\"</head>\");\n outFile.println(\"<body>\");\n \n outFile.println(\"<center>\");\n outFile.println(\"<h2>Classes in package \\\"\" + packageName + \"\\\"</h2>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n outFile.println(\"</center>\");\n \n outFile.println(\"<div style=\\\"width:90%; height:80%; overflow-y:auto; overflow-x:auto; top: 120px; left:70px; position:absolute; background-color:white\\\"\");\n \n int yOffset = 0;\n for (Float size : sortedClasses.keySet()) {\n \n String className = sortedClasses.get(size);\n \n // TODO(kprobst): switch out the commented/uncommented lines below when\n // showing dependencies\n // float ratio = (size / maxSize) * 45;\n float ratio = (size / maxSize) * 85;\n \n if (ratio < 3) {\n ratio = 3;\n }\n \n // TODO(kprobst): not currently used, but will be for dependencies\n // get the dependency count\n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n float depRatio = ((float) depCount / (float) maxDepCount) * 45f;\n if (depRatio < 3.0) {\n depRatio = 3;\n }\n \n outFile.println(\"<div class=\\\"box\\\" style=\\\"width:\" + ratio\n + \"%; top: \" + yOffset + \"px; left: 60px;\\\">\");\n outFile.println(\"<div id=\\\"lb\\\">\");\n outFile.println(\"<div id=\\\"rb\\\">\");\n outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n outFile.println(\"<div id=\\\"content\\\">\");\n outFile.println(\"</div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div>\");\n \n // TODO(kprobst): not currently used, but will be for dependencies\n /*\n * outFile.println(\"<div class=\\\"box-right\\\" style=\\\"width:\" + depRatio\n * + \"%; top: \" + yOffset + \"px; left: 50%\\\">\");\n * outFile.println(\"<div id=\\\"lb\\\">\");\n * outFile.println(\"<div id=\\\"rb\\\">\");\n * outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n * outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n * outFile.println(\"<div id=\\\"content\\\">\"); outFile.println(\"</div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div>\");\n */\n \n int yOffsetText = yOffset + 8;\n outFile.printf(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:5px;\\\">%.1f</div>\\n\", size);\n if (GlobalInformation.displayDependencies == true) {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\"><a href=\\\"methodDependencies-\"\n + filename(packageName) + \".html#\" + className + \"\\\">\"\n + className + \"</a></div>\");\n } else {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\">\" + className + \"</div>\");\n }\n /*\n * //TODO(kprobst) make this a link String drillDownFileName = className\n * + \"Deps.html\"; outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\"\n * + yOffsetText + \"px; left:50%;\\\"><a href=\\\"\" + drillDownFileName +\n * \"\\\" target=\\\"_top\\\">Dependencies: \" + depCount + \"</a></div>\");\n */\n yOffset = yOffset + 25;\n }\n \n outFile.println(\"</div>\");\n outFile.println(\"</body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }\n }", "private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public static String getPackageName(String longClassName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longClassName, \".\");\r\n\t\tfinal StringBuilder sb = new StringBuilder();\r\n\t\tString last = longClassName;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\tlast = tk.nextToken();\r\n\t\t\tif (tk.hasMoreTokens()) {\r\n\t\t\t\tsb.append(last);\r\n\t\t\t\tsb.append(\".\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn sb.toString().substring(0, sb.toString().length() - 1);\r\n\t}", "private void writeClassesKey() {\n writeSpacesCorrespondingToNestedLevel(PKG_INFO_NEST_LEVEL);\n writer.println(\"classes:\");\n }", "abstract String getClassName();", "public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}", "public abstract String getClassName();", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "public String getClassName() {\n return className;\n }", "@Override\r\n\tpublic List<String> getJavaPackages() {\n\t\treturn null;\r\n\t}", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }", "public static List<Class<?>>\n getClassListInPackage(String packageName, boolean isRecursion, String postfix) throws IOException, ClassNotFoundException {\n\n LOG.info(\"get Class in package \" + packageName);\n\n List<Class<?>> lct = new ArrayList<>();\n\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n URL url = loader.getResource(packageName.replace(\".\", \"/\"));\n\n if (url != null) {\n String protocol = url.getProtocol();\n if (protocol.equals(\"file\")) {\n lct = getClassNameFromFile(url.getPath(), packageName, isRecursion, postfix);\n } else if (protocol.equals(\"jar\")) {\n JarFile jarFile = ((JarURLConnection) url.openConnection()).getJarFile();\n lct = getClassNameFromJar(jarFile, packageName, isRecursion, postfix);\n }\n }\n\n return lct;\n }", "private static List<Class> findClasses(File directory, String packageName)\n\t\t\tthrows ClassNotFoundException {\n\t\tList<Class> classes = new ArrayList<Class>();\n\t\tif (directory.exists()) {\n\t\t\tFile[] files = directory.listFiles();\n\t\t\tfor (File file : files) {\n\t\t\t\tif (file.isDirectory()) {\n\t\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\t\tclasses.addAll(findClasses(file,\n\t\t\t\t\t\t\tpackageName + \".\" + file.getName()));\n\t\t\t\t} else if (file.getName().endsWith(\".class\") && !file.getName().endsWith(\"Test.class\")) {\n\t\t\t\t\tclasses.add(Class.forName(packageName\n\t\t\t\t\t\t\t+ '.'\n\t\t\t\t\t\t\t+ file.getName().substring(0,\n\t\t\t\t\t\t\t\t\tfile.getName().length() - 6)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn classes;\n\t}", "public String getClassName() {\r\n return className;\r\n }", "private List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}", "Set<String> classNames(String packageName, String except, String except2) throws Exception;", "private Vector<String> getSwingClassNames() {\n List<ClassLoader> classLoadersList = new LinkedList<>();\n classLoadersList.add(ClasspathHelper.contextClassLoader());\n classLoadersList.add(ClasspathHelper.staticClassLoader());\n\n Reflections reflections = new Reflections(new ConfigurationBuilder()\n .setScanners(new SubTypesScanner(false), new ResourcesScanner())\n .setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))\n .filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(\"javax.swing\"))));\n\n Set<Class<? extends JComponent>> classes = reflections.getSubTypesOf(JComponent.class);\n\n Vector<String> classNames = new Vector<>();\n for (Class<?> cls : classes) {\n if (cls.getSimpleName().length() > 0 && cls.getSimpleName().charAt(0) == 'J') {\n classNames.add(cls.getSimpleName() + \" (\" + cls.getName() + \")\");\n }\n }\n\n return classNames;\n }", "public String getClassName(){\n\t\treturn targetClass.name;\n\t}", "public ClassDoc[] specifiedClasses() {\n // System.out.println(\"RootDoc.specifiedClasses() called.\");\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // index.html lists classes returned from specifiedClasses; return the\n // set of classes in specClasses that are\n // included as per access mod filter\n return classes();\n }", "protected String getClassName() {\r\n return newName.getText();\r\n }", "public ClassInfo[] getClasses() {\r\n return classes.toArray(new ClassInfo[classes.size()]);\r\n }", "public String getClazzName();", "@Override\r\n\tpublic Set<Class<?>> getClasses() {\r\n\t\treturn BazaarApplicationImpl.CLASSES;\r\n\t}", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n\t\tList<Class<?>> classes = new ArrayList<Class<?>>();\n\t\tif (!directory.exists()) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tassert !file.getName().contains(\".\");\n\t\t\t\tclasses.addAll(findClasses(file, packageName + \".\" + file.getName()));\n\t\t\t} else if (file.getName().endsWith(\".class\")) {\n\t\t\t\tclasses.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "public String getClassname()\r\n {\r\n return m_classname;\r\n }", "public static String getPackageName(Class<?> c) {\n\t\tString fullyQualifiedName = c.getName();\n\t\tint lastDot = fullyQualifiedName.lastIndexOf('.');\n\t\tif (lastDot == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn fullyQualifiedName.substring(0, lastDot);\n\t}", "public String getClassName() {\n return super.getClassName();\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName() {\n return className;\n }", "public String getClassName()\n {\n return _className;\n }", "public String[] getClassesToCompile();", "public String getClassName()\n {\n return className;\n }", "String getClassName() {\n return this.className;\n }", "protected String getClassName() {\n return getDescriptedClass().getName();\n }", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName, Class<?> superClass) throws ClassNotFoundException, IOException\n {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements())\n {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n List<Class> classes = new ArrayList<Class>();\n for (File directory : dirs)\n {\n List<Class> foundClasses = findClasses(directory, packageName);\n for (Class foundClass : foundClasses)\n {\n if (superClass.isAssignableFrom(foundClass))\n {\n classes.add(foundClass);\n }\n }\n }\n\n return classes;\n }", "public static String getClassName() {\n return CLASS_NAME;\n }", "public List<Class<?>> getKnownClasses();", "public String getClassName() {\n return this.className;\n }", "public String getClassName() {\n return this.className;\n }", "public String getClassName () { return _className; }", "public static TreeSet<String> findClasses( String path, String packageName, Pattern regex ) throws Exception {\n\t\tTreeSet<String> classes = new TreeSet<String>();\n\t\tif( path.startsWith( \"file:\" ) && path.contains( \"!\" ) ) {\n\t\t\tString[] split = path.split( \"!\" );\n\t\t\tURL jar = new URL( split[0] );\n\t\t\tZipInputStream zip = new ZipInputStream( jar.openStream() );\n\t\t\tZipEntry entry;\n\t\t\twhile( ( entry = zip.getNextEntry() ) != null ) {\n\t\t\t\tif( entry.getName().endsWith( \".class\" ) ) {\n\t\t\t\t\tString className = entry.getName().replaceAll( \"[$].*\", \"\" ).replaceAll( \"[.]class\", \"\" ).replace( '/', '.' );\n\t\t\t\t\tif( className.startsWith( packageName ) && ( regex == null || regex.matcher( className ).matches() ) ) {\n\t\t\t\t\t\tclasses.add( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFile dir = new File( path );\n\t\tif( !dir.exists() ) {\n\t\t\treturn classes;\n\t\t}\n\t\tFile[] files = dir.listFiles();\n\t\tfor( File file : files ) {\n\t\t\tif( file.isDirectory() ) {\n\t\t\t\tassert !file.getName().contains( \".\" );\n\t\t\t\tclasses.addAll( findClasses( file.getAbsolutePath(), packageName + \".\" + file.getName(), regex ) );\n\t\t\t} else if( file.getName().endsWith( \".class\" ) ) {\n\t\t\t\tString className = packageName + '.' + file.getName().substring( 0, file.getName().length() - 6 );\n\t\t\t\tif( regex == null || regex.matcher( className ).matches() ) classes.add( className );\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public String getSelectedClass () {\n Object sel = listAppClasses.getSelectedValue();\n if(sel == null) {\n return null;\n }\n if(sel instanceof String) {\n return (String)sel;\n }\n return null;\n }", "public static Set<Class<? extends Module>> getModuleClasses(String packageName) {\n Reflections reflections = new Reflections(packageName);\n\n return reflections.getSubTypesOf(Module.class);\n\n }", "public String getClassName() {\n\t\treturn className;\n\t}", "public String getClassName() {\n\t\treturn className;\n\t}", "private static Collection<EClass> getAllClasses(String model)\n {\n Collection<EClass> result;\n if (Constants.SYSML_EXTENSION.equals(model.toLowerCase()))\n {\n result = new LinkedList<EClass>(SysMLPackage.Literals.REQUIREMENT.getEAllSuperTypes());\n result.add(SysMLPackage.Literals.REQUIREMENT);\n }\n else\n {\n result = new LinkedList<EClass>(UMLPackage.Literals.CLASS.getEAllSuperTypes());\n result.add(UMLPackage.Literals.CLASS);\n }\n\n return result;\n }", "public Stream<Class<?>> getClasses(@NotNull String packageName) {\n return CheckedFunction2.of(ClassLoader::getResources).unchecked()\n .reversed()\n .apply(packageName.replace('.', '/'))\n .andThen(Enumeration::asIterator)\n .andThen(urlIterator -> spliteratorUnknownSize(urlIterator, ORDERED))\n .andThen(urlSpliterator -> stream(urlSpliterator, false))\n .compose(Thread::getContextClassLoader)\n .apply(Thread.currentThread())\n .map(URL::getFile)\n .map(File::new)\n .flatMap(directory -> findClasses(directory, packageName));\n }" ]
[ "0.6689498", "0.66873246", "0.65447515", "0.649979", "0.6465802", "0.6452193", "0.6439984", "0.6439136", "0.6389063", "0.6378283", "0.6377465", "0.6377465", "0.6377465", "0.63715017", "0.63440734", "0.6333619", "0.625568", "0.62139237", "0.62032396", "0.61995053", "0.61920655", "0.61804557", "0.6163732", "0.61428356", "0.6141519", "0.610029", "0.60879093", "0.60801226", "0.60789716", "0.60777956", "0.6050997", "0.6037338", "0.6030543", "0.6025145", "0.6021104", "0.6018742", "0.6016672", "0.60152465", "0.5997718", "0.5971876", "0.5971876", "0.5969296", "0.59507966", "0.5946357", "0.5939196", "0.5931765", "0.5917003", "0.5915054", "0.58598393", "0.5857705", "0.5856748", "0.5852964", "0.58497804", "0.5847569", "0.58429956", "0.5828319", "0.5826823", "0.58214647", "0.58179593", "0.58147335", "0.5809323", "0.58083767", "0.5803634", "0.58025116", "0.57952434", "0.57909256", "0.57893413", "0.57661855", "0.57620096", "0.5760745", "0.5757929", "0.5749852", "0.5749623", "0.57398534", "0.57378185", "0.5731694", "0.5721271", "0.5721271", "0.5721271", "0.5721271", "0.5721271", "0.5721271", "0.57173526", "0.57160693", "0.57140887", "0.5706563", "0.5705346", "0.57018757", "0.5697753", "0.56641054", "0.5659451", "0.5659451", "0.5656979", "0.56553423", "0.5654525", "0.5650817", "0.5643069", "0.563788", "0.563788", "0.5631992", "0.5630541" ]
0.0
-1
Member names for selected class.
@Model public Collection<String> choices4Act( final ApplicationPermissionRule rule, final ApplicationPermissionMode mode, final String packageFqn, final String className) { return applicationFeatureRepository.memberNamesOf(packageFqn, className, ApplicationMemberType.PROPERTY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List memberClasses();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public String toString() {return classSimpleName+\"#\"+name;}", "ClassType memberClassNamed(String name);", "private String m56637b(Class cls) {\n return cls.getName();\n }", "static final void userFormClassNames(MemoryResultsSnapshot snapshot) {\n String[] classNames = snapshot == null ? null : snapshot.getClassNames();\n if (classNames != null) for (int i = 0; i < classNames.length; i++)\n classNames[i] = StringUtils.userFormClassName(classNames[i]);\n }", "public String getName_Class() {\n\t\treturn name;\n\t}", "@Override\n public String toString() {\n return getClass().getSimpleName() + \"[\" + _name + \"]\";\n }", "protected String getClassName() {\r\n return newName.getText();\r\n }", "@Override \n public String toString() {\n return getName() + \"(\" + getClass().getName() + \")\";\n }", "@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }", "PropertyName getName();", "public String[] getFieldNames();", "public String getClazzName();", "public String getName() {\n return className;\n }", "public String getPropertyName();", "@Override\n public String toString()\n {\n return mi_name;\n }", "@Override\n public String toString()\n {\n return mi_name;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getName() {\n return name();\n }", "@Override\r\n\tpublic String[] names() {\n\t\treturn new String[] {\"lifesteal\"};\r\n\t}", "java.util.Enumeration getPropertyNames();", "public ImmutableList<String> getMemberNames() {\n return members.stream().map(m -> m.getName()).collect(ImmutableList.toImmutableList());\n }", "public String getName() {\n\t\treturn \"Object class name\";\n\t}", "String getPropertyName();", "public String getName() {\n\t\treturn className;\n\t}", "@Override\n String getName();", "public String getName ();", "public String[] getPropertyNames()\n {\n return ClassAnalyzer.getPropertyNames(m_Source.getClass());\n }", "public String getClassName() { return className; }", "public String getClassName () { return _className; }", "@Model\n public Collection<String> choices2Act() {\n return applicationFeatureRepository.packageNamesContainingClasses(ApplicationMemberType.PROPERTY);\n }", "@Override\n public String toString() {\n return \"Class \" + className + \":\\n\" +\n \"\\tFields: \" + fields;\n }", "@Override\r\n String getName();", "@Override\n\tpublic StringList getNames() {\n\t\tStringList ss = new StringList();\n\t\tss.add(\"java\");\n\t\treturn ss;\n\t}", "public String getName() {\r\n \treturn this.getClass().getName();\r\n }", "@Override\n\tString name();", "@Override\r\n\tpublic String toString() {\n\t\treturn getName();\r\n\t}", "private void setColumnNames() {\r\n columnNames = new String[classFields.length];\r\n for (int i = 0; i < classFields.length; i++) {\r\n columnNames[i] = classFields[i].getName();\r\n }\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn getName();\n\t}", "@Override\n public String getName() {\n return name();\n }", "@Override\n public String toString() {\n return getName();\n }", "@Override\n public String toString() {\n return getName();\n }", "@Override\n public String toString() {\n return getName();\n }", "@Override\n public String toString() {\n return getName();\n }", "protected String getClassName() {\n return getDescriptedClass().getName();\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "@Override\n public String toString() {\n return getName();\n }", "String getSimpleName();" ]
[ "0.66742563", "0.64263165", "0.62785095", "0.6108946", "0.60671127", "0.60621685", "0.60028446", "0.5959701", "0.59507847", "0.5857671", "0.58428824", "0.5818204", "0.580494", "0.5773686", "0.5750609", "0.571824", "0.5712069", "0.5712069", "0.56885874", "0.5687763", "0.5680106", "0.5678725", "0.56702995", "0.5639504", "0.56284654", "0.5618174", "0.5613683", "0.5610615", "0.5593031", "0.55877024", "0.55870646", "0.5584759", "0.5580617", "0.55696195", "0.5567673", "0.55600214", "0.5545843", "0.55456626", "0.5541185", "0.55406314", "0.5528884", "0.55218726", "0.5520764", "0.5520764", "0.5520764", "0.5520764", "0.5515614", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.55149686", "0.5513819", "0.55099475" ]
0.0
-1
get item by id
@GetMapping("/items/{item_id}") public ResponseEntity<Item> getItemById(@PathVariable(value="item_id") Long item_id){ Item item = itemDAO.findOne(item_id); if(item == null) { return ResponseEntity.notFound().build(); } return ResponseEntity.ok().body(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Item findById(String id);", "CatalogItem getItembyId(final Long id);", "public Item getItemById(Integer itemId);", "public Item getItem(long idItem) throws ItemNotFound;", "private BaseItem getItemById(int id) {\n\t\tfor (BaseItem item : mItems) {\n\t\t\tif (item.mId == id) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t\treturn getDefault();\n\t}", "public Item getByID(Integer id) {\r\n Item item = null;\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n item = (Item) session.get(Item.class, id);\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return item;\r\n }", "@Override\n public Item get(long idItem) throws EntityNotFound;", "public static item getItemById(int id) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT itemID, ownerID, Name, status, description, category, image1,image2,image3,image4 FROM iteminformation WHERE itemID=?\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n item item = new item(rs.getInt(1), rs.getString(2), rs.getString(3), (rs.getInt(4) == 1) ? true : false, rs.getString(5), rs.getString(6), rs.getBlob(7), rs.getBlob(8), rs.getBlob(9), rs.getBlob(10));\n return item;\n } else {\n return null;\n }\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@Override\n\tpublic Item findItemById(Long id) {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Item> q = cb.createQuery(Item.class);\n\t\t Root<Item> c = q.from(Item.class);\n\t\t ParameterExpression<Long> p = cb.parameter(Long.class);\n\t\t q.select(c).where(cb.equal(c.get(\"id\"), p));\n\t\t TypedQuery<Item> query = entityManager.createQuery(q);\n\t\t query.setParameter(p, id);\n\t\t Item i = query.getSingleResult();\n\t\treturn i;\n\t}", "public Item getItem(String id) {\r\n\t\treturn items.get(id);\r\n\t}", "@Override\n\tpublic ThematicItem getItem(Long id) {\n\t\treturn repository.getItem(id);\n\t}", "@Override\n\tpublic FoodItem getItem(Long id) {\n\t\treturn foodItemRepository.getOne(id);\n\t}", "Item getItem(int id) {\n SQLiteDatabase db = DataBaseManager.getInstance().openDatabase();\n Cursor cursor = db.query(TABLE_ITEMS, new String[]{KEY_ID,\n KEY_ARRAY_ID, KEY_NAME, KEY_DESCRIPTION},\n KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n Item item = null;\n if (cursor != null) {\n cursor.moveToFirst();\n\n item = new Item(Integer.parseInt(cursor.getString(KEY_INDEX)), Integer.parseInt(cursor.getString(ARRAY_INDEX)),\n cursor.getString(NAME_INDEX), cursor.getString(DESCRIPTION_INDEX));\n }\n DataBaseManager.getInstance().closeDatabase();\n // return contact\n return item;\n }", "public ItemModel getItemByID(int id) {\n SQLiteDatabase sdb = this.getReadableDatabase();\n ItemModel item = new ItemModel();\n\n Cursor cursor = sdb.rawQuery(\"Select * from item where item_id=?\", new String[]{String.valueOf(id)} );\n cursor.moveToFirst();\n item.setItem_id(cursor.getInt(0));\n item.setItem_name(cursor.getString(1));\n item.setItem_price(cursor.getInt(2));\n item.setItem_size(cursor.getString(3));\n item.setItem_material(cursor.getString(4));\n item.setItem_desc(cursor.getString(5));\n item.setItem_gender_category(cursor.getInt(6));\n item.setItem_category(cursor.getString(7));\n item.setItem_color(cursor.getString(8));\n item.setItem_image(cursor.getString(9));\n\n cursor.close();\n\n// Log.e(\"getItembyId\", \"finished getting item by Id\");\n return item;\n }", "public Item getItem(Long id) {\r\n \t\tif (id == null)\r\n \t\t\treturn null;\r\n \t\treturn persistenceManager.getItem(id);\r\n \t}", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "Object get(ID id) throws Exception;", "T get(Integer id);", "public Item getItem(Long id)\n {\n return auctionManager.getItem(id);\n }", "String get(String id);", "@GetMapping(\"/{id}\")\n public ResultEntity<ItemDTO> getItemByItemId(@PathVariable String id)\n {\n return itemService.getItemByItemId(id);\n }", "T getbyId(I id);", "public Product get(String id);", "TradeItem getTradeItem(long id);", "JSONObject getItem(int id) {\n return mData.get(id);\n }", "@RequestMapping(method=RequestMethod.GET, value = \"/item/{id}\", produces = \"application/json\")\n public Item getItem(@PathVariable (name = \"id\") UUID id)\n {\n return this.itemRepository.getItem(id);\n }", "public ClassItem get(Long id) {\n return (ClassItem)get(ClassItem.class, id);\n }", "public Items findByPrimaryKey(int id) throws ItemsDaoException;", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "T get(ID id);", "T getById(int id);", "private Future<JsonObject> fetchItem(String id) {\n Promise<JsonObject> p = Promise.promise();\n client\n .get(catPort, catHost, catItemPath)\n .addQueryParam(ID, id)\n .send()\n .onFailure(\n ar -> {\n ar.printStackTrace();\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n obj -> {\n JsonObject res = obj.bodyAsJsonObject();\n if (obj.statusCode() == 200)\n {\n if (res.getString(STATUS).equals(status.SUCCESS.toString().toLowerCase()))\n p.complete(obj.bodyAsJsonObject().getJsonArray(RESULTS).getJsonObject(0));\n }\n else{\n if (obj.statusCode() == 404)\n p.fail(ITEMNOTFOUND + id);\n else{\n LOGGER.error(\"failed fetchItem: \" + res);\n p.fail(INTERNALERROR);\n }\n\n }\n });\n return p.future();\n }", "public BusinessObject getItem(Package pkg, String id);", "@Override\n @LogMethod\n public T get(long id) throws InventoryException {\n \tInventoryHelper.checkPositive(id, \"id\");\n T entity = repository.getByKey(id);\n InventoryHelper.checkEntityExist(entity, id);\n return entity;\n }", "@GET\r\n\tpublic JsonObject getItem(@QueryParam(\"id\") int id){\r\n\t\tConnection database = DBConnecter.getConnection();\r\n\t Statement stat = null;\r\n\t ResultSet rs = null;\r\n\t System.out.print(id);\r\n\t\ttry {\r\n\t\t\tItem item = null;\r\n\t\t\tstat = database.createStatement();\r\n\t\t\tString sqlQueryString = \"select * from item where idTag='\" + id+ \"';\";\r\n\t\t\trs = stat.executeQuery(sqlQueryString);\r\n\t\t\tstat.executeQuery(sqlQueryString);\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\titem = new Item(\r\n\t \t\trs.getInt(idTagString),\r\n\t \t\trs.getInt(binNumString),\r\n\t \t\trs.getString(departmentString),\r\n\t \t\trs.getString(descriptionString),\r\n\t \t\trs.getFloat(replacementCostString),\r\n\t \t\trs.getFloat(priceString),\r\n\t \t\trs.getString(dimensionsString),\r\n\t \t\trs.getInt(lengthString),\r\n\t \t\trs.getFloat(weightString),\r\n\t\t\t \trs.getString(modelNumberString),\r\n\t\t\t \trs.getInt(purchaseDateString),\r\n\t\t\t \trs.getInt(warrantyEndDateString),\r\n\t\t\t \trs.getString(categoryString)\r\n\t \t\t);\r\n\t\t\t}\r\n\t\t\tif(item != null)\r\n\t\t\t\treturn item.toJSON();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t\tstat.close();\r\n\t\t\t\tdatabase.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t \r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public T getByID(int id) {\n\t\treturn this.data.get(id);\n\t}", "public TodoItem getTodoItemById(Long id) throws RecordNotFoundException {\n Optional<TodoItem> todoItem = todoItemRepository.findById(id);\n\n if (todoItem.isPresent()) {\n return todoItem.get();\n } else {\n throw new RecordNotFoundException(\"No TodoItem record exist for given id\");\n }\n }", "public T get( final int id )\n\t{\n\t\treturn this.dao.findById( id ).get();\n\t}", "public OrderItem findOrderItemById(int id)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.findById(id);\n\t\tif(orderIt==null)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t \"Id-ul nu exista!\",\n\t\t\t\t \"Update error\",\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t\t\tthrow new NoSuchElementException(\"OrderItem=ul cu id-ul:\"+id+\" nu a fost gasit\");\n\t\t}\n\t\treturn orderIt;\n\t}", "@Override\n public Item find(Context context, UUID id) throws SQLException\n {\n Item item = itemDAO.findByID(context, Item.class, id);\n if (item == null)\n {\n if (log.isDebugEnabled())\n {\n log.debug(LogManager.getHeader(context, \"find_item\",\n \"not_found,item_id=\" + id));\n }\n return null;\n }\n\n // not null, return item\n if (log.isDebugEnabled())\n {\n log.debug(LogManager.getHeader(context, \"find_item\", \"item_id=\"\n + id));\n }\n\n return item;\n }", "public Book getItem(int id) {\n return BookManagerSingelton.getInstance().getBook(id);\n }", "HpItemParamItem selectByPrimaryKey(Long id);", "public Product getByID(int id) {\n if (!isValidID(id)) {\n System.out.println(\"Ese item no existe\");\n return null;\n }\n\n Product r = null;\n try {\n r = products[id].clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n return r;\n }", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "T getById(ID id);", "public abstract MediaItem getMediaItem(String id);", "@Transactional(readOnly = true)\n public Optional<ItemInstance> findOne(Long id) {\n log.debug(\"Request to get ItemInstance : {}\", id);\n return itemInstanceRepository.findById(id);\n }", "NewsItem obtainNewsItemById(long id) throws ObjectRetrievalFailureException;", "E getById(long id);", "public PlayerItem getPlayerItemById(int playerItemId);", "@Override\n\tpublic T get(ID id) {\n\t\tOptional<T> obj = getDao().findById(id);\n\t\tif (obj.isPresent()) {\n\t\t\treturn obj.get();\n\t\t}\t\t\n\t\treturn null;\n\t}", "public TransactionItem get(Long id) {\n return (TransactionItem)get(TransactionItem.class, id);\n }", "public void getRemoteItemById(long item_id) {\n url = Constants.getItemById;\n params = new HashMap<>();\n params.put(param_item_id, \"\" + item_id);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItemById(item_id, mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "UmsMenu getItem(Long id);", "T get(PK id);", "public MenuItem findItem(int id);", "@Override\n\tpublic item findById(Long id, Integer cantidad) {\n\t\treturn new item(donkyClientFeign.detalles(id),cantidad);\n\t}", "public ClassItem find(Long id) {\n return (ClassItem)find(ClassItem.class, id);\n }", "@GetMapping(\"/items/{id}\")\n public ResponseEntity<Items> getItems(@PathVariable Long id) {\n log.debug(\"REST request to get Items : {}\", id);\n Optional<Items> items = itemsRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(items);\n }", "public Data findById(Object id);", "public Items[] findWhereIdEquals(int id) throws ItemsDaoException;", "D getById(K id);", "Identifiable item();", "T getById(Long id);", "public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }", "@Override\n public Movie getFromId (Integer id) {return this.movies.get(id);}", "public OpenERPRecord get(int id) {\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord n = i.next();\r\n\t\t\tInteger rID = (Integer) n.get(\"id\"); // no class cast exception\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// expected here...\r\n\t\t\tif (rID == id)\r\n\t\t\t\treturn n;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int getItemID();", "V get(K id);", "@GetMapping(\"/getItem/{id}\")\n\tpublic ModelAndView getItemById(@PathVariable(value=\"id\") long id) {\n\t\tModelAndView mv = new ModelAndView();\n\t\tItem item = itemService.findItemById(id);\n\t\tmv.setViewName(\"editItem\");// Set the view name\n\t\tmv.addObject(\"item\", item);// Add an item to the model and view object\n\t\t\n\t\treturn mv;\n\t}", "Sequipment selectByPrimaryKey(Integer id);", "M getById(Serializable id) throws DataAccessException;", "@Override\n public E getById(final I id) {\n LOG.info(\"[getById] Start: Id = \" + id);\n LOG.info(\"[getById] End\");\n return entityManager.find(entityClass, id);\n }", "RiceCooker getById(long id);", "public T get(int id) {\n return this.session.get(this.type, id);\n }", "public Item getItem(int itemId) {\n\t\treturn (Item) hashOperations.get(KEY, itemId);\n\t}", "AppStandard selectById(String id);", "@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}", "public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }", "public TransactionItem find(Long id) {\n return (TransactionItem)find(TransactionItem.class, id);\n }", "T getById(PK id);", "public o selectById(long id);", "private SpeedDialActionItem findActionItem(int id) {\r\n for (SpeedDialActionItem item : speedDial.getActionItems())\r\n if (item.getId() == id)\r\n return item;\r\n\r\n return null;\r\n }", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "public New getObject(long id);", "public abstract Object get(String entityName, Serializable id);", "public ItemTypeDTO findById(String id);", "public Product findProduct(int id)\n {\n for(Product product : stock)\n {\n if(id == product.getID())\n {\n return product;\n }\n }\n System.out.println(\"Error: Could not find ID: \" + id);\n return null;\n }", "public itemView getItem(int id) {\n return mData.get(id);\n }", "@Override\n public Building get(long id) {\n return dao.get(Building.class, id);\n }", "ItemStockDO selectByPrimaryKey(Integer id);", "ItemStockDO selectByPrimaryKey(Integer id);", "public String getItem(int id) {\n return mprimo.get(id);\n }", "public ConversationDMResponse getItem(int id) {\n return mData.get(id);\n }", "public String getItem(int id) {\n return mData.get(id);\n }", "public void getDetail(int id) {\n\t\t\n\t}", "@Override\n\tpublic Equipo get(Long id)\n\t{\n\t\tOptional<Equipo> entity = equipoRepository.findById(id);\n\t\treturn entity.orElse(null);\n\t}", "public BankThing retrieve(String id);", "public AirspaceObject getObject(int id)\n\t{\n\t\treturn idToObject.get(id);\n\t}" ]
[ "0.82410604", "0.82040715", "0.8067566", "0.79378045", "0.7890812", "0.788544", "0.78280026", "0.78080523", "0.7780522", "0.7767707", "0.7725396", "0.7641433", "0.7624935", "0.75923944", "0.7577716", "0.75673574", "0.75341845", "0.7521978", "0.74808455", "0.7479619", "0.74621004", "0.73820657", "0.7378188", "0.73688376", "0.7367214", "0.7354337", "0.73280424", "0.732331", "0.7306657", "0.7306657", "0.7302572", "0.72566843", "0.72444934", "0.7243578", "0.7243507", "0.722764", "0.7215641", "0.7215631", "0.7178335", "0.71776605", "0.71491194", "0.71474904", "0.71300733", "0.71087646", "0.7089555", "0.7083715", "0.70802313", "0.70734847", "0.70716876", "0.7061719", "0.7054551", "0.7034543", "0.703274", "0.7030863", "0.70170707", "0.70169836", "0.70095384", "0.6992012", "0.69773966", "0.69645023", "0.6961806", "0.69583416", "0.69436806", "0.6939077", "0.6937102", "0.6935852", "0.6934188", "0.69292563", "0.69074744", "0.6898842", "0.6892712", "0.6866235", "0.6832583", "0.68164986", "0.6805044", "0.6799129", "0.67790586", "0.67742693", "0.67616975", "0.6759738", "0.6759054", "0.67556745", "0.6744188", "0.6739488", "0.6730543", "0.6730179", "0.6729684", "0.6729506", "0.672818", "0.67235225", "0.67169577", "0.6716528", "0.6716528", "0.67088836", "0.6708012", "0.6691218", "0.66854745", "0.66848373", "0.6682504", "0.66798985" ]
0.7185109
38
update item by id
@PutMapping("/items/{item_id}") public ResponseEntity<Item> updateItem(@PathVariable(value="item_id") Long item_id, @Valid @RequestBody Item itemDetails){ Item item = itemDAO.findOne(item_id); if(item == null) { return ResponseEntity.notFound().build(); } item.setItem_id(itemDetails.getItem_id()); item.setItem_name(itemDetails.getItem_name()); item.setItem_discription(itemDetails.getItem_discription()); item.setCategory(itemDetails.getCategory()); item.setPrice(itemDetails.getPrice()); Item upItem = itemDAO.save(item); return ResponseEntity.ok().body(upItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Item update(Item item);", "public CompletionStage<Result> updateItem(Long id) {\n MessageDispatcher jdbcDispatcher = AkkaDispatcher.jdbcDispatcher;\n\n JsonNode nItem = request().body().asJson();\n ItemEntity item = Json.fromJson( nItem , ItemEntity.class ) ;\n ItemEntity itemViejo = ItemEntity.FINDER.byId(id);\n return CompletableFuture.supplyAsync(\n ()->{\n if(itemViejo == null)\n {\n return itemViejo;\n }else\n { item.setId(id);\n item.update();\n return item;\n }\n }\n ).thenApply(\n itemEntity -> {\n if(itemEntity == null)\n {\n return notFound();\n }else\n {\n return ok(Json.toJson(itemEntity));\n }\n }\n\n );\n }", "void updateOfProductById(long id);", "public void update(ItemsPk pk, Items dto) throws ItemsDaoException;", "@RequestMapping(method=RequestMethod.PUT, value = \"/item/{id}\", produces = \"application/json\")\n public void updateItem(@PathVariable (name = \"id\") UUID id, @RequestBody Item updatedItem)\n {\n this.itemRepository.updateItem(updatedItem);\n }", "void updateItem(IDAOSession session, Item item);", "int updateByPrimaryKey(HpItemParamItem record);", "public void updateItem(int id, String desc, String family, float price, int stock) {\n ContentValues values = new ContentValues();\n values.put(\"description\", desc);\n values.put(\"family\", family);\n values.put(\"price\", price);\n\n dbW.update(\"store\", values, \"_id=?\", new String[] { String.valueOf(id) });\n }", "@RequestMapping(value = \"/api/todo-items/{id}\", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic ResponseEntity<TodoItem> updateItem(@PathVariable(\"id\") long id, @RequestBody TodoItem item) {\n\n\t\ttodoItemService.update(item);\n\t\treturn new ResponseEntity<TodoItem>(HttpStatus.NO_CONTENT);\n\t}", "@Override\n public void update(long id) {\n try (Session session = createSessionFactory().openSession()) {\n\n Transaction transaction = session.getTransaction();\n transaction.begin();\n\n File findItem = (File) findById(id);\n findItem.setName(\"new_novel\");\n findItem.setSize(10);\n //action\n session.update(findItem);\n //close session/tr\n transaction.commit();\n throw new IOException();\n } catch (HibernateException e) {\n System.out.println(\"Nothing update!\" + e.getMessage());\n }\n catch (IOException e){\n System.out.println(\"Something wrong in File update method\");\n e.printStackTrace();\n }\n\n }", "@Update(UPDATE_BY_ID)\n @Override\n int updateById(Object position);", "int updateByPrimaryKey(ItemStockDO record);", "int updateByPrimaryKey(ItemStockDO record);", "int updateByPrimaryKey(Sequipment record);", "Product update(Product product, long id);", "public abstract int update(T item) throws RepositoryException;", "@Transactional\n public static Result updateListItem(String listId, String itemId){\n Item item = Item.findById(Long.parseLong(itemId));\n ItemList list = ItemList.findById(Long.parseLong(listId));\n if(list.containsItem(item)){\n \n }\n return ok(toJson(item));\n }", "protected void update(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.update(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute update\");\n\t\t}\n\t}", "@Override\n public void updateOne(int id, Booking itemToUpdate) {\n String sql = \"UPDATE bookings SET customer_phone_number = ? WHERE id = ?\";\n jdbc.update(sql, itemToUpdate.getCustomerPhoneNumber(), id);\n }", "int updateByPrimaryKey(ItemCategory record);", "int updateByPrimaryKey(TempletLink record);", "public void update(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n session.update(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n }", "@Override\n\tpublic boolean update(Item obj) {\n\t\ttry{\n\t\t\tString query=\"UPDATE items SET title = ?, start_date = ?, end_date = ?, type = ? WHERE id = ?\";\n\t\t\tPreparedStatement state = conn.prepareStatement(query,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t\tstate.setString(1, obj.getTitle());\n\t\t\tstate.setDate(2, obj.getStartDate());\n\t\t\tstate.setDate(3, obj.getEndDate());\n\t\t\tstate.setInt(4, obj.getItemType().getIndex());\n\t\t\tstate.setInt(5, obj.getIndex());\n\t\t\t\n\t\t\t// Run the query\n\t\t\tstate.executeUpdate();\n\n\t\t\tstate.close();\n\t\t\t\n\t\t\t// Notify the Dispatcher on a suitable channel.\n\t\t\tthis.publish(EntityEnum.ITEM.getValue());\n\t\t\t\n\t\t\treturn true;\n\t\t} catch (SQLException e){\n\t\t\tJOptionPane jop = new JOptionPane();\n\t\t\tjop.showMessageDialog(null, e.getMessage(),\"PostgreSQLItemDao.update -- ERROR!\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "private void updateItem(Item item) throws SQLException\n {\n int itemId = item.getId();\n logger.debug(\"Updating Item with id \" + itemId + \"...\");\n try(Statement statement = connection.createStatement())\n {\n String sql = MessageFormat.format(\"UPDATE Items SET (title, description, price) = ({0}, {1}, {2}) WHERE id = {3}\",\n escapeStringValue(item.getTitle()), escapeStringValue(item.getDescription()), item.getPrice(), itemId);\n statement.addBatch(sql);\n statement.addBatch(\"DELETE FROM Items_Locations WHERE item_id = \" + itemId);\n statement.executeBatch();\n addItemQuantitiesPerLocation(item);\n }\n logger.debug(\"Updated Item successfully.\");\n }", "void update(Serializable objectId);", "@Override\r\n\tpublic void updateItem(Items updateItem, String itemNameToUpdate) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t try\r\n\t\t {\r\n\t\t session.beginTransaction();\r\n\t\t Query query = session.createQuery(\"from Items where userName = :user AND ItemName = :item\");\r\n\t\t query.setParameter(\"user\", updateItem.getUserName());\r\n\t\t Items ifItemExist =(Items) query.setParameter(\"item\", itemNameToUpdate).uniqueResult();\r\n\t\t \r\n\t\t long id=0;\r\n\t\t if(ifItemExist != null){\r\n\t\t \tid = ifItemExist.getId();\r\n\t\t }\r\n\t\t System.out.println(id + \" \" + ifItemExist );\r\n\t\t Query query2 = session.createQuery(\"UPDATE Items SET status = :stat , itemName = :item , userName= :user , priority= :prio , dueDate= :date , note= :note\" +\r\n\t\t \" where id = :d\");\r\n\t\t query2.setParameter(\"stat\", updateItem.getStatus());\r\n\t\t query2.setParameter(\"item\", updateItem.getItemName());\r\n\t\t query2.setParameter(\"user\", updateItem.getUserName());\r\n\t\t query2.setParameter(\"prio\", updateItem.getPriority());\r\n\t\t query2.setParameter(\"date\", updateItem.getDueDate());\r\n\t\t query2.setParameter(\"note\", updateItem.getNote());\r\n\t\t query2.setParameter(\"d\", id);\r\n\t\t query2.executeUpdate();\r\n\t\t session.getTransaction().commit();\r\n\t\t \r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t}\r\n\t\t } \r\n\r\n\t}", "int updateByPrimaryKey(Body record);", "int updateByPrimaryKeySelective(ItemStockDO record);", "@Override\n public void update(Object object, Object id) throws DAOException {\n\n }", "int updateByPrimaryKey(Shareholder record);", "public int updateItem(Item item) {\n SQLiteDatabase db = DataBaseManager.getInstance().openDatabase();\n Log.d(\"ItemDbAdapter\", \"Update item: \" + item.getName() + \" \" + item.getId());\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, item.getName());\n values.put(KEY_ARRAY_ID, item.getArrayId());\n values.put(KEY_DESCRIPTION, item.getDescription());\n\n int rowcount = db.update(TABLE_ITEMS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(item.getId())});\n DataBaseManager.getInstance().closeDatabase();\n // updating row\n return rowcount;\n }", "@Override\n\tpublic int update(int id) {\n\t\treturn rolDao.update(id);\n\t}", "E update(ID id, E entity, RequestContext context);", "@Override\n public Long updateById(Store t, long id) {\n return null;\n }", "int updateByPrimaryKey(BasicEquipment record);", "public int updateItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n // updating record\n return db.update(TABLE_NAME, values, KEY_ID + \" = ?\", // update query to make changes to the existing record\n new String[]{String.valueOf(item.getId())});\n }", "Product updateProductById(Long id);", "int updateByPrimaryKey(Dish record);", "default E update(ID id, E entity) {\n return update(id, entity, null);\n }", "int updateByPrimaryKeySelective(HpItemParamItem record);", "int updateByPrimaryKey(ItoProduct record);", "int updateByPrimaryKey(Product record);", "int updateByPrimaryKey(Resource record);", "void update(Reservierung reservierung, int id) throws ReservierungException;", "int updateByPrimaryKey(SrmFundItem record);", "int updateId(T data, ID newId) throws SQLException, DaoException;", "void update( ExperimentDTO item );", "int updateByPrimaryKey(Forumpost record);", "public void UpdateItem(View view) {\n /*update a friend record given the id*/\n updateFriend(friendsDatabaseReference);\n /*the alternative*/\n// updateFriend_updateChildren(friendsDatabaseReference);\n }", "int updateByPrimaryKey(Goods record);", "int updateByPrimaryKey(Goods record);", "int updateByPrimaryKey(CartDO record);", "int updateByPrimaryKey(EquipmentOrder record);", "int updateByPrimaryKey(Model record);", "int updateByPrimaryKey(Storage record);", "int updateByPrimaryKey(Storage record);", "void setItemId(String itemId);", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"upItem\")\n\tpublic ZuelResult upItem(Long id) {\n\t\treturn service.upItem(id);\n\t}", "int updateByPrimaryKey(R_order record);", "int updateByPrimaryKey(ResourcePojo record);", "int updateByPrimaryKey(SysId record);", "int updateByPrimaryKey(Tourst record);", "int updateByPrimaryKeySelective(Sequipment record);", "@Test\n public void updateItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Update the Item in the mock database using the API method\n item.setName(\"Screwdriver\");\n item.setDescription(\"Hand Tool\");\n item.setDaily_rate(new BigDecimal(\"4.99\"));\n service.updateItem(item);\n\n // Test the updateItem() method\n verify(itemDao, times(1)).updateItem(itemArgumentCaptor.getValue());\n TestCase.assertEquals(item, itemArgumentCaptor.getValue());\n }", "int updateByPrimaryKey(GoodsPo record);", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "boolean updateById(T entity);", "int updateByPrimaryKey(Commet record);", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"updateItem\")\n\tpublic ZuelResult updateItem(TbItem item) throws Exception {\n\t\treturn service.updateItem(item);\n\t}", "@Override\n\tpublic void updateByid(Teatask ta)\n\t{\n\t\tteataskMapper.updateByid(ta);\n\t}", "int updateByPrimaryKey(TbComEqpModel record);", "public void updateItem(){\n\n System.out.println(\"Update item with ID: \");\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n System.out.println(\"Enter new characteristics: \");\n System.out.println(\"Name: \");\n String newName = bufferRead.readLine();\n System.out.println(\"Designer: \");\n String newDesigner = bufferRead.readLine();\n System.out.println(\"Price: \");\n int newPrice = Integer.parseInt(bufferRead.readLine());\n ClothingItem newCI = new ClothingItem(newName, newDesigner, newPrice);\n newCI.setId(id);\n this.ctrl.updateItem(newCI);\n\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "int updateByPrimaryKey(GirlInfo record);", "int updateByPrimaryKey(WxNews record);", "int updateByPrimaryKey(IceApp record);", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "int updateByPrimaryKey(SPerms record);", "int updateByPrimaryKey(NjOrderWork2 record);", "int updateByPrimaryKey(Shipping record);", "int updateByPrimaryKey(ClOrderInfo record);", "int updateByPrimaryKey(AccessModelEntity record);", "@Override\n @Transactional\n public void update(Item item) {\n Produto produto = item.getProduto();\n produtoDao.updateEstoqueProduto(produto.getQuantidade() - item.getQuantidade(), produto.getId());\n }", "int updateByPrimaryKey(BookInfo record);", "int updateByPrimaryKey(MEsShoppingCartDTO record);", "int updateByPrimaryKey(Article record);", "int updateByPrimaryKey(MenuInfo record);", "int updateByPrimaryKey(RecordLike record);", "int updateByPrimaryKey(ProductPricelistEntity record);", "int updateByPrimaryKey(TLinkman record);", "int updateByPrimaryKey(JzAct record);", "public T update(T item)\n {\n if (item instanceof User)\n {\n User user = (User) item;\n if (user.getId() == 1)\n {\n return item;\n }\n }\n return (T) this.entityManager.merge(item);\n\n }", "int updateByPrimaryKeySelective(ItemCategory record);", "int updateByPrimaryKey(Yqbd record);", "private void updateDB(final Item item) {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n TodoApplication.getDbHelper().writeItemToList(item);\n return null;\n }\n }.execute();\n }", "int updateByPrimaryKey(Position record);", "int updateByPrimaryKey(Prueba record);", "int updateByPrimaryKey(Basicinfo record);", "int updateByPrimaryKey(Dormitory record);", "@RequestMapping(method = RequestMethod.PUT, value = \"/{id}\",\n produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<?> updateInventoryByProductId(@PathVariable(\"id\") Integer id,\n @Valid @RequestBody InventoryUpdateRequest inventoryUpdateRequest){\n Inventory inventory = inventoryService.getInventoryItemByProductId(id);\n inventory.setAmount(inventoryUpdateRequest.getAmount());\n inventoryService.updateInventoryItem(inventory);\n\n return ResponseEntity.noContent().build();\n }" ]
[ "0.764277", "0.74899185", "0.7484369", "0.732285", "0.7235051", "0.7132104", "0.708143", "0.70270646", "0.69748724", "0.697359", "0.6964674", "0.69529635", "0.69529635", "0.6917001", "0.69124824", "0.68391097", "0.68093455", "0.6808773", "0.68076134", "0.6761301", "0.67506963", "0.67074805", "0.66987854", "0.66821796", "0.66802233", "0.6664806", "0.6655141", "0.6651881", "0.6651871", "0.66235197", "0.66170794", "0.66144973", "0.65991765", "0.65972304", "0.65971154", "0.6589442", "0.6588258", "0.6579935", "0.6540136", "0.65302646", "0.65244704", "0.65165675", "0.6511922", "0.6509582", "0.65053123", "0.6501657", "0.64899683", "0.6477357", "0.64754546", "0.64730424", "0.64730424", "0.646826", "0.6457656", "0.64545786", "0.644937", "0.644937", "0.6447946", "0.6438939", "0.6426361", "0.64187515", "0.6413627", "0.63939327", "0.6388774", "0.6385095", "0.6385052", "0.6383679", "0.638367", "0.6372935", "0.6372536", "0.636946", "0.63662124", "0.63519543", "0.6347749", "0.63437855", "0.63425714", "0.63403475", "0.63403475", "0.6335904", "0.6335735", "0.6327188", "0.63257194", "0.63251853", "0.6322408", "0.63221896", "0.6315424", "0.6314359", "0.631406", "0.6312656", "0.6310859", "0.6310108", "0.63044333", "0.63018614", "0.6300859", "0.63004327", "0.6295673", "0.6294676", "0.6294458", "0.6294446", "0.62919855", "0.62833273" ]
0.70516574
7
TODO Autogenerated method stub
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("type=text/html; charset=utf-8"); PrintWriter out = resp.getWriter(); String username = req.getParameter("username"); String password = req.getParameter("password"); out.print(username+"==="+password); req.getSession().setAttribute("remoteusername", username); req.getSession().setAttribute("remotepassword", password); Cookie c1 = new Cookie("cooUserName", username); Cookie c2 = new Cookie("cooPassword", password); c1.setPath("/"); c2.setPath("/"); resp.addCookie(c1); resp.addCookie(c2); c1.setMaxAge(60 * 60 * 24 * 14); c2.setMaxAge(60 * 60 * 24 * 14); RequestDispatcher dispatcher = req.getRequestDispatcher("/main.jsp"); dispatcher .forward(req, resp); //super.doPost(req, resp); }
{ "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 Fill in this function to compare by id This will allow us to use sort by id in Main.java
public int compare(Student st1, Student st2) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public int compare(Item a, Item b) {\n\t\t return a.get_id().compareTo(b.get_id());\n\t}", "public int getResourceSort(@Param(\"id\") String id);", "@Override\n\tpublic int compare(Person p1, Person p2) { //because this class implements Comparator \n\t\treturn p1.id-p2.id;\n\t}", "public static void main(String[] args) {\n\t\tRandom rnd = new Random();\n\t\tList<SomeObjectToCompare> myList = new ArrayList<>();\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tmyList.add(new SomeObjectToCompare(rnd.nextInt(100), new Integer(rnd.nextInt(50)).toString()));\n\t\t}\n\t\tfor (SomeObjectToCompare someObjectToCompare : myList) {\n\t\t\tSystem.out.println(someObjectToCompare);\n\t\t}\n\t\tSystem.out.println();\n//\t\tCollections.sort(myList,new Comparator<SomeObjectToCompare>() {\n//\t\t\t@Override\n//\t\t\tpublic int compare(SomeObjectToCompare o1, SomeObjectToCompare o2) {\n//\t\t\t\t// TODO Auto-generated method stub\n//\t\t\t\treturn o1.getId()-o2.getId();\n//\t\t\t}\t\t\t\n//\t\t});\n\t\t\n//\t\tCollections.sort(myList, (o1,o2) -> o1.getId()-o2.getId());\n\n\t\tCollections.sort(myList, SomeObjectToCompare::compareById);\n\t\t\n\t\tmyList.forEach(System.out::println);\n\t}", "@Override\r\n\t\t\t\tpublic int compare(Comparendo o1, Comparendo o2) \r\n\t\t\t\t{\n\t\t\t\t\treturn (new Integer(o1.id)).compareTo(o2.id);\r\n\t\t\t\t}", "public void sortEmployeeById() {\r\n\t\tfor (int indexI = 0; indexI < emp.size() - 1; indexI++) {\r\n\t\t\t\r\n\t\t\tfor (int indexJ = 0; indexJ < emp.size() - indexI - 1; indexJ++) {\r\n\t\t\t\t\r\n\t\t\t\tif (emp.get(indexJ).empId > emp.get(indexJ + 1).empId) {\r\n\t\t\t\t\tEmployee temp1 = emp.get(indexJ);\r\n\t\t\t\t\tEmployee temp2 = emp.get(indexJ + 1);\r\n\t\t\t\t\temp.set(indexJ, temp2);\r\n\t\t\t\t\temp.set(indexJ + 1, temp1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic int compare(Map<String, Object> arg0, Map<String, Object> arg1) {\n\t\tint i1 = (Integer) arg0.get(\"id\");\n\t\tint i2 = (Integer) arg1.get(\"id\");\n\t\tif(i1 < i2)\n\t\t\treturn 1;\n\t\telse if(i1 > i2)\n\t\t\treturn -1;\n\t\treturn 0;\n\t}", "public void sort() // sort according to primary key defined in RecordTemplate\n\t{\n\t\trecordList.sort((Record r1, Record r2)->r1.getValue(PRIMARY_KEY_FIELD_INDEX).compareTo(r2.getValue(PRIMARY_KEY_FIELD_INDEX))); \n //recordList.forEach((r)->System.out.println(r)); \n\t}", "public void orderById() {\n Collections.sort(customers, new Comparator() {\n\n public int compare(Object o1, Object o2) {\n return ((Customer)o1).getId().compareTo(((Customer)o2).getId());\n }\n });\n\n //avisa que a tabela foi alterada\n fireTableDataChanged();\n }", "@Override\n\t\t\t\t\tpublic int compare(messagewrapper lhs, messagewrapper rhs) {\n\t\t\t\t\t\treturn rhs.get_id()-lhs.get_id();\n\t\t\t\t\t}", "@Override\n\t\tpublic int compareTo(sampleObject so) {\n\t\t\tif (this.id < so.id)\n\t\t\t\treturn 1;\n\t\t\telse if (this.id > so.id)\n\t\t\t\treturn -1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}", "@Override\n\tpublic int compareTo(DIDURL id) {\n\t\tcheckNotNull(id, \"id is null\");\n\n\t\treturn toString().compareTo(id.toString());\n\t}", "@Override\n public ImmutableList<Id> topsortIdList() {\n return idDag.topsortIdList();\n }", "@Override\n\t\t\tpublic int compare(Sentence s1, Sentence s2) {\n\t\t\t\tif(s1.getId() < s2.getId()) return -1;\n\t\t\t\telse return 1;\n\t\t\t}", "@Override\n\tpublic int compare(Book o1, Book o2) {\n\t\treturn o1.getId()-o2.getId();\n\t}", "@Override\n\tpublic int compare(Employee o1, Employee o2) {\n if(o1.getId() > o2.getId()) \n {\n \treturn -1; \n }\n else if(o1.getId() < o2.getId())\n {\n \t return 1;\n }else\n {\n \t return 0; \n }\n\t\t\n\t}", "@Test(dependsOnMethods = \"verifyPayerSortTest\")\r\n\tpublic void verifyLoadIdSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickLoadIDColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// click LoadID Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickLoadIDColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// compare to the database when sorted by given column-Descending\r\n\t\tif (carrierschedulepayment.getRowCount() > 1)\r\n\t\t\tAssert.assertNotEquals(firstRowData, lastRowData,\r\n\t\t\t\t\t\"First Row Data: \\n\" + firstRowData + \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}", "public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }", "@Override\n public int compare(CartInfo o1, CartInfo o2) {\n return o1.getId().compareTo(o2.getId());\n }", "public int compare(String _id1, String _id2){\n\t\t\tTaskBean task1 = this.tasks.get(_id1);\r\n\t\t\tTaskBean task2 = this.tasks.get(_id2);\r\n\r\n\t\t\t//compare the two creation dates.\r\n\t\t\tDate creation1 = task1.getCreatedTime();\t \r\n\t\t\tDate creation2 = task2.getCreatedTime();\t \r\n\r\n\t\t\treturn creation1.compareTo(creation2);\r\n\t\t}", "@Override\n\tpublic int compareTo(Object o) {\n\t\tif(o instanceof Tree) {\n\t\t\tTree otherTree = (Tree) o;\n\t\t\treturn Integer.compare(id, otherTree.getId());\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "@Override\n public int compareTo(Author o) {\n return this.getId() - o.getId();\n }", "@Override\n\t\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\t\tSystem.out.println(\"comparision occur\");\n\t\t\tif (a instanceof IntPair && b instanceof IntPair) {\n\t\t\t\treturn ((IntPair) a).id.compareTo(((IntPair) b).id);\n\t\t\t}\n\t\t\treturn super.compare(a, b);\n\t\t}", "@Override\n public int compare(Card card1, Card card2) {\n return card2.getId().compareTo\n (card1.getId());\n }", "public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }", "@Override\n public List<Client> sortByNameAndID(){\n return null;\n }", "@Override\n public int compareTo(Object otherobject)\n {\n\n Stamp other = (Stamp) otherobject;\n if(id < other.getID())\n return -1;\n else if(id == other.getID())\n return 0;\n else\n return 1;\n }", "@Override\n\tpublic int compareTo(Resposta r) {\n\t\treturn this.id.compareTo(r.getId());\n\t}", "@Override\n\tpublic int compareTo(Object o) {\n\t\tMateriaPrima mp = (MateriaPrima)o; \n\t\treturn this.id - mp.id;\n\t}", "private void filter(IdentifierRecord id) {\n IdentifierRecord record = idMap.get(id.getInternalId());\n if (record != null) {\n int compare =\n HashConverter.getSha1(id.getId()).compareTo(HashConverter.getSha1(record.getId()));\n if (compare < 0) {\n incMetrics(IDENTICAL_GBIF_OBJECTS_COUNT);\n idMap.put(id.getInternalId(), id);\n idInvalidMap.put(record.getId(), record);\n } else {\n incMetrics(DUPLICATE_GBIF_IDS_COUNT);\n idInvalidMap.put(id.getId(), id);\n }\n log.error(\n \"GBIF ID collision, gbifId - {}, occurrenceId - {}\", id.getInternalId(), id.getId());\n } else {\n incMetrics(UNIQUE_GBIF_IDS_COUNT);\n idMap.put(id.getInternalId(), id);\n }\n }", "public static JwComparator<AcGlobalDevice> getIdComparator()\n {\n return AcGlobalDeviceTools.instance.getIdComparator();\n }", "@Override\r\n\tpublic int compareTo(Stud1 o) {\n\t\tif(this.getId()==o.getId())\r\n\t\t{\r\n\t\t\treturn +1;\r\n\t\t}\r\n\t\telse if(this.getId()<o.getId())\r\n\t\t{\r\n\t\t\treturn +1;\r\n\t\t}\r\n\t\telse\r\n\t\treturn +1;\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tTreeSet<Employee> list=new TreeSet<Employee>();\r\n\t\tlist.add(new Employee(1,\"Nisha\",\"Dhore\"));\r\n\t\tlist.add(new Employee(3,\"Shamal\",\"Dambe\"));\r\n\t\tlist.add(new Employee(4,\"Ravi\",\"Astarkar\"));\r\n\t\tlist.add(new Employee(2,\"Ram\",\"Astarkar\"));\r\n\t\tlist.add(new Employee(1,\"Manisha\",\"Oberoys\"));\r\n\t\t\r\n\t\t\r\n//\t\tTreeSet<Integer> t=new TreeSet();\r\n//\t\tt.add(1);\r\n//\t\tt.add(7);\r\n//\t\tt.add(5);\r\n//\t\tSystem.out.println(\"id sort\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"-------sort asce by id\"+list);\r\n//\t\tCollections.sort(list, new ComparatorId());\r\n//\t\tSystem.out.println(\"------After sort\"+list);\r\n//\t\t\r\n\t\tSystem.out.println(\"lastname sorting\");\r\n\t\t\r\n\t\tList<Employee> l=new ArrayList<Employee>(list);\r\n\t\tCollections.sort(l, new ComparatorFirstName());\r\n\t\tSystem.out.println(\"------After sort\"+l);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n int[] numArrays = new int[]{10,2,5,450};\n\n // 2. Lists\n // Limitations: no sorting without implementing sort methods\n // Pros: has easy to use methods for adding and removing\n List<Integer> numList = new ArrayList<>();\n// numList.addAll();\n numList.add(100);\n numList.add(33);\n numList.add(7821973);\n numList.add(4502332);\n\n // Sorting using Arrays sort method\n Arrays.sort(numArrays);\n System.out.println(Arrays.toString(numArrays));\n\n // Sorting using Lists\n Object[] copyArray = numList.toArray(); // convert into Arrays format\n Arrays.sort(copyArray);\n System.out.println(Arrays.toString(copyArray));\n\n // 3. Hash Map\n // Can take any two types of objects as parameters\n // Limitations: no sorting method\n Map<Integer, Student> studentID = new HashMap<>(); // String is the student name, id is the student id\n\n\n studentID.put(143434, new Student(\"hung\", 143434));\n studentID.put(2232, new Student(\"gaston\", 2232));\n studentID.put(36855, new Student(\"briana\", 36855));\n studentID.put(4929, new Student(\"charlie\", 4929));\n studentID.put(52827, new Student(\"miguel\", 52827));\n\n // Search through the student database by ID, I can get the student object/information\n for (Student student : studentID.values()) {\n if (student.id == 4929) {\n// System.out.println(student.name);\n// System.out.println(student.id);\n }\n }\n// System.out.println(studentID.get(2232).name);\n// System.out.println(studentID.containsKey(9999));\n\n List<Student> studentList = new ArrayList<>(studentID.values());\n\n System.out.println(studentList.get(0).name);\n\n// studentID.keySet(); // return all student ids\n// studentID.values(); // returns all student objects\n\n\n\n }", "public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}", "@Override\n\tpublic int compareTo(VectorComponent other) {\n\t\t// sorts descending, inconsistent with equals\n\t\treturn this.id == other.id ? 0 : this.id < other.id ? 1 : -1;\n\t}", "public static void main(String[] args) {\n\n\t\tMap <Student,Integer> m = new TreeMap<Student,Integer>(new sortById());\n\t\t\n\t\tm.put(new Student(1,\"anil\",\"prasad\") , 100);\n\t\tm.put(new Student(1,\"haridwar\",\"prasad\") , 200);\n\t\tm.put(new Student(2,\"durgesh\",\"mishra\") , 300);\n\t\tm.put(new Student(3,\"durgesh\",\"jugani\") , 400);\n\t\tSystem.out.println(m);\n\t\tfor(Map.Entry<Student,Integer> en :m.entrySet())\n\t\t{\n\t\t\tSystem.out.println(en.getKey());\n\t\t\tSystem.out.println(en.getValue());\n\t\t}\n\t\t\n\t List<Student> ss = new ArrayList<Student>(m.keySet());\n\t\tSystem.out.println(ss);\n\t\t List<Integer> st = new ArrayList<Integer>(m.values());\n\t\t\tSystem.out.println(st);\n\t}", "@Override\n\tpublic int compareTo(Object arg0) {\n\t\tif(id.equals(arg0.toString())) {\n\t\t\tSystem.out.println(\"true\");\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}", "@Override\n\tpublic int compare(Topic top1, Topic top2) \n\t{\n\t\treturn top1.getId().compareTo(top2.getId());\n\t}", "@Query(\"SELECT p FROM Person p ORDER BY p.id\")\nList<Person> findAllSortById();", "@Override\n\tpublic int compareTo(IntPair IP) {\n\t\tSystem.out.println(\"inside map sort\");\n\t\tint comp = id.compareTo(IP.id);\n\t\tif (comp != 0)\n\t\t\treturn comp;\n\t\tcomp = tag.compareTo(IP.tag);\n\t\treturn comp;\n\t}", "public static JwComparator<AcWebServiceRequestData> getIdComparator()\n {\n return AcWebServiceRequestDataTools.instance.getIdComparator();\n }", "@Override\n\t\tpublic int compare(Pecosa a, Pecosa b) {\n\t\t\tLong numa=a.getId().getPecnro();\n\t\t\tLong numb=b.getId().getPecnro();\n\t\t\treturn (int)(numa-numb);\n\t\t}", "@Override\r\n \tpublic int compareTo(Doc arg0) {\n \t\treturn this.getID()-arg0.getID();\r\n \t}", "protected Sort getSortASC() {\n Sort.Order order = new Sort.Order(Sort.Direction.ASC, \"id\");\n return Sort.by(order);\n }", "@Override\n public int compareTo(MensagemEleicao o) {\n int i = relogio.compareTo(o.relogio);\n if(i==0){ //se a comparação do relogio for igual\n if(id<o.getId()){ //usa o id maior como criterio de decisão;\n return -1;\n }\n return 1;\n }\n return i;\n }", "private int containsInOldList(ID id) {\n\t\tfor (Player player : playerList)\n\t\t\tif (player.getPlayerID().compareTo(id) == 0)\n\t\t\t\treturn playerList.indexOf(player);\n\t\treturn -1;\n\t}", "@Override\n\tpublic int compareTo(Object arg0) {\n\t\tNoeud a = (Noeud)this;\n\t\tNoeud b = (Noeud)arg0;\n\t\treturn a.getId() - b.getId();\n\t}", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "@Override\n\tpublic SortBean selectSortById(int id) {\n\t\tsql=\"select * from news_sort where sort_id=?\";\n\t\tDBUtil db = new DBUtil(sql);\n\t\ttry {\n\t\t\tdb.ps.setInt(1,id);\n\t\t\trs=db.ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tint s_id = rs.getInt(1);\n\t\t\t\tString s_name = rs.getString(2);\n\t\t\t\tString s_rss = rs.getString(3);\n\t\t\t\treturn new SortBean(s_id, s_name, s_rss);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tdb.close();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}", "@Override\n\tpublic int compare(EmployeeObj arg0, EmployeeObj arg1) {\n\t\tSystem.out.println(arg0.getEmpId());\n\t\tif(arg0.getEmpId() > arg1.getEmpId())\n\t\t\treturn arg1.getEmpId();\n\t\telse \n\t\t\treturn arg0.getEmpId();\n\t}", "public String sortBy();", "private List<Score> order(List<Score> s)\n {\n Collections.sort(s, new Comparator<Score>()\n {\n\n @Override\n public int compare(Score o1, Score o2) {\n // TODO Auto-generated method stub\n\n return o1.getSentId() - o2.getSentId();\n }\n });\n return s;\n }", "public void sortMatches();", "public int compareTo(Object obj) {\n AuthorizationId otherItem = (AuthorizationId)obj;\n if (this.userId.compareTo(otherItem.userId) != 0) {\n return this.userId.compareTo(otherItem.userId);\n }\n if (this.projectId.compareTo(otherItem.projectId) != 0) {\n return this.projectId.compareTo(otherItem.projectId);\n }\n return 0;\n }", "@Override\n\tpublic int compareTo(Book o) {\n\t\treturn this.bookId - o.bookId;\n\t}", "@Override\n\tpublic Collection<Symptom> getSortedSymptoms(Long id) {\n\t\tDisease d = diseaseRepository.getOne(id);\n\t\tArrayList<Symptom> symptoms = new ArrayList<>(d.getSymptoms());\n\t\tCollections.sort(symptoms, new Comparator<Symptom>() {\n\t\t\tpublic int compare(Symptom s1, Symptom s2) {\n\t\t\t\treturn s1.getSymptomType().compareTo(s2.getSymptomType());\n\t\t\t}\n\t\t});\n\t\treturn symptoms;\n\t}", "public List<News> getNewsList(Integer id) {\n List<News> newsList = newsMapper.selectByAuthorId(id);\n newsList.sort((dt1,dt2) -> {\n if (dt1.getPubdate().getTime() < dt2.getPubdate().getTime()) {\n return 1;\n } else if (dt1.getPubdate().getTime() > dt2.getPubdate().getTime()) {\n return -1;\n } else {\n return 0;\n }\n });\n return newsList;\n }", "public String doSort();", "ExchangeOrder selectByPrimaryKey(String id);", "@Override\n\tpublic int compare(Student o1, Student o2) {\n\t\treturn -o1.getId().compareTo(o2.getId());\n\t}", "@Override\n public int compareTo(Message m) {\n if (this.id > m.id) {\n return -1;\n }\n if (this.id < m.id) {\n return 1;\n }\n return 0;\n }", "@Override\r\n\tpublic int compareTo(employee empobj) {\n\t\tif(this.id==empobj.id){\r\n\t\t\treturn 0;\r\n\t\t\t\r\n\t\t}else if(this.id>empobj.id){\r\n\t\t\t\r\n\t\t\treturn 1;\r\n\t\t}else if(this.id<empobj.id)\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn id;\r\n\t}", "R_order selectByPrimaryKey(Integer oId);", "private void sortCoreTypes() {\n\t\tArrays.sort(coreBuiltin, (o1, o2) -> Long.compare(o1.id, o2.id));\n\t}", "@Override\n public int compare(Score o1, Score o2) {\n\n return o1.getSentId() - o2.getSentId();\n }", "public ArrayList<Comment> getAllCommentsByAnswerIdSortedByDate(int answerId) {\n \t\tArrayList<Comment> sortedComments = new ArrayList<Comment>();\n \t\tAnswer currentAnswer = this.getAnswerById(answerId);\n \t\tfor (Comment currentComment : this.getComments()) {\n \t\t\tif (currentComment.getCommentedVotable().equals(currentAnswer))\n \t\t\t\tsortedComments.add(currentComment);\n \t\t}\n \t\tCollections.sort(sortedComments, new DateComparator());\n \t\treturn sortedComments;\n \t}", "public static JwComparator<AcDomesticCandidateRouteLeg> getIdComparator()\n {\n return AcDomesticCandidateRouteLegTools.instance.getIdComparator();\n }", "private boolean sort(long codeSystemVersionId){\n org.hibernate.Session hb_session = HibernateUtil.getSessionFactory().openSession();\n hb_session.getTransaction().begin();\n boolean s = false;\n try\n {\n String hql = \"select distinct csev from CodeSystemEntityVersion csev\";\n hql += \" join fetch csev.codeSystemMetadataValues csmv\";\n hql += \" join fetch csmv.metadataParameter mp\";\n hql += \" join fetch csev.codeSystemEntity cse\";\n hql += \" join fetch cse.codeSystemVersionEntityMemberships csvem\";\n hql += \" join fetch csvem.codeSystemVersion csv\";\n \n \n HQLParameterHelper parameterHelper = new HQLParameterHelper();\n parameterHelper.addParameter(\"csv.\", \"versionId\", codeSystemVersionId);\n\n // Parameter hinzufügen (immer mit AND verbunden)\n hql += parameterHelper.getWhere(\"\");\n logger.debug(\"HQL: \" + hql);\n\n // Query erstellen\n org.hibernate.Query q = hb_session.createQuery(hql);\n\n // Die Parameter können erst hier gesetzt werden (übernimmt Helper)\n parameterHelper.applyParameter(q);\n \n List<CodeSystemEntityVersion> csevList = q.list();\n \n HashMap<Integer,CodeSystemEntityVersion> workList = new HashMap<Integer, CodeSystemEntityVersion>();\n ArrayList<Integer> sortList = new ArrayList<Integer>();\n \n Iterator<CodeSystemEntityVersion> iter = csevList.iterator();\n while(iter.hasNext()){\n boolean found = false;\n CodeSystemEntityVersion csev = (CodeSystemEntityVersion)iter.next();\n \n //Get the Level\n int level = 0;\n Iterator<CodeSystemMetadataValue> iter1 = csev.getCodeSystemMetadataValues().iterator();\n while(iter1.hasNext()){\n CodeSystemMetadataValue csmv = (CodeSystemMetadataValue)iter1.next();\n if(csmv.getMetadataParameter().getParamName().equals(\"Level\")){\n\n String cleaned = csmv.getParameterValue();\n \n if(cleaned.contains(\" \"))\n cleaned = cleaned.replace(\" \", \"\");\n\n level = Integer.valueOf(cleaned);\n }\n }\n \n if(level == lowestLevel){\n \n CodeSystemVersionEntityMembershipId csvemId = null;\n Set<CodeSystemVersionEntityMembership> csvemSet = csev.getCodeSystemEntity().getCodeSystemVersionEntityMemberships();\n Iterator<CodeSystemVersionEntityMembership> it = csvemSet.iterator();\n while(it.hasNext()){\n \n CodeSystemVersionEntityMembership member = (CodeSystemVersionEntityMembership)it.next();\n if(member.getCodeSystemEntity().getId().equals(csev.getCodeSystemEntity().getId())\n && member.getCodeSystemVersion().getVersionId().equals(codeSystemVersionId)){\n \n csvemId = member.getId();\n }\n }\n \n CodeSystemVersionEntityMembership c = (CodeSystemVersionEntityMembership)hb_session.get(CodeSystemVersionEntityMembership.class, csvemId);\n c.setIsMainClass(Boolean.TRUE);\n hb_session.update(c);\n \n workList.put(level, csev);\n sortList.add(level);\n }else{\n \n int size = sortList.size();\n int count = 0;\n while(!found){\n \n if((sortList.get(size-(1+count))-level) == -1){\n \n //Setting MemberShip isMainClass false\n CodeSystemVersionEntityMembershipId csvemId = null;\n Set<CodeSystemVersionEntityMembership> csvemSet = csev.getCodeSystemEntity().getCodeSystemVersionEntityMemberships();\n Iterator<CodeSystemVersionEntityMembership> it = csvemSet.iterator();\n while(it.hasNext()){\n\n CodeSystemVersionEntityMembership member = (CodeSystemVersionEntityMembership)it.next();\n if(member.getCodeSystemEntity().getId().equals(csev.getCodeSystemEntity().getId())\n && member.getCodeSystemVersion().getVersionId().equals(codeSystemVersionId)){\n\n csvemId = member.getId();\n }\n }\n\n CodeSystemVersionEntityMembership c = (CodeSystemVersionEntityMembership)hb_session.get(CodeSystemVersionEntityMembership.class, csvemId);\n c.setIsMainClass(Boolean.FALSE);\n hb_session.update(c);\n \n found = true;\n sortList.add(level);\n workList.put(level, csev);\n CodeSystemEntityVersion csevPrev = workList.get(sortList.get(size-(1+count)));\n \n CodeSystemEntityVersionAssociation association = new CodeSystemEntityVersionAssociation(); \n association.setCodeSystemEntityVersionByCodeSystemEntityVersionId1(new CodeSystemEntityVersion());\n association.getCodeSystemEntityVersionByCodeSystemEntityVersionId1().setVersionId(csevPrev.getVersionId());\n association.setCodeSystemEntityVersionByCodeSystemEntityVersionId2(new CodeSystemEntityVersion());\n association.getCodeSystemEntityVersionByCodeSystemEntityVersionId2().setVersionId(csev.getVersionId());\n association.setAssociationKind(2); // 1 = ontologisch, 2 = taxonomisch, 3 = cross mapping \n association.setLeftId(csevPrev.getVersionId()); // immer linkes Element also csev1\n association.setAssociationType(new AssociationType()); // Assoziationen sind ja auch CSEs und hier muss die CSEVid der Assoziation angegben werden.\n association.getAssociationType().setCodeSystemEntityVersionId(4L);\n // Weitere Attribute setzen\n association.setStatus(Definitions.STATUS_CODES.ACTIVE.getCode());\n association.setStatusDate(new Date());\n association.setInsertTimestamp(new Date());\n // Beziehung abspeichern\n hb_session.save(association);\n \n CodeSystemEntityVersion csevLoc = (CodeSystemEntityVersion)hb_session.get(CodeSystemEntityVersion.class, csevPrev.getVersionId());\n if(csevLoc.getIsLeaf() != Boolean.FALSE){\n csevLoc.setIsLeaf(Boolean.FALSE);\n hb_session.update(csevLoc);\n }\n\n }else{\n count++; \n found=false;\n }\n } \n }\n }\n \n hb_session.getTransaction().commit();\n s = true;\n }\n catch (Exception e)\n {\n hb_session.getTransaction().rollback();\n s = false;\n logger.error(\"[\" + this.getClass().getCanonicalName() + \"] Fehler bei initList(): \" + e.getMessage());\n }\n finally\n {\n hb_session.close();\n }\n return s;\n }", "public ArrayList<Comment> getAllCommentsByQuestionIdSortedByDate(\n \t\t\tint questionId) {\n \t\tArrayList<Comment> sortedComments = new ArrayList<Comment>();\n \t\tQuestion currentQuestion = this.getQuestionById(questionId);\n \t\tfor (Comment currentComment : this.getComments()) {\n \t\t\tif (currentComment.getCommentedVotable().equals(currentQuestion))\n \t\t\t\tsortedComments.add(currentComment);\n \t\t}\n \t\tCollections.sort(sortedComments, new DateComparator());\n \t\treturn sortedComments;\n \t}", "List<Comment> findCommentsToLifeHackSortByLikesAmount(long id) throws DaoException;", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\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}", "@Override\r\n\tpublic int compareTo(ZoneID arg0) {\n\t\tif(this.id == arg0.getId())\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn this.id > arg0.getId() ? -1 : 1;\r\n\t}", "@Override\n\tpublic List<Primaryuser> findAllOrderByIdDesc() throws Exception {\n\t\treturn primaryRepository.findAll(Sort.by(Sort.Direction.DESC,\"id\"));\n\t}", "public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}", "@Override\n\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\tOrderBean aa=(OrderBean)a;\n\t\tOrderBean bb=(OrderBean)b;\n\t\treturn aa.getOrderId().compareTo(bb.getOrderId());\n\t}", "private int searchId(String id){\n\t\tint index = -1; // -1(존재안함)\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++){\n\t\t\tif(id.equals(list.get(i).getId())){\n\t\t\t\t//stu = list.get(i);\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\t\t\t\t\n\t\treturn index;\n\t}", "protected void sortMenuById (List<MenuItem> menuList) {\n menuList.sort(MenuItem::compareTo);\n// sortedMenuList.addAll(menuList);\n// return sortedMenuList;\n }", "@Override\n public int compareTo(RevisionId o) {\n return isProduction() != o.isProduction() ? Boolean.compare(isProduction(), o.isProduction())\n : Long.compare(number, o.number);\n }", "public int compareID(Integer o) {\n\t\treturn ((Integer) (applicant.getUserID())).compareTo(o);\n\n\t}", "@Override\r\n public int compareTo(AccessCard o) {\r\n return Integer.compare(this.id, o.getId());\r\n }", "@Override\n\tpublic int compare(ClsDesgloseDePedido ID0, ClsDesgloseDePedido Id1) {\n\n\t\t/**\n\t\t * Variables que recogen el Numero de Pedidos para compararlos\n\t\t */\n\t\tInteger a = ID0.getNumeroDePedido();\n\t\tInteger b = Id1.getNumeroDePedido();\n\n\t\treturn a.compareTo(b);\n\t}", "priorizedListObject find( int id ) throws DAOException;", "@Override\n public int compare(Bloque b1, Bloque b2) {\n if (b1.frecuencia != b2.frecuencia){\n return b1.frecuencia -b2.frecuencia;\n }\n return b1.id.compareTo(b2.id);\n }", "@Query(\"age = ? order by id asc\")\n List<PersonDocument> findByAgeSortedById(Integer age);", "@Override\r\n\tpublic int compare(Bill o1, Bill o2) {\n\t\treturn o1.billId-o2.billId;\r\n\t}", "private DBObject buildSortSpec(final GetObjectInformationParameters params) {\n\t\tfinal DBObject sort = new BasicDBObject();\n\t\tif (params.isObjectIDFiltersOnly()) {\n\t\t\tsort.put(Fields.VER_WS_ID, 1);\n\t\t\tsort.put(Fields.VER_ID, 1);\n\t\t\tsort.put(Fields.VER_VER, -1);\n\t\t}\n\t\treturn sort;\n\t}", "@Override\r\n public int compareTo(Student stud) \r\n {\r\n Student s = (Student) stud;\r\n return studentId - s.studentId;\r\n }", "public List<Object[]> getAllMusicSortedByPrice(String id) {\r\n\r\n\t\t List<Object[]> allMusicSortedByPrice = musicRepository.getAllMusicSortedByPrice(id);\r\n\t\t\r\n\t\tSystem.out.println(\"allMusicSortedByPrice**\"+allMusicSortedByPrice.toString());\r\n\t\t\r\n\t\treturn allMusicSortedByPrice;\r\n\r\n\t}", "@Override\n\t\t\tpublic int compare(Integer ano1, Integer ano2) {\n\t\t\t\treturn ano1.compareTo(ano2);\n\t\t\t}", "public int compareTo(LogError e1) {\n\t\treturn this.id - e1.getId();\n\t}", "@Override\n\t\tpublic int compare(Object a, Object b) {\n\t\t\tif(hm.get(a)>hm.get(b))\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t}", "void sortUI();", "public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}", "@Override\n public int compare( ArtifactMetadata o1, ArtifactMetadata o2 )\n {\n int result =\n new DefaultArtifactVersion( o2.getVersion() ).compareTo( new DefaultArtifactVersion( o1.getVersion() ) );\n return result != 0 ? result : o1.getId().compareTo( o2.getId() );\n }", "public static void doSort ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\n\t\t// save the current selections\n\t\tSet selectedSet = new TreeSet();\n\t\tString[] selectedItems = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif(selectedItems != null)\n\t\t{\n\t\t\tselectedSet.addAll(Arrays.asList(selectedItems));\n\t\t}\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, selectedSet);\n\n\t\tString criteria = params.getString (\"criteria\");\n\n\t\tif (criteria.equals (\"title\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_DISPLAY_NAME;\n\t\t}\n\t\telse if (criteria.equals (\"size\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_CONTENT_LENGTH;\n\t\t}\n\t\telse if (criteria.equals (\"created by\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_CREATOR;\n\t\t}\n\t\telse if (criteria.equals (\"last modified\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_MODIFIED_DATE;\n\t\t}\n\t\telse if (criteria.equals(\"priority\") && ContentHostingService.isSortByPriorityEnabled())\n\t\t{\n\t\t\t// if error, use title sort\n\t\t\tcriteria = ResourceProperties.PROP_CONTENT_PRIORITY;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_DISPLAY_NAME;\n\t\t}\n\n\t\tString sortBy_attribute = STATE_SORT_BY;\n\t\tString sortAsc_attribute = STATE_SORT_ASC;\n\t\tString comparator_attribute = STATE_LIST_VIEW_SORT;\n\t\t\n\t\tif(state.getAttribute(STATE_MODE).equals(MODE_REORDER))\n\t\t{\n\t\t\tsortBy_attribute = STATE_REORDER_SORT_BY;\n\t\t\tsortAsc_attribute = STATE_REORDER_SORT_ASC;\n\t\t\tcomparator_attribute = STATE_REORDER_SORT;\n\t\t}\n\t\t// current sorting sequence\n\t\tString asc = NULL_STRING;\n\t\tif (!criteria.equals (state.getAttribute (sortBy_attribute)))\n\t\t{\n\t\t\tstate.setAttribute (sortBy_attribute, criteria);\n\t\t\tasc = Boolean.TRUE.toString();\n\t\t\tstate.setAttribute (sortAsc_attribute, asc);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// current sorting sequence\n\t\t\tasc = (String) state.getAttribute (sortAsc_attribute);\n\n\t\t\t//toggle between the ascending and descending sequence\n\t\t\tif (asc.equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tasc = Boolean.FALSE.toString();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tasc = Boolean.TRUE.toString();\n\t\t\t}\n\t\t\tstate.setAttribute (sortAsc_attribute, asc);\n\t\t}\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tComparator comparator = ContentHostingService.newContentHostingComparator(criteria, Boolean.getBoolean(asc));\n\t\t\tstate.setAttribute(comparator_attribute, comparator);\n\t\t\t\n\t\t\t// sort sucessful\n\t\t\t// state.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t}\t// if-else\n\n\t}", "@Override\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\treturn arg1.compareTo(arg0);\n\t\t\t}", "@Override\r\n\t\t\t\tpublic int compare(Property o1, Property o2) {\n\t\t\t\t\treturn Integer.compare(o1.getRealty().getRealtyID(),o2.getRealty().getRealtyID());\r\n\t\t\t\t}", "public int compare(int rowId1, int rowId2) {\n assert _sortedRowIds != null;\n return _fileReader.compare(_sortedRowIds[rowId1], _sortedRowIds[rowId2]);\n }", "public int compare(int a, int b) {\n //System.err.println(\"compare \" + a + \" with \" + b);\n return comparer.compare((NodeInfo)sequence.itemAt(a),\n (NodeInfo)sequence.itemAt(b));\n }" ]
[ "0.66603285", "0.66275465", "0.6570242", "0.65484405", "0.64419794", "0.64321125", "0.6283113", "0.6128097", "0.61222786", "0.61071587", "0.6103898", "0.60961473", "0.60597503", "0.60328555", "0.60236204", "0.60051537", "0.5998534", "0.5979876", "0.5928999", "0.58971906", "0.5878504", "0.5854557", "0.58148885", "0.58031416", "0.57988024", "0.5797647", "0.572834", "0.5720019", "0.5712746", "0.5704288", "0.5703485", "0.56994236", "0.56665254", "0.5664216", "0.5659292", "0.5657567", "0.5654859", "0.56518006", "0.5645706", "0.56455934", "0.5629206", "0.56257445", "0.562406", "0.5622766", "0.5618319", "0.55792683", "0.5578843", "0.55786204", "0.5567095", "0.5562122", "0.55510545", "0.55286515", "0.55227065", "0.5514145", "0.5507694", "0.5501684", "0.55003047", "0.5497126", "0.5491064", "0.5488297", "0.54806495", "0.54749316", "0.54666287", "0.5465763", "0.54538715", "0.5452895", "0.54449016", "0.5442219", "0.54402333", "0.5439245", "0.5430478", "0.5417062", "0.54060996", "0.54058105", "0.54014707", "0.5395103", "0.539452", "0.53927255", "0.5364829", "0.5361451", "0.53493154", "0.53485364", "0.5340154", "0.53386176", "0.5332524", "0.5330301", "0.53285474", "0.53273803", "0.5321206", "0.531922", "0.5315352", "0.53126603", "0.5309576", "0.5308405", "0.5306563", "0.53017807", "0.529309", "0.5290153", "0.52871114", "0.5285705", "0.528105" ]
0.0
-1
DAOmetodologiaJson modelSuper = DAOmetodologiaJson.getInstance(); modelSuper.addAllStruct(); model.put("empresas", modelSuper.getAllEmp()); model.put("periodosDesde", modelSuper.getAllPeriodos()); model.put("periodosHasta", modelSuper.getAllPeriodos()); model.put("metodologias", modelSuper.getAllMetodogologia());
public ModelAndView inicioMetodologiaModificacion(Request req, Response res){ return new ModelAndView(model, "metodologiaModificacion.hbs"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(method = RequestMethod.GET, value = \"/pruebaConsulta.do\")\n public @ResponseBody\n void pruebaConsulta(Model model)\n {\n String idEstado = \"15\";\n// //Fabricacion de objeto\n MunicipiosJSON municipiosJSON = new MunicipiosJSON();\n try\n {\n //Track tiempo\n Calendar ahora1 = Calendar.getInstance();\n long tiempo1 = ahora1.getTimeInMillis();\n municipiosJSON = daoCodigosPostales.municipiosEstado(\"15\");\n\n //Operacion realizada con exito\n municipiosJSON.setStatusJSON(true);\n Calendar ahora2 = Calendar.getInstance();\n long tiempo2 = ahora2.getTimeInMillis();\n long total = tiempo2 - tiempo1;\n System.out.println(\"Operacion con exito en \" + total + \"ms\");\n\n } catch(Exception e)\n {\n e.printStackTrace();\n //Error en consulta\n municipiosJSON.setStatusJSON(false);\n\n }\n\n }", "public CalMetasDTO leerRegistro() {\n/* */ try {\n/* 56 */ CalMetasDTO reg = new CalMetasDTO();\n/* 57 */ reg.setCodigoCiclo(this.rs.getInt(\"codigo_ciclo\"));\n/* 58 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 59 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 60 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 61 */ reg.setDescripcion(this.rs.getString(\"descripcion\"));\n/* 62 */ reg.setJustificacion(this.rs.getString(\"justificacion\"));\n/* 63 */ reg.setValorMeta(this.rs.getDouble(\"valor_meta\"));\n/* 64 */ reg.setTipoMedicion(this.rs.getString(\"tipo_medicion\"));\n/* 65 */ reg.setFuenteDato(this.rs.getString(\"fuente_dato\"));\n/* 66 */ reg.setAplicaEn(this.rs.getString(\"aplica_en\"));\n/* 67 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 68 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 69 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 70 */ reg.setMes01(this.rs.getString(\"mes01\"));\n/* 71 */ reg.setMes02(this.rs.getString(\"mes02\"));\n/* 72 */ reg.setMes03(this.rs.getString(\"mes03\"));\n/* 73 */ reg.setMes04(this.rs.getString(\"mes04\"));\n/* 74 */ reg.setMes05(this.rs.getString(\"mes05\"));\n/* 75 */ reg.setMes06(this.rs.getString(\"mes06\"));\n/* 76 */ reg.setMes07(this.rs.getString(\"mes07\"));\n/* 77 */ reg.setMes08(this.rs.getString(\"mes08\"));\n/* 78 */ reg.setMes09(this.rs.getString(\"mes09\"));\n/* 79 */ reg.setMes10(this.rs.getString(\"mes10\"));\n/* 80 */ reg.setMes11(this.rs.getString(\"mes11\"));\n/* 81 */ reg.setMes12(this.rs.getString(\"mes12\"));\n/* 82 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 83 */ reg.setTipoGrafica(this.rs.getString(\"tipo_grafica\"));\n/* 84 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 85 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 86 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 87 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 88 */ reg.setNombreTipoMedicion(this.rs.getString(\"nombreTipoMedicion\"));\n/* 89 */ reg.setNombreEstado(this.rs.getString(\"nombreEstado\"));\n/* 90 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* */ \n/* */ try {\n/* 93 */ reg.setNumeroAcciones(this.rs.getInt(\"acciones\"));\n/* */ }\n/* 95 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 99 */ return reg;\n/* */ }\n/* 101 */ catch (Exception e) {\n/* 102 */ e.printStackTrace();\n/* 103 */ Utilidades.writeError(\"CalPlanMetasFactory:leerRegistro \", e);\n/* */ \n/* 105 */ return null;\n/* */ } \n/* */ }", "private void cargaDatosBasicos(Model model) {\r\n\t\t\tLong t1 = System.currentTimeMillis();\r\n\t\t\tAccionesMGCBusquedaForm form = null;\r\n\t\t\tLinkedHashMap<String, String> dias = UtilFechas.getDias();\r\n\t\t\tLinkedHashMap<String, String> meses = UtilFechas.getMeses();\r\n\t\t\tLinkedHashMap<String, String> anios = UtilFechas.getAnios();\r\n\t\t\tmodel.addAttribute(\"dias\", dias);\r\n\t\t\tmodel.addAttribute(\"meses\", meses);\r\n\t\t\tmodel.addAttribute(\"anios\", anios);\r\n\t\t\tif (!model.containsAttribute(\"formulario\")) {\r\n\t\t\t\tform = new AccionesMGCBusquedaForm();\r\n\t\t\t\tmodel.addAttribute(\"formulario\", form);\r\n\t\t\t} else {\r\n\t\t\t\tform = (AccionesMGCBusquedaForm) model.asMap().get(\"formulario\");\r\n\t\t\t}\r\n\t/* Se ajusta para mercado TTV \r\n\t\ttry {\r\n\t\t\t\tint tipoMercado = form.getTipoMercado() == IAcciones.TIPO_MERCADO_REPOS ? IMercadoDao.REPOS\r\n\t\t\t\t\t\t: IMercadoDao.ACCIONES;\r\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\t\tif (StringUtils.isNotEmpty(fechaConsulta)\r\n\t\t\t\t\t\t&& !fechaConsulta.equals(sdf.format(new Date()))) {\r\n\t\t\t\t\tcal.setTime(sdf.parse(fechaConsulta));\r\n\t\t\t\t}\r\n\t\t\t\tString mensajeHorario = this.mercadoDao.mercadoAbierto(cal,\r\n\t\t\t\t\t\ttipoMercado, true);\r\n\t\t\t\tmodel.addAttribute(\"horarioAcciones\", mensajeHorario);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlog.error(\"Error al cargar mensajeHorario\", e);\r\n\t\t\t}\r\n\t*/\r\n\t\t\ttry {\r\n\t\t\t\tint tipoMercado = IAccionesMGC.TIPO_MERCADO_REPOS_MGC; \r\n//\t\t\t\t? IMercadoDao.REPOS : IMercadoDao.ACCIONES ;\r\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\t\tif (StringUtils.isNotEmpty(fechaConsulta)\r\n\t\t\t\t\t\t&& !fechaConsulta.equals(sdf.format(new Date()))) {\r\n\t\t\t\t\tcal.setTime(sdf.parse(fechaConsulta));\r\n\t\t\t\t}\r\n\t\t\t\tString mensajeHorario = this.mercadoDao.mercadoAbierto(cal,\r\n\t\t\t\t\t\ttipoMercado, true);\r\n\t\t\t\tmodel.addAttribute(\"horarioAcciones\", mensajeHorario);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlog.error(\"Error al cargar mensajeHorario\", e);\r\n\t\t\t}\r\n\t//*\r\n\t\t\t\r\n\t\t\tLong t2 = System.currentTimeMillis();\r\n\t\t\tLong t = (t2 - t1) / 1000;\r\n\t\t\tlog\r\n\t\t\t\t\t.info(\"El tiempo en el método cargaDatosBasicos de ResumenAccionesMGCPortlet es =\"\r\n\t\t\t\t\t\t\t+ t);\r\n\t\t}", "@CrossOrigin\r\n @RequestMapping(value = \"/especialidad\", method = RequestMethod.GET, headers = {\"Accept=application/json\"})\r\n @ResponseBody\r\n String buscarTodos() throws Exception {\r\n String mensajito = \"nada\";\r\n ObjectMapper maper = new ObjectMapper();\r\n\r\n ArrayList<Especialidades> especialidad = new ArrayList<Especialidades>();\r\n especialidad = (ArrayList<Especialidades>) daoesp.findAll();\r\n //usamos del paquete fasterxml de json la clase objetMapper\r\n\r\n return maper.writeValueAsString(especialidad);\r\n\r\n }", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "private ArrayList<ServiceModel> getServiceModelJSON(JSONObject obj) {\n ArrayList<ServiceModel> servicesModel = new ArrayList<>();\n\n try {\n JSONArray servicesArray = obj.getJSONArray(\"services\");\n int limit = servicesArray.length();\n\n for (int i = 0; i < limit; i++) {\n JSONObject service = servicesArray.getJSONObject(i);\n\n ServiceModel serviceModel = new ServiceModel();\n\n serviceModel.setId(service.getInt(\"ID_SERVICE\"));\n serviceModel.setName(Conexion.decode(service.getString(\"NAME_SERVICE\")));\n serviceModel.setReserved(service.getInt(\"RESERVED_SERVICE\"));\n serviceModel.setDescription(Conexion.decode(service.getString(\"DESCRIPTION_SERVICE\")));\n serviceModel.setImage(service.getString(\"IMAGE_SERVICE\"));\n serviceModel.setIdType(service.getInt(\"ID_TYPE_SERVICE\"));\n serviceModel.setNameType(Conexion.decode(service.getString(\"NAME_TYPE_SERVICE\")));\n serviceModel.setValueType(service.getInt(\"VALUE_TYPE_SERVICE\"));\n\n serviceModel.setServicePrice(serviceServicePrice.getServicePriceModelJSON(service, serviceModel.getId(), false));\n servicesModel.add(serviceModel);\n }\n\n } catch (JSONException e) {\n System.out.println(\"Error: Objeto no convertible, \" + e.toString());\n e.printStackTrace();\n }\n return servicesModel;\n }", "private void TampilData(){\n try{ //\n String sql = \"SELECT * FROM buku\"; // memanggil dari php dengan tabel buku\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n rss = stt.executeQuery(sql); \n while (rss.next()){ \n Object[] o = new Object [3]; // membuat array 3 dimensi dengan nama object\n \n o[0] = rss.getString(\"judul\"); // yang pertama dengan ketentuan judul\n o[1] = rss.getString(\"penulis\"); // yang kedua dengan ketentuan penulis\n o[2] = rss.getInt(\"harga\"); // yang ketiga dengan ketentuan harga\n model.addRow(o); // memasukkan baris dengan mengkonekan di tabel model\n } \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "public Model() {\r\n\t\t\tsuper();\r\n\t\t\tdao=new SerieADAO();\r\n\t\t\tthis.mapSeason=new HashMap<>();\r\n\t\t\tthis.mapTeam=new HashMap<>();\r\n\t\t\tthis.mapTeamBySeason=new HashMap<>();\r\n\t\t\tthis.mapMatch=new HashMap<>();\r\n\t\t\tthis.mapMatchBySeason=new HashMap<>();\r\n\r\n\t\r\n\t\t}", "public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }", "private void getData() {\n ArticleBean articleBean = new ArticleBean();\n articleBean.setTime(\"1月16日\");\n articleBean.setTitle(\"文章内容\");\n articleBean.setName(\"xzh\");\n mList.add(articleBean);\n mList.add(articleBean);\n mList.add(articleBean);\n }", "private void setDataModel() {\r\n tableData = new Object[resultSet.size()][classFields.length];\r\n // for every object from collection of objects\r\n for (int i = 0; i < resultSet.size(); i++) {\r\n // for every fields from class of object\r\n for (int j = 0; j < classFields.length; j++) {\r\n // for every method from class of object\r\n for (int x = 0; x < classMethods.length; x++) {\r\n // if class name start with 'get' and class method name\r\n // lenght is equal to field name + 3 (becouse of get word)\r\n if ((classMethods[x].getName().startsWith(\"get\"))\r\n && (classMethods[x].getName().length() == (classFields[j].getName().length() + 3))) {\r\n // if class name to lowercase ends with field name to\r\n // lower case\r\n if (classMethods[x].getName().toLowerCase().endsWith(classFields[j].getName().toLowerCase())) {\r\n // then try to invoke that getter\r\n try {\r\n tableData[i][j] = classMethods[x].invoke(resultSet.get(i));\r\n } catch (IllegalAccessException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n // This is alternative method for obtaining getter for field but\r\n // it will need public fields\r\n // try {\r\n // fieldValue = pola[j].get(resultSet.get(i));\r\n // data[i][j]=fieldValue;\r\n // } catch (IllegalArgumentException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // } catch (IllegalAccessException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // }\r\n }\r\n }\r\n }", "BaseDatosMemoria() {\n baseDatos = new HashMap<>();\n secuencias = new HashMap<>();\n }", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public interface DataModel {\n\n /*\n Returns an ArrayList of all the Click Logs\n */\n// List<ClickLog> getClickData();\n\n /*\n Returns an ArrayList of all the Impression Logs\n */\n// List<ImpressionLog> getImpressionData();\n\n /*\n Returns an ArrayList of all the Server Logs\n */\n// List<ServerLog> getServerData();\n\n\n /**\n * Gets the name of the associated campaign\n * @return the name of the campaign\n */\n String getName();\n\n /**\n *\n * @return the total number of impressions in the campaign\n */\n int getImpressionsNumber() throws SQLException;\n\n /**\n * Gets all the impression data, grouped within a\n * specified interval\n * @param step the millisecond interval by which to group\n * @return A grouped map of Impression quantity and date\n */\n Map<Date, Integer> getFullImpressions(Step step) throws SQLException;\n\n //int getOverallImpressionsByInterval(Date startInterval, Date endInterval);\n\n /**\n * Get the total number of clicks in the campaign\n * @return Number of clicks\n */\n int getClicksNumber() throws SQLException;\n\n /**\n * get the number of clicks grouped by an interval\n * @param step the millisecond interval by which to group\n * @return A map of number of clicks within a date interval\n */\n Map<Date, Integer> getFullClicks(Step step) throws SQLException;\n\n //int getOverallClicksByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total number of uniques within the campaign\n * @return total uniques\n */\n int getUniquesNumber() throws SQLException;\n\n /**\n * The number of uniques grouped by a specified interval\n * @param step the millisecond interval by which to group\n * @return a map of uniques by date interval\n */\n Map<Date, Integer> getFullUniques(Step step) throws SQLException;\n\n// int getOverallUniquesByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total number of bounces across the campaign\n * @return total bounces\n */\n int getBouncesNumber() throws SQLException;\n\n// Map<Date, Integer> getBouncesByInterval(Date startInterval, Date endInterval);\n// Map<Date, Integer> getBouncesByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the number of bounces grouped by the a step interval\n * @param step the millisecond interval by which to group\n * @return a map of the number of bounces in each time interval\n */\n Map<Date, Integer> getFullBounces(Step step) throws SQLException;\n\n// int getOverallBouncesByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total number of conversions across the campaign\n * @return number of conversions\n */\n int getConversionsNumber() throws SQLException;\n\n// Map<Date, Integer> getConversionsByInterval(Date startInterval, Date endInterval);\n// Map<Date, Integer> getConversionsByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the number of conversions grouped by a step interval\n * @param step the millisecond interval by which to group\n * @return a mapping of conversion quantity and time interval\n */\n Map<Date, Integer> getFullConversions(Step step) throws SQLException;\n\n// int getOverallConversionsByInterval(Date startInterval, Date endInterval);\n\n /**\n * get the total cost of the campaign\n * @return campaign total cost\n */\n float getTotalCost() throws SQLException;\n\n// Map<Date, Float> getCostByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCostByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the cost of the campaign grouped by a time step\n * @param step the millisecond interval by which to group\n * @return cost of the campaign within each time step\n */\n Map<Date, Float> getFullCost(Step step) throws SQLException;\n\n /**\n * get the Click Through Rate of the campaign\n * @return click through rate\n */\n float getCTR() throws SQLException;\n\n// Map<Date, Float> getCTRByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCTRByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the Click Through Rate for the campaign grouped\n * by a specified step interval\n * @param step the millisecond interval by which to group\n * @return a mapping of the click through rate with its date interval\n */\n Map<Date, Float> getFullCTR(Step step) throws SQLException;\n\n// float getOverallCTRByInterval(Date startInterval, Date endInterval);\n\n /*\n The average amount of money spent on an advertising campaign.\n */\n\n /**\n * The Cost-Per-Acquisition of the whole campaign\n * @return cost-per-acquisition\n */\n float getCPA() throws SQLException;\n\n// Map<Date, Float> getCPAByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCPAByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the cost-per-acquisition grouped by a specified time step\n * @param step the millisecond interval by which to group\n * @return map of date interval with corresponding cost-per-acquisition\n */\n Map<Date, Float> getFullCPA(Step step) throws SQLException;\n\n\n /**\n * get the average cost-per-click of the whole campaign\n * @return average cost-per-click\n */\n float getCPC() throws SQLException;\n\n /**\n * get the cost-per-click of time intervals within the campaign\n * @param step the millisecond interval by which to group\n * @return map of date interval with corresponding cost-per-click\n */\n Map<Date, Float> getFullCPC(Step step) throws SQLException;\n\n /**\n * get cost-per-thousand-impressions fot the whole campaign\n * @return cost-per-thousand-impressions\n */\n float getCPM() throws SQLException;\n\n// Map<Date, Float> getCPMByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getCPMByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * get the cost-per-thousand-impressions for intervals within the campaign\n * @param step millisecond interval by which to group\n * @return map of cost-per-thousand-impressions with date interval\n */\n Map<Date, Float> getFullCPM(Step step) throws SQLException;\n\n// float getOverallCPMByInterval(Date startInterval, Date endInterval);\n\n /*\n The average number of bounces per click.\n */\n\n /**\n * returns the average number of bounces per click\n * @return average bounces per click\n */\n float getBounceRate() throws SQLException;\n\n// Map<Date, Float> getBounceRateByInterval(Date startInterval, Date endInterval);\n// Map<Date, Float> getBounceRateByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * returns a mapping of bounces per click grouped by a specified\n * time interval\n * @param step millisecond time interval by which to group\n * @return map of bounce rates within associated time intervals\n */\n Map<Date, Float> getFullBounceRate(Step step) throws SQLException;\n\n// float getOverallBounceRateByInterval(Date startInterval, Date endInterval);\n\n// Map<Date, Set<String>> getUsersByInterval(Date startInterval, Date endInterval);\n// Map<Date, Set<String>> getUsersByInterval(Date startInterval, Date endInterval, Step step);\n\n /**\n * return the names of users with registered activity grouped by\n * a specified time interval\n * @param step the millisecond interval by which to group\n * @return map of user sets within associated time intervals\n */\n Map<Date, Set<String>> getFullUsers(Step step) throws SQLException;\n\n LinkedHashMap<String, Integer> getHistogramData() throws SQLException;\n\n// Set<String> getOverallUsersRateByInterval(Date startInterval, Date endInterval);\n\n /**\n * gets the currently applied filter\n * @return currently applied filter\n */\n Filter getFilter();\n\n /**\n * sets the current filter for the campaign\n * @param f the filter that should be applied to the campaign\n */\n void setFilter(Filter f);\n}", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "public List<Empleado> getAll();", "public void carga_bd_empleados(){\n try {\n Connection conectar = Conexion.conectar();\n PreparedStatement pst = conectar.prepareStatement(\n \"select nombre, edad, cargo, direccion, telefono from empleados\");\n\n ResultSet rs = pst.executeQuery();\n\n table = new JTable(model);\n jScrollPane1.setViewportView(table);\n table.setBackground(Color.yellow);\n\n model.addColumn(\"Nombre\");\n model.addColumn(\"Edad\");\n model.addColumn(\"Cargo\");\n model.addColumn(\"Direccion\");\n model.addColumn(\"Telefono\");\n\n while (rs.next()) {\n Object[] fila = new Object[8];\n //material mimaterial = new material();\n\n for (int i = 0; i < 5; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n// model.addRow(fila);\n Empleado mimaterial = this.ChangetoEmpleado(fila);\n this.AddToArrayTableEmpleado(mimaterial);\n\n }\n\n conectar.close();\n \n } catch (SQLException e) {\n System.err.println(\"Error al llenar tabla\" + e);\n JOptionPane.showMessageDialog(null, \"Error al mostrar informacion\");\n\n }\n }", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public List<Ejemplar> getAll();", "private void insertData() {\n \n for (int i = 0; i < 4; i++) {\n EmpleadoEntity entity = factory.manufacturePojo(EmpleadoEntity.class);\n entity.setSolicitudes(new ArrayList<>());\n entity.setPropuestas(new ArrayList<>());\n entity.setInvitaciones(new ArrayList<>());\n entity.setTipoEmpleado(TipoEmpleado.TRADUCTOR);\n if(i == 0)\n {\n SolicitudEntity solicitud = factory.manufacturePojo(SolicitudEntity.class);\n em.persist(solicitud);\n entity.getSolicitudes().add(solicitud);\n solicitud.setEmpleado(entity);\n solicitudesData.add(solicitud);\n }\n else if (i == 1)\n {\n InvitacionEntity invitacion = factory.manufacturePojo(InvitacionEntity.class);\n em.persist(invitacion);\n entity.getInvitaciones().add(invitacion); \n invitacion.setEmpleado(entity);\n invitacionesData.add(invitacion);\n }\n else if (i == 2){\n PropuestaEntity propuesta = factory.manufacturePojo(PropuestaEntity.class);\n em.persist(propuesta);\n entity.getPropuestas().add(propuesta);\n propuesta.setEmpleado(entity);\n propuestasData.add(propuesta);\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "public String fillRequestBody(){\n\n Gson gson = new Gson();\n ApiSetlistRequestDTO apiSetlistRequestDTO = gson.fromJson(fileOperations.bufferedReader(configurationGet.getApiSetlistRequestJSonBodyResourcePath()), ApiSetlistRequestDTO.class);\n\n apiSetlistRequestDTO.setPage(30303030);\n apiSetlistRequestDTO.setPerPage(8888888);\n apiSetlistRequestDTO.setTotal(300000000);\n apiSetlistRequestDTO.setTotalPages(88888888);\n\n Datum data = new Datum();\n data.setId(10);\n data.setName(\"fghfdasfghgfdsfg\");\n data.setYear(453453);\n data.setColor(\"#f43242\");\n data.setPantoneValue(\"Test dfgfdgfdg Value\");\n\n Datum data2 = new Datum();\n data2.setId(15);\n data2.setName(\"burak\");\n data2.setYear(19);\n data2.setColor(\"#tyuyrefe\");\n data2.setPantoneValue(\"fsd\");\n\n List<Datum> datumList = apiSetlistRequestDTO.getData();\n datumList.set(0,data);\n datumList.set(5,data2);\n\n apiSetlistRequestDTO.setData(datumList);\n\n /*for (Datum data : exampleTestClass.getData()){\n data.setId(10);\n data.setName(\"Sarı\");\n data.setYear(5000);\n data.setColor(\"#999999999\");\n data.setPantoneValue(\"Test Pandone Value\");\n }*/\n\n logger.info(\"Manipule Edilen Data:\" + gson.toJson(apiSetlistRequestDTO));\n\n return gson.toJson(apiSetlistRequestDTO);\n }", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public DTOSalida obtenerDescripcionesPlantillas(DTOBelcorp dto) throws MareException\n { \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerDescripcionesPlantillas(DTOBelcorp dto): Entrada\");\n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet();\n DTOSalida dtos = new DTOSalida();\n \n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n UtilidadesLog.debug(\"UtilidadesEJB.getBelcorpService() .... [OK]\");\n query.append(\" SELECT A.OID_PLAN_COMI OID, B.VAL_I18N DESCRIPCION \");\n query.append(\" FROM COM_PLANT_COMIS A, V_GEN_I18N_SICC B \"); \n query.append(\" WHERE \");\n //query.append(\" A.ESTA_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \");\n query.append(\" A.CEST_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \");\n query.append(\" B.ATTR_ENTI = 'COM_PLANT_COMIS' AND \"); \n query.append(\" B.ATTR_NUM_ATRI = 1 AND \"); \n query.append(\" B.IDIO_OID_IDIO = \" + dto.getOidIdioma() + \" AND \");\n query.append(\" B.VAL_OID = A.OID_PLAN_COMI \");\n query.append(\" ORDER BY DESCRIPCION \"); \n UtilidadesLog.debug(query.toString()); \n try {\n rs = bs.dbService.executeStaticQuery(query.toString());\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerDescripcionesPlantillas(DTOBelcorp dto): Salida\");\n return dtos; \n }", "public static String buscarTodosLosLibros() throws Exception{ //BUSCARtODOS no lleva argumentos\r\n //primero: nos conectamos a oracle con la clase conxion\r\n \r\n Connection con=Conexion.conectarse(\"system\",\"system\");\r\n //segundo: generamos un statemenr de sql con la conexion anterior\r\n Statement st=con.createStatement();\r\n //3: llevamos a cabo la consulta select \r\n ResultSet res=st.executeQuery(\"select * from persona\"); //reset arreglo enmutado de java estructura de datos\r\n System.out.println(\"depues del select\");\r\n int indice=0;\r\n ArrayList<persona> personas=new ArrayList<persona>();\r\n while(res.next()){ //del primero hasta el ultimo prod que vea SI PONGO SECUENCIA NO ENTRA AL WHILE\r\n Integer id= res.getInt(1); \r\n String nombre=res.getString(2);\r\n String empresa=res.getString(3);\r\n Integer edad=res.getInt(4);\r\n String telefono=res.getString(5);\r\n \r\n ///llenamos el arrayList en cada vuelta\r\n personas.add(new persona(id,nombre,empresa,edad,telefono));\r\n \r\n System.out.println(\"estoy en el array list despues del select\");\r\n }\r\n \r\n //el paso final, transformamos a objeto json con jackson\r\n ObjectMapper maper=new ObjectMapper(); //mapeo a objeto jackson\r\n \r\n st.close();\r\n con.close();\r\n System.out.println(\"convirtiendo el json\");\r\n return maper.writeValueAsString(personas);\r\n \r\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }", "public List<Empresa> getData() {\n lista = new ArrayList<Empresa>();\n aux = new ArrayList<Empresa>();\n Empresa emp = new Empresa(1, \"restaurantes\", \"KFC\", \"Av. Canada 312\", \"tel:5050505\", \"kfc@kfc.com\", \"www.kfc.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/b/bf/KFC_logo.svg/1024px-KFC_logo.svg.png\", \"Restaurante de comida rapida.exe\");\n lista.add(emp);\n emp = new Empresa(2, \"restaurantes\", \"Pizza Hut\", \"Av. Aviación 352\", \"tel:1111111\", \"pizzahut@pac.com\", \"www.pizzahut.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/d/d2/Pizza_Hut_logo.svg/1088px-Pizza_Hut_logo.svg.png\", \"Restaurante de comida rapida.exe\");\n lista.add(emp);\n emp = new Empresa(3, \"restaurantes\", \"Chifa XUNFAN\", \"Av. del Aire 122\", \"tel:1233121\", \"chifaxunfan@gmail.com\", \"www.chifaxunfan.com\", \"https://www.piscotrail.com/sf/media/2011/01/chifa.png\", \"Restaurante de comida oriental.exe\");\n lista.add(emp);\n emp = new Empresa(4, \"Restaurantes\", \"El buen sabor\", \"Av. Benavides 522\", \"tel:5366564\", \"elbuesa@gmail.com\", \"www.elbuensabor.com\", \"http://www.elbuensaborperu.com/images/imagen1.jpg\", \"Restaurante de comida peruana\");\n lista.add(emp);\n emp = new Empresa(5, \"Restaurantes\", \"La Romana\", \"Av. San borja norte 522\", \"tel:6462453\", \"romana@gmail.com\", \"www.laromana.com\", \"https://3.bp.blogspot.com/-rAxbci6-cM4/WE7ZppGVe4I/AAAAAAAA3fY/TkiySUlQJTgR7xkOXViJ1IjFRjOulFWnwCLcB/s1600/pizzeria-la-romana2.jpg\", \"Restaurante de comida italiana\");\n lista.add(emp);\n emp = new Empresa(6, \"Ocio\", \"Cinemark\", \"Av. San borja norte 522\", \"tel:6462453\", \"cinemark@gmail.com\", \"www.cinemark.com.pe\", \"https://s3.amazonaws.com/moviefone/images/theaters/icons/cienmark-logo.png\", \"El mejor cine XD\");\n lista.add(emp);\n emp = new Empresa(7, \"Educación\", \"TECSUP\", \"Av. cascanueces 233\", \"tel:6462453\", \"tecsup@gmail.com\", \"www.tecsup.edu.pe\", \"http://www.miningpress.com/media/img/empresas/tecsup_1783.jpg\", \"Instituto tecnologico del Perú\");\n lista.add(emp);\n emp = new Empresa(8, \"Ocio\", \"CC. Arenales\", \"Av. arenales 233\", \"tel:6462453\", \"arenaliens@gmail.com\", \"www.arenales.com.pe\", \"http://4.bp.blogspot.com/-jzojuNRfh_s/UbYXFUsN9wI/AAAAAAAAFjU/ExT_GmT8kDc/s1600/35366235.jpg\", \"Centro comercial arenales ubicado en la avenida Arenales al costado del Metro Arenales\");\n lista.add(emp);\n emp = new Empresa(9, \"Ocio\", \"Jockey Plaza\", \"Av. Javier Prado 233\", \"tel:6462453\", \"jockey@gmail.com\", \"www.jockeyplaza.com.pe\", \"http://3.bp.blogspot.com/-a2DHRxS7R8k/T-m6gs9Zn7I/AAAAAAAAAFA/z_KeH2QTu18/s1600/logo+del+jockey.png\", \"Un Centro Comercial con los diversos mercados centrados en la moda y tendencia del mundo moderno\");\n lista.add(emp);\n emp = new Empresa(10, \"Educación\", \"UPC\", \"Av. Monterrico 233\", \"tel:6462453\", \"upc@gmail.com\", \"www.upc.edu.pe\", \"https://upload.wikimedia.org/wikipedia/commons/f/fc/UPC_logo_transparente.png\", \"Universidad Peruana de Ciencias Aplicadas conocida como UPC se centra en la calidad de enseñanza a sus estudiantes\");\n lista.add(emp);\n int contador=0;\n String key = Busqueda.getInstance().getKey();\n for (int i = 0; i < lista.size(); i++) {\n if (lista.get(i).getRubro().equalsIgnoreCase(key)||lista.get(i).getRubro().toLowerCase().contains(key.toLowerCase())) {\n aux.add(lista.get(i));\n }else {\n if (lista.get(i).getNombre().equalsIgnoreCase(key)||lista.get(i).getNombre().toLowerCase().contains(key.toLowerCase())) {\n aux.add(lista.get(i));\n break;\n }else {\n\n }\n }\n\n }\n return aux;\n }", "@Override\n\tpublic JSONObject insertFuliao(String jsonStr) throws Exception {\n\t\ttry {\n\t\t\t JSONObject allData = JSONObject.fromObject(jsonStr);\n\t\t\t String shop_name = allData.getString(\"shop_name\");\n\t\t\t String accepter = allData.getString(\"person\");\n\t\t\t String date = String.format(\"%tF\",new Date());\n\t\t\t GetSecMaterials getSecMaterials = new GetSecMaterials();\n\t\t\t getSecMaterials.setShop_name(shop_name);\n\t\t\t getSecMaterials.setApply_data(date);\n\t\t\t getSecMaterials.setApplyer(accepter);\n\t\t\t getSecMaterials.setIs_apply(0);\n\t\t\t getSecMaterials.setIs_approve(0);\n\t\t\t getSecMaterials.setIs_pushed(0);\n\t\t\t getSecMaterials.setIs_return(0);\n\t\t\t fuliaoMapper.insertFuliao(getSecMaterials);\n\t\t\t JSONArray jsonArray = allData.getJSONArray(\"detail\");\n\t\t\t List<GetSecDetail> getSecDetails = new ArrayList<>();\n\t\t\t for(int i=0;i<jsonArray.size();i++) {\n\t\t\t\t JSONObject jsonObject = jsonArray.getJSONObject(i);\n\t\t\t\t GetSecDetail getSecDetail = new GetSecDetail();\n\t\t\t\t getSecDetail.setGet_materials_id(getSecMaterials.getGet_materials_id());\n\t\t\t\t getSecDetail.setReshop_name(shop_name);\n\t\t\t\t getSecDetail.setSec_material_no(jsonObject.getString(\"fuliao_no\"));\n\t\t\t\t getSecDetail.setSec_material_name(jsonObject.getString(\"fuliao_name\"));\n\t\t\t\t getSecDetail.setType(jsonObject.getString(\"type\"));\n\t\t\t\t getSecDetail.setUnit(jsonObject.getString(\"unit\"));\n\t\t\t\t getSecDetail.setNum(jsonObject.getString(\"num\"));\n\t\t\t\t getSecDetail.setIs_return(0);\n\t\t\t\t getSecDetails.add(getSecDetail);\n\t\t\t }\n\t\t\t GetSecDetailVo getSecDetailVo = new GetSecDetailVo();\n\t\t\t getSecDetailVo.setGet_sec_details(getSecDetails);\n\t\t\t fuliaoMapper.insertFuliaoDetail(getSecDetails);\n\t\t\t JSONObject is_ok = new JSONObject();\n\t \t\t is_ok.put(\"is_ok\", \"1\");\n\t \t\t return is_ok;\n\t\t }catch(Exception e) {\n\t\t\t e.printStackTrace();\n\t\t\t TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();\n\t\t\t JSONObject is_ok = new JSONObject();\n\t \t\t is_ok.put(\"is_ok\", \"0\");\n\t \t\t return is_ok;\n\t\t }\n\t}", "private void cargarDatosDefault() {\n\t\tPersonasJSON personas = new PersonasJSON();\n\t\tpersonas = personas.leerJSON(\"src/datosJSON/Personas.JSON\");\n\t\t\n\t\tfor(int i=0 ; i<personas.getCantidadPersonas(); i++) {\n\t\t\t\n\t\t\tString nombre = personas.getPersona(i).getNombre();\n\t\t\tint deporte = personas.getPersona(i).getDeporte();\n\t\t\tint musica = personas.getPersona(i).getMusica();\n\t\t\tint espectaculo = personas.getPersona(i).getEspectaculo();\n\t\t\tint ciencia = personas.getPersona(i).getCiencia();\n\t\t\t\n\t\t\tmodel.addRow(new String[]{ nombre, String.valueOf(deporte), String.valueOf(musica),\n\t\t\t\t\tString.valueOf(espectaculo), String.valueOf(ciencia) });\n\t\t}\n\t\t\n\t\tdatos.addAll(personas.getTodasLasPersonas());\n\t\t\n\t}", "public void listarJsonbyMovimientos(HttpServletRequest request, HttpServletResponse response) throws Exception{\n String valorcriterio = request.getParameter(\"valorcriterio\");\n \n GestionBendiv gbenef = new GestionBendiv();\n BeneficiarioDiv benef_div = gbenef.obtenerGenerico(valorcriterio);\n //ArrayList beneficiario_div = new ArrayList();\n Integer id_bendiv = benef_div.getId_bendiv();\n //beneficiario_div.add(benef_div);\n \n GestionMov_diversos modelo=new GestionMov_diversos();\n ArrayList movimientos_div=modelo.obtenerMovimientosporID(id_bendiv);\n \n \n GsonBuilder builder=new GsonBuilder().setDateFormat(\"dd/MM/yyy\");\n Gson gson=builder.create();\n \n //response.addHeader(\"Access-Control-Allow-Origin\", \"http://localhost:4200\");\n response.setHeader(\"Access-Control-Allow-Origin\", \"*\");\n response.setHeader(\"Access-Control-Allow-Methods\", \"POST, GET\");\n response.setHeader(\"Access-Control-Max-Age\", \"3600\");\n response.setHeader(\"Access-Control-Allow-Headers\", \"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n //response.getWriter().write(\"{\\\"mov_diversos\\\":\"+gson.toJson(movimientos_div)+\",\\\"beneficiario_div\\\":\"+gson.toJson(beneficiario_div)+\"}\");\n response.getWriter().write(\"{\\\"mov_diversos\\\":\"+gson.toJson(movimientos_div)+\"}\");\n }", "public void updateJSONdata() {\n\n mDispositiuList = new ArrayList<HashMap<String, String>>();\n\n mDispositiusMapper = new HashMap<Integer, Dispositiu>();\n\n JSONParser jsonParser = new JSONParser();\n\n // Building Parameters\n List<NameValuePair> postValues = new ArrayList<NameValuePair>();\n postValues.add(new BasicNameValuePair(\"id_empresa\", String.valueOf(dades.getInt(\"empresa\"))));\n\n // getting JSON Object\n // Note that login url accepts POST method\n JSONObject json = jsonParser.makeHttpRequest(URL_DISPOSITIUS, \"POST\", postValues);\n\n // check log cat from response\n // Log.d(\"DispositiusEmpresa Response\", json.toString());\n\n try {\n\n success = json.getInt(TAG_SUCCESS);\n\n if (success == 1) {\n // dispositius retrieved successfully\n\n mDispositius = json.getJSONArray(TAG_DEVICES);\n\n if (mDispositius != null) {\n\n int len = mDispositius.length();\n for (int i = 0; i < len; i++) {\n JSONObject obj = mDispositius.getJSONObject(i);\n\n // gets the content of each tag\n String id = String.valueOf(obj.getInt(TAG_DEVICEID));\n String nom = obj.getString(TAG_DEVICENAME);\n String flota = obj.getString(TAG_FLOTA);\n String vehicle = obj.getString(TAG_VEHICLE);\n\n // creating new HashMap\n HashMap<String, String> map = new HashMap<String, String>();\n\n map.put(TAG_DEVICEID, id);\n map.put(TAG_DEVICENAME, nom);\n map.put(TAG_FLOTA, flota);\n map.put(TAG_VEHICLE, vehicle);\n\n // adding HashList to ArrayList\n mDispositiuList.add(map);\n\n\n dispositiu = new Dispositiu();\n dispositiu.setId(obj.getInt(TAG_DEVICEID));\n dispositiu.setNom(nom);\n dispositiu.setFlota(flota);\n dispositiu.setVehicle(vehicle);\n dispositiu.setPosition(obj.getDouble(TAG_LAT), obj.getDouble(TAG_LNG));\n\n mDispositiusMapper.put(dispositiu.getId(), dispositiu);\n }\n }\n\n } else {\n // failed to retrieve dispositius\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public String ajaj() {\n try {\n monthlyExpends = MonthlyExpenditureCache.getCache();\n monthlyExpendsJson = new JSONArray();\n for (MonthlyExpenditure monthlyExpend : monthlyExpends) {\n JSONObject monthlyExpendJson = new JSONObject();\n JSONArray cateExpendsJson = new JSONArray();\n JSONArray statExpendsJson = new JSONArray();\n monthlyExpendJson.put(\"total\", monthlyExpend.total());\n monthlyExpendJson.put(\n \"date\",\n CalendarUtils.toString(CalendarUtils.YM,\n monthlyExpend.getDate()));\n monthlyExpendJson.put(\"expenditures\", cateExpendsJson);\n monthlyExpendJson.put(\"statisticalExpenditures\",\n statExpendsJson);\n monthlyExpendsJson.add(monthlyExpendJson);\n // expenditures - category : list[expend]\n for (String cateName : monthlyExpend.getExpenditures().keySet()) {\n JSONArray expendsJson = new JSONArray();\n for (Expenditure expend : monthlyExpend.getExpenditures()\n .get(cateName)) {\n JSONObject expendJson = new JSONObject();\n expendJson.put(\"category\", expend.getCategory()\n .getName());\n expendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, expend.getDate()));\n expendJson.put(\"name\", expend.getName());\n expendJson.put(\"howMuch\", expend.getHowMuch());\n expendsJson.add(expendJson);\n }\n cateExpendsJson.add(expendsJson);\n }\n // statisticalExpenditures - category : statistical expend\n for (String cateName : monthlyExpend\n .getStatisticalExpenditures().keySet()) {\n Expenditure statExpend = monthlyExpend\n .getStatisticalExpenditures().get(cateName);\n JSONObject statExpendJson = new JSONObject();\n statExpendJson.put(\"category\", statExpend.getCategory()\n .getName());\n statExpendJson.put(\"date\", CalendarUtils.toString(\n CalendarUtils.YMD, statExpend.getDate()));\n statExpendJson.put(\"howMuch\", statExpend.getHowMuch());\n statExpendJson.put(\"average\", statExpend.getAverage());\n statExpendsJson.add(statExpendJson);\n }\n }\n } catch (Exception e) {\n PrintUtils.error(this.getClass(), e);\n return ERROR;\n }\n return SUCCESS;\n }", "public List<TblRetur>getAllDataRetur();", "public ArrayList<RealmCobaModels> setSemuaDataNama() {\n // mendapatkan data realm berbentuk realmresults\n RealmResults<RealmCobaModels> realmCobaModels = realm.where(RealmCobaModels.class).findAll();\n // mendeklarasi arraylist\n ArrayList<RealmCobaModels> arrayListModels = new ArrayList<>();\n\n // validasi\n if (realmCobaModels.size() > 0) { // jika realmresult lebih dari 0\n // membuat looping data\n for (int i = 0; i < realmCobaModels.size(); i++) {\n RealmCobaModels rcm1 = new RealmCobaModels();\n rcm1.setId(realmCobaModels.get(i).getId());\n rcm1.setNama(realmCobaModels.get(i).getNama());\n rcm1.setUmur(realmCobaModels.get(i).getUmur());\n arrayListModels.add(rcm1); // memasukkan ke array list\n }\n\n // tampil log\n Log.e(TAG, arrayListModels.toString());\n } else { // jika realmresult tidak lebih dari 0, maka kosong!\n // tampil log\n Log.e(TAG, \"Tidak Ada Data!\");\n }\n\n return arrayListModels;\n }", "@Override\n\tpublic Object doService() throws Exception {\n\t\t\n\t\tString sql;\n\t\n\t\tList<Map<String,Object>> list=new ArrayList<Map<String,Object>>();\n\t\t\n\t\t\n\t\t\n\t\t//全路网\n\t\t\t String [] selType=JsonTagContext.getRequest().getParameterValues(\"selType[]\");\n\t\t\tString tp_sql=\"0\";\n\t\t\tif(selType!=null){\n\t\t\t\tfor(String tp:selType){\n\t\t\t\t\tif(\"1\".equals(tp)){\n\t\t\t\t\t\ttp_sql+=\"+enter_times\";\n\t\t\t\t\t}else if(\"2\".equals(tp)){\n\t\t\t\t\t\ttp_sql+=\"+exit_times\";\n\t\t\t\t\t}else if(\"3\".equals(tp)){\n\t\t\t\t\t\ttp_sql+=\"+change_times\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsql =\"SELECT T.*, ROWNUM RN FROM (\"\n\t\t\t\t\t+\"select b.district_code,sum(in_pass_num) in_pass_num from\"\n\t\t\t\t\t +\"(select station_id,round(sum(\"+tp_sql+\")/1000000,2) in_pass_num from TBL_METRO_FLUXNEW_\" +date+\" GROUP BY station_id) a,\"\n\t\t\t\t\t+\"(select * from tbl_metro_station_info_area WHERE STATION_VER in (select max(STATION_VER) from tbl_metro_station_info_area)) b\"\n\t\t\t\t\t +\" where a.STATION_ID=b.station_id\"\n\t\t\t\t\t +\" GROUP BY b.district_code order by in_pass_num desc\"\n\t\t\t\t+ \") T where ROWNUM <= ?\" ;\n\t\t\t//jsonTagJdbcDao.getJdbcTemplate().setMaxRows(this.getSize());\n\t\t\tlist = jsonTagJdbcDao.getJdbcTemplate().queryForList(sql,this.getSize());\n\t\t\t\n\t\t\n\t\t\t\n\t\t \n\t\t \n\t\treturn list;\n\t\t\n\t}", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public interface BeeDataDao {\n\n /*获取兼职数据*/\n BeeJobTime getBeeJobTime();\n\n /*分页获取兼职数据*/\n BeeJobTime getBeeJobTimes(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工数据*/\n BeeSummerJob getBeeSummerJob();\n\n /*分页获取暑期工数据*/\n BeeSummerJob getBeeSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*根据JID获取兼职详细信息*/\n BeeJobTimeDetailed getBeeJobTimeDetailed(int jid);\n\n /*根据SID获取兼职详细信息*/\n BeeSummerJobDetailed getSummerJobDetailed(int sid);\n\n /*分页获取兼职报名信息*/\n UserMessageList getSignUpJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取兼职报名List*/\n UserMessageList getSignUpJobFair();\n\n /*根据phone查询兼职报名人员*/\n UserMessageList selectJobFairUser(String phone);\n\n /*兼职报名*/\n void putSignUpJobFair(@Param(\"userMessage\") UserMessage userMessage);\n\n /*根据UserId查询报名人员*/\n String selectSignUpJobFairByUserId(int UserId);\n\n /*插入amount*/\n void insertAmount(@Param(\"amount\") String amount,@Param(\"jobNames\") String jobNames,@Param(\"userId\") int userId);\n\n /*暑期工报名*/\n void putSignUpSummerJob(@Param(\"userMessage\") UserMessage userMessage);\n\n /*暑期工发布*/\n void publishSummerJob(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*兼职发布*/\n void publishJobFair(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*分页获取暑期工报名信息*/\n UserMessageList getSignUpSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工报名List*/\n UserMessageList getSignUpSummerJob();\n\n BeeSummerJobDetailedList AuditingJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeSummerJobDetailedList AuditingJobFair();\n\n BeeSummerJobDetailedList AuditingSummerJob();\n\n BeeSummerJobDetailedList AuditingSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n String selectSignUpJobFairByJIDS(int userId);\n\n UserMessageList selectSummerJobUser(String phone);\n\n String selectSignUpSummerJobByJIDS(int userId);\n\n String selectSignUpSummerJobByUserId(int userId);\n\n void insertAmount1(String jids, String jobNameS, int userId);\n\n int getSid(int id);\n\n int getJid(int id);\n\n void putOpenId(@Param(\"openId\") Object openId,@Param(\"targetId\") int targetId);\n\n BeeJobTime getAuditingBeeJobTimeByOpenId(String openId);\n\n BeeJobTime getAuditingBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimeByOpenId(String openId);\n\n int selectIsGet(int i);\n\n UserMessageList getSignUpJobFairsByJid();\n\n UserMessageList getSignUpJobFairByJid(@Param(\"jid\") String jid,@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n int selectargetId(String openId);\n\n BeeJobTimeDetailed getAuditingBeeJobTimeDetailed(int jid);\n\n int selectOpenId(Object openId);\n\n Object selectOpenIds(Object openId);\n\n List<Integer> getJidByOpenId(String openId);\n\n void getJobTimeUserByJid(List<Integer> jid);\n\n String getJidsByOpenId(String openId);\n\n BeeJobTime getJobTimeByOpenId(@Param(\"jidS\") List<String> jidS);\n\n BeeJobTime getBeeJobTimesByOpenIds(int startIndex, int endAmount);\n\n String getJidsByJid(int i);\n\n String[] getJids();\n}", "@GET\r\n @Produces(\"application/json\")\r\n public String listCarro() throws Exception {\r\n List<CarroModel> lista;\r\n //CarroDao dao = new CarroDao();\r\n CarroDao dao = CarroDao.getInstance();\r\n List<model.CarroModel> carros = dao.getAll();\r\n //Converter para Gson\r\n Gson g = new Gson();\r\n return g.toJson(carros);\r\n }", "public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}", "public interface MovimientoService {\n public static final String PROPERTY_ID = \"id\";\n public static final String PROPERTY_PARTIDO_ID = \"partidoId\";\n public static final String PROPERTY_TIEMPO_DES = \"tiempoDes\";\n public static final String PROPERTY_MINUTO = \"minuto\";\n public static final String PROPERTY_SEGUNDO = \"segundo\";\n public static final String PROPERTY_TIPO = \"tipo\";\n public static final String PROPERTY_ORIGEN = \"origen\";\n public static final String PROPERTY_ENTRA_ID = \"entraId\";\n public static final String PROPERTY_ENTRA_NOMBRE = \"entraNombre\";\n public static final String PROPERTY_SALE_ID = \"saleId\";\n public static final String PROPERTY_SALE_NOMBRE = \"saleNombre\";\n\n Map<String,Object> createMovimiento(Map<String, String> movimiento);\n\n void deleteMovimiento(Long idMovimiento);\n\n List<Map<String,Object>> movimientosByPartido(Long idPartido);\n}", "public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "DataModel createDataModel();", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "@Override\n\tpublic JSONObject getAll(Map<String, Object> map) {\n\t\tList<Lic> list = licDao.getAll(map);\n\t\tMap<String,Object> jsonMap = new HashMap<String,Object>();\n\t\tObject[][] objs = new Object[list.size()][];\n\t\tfor(int i=0;i<list.size();i++){\n\t\t\tLic lic = list.get(i);\n\t\t\tobjs[i] = new Object[]{lic.getId(),lic.getFaz_id(),lic.getDaoz_id(),lic.getLiclxb_id(),lic.getZhi(),\n\t\t\t\t\tlic.getMeikxxb_id(),lic.getBeiz()};\n\t\t}\n\t\tjsonMap.put(\"data\", objs);\n\t\tJSONObject result = JSONObject.fromObject(jsonMap);\n\t\treturn result;\n\t}", "DataModel getDataModel ();", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "public MVCModelo()\n\t{\n\t\ttablaChaining=new HashSeparateChaining<String, TravelTime>(20000000);\n\t\ttablaLineal = new TablaHashLineal<String, TravelTime>(20000000);\n\t}", "public AbstrJoueurModel retourneAbstrJoueurModel(){ return ajm;}", "public ArrayList<ModelAprendizagemTeorica> getListaAprendizagemTeoricaDAO(){\n ArrayList<ModelAprendizagemTeorica> listamodelAprendizagemTeorica = new ArrayList();\n ModelAprendizagemTeorica modelAprendizagemTeorica = new ModelAprendizagemTeorica();\n try {\n this.conectar();\n this.executarSQL(\n \"SELECT \"\n + \"id,\"\n + \"descricao,\"\n + \"texto\"\n + \" FROM\"\n + \" aprendizagem_teorica\"\n + \";\"\n );\n\n while(this.getResultSet().next()){\n modelAprendizagemTeorica = new ModelAprendizagemTeorica();\n modelAprendizagemTeorica.setId(this.getResultSet().getInt(1));\n modelAprendizagemTeorica.setDescricao(this.getResultSet().getString(2));\n modelAprendizagemTeorica.setTexto(this.getResultSet().getString(3));\n listamodelAprendizagemTeorica.add(modelAprendizagemTeorica);\n }\n }catch(Exception e){\n e.printStackTrace();\n }finally{\n this.fecharConexao();\n }\n return listamodelAprendizagemTeorica;\n }", "private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }", "private DefaultTableModel getDatos3(){\n String folio = String.valueOf(venta.ns);\n //consulta sql\n String SQL_SELECT = \"SELECT p.Nombres,dv.Cantidad,dv.PrecioVenta FROM ventas v JOIN detalle_ventas dv ON v.IdVentas=dv.IdVentas JOIN producto p ON p.IdProducto=dv.IdProducto WHERE v.NumeroSerie = \"+folio+\"\";\n try {\n setTitutlos3();\n ps = con.getConnection().prepareStatement(SQL_SELECT);\n RS = ps.executeQuery();\n Object[] fila = new Object[3];\n while (RS.next()){\n fila[0] = RS.getString(1);\n fila[1] = RS.getInt(2);\n fila[2] = RS.getDouble(3);\n DT.addRow(fila);\n }\n //System.out.println(\"si hizo el desmadre\");\n } catch (SQLException e) {\n System.out.println(\"error en la tabla de ticket\");\n }\n \n return DT;\n \n }", "Tablero consultarTablero();", "@Override\n public ArrayList<MultipleItemEntity> convert() {\n\n ArrayList<MultipleItemEntity> dataList = new ArrayList<>();\n\n final int status = JSON.parseObject(getJsonData()).getInteger(\"status\");\n switch (status){\n case 0:\n final int pageNum = JSON.parseObject(getJsonData()).getJSONObject(\"data\").getInteger(\"pageNum\");\n final JSONObject object = JSON.parseObject(getJsonData()).getJSONObject(\"data\");\n\n final JSONArray dataArray = object.getJSONArray(\"list\");\n\n final int size = dataArray.size();\n if (pageNum == 1) {\n mCommentId.clear();\n }\n for (int i = 0;i<size;i++){\n final JSONObject data = dataArray.getJSONObject(i);\n final int id = data.getInteger(\"id\");\n mCommentId.add(id);\n final String avatar = data.getString(\"avatar\");\n final int userId = data.getInteger(\"userId\");\n final String userName = data.getString(\"username\");\n final String content = data.getString(\"content\");\n// final Date createTime= data.getDate(\"createTime\");\n final String createTime= data.getString(\"createTime\");\n\n\n final MultipleItemEntity entity = MultipleItemEntity.builder()\n .setField(MultipleFields.ITEM_TYPE, ItemType.COMMENT_PROMO)\n .setField(MultipleFields.ID,id)\n .setField(MultipleFields.USER_ID,userId)\n .setField(MultipleFields.USER_NAME,userName)\n .setField(MultipleFields.AVATAR,avatar)\n .setField(MultipleFields.CREATE_TIME,createTime)\n .setField(MultipleFields.CONTENT,content)\n .build();\n\n dataList.add(entity);\n }\n break;\n default:\n final String message = JSON.parseObject(getJsonData()).getString(\"msg\");\n Toast.makeText(Higo.getApplicationContext(),message,Toast.LENGTH_LONG).show();\n HigoLogger.d(\"DATALIST\",dataList);\n break;\n }\n\n return dataList;\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\n }", "public List<GoleadoresDTO> listarTodo(int idTorneo,Connection conexion) throws MiExcepcion {\n ArrayList<GoleadoresDTO> listarGoleadores = new ArrayList();\n\n try {\n String query = \"SELECT DISTINCT usuarios.primerNombre, \" +\n\" usuarios.primerApellido, tablagoleadores.numeroGoles, tablagoleadores.idEquipo, \"+ \n\" tablagoleadores.idTorneo,tablagoleadores.idJugador, \" +\n\" equipo.nombre \" +\n\" FROM tablagoleadores \" +\n\" INNER JOIN jugadoresporequipo \" +\n\" ON tablagoleadores.idJugador = jugadoresporequipo.codigoJugador \" +\n\" INNER JOIN usuarios \" +\n\" ON jugadoresporequipo.codigoJugador = usuarios.idUsuario \" +\n\" INNER JOIN equiposdeltorneo \" +\n\" ON tablagoleadores.idEquipo = equiposdeltorneo.equipoCodigo \" +\n\" INNER JOIN equipo \" +\n\" ON equiposdeltorneo.equipoCodigo = equipo.codigo \" +\n\" INNER JOIN torneo \" +\n\" ON tablagoleadores.idTorneo = torneo.idTorneo \" +\n\" WHERE tablagoleadores.idTorneo = ? \" +\n\" AND equiposdeltorneo.torneoIdTorneo=? \" +\n\" ORDER BY numeroGoles DESC\";\n statement = conexion.prepareStatement(query);\n statement.setInt(1, idTorneo);\n statement.setInt(2, idTorneo);\n rs = statement.executeQuery();\n //mientras que halla registros cree un nuevo dto y pasele la info\n while (rs.next()) {\n //crea un nuevo dto\n GoleadoresDTO gol = new GoleadoresDTO();\n UsuariosDTO usu = new UsuariosDTO();\n EquipoDTO equipo = new EquipoDTO();\n //le pasamos los datos que se encuentren\n gol.setNumeroGoles(rs.getInt(\"numeroGoles\"));\n gol.setIdEquipo(rs.getInt(\"idEquipo\"));\n gol.setIdTorneo(rs.getInt(\"idTorneo\"));\n gol.setIdJugador(rs.getLong(\"idJugador\"));\n usu.setPrimerNombre(rs.getString(\"primerNombre\"));\n usu.setPrimerApellido(rs.getString(\"primerApellido\"));\n gol.setUsu(usu);//paso el usuario al objeto \n equipo.setNombre(rs.getString(\"nombre\"));\n gol.setEquipo(equipo);\n //agregamos el objeto dto al arreglo\n listarGoleadores.add(gol);\n\n }\n } catch (SQLException sqlexception) {\n throw new MiExcepcion(\"Error listando goles\", sqlexception);\n\n } \n// finally {\n// try{\n// if (statement != null) {\n// statement.close(); \n// }\n// }catch (SQLException sqlexception) {\n// throw new MiExcepcion(\"Error listando goles\", sqlexception);\n//\n// }\n// }\n //devolvemos el arreglo\n return listarGoleadores;\n\n }", "public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}", "public List<PersonaDTO> consultarPersonas() ;", "@Override\n\tpublic JSONObject insertBackFuliao(String jsonStr) throws Exception {\n\t\ttry {\n\t\t\t JSONObject allData = JSONObject.fromObject(jsonStr);\n\t\t\t String shop_name = allData.getString(\"shop_name\");\n\t\t\t String returner = allData.getString(\"returner\");\n\t\t\t String geter = allData.getString(\"geter\");\n\t\t\t String date = String.format(\"%tF\",new Date());\n\t\t\t JSONArray jsonArray = allData.getJSONArray(\"detail\");\n\t\t\t GetSecMaterials getSecMaterials = new GetSecMaterials();\n\t\t\t getSecMaterials.setShop_name(shop_name);\n\t\t\t getSecMaterials.setAcceptor(geter);\n\t\t\t getSecMaterials.setProvider(returner);\n\t\t\t getSecMaterials.setApply_data(date);\n\t\t\t getSecMaterials.setIs_approve(1);\n\t\t\t getSecMaterials.setIs_apply(1);\n\t\t\t getSecMaterials.setIs_return(1);\n\t\t\t getSecMaterials.setIs_pushed(1);\n\t\t\t getSecMaterials.setIs_recorded(0);\n\t\t\t fuliaoMapper.insertFuliao(getSecMaterials);\n\t\t\t List<GetSecDetail> getSecDetails = new ArrayList<>();\n\t\t\t for(int i=0;i<jsonArray.size();i++) {\n\t\t\t\t JSONObject jsonObject = jsonArray.getJSONObject(i);\n\t\t\t\t GetSecDetail getSecDetail = new GetSecDetail();\n\t\t\t\t getSecDetail.setReshop_name(shop_name);\n\t\t\t\t getSecDetail.setGet_materials_id(getSecMaterials.getGet_materials_id());\n\t\t\t\t getSecDetail.setSec_material_name(jsonObject.getString(\"fuliao_name\"));\n\t\t\t\t getSecDetail.setType(jsonObject.getString(\"type\"));\n\t\t\t\t getSecDetail.setUnit(jsonObject.getString(\"unit\"));\n\t\t\t\t getSecDetail.setNum(jsonObject.getString(\"num\"));\n\t\t\t\t getSecDetail.setSec_material_no(jsonObject.getString(\"fuliao_no\"));\n\t\t\t\t getSecDetail.setReturner(returner);\n\t\t\t\t getSecDetail.setReceiver(geter);\n\t\t\t\t getSecDetail.setTime(date);\n\t\t\t\t getSecDetail.setRemark(jsonObject.getString(\"remark\"));\n\t\t\t\t getSecDetail.setIs_return(1);\n\t\t\t\t getSecDetails.add(getSecDetail);\n\t\t\t }\n\t\t\t fuliaoMapper.insertBackFuliao(getSecDetails);\n\t\t\t getSecMaterials.setGet_sec_details(getSecDetails);\n\t\t\t JSONObject jsonObject = new JSONObject();\n\t\t\t jsonObject.put(\"type\", \"sec_material_get_back\");\n\t\t\t jsonObject.put(\"is\", 1);\n\t\t\t jsonObject.put(\"sec_material_get_back\", JSONArray.fromObject(getSecMaterials));\n\t\t\t List<String> cangku = pushShopPlanMapper.findCangKuGM();\n\t\t\t getMaterialmessToSocket(jsonObject.toString(), cangku);\n\t\t\t JSONObject is_ok = new JSONObject();\n\t \t\t is_ok.put(\"is_ok\", \"1\");\n\t \t\t return is_ok;\n\t\t }catch(Exception e) {\n\t\t\t e.printStackTrace();\n\t\t\t TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();\n\t\t\t JSONObject is_ok = new JSONObject();\n\t \t\t is_ok.put(\"is_ok\", \"0\");\n\t \t\t return is_ok;\n\t\t }\n\t}", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public List<Empleat> obtenirEmpleatsQueTreballenOnViuen() throws UtilitatJdbcSQLException {\r\n JdbcPreparedQueryDao jdbcDao = new JdbcPreparedQueryDao() {\r\n @Override\r\n public Object writeObject(ResultSet rs) throws SQLException {\r\n int field=0;\r\n Empleat empleat = new Empleat();\r\n empleat.setCodi(rs.getInt(++field));\r\n empleat.setNom(rs.getString(++field));\r\n empleat.setCiutat(rs.getString(++field));\r\n \r\n Establiment est=new Establiment();\r\n est.setCodi(rs.getInt(++field));\r\n if(!rs.wasNull()){\r\n est.setNom(rs.getString(++field));\r\n est.setCiutat(rs.getString(++field));\r\n }else{\r\n est=null;\r\n }\r\n empleat.setEstabliment(est);\r\n \r\n return empleat;\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"SELECT e.codi, e.nom, e.ciutat, e.establiment, es.nom, es.ciutat FROM Empleat e JOIN Establiment es ON e.establiment = es.codi WHERE e.ciutat = es.ciutat\";\r\n }\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n \r\n }\r\n };\r\n List<Empleat> empleat = UtilitatJdbcPlus.obtenirLlista(con, jdbcDao); \r\n return empleat;\r\n }", "public List<TodoDto> getAllTodos()\n {\n List<Todo> models = dao.getAllTodos();\n List<TodoDto> dtos = new ArrayList<TodoDto>();\n for(Todo model : models){\n TodoDto dto = new TodoDto();\n dto.setTotal_quantity(model.getTotal_quantity());\n dto.setTitle(model.getTitle());\n dto.setDescription(model.getDescription());\n dto.setId(model.getId());\n dtos.add(dto);\n }\n return dtos;\n }", "public void getData( ){\n model2.getDataVector( ).removeAllElements( );\n model2.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement s = koneksi.createStatement();\n String sql = \"Select * from tb_customer\";\n ResultSet r = s.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(r.next ()){\n Object[ ] o = new Object[4];\n o[0] = r.getString(\"id\");\n o[1] = r.getString(\"nama\");\n o[2] = r.getString(\"alamat\");\n o[3] = r.getString(\"telepon\");\n\n model2.addRow(o);\n }\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "public List<Map<String, Object>> Listar_Cumplea˝os(String mes,\r\n String dia, String aps, String dep, String are,\r\n String sec, String pue, String fec, String edad,\r\n String ape, String mat, String nom, String tip, String num) {\r\n sql = \"SELECT * FROM RHVD_FILTRO_CUMPL_TRAB \";\r\n sql += (!aps.equals(\"\")) ? \"Where UPPER(CO_APS)='\" + aps.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!dep.equals(\"\")) ? \"Where UPPER(DEPARTAMENTO)='\" + dep.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!are.equals(\"\")) ? \"Where UPPER(AREA)='\" + are.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!sec.equals(\"\")) ? \"Where UPPER(SECCION)='\" + sec.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!pue.equals(\"\")) ? \"Where UPPER(PUESTO)='\" + pue.trim().toUpperCase() + \"'\" : \"\";\r\n //sql += (!fec.equals(\"\")) ? \"Where FECHA_NAC='\" + fec.trim() + \"'\" : \"\"; \r\n sql += (!edad.equals(\"\")) ? \"Where EDAD='\" + edad.trim() + \"'\" : \"\";\r\n sql += (!ape.equals(\"\")) ? \"Where UPPER(AP_PATERNO)='\" + ape.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!mat.equals(\"\")) ? \"Where UPPER(AP_MATERNO)='\" + mat.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!nom.equals(\"\")) ? \"Where UPPER(NO_TRABAJADOR)='\" + nom.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!tip.equals(\"\")) ? \"Where UPPER(TIPO)='\" + tip.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!num.equals(\"\")) ? \"Where NU_DOC='\" + num.trim() + \"'\" : \"\";\r\n //buscar por rango de mes de cumplea├▒os*/\r\n\r\n sql += (!mes.equals(\"\") & !mes.equals(\"13\")) ? \"where mes='\" + mes.trim() + \"' \" : \"\";\r\n sql += (!mes.equals(\"\") & mes.equals(\"13\")) ? \"\" : \"\";\r\n sql += (!dia.equals(\"\")) ? \"and dia='\" + dia.trim() + \"'\" : \"\";\r\n return jt.queryForList(sql);\r\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }", "@Override\r\n public ViviendaEntity toEntity() {\r\n ViviendaEntity viviendaEntity = super.toEntity();\r\n if (contratos != null) {\r\n List<ContratoEntity> contratosEntity = new ArrayList<>();\r\n for (ContratoDTO dtoContrato : contratos) {\r\n contratosEntity.add(dtoContrato.toEntity());\r\n }\r\n viviendaEntity.setContratos(contratosEntity);\r\n }\r\n\r\n if (cuartos != null) {\r\n List<CuartoEntity> cuartoEntities = new ArrayList<>();\r\n for (CuartoDTO dto : cuartos) {\r\n cuartoEntities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCuartos(cuartoEntities);\r\n }\r\n\r\n if (sitiosDeInteres != null) {\r\n List<SitioInteresEntity> entities = new ArrayList<>();\r\n for (SitioInteresDTO dto : sitiosDeInteres) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setSitiosDeInteres(entities);\r\n }\r\n\r\n if (calificaciones != null) {\r\n List<CalificacionEntity> entities = new ArrayList<>();\r\n for (CalificacionDTO dto : calificaciones) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCalificaciones(entities);\r\n }\r\n\r\n if (serviciosOfrecidos != null) {\r\n viviendaEntity.setServiciosIncluidos(serviciosOfrecidos);\r\n }\r\n\r\n if (serviciosAdicionales != null) {\r\n List<ServicioAdicionalEntity> entities = new ArrayList<>();\r\n for (ServicioAdicionalDTO dto : serviciosAdicionales) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setServiciosAdicionales(entities);\r\n }\r\n\r\n return viviendaEntity;\r\n }", "public List<Medico> getAllMedicos() {\n List<Medico> medicos = new ArrayList<Medico>();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM medico\";\n pstm = con.prepareStatement(query);\n rs = pstm.executeQuery();\n while (rs.next()) {\n Medico medico = new Medico();\n medico.setId(rs.getInt(\"id_medico\"));\n medico.setArea(rs.getString(\"area\"));\n medico.setNombre(rs.getString(\"nombre\"));\n medico.setAp_pat(rs.getString(\"apell_pat\"));\n medico.setAp_mat(rs.getString(\"apell_mat\"));\n medico.setDireccion(rs.getString(\"direccion\"));\n medico.setEmail(rs.getString(\"email\"));\n medico.setTel(rs.getString(\"tel\"));\n medico.setHora_inc(rs.getString(\"hora_inic\"));\n medico.setHora_fin(rs.getString(\"hora_fin\"));\n medicos.add(medico);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return medicos;\n }", "public void LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "@Override\r\n public List<Anggota> getAll() {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *From Anggota\";\r\n try {\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(query);\r\n ResultSet rs = preparedStatement.executeQuery();\r\n\r\n while (rs.next()) {\r\n Anggota anggota = new Anggota();\r\n anggota.setKdAnggota(rs.getString(1));\r\n anggota.setNmAnggota(rs.getString(2));\r\n anggota.setTelepon(rs.getString(3));\r\n anggota.setAlamat(rs.getString(4));\r\n datas.add(anggota);\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return datas;\r\n\r\n }", "private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //LiquidacionImpor\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tLiquidacionImpor entity = new LiquidacionImpor();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=LiquidacionImporDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=LiquidacionImporDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,LiquidacionImporDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Importaciones.LiquidacionImpor.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseLiquidacionImpor(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public DatoGeneralEmpleadoLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.datogeneralempleadoDataAccess = new DatoGeneralEmpleadoDataAccess();\r\n\t\t\t\r\n\t\t\tthis.datogeneralempleados= new ArrayList<DatoGeneralEmpleado>();\r\n\t\t\tthis.datogeneralempleado= new DatoGeneralEmpleado();\r\n\t\t\t\r\n\t\t\tthis.datogeneralempleadoObject=new Object();\r\n\t\t\tthis.datogeneralempleadosObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.datogeneralempleadoDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.datogeneralempleadoDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public JSONObject transformer() {\n JSONObject jsonObject = new JSONObject();\n JSONArray listening = new JSONArray();\n JSONArray listening_correction = new JSONArray();\n JSONArray reading = new JSONArray();\n JSONArray reading_correction = new JSONArray();\n JSONArray historique = new JSONArray();\n\n for (int i = 0; i < this.listening.size(); i++) {\n listening.put(this.listening.get(i).whoIs());\n listening_correction.put(this.listening_correction.get(i).whoIs());\n }\n\n for (int j = 0; j < this.reading.size(); j++) {\n reading.put(this.reading.get(j).whoIs());\n reading_correction.put(this.reading_correction.get(j).whoIs());\n }\n\n for(int k=0; k < this.historique.size(); k++){\n historique.put( transforme(this.historique.get(k)) );\n }\n\n try {\n jsonObject.put(\"nom\", this.nom);\n jsonObject.put(\"listening\", listening);\n jsonObject.put(\"reading\", reading);\n jsonObject.put(\"listening_correction\", listening_correction);\n jsonObject.put(\"reading_correction\", reading_correction);\n jsonObject.put(\"historique\",historique);\n jsonObject.put(\"etat\", this.etat);\n jsonObject.put(\"mode\", this.mode);\n jsonObject.put(\"est_termine\", this.est_termine);\n jsonObject.put(\"chronometre\", this.chronometre);\n Log.i(\"jsonObject\",jsonObject.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonObject;\n }", "public Repository (Application application, Activity activity){\n VideoDatabase database=VideoDatabase.getInstance(application);\n myDAO=database.myDAO();\n allChapters=myDAO.getAllChapter();\n allLecture=myDAO.getAllLecture();\n this.activity=activity;\n //allChapterJson=myDAO.getAllChapterJson();\n //allLectureJson=myDAO.getAllLectureJson();\n }", "public ArrayList<ModelVenda> getListaVendasDAO(){\n ArrayList<ModelVenda> listamodelVendas = new ArrayList();\n ModelVenda modelVendas = new ModelVenda();\n try {\n this.conectar();\n this.executarSQL(\n \"SELECT \"\n + \"codigo_venda,\"\n + \"fk_cliente_venda,\"\n + \"data_venda,\"\n + \"valor_venda\"\n + \" FROM\"\n + \" venda\"\n + \";\"\n );\n\n while(this.getResultSet().next()){\n modelVendas = new ModelVenda();\n modelVendas.setCodigoVenda(this.getResultSet().getInt(1));\n modelVendas.setClienteVenda(this.getResultSet().getInt(2));\n modelVendas.setDataVenda(this.getResultSet().getDate(3));\n modelVendas.setValorVenda(this.getResultSet().getDouble(4));\n listamodelVendas.add(modelVendas);\n }\n }catch(Exception e){\n e.printStackTrace();\n }finally{\n this.fecharConexao();\n }\n return listamodelVendas;\n }", "public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}", "public interface loadDataService {\n public List<Row> getComboContent( String sType,String comboType, Map<String,String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public Result getGridContent(PagingObject po, String gridType,Map<String,String[]> parameterMap,String searchText , usersInfo loggedUser,String statusID,String from,String where ) throws Exception;\n public List<listInfo> loadStrukturList(String partID,long langID) throws Exception;\n public finalInfo getOrgInfo(long treeID) throws Exception;\n public categoryFinalInfo getCategoryInfo(long treeID) throws Exception;\n public carriersInfo getCariesInfo(long carryID) throws Exception;\n public carriersInfo getOrganizationInfo(long carryID) throws Exception;\n public List<contact> getOrgContacts(long treeID) throws Exception;\n public person getEmployeeInfo( long empId) throws Exception;\n public List<examples> getExamplesInfo(long exmpID,String langID) throws Exception;\n public List<contact> getPersonContact(long perID) throws Exception;\n public List<docList> loadQRphoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> loadPhoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> getExamplesPictures(Connection cc, long relID, long relType) throws Exception;\n public List<examples> getExamplesOperation(Connection cc, long relID, long langID) throws Exception;\n public int checkUser(String uName) throws Exception;\n public int checkDictRecord(String text, int dictType,String org,String pos) throws Exception ;\n public usersInfo loadUserInfo(String pID) throws Exception;\n public List<person> loadEmpList( int OrgID) throws Exception;\n public List<Row> getSelectContent( String type, Map<String, String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public List<subjElement> getADVSearchMenuList(String partID) throws Exception;\n public String getADVInfo(String paramID,String paramVal,String val,String cond,String typ)throws Exception;\n public List<listInfo> loadComboForAdvancedSearch(String prmID,long parametr) throws Exception;\n public List<docList> loadRightPanelPhoto(long realID, int iType) throws Exception;\n public List<categoryFinalInfo> getCategoryStructure(long catID, int id) throws Exception;\n}", "public Result inicioGenerarLibro(){\n ContabilidadDTO dto = new ContabilidadDTO();\n dto.tipoLibro = new Parametro(\"\",\"LVEN\",\"\");\n //dto.tipoLibro.id.codigo =\"LVEN\";\n dto.anio = new Parametro(\"\",\"2018\",\"\");\n //dto.anio.id.codigo =\"2018\";\n dto.mes = new Parametro(\"\",\"3\",\"\");\n //dto.mes.id.codigo =\"3\"; //Simpre debe ser el mes anterior al actual\n\n Form<ContabilidadDTO> contabilidadDTOForm = formFactory.form(ContabilidadDTO.class).fill(dto);\n\n/*\n EbeanServer db = DBConnectionUtil.getDBServerFacturador();\n List<BandejaFactura> lista = db.find(BandejaFactura.class).findList();; //BandejaFactura.find.all();//obtenerTodos();\n for (BandejaFactura x:lista) {\n System.out.println(x);\n }\n*/\n/*\n EbeanServer db = DBConnectionUtil.getDBServerSGV();\n List<ControlVenta> lista = db.find(ControlVenta.class)\n .where().ilike(\"CVNT_NUM_DOCUMENTO\", \"F002-00000213\")\n .findList();\n for (ControlVenta x:lista) {\n System.out.println(\"*********** \"+x);\n }\n*/\n/*\n EbeanServer db = DBConnectionUtil.getDBServerSGV();\n List<ControlVenta> lista = db.find(ControlVenta.class).findList();; //BandejaFactura.find.all();//obtenerTodos();\n for (ControlVenta x:lista) {\n System.out.println(x);\n }\n*/\n\n return ok(generadorLibrosContables.render(contabilidadDTOForm));\n }", "public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private static void pruebas() {\n\t\tResultadosDaoImpl resultadosDao = new ResultadosDaoImpl();\r\n\t\tPartidosDaoImpl partidosDao = new PartidosDaoImpl();\r\n\t\tEquiposDaoImpl equiposDao = new EquiposDaoImpl();\r\n\t\tJornadasDaoImpl jornadasDao = new JornadasDaoImpl();\r\n\t\tEstadisticasDaoImpl estadisticasDao = new EstadisticasDaoImpl();\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesTotalesCasa();\r\n\t\t\r\n\t\tEquipos equipoC = equiposDao.getEquipoById(7);\r\n\t\tEquipos equipoF = equiposDao.getEquipoById(6);\r\n\t\tJornadas jornada = jornadasDao.nextJornada();\r\n//\t\t\r\n//\t\tpartidosDao.getPartidosCasa(equipo,jornada);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesFavorCasa(equipo);\r\n\t\t\r\n//\t\tLong goles = resultadosDao.getGolesContraFuera(equipo);\r\n//\t\tdouble phiVM = staticsC.getValorMercado() / (estadisticasDao.getValorMercadoMedio());\r\n\t\t\r\n\t\tEstadisticas staticsC = estadisticasDao.getStatics(equipoC);\r\n\t\tEstadisticas staticsF = estadisticasDao.getStatics(equipoF);\r\n\t\t\r\n\t\tDouble phiF = PlayMethods.analizeStaticsFuera(staticsF,staticsC,jornada);\r\n\t\tDouble phiC = PlayMethods.analizeStaticsCasa(staticsC,staticsF,jornada);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected JSONArray getTablero() {\n\t\tJSONArray jsa = new JSONArray();\r\n\t\tfor (int i = 0; i < this.tableroDomino.size(); i++) {\r\n\t\t\tjsa.put(this.tableroDomino.get(i).toJSON());\r\n\t\t}\r\n\t\treturn jsa;\r\n\t}", "private void initdata() {\n\t\tProgressDialogUtil.showProgressDlg(this, \"加载数据\");\n\t\tProdDetailRequest req = new ProdDetailRequest();\n\t\treq.id = prodInfo.id+\"\";\n\t\tRequestParams params = new RequestParams();\n\t\ttry {\n\t\t\tparams.setBodyEntity(new StringEntity(req.toJson()));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnew HttpUtils().send(HttpMethod.POST, Api.GETGOODSDETAIL, params, new RequestCallBack<String>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tT.showNetworkError(CommodityInfosActivity.this);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> resp) {\n\t\t\t\tProgressDialogUtil.dismissProgressDlg();\n\t\t\t\tProdDetailResponse bean = new Gson().fromJson(resp.result, ProdDetailResponse.class);\n\t\t\t\tLog.e(\"\", \"\"+resp.result);\n\t\t\t\tif(Api.SUCCEED == bean.result_code && bean.data != null) {\n\t\t\t\t\tupview(bean.data);\n\t\t\t\t\tdatas = bean.data;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }", "public interface ReadDao {\n\n /**\n * 根据手机号码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone}\")\n UserModel getUserByPhone(@Param(\"phone\") String phone);\n\n /**\n * 根据用户名密码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone} and passwd=substr(md5(#{pwd}),9,8)\")\n UserModel getUserByPassword(@Param(\"phone\") String phone, @Param(\"pwd\") String pwd);\n\n /**\n * 根据商品名查询商品\n *\n * @return\n */\n @Select(\"select id goodsid,name,price from t_goods where name like #{name}\")\n List<Commodity> queryCommodity(@Param(\"name\") String name);\n\n /**\n * 根据关键字查询\n *\n * @param keyword\n * @param size\n * @return\n */\n @Select(\"select * from t_goods where name like #{keyword} limit 0,#{size}\")\n public List<Commodity> getCommodityByKeyword(@Param(\"keyword\") String keyword, @Param(\"size\") int size);\n\n\n /**\n * 根据ID获取商品\n *\n * @param id\n * @return\n */\n @Select(\"select * from t_goods where id=#{id}\")\n public Commodity getCommodityById(@Param(\"id\") long id);\n\n /**\n * 查询所有商品类别\n * @return\n */\n @Select(\"select id,category1,category2 from t_goods_category\")\n public List<CommodityCategory> queryCategorys();\n\n /**\n * 查询所有商品\n * @return\n */\n @Select(\"select * from t_goods\")\n public List<Commodity> queryAllCommodityes();\n\n\n /**\n * 根据父级名称获取子级名称\n *\n * @param name\n * @return\n */\n @Select(\"select * from t_goods_category where category1=#{name}\")\n public List<CommodityCategory> getCommodityCategoryByParentName(@Param(\"name\") String name);\n\n /**\n * 获取一级分类名称\n *\n * @return\n */\n @Select(\"select DISTINCT(category1) as category1 from t_goods_category\")\n public List<CommodityCategory> getParentCommodityCateory();\n}", "private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }", "@Override\n\tpublic List<NewsVO> getAll() {\n\t\tList<NewsVO> list = new ArrayList<NewsVO>();\n\t\tNewsVO newsVO = null;\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(driver);\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\n\t\t\tpstmt = con.prepareStatement(GET_ALL_STMT);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// empVO 也稱為 Domain objects\n\t\t\t\tnewsVO = new NewsVO();\n\t\t\t\tnewsVO.setNews_id(rs.getString(\"news_id\"));\n\t\t\t\tnewsVO.setNews_content(rs.getString(\"news_content\"));\n\t\t\t\tnewsVO.setNews_date(rs.getTimestamp(\"news_date\"));\n\t\t\t\tlist.add(newsVO); // Store the row in the list\n\t\t\t}\n\n\t\t\t// Handle any driver errors\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\t// Handle any SQL errors\n\t\t} catch (SQLException se) {\n\t\t\tthrow new RuntimeException(\"A database error occured. \"\n\t\t\t\t\t+ se.getMessage());\n\t\t\t// Clean up JDBC resources\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException se) {\n\t\t\t\t\tse.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace(System.err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public RecordSet obtenerResumen(DTOResumen dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID,CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" gen.VAL_I18N AS CANAL, \");\n query.append(\" sma.DES_MARC AS MARCA, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" gen2.VAL_I18N AS REGION, \");\n query.append(\" gen3.VAL_I18N AS ZONA, \");\n query.append(\" secc.DES_SECCI AS SECCION, \");\n query.append(\" gen5.VAL_I18N AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" v_gen_i18n_sicc gen2, \");\n query.append(\" v_gen_i18n_sicc gen3, \");\n query.append(\" v_gen_i18n_sicc gen5, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" own_mare.principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" own_mare.users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.oid_usua_etap_cobr_deta \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \");\n query.append(\" AND gen2.val_oid(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen2.attr_enti(+) = 'ZON_REGIO' \");\n query.append(\" AND gen2.attr_num_atri(+) = 1 \");\n query.append(\" AND gen2.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen3.val_oid(+) = cdetal.zzon_oid_zona \");\n query.append(\" AND gen3.attr_enti(+) = 'ZON_ZONA' \");\n query.append(\" AND gen3.attr_num_atri(+) = 1 \");\n query.append(\" AND gen3.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen5.val_oid(+) = cdetal.terr_oid_terr \");\n query.append(\" AND gen5.attr_enti(+) = 'ZON_TERRI' \");\n query.append(\" AND gen5.attr_num_atri(+) = 1 \");\n query.append(\" AND gen5.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = ccabe.usco_oid_usua_cobr \");\n */\n \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID, \");\n query.append(\" p.name AS USUARIO, \");\n */\n //Se le agega \"p.IDPRINCIPAL,\" segun BELC300017927 \n //query.append(\" SELECT distinct p.name AS USUARIO, \"); \n query.append(\" SELECT distinct p.IDPRINCIPAL, p.name AS USUARIO, \");\n query.append(\" CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" sma.DES_MARC AS MARCA, \");\n query.append(\" gen.VAL_I18N AS CANAL, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" regio.DES_REGI AS REGION, \");\n query.append(\" zona.DES_ZONA AS ZONA, \"); \n \t query.append(\" secc.DES_SECCI AS SECCION, \"); \n query.append(\" terri.COD_TERR AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" SEG_CANAL canal, \");\n query.append(\" ZON_TERRI terri, \");\n query.append(\" ZON_ZONA zona, \");\n query.append(\" ZON_REGIO regio, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.UECC_OID_USUA_ETAP_COBR \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '1' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \t\t \");\n query.append(\" AND terri.OID_TERR = cdetal.terr_oid_terr\t\t \");\n query.append(\" AND zona.OID_ZONA = cdetal.zzon_oid_zona\t\t \");\n query.append(\" AND regio.OID_REGI = cdetal.ZORG_OID_REGI\t\t \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = usucob.USER_OID_USUA_COBR \");\n \n /* Validaciones */\n if( dtoe.getOidMarca()!= null ){\n query.append(\" AND subvta.MARC_OID_MARC = \" + dtoe.getOidMarca() );\n }\n if( dtoe.getOidCanal() != null){\n query.append(\" AND subvta.CANA_OID_CANA = \" + dtoe.getOidCanal() );\n }\n if( dtoe.getOidSGV() != null ){\n query.append(\" AND subvta.OID_SUBG_VENT = \" + dtoe.getOidSGV() );\n }\n if( dtoe.getOidRegion() != null ){\n query.append(\" AND cdetal.ZORG_OID_REGI = \" + dtoe.getOidRegion() ); \n }\n if( dtoe.getOidZona() != null ){\n query.append(\" AND cdetal.ZZON_OID_ZONA = \" + dtoe.getOidZona() ); \n }\n if( dtoe.getOidSeccion() != null ){\n query.append(\" AND cdetal.ZSCC_OID_SECC = \" + dtoe.getOidSeccion() );\n }\n if( dtoe.getOidTerritorio() != null ){\n query.append(\" AND cdetal.TERR_OID_TERR = \" + dtoe.getOidTerritorio() );\n }\n UtilidadesLog.debug(\"query \" + query.toString() );\n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\t\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Salida\");\n \n return rs; \n }", "public List<Object[]> getRetencionSRI(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden)\r\n/* 59: */ {\r\n/* 60:107 */ StringBuilder sql = new StringBuilder();\r\n/* 61: */ \r\n/* 62:109 */ sql.append(\" SELECT f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, \");\r\n/* 63:110 */ sql.append(\" CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), \");\r\n/* 64:111 */ sql.append(\" f.identificacionProveedor, c.descripcion, \");\r\n/* 65:112 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) \");\r\n/* 66:113 */ sql.append(\" \\t+COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) ELSE COALESCE(dfp.baseImponibleRetencion, 0) END,0), \");\r\n/* 67:114 */ sql.append(\" coalesce(dfp.porcentajeRetencion, 0), coalesce(dfp.valorRetencion, 0), coalesce(c.codigo, 'NA'), \");\r\n/* 68:115 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA THEN 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD THEN 'ISD' ELSE '' END,'NA'), \");\r\n/* 69:116 */ sql.append(\" CONCAT(f.establecimientoRetencion,'-',f.puntoEmisionRetencion,'-',f.numeroRetencion), \");\r\n/* 70:117 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 71:118 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, f.autorizacion, f.claveAcceso, f.estado,f.idFacturaProveedorSRI, fp.descripcion \");\r\n/* 72:119 */ sql.append(\" FROM DetalleFacturaProveedorSRI dfp \");\r\n/* 73:120 */ sql.append(\" RIGHT OUTER JOIN dfp.conceptoRetencionSRI c \");\r\n/* 74:121 */ sql.append(\" RIGHT OUTER JOIN dfp.facturaProveedorSRI f \");\r\n/* 75:122 */ sql.append(\" LEFT OUTER JOIN f.facturaProveedor fp \");\r\n/* 76:123 */ sql.append(\" LEFT JOIN f.creditoTributarioSRI ct \");\r\n/* 77:124 */ sql.append(\" WHERE MONTH(f.fechaRegistro) =:mes AND f.documentoModificado IS NULL \");\r\n/* 78:125 */ sql.append(\" AND YEAR(f.fechaRegistro) =:anio \");\r\n/* 79:126 */ sql.append(\" AND f.estado!=:estadoAnulado \");\r\n/* 80:127 */ sql.append(\" AND f.indicadorSaldoInicial!=true \");\r\n/* 81:128 */ sql.append(\" AND f.idOrganizacion = :idOrganizacion \");\r\n/* 82:129 */ if (sucursalFP != null) {\r\n/* 83:130 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 84: */ }\r\n/* 85:132 */ if (sucursalRetencion != null) {\r\n/* 86:133 */ sql.append(\" AND f.establecimientoRetencion = :sucursalRetencion \");\r\n/* 87: */ }\r\n/* 88:135 */ if (puntoVentaRetencion != null) {\r\n/* 89:136 */ sql.append(\" AND f.puntoEmisionRetencion = :puntoVentaRetencion \");\r\n/* 90: */ }\r\n/* 91:138 */ sql.append(\" GROUP BY f.idFacturaProveedorSRI, c.codigo, f.numero, f.puntoEmision, \");\r\n/* 92:139 */ sql.append(\" f.establecimiento, f.identificacionProveedor, \");\r\n/* 93:140 */ sql.append(\" c.descripcion, dfp.baseImponibleRetencion, dfp.porcentajeRetencion, dfp.valorRetencion, f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, f.numeroRetencion, \");\r\n/* 94:141 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 95:142 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, c.tipoConceptoRetencion, f.autorizacion, f.claveAcceso, f.estado, \");\r\n/* 96:143 */ sql.append(\" f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion, fp.descripcion \");\r\n/* 97:144 */ if ((orden != null) && (orden.equals(\"POR_RETENCION\"))) {\r\n/* 98:145 */ sql.append(\" ORDER BY f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion \");\r\n/* 99:146 */ } else if ((orden != null) && (orden.equals(\"POR_FACTURA\"))) {\r\n/* 100:147 */ sql.append(\" ORDER BY f.establecimiento, f.puntoEmision, f.numero \");\r\n/* 101:148 */ } else if ((orden != null) && (orden.equals(\"POR_CONCEPTO\"))) {\r\n/* 102:149 */ sql.append(\" ORDER BY c.descripcion \");\r\n/* 103: */ }\r\n/* 104:151 */ Query query = this.em.createQuery(sql.toString());\r\n/* 105:152 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 106:153 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 107:154 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 108:155 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 109:156 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 110:157 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 111:158 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 112:159 */ if (sucursalFP != null) {\r\n/* 113:160 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 114: */ }\r\n/* 115:162 */ if (sucursalRetencion != null) {\r\n/* 116:163 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 117: */ }\r\n/* 118:165 */ if (puntoVentaRetencion != null) {\r\n/* 119:166 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 120: */ }\r\n/* 121:169 */ return query.getResultList();\r\n/* 122: */ }", "private void GetData(){\n try {\n Connection conn =(Connection)app.pegawai.Database.koneksiDB();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from user\");\n data.setModel(DbUtils.resultSetToTableModel(sql));\n\n }\n catch (SQLException | HeadlessException e) {\n }\n}", "public interface NotationMapper {\n @Results({ @Result(property = \"notationId\", column = \"NOTATION_ID\"),\n @Result(property = \"title\", column = \"TITLE\"),\n @Result(property = \"subtitle\", column = \"SUBTITLE\"),\n @Result(property = \"bio\", column = \"BIO\"),\n @Result(property = \"notationUrl\", column = \"NOTATION_URL\"),\n @Result(property = \"bmgUrl\", column = \"BMG_URL\"),\n @Result(property = \"authorUrl\", column = \"AUTHOR_URL\"),\n @Result(property = \"accTitle\", column = \"ACC_TITLE\"),\n @Result(property = \"accUrl\", column = \"ACC_URL\"),\n @Result(property = \"type\", column = \"TYPE\"),\n @Result(property = \"resourceUrl\", column = \"RESOURCE_URL\"),\n @Result(property = \"createTime\", column = \"CREATETIME\") })\n @Select({\"<script>SELECT NOTATION_ID,TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME FROM NOTATION \",\n \"<if test='type != \\\"\\\"'>WHERE TYPE = #{type}, </if>\",\n \"</script>\"})\n List<JSONObject> getNotationList(@Param(\"type\") String type);\n @Results({ @Result(property = \"notationId\", column = \"NOTATION_ID\"),\n @Result(property = \"title\", column = \"TITLE\"),\n @Result(property = \"subtitle\", column = \"SUBTITLE\"),\n @Result(property = \"bio\", column = \"BIO\"),\n @Result(property = \"notationUrl\", column = \"NOTATION_URL\"),\n @Result(property = \"bmgUrl\", column = \"BMG_URL\"),\n @Result(property = \"authorUrl\", column = \"AUTHOR_URL\"),\n @Result(property = \"accTitle\", column = \"ACC_TITLE\"),\n @Result(property = \"accUrl\", column = \"ACC_URL\"),\n @Result(property = \"type\", column = \"TYPE\"),\n @Result(property = \"resourceUrl\", column = \"RESOURCE_URL\"),\n @Result(property = \"createTime\", column = \"CREATETIME\") })\n @Select({\"SELECT NOTATION_ID,TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME \",\n \"FROM NOTATION WHERE LOCATE(#{title},TITLE) OR LOCATE(#{title},SUBTITLE)\"\n })\n List<JSONObject> fuzzyByTitle(@Param(\"title\")String title);\n\n @Insert({\"INSERT INTO NOTATION (TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME)\" +\n \"VALUES(#{title},#{subtitle},#{bio},#{notationUrl},#{bmgUrl},#{authorUrl},#{accTitle},#{accUrl},#{type},\" +\n \"#{resourceUrl},#{createTime})\"})\n void addNotation(JSONObject reqJson);\n}" ]
[ "0.642468", "0.6384077", "0.6349619", "0.6051409", "0.5964534", "0.59547293", "0.59395087", "0.59184444", "0.5905787", "0.59048265", "0.58918893", "0.58607465", "0.58592063", "0.5856931", "0.58370346", "0.58151245", "0.58108944", "0.58043724", "0.5796195", "0.5786284", "0.5764242", "0.5739333", "0.5735881", "0.5732085", "0.5725098", "0.5723887", "0.5718671", "0.57115895", "0.5704532", "0.5703158", "0.56771964", "0.5670409", "0.5661614", "0.5654834", "0.56451964", "0.5643799", "0.56427693", "0.5636781", "0.56285983", "0.56283355", "0.56253636", "0.5615289", "0.56112665", "0.56004137", "0.5598712", "0.55941176", "0.558384", "0.5583565", "0.5583485", "0.5575973", "0.5550484", "0.55479467", "0.5543712", "0.55435663", "0.5541276", "0.55376405", "0.5533697", "0.5526627", "0.552598", "0.5511581", "0.5510719", "0.5509538", "0.5506801", "0.55044854", "0.54972273", "0.549158", "0.54910654", "0.54875857", "0.54864126", "0.54795897", "0.54726744", "0.5472438", "0.547162", "0.5470601", "0.5468178", "0.54649186", "0.5463396", "0.54626894", "0.5460931", "0.5458744", "0.5456943", "0.54554045", "0.5454112", "0.5447762", "0.54476184", "0.5437463", "0.54368675", "0.5431401", "0.54300946", "0.54299814", "0.5427256", "0.5426455", "0.5425086", "0.542224", "0.5412612", "0.5411884", "0.54067177", "0.54049", "0.540191", "0.5401857", "0.5395073" ]
0.0
-1
The user of this interface has control over where in the List each element is inserted. The user can access elements by their integer index (position) or by their value,but can also remove them.
public interface List extends Collection{ /** * Returns the object that is stored in backing * list at position index. * @param index position of the element * @return element */ Object get(int index); /** * Inserts (does not overwrite) the given value * at the given position in list. * @param value * @param position */ void insert(Object value, int position); /** * Searches the collection and returns the index * of the first occurrence of the given value or -1 * if the value is not found. * @param value list element * @return index */ int indexOf(Object value); /** * Removes element at specified * index from collection. * @param index specified position */ void remove(int index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void insert(int index, T value) throws ListException;", "public interface List<E> {\n\n /**\n * Return number of elements in the list\n * @return Number of elements\n */\n int size();\n\n /**\n * Returns whether the list is empty\n * @return True if the list is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Returns the element at index i\n * @param i Index\n * @return Element at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E get(int i) throws IndexOutOfBoundsException;\n\n /**\n * Replaces the element at index i with e, and returns the replaced element\n * @param i Index\n * @param e New element\n * @return Element replaced by e\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E set(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Inserts element e to be at index i, shifting all subsequent elements later\n * @param i Index\n * @param e New element\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n void add(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Removes and returns the element at index i, shifting subsequent elements\n * earlier\n * @param i Index\n * @return Element previously at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E remove(int i) throws IndexOutOfBoundsException;\n\n /**\n * Empty the list\n */\n public void clear();\n\n /**\n * Construct a clone (copy) of the object.\n * @return New list object with the same structure. This copy should be\n * shallow, i.e., the individual elements are not cloned.\n */\n public List<E> clone();\n}", "private void listExample()\n\t{\n\n\t\tArrayList <String> alist = new ArrayList<String>();//doesn't have to be string- can be Duck, or Mouse, or Apostrophe\n\t\talist.add(\"banana\"); //adds \"banana\" to the end of the list\n\t\talist.add(\"strawberry\");\n\t\talist.add(\"blueberry\");\n\t\talist.add(\"blackberry\");\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\talist.add(2, \"apple\"); //adds it in spot 2 (3rd position)\n\t\t\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\t\n\t\talist.remove(\"blueberry\"); \n\t\t/**\n\t\t * .remove returns what was in the spot that was just taken out--and shrinks down by one\n\t\t * .set also returns this value but it replaces the value with something else\n\t\t */\n\t\talist.remove(0); //removes 1st element\n\t\tJOptionPane.showMessageDialog(null,alist);\n\t\t\n\t\tfor (String str:alist)\n\t\t\tJOptionPane.showMessageDialog(null, str); //shows each individually\n\t\t\n\t\talist.set(1, \"coconut\"); //alist.set(index, element) --replaces\n\t\t\n\t\tint numberOfItems = alist.size();\n\t\talist.clear();\n\n\t\n\t}", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "public List Insert(Element new_elem){\n\tboolean ret_val ;\n\tList aux03 ;\n\tList aux02 ;\n\taux03 = this ;\n\taux02 = new List();\n\tret_val = aux02.InitNew(new_elem,aux03,false);\n\treturn aux02 ;\n }", "interface List { // List ADT\npublic void clear(); // Remove all Objects from list\npublic void insert(Object item); // Insert Object at curr position\npublic void append(Object item); // Insert Object at tail of list\npublic Object remove(); // Remove/return current Object\npublic void setFirst(); // Set current to first position\npublic void next(); // Move current to next position\npublic void prev(); // Move current to prev position\npublic int length(); // Return current length of list\npublic void setPos(int pos); // Set current to specified pos\npublic void setValue(Object val); // Set current Object's value\npublic Object currValue(); // Return value of current Object\npublic boolean isEmpty(); // Return true if list is empty\npublic boolean isInList(); // True if current is within list\npublic void print(); // Print all of list's elements\n}", "@Override\n public void insert(E newItem) {\n if (list.size()==0)\n list.add(newItem);\n else\n {\n ListIterator<E> itList = list.listIterator();\n boolean isAdded=false;\n while (itList.hasNext())\n {\n int status=newItem.toString().compareTo(itList.next().toString());\n if(status==0)\n {\n itList.add(newItem);\n isAdded=true;\n }\n else if(status<0)\n {\n if (itList.hasPrevious())\n itList.previous();\n itList.add(newItem);\n isAdded=true;\n break;\n }\n }\n if (!isAdded)\n {\n list.add(newItem);\n }\n }\n\n }", "void notifyListItemInserted(int position);", "public static void main(String[] args) {\n ArrayList<Long> lst = new ArrayList<>();\n\n// C.R.U.D\n// Create, Read, Update, Delete\n\n // add item, insert an item, read item, update the item, remove the item, check the location ...\n\n lst.add( 12L ); // 12L is automatically converted to new Long(12L) ; because ArrayList only store object\n lst.add( 100L );\n lst.add( 150L );\n lst.add( 200L );\n // practically you will not add null, but it possible\n // lst.add(null);\n\n System.out.println(\"lst = \" + lst);\n // I want to insert 125 between 100L and 150L, basically 2nd and 3rd item\n lst.add(2,125L);\n System.out.println(\"lst = \" + lst);\n System.out.println(\"lst item count = \" + lst.size());\n\n System.out.println(\"lst.get(3) = \" + lst.get(3));\n\n // updating value at certain index : set method\n lst.set(3,195L);\n System.out.println(\"NEW VALUE FOR lst.get(3) = \" + lst.get(3));\n System.out.println(\"lst = \" + lst);\n\n // removing item by its value\n // lst.remove(100L);\n // System.out.println(\"lst after removing 100 = \" + lst);\n // removing item by its index\n // lst.remove(2);\n // System.out.println(\"lst after removing by index = \" + lst);\n\n // looking for location of certain item\n\n System.out.println(\"\\nLocation of 100L is using lst.indexOf(100L) \" + lst.indexOf(100L));\n\n System.out.println(\"\\nLocation of 23L is using lst.indexOf(23L) \" + lst.indexOf(23L));\n\n // Check whether a list is empty or not\n System.out.println(\"\\nlst.size() > 0 = \" + (lst.size() > 0));\n\n System.out.println(\"\\nlst.isEmpty() = \" + lst.isEmpty());\n\n // how do I delete everything inside my ArrayList\n // lst.clear();\n // System.out.println(\"\\nlst.isEmpty() = \" + lst.isEmpty());\n // System.out.println(\"lst = \" + lst);\n\n // check whether we have certain item or not\n\n System.out.println(\"\\nlst.contains(100L) = \" + lst.contains(100L));\n System.out.println(\"lst.contains(10L) = \" + lst.contains(10L));\n\n // how do I check whether a list contains an item without using contains\n // use indexOf method, if it return -1, it means we don't have it\n System.out.println(\"DO I HAVE 10L = \" + (lst.indexOf(10L) != -1));\n\n ArrayList<Integer> lst2 = new ArrayList<>();\n lst2.add(5);\n lst2.add(3);\n lst2.add(4);\n lst2.add(2);\n\n lst2.indexOf(3);\n System.out.println(\"\\nlst2 = \" + lst2);\n\n\n }", "void add(int index, Object element);", "public void insert(int index, T element);", "public interface List<T> extends Collection<T> {\n\t\n\t/**\n\t * Returns the object that is stored in the list at position <code>index</code>.\n\t * @param index position from which the object will be returned\n\t * @return the object that is stored at position <code>index</code>\n\t * @throws IndexOutOfBoundsException index must be between 0 and size-1\n\t */\n\tT get(int index);\n\t\n\t/**\n\t * Inserts the object at the specified position. It does not overwrite the given value at the given position, \n\t * it shifts the elements at greater positions one place toward the end.\n\t * @param value object to be inserted\n\t * @param position index where the object should be inserted\n\t * @throws NullPointerException <code>null</code> object will not be inserted into the list\n\t * @throws IndexOutOfBoundsException index must be between 0 and size\n\t */\n\tvoid insert(T value, int position);\n\t\n\t/**\n\t * Searches the collection and returns the index of the first occurrence of the given value\n\t * or -1 if the value is not found.\n\t * @param value object that will be searched\n\t * @return index of the first occurrence of the given object or -1 if the value is not found\n\t */\n\tint indexOf(Object value);\n\t\n\t/**\n\t * Removes element at specified index from collection. \n\t * Element that was previously at location index+1 after this operation is on location index , etc.\n\t * @param index index at which the element should be removed\n\t * @throws IndexOutOfBoundsException index must be between 0 and size-1\n\t */\n\tvoid remove(int index);\n}", "public void insert(int index, T value) {\n extend();\n for (int i = this.list.length-1; i >index; i--) {\n this.list[i] = this.list[i-1];\n }\n this.list[index] = value;\n this.size++;\n }", "void insert(Object value, int position);", "public interface List<T> extends Collection<T> {\n\n public void insert(T element, int index);\n public T replace(T element, int index);\n public T remove(int index);\n public T removeFirst();\n public T removeLast();\n public int indexOf(T element);\n public T get(int index);\n public T first();\n public T last();\n \n}", "public void addElement(Integer e){\n list.add(e);\n }", "@Override\n\tpublic void insert(L value,int position) {\n\t\tListNode<L> newFirst=this.first;\n\t\tint oldSize=this.size;\n\t\tthis.first=null;\n\t\tthis.last=null;\n\t\tif(position <0 || position >oldSize) throw new IndexOutOfBoundsException();\n\t\tif(position==oldSize) {\n\t\t\tadd(value);\n\t\t}else {\n\t\t\tthis.size=0;\n\t\t\tfor(int i=0;i<oldSize;i++) {\n\t\t\t\tif(i==position) {\n\t\t\t\t\tadd(value);\n\t\t\t\t}else {\n\t\t\t\t\tadd(newFirst.storage);\n\t\t\t\t\tnewFirst=newFirst.next;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tadd(newFirst.storage);\n\t\t}\n\t\tthis.modificationCount++;\n\t}", "public static void insert(ArrayList<Integer> list, int x)\n{\n // Your code here\n list.add(x);\n}", "void pushBack(T value) throws ListException;", "@Override\n\tpublic void set(int index, T insertItem) {\n\t\t\n\t}", "public boolean ListInsert(int i,T e){\n int j,k,l;\n // k is the index of the last element\n k = MAXSIZE-1;\n if(i<0||i>ListLength())\n return false;\n // Get index of free element\n j = Malloc_SSL();\n // If malloc success\n if(j!=0)\n {\n StaticLinkList[j].data = e;\n // Find the element,who is in front of the ith element\n for (l = 0; l < i; l++)\n k = StaticLinkList[k].cur;\n // s->next = p->next\n StaticLinkList[j].cur = StaticLinkList[k].cur;\n // p->next = s\n StaticLinkList[k].cur = j;\n return true;\n }\n return false;\n }", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "public void insert(E item) {\n // FILL IN\n }", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "void insert(int data, int position) {\n\t \n\t Node newNode = new Node(data); \n\t \n\t //Empty List - Returned newly created node or null\n\t if (head==null){\n\t \thead = newNode;\n\t \treturn;\n\t \t}\n\t \n\t //Inserting a Node before the head of the List\n\t if (position == 0){\n\t \tnewNode.next = head;\n\t \thead.prev = newNode;\n\t \thead = newNode;\n\t \treturn;\n\t \t} \n\n\n\t Node toIterate = new Node(data);\n\t toIterate = head; // A node equal to the head is created in order to find the new \n\t \t\t\t\t\t//position without changing the head\n\t \n\t for (int currPosition = 0; currPosition < position -1 && toIterate.next != null; toIterate = toIterate.next){ \n\t currPosition++; \n\t }\n\n\t //Inserting a Node in-between a List or at the end of of a List\n\t newNode.next = toIterate.next;\n\t toIterate.next.prev = newNode;\n\t newNode.prev = toIterate;\n\t toIterate.next = newNode;\n\t \n\t}", "@Override\n\tpublic void add(int index, Object e) throws IndexOutOfBoundsException\n\t{\n\t\t//just to check if the index is valid\n\t\tif ( index < 0 || index > size )\n \t\tthrow new IndexOutOfBoundsException();\n\t\t//check arraylist size\n\t\tif (size == myArray.length)\n\t\t\tresizeUp();\n\t\t//move all the proceeding elements to make room for the desired element\n\t\tfor ( int i = size; i > index; i-- )\n \t\tmyArray[i] = myArray[i-1];\n \t//plug the element\n\t\tmyArray[index] = e;\n \t++this.size;\n\n\t\t\n\t}" ]
[ "0.678354", "0.6504331", "0.65012735", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.64282745", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.6428116", "0.63212466", "0.6293422", "0.6265632", "0.6232867", "0.6186433", "0.6163807", "0.61540693", "0.6150069", "0.61206543", "0.60737705", "0.606914", "0.60642374", "0.60561526", "0.6005898", "0.6001725", "0.5990802", "0.598367", "0.5964184", "0.596281", "0.5961563", "0.5943421" ]
0.6434577
3
Returns the object that is stored in backing list at position index.
Object get(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object get(int index);", "public Object get(int index);", "public Object get(int index) {\n\t\tif (this.index == index) {\n\t\t\treturn object;\n\t\t} else {\n\t\t\treturn nextItem.get(index);\n\t\t}\n\t}", "@Override\r\n\tpublic T get(int index) {\n\t\treturn this._list.get(index);\r\n\t}", "public Object get(int index) {\r\n return deref(refs.get(index));\r\n }", "public T get(int index) {\n return list.get(index);\n }", "public T get(int index) {\n return this.list[index];\n }", "@Override\n public T get(int index) {\n return list.get(index);\n }", "public T get(int index);", "public T get(int index);", "public T get(int index);", "T getElementFromIndex(int index) throws ListException;", "public AdvObject getObject(int index) {\n\t\treturn objects.get(index); // Replace with your code\n\t}", "public Object get(int index)\n {\n return items[index];\n }", "Object getElementAt(int index);", "public E get(int index)\r\n {\r\n checkValidIndex(index);\r\n return listIterator(index).next();\r\n }", "public E get(int index) { \n return (E)list[index];\n }", "public Object get(final int index) {\n return super.get(index);\n }", "E get( int index );", "public T getByIndex(int index) {\n\n return this.myList[index];\n }", "public T get(int index) {\n return (index >= 0 && index < this.list.size()) ? this.list.get(index) : null;\n }", "@SuppressWarnings(\"unchecked\")\n public E get(int index) {\n checkIndex(index);\n return (E) list[index];\n }", "@Override\n\tpublic Object retrieve(int index) throws IndexOutOfBoundsException {\n\n\n\t\t// Check for valid size\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\n\t\t// set the position of the current node to the head\n\t\tNode current = head;\n\n\t\t// move through the list\n\t\tif (index == 0) {// head\n\t\t\treturn head.getElement();\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(i == index) {\n\t\t\t\treturn current.getElement();\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.getNext(); // set the node to the next node\n\t\t}\n\n\t\t// return the element in the node\n\t\treturn null;\n\t}", "public E get(int index) {\r\n return items.get(index);\r\n }", "public Item get(int index) {\n int track = nextFirst; //It does not modify nextFirst\n track = moveForward(track, index + 1);\n return items[track];\n }", "public E get(int index) {\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t} else {\n\t\t\treturn list[index];\n\t\t}\n\t}", "public Integer get(int index){\n return list.get(index);\n }", "public T get(int aIndex);", "public Object get(int index) {\r\n return entry(index).element;\r\n }", "public T get(int index) {\n if (index < length()) {\n return (T) list[startIndex + index];\n }\n return null;\n }", "public T get(int index) {\n return items[(nextFirst + 1 + index) % capacity];\n }", "public abstract T get(int index);", "@Override\n public AccountItem get(int index) {\n Object o = null;\n\n try {\n o = arrayList[index];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"The index that you entered is not within the bounds of this list\");\n System.exit(-1);\n }\n return (AccountItem) o;\n }", "public Object get( int index )\n {\n\treturn _data[index];\n }", "public GeometricalObject getObject(int index);", "public abstract Object get(int pos) throws IndexOutOfBoundsException;", "public int get(int index);", "public Item get(int index) {\n StuffNode ptr = sentinel;\n int ind = 0;\n if ((index + 1 > this.size()) || this.isEmpty() ) {\n return null;\n }\n while (ind <= index) {\n ptr = ptr.next;\n ind += 1;\n }\n return ptr.item;\n }", "public Object get(int index) {\n if (index >= _size) {\n throw new ListIndexOutOfBoundsException(\"Error\");\n }\n ListNode current = start;\n for (int i = 0; i<index; i++ ) {\n current = current.next;\n }\n return current.data;\n }", "public GameObject get(int index) {\r\n\t\treturn (GameObject) list.get(index);\r\n\t}", "@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}", "public E get(int index);", "public Object getElementAt(int index) {\n synchronized (itemsList) {\n return itemsList.get(index);\n }\n }", "public O get(int index)\r\n {\r\n if (index >= count || index < 0) return null;\r\n \r\n if (index > count/2)\r\n {\r\n //search from the end\r\n VectorItem<O> vi = last;\r\n for (int i=count-1;i>index;i--)\r\n {\r\n vi = vi.getPrevious();\r\n }\r\n return vi.getObject(); \r\n \r\n } else\r\n {\r\n //search from the beginning\r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<index;i++)\r\n {\r\n vi = vi.getNext();\r\n }\r\n return vi.getObject(); \r\n }\r\n }", "public Object get(int index) \r\n throws ListIndexOutOfBoundsException {\r\n\t\t\t\t\tif (index >= 0 && index <= numItems) { // If statement to catch out of bounds exception\r\n\t\t\t\t\t\t Node curr = head; // states curr is at head posistion\r\n\t\t\t\t\t\t for (int i = 1; i < index; i++) { // for loop to get to the current posistion that is equivelnt to i\r\n\t\t\t\t\t\t\t curr = curr.getNext();\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t return curr.getItem(); // returns item in current node\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t throw new ListIndexOutOfBoundsException (\"List index out of bounds\"); // else throws an index out of bounds exception\r\n\t\t\t\t\t}\r\n }", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "@Override\n public E get(int index) {\n if ((index < 0) || (index >= _size)) {\n throw new IndexOutOfBoundsException();\n }\n return _store[index];\n }", "public E get(int index)\n\t{\n\t\treturn contents[index];\n\t}", "int getItem(int index);", "public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}", "@Override\n public Object getItem(int index) {\n return internalList.get(index);\n }", "public T get(int index) {\n T result = null;\n if (index >= 0 && index < this.container.length) {\n result = (T) this.container[index];\n }\n return result;\n }", "@Override\r\n\tpublic IBytecodeItem get(int index) {\n\t\treturn null;\r\n\t}", "public ObjectWithProperties get(int index) {\n return delegate.get(index);\n }", "public Object elementAt(int index);", "@Override\n\tpublic T get(int index) {\n\t\tif (index >= 0 && index < size) {\n\t\t\treturn data[index];\n\t\t}\n\t\treturn null;\n\t}", "public abstract E get(int index);", "public Type get(int index);", "public T get(int index) {\n return v.get(index);\n }", "E get(int i) throws IndexOutOfBoundsException;", "GeometricalObject getObject(int index);", "public Object getObject(int pos) {\n return elements.get(pos);\n }", "public Object get(int index) {\n Node answer = first;\n for (int i = 0; i < index; i++) {\n answer = answer.next;\n }\n return answer.data;\n }", "@Override\n public synchronized WebHistoryItem getItemAtIndex(int index) {\n return mArray.get(index);\n }", "public abstract int indexFor(Object obj);", "@Override\n\tpublic L get(int index) {\n\t\tListNode<L> current;\n\t\tif(index <0 || index >=this.size()) throw new IndexOutOfBoundsException();\n\t\tif(index <= this.size/2) {\n\t\t\tcurrent=this.first;\n\t\t\tfor(int i=0;i<index;i++) {\n\t\t\t\tcurrent=current.next;\n\t\t\t\t}\n\t\t}else {\n\t\t\tcurrent=this.last;\n\t\t\tfor(int i=this.size-1;i>index;i--) {\n\t\t\t\tcurrent=current.previous;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn current.storage;\n\t}", "public ContentObject getCurrent(\n )\n {\n if(index < 0 || index >= objects.size())\n return null;\n\n return objects.get(index);\n }", "public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}", "public E get(int index) {\n return this.elements[index];\n }", "public T get(int index){\n if(!rangeCheck(index)){\n return null;\n }\n return (T)data[index];\n }", "public T getObject(long index) {\n\t\tValueStoragePage<T> page = getPage(getPageID(index));\n\t\tif (page != null) {\n\t\t\treturn page.getObject(getPageOffset(index));\n\t\t}\n\t\treturn null;\n\t}", "public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index];\n\t\treturn null;\n\t}", "public int getIndex() { return this.index; }", "public Object getObject()\n {\n if (currentObject == null)\n \t return null;\n else\n return AL.indexOf(currentObject);\n }", "@Override\n public T get(final int index) {\n this.checkIndex(index);\n return this.data[index];\n }", "public synchronized T get(int index) {\n\t\t\n\t\tObjectId id = mIds.get(index);\n\t\tObject lock = (id != null) ? mIdLocks.get(id) : new Object();\n\t\tT obj = mObjects.get(index);\n\t\t\n\t\t// If null was added to the list (so no id available for a null object) just return null\n\t\tif(id == null && obj == null) return null;\n\t\t// While we don't have the object yet, await for it\n\t\twhile(obj == null) {\n\t\t\t// If there is no id anymore to fetch (and no object) return null\n\t\t\tif(id == null) return null;\n\t\t\t// Wait on the lock for that object to fetch\n\t\t\tsynchronized(lock) {\n\t\t\t\ttry {\n\t\t\t\t\tlock.wait(2000);\n\t\t\t\t} catch (InterruptedException ex) {\n\t\t\t\t\tLogger.getLogger(LazyList.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Get new id, lock and object for the index.\n\t\t\t// That should never return any other id then the call at the start of this method,\n\t\t\t// since all modification methods of this list are synchronized, we just call this\n\t\t\t// to make really sure, this loop won't result in a dead lock.\n\t\t\t//id = mIds.get(index);\n\t\t\t//lock = mIdLocks.get(id);\n\t\t\tobj = mObjects.get(index);\n\t\t}\n\t\t\n\t\treturn obj;\n\t\t\n\t}", "@Override\n\tpublic E get(int index) {\n\t\treturn null;\n\t}", "@Override\n public T get(int index) {\n return indexCheck(index) ? (T) data[index] : null;\n }", "private E getElement(int index) {\n if (index >= contents.size()) {\n return null;\n } else {\n return contents.get(index);\n }\n }", "public final int getIndex(){\n return index_;\n }", "public int getIndex()\n {\n return m_index;\n }", "public PointF get(int index)\n {\n int realIndex = wrap(index, size());\n return Geometry.clone(points.get(realIndex));\n }", "public Object get(int index) {\n\t\treturn trainlist.get(index);\n\t}", "public synchronized WModelObject elementAt(int index)\n\t{\n\t\treturn (WModelObject)m_elements.elementAt(index);\n\t}", "public E get(int index) {\n\t\tif (index < 0 || index >= mSize)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\treturn getNode(index).data;\n\t}", "public T get(int index) {\n\t\tfor (int i = 0; i < lists.size(); i++) {\n\t\t\tList<? extends T> list = lists.get(i);\n\t\t\tif (index < list.size()) return list.get(index);\n\t\t\tindex -= list.size();\n\t\t}\n\t\tthrow new IndexOutOfBoundsException();\n\t}", "Object get(int i);", "abstract int get(int index);", "@Override\n public E get(final int index) {\n ensureValidIndex(size, index);\n return super.get(index + lower);\n }", "public Object get(int index)\n // returns the element at the specified position in this list.\n {\n if (index <= 0)\n return null;\n \n CrunchifyNode crunchifyCurrent = head.getNext();\n for (int i = 1; i < index; i++) {\n if (crunchifyCurrent.getNext() == null)\n return null;\n \n crunchifyCurrent = crunchifyCurrent.getNext();\n }\n return crunchifyCurrent.getData();\n }", "public GameObject elementAt(int indx) {\n\t\t\treturn gameObjects.elementAt(indx);\n\t\t}", "public Person get(int index) {\r\n\t\t// if the queue size is 0 then return null\r\n\t\tif(q.size() == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn q.get(index);\r\n\t}", "public E get(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn elements[index];\n\t}", "public int getIndex()\n {\n return index;\n }", "public int getIndex(){\n return index;\n }" ]
[ "0.75283116", "0.75283116", "0.7367976", "0.7216083", "0.72129166", "0.7209487", "0.71454114", "0.7104265", "0.7095279", "0.7095279", "0.7095279", "0.6978802", "0.69757545", "0.6964206", "0.6948169", "0.6936949", "0.6932843", "0.6914947", "0.69048953", "0.69006145", "0.6884075", "0.6881672", "0.68796223", "0.6870491", "0.6870082", "0.68681675", "0.68410856", "0.6826615", "0.68199515", "0.6803917", "0.67912394", "0.6785632", "0.67556983", "0.6743471", "0.6727159", "0.672675", "0.6711528", "0.6700355", "0.66799366", "0.6667682", "0.6652357", "0.66508126", "0.66491836", "0.6644744", "0.66333115", "0.6625598", "0.6625598", "0.6625598", "0.6625598", "0.6625598", "0.6611354", "0.65897876", "0.658437", "0.6550081", "0.6540508", "0.6535085", "0.650798", "0.6492161", "0.6487152", "0.6483608", "0.6481404", "0.6479897", "0.6475628", "0.6469655", "0.6453701", "0.6439903", "0.6435665", "0.6432162", "0.64270955", "0.6423647", "0.6418949", "0.64187884", "0.6411909", "0.64096165", "0.6404645", "0.640081", "0.6394056", "0.6383177", "0.6378193", "0.6375187", "0.63606495", "0.63593155", "0.6356127", "0.6347721", "0.6346735", "0.63374525", "0.6335902", "0.63327086", "0.6329704", "0.632762", "0.63269734", "0.63255453", "0.6322243", "0.63203096", "0.63035965", "0.63011026", "0.6300493", "0.62864816", "0.6284638" ]
0.76038516
1
Inserts (does not overwrite) the given value at the given position in list.
void insert(Object value, int position);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void insert(int index, T value) throws ListException;", "void insert(T value, int position);", "void insert(int idx, int val);", "public void insert(int index, T value) {\n extend();\n for (int i = this.list.length-1; i >index; i--) {\n this.list[i] = this.list[i-1];\n }\n this.list[index] = value;\n this.size++;\n }", "public void insert(int value, int pos){\n if (head != null) {\n // Have a first node\n head = head.insert(value,pos);\n } else {\n // List empty\n this.add(value);\n }\n }", "public void insertAtPos(int val, int position){\n singlyListNode n = new singlyListNode(val, null);\n singlyListNode ptr = this.head;\n int previous = position - 1;\n //find insertion position\n for (int i = 0 ; i < this.listSize; i ++){\n if (i == position){\n singlyListNode temp = ptr.getNextNode();\n ptr.setNextNode(n);\n n.setNextNode(temp);\n break;\n }\n ptr = ptr.getNextNode();\n }\n this.listSize ++;\n }", "public void insertAtPos(int val , int pos)\n {\n List nptr = new List(val, null, null); \n if (pos == 1)\n {\n insertAtStart(val);\n return;\n } \n List ptr = start;\n for (int i = 2; i <= size; i++)\n {\n if (i == pos)\n {\n List tmp = ptr.getListNext();\n ptr.setListNext(nptr);\n nptr.setListPrev(ptr);\n nptr.setListNext(tmp);\n tmp.setListPrev(nptr);\n }\n ptr = ptr.getListNext(); \n }\n size++ ;\n }", "@Override\n\tpublic void insert(L value,int position) {\n\t\tListNode<L> newFirst=this.first;\n\t\tint oldSize=this.size;\n\t\tthis.first=null;\n\t\tthis.last=null;\n\t\tif(position <0 || position >oldSize) throw new IndexOutOfBoundsException();\n\t\tif(position==oldSize) {\n\t\t\tadd(value);\n\t\t}else {\n\t\t\tthis.size=0;\n\t\t\tfor(int i=0;i<oldSize;i++) {\n\t\t\t\tif(i==position) {\n\t\t\t\t\tadd(value);\n\t\t\t\t}else {\n\t\t\t\t\tadd(newFirst.storage);\n\t\t\t\t\tnewFirst=newFirst.next;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tadd(newFirst.storage);\n\t\t}\n\t\tthis.modificationCount++;\n\t}", "public void insert(final Object value, final int position) {\n\t\tif (position < 0 || position > size) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif (this.size == this.capacity) {\n\t\t\treallocate();\n\t\t}\n\n\t\tfor (int i = size; i > position; i--) {\n\t\t\telements[i] = elements[i - 1];\n\t\t}\n\n\t\telements[position] = value;\n\t\tsize++;\n\n\t}", "public void insert(int index, T element);", "@Override\r\n public void insert(int index, Copiable value) throws IndexRangeException {\r\n if (index >= 0 && index <= count) {\r\n if (list.length == count) {\r\n Copiable[] list2 = new Copiable[2 * list.length];\r\n for (int k = 0; k < list.length; k++) {\r\n list2[k] = list[k];\r\n }\r\n list = list2;\r\n }\r\n for (int i = count; i > index; i--) {\r\n list[i] = list[i - 1];\r\n }\r\n list[index] = value;\r\n count++;\r\n } else {\r\n throw new IndexRangeException(0, count, index);\r\n }\r\n }", "public static void insert(ArrayList<Integer> list, int x)\n{\n // Your code here\n list.add(x);\n}", "public void insert (int value) \r\n\t{\r\n\t\tif(count == array.length) grow(); // grow the array if it is already full\r\n\r\n\t\tif(count == 0) // if we are inserting on an empty list...\r\n\t\t{\r\n\t\t\tarray[0] = value; // just insret the value\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\telse // the list is not empty...\r\n\t\t{\r\n\t\t\tint index2 = 0;\r\n\r\n\t\t\t// first get the insertion point\r\n\t\t\tfor (int index1= 0; index1 < count && value >= array[index1]; index1++)\r\n\t\t\t\tindex2++;\r\n\r\n\t\t\t// now we open space for inserting the new element\r\n\t\t\tfor (int index1 = count; index1 > index2; index1--) \r\n\t\t\t\tarray[index1] = array[index1 - 1];\r\n\r\n\t\t\t// insert the element and count it\r\n\t\t\tarray[index2] = value; \r\n\t\t\tcount++;\r\n\t\t}\r\n\t}", "public boolean insertValueAtIndex( int value, int index ) {\n if( size >= theList.length ) {\n expandTheList();\n } else if( index > size ) {\n size = index;\n } else if( index < 0 ) {\n throw new ArrayIndexOutOfBoundsException( \"The index value is too small\");\n } else {\n size++;\n for(int i = size - 1; i > index; i--){\n theList[i] = theList[i-1];\n }\n theList[index] = value;\n }\n return true;\n }", "public void insertElementAt(Object obj, int index);", "public void insert(int value){\n linkedList.insertLast(value);\n }", "public boolean insert(int val) {\n boolean contain = _map.containsKey(val);\n if ( contain ) return false;\n _map.put( val, _list.size());\n _list.add(val);\n return true;\n }", "@Override\n public void insertAtAnyPosition(T value, int index) {\n Node<T> new_node = new Node<>(value);\n if(index < 0)\n throw new IndexOutOfBoundsException();\n else if(index == 0){\n new_node.next = start;\n start = new_node;\n }else{\n Node<T> previous = start;\n for(int i =0;i<index-1;i++)\n {\n previous = previous.next;\n }\n Node<T> curr = previous.next;\n new_node.next = curr;\n previous.next = new_node;\n }\n\n }", "public void insert(int index, int value) {\n\t\tSystem.out.println(\"Top here is : \" + top);\n\t\tif (index < top && index > -1) {\n\t\t\tint tmp = top;\n\t\t\twhile (tmp != index - 1) {\n\t\t\t\tarr[tmp + 1] = arr[tmp];\n\t\t\t\ttmp--;\n\n\t\t\t}\n\t\t\ttop++;\n\t\t\tarr[index] = value;\n\t\t}else{\n\t\t\tinsert(value);\n\t\t}\n\n\t}", "public void insertAtPos(singlyListNode n, int position){\n singlyListNode ptr = this.head;\n int previous = position - 1;\n //find insertion position\n for (int i = 0 ; i < this.listSize; i ++){\n if (i == position){\n singlyListNode temp = ptr.getNextNode();\n ptr.setNextNode(n);\n n.setNextNode(temp);\n break;\n }\n ptr = ptr.getNextNode();\n }\n this.listSize ++;\n }", "private void insert(int pos, T elem) {\n for (int i = size; i >= pos + 1; i--) {\n arr[i] = arr[i-1];\n }\n arr[pos] = elem;\n }", "public boolean insert(int val) {\n if (!map.containsKey(val)) {\n map.put(val, lst.size());\n lst.add(val);\n return true;\n }\n return false;\n }", "public void insert(Integer data, int position) {\n\t\t// fix the position\n\t\tif (position < 0) {\n\t\t\tposition = 0;\n\t\t}\n\t\tif (position > length) {\n\t\t\tposition = length;\n\t\t}\n\n\t\t// if the list is empty, make it be the only element\n\t\tif (head == null) {\n\t\t\thead = new ListNode(data);\n\t\t}\n\t\t// if adding at the front of the list...\n\t\telse if (position == 0) {\n\t\t\tListNode temp = new ListNode(data);\n\t\t\ttemp.next = head;\n\t\t\thead = temp;\n\t\t}\n\t\t// else find the correct position and insert\n\t\telse {\n\t\t\tListNode previousNode = findPrevious(data);// find node before this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// one\n\t\t\tListNode newNode = new ListNode(data);//// Create a required node\n\t\t\t\t\t\t\t\t\t\t\t\t\t//// with the specified data\n\t\t\t\t\t\t\t\t\t\t\t\t\t//// and pointing to null\n\t\t\tnewNode.next = previousNode.next;// assign next pointer of newly\n\t\t\t\t\t\t\t\t\t\t\t\t// created newNode to Node to\n\t\t\t\t\t\t\t\t\t\t\t\t// which previous node was\n\t\t\t\t\t\t\t\t\t\t\t\t// connected\n\t\t\tpreviousNode.setNext(newNode);// now update pointer of previous node\n\t\t\t\t\t\t\t\t\t\t\t// to point to newNode\n\t\t}\n\t\t// the list is now one value longer\n\t\tlength += 1;\n\t}", "public boolean insert(int val) {\n if(map.containsKey(val)) return false;\n map.put(val, list.size());\n list.add(val);\n return true;\n }", "public void insert(String v, int position) {\n\t\t\t// fix the position\n\t\t\tif (position < 0) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t\tif (position > length) {\n\t\t\t\tposition = length;\n\t\t\t}\n\n\t\t\t// if the list is empty, make it be the only element\n\t\t\tif (head == null) {\n\t\t\t\thead = new ElementDPtr(v);\n\t\t\t\ttail = head;\n\t\t\t}\n\t\t\t// if adding at the front of the list...\n\t\t\telse if (position == 0) {\n\t\t\t\tElementDPtr temp = new ElementDPtr(v);\n\t\t\t\ttemp.setNext(head);\n\t\t\t\thead = temp;\n\t\t\t}\n\t\t\t// else find the correct position and insert\n\t\t\telse {\n\t\t\t\tElementDPtr temp = head;\n\t\t\t\tfor (int i=1; i<position; i+=1) {\n\t\t\t\t\ttemp = temp.getNext();\n\t\t\t\t}\n\t\t\t\tElementDPtr newNode = new ElementDPtr(v);\n\t\t\t\tnewNode.setNext(temp.getNext());\n\t\t\t\tnewNode.setPrev(temp);\n\t\t\t\tnewNode.getNext().setPrev(newNode);\n\t\t\t\ttemp.setNext(newNode);\n\t\t\t}\n\t\t\t// the list is now one value longer\n\t\t\tlength += 1;\n\t\t\tSystem.out.println(tail.getPrev().getValue() + \" insert \" + length);\n\t\t}", "public void insert(ValueType element) {\r\n // TODO\r\n }", "@Override\n public int insert(E value) {\n //noinspection DuplicateStringLiteralInspection\n log.trace(\"Adding '\" + value + \"' to pool '\" + poolName + \"'\");\n int insertPos = Collections.binarySearch(this, value, this);\n if (insertPos >= 0) {\n log.trace(\"Value '\" + value + \"' already exists in pool '\" + poolName + \"'\");\n return -1 * insertPos - 1;\n }\n insertPos = -1 * (insertPos + 1);\n add(insertPos, value); // Positive position\n return insertPos;\n }", "public void insertPos(int val, int pos) {\n // check if the position given is negative or greater than the size of the list\n // find the size of ll\n int size = calcSize(head);\n if (pos < 1 || pos > size) {\n System.out.println(pos + \" Invalid position \");\n } else {\n // create a new node\n Node newNode = new Node(val);\n // as traversal needed so keep a temp value\n Node temp = head;\n // we can use for loop too\n // #1->2->3->4->5->NULL\n // POS=3\n // Temp at head that is (#1)\n // --POS=2 (2)\n // --pos=1 (3)\n // --pos=0 come out od the loop\n // now temp= (3)\n // newnode (0)\n // #1->2->3->0->4->5->null\n while (--pos > 0) {\n temp = temp.next;\n }\n newNode.next = temp.next;\n temp.next = newNode;\n\n }\n\n }", "public void insert(int element) {\r\n\t\tint i = 0;\r\n\t\twhile (list[i] != -1)\r\n\t\t\ti++;\r\n\t\tlist[i] = element;\r\n\t\tinsertionSort(list);\r\n\t\tcurrentPosition = i;\r\n\t}", "void insertItem(Position position, IItem item);", "public boolean insert(int val) {\n\n return list.add(val);\n }", "<E> void poke(ArrayList<E> list, int pos, E val) {\n for (int i = list.size(); i <= pos; ++i) {\n list.add(i, null);\n }\n list.set(pos, val);\n }", "public void insert(Object value, int position) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot add null to the ArrayIndexedCollection.\");\n\t\t}\n\n\t\tif (position < 0 || position > size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Cannot insert value on invalid position.\");\n\t\t}\n\n\t\tif (size == capacity) {\n\t\t\treallocateDoubleCapacity();\n\t\t}\n\n\t\tif (position == size) {\n\t\t\telements[size] = value;\n\t\t\tsize++;\n\t\t\treturn;\n\t\t}\n\n\t\tshiftFrontArray(position);\n\n\t\tfor (int i = 0; i < capacity; i++) {\n\t\t\tif (elements[i] == null) {\n\t\t\t\telements[i] = value;\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void insert(T element);", "public void insert(Object item);", "public void add(T element, int pos);", "public void insertValueAtIndex(int value, int index) {\n if (arraySize < 50 && index < arraySize) {\n theArray[index] = value;\n }\n }", "public void insert(int i, T obj);", "@Override\n\tpublic void set(int index, T insertItem) {\n\t\t\n\t}", "public void insertBefore(String value, StringListIterator position)\n {\n\tStringListNode node = new StringListNode(value, position.node.prev, position.node);\n\tposition.node.prev = node;\n\tif (head == position.node) {\n\t head = node;\n\t}\n\telse {\n\t node.prev.next = node;\n\t}\n }", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "public boolean insert(int val) {\n if (set.containsKey(val)) return false;\n set.put(val, set.size());\n list.add(val);\n return true;\n }", "public native String insertItemBefore(String newItem, Number index);", "void insert(int pos, String s);", "public void searchAndInsert(T searchValue, T InsertValue){\n int index = searchByValue(searchValue) + 1;\n addAtIndex(index, InsertValue);\n }", "public void insert(int val)\n {\n try\n {\n a[index++] = val;\n n=index;\n }\n catch(Exception e)\n {\n System.out.println(�e.getMessage�);\n }\n }", "private void insertValue(int index, int value) {\n\n\t\tfor (int i = this.array.length - 1; i > index; i--) {\n\t\t\tthis.array[i] = this.array[i - 1];\n\t\t}\n\n\t\tthis.array[index] = value;\n\t\tcount++;\n\t\tSystem.out.println(\"이동 횟수는 : \" + (count - (index + 1)));\n\t\tthis.showArray();\n\n\t}", "public void insert(int newItem){\n itemArray[count] = newItem;\n count++;\n }", "public void insertAtPos(int val , int pos)\n\n {\n\n Node nptr = new Node(val, null, null); \n\n if (pos == 1)\n\n {\n\n insertAtStart(val);\n\n return;\n\n } \n\n Node ptr = start;\n\n for (int i = 2; i <= size; i++)\n\n {\n\n if (i == pos)\n\n {\n\n Node tmp = ptr.getLinkNext();\n\n ptr.setLinkNext(nptr);\n\n nptr.setLinkPrev(ptr);\n\n nptr.setLinkNext(tmp);\n\n tmp.setLinkPrev(nptr);\n\n }\n\n ptr = ptr.getLinkNext(); \n\n }\n\n size++ ;\n\n }", "public void addBefore(E val, int idx) throws IndexOutOfBoundsException {\n addNodeBefore(new SinglyLinkedList.Node<>(val), idx);\n }", "public void insert(int pos, int data){\n\t\tif (pos == 0){\n\t\t\tpreappend(data);\n\t\t\treturn;\n\t\t}\n\n\t\tNode newNode = new Node(data);\n\t\tNode prev = this.head;\n\t\tNode current = prev;\n\t\tint counter = 0;\n\t\twhile(current != null){\n\t\t\tcurrent = current.next;\n\t\t\tcounter++;\n\t\t\tif (counter == pos){\n\t\t\t\tprev.next = newNode;\n\t\t\t\tnewNode.next = current;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (prev.next != null){\n\t\t\t\tprev = prev.next;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Position larger then linkedlist so add to end\n\t\tprev.next = newNode;\n\t\treturn;\n\t}", "public void insert(int index,int value)\n {\n System.out.println(\"data size\"+data.length);\n if(size==initialCapacity){\n resize();\n }\n \n \n \n for(int j=size-1;j>=index;j--){\n //j initial position is last element\n // j needs to move till\n //start from last element and change to next position\n \n data[j+1]=data[j]; \n }\n// // Copy up\n// for (int j = size; j > index; j--) {\n// data[j] = data[j-1];\n// }\n data[index]=value;\n size++;\n }", "private static void addAtTest( int addAt\n , int value\n ) {\n list.add( addAt, value);\n System.out.println(\n \"insert \" + value\n + \" at position \" + addAt\n + \", resulting in \" + list.size() + \" elements:\"\n + System.lineSeparator()\n + list\n + System.lineSeparator()\n );\n }", "public void insertElementAt(Replicated obj, int index)\r\n\t{\n\t\tinsert(obj, index);\r\n\t}", "public static void insert(List<Integer> values, int next) {\r\n\r\n int i = next;\r\n while (i > 0 && values.get(i) < values.get(i - 1)) {\r\n swap(values, i, i - 1);\r\n i = i - 1;\r\n } // while\r\n\r\n }", "public void insertElementAt(Object obj, int index)\n {\n try {element.insertElementAt(obj, index);}\n catch (Exception e) {\n throw new IllegalArgumentException\n (\"VectorLinearList.insertElementAt: \" +\n \"index must be between 0 and size\");\n }\n }", "public void insert( int x) \r\n {\r\n h[++N] = x;\r\n siftUp( N);\r\n }", "void insert(int data, int position) {\n\t \n\t Node newNode = new Node(data); \n\t \n\t //Empty List - Returned newly created node or null\n\t if (head==null){\n\t \thead = newNode;\n\t \treturn;\n\t \t}\n\t \n\t //Inserting a Node before the head of the List\n\t if (position == 0){\n\t \tnewNode.next = head;\n\t \thead.prev = newNode;\n\t \thead = newNode;\n\t \treturn;\n\t \t} \n\n\n\t Node toIterate = new Node(data);\n\t toIterate = head; // A node equal to the head is created in order to find the new \n\t \t\t\t\t\t//position without changing the head\n\t \n\t for (int currPosition = 0; currPosition < position -1 && toIterate.next != null; toIterate = toIterate.next){ \n\t currPosition++; \n\t }\n\n\t //Inserting a Node in-between a List or at the end of of a List\n\t newNode.next = toIterate.next;\n\t toIterate.next.prev = newNode;\n\t newNode.prev = toIterate;\n\t toIterate.next = newNode;\n\t \n\t}", "public boolean insert(int val) {\r\n\r\n\t\tint pos = get_pos(val);\r\n\t\tif (bucket[pos] != null) {\r\n\t\t\tNode n = bucket[pos].list;\r\n\t\t\tNode p = n;\r\n\t\t\twhile (n != null) {\r\n\t\t\t\tif (n.val == val)\r\n\t\t\t\t\treturn false;\r\n\t\t\t\tp = n;\r\n\t\t\t\tn = n.next;\r\n\t\t\t}\r\n\t\t\tp.next = new Node(val);\r\n\t\t} else {\r\n\t\t\tbucket[pos] = new BucketItem();\r\n\t\t\tbucket[pos].list = new Node(val);\r\n\t\t}\r\n\t\tbucket[pos].size++;\r\n\t\treturn true;\r\n\t}", "public void insert(L l);", "public static void insert (int[] values, int pos, int newInt) {\n\t\tif (pos < 0 || pos >= values.length) {\n\t\t\treturn;\n\t\t}\n\t\tfor (int i =values.length-1;i>pos;i--){\n\t\t\tvalues[i]=values[i-1];\t\n\t\t}\n\t\tvalues[pos]=newInt;\n\t}", "public void insert(T x);", "public void insert(int position, E o) {\n\t\tif (position >= 0 && position <= size) {\n\t\t\t// first resize the storage array\n\t\t\tE[] newData = (E[]) new Object[size + 1];\n\t\t\t// copy the data prior to the insertion\n\t\t\tfor (int i = 0; i < position; i++)\n\t\t\t\tnewData[i] = data[i];\n\t\t\t// insert the new element\n\t\t\tnewData[position] = o;\n\t\t\t// move the data after the insertion\n\t\t\tfor (int i = position; i < size; i++)\n\t\t\t\tnewData[i + 1] = data[i];\n\t\t\t// replace the storage with the new array\n\t\t\tdata = newData;\n\t\t\tsize = size + 1;\n\t\t}\n\t}", "private void addToPlayList(final Song[] list, int position) {\n\t\tint addlen = list.length;\n\t\tif (position < 0) { // overwrite\n\t\t\tmPlayListLen = 0;\n\t\t\tmPlayOrder = new int[0];\n\t\t\tposition = 0;\n\t\t}\n\t\tensurePlayListCapacity(mPlayListLen + addlen);\n\t\tif (position > mPlayListLen) {\n\t\t\tposition = mPlayListLen;\n\t\t}\n\n\t\t// move part of list after insertion point\n\t\tint tailsize = mPlayListLen - position;\n\t\tfor (int i = tailsize; i > 0; i--) {\n\t\t\tmPlayList[position + i] = mPlayList[position + i - addlen];\n\t\t}\n\n\t\t// copy list into playlist\n\t\tfor (int i = 0; i < addlen; i++) {\n\t\t\tmPlayList[position + i] = list[i];\n\t\t}\n\t\tint[] a = generateArray(mPlayListLen, addlen);\n\t\tif (mShuffleMode == SHUFFLE_NORMAL) {\n\t\t\tshuffleArray(a);\n\t\t}\n\t\tmPlayOrder = concat(mPlayOrder, a);\n\t\tmPlayListLen += addlen;\n\t\tif (mPlayListLen == 0) {\n\t\t\tnotifyChange(EVENT_META_CHANGED);\n\t\t}\n\t}", "public boolean insert(int val) {\n if(! valToIndex.containsKey(val)){\n // add element to list\n elementsList.add(val);\n // add val + index to map\n valToIndex.put(val, elementsList.size()-1);\n return true;\n }\n\n return false;\n }", "public void insert(T val) {\n\t\tlstEle.add(val);\n\t\theapSize++;\n\t\t// Need to move up the tree and satisfy the heap property\n\t\tint currIndex = heapSize - 1;\n\t\tint parentIndex = getParent(currIndex);\n\t\tif (parentIndex >= 0) {\n\t\t\tdo {\n\t\t\t\tT parentVal = lstEle.get(parentIndex);\n\t\t\t\tif (parentVal.compareTo(val) > 0) {\n\t\t\t\t\tlstEle.set(parentIndex, val);\n\t\t\t\t\tlstEle.set(currIndex, parentVal);\n\t\t\t\t\tcurrIndex = parentIndex;\n\t\t\t\t\tparentIndex = getParent(currIndex);\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (parentIndex >= 0);\n\t\t}else{\n\t\t\t//do nothing\n\t\t}\n\t\t\n\t}", "void pushFront(T value) throws ListException;", "public void insert(KeyedItem newItem);", "@Override\n public void insert(E newItem) {\n if (list.size()==0)\n list.add(newItem);\n else\n {\n ListIterator<E> itList = list.listIterator();\n boolean isAdded=false;\n while (itList.hasNext())\n {\n int status=newItem.toString().compareTo(itList.next().toString());\n if(status==0)\n {\n itList.add(newItem);\n isAdded=true;\n }\n else if(status<0)\n {\n if (itList.hasPrevious())\n itList.previous();\n itList.add(newItem);\n isAdded=true;\n break;\n }\n }\n if (!isAdded)\n {\n list.add(newItem);\n }\n }\n\n }", "int insertElement(int list, int beforeNode, int data) {\n\t\tint node = newNode_();\n\t\tint prev = -1;\n\t\tif (beforeNode != nullNode()) {\n\t\t\tprev = getPrev(beforeNode);\n\t\t\tsetPrev_(beforeNode, node);\n\t\t}\n\n\t\tsetNext_(node, beforeNode);\n\t\tif (prev != nullNode())\n\t\t\tsetNext_(prev, node);\n\n\t\tint head = m_lists.getField(list, 0);\n\n\t\tif (beforeNode == head)\n\t\t\tm_lists.setField(list, 0, node);\n\t\tif (beforeNode == nullNode()) {\n\t\t\tint tail = m_lists.getField(list, 1);\n\t\t\tsetPrev_(node, tail);\n\t\t\tif (tail != -1)\n\t\t\t\tsetNext_(tail, node);\n\n\t\t\tm_lists.setField(list, 1, node);\n\t\t}\n\n\t\tsetData(node, data);\n\t\tsetListSize_(list, getListSize(list) + 1);\n\n\t\tif (m_b_store_list_index_with_node)\n\t\t\tsetList_(node, list);\n\n\t\treturn node;\n\t}", "private void arrayInsertNegativeNumber(MyArrayList myArrayList, Results results, int value) {\r\n myArrayList.insertSorted(value);\r\n if(myArrayList.search(value)) { \r\n results.storeNewResult(\"ArrayInsertNegativeNumber test case: FAILED\");\r\n }\r\n else { \r\n results.storeNewResult(\"ArrayInsertNegativeNumber test case: PASSED\");\r\n }\r\n }", "void insertOrUpdate(StockList stockList) throws Exception;", "@Override\n public void add(int index, E value) {\n // todo: Students must code\n ensureCapacity();\n int pos = calculate(index); // True position in array\n\n // if there are no elements, set head to the position (index 0, position ??)\n // *protects against divide by zero in modulus*\n if(size() == 0) {\n data[pos] = value;\n head = pos;\n tail = pos;\n // tail = (pos+1)%data.length;\n }\n // if the logical position is the head, then insert right before head and reassign head-variable\n // *tail stays the same*\n else if(index == 0) {\n int i = (head-1);\n if (i < 0) i = data.length-1;\n head = i;\n data[head] = value;\n }\n else{\n // shift all array contents after pos right 1\n for(int i = (pos + size() - index); i > pos; i--)\n data[i % data.length] = data[(i-1) % data.length];\n data[pos] = value;\n tail = (tail + 1) % data.length;\n }\n curSize++;\n }", "public void insertAtPosition(int data, int position) {\n //fix the position \n if (position < 0) position = 0;\n if (position > length) position = length;\n\n //if the list is empty, this is going to be the only element in the list.\n if (head == null) {\n head = new DoublyLinkedList(data);\n tail = head;\n }\n //if the element is added at the front of list \n else if (position == 0) {\n DoublyLinkedList temp = new DoublyLinkedList(data);\n temp.next = head;\n head = temp;\n }\n //locate the exact position and add the element now\n else {\n DoublyLinkedList temp = head;\n int i = 1;\n while (i < position) {\n temp = temp.getNext();\n }\n DoublyLinkedList newNode = new DoublyLinkedList(data);\n newNode.next = temp.next;\n newNode.prev = temp;\n newNode.next.prev = newNode;\n newNode.prev.next = newNode; // temp.next = newNode;\n }\n //finally increment the length\n length += 1;\n }", "@SuppressWarnings(\"unchecked\")\n public void insert(E value) {\n int level = flipAndIncrementLevel();\n\n SLNode<E> newNode = new SLNode<>(value,level);\n\n SLNode cur_walker = head;\n\n for (int i = currentMaxLevel - 1; i >= 0; i--) {\n // walk down the level until it find a range\n while (null != cur_walker.next[i]) {\n // when at bottom level, i is always 0, needs to find the right node to stop\n if (greaterThan((E) cur_walker.next[i].getValue(), value) ) {\n break;\n }\n cur_walker = cur_walker.next[i];\n }\n\n if (i <= level) {\n newNode.next[i] = cur_walker.next[i];\n cur_walker.next[i] = newNode;\n }\n }\n\n size++;\n }", "public <T> void insertValue(EObject container, EStructuralFeature structuralFeature, T value, Integer index) {\n\t\tDEModelLocker.activateWriter(this);\n\t\t\n\t\ttry {\n\t\t\tEList<T> currentListValue = getManyValueOrFail(container, structuralFeature, value);\n\t\n\t\t\t//EObjects may be contained in a containment EReference, which they are removed from\n\t\t\t//upon adding them to a new containment reference.\n\t\t\tif (value instanceof EObject) {\n\t\t\t\tEObject valueObject = (EObject) value;\n\t\t\t\tscheduleRemoveFromContainment(valueObject);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//If the target structural feature is single and a previous value exists, it will be removed.\n\t\t\t//TODO: Untested\n\t\t\tif (!FeatureMapUtil.isMany(container, structuralFeature)) {\n\t\t\t\tObject previousValue = container.eGet(structuralFeature);\n\t\t\t\t\n\t\t\t\tscheduleRemove(container, container, structuralFeature, previousValue);\n\t\t\t}\n\t\t\t\n\t\t\tif (index == null) {\n\t\t\t\t//Append to list of nothing else specified.\n\t\t\t\tindex = currentListValue.size();\n\t\t\t}\n\t\t\t\n\t\t\tDEModelLocker.scheduleAddValueWriteAccess(container, structuralFeature, value, index);\n\t\t\tcurrentListValue.add(value);\n\t\t} finally {\n\t\t\tDEModelLocker.deactivateWriter(this);\n\t\t}\n\t}", "public void insert(Object element1, Object element2, Object element3);", "public void insertAtEnd(int val)\n {\n List nptr = new List(val, null, null); \n if(start == null)\n {\n start = nptr;\n end = start;\n }\n else\n {\n nptr.setListPrev(end);\n end.setListNext(nptr);\n end = nptr;\n }\n size++;\n }", "private static void insertAtPos(int data, int pos) {\n\tNode newnode=new Node(data);\n\tNode temp=head;\n\tNode n=head;\n\tint size=0;\n\twhile(n!=null)\n\t{\n\t\tn=n.next;\n\t\ttemp=temp.next;\n\t\tsize++;\n\t}\n\tn=head;\n\ttemp=head;\n\tfor(int i=0;i<pos-2;i++)\n\t{\n\t\tn=n.next;\n\t\ttemp=temp.next;\n\t}\n\ttemp=temp.next;\n\tnewnode.next=n.next;\n\tn.next=newnode;\n\ttemp.prev=newnode;\n\tnewnode.prev=n;\n}", "public void insertAtStart(int val)\n {\n List nptr = new List(val, null, null); \n if(start == null)\n {\n start = nptr;\n end = start;\n }\n else\n {\n start.setListPrev(nptr);\n nptr.setListNext(start);\n start = nptr;\n }\n size++;\n }", "public void insertValue(int value) {\n if (arraySize < 50) {\n theArray[arraySize] = value;\n arraySize++;\n }\n }", "public void insert(Integer x) {\n pq[++N] = x;\n swim(N);\n }", "public void insert(int value) {\n\t\tif (isEmpty()) {\n\t\t\thead = new IntNode(value, head, null);\n\t\t\tcurrent = head;\n\t\t}\n\t\telse {\n\t\t\tcurrent.setNext(new IntNode(value, current, current.getNext()));\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t}", "public boolean insert(int val) {\n if (location.containsKey(val)) {\n return false;\n }\n\n nums.add(val);\n location.put(val, nums.size() - 1);\n return true;\n }", "public void insert(int position, Item_Data_Card data) {\n list.add(position, data);\n notifyItemInserted(position);\n }", "public void insert(int i) {\n\t\tif (top > -2 && top < size - 1) {\n\t\t\ttop += 1;\n\t\t\tarr[top] = i;\n\t\t} else if (top == size - 1) {\n\t\t\tsize *= 2;\n\t\t\ttop += 1;\n\t\t\tarr = Arrays.copyOf(arr, size);\n\t\t\tarr[top] = i;\n\t\t}\n\t}", "public boolean insert(int val) {\n if (list.containsKey(val)) {\n list.put(val,list.get(val) +1);\n linklist.add(val);\n return false;\n } else {\n linklist.add(val);\n list.put(val,1);\n return true;\n }\n }", "@Override\n\tpublic void addAt(int n, int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size+1)) { //check if index is valid\n\t\t\tfor (int i=size; i>index; i--) {\n\t\t\t\tvalues[i] = values[i-1]; //move every value one step right until index\n\t\t\t}\n\t\t\tvalues[index] = n; //place the new value at index\n\t\t\tsize++; //increment size\n\t\t\tif (size == values.length) { //if the list is full expand it\n\t\t\t\tresize();\n\t\t\t}\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}", "public static native int InsertAt(long lpjFbxArrayVector2, int pIndex, long pElement);", "public void insertBefore(int value, int newVal) {\n try {\n ListNode nodeValue = new ListNode(value);\n ListNode newValue = new ListNode(newVal);\n ListNode current = this.root;\n\n while (current.data != value) {\n current = current.next;\n }\n newValue.next = current.next;\n current.next = newValue;\n } catch (NullPointerException e) {\n System.out.println(\"You have reached the end of the list.\");\n }\n }", "Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;", "@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}", "public void insertIntoPosition(HTreeNode node, int position) {\r\n HTreeNode newNode = new HTreeNode(node.getCharacter(), null);\r\n HTreeNode listrunner = getHeadNode();\r\n int increment = 1;\r\n //if substatement handles the case of an empty list\r\n if (listrunner == null) {\r\n setHeadNode(newNode);\r\n }\r\n else {\r\n //loop advances listrunner to the node in position (position - 1)\r\n //excessively large position input will cause the node to be added to the end of the list\r\n while (listrunner.getNext() != null && increment < position - 1) {\r\n listrunner = listrunner.getNext();\r\n increment++;\r\n }\r\n //new node is inserted between positions (position - 1) and (position), thus becoming the new (position)\r\n HTreeNode temp = listrunner.getNext();\r\n listrunner.setNext(newNode);\r\n newNode.setNext(temp);\r\n length += 1;\r\n }\r\n }", "public void insertAfter(String value, StringListIterator position)\n {\n\tStringListNode node = new StringListNode(value, position.node, position.node.next);\n\tposition.node.next = node;\n\tif (tail == position.node) {\n\t tail = node;\n\t}\n\telse {\n\t node.next.prev = node;\n\t}\n }", "public boolean insert(int val) {\n if (valueToIndex.containsKey(val)) return false;\n //将元素放入arraylist,并将val和index的映射放入map\n values.add(val);\n valueToIndex.put(val, values.size() - 1);\n return true;\n }", "public void insert(int position, Imgdata spldata) {\n list.add(position, spldata);\n notifyItemInserted(position);\n }", "public boolean insert(int val) {\n if (m.containsKey(val)) {\n return false;\n } else {\n l.add(val);\n m.put(val, l.size()-1);\n return true;\n }\n }", "public boolean insert(int val) {\r\n return insert(val, true);\r\n }", "public boolean insert(int val) {\n if(map.containsKey(val))\n {\t\n \tmap.get(val).add(list.size());\n \tlist.add(val);\n \treturn false;\n }else{\n \tmap.put(val, new HashSet<Integer>());\n \tmap.get(val).add(list.size()); \t\n \tlist.add(val);\n \treturn true;\n }\n }", "public void insert(E e);" ]
[ "0.77759165", "0.75330085", "0.7302187", "0.72551006", "0.7207023", "0.71157646", "0.7094619", "0.70328796", "0.68600154", "0.68525475", "0.6817321", "0.6783441", "0.66422594", "0.6635825", "0.660299", "0.6551581", "0.65074515", "0.648253", "0.64452535", "0.63989764", "0.6364862", "0.63595134", "0.63513833", "0.6347626", "0.6334442", "0.63095814", "0.63089347", "0.6308099", "0.6294613", "0.6270335", "0.62585604", "0.6240463", "0.62287736", "0.6186819", "0.6161935", "0.614961", "0.6149391", "0.6128337", "0.61067057", "0.61042285", "0.60924524", "0.6075621", "0.6065589", "0.60492706", "0.6047077", "0.60311943", "0.60288167", "0.60060436", "0.6004586", "0.59820163", "0.5971184", "0.5960339", "0.5941473", "0.59103924", "0.5901444", "0.589868", "0.5879656", "0.5865873", "0.5860838", "0.58276033", "0.5825972", "0.58167124", "0.5814947", "0.58023334", "0.5795441", "0.57819873", "0.5780487", "0.57782996", "0.5777578", "0.5775539", "0.5768526", "0.57673746", "0.5760698", "0.5748519", "0.5746785", "0.5743826", "0.5741862", "0.57329375", "0.5732362", "0.5724489", "0.5724312", "0.5717807", "0.5716721", "0.5716681", "0.57126325", "0.57088697", "0.57052284", "0.5702127", "0.5702095", "0.56994647", "0.5697141", "0.5695119", "0.5694659", "0.5687367", "0.56717265", "0.56687325", "0.5664436", "0.56592697", "0.5658304", "0.56578815" ]
0.75990194
1
Searches the collection and returns the index of the first occurrence of the given value or 1 if the value is not found.
int indexOf(Object value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public int locate(Copiable value) {\r\n for (int i = 0; i < count; i++) {\r\n if (list[i].equals(value)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "@Override\n\tpublic int find(int pValueToFind) {\n\t\tfor (int n = 0; n < pointer; ++n) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\t// this returns the index position\n\t\t\t\treturn n;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Contract(pure = true)\n default int indexOf(Object value) {\n int idx = 0;\n if (value == null) {\n for (E e : this) {\n if (null == e) {\n return idx;\n }\n ++idx;\n }\n } else {\n for (E e : this) {\n if (value.equals(e)) {\n return idx;\n }\n ++idx;\n }\n }\n return -1;\n }", "public int find(int value) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tif (data[i]==value) return i;\n \t\t}\n \t\t\t\n \t\treturn -1;\n \t}", "public int indexOf(E value) {\n\t\tif (isEmpty()) {\n\t\t\treturn -1;\n\t\t}\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (((Person) get(i)).equalsPerson((Person) value)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "Integer getIndexOfGivenValue(String value) {\n Integer index = null;\n for (IndexValuePair indexValuePair : indexValuePairs) {\n if (indexValuePair.getValue().equals(value)) {\n index = indexValuePair.getIndex();\n break;\n }\n }\n return index;\n }", "public int searchByValue(T value) {\n Node<T> currNode = head;\n int index = 0;\n if (null != currNode) {\n while ((null != currNode.next) || (null != currNode.data)) {\n if (currNode.data == value) {\n break;\n }\n currNode = currNode.next;\n if (null == currNode) {\n return -1;\n }\n index++;\n }\n }\n return index;\n }", "private int indexValue(String value) {\n int loc = openHashCode(value);\n //if the searchVal exist\n if (this.openHashSetArray[loc] == null||!this.openHashSetArray[loc].myList.contains(value))\n return -1;\n else\n return loc;\n\n }", "public int indexOf(Object value) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public int indexOf()\n {\n\treturn indexOfValue(mValue);\n }", "public int indexOf(final Object value) {\n\t\tint position = -1;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tposition = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn position;\n\t}", "public int indexOf(Object value) {\n Element element = _headAndTail.getNext();\n for (int i = 0; i < _size; i++) {\n if (value.equals(element.getValue())) {\n return i;\n }\n element = element.getNext();\n }\n return -1;\n }", "public int search(T value) {\n\t\tif(head!=null) {\n\t\t\tNode<T> current=head;\n\t\t\tint i=0;\n\t\t\twhile(current!=null && current.getValue()!=value) {\n\t\t\t\ti++;\n\t\t\t\tcurrent=current.getNext();\n\t\t\t}\n\t\t\tif(i >= size) return -1;\n\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "public int search(char value)\n {\n for(int i = 0; i < this.raw_value.length; i++)\n {\n if(this.raw_value[i] == value) return i;\n }\n return -1;\n }", "public int findItem(int value) {\n return find(value, root);\n }", "@Override\n\tpublic int indexOf(Object value) {\n\t\tListNode<L> current=this.first;\n\t\tfor(int i=0;i<this.size;i++) {\n\t\t\tif(current.storage==value) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tcurrent=current.next;\n\t\t}\n\t\treturn -1;\n\t\n\t}", "protected int findIndex(A val) {\n int index = 0;\n boolean found = false;\n \n \n if (elems[0] == null || elems[0] == val){\n return index;\n }\n else{\n \n }\n \n \n\n return index; \n }", "int getIndexOfElement(T value);", "public int indexOf(int value) {\n\t\tint index = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tif (current.data == value) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t\tindex++;\n\t\t\tcurrent = current.next;\n\t\t}\n\t\treturn -1;\n\t}", "private int findIndex(String value) {\n\tint index = 0;\n\tfor (int i = 0; i < getData().length && index == 0;) {\n\t if (value.compareTo(getData()[i]) <= 0) {\n\t\tindex = i;\n\t }\n\t else {\n\t\ti++;\n\t }\n\t}\n\treturn index;\n }", "public static int Find(int[] array, int value) {\r\n\t\tint j = -1;\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tif (array[i] == value) {\r\n\t\t\t\tj = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn j;\r\n\t}", "public static int find(String[] list, String value) {\n if ((list == null) || (list.length == 0))\n return -1;\n\n for (int i = 0; i < list.length; i++) {\n if (value == null) {\n\n // null proof: allow ?\n if (list[i] == null)\n return i;\n } else if (list[i].compareTo(value) == 0) {\n return i;\n }\n }\n\n return -1;\n }", "int indexOf(int val);", "public int getIndex(Set<? extends Object> set, Object value) {\n\t int result = 0;\n\t for (Object entry:set) {\n\t if (entry.equals(value)) return result;\n\t result++;\n\t }\n\t return -1;\n\t }", "public int indexOf(Object val) {\n Integer idx = hmap.get(val);\n if (idx == null)\n return -1;\n return idx.intValue();\n }", "@Override\n public int find(T t) {\n for(int i = 0; i < arrayList.length; i++) {\n if(t.equals(arrayList[i])) {\n return i;\n }\n }\n return -1;\n }", "public static void Search(ArrayList<Integer> list, int val)\n{\n // Your code here\n int result = -1;\n for(int i=0; i<list.size(); i++)\n {\n if(list.get(i) == val)\n {\n result = i;\n break;\n }\n }\n System.out.print(result + \" \");\n \n}", "private int findIndex(T item){\n for(int i = 0; i < numItems; i++){\n if(arr[i].equals(item))\n return i;\n }\n return -1;\n }", "public int indexOf(E toFind) {\n\t\tfor(int x = 0; x < numElements; x++) {\n\t\t\tif(elements[x].equals(toFind)) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int indexOf(int[ ] array, int value) {\r\n for (int i = 0; i < array.length; i++) {\r\n if (value == array[i]) {\r\n return i;\r\n }\r\n }\r\n // To get to this point, the value must not be in the array.\r\n return -1;\r\n }", "public int searchIndex(int v) {\n int counter = 1;\n Lista iter = new Lista(this);\n if (iter.x == v) {\n return 0;\n }\n while (iter.next != null) {\n if (iter.next.x == v) {\n return counter;\n }\n iter = iter.next;\n counter += 1;\n }\n if (counter == iter.size() - 1) {\n return -1;\n }\n return counter;\n }", "public int indexOf(Object o) {\n\t\treturn getFirstOccurrence(o).index;\n\t}", "public int getIndexOfElement(Object... value);", "public int find(int element) {\r\n\t\tint i = 1;\r\n\t\tfor (; i < list.length && list[i]!= -1; i++) {\r\n\t\t\tif (element==list[i]) {\r\n\t\t\t\tcurrentPosition = i;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcurrentPosition = i;\r\n\t\treturn 101;\r\n\t}", "private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }", "@Override\n\tpublic int indexOf(T searchItem) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (searchItem.equals(data[i])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public synchronized int search(Object arg)\n {\n int result = -1;\n for (int i=0; i<dataList.size(); i++)\n {\n Object testItem = dataList.get(i);\n if (arg.equals(testItem))\n {\n // calculate the 1-based index of the last item\n // in the List (the top item on the stack)\n result = i + 1;\n break;\n }\n }\n return result;\n }", "public int search (int[] db, int skey)\n { \n for (int i = 0; i < db.length; i++)\n { \n if (skey == db[i])\n {\n return i;\n }\n }\n return -1;\n }", "public Integer search(String v)\n {\n Integer pos = h(v);\n while (pos < cap) {\n\n if (table.get(pos) == null) {\n return -1;\n } else if (table.get(pos).equals(v))\n return pos;\n pos++;\n }\n if (pos == cap)\n {\n while (pos < cap)\n {\n if (table.get(pos).equals(v))\n return pos;\n else if (table.get(pos) == null)\n return -1;\n pos++;\n }\n }\n return -1;\n }", "public int find(Object o) {\n int currentIndex = 0;\n int index = -1;\n ListNode current = start;\n while(current != null) {\n if (o.equals(current.data)) {\n index = currentIndex;\n break;\n }\n currentIndex++;\n current = current.next;\n }\n return index;\n }", "int indexOf(T element);", "public Integer indexOf(String s){\n\t\tInteger i;\n\t\tif((i=indices.get(s))!=null)\n\t\t\treturn i;\n\t\telse\n\t\t\treturn Integer.valueOf(-1);\n\t}", "public static int indexOf(int[] arr, int value) {\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] == value) return i;\n }\n return -1;\n }", "public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }", "public int indexOf(Object o);", "public int indexOf(Object elem);", "public static int findValue(int [] array, int value){\n int index = -1;\n for(int i = 0; i < array.length; i++){\n if(value == array[i]){\n index = i + 1;\n System.out.println(Arrays.toString(array));\n }\n }\n return index;\n }", "public int getIndexOf(K key);", "private int find(Account account) {\r\n\t\tfor ( int i = 0 ; i < accounts.length; i++ ) {\t\t\r\n\t\t\tif ( accounts[i] != null && accounts[i].equals(account) ) { //check if accountDB isn't empty, and if the item is the one we want\r\n\t\t\t\treturn i; //return the index of the item needed\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn -1;\r\n\t}", "public int indexOf(O o)\r\n {\r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n if (vi.getObject().equals(o)) return i;\r\n vi = vi.getNext();\r\n }\r\n return -1;\r\n }", "private int find(ElementType element){\n for(int i=0;i<size;i++){\n if(elements[i].equals(element)){\n return i;\n }\n }\n return -1;\n }", "public int getIndexOfItem(T item) {\n int index = -1;\n\n Iterator<T> iterator = this.iterator();\n for (int i = 0; iterator.hasNext(); i++) {\n if (item == iterator.next()) {\n index = i;\n break;\n }\n }\n\n return index;\n }", "@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n private int findIndexOf(Comparable<E> item) {\n if (count == 0) { //this is where the binary search happens that reduces the time and computational power it takes to search the collection\n return count; // if count == 0 it returns the count variable to break the loop and show that the collection is empty\n }\n int low = 0; //Sets up three variables to keep track of the start and end values of index and the middle of the collection, this helps\n int high = count - 1; //the search algorithm becase the array always knows where the middle is and so the collection can contnually half using the three\n int mid; //variables to find a single value, while the low is less or equal to the high variable,\n while (low <= high) {\n\n mid = (low + high) / 2;\n\n int compareValue = item.compareTo(data[mid]); // the value we are trying to find\n if (compareValue == 0) return mid; //returns the middle value,\n if (compareValue > 0) low = mid + 1; //if greater than it changes low value to equal the middle, plus one(as mid is already checked)\n else high = mid - 1; //else it changes to the lower half of the collecton to search there.\n }\n return low; //Hopefully if found it will then return low,\n }", "private int linearSearch(final Integer element) {\n for (int i = 0; i < size; i++) {\n if (arrayList[i] == element) {\n return i;\n }\n }\n return -1;\n }", "public static Pair<String, Integer> findFirstOccurence(... )\n\t{\n\t\t // you finish!!!\n\t\t\n\t\t\n\t\t\t// what should it return if it does NOT find a match?\n\t}", "public int indexOf(Object o) {\n int index = -1;\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) {\n index = i; break;\n }\n }\n return index;\n }", "private int getIndex(T element) {\n int index = -1;\n for (int i = 0; i < this.container.length; i++) {\n if (this.container[i] != null && this.container[i].equals(element)) {\n index = i;\n break;\n }\n }\n return index;\n }", "public int indexOf(Object elem, int index);", "public int indexOf(U item) {\n\t\t\tint i = 0;\n\t\t\tfor (U tmp : this) {\n\t\t\t\tif (Objects.equals(tmp, item)) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t\t++i;\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t}", "private int find(Account account) { \n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif(account.equals(accounts[i])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "@Override\n\tpublic int indexOf(int n) {\n\t\tint returnInt = -1;\n\t\tfor (int i=0; i<size; i++) {\n\t\t\tif(values[i] == n)\n\t\t\t\treturnInt = i;\n\t\t}\n\t\treturn returnInt;\n\t}", "private int findIndexByName(String name) {\n // for each item in stock, while item var isn't unassigned:\n for (int i = 0; i < this._noOfItems; i++) {\n // if name is the same, return current index - to the first place where the same name was found\n if (this._stock[i].getName().equals(name))\n return i;\n }\n // if not found, return -1\n return -1;\n }", "public boolean find(int value) {\n return set.contains(value);\n }", "private int findItem(String searchItem){\n return myGrocery.indexOf(searchItem);\n }", "public int indexOf(Type t);", "public int Search(int key)\n {\n for(int i=0; i<n; i++)\n {\n if(a[i]==key)\n return 1;\n }\n return 0;\n }", "public int indexOf(E elem) {\n int currIdx = 0;\n\n for (SinglyLinkedList.Node<E> curr = head; curr != null; curr = curr.next) {\n if (curr.val.equals(elem)) {\n return currIdx;\n }\n\n currIdx += 1;\n }\n\n return -1;\n }", "public int indexOf(int item) {\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif(items[i] == item)\n\t\t\t\treturn i;\n\t\t}\n\t\t// Otherwise return -1\n\t\treturn -1;\n\t}", "public int indexOf(E e){\n for (int i = 0; i < size; i++) {\n if (elements[i]==e){\n return i;\n }\n }\n return -1;\n }", "public static int search(int[] dict, int key) {\n for (int index = 0; index < dict.length; index++) {\n if (dict[index] == key) {\n return index;\n }\n }\n return -1;\n }", "private static <V> int buscarPosicion(V pValue, V[] pArray) {\n for (int x = 0; x < pArray.length; x++) {\n if (pArray[x].equals(pValue)) {\n return x;\n }\n }\n return -1;\n }", "public int getIndexOfTokenValue(int value) {\n int left = 0;\n int right = tokens.size() - 1;\n\n while (left <= right) {\n int mid = (left + right) / 2;\n if (tokens.get(mid).getValue() == value) {\n return mid;\n }\n if (tokens.get(mid).getValue() > value) {\n right = mid - 1;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "public String linearSearchForValue(int value) {\n String indexWithValue = \"\";\n boolean found = false;\n for(int i= 0; i < arraySize; i++){\n if(theArray[i] == value){\n found = true;\n indexWithValue += i + \" \";\n }\n printHorizontalArray(i, -1);\n }\n\n if(!found){\n indexWithValue = \"None\";\n }\n System.out.println(\"The value was found in the following: \" + indexWithValue);\n System.out.println();\n\n return indexWithValue;\n }", "private int locateIndex(K key)\n { \n // // Search until you either find an entry containing key or \n // // pass the point where it should be\n // int index = 0;\n // while ((index < numberOfEntries) && (key.compareTo(dictionary[index].getKey()) > 0))\n // index++;\n // // end while \n // return index;\n \n return binarySearchQ7(0, numberOfEntries - 1, key);\n }", "public int linSearch(Comparable c){\n\tfor (int i = 0; i < _size;i++){\n\t if (c.compareTo(_data[i]) == 0){\n\t\treturn i;\n\t }\n\t}\n\treturn -1;\n }", "private int getSearchIndex() \n {\n String selected = searchCombo.getSelectedItem().toString();\n for(int i = 0; i<columnNames.length; i++)\n {\n if(selected.equals(columnNames[i]))\n {\n return i;\n }\n }\n return -1;\n }", "public int searchBook(String title){\n for (int i = 0; i < titleList.size(); i++){\n if (titleList.get(i).equals(title))\n return i;\n }\n return -1;\n }", "int search(E item);", "private int findIndexOfGivenObject(Object o) {\n\n for(int i = 0; i < size(); i++) {\n if(content[i].equals(o)) {\n return i;\n }\n }\n\n return -1;\n }", "public int search(String searchValue, LinkedList target, int start) {\n\t\t\n\t\treturn 1;\n\t}", "public int search (String name) {\n int result = -1;\n int offset = 0;\n\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].indexOf (name);\n if (result == -1)\n offset += q[i].size ();\n qLock[i].unlock ();\n if (result != -1)\n break;\n }\n\n if (result == -1)\n return result;\n\n return result + offset;\n }", "public static <T> int linearSearch(T[] array, T item) {\n\t\tfor (int i=0; i<array.length; i++)\n\t\t\tif (array[i].equals(item))\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}", "private int getPos(int key, int index) {\n\t\t// Each bucket contains a list.\n\t\tList<Integer> temp = set[index];\n\t\tif (temp == null) {\n\t\t\treturn -1;\n\t\t}\n\t\t// Iterate all the elements in the bucket to find the target key.\n\t\tfor (int i = 0; i < temp.size(); i++) {\n\t\t\tif (temp.get(i) == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public T search(T value) {\n\n if (root.getValue().compareTo(value) == 0) return root.getValue();\n else return searchRecursively(root, value).getValue();\n }", "private int findContact(Contact contact) {\n return this.myContacts.indexOf(contact); //If exists in the ArrayList, will return 0 or greater. If not, will return a number less than 0.\n }", "private int getSpinnerIndexByValue(Spinner spinner, String value) {\n int index = -1;\n for (int i =0; i<spinner.getCount();i++){\n if(spinner.getItemAtPosition(i).toString().equalsIgnoreCase(value)) {\n index = i;\n break;\n }\n }\n return index;\n }", "public int findItem(int code) {\n\t\tfor(int i = 0; i < last; ++i)\n\t\t\tif(code == list[i].getCode())\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}", "public int indexOf(Object o) {\r\n\t\tfor(int i=0; i < size();i++) {\r\n\t\t\tif(get(i).equals(o)) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t\t/*\r\n\t\t * Der Rückgabewert -1 bedeutet, dass das Object o nicht\r\n\t\t * im FancyArray enthalten ist :(\r\n\t\t */\r\n\t}", "private int find(Book book) {\n for (int i = 0; i < books.length; i ++){\n if (books[i] != null && book.equals(books[i])){ return i; }\n }\n return NOT_FOUND;\n }", "public int search(String name){\n\t\tfor(Map.Entry<String, Integer> e : map.entrySet()){\n\t\t\tif(e.getKey().equals(name)){\n\t\t\t\treturn e.getValue();\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t/*\n\t\twhile(pointer < locations.length){\n\t\t\tif(locations[pointer].getName() == name){\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t\treturn locations[pointer - 1].getID();\n\t\t\t} else {\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t*/\n\t}", "public int valuePosition(int[] arr, int x) {\n for (int i = 0; i < arr.length; i++)\n if (arr[i] == x) {\n return i;\n }\n return x;\n }", "public static int search(final int value, final int[] nums, final int startIndex, final int size) {\n if (value < nums[startIndex]) {\n return (startIndex * 2) - 1;\n }\n final int lastIndex = startIndex + size - 1;\n if (value > nums[lastIndex]) {\n return (lastIndex * 2) + 1;\n }\n return 0;\n }", "public int indexOf(Object o) {\n\t\tfor(int i = 0; i < size; i++) {\r\n\t\t\tif(getNode(i).getData().equals(o))\r\n\t\t\t\treturn i;\r\n\t\t} return -1;\r\n\t}", "public int sequentialSearch(int[] array, int number){\n for(int i = 0; i < array.length; i++){\r\n // did I find it?\r\n if(array[i] == number){\r\n // tell them where\r\n return i;\r\n }\r\n }\r\n // didn't find it\r\n return -1;\r\n }", "public int getPosition(String v) {\n\t\t\t// go looking for the data\n\t\t\tElementDPtr temp = head;\n\t\t\tint pos = 0;\n\t\t\twhile (temp != null) {\n\t\t\t\tif (temp.getValue().equals(v)) {\n\t\t\t\t\t// return the position if found\n\t\t\t\t\treturn pos;\n\t\t\t\t}\n\t\t\t\tpos += 1;\n\t\t\t\ttemp = temp.getNext();\n\t\t\t}\n\t\t\t// else return -1\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}", "public SudokuCell getPositionForValue(int value)\n {\n SudokuCell ret=null;\n for(int i=0;i<SudokuConstants.GRID_SIZE;i++)\n {\n for(int j=0;j<SudokuConstants.GRID_SIZE;j++)\n {\n SudokuCell cell=_cells[i][j];\n Integer cellValue=cell.getValue();\n if ((cellValue!=null) && (cellValue.intValue()==value))\n {\n ret=cell;\n break;\n }\n }\n if (ret!=null)\n {\n break;\n }\n }\n return ret;\n }", "@Override\n public int indexOf(Object o) {\n int result = -1;\n if (o == null) {\n for (int index = 0; index < this.size(); index++) {\n if (this.values[index] == null) {\n result = index;\n }\n }\n } else {\n for (int index = 0; index < this.size(); index++) {\n if (o.equals(this.values[index])) {\n result = index;\n }\n }\n }\n return result;\n }", "protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }", "public static int linSearch(int[] a, int key)\n\t{\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t{\n\t\t\tif (a[i] == key)\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n \t\treturn -1;\t\t\n\t}" ]
[ "0.75991356", "0.7301746", "0.7293428", "0.72830635", "0.723045", "0.71937853", "0.71222544", "0.709454", "0.7054255", "0.7051462", "0.70217705", "0.6864248", "0.6853603", "0.6800666", "0.6796366", "0.67205614", "0.6667871", "0.6653118", "0.6620635", "0.6617269", "0.6610662", "0.6548516", "0.6520198", "0.6476625", "0.647623", "0.6458804", "0.64261144", "0.63875604", "0.6348027", "0.63270783", "0.63120234", "0.62883604", "0.6285078", "0.6258404", "0.624414", "0.62306046", "0.6218823", "0.6206582", "0.6182072", "0.6171836", "0.6154307", "0.61522627", "0.61515933", "0.6145813", "0.6137884", "0.6136049", "0.61264974", "0.61244977", "0.60953724", "0.60862964", "0.6077258", "0.6071472", "0.6067873", "0.60398626", "0.60064095", "0.6003513", "0.59948957", "0.59890664", "0.59865665", "0.5982544", "0.5941562", "0.5939489", "0.5938659", "0.5932104", "0.593148", "0.59213257", "0.59128946", "0.5910568", "0.5909625", "0.5902836", "0.5898055", "0.5888168", "0.5877265", "0.5873091", "0.58602875", "0.58595675", "0.58542687", "0.5854111", "0.58500993", "0.58457595", "0.58451617", "0.58403456", "0.58373976", "0.58352435", "0.58337474", "0.5818852", "0.5810227", "0.5797939", "0.5796296", "0.5784591", "0.57832676", "0.57745916", "0.57722616", "0.5771425", "0.57670385", "0.57651174", "0.57543343", "0.5743225", "0.57347935" ]
0.69650614
12
Removes element at specified index from collection.
void remove(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeElementAt(int index);", "public void remove(int index);", "public void remove(int index) {\n\n\t}", "void remove( int index );", "public void remove(int index) {\n items.remove(index);\n }", "public E remove(int index);", "@ZenCodeType.Method\n default void remove(int index) {\n \n doesNot(\"support removal by index\");\n }", "public T remove(int index) {\n chk();\n return list.remove(index);\n }", "@Override\r\n\tpublic T remove(int index) {\n\t\treturn this._list.remove(index);\r\n\t}", "T remove(int index);", "T remove(int index);", "public void remove(int index)\n {\n numItems--;\n items[index] = null;\n }", "public Type remove(int index);", "E remove(int i ) throws IndexOutOfBoundsException;", "abstract void remove(int index);", "E remove(int i) throws IndexOutOfBoundsException;", "void remove(int idx);", "public abstract T remove(int index);", "@Override\r\n\tpublic void removeToIndex(int index) {\n\t}", "public E remove(int index)\r\n {\r\n checkValidIndex(index);\r\n ListIterator<E> itr = listIterator(index);\r\n E result = itr.next();\r\n itr.remove();\r\n return result;\r\n }", "public T removeAt(int index) {\n if (index >= size || index < 0) throw new IndexOutOfBoundsException();\n T tempData = genericArrayList[index];\n T[] tempArrayList = (T[]) new Object[size - 1];\n for (int i = 0, j = 0; i < size; i++, j++) {\n if (i == index) j--; // skip over removeAtIndex by fixing j temporarily\n else tempArrayList[j] = genericArrayList[i];\n }\n genericArrayList = tempArrayList;\n capacity = --size;\n return tempData;\n }", "public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}", "public T remove(int index) {\n return null;\n }", "public abstract E remove(int index);", "public void remove(int index) {\n for (int i = index; i < this.list.length-1; i++) {\n this.list[i]=this.list[i+1];\n }\n this.size--;\n }", "public Object remove(int index) {\r\n Entry e = entry(index);\r\n remove(e);\r\n return e.element;\r\n }", "Object remove(int index) {\n return index >= 0 && index < this.length() ? this.myArrayList.remove(index) : null;\n }", "@Override\n public synchronized E remove(int index) {\n E result = this.get(index);\n if (index < this.size() - 1) {\n System.arraycopy(this.container, index + 1, this.container, index, this.size() - (index + 1));\n }\n this.container[--this.pointer] = null;\n return result;\n }", "public E remove(int index) {\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\tE removed = get(index);\n\t\t// Loop to shift elements left\n\t\tfor (int i = index; i < size(); i++) {\n\t\t\tlist[i] = list[i + 1];\n\t\t}\n\t\treturn removed;\n\t}", "public void removeIt() { \n\t\t\tcollection.remove(currIndex);\n\t\t\tcurrIndex--;\n\t\t}", "@Override\n public T remove(int index) {\n T removed = array[index];\n for (int i = index + 1; i < array.length; i++) {\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }", "@Override\n\tpublic T remove(int index) {\n\t\t// TODO check if index is withing the correct range\n\t\t// If not, return null\n\t\t// otherwise , do the same as above\n\t\tif (index >= 0 && index < size) {\n\t\t\tT item = data[index];\n\t \t\tfor(int i=index;i<size-1;i++)\n\t \t\t\tdata[i] = data[i+1];\n\t \t\tsize--;\n\t \t\treturn item;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t}", "@Override\n\tpublic E remove(int index) {\n\t\trangeCheck(index);\n\t\t\n\t\treturn remove(node(index));\n\t}", "public E remove(int index) {\n\t\t// Code from Project 3\n\t\tE removed;\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\t// Last element of list or list contain only 1 element\n\t\tif (index == size - 1) {\n\t\t\tremoved = elements[size - 1];\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t} else {\n\t\t\t// remove mid or first element\n\t\t\tremoved = elements[index];\n\t\t\tfor (int i = index; i < size; i++) {\n\t\t\t\telements[i] = elements[i + 1];\n\t\t\t}\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t}\n\t}", "public int remove(int index) {\n // Gracefully handle items beyond end\n final int size = mItems.size();\n index = constrain(index, 0, size - 1);\n\n mItems.remove(index);\n return index;\n }", "public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }", "public void remove(int index) {\n\t\t\tcheckIndex(index);\n\t\t\tfor(int i = index; i < size - 1; i++) {\n\t\t\t\telementData[i] = elementData[i + 1];\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void removeElementAt(int index) {\r\n\r\n try {\r\n VOI voi = VOIAt(index);\r\n super.removeElementAt(index);\r\n fireVOIremoved(voi);\r\n } catch (ArrayIndexOutOfBoundsException badIndex) {\r\n throw badIndex;\r\n }\r\n }", "public T remove(int index) throws IndexOutOfBoundsException {\n checkException(index);\n System.arraycopy(arr, index + 1, arr, index, size - index - 1);\n T elem = arr[--size];\n arr[size] = null;\n return elem;\n }", "public AnyType remove( int index ) throws IndexOutOfBoundsException {\n \n return removeNode( index ).getData();\n \n }", "public E remove (int index)\n { E item;\n if (index < 0 || index >= size) {\n throw new\n IndexOutOfBoundsException(Integer.toString(index));\n }\n if (index == 0)\n item = removeFirst( );\n else {\n Node<E> node = getNode(index - 1);\n item = removeAfter(node);\n }\n return item; // return the deleted value\n }", "@Override\n\tpublic E remove(int index) {\n\t\treturn null;\n\t}", "int remove(int idx);", "private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}", "@Override\n\tpublic E remove(int idx) {\n\t\tif (idx < 0 || idx >= size())\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tE element = null;\n\t\telement = list[idx];\n\t\tif (idx == size - 1) {\n\t\t\tlist[idx] = null;\n\t\t} else {\n\t\t\tfor (int i = idx; i < size - 1; i++) {\n\t\t\t\tlist[i] = list[i + 1];\n\t\t\t}\n\t\t\tlist[size - 1] = null;\n\t\t}\n\t\tsize--;\n\t\treturn element;\n\t}", "public Object remove(int index) {\r\n return deref(refs.remove(index));\r\n }", "public void deleteItem(int index) {\n this.items.remove(index);\n }", "private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }", "public void remove(int idx) {\r\n\t\tcards.remove(idx);\r\n\t}", "public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }", "@Override\r\n\tpublic VOI remove(int index) {\r\n\r\n try {\r\n VOI voi = super.remove(index);\r\n fireVOIremoved(voi);\r\n\r\n return voi;\r\n } catch (ArrayIndexOutOfBoundsException badIndex) {\r\n throw badIndex;\r\n }\r\n }", "@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }", "@Override\n public T remove(final int index) {\n this.checkIndex(index);\n T object = this.data[index];\n this.remove(object);\n return object;\n }", "public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }", "public void removeItem(int idx)\n\t{\n\t\titemList.remove(idx);\n\t\t\n\t}", "public native String removeItem(Number index);", "@Test\r\n\tpublic void testRemoveByIndex() {\r\n\t\tAssert.assertNull(list.remove(100));\r\n\t\tAssert.assertTrue(list.get(5).equals(list.remove(5)));\r\n\t\tAssert.assertEquals(14, list.size());\r\n\t}", "private synchronized void remove(int index) {\r\n\t\tif (index >= 0 && index <= docModel.size())\r\n\t\t\ttry {\r\n\t\t\t\tdocModel.remove(index - 1);\r\n\t\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\t\tif (commandsQueue.size() == 0)\r\n\t\t\t\t\tupdateActiveUsers();\r\n\t\t\t}\r\n\t}", "public void remove(int index){\n tasks.remove(index);\n }", "public void removeIndex(int i) {\n // YOUR CODE HERE\n }", "public void remove(int index) {\n\t\tpoints.remove(index);\n\t}", "@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }", "public U remove(int idx){\r\n\t \tif ((idx < 0)|| (idx > numElems-1))\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \tint i = idx;\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//Same shift algorithm as other remove method\r\n\t \twhile(i<numElems-1){\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t }", "public Object remove(int index){\r\n return dequeue(); //calls the dequeue method\r\n }", "private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }", "public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }", "public abstract void remove(int pos) throws IndexOutOfBoundsException;", "@Override\n\tpublic void remove(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\tfor (int i=index; i<size; i++) {\n\t\t\t\tvalues[i] = values[i+1]; //move every value one step left until index (which is overwritten)\n\t\t\t}\n\t\t\tsize--; //decrement size\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}", "public E remove(int index) {\n if(index > size) return null;\n E element = null;\n for(int i = index+1; i < size; i++) {\n list[i-1] = list[i];\n }\n list[size-1] = null;\n size--;\n return element;\n }", "public void removeActor(int index) { ActorSet.removeElementAt(index); }", "public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "public Object remove(int index) {\n\n\t\tif (index < 0 || index >= this.size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"the index [\" + index\n\t\t\t\t\t+ \"] is not valid for this list with the size [\"\n\t\t\t\t\t+ this.size + \"].\");\n\t\t}\n\t\tObject removed = this.storedObjects[index];\n\t\tfor (int i = index + 1; i < this.size; i++) {\n\t\t\tthis.storedObjects[i - 1] = this.storedObjects[i];\n\t\t}\n\t\tthis.size--;\n\t\tthis.storedObjects[this.size] = null;\n\n\t\treturn removed;\n\t}", "public void removeCard(int index) {\n cards.remove(index);\n }", "public E remove(int index) {\n //first make a copy of the element we are going to remove later\n //so that it can be returned\n E copy = this.array[index];\n \n /*\n * make an if to find out if there is only one element in the array or not\n * if there is, then simply make the array empty\n */\n if (this.array.length == 1) {\n //only one element in the array, so there is nothing to slide over\n this.array = (E[]) new Object[0];\n } else {\n //make a temp array that has one less index than the current array\n Object[] temp = new Object[this.array.length - 1];\n \n //copy everything up to the desired index\n for (int i = 0; i < index; i++) {\n temp[i] = this.array[i];\n }\n \n //now copy all of the other elements after the index, but skip over the desired element to remove\n for (int i = index; i < temp.length; i++) {\n /*\n * take in the element from the next index over from this.array\n * this will automatically skip over the element that we want to remove\n */\n temp[i] = this.array[i + 1];\n }\n \n //set the array to the temp now that the element is removed\n this.array = (E[]) temp;\n }\n \n //return the copy that we created before we removed the element\n return (E) copy;\n }", "public CoreResourceHandle remove(int index) {\n if (index >= 0 && index < doSize()) {\n return doRemove(index);\n }\n throw new IndexOutOfBoundsException();\n }", "@Override\n public final Integer remove(final int index) {\n // Verify that the specified index is valid\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n final int temp = arrayList[index];\n // Shift all elements after the removed elements down\n for (int i = index; i < (size - 1); i++) {\n arrayList[i] = arrayList[i + 1];\n arrayList[i + 1] = 0;\n }\n size--;\n return temp;\n\n }\n }", "public E remove(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E returnValue = theData[index];\n for (int i = index + 1; i < size; i++) {\n theData[i - 1] = theData[i];\n }\n size--;\n return returnValue;\n }", "public void remove(int index) {\n\t\tif ((index < 1) || (index > size))\n\t\t\tthrow new IllegalArgumentException();\n\t\telse{\n\t\t\tremove(getNode(index));\n\t\t\t}\n\t}", "@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }", "public void removeElementAt(int index)\n {\n try {element.removeElementAt(index);}\n catch (Exception e) {\n throw new IllegalArgumentException\n (\"VectorLinearList.removeElementAt: \" +\n \"index must be between 0 and size - 1\");\n }\n }", "@Override\n public E remove(int index) {\n this.rangeCheck(index);\n this.modCount++;\n E oldValue = (E) this.values[index];\n int numMoved = this.index - index - 1;\n if (numMoved > 0) {\n System.arraycopy(this.values, index + 1, this.values, index, numMoved);\n }\n this.values[--this.index] = null;\n return oldValue;\n }", "public Object remove(final int index) {\n if (checkIfInvalidIndex(index)) {\n throw new IndexOutOfBoundsException();\n }\n Node<T> iterator = head;\n if (index == 0) {\n head = head.getNext();\n } else {\n Node<T> previous = null;\n for (int currentIndex = 0; currentIndex < index; currentIndex++) {\n previous = iterator;\n iterator = iterator.getNext();\n }\n if (previous != null) {\n previous.setNext(iterator.getNext());\n }\n }\n numElement--;\n return iterator.getData();\n }", "public void remove(int index) {\n\t\t// checks range\n\t\tcheckRange(index);\n\t\t// creates new JS array\n\t\tarray.remove(index);\n\t}", "@Override\n\t\tpublic Community remove(int index) {\n\t\t\treturn null;\n\t\t}", "public void remove(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Cannot remove value with invalid index.\");\n\t\t}\n\n\t\tshiftBackArray(index);\n\t\tsize--;\n\t}", "public void remove(int index)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i=index;i<n;i++)\r\n\t\t\t{\r\n\t\t\t\ta[i]=a[i+1];\r\n\t\t\t}\r\n\t\t\tn--;\r\n\t\t}\t\t\r\n\t}", "public void removeAtIndexFor(int index, int size) {\r\n int start = offset + index + size;\r\n int end = offset + count;\r\n ArrayUtils.shiftDown(objects, size, start, end, false);\r\n count -= size;\r\n }", "void removeAt(final int removeIndex) {\n final Object[] items = this.items;\n if (removeIndex == takeIndex) {\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n } else {\n final int putIndex = this.putIndex;\n for (int i = removeIndex;;) {\n int next = i + 1;\n if (next == items.length) next = 0;\n if (next != putIndex) {\n items[i] = items[next];\n i = next;\n } else {\n items[i] = null;\n this.putIndex = i;\n break;\n }\n }\n count--;\n }\n notFull.signal();\n }", "public static void remove(int index) {\n tasks.remove(index);\n tasksCount--;\n }", "public void remove() {\n elements[index] = null;\n size--;\n next();\n }", "public Object remove(int index) {\n\t\tif (nextItem.getIndex() == index) {\n\t\t\tObject removedObject = nextItem.getObject();\n\t\t\tif (nextItem.getNext() != null) {\n\t\t\t\tnextItem = nextItem.getNext();\n\t\t\t\tnextItem.decrementIndex();\n\t\t\t} else {\n\t\t\t\tnextItem = null;\n\t\t\t}\n\t\t\treturn removedObject;\n\t\t} else {\n\t\t\treturn nextItem.remove(index);\n\t\t}\n\t}", "@Override\n\tpublic Object remove(int index) throws IndexOutOfBoundsException\n\t{\n\t\t\n\t\tif(index < size)\n\t\t{\n Object o = myArray[index];\n if(index < size)\n System.arraycopy(myArray, index + 1, myArray, index, size - index - 1);\n myArray[size - 1] = null;\n size--;\n //to check if need to resize\n\t\t\tif(size==myArray.length/4)\n\t\t\t\tresizeDown();\n return o;\n } \n\t\telse \n throw new ArrayIndexOutOfBoundsException();\n\t}", "public E remove(int idx) {\n\n\t\tE retVal = remove(getNode(idx));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public void remove(int index) {\r\n\t\t//Das Element am Index soll weg:\r\n\t\t//1. Alle Elemente davor sollen erhalten bleiben\r\n\t\t//2. Alle Elemente dahinter sollen erhalten bleiben\r\n\t\t//und der Index 1 kleiner werden\r\n\t\tfor(int i=index+1;i < geheim.length; i++) {\r\n\t\t\tgeheim[i-1] = geheim[i];\r\n\t\t}\r\n\t\t//3. Das Array soll um eins kleiner sein\r\n\t\tresize(-1);\r\n\t}", "public void remove(int n) { // not being used\n\t\tcollection.remove(n); \n\t}", "public void removeObject(int i);", "@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }" ]
[ "0.80360264", "0.80012125", "0.7848415", "0.7787746", "0.76848346", "0.7682865", "0.7668667", "0.76278317", "0.76229393", "0.75726587", "0.75726587", "0.7531574", "0.7503556", "0.74358374", "0.7425077", "0.7416599", "0.73992854", "0.7372143", "0.73524576", "0.7314765", "0.72448844", "0.7230186", "0.72041976", "0.71985227", "0.71848005", "0.71711504", "0.7162956", "0.7161774", "0.7158234", "0.7157531", "0.7156238", "0.71346945", "0.7116405", "0.71082366", "0.710701", "0.7100146", "0.70795095", "0.70471966", "0.7038717", "0.7037195", "0.70309985", "0.7029511", "0.7014764", "0.69971246", "0.6993759", "0.6985984", "0.6984151", "0.697749", "0.69685984", "0.6968032", "0.69574684", "0.69543314", "0.6928444", "0.69133157", "0.69116545", "0.6907987", "0.6901138", "0.68982625", "0.6897593", "0.6869416", "0.6864952", "0.6864276", "0.6850055", "0.6842864", "0.6835132", "0.6802966", "0.68013334", "0.67992705", "0.6779076", "0.6775999", "0.6775856", "0.67749137", "0.67701334", "0.6767187", "0.67669916", "0.67441136", "0.67372197", "0.67116874", "0.6705398", "0.6699919", "0.6693014", "0.6679279", "0.6661096", "0.6659176", "0.6652169", "0.6643781", "0.6625418", "0.66228926", "0.66200477", "0.6612212", "0.6609515", "0.6602444", "0.65942675", "0.6594072", "0.6588931", "0.6579777", "0.6576701" ]
0.7671234
9
TODO: Put into map?
public static <T extends EnumWithKey> T fromKey(Class<T> enumType, String key) { for (T enumValue : enumType.getEnumConstants()) { if (enumValue.getKey().equals(key)) { return enumValue; } } throw new IllegalArgumentException("Invalid key: " + key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }", "public abstract String[] map() throws TooFewNocNodesException;", "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "MAP createMAP();", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "ProcessOperation<Map<String, Object>> map();", "Map<Element, Map<Element, Element>> getOperationMap();", "MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "protected Map method_1552() {\n return super.method_1552();\n }", "Map getSPEXDataMap();", "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}", "private void processNameToObjectMap() {\r\n for (int i = 0; i < this.getObjectGroupCount(); i++) {\r\n ObjectGroup g = this.objectGroups.get(i);\r\n this.objectGroupNameToOffset.put(g.name, i);\r\n HashMap<String, Integer> nameToObjectMap = new HashMap<String, Integer>();\r\n for (int ib = 0; ib < this.getObjectCount(i); ib++) {\r\n nameToObjectMap.put(this.getObjectName(i, ib), ib);\r\n }\r\n g.setObjectNameMapping(nameToObjectMap);\r\n }\r\n }", "Map<String, String> mo14888a();", "protected WumpusMap() {\n\t\t\n\t}", "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 }", "Map getIDPEXDataMap();", "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}", "String map( String principal );", "public HashMap<String, NeonValue> getMap();", "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}", "private void getMapping() {\n double [][] chars = new double[CHAR_SET_SIZE][1];\n for (int i = 0; i < chars.length; i++) {\n chars[i][0] = i;\n }\n Matrix b = new Matrix(key).times(new Matrix(chars));\n map = b.getArray();\n }", "private void processLayerMap() {\r\n for (int l = 0; l < layers.size(); l++) {\r\n Layer layer = layers.get(l);\r\n this.layerNameToIDMap.put(layer.name, l);\r\n }\r\n }", "@Override\n\tpublic void getStat(Map<String, String> map) {\n\t\t\n\t}", "public HashMap getMetaData() ;", "@Override\n public void record2Map(final Map<String, Integer> map) {\n }", "protected SortedMap getSortedMap() {\n/* 65 */ return (SortedMap)this.map;\n/* */ }", "HashMap <String, Command> getMap();", "public abstract void map(String key, String value) throws Exception;", "Map<Integer, String> getMetaLocal();", "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}", "private static Map<VOTableVersion,VersionDetail>\n createMap( VersionDetail[] vds ) {\n Map<VOTableVersion,VersionDetail> map =\n new LinkedHashMap<VOTableVersion,VersionDetail>();\n for ( int i = 0; i < vds.length; i++ ) {\n map.put( vds[ i ].version_, vds[ i ] );\n }\n return map;\n }", "public Map<String, Object> getTagMap();", "@Override\n\t\t\tpublic void putAll(Map<? extends PathwayImpl, ? extends AnalysisResult> m) {\n\t\t\t\t\n\t\t\t}", "public Map method_6439() {\r\n return this.field_6226;\r\n }", "private static Map<String,List<Integer>> getProvisionIdMapStream(Map<String,List<Integer>> nameMapIdMap,Map<String,Integer> mapIdProbIdMap){\n return null;\n }", "XClass getMapKey();", "java.util.Map<java.lang.Integer, java.lang.Integer>\n getInfoMap();", "Map getAll();", "@Override\n\tpublic void convertitMap(Map<String, Object> map) {\n\t\t\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}", "private static void createTypeMap() {\n\n }", "public Map method_1884() {\r\n return this.field_1677;\r\n }", "public MapToken() {\n\t\tmData = new FastMap<String, Object>();\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "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 }", "private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }", "private static HashSet<String> addElement(Map m, String key,int count) {\n\t\tIterator it = m.entrySet().iterator();\n\t\tHashSet<String> allParents=new HashSet<String>();\n\t\tHashSet<String> newNodeHS=new HashSet<String>();\n\t\tHashSet<String> receive=new HashSet<String>();\n\t\tString parent=\"\";\n\t\tif(readNodes.get(key)==null)\n\t\t{\n\t\t\tif(!(key.equals(root)))\n\t\t\t{\n\t\t\tallParents=(HashSet)m.get(key);\n\t\t\tIterator iter = allParents.iterator();\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tparent=(String)iter.next();\n\t\t\t\tcount++;\n\t\t\t\treceive=addElement(m,parent,count);\n\t\t\t\tString str=key+\"-\"+parent;\n\t\t\t\tIterator toRecieve = receive.iterator();\n\t\t\t\twhile(toRecieve.hasNext())\n\t\t\t\t{\n\t\t\t\t\tnewNodeHS.add((String)toRecieve.next());\n\t\t\t\t}\n\t\t\t\tnewNodeHS.add(str);\n\t\t\t\tcount--;\n\t\t\t}\n\t\t\t\tif(count==0)\n\t\t\t\t{\n\t\t\t\t\tIterator<HashSet> iternew = totalDAG.iterator();\n\t\t\t\t\tHashSet<HashSet> inProgressDAG=new HashSet<HashSet>(totalDAG); \n\t\t\t\t\twhile (iternew.hasNext()) {\n\t\t\t\t\t HashSet<String> tillCreatedDAG=iternew.next();\n\t\t\t\t\t HashSet<String> union=new HashSet<String>(newNodeHS);\n\t\t\t\t\t union.addAll(tillCreatedDAG);\n\t\t\t\t\t inProgressDAG.add(union);\n\t\t\t\t\t}\n\t\t\t\t\ttotalDAG.clear();\n\t\t\t\t\ttotalDAG=inProgressDAG;\n\t\t\t\t\ttotalDAG.add(newNodeHS);\n\t\t\t\t\treadNodes.put(key, newNodeHS);\n\t\t\t\t\tSystem.out.println(\"Size: \" +totalDAG.size()+\" Nodes: \"+(++totalCount));\n\t\t\t\t\treturn newNodeHS;\n\t\t\t\t}\n\t\t\t\tcount--;\n\t\t\t\treturn newNodeHS;\t\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString str=root;\n\t\t\t\t\tnewNodeHS.add(str);\n\t\t\t\t\tcount--;\n\t\t\t\t\treturn newNodeHS;\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (HashSet)readNodes.get(key);\n\t\t}\n\t}", "private HashMap<String, Integer> createFieldMap(ObjectDefinition context) {\r\n\r\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\r\n\r\n\t\tArrayList<Field> fields = context.getFields();\r\n\r\n\t\tfor (int i = 0; i < fields.size(); i++) {\r\n\t\t\tmap.put(fields.get(i).getName(), i);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "protected ForwardingMapEntry() {}", "public abstract Map getAttributes();", "public ImageFileNameMap()\r\n {\r\n prevMap = null;\r\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 HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}", "void setHashMap();", "public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }", "protected void prepareEntityToNodeMap()\r\n\t{\n\t}", "private Set<String> getInfo(Map<String, Set<String>> info, String label) {\n\t\treturn (info.containsKey(label)) ? info.get(label)\n\t\t\t\t: new HashSet<String>();\n\t}", "public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }", "protected abstract Set method_1559();", "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 }", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }", "private Map<String, String> toMap(final Attributes atts) {\r\n\t\tfinal Map<String, String> values = Maps.newLinkedHashMap();\r\n\t\t\r\n\t\tfor (int index = 0; index < atts.getLength(); index++) {\r\n\t\t\tvalues.put(atts.getLocalName(index), atts.getValue(index));\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t}", "Map<String, List<List<Attribution>>> getAttributionMap();", "java.util.Map<java.lang.String, java.lang.String>\n getMetadataMap();", "java.util.Map<java.lang.String, java.lang.String>\n getMetadataMap();", "protected Map<String,List<PageViewVO>> initializePageMap() {\n\t\tMap<String,List<PageViewVO>> pm = new HashMap<>();\n\t\tfor (Section sect : Section.values()) {\n\t\t\tpm.put(sect.name(), new ArrayList<>());\n\t\t}\n\t\treturn pm;\n\t}", "private static Map<String, FeatureType> buildAvailableFeatureMap(List<FeatureType> features){\r\n\t\tMap<String, FeatureType> featureMap = new HashMap<String, FeatureType>();\r\n\t\tfor(FeatureType feature : features){\r\n\t\t\tfeatureMap.put(feature.getExternalId(), feature);\r\n\t\t}\r\n\t\treturn featureMap;\r\n\t}", "public abstract void createMap();", "private static HashMap<String,String> buildColumnMapCar() {\r\n HashMap<String,String> map = new HashMap<String,String>();\r\n map.put(KEY_POINTS, KEY_POINTS);\r\n\r\n map.put(BaseColumns._ID, \"rowid AS \" +\r\n BaseColumns._ID);\r\n\r\n return map;\r\n }", "abstract Map<String, Integer> mapOfNamesToSalary();", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void exportMap() {\n\r\n\t}", "private LinkedHashMap<String, Type> scalarMappingODU() {\r\n\t\tLinkedHashMap<String, Type> scalarMapping = new LinkedHashMap<String, Type>();\r\n\t\tscalarMapping.put(DaoConstants.MAP_ODUID, StandardBasicTypes.LONG); // 0\r\n\t\tscalarMapping.put(DaoConstants.MAP_SITE_GROUP,\r\n\t\t\t\tStandardBasicTypes.STRING); // 1\r\n\t\tscalarMapping.put(DaoConstants.MAP_PARENT_CHILD,\r\n\t\t\t\tStandardBasicTypes.STRING); // 2\r\n\t\tscalarMapping.put(DaoConstants.MAP_NAME, StandardBasicTypes.STRING); // 3\r\n\t\tscalarMapping.put(DaoConstants.MAP_CENTRAL_ADDRESS,\r\n\t\t\t\tStandardBasicTypes.STRING); // 4\r\n\t\tscalarMapping.put(DaoConstants.MAP_PARENT_ID, StandardBasicTypes.LONG); // 5\r\n\t\tscalarMapping.put(DaoConstants.MAP_TYPE, StandardBasicTypes.STRING); // 6\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMAXLATITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 7\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMAXLONGITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 8\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMINLATITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 9\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGMINLONGITUDE,\r\n\t\t\t\tStandardBasicTypes.DOUBLE); // 10\r\n\t\tscalarMapping.put(DaoConstants.MAP_ODU_SVG_PATH,\r\n\t\t\t\tStandardBasicTypes.STRING); // 11\r\n\t\tscalarMapping.put(DaoConstants.MAP_SEVERITY, StandardBasicTypes.STRING); // 12\r\n\t\tscalarMapping.put(DaoConstants.MAP_SLINKADD, StandardBasicTypes.STRING); // 13\r\n\t\tscalarMapping.put(DaoConstants.MAP_ALARM_CODE,\r\n\t\t\t\tStandardBasicTypes.STRING); // 14\r\n\t\tscalarMapping.put(DaoConstants.MAP_C2, StandardBasicTypes.DOUBLE); // 15\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Outdoor\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Temp\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_1, StandardBasicTypes.LONG); // 16\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs_1\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_2, StandardBasicTypes.LONG); // 17\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs_2\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_3, StandardBasicTypes.LONG); // 18\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs_3\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_4, StandardBasicTypes.LONG); // 19\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// PAC\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CompressorWorkingHrs\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_5, StandardBasicTypes.LONG); // 20\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// EngineWorkingHrs\r\n\t\tscalarMapping\r\n\t\t\t\t.put(DaoConstants.MAP_THRESHOLD_6, StandardBasicTypes.LONG); // 21\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NOT_IN_USE_EnginOilChange\r\n\t\tscalarMapping.put(DaoConstants.MAP_G44, StandardBasicTypes.STRING); // 22\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// GenerationPower\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGID, StandardBasicTypes.LONG); // 23\r\n\t\tscalarMapping.put(DaoConstants.MAP_SVGNAME, StandardBasicTypes.STRING); // 24\r\n\t\tscalarMapping.put(DaoConstants.MAP_VRFHRS1, StandardBasicTypes.DOUBLE); // 25\r\n\t\tscalarMapping.put(DaoConstants.MAP_VRFHRS2, StandardBasicTypes.DOUBLE); // 26\r\n\t\tscalarMapping.put(DaoConstants.MAP_VRFHRS3, StandardBasicTypes.DOUBLE); // 27\r\n\t\tscalarMapping.put(DaoConstants.MAP_PACHRS, StandardBasicTypes.DOUBLE); // 28\r\n\t\tscalarMapping.put(DaoConstants.MAP_GHPHRS, StandardBasicTypes.DOUBLE); // 29\r\n\t\tscalarMapping.put(DaoConstants.MAP_GHPOIL, StandardBasicTypes.DOUBLE); // 30\r\n\t\tscalarMapping.put(DaoConstants.MAP_SITEPATH, StandardBasicTypes.STRING); // 31\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPANYNAME,\r\n\t\t\t\tStandardBasicTypes.STRING); // 32\r\n\t\tscalarMapping.put(DaoConstants.MAP_CASTATUS, StandardBasicTypes.STRING); // 33\r\n\t\tscalarMapping.put(DaoConstants.MAP_V23, StandardBasicTypes.STRING); // 34\r\n\t\t// Demand\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPRESSOR1,\r\n\t\t\t\tStandardBasicTypes.BOOLEAN); // 35\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPRESSOR2,\r\n\t\t\t\tStandardBasicTypes.BOOLEAN); // 36\r\n\t\tscalarMapping.put(DaoConstants.MAP_COMPRESSOR3,\r\n\t\t\t\tStandardBasicTypes.BOOLEAN); // 37\r\n\t\t//add by shanf\r\n\t\tscalarMapping.put(DaoConstants.DEVICE_MODEL,\r\n\t\t\t\tStandardBasicTypes.STRING); // 38\r\n\r\n\t\treturn scalarMapping;\r\n\t}", "public Map<String, Object> getInfo();", "public MapGraphExtra()\n\t{\n\t\t// TODO: Implement in this constructor in WEEK 3\n\t\tmap = new HashMap<GeographicPoint, MapNode> ();\n\t}", "private Map getAsMap(BuildStatus bs) {\n String lines[] = bs.toExternalForm().split(\"\\n\");\n Map m = new HashMap();\n for (int i = 0; i < lines.length; i++) {\n String line = lines[i];\n String parts[] = line.split(\"=\");\n String name = parts[0];\n String value = parts[1];\n m.put(name + \"=\", value);\n }\n return m;\n }", "private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "@Override\n\tpublic void putAll(Map<? extends String, ? extends String> m) {\n\t}", "private final Map<String, Object> m7134b() {\n HashMap hashMap = new HashMap();\n zzcf.zza zzco = this.f11698b.zzco();\n hashMap.put(\"v\", this.f11697a.zzawx());\n hashMap.put(\"gms\", Boolean.valueOf(this.f11697a.zzcm()));\n hashMap.put(\"int\", zzco.zzaf());\n hashMap.put(\"up\", Boolean.valueOf(this.f11700d.mo17775a()));\n hashMap.put(\"t\", new Throwable());\n return hashMap;\n }", "@Override\n public Map<String, XPathValue> getArticleMetaMap() {\n return EbscoMap;\n }", "public void map( Chunk bv ) { }", "private Map<String,List<Invertedindex>> collecting() //\r\n {\r\n Map<String,List<Invertedindex>> maps = new TreeMap<>();\r\n for (Core pon:pondred){\r\n for(Map.Entry<String,Double> term:pon.allTerms.entrySet()){\r\n if (maps.containsKey(term.getKey())){\r\n List<Invertedindex> index = maps.get(term.getKey());\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }else {\r\n List<Invertedindex> index = new ArrayList<>();\r\n index.add(new Invertedindex(pon.m_cle,term.getValue(),pon.getBalise(term.getKey())));\r\n maps.put(term.getKey(), index);\r\n }\r\n if(cleFreq.containsKey(pon.m_cle))\r\n cleFreq.put(pon.m_cle,cleFreq.get(pon.m_cle)+term.getValue());\r\n else cleFreq.put(pon.m_cle,term.getValue());\r\n\r\n }\r\n }\r\n return maps;\r\n }", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);", "public OCRSet() {\r\n this.map = new HashMap<Integer, E>();\r\n }", "@Test\n public void test() throws IOException {\n mapper.insertFile(new HashMap<String,Object>(){\n {put(\"fileName\",\"黑侠\");}\n });\n// List<Map<String, Object>> byId = mapper.findById(14L);\n\n\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 }", "void putAll(HMap m) throws NullPointerException;", "@Override\n\tpublic Map<ByteString, Integer> getSeriesMap() {\n\t\treturn null;\n\t}", "private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }", "public abstract java.util.Map<java.lang.String, java.lang.Integer> systemicEventIncidenceCountMap();", "public void mapping() {\n\t\t\n\t}", "Map getAspectDatas();", "@Override\r\n public ParaMap index(ParaMap inMap) throws Exception {\n return null;\r\n }", "private void makeImgToTag() {\n\t\timgToTag = new HashMap<String, HashSet<String>>();\n\t\t// Goes through the tagtoimg map to create this map\n\t\tfor (String tag : tagToImg.keySet()) {\n\t\t\tfor (String pathName : tagToImg.get(tag)) {\n\t\t\t\tif (imgToTag.containsKey(pathName))\n\t\t\t\t\timgToTag.get(pathName).add(tag);\n\t\t\t\telse {\n\t\t\t\t\tHashSet<String> tags = new HashSet<String>();\n\t\t\t\t\ttags.add(tag);\n\t\t\t\t\timgToTag.put(pathName, tags);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private IMapData<Integer, String> getHashMapData2() {\n List<IKeyValueNode<Integer, String>> creationData = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(2, \"c\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"a\"),\n KeyValueNode.make(3, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<IKeyValueNode<Integer, String>> data = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }", "public Map<String, PhiFunction> copyAddPhiMap(){\n Map<String, PhiFunction> current_phi_map = this.ssa_stack.peek();\n Map<String, PhiFunction> new_phi_map = new HashMap<String, PhiFunction>();\n for(PhiFunction phi : current_phi_map.values()){\n new_phi_map.put(phi.id, (PhiFunction)phi.clone());\n }\n this.ssa_stack.push(new_phi_map);\n return new_phi_map;\n }", "private void pushToMap(Method method, Map executeResultMap) {\n List<ResourceField> resourceFields = ResourceFieldTools.getResourceFields(method);\n executeResultMap.keySet().stream().forEach(o -> push(method, resourceFields, executeResultMap.get(o)));\n }", "private HashMap<String, HashSet<String>> convertIndexToMap(IndexReader reader) throws IOException{\n\t\t HashMap<String, HashSet<String>> hmap = new HashMap<String, HashSet<String>>();\n\t\t HashSet<String> docIdSet;\n\t\t \n\t\t for(int i=0; i<reader.numDocs(); i++){\n\t\t\t Fields termVect = reader.getTermVectors(i);\n\n\t\t\t if(termVect == null)\n\t\t\t\t continue;\n\t\t\t \n\t for (String field : termVect) {\n\t \t \n\t Terms terms = termVect.terms(field);\n\t TermsEnum termsEnum = terms.iterator();\n\t Document doc = reader.document(i);\n\t \n\t while(termsEnum.next() != null){\n\t \t BytesRef term = termsEnum.term();\n\t \t String strTerm = term.utf8ToString();\n\t \t \n\t \t if (hmap.containsKey(strTerm)){\n\t \t\t docIdSet = hmap.get(strTerm);\n\t \t\t docIdSet.add(doc.get(\"url\"));\n\t \t } else{\n\t \t\t docIdSet = new HashSet<String>();\n\t \t\t docIdSet.add(doc.get(\"url\"));\n\t \t\t hmap.put(strTerm, docIdSet);\n\t \t }\n\t }\n\t }\n\t\t }\n\t\t \n\t\t return hmap;\n\t}", "private static void addEntriesToMap(\n\t\tMap<Character,Integer> map,String toSort, String poolOfOccurances\n\t\t){\n\n\t\t//Loop the toStort\n\t\tfor(int i=0;i<toSort.length();i++){\n\t\t\tmap.put(toSort.charAt(i),new Integer(getCharacterFrequence(toSort.charAt(i),poolOfOccurances)));\n\t\t}\n\n\t}" ]
[ "0.5920771", "0.5784866", "0.57073396", "0.57047385", "0.56846505", "0.5666766", "0.5602619", "0.55967206", "0.55769813", "0.55731785", "0.55389637", "0.55339986", "0.5514179", "0.54883844", "0.5482081", "0.5460193", "0.5459142", "0.5445889", "0.5407193", "0.54046273", "0.54044914", "0.53763205", "0.5342153", "0.5327898", "0.5319108", "0.531727", "0.5316077", "0.530719", "0.5306586", "0.5304606", "0.5301253", "0.5295058", "0.5293401", "0.52930844", "0.5288462", "0.5287168", "0.5277955", "0.52771205", "0.52767605", "0.52732134", "0.52719283", "0.526839", "0.5261711", "0.52527916", "0.524743", "0.5242182", "0.5240481", "0.522675", "0.5226372", "0.52157384", "0.5211894", "0.52082115", "0.5205679", "0.5195254", "0.519525", "0.51899", "0.5185253", "0.5180357", "0.5179845", "0.5179199", "0.51741207", "0.5171044", "0.5166909", "0.51658", "0.5165162", "0.5165162", "0.5164971", "0.5157208", "0.51529795", "0.51504076", "0.51501745", "0.5145786", "0.514399", "0.5140332", "0.5136034", "0.5131153", "0.51309407", "0.5129616", "0.5123989", "0.51232743", "0.51231086", "0.5117479", "0.5116427", "0.511534", "0.5113264", "0.5110346", "0.5106863", "0.5106197", "0.50994265", "0.5099031", "0.5098167", "0.50949293", "0.50948685", "0.5093065", "0.5091303", "0.5089118", "0.5088351", "0.5076405", "0.50760466", "0.5073371", "0.5072834" ]
0.0
-1
Creates an npc action message.
public NpcActionEvent(int option, int index) { this.option = option; this.index = index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SendAction createSendAction();", "Action createAction();", "Action createAction();", "Action createAction();", "CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }", "public void createAction() {\n }", "public void action(BotInstance bot, Message message);", "TurnAction createTurnAction();", "@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}", "private void makeAction(JSONObject request, DataOutputStream clientStream) throws IOException, ParseException {\n\t\tGossip_action_message.Action action = Gossip_parser.getClientAction(request);\n\t\tString sender = Gossip_parser.getClientName(request);\n\t\tString receiver = Gossip_parser.getClientReceiver(request);\n\n\t\ttry {\n\t\t\tswitch(action) {\n\t\t\t\n\t\t\t\tcase LOOKUP_OP: {\n\t\t\t\t\tif (data.searchUser(receiver) == true)\n\t\t\t\t\t\tsendReply(new Gossip_userinfo_message(Gossip_success_message.successMsg.USERINFO, data.getUser(receiver)), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase FRIENDSHIP_OP: {\n\t\t\t\t\tif (!data.addFriendship(sender, receiver))\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.FRIENDALREADY), clientStream);\n\t\t\t\t\telse\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase RM_FRIENDSHIP_OP: {\n\t\t\t\t\tif (!data.removeFriendship(sender, receiver))\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.FAIL_OP), clientStream);\n\t\t\t\t\telse\n\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase MSG_FRIEND_OP: {\n\t\t\t\t\t//non è permesso scambiare messaggi tra utenti non amici\n\t\t\t\t\tif (!data.getFriends(sender).contains(data.getUser(receiver)))\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.OPNOTALLOWED), clientStream);\n\t\t\t\t\telse {\n\t\t\t\t\t\tGossip_text_notification_message notification;\n\t\t\t\t\t\tString text = Gossip_parser.getText(request);\n\t\t\t\t\t\tString senderLang = Gossip_parser.getLang(data.getUser(sender).getLanguage());\n\t\t\t\t\t\tString receiverLang = Gossip_parser.getLang(data.getUser(receiver).getLanguage());\n\t\t\t\t\t\t//traduco testo\n\t\t\t\t\t\tString translatedText = Gossip_translator.translate(text, senderLang, receiverLang);\n\t\t\t\t\t\tSocket receiver_socket;\n\t\t\t\t\t\t//se la traduzione mi restituisce null, invio il testo non tradotto\n\t\t\t\t\t\tif (translatedText == null)\n\t\t\t\t\t\t\tnotification = new Gossip_text_notification_message(sender, text);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnotification = new Gossip_text_notification_message(sender, translatedText);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//recupero il socket per le notifiche al client\n\t\t\t\t\t\t\treceiver_socket = data.getUser(receiver).getMessageSocket();\n\t\t\t\t\t\t\tsynchronized(receiver_socket) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//invio notifica\n\t\t\t\t\t\t\t\tsendReply(notification, new DataOutputStream(receiver_socket.getOutputStream()));\n\t\t\t\t\t\t\t\t//invio risposta\n\t\t\t\t\t\t\t\tsendReply(new Gossip_server_message(Gossip_server_message.Op.SUCCESS_OP), clientStream);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (FriendOfflineException e) {\n\t\t\t\t\t\t\t//amico offline\n\t\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.FRIENDOFFLINE), clientStream);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\t\n\t\t\t\tcase FILE_FRIEND_OP: {\n\t\t\t\t\t//non è permesso inviare file a utenti che non sono amici\n\t\t\t\t\tif (!data.getFriends(sender).contains(data.getUser(receiver)))\n\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.OPNOTALLOWED), clientStream);\n\t\t\t\t\telse {\n\t\t\t\t\t\tString filename = Gossip_parser.getFilename(request);\n\t\t\t\t\t\tSocket receiver_socket;\n\t\t\t\t\t\tGossip_file_notification_message notification = new Gossip_file_notification_message(sender, filename);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t//recupero socket per le notificihe\n\t\t\t\t\t\t\treceiver_socket = data.getUser(receiver).getMessageSocket();\n\t\t\t\t\t\t\tsynchronized (receiver_socket) {\n\t\t\t\t\t\t\t\tsendReply(notification, new DataOutputStream(receiver_socket.getOutputStream()));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//ridirigo quello che scrive il receiver verso il mittente (hostname e porta per ricevere il file)\n\t\t\t\t\t\t\t\tclientStream.writeUTF(new DataInputStream(new BufferedInputStream(receiver_socket.getInputStream())).readUTF());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (FriendOfflineException e) {\n\t\t\t\t\t\t\t//friend offline\n\t\t\t\t\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.FRIENDOFFLINE), clientStream);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t}\n\t\t} catch (NodeNotFoundException e) {\n\t\t\t//utente non registrato\n\t\t\tsendReply(new Gossip_fail_message(Gossip_fail_message.failMsg.NICKUNKNOWN), clientStream);\n\t\t}\n\t}", "private void constructACLMessage()\n {\n PlayIntroAction playIntroObject = new PlayIntroAction();\n playIntroObject.setLenght(numberOfMeasures);\n playIntroObject.setNow(true);\n playIntroObject.setDuration(-1);\n msg = new ACLMessage(ACLMessage.CFP);\n msg.setLanguage(codec.getName());\n msg.setOntology(ontology.getName());\n for(int i = 0; i < receivers.size(); i++)\n {\n try\n {\n //fill the content using the Ontology concept\n myAgent.getContentManager().fillContent(msg,new Action((AID)receivers.elementAt(i),playIntroObject));\n }catch (Exception ex) { ex.printStackTrace(); }\n //Set the receiver of the message\n msg.addReceiver((AID)receivers.elementAt(i));\n\n }\n\n //Set the protocol that we gonna use\n msg.setProtocol(FIPANames.InteractionProtocol.FIPA_CONTRACT_NET);\n //We indicate the deadline of the reply\n msg.setReplyByDate(new Date(System.currentTimeMillis() + 30000));\n\n\n }", "private Message createMsg(long type,Object event){\r\n Message msg=new Message(0,type,0,\"\",new Object[]{event},\r\n System.currentTimeMillis(),0,0,null,0,0,0);\r\n return msg;\r\n }", "DynamicMessage createDynamicMessage();", "public LCAction(int id, String msgText, String name, String actionType, int msgId) {\r\n this.id = id;\r\n this.msgText = msgText;\r\n this.name = name;\r\n if (actionType == null)\r\n actionType = \"playLearningCompanion\";\r\n this.actionType = actionType;\r\n this.msgId = msgId;\r\n }", "public Intent intent( String inAction ) {\r\n\t\treturn new Intent( kMessagePlayer ).putExtra( \"action\" , inAction );\r\n\t}", "ActionType createActionType();", "@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }", "ActionDefinition createActionDefinition();", "public static NPC createNPC(){\n\t\treturn new NPC();\n\t}", "protected void createAccessMessage() {\n final GenericMessage genericMessage = (GenericMessage) mMeshMessage;\n final ApplicationKey key = genericMessage.getAppKey();\n final int akf = genericMessage.getAkf();\n final int aid = genericMessage.getAid();\n final int aszmic = genericMessage.getAszmic();\n final int opCode = genericMessage.getOpCode();\n final byte[] parameters = genericMessage.getParameters();\n message = mMeshTransport.createMeshMessage(mSrc, mDst, mLabel, key, akf, aid, aszmic, opCode, parameters);\n genericMessage.setMessage(message);\n }", "CustomAction(String actionType, String color, double startX, double startY, String text, double fontSize) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n attributes.put(\"text\", text);\n attributes.put(\"fontSize\", fontSize);\n action.put(\"Action\", attributes);\n }", "public static void createNPC() {\n //create the good npc\n BSChristiansen.setName(\"BS_Christiansen\");\n BSChristiansen.setCurrentRoom(jungle);\n BSChristiansen.setDescription(\"The survivor of the plane crash look to be some kind of veteran soldier, \"\n + \"\\nbut he is heavly injured on his right leg so he cant move \");\n BSChristiansen.addDialog(\"If you want to survive on this GOD forsaken island, you \\nmust first find food and shelter.\"\n + \"\\nYou can craft items to help you survive, if you \\nhave the right components.\");\n BSChristiansen.addDialog(\"To escape the island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n\n //create the bad npc\n josephSchnitzel.setName(\"Joseph_Schnitzel\");\n josephSchnitzel.setCurrentRoom(mountain);\n josephSchnitzel.setDescription(\"A lonely surviver with very filthy hair, and a wierd smell of weinerschnitzel.\");\n josephSchnitzel.addDialog(\"Heeelloooo there my freshlooking friend, I am Joseph\\nSchnitzel, if you scratch my back I might scratch your's.\" + \"\\n\" + \"Go fetch me some eggs, or I'll kill you\");\n josephSchnitzel.addDialog(\"Talks to himself\\nis that muppet still alive\");\n josephSchnitzel.addDialog(\"Talks to himself\\nHow long is he going to last\");\n josephSchnitzel.addDialog(\"Talks to himself\\nI wonder what those noises were ing the cave\");\n josephSchnitzel.addDialog(\"GET THE HELL OUT OF MY WAY!!!\");\n josephSchnitzel.setDamageValue(100);\n\n //create another npc\n mysteriousCrab.setName(\"Mysterious_Crab\");\n mysteriousCrab.setCurrentRoom(cave);\n mysteriousCrab.setDescription(\"A mysterious crab that you dont really get why can talk\");\n mysteriousCrab.addDialog(\"MUHAHAHA i'm the finest and most knowledgeable \\ncrab of them all mr.Crab and know this island\\nlike the back of my hand! oh i mean claw...\"\n + \"\\nA Random fact: \"\n + \"to escape this island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n }", "private void sendRequest(Action action) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n request.setLanguage(new SLCodec().getName());\n request.setOntology(MobilityOntology.getInstance().getName());\n try {\n getContentManager().fillContent(request, action);\n request.addReceiver(action.getActor());\n send(request);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static Action push() {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.getGrid().isValid(a.getLocation().getAdjacentLocation(a.getDirection()))) {\n Actor b = a.getGrid().get(a.getLocation().getAdjacentLocation(a.getDirection()));\n if(b instanceof Movable && b instanceof DestructibleActor) {\n DestructibleActor c = (DestructibleActor) b;\n c.setDirection(a.getDirection());\n if(c.canMove()) {\n c.move();\n a.move();\n a.energy = a.energy - getCost();\n }\n\n }\n }\n }\n\n @Override\n public int getCost() {\n return 10;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"Push()\";\n }\n };\n }", "Action(String desc){\n this.desc = desc;\n this.append = \"\";\n }", "public static Action buildShip(int id, char type) {\n\t\treturn new Action(id, type);\n\t}", "public static void sendActionMessage(ServerPlayer player, Component textComponent) {\n sendMessage(player, textComponent, true);\n }", "IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);", "public static void sendAction(Action act, String hubAddress, Context c) {\n try {\n \t// Loading my identity from preferences\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(c);\n\n // for saving the last time the device sent a message to any device\n SharedPreferences.Editor editor = sharedPref.edit();\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString curTime = sdf.format(calendar.getTime());\n\t\t\teditor.putString(\"lastDeviceMsg\", curTime);\n\t\t\teditor.commit();\n\n\t\t\tString myIdentity = sharedPref.getString(\"my_identity\", \"\");\n \tact.addArgument(\"fromUser\", myIdentity);\n \t\n \tString msg = serializeAction(act);\n \n \tIntent i = new Intent(c, GenericService.class);\n \n i.setAction(Constants.SEND_MSG_INTENT);\n i.putExtra(\"action\", msg); // msgTextToSend\n i.putExtra(\"hub_address\", hubAddress);\n \n Log.v(\"Helper\", \"Sending: \" + msg + \"To: \" + hubAddress);\n \n c.startService(i);\n } catch(Exception e) {\n \tLog.e(\"sendAction\", \"Something goofy:\" + e.getMessage());\n }\n\t}", "private void sendCommand(int recipient, int action) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + \"0\" + \";\" + \"0\"\r\n\t\t\t\t+ \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\t}", "DomainAction createDomainAction();", "private void sendActionBar(@NonNull final String message) {\n for(UUID playerID : getNewsRecipient()) {\n if(isOnline(playerID)) {\n @NonNull final CraftPlayer player = (CraftPlayer) Bukkit.getPlayer(playerID);\n final String actionMsg = \"{\\\"text\\\":\\\"\" + message + \"\\\"}\";\n final PacketPlayOutChat PACKET = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a(actionMsg), (byte) 2);\n player.getHandle().playerConnection.sendPacket(PACKET);\n } else {\n getNewsRecipient().remove(playerID);\n }}\n\n }", "POGOProtos.Rpc.CombatActionProto getMinigameAction();", "IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);", "ActionBlock createActionBlock();", "CaseAction createCaseAction();", "public static void sendAction(UUID uuid, Action action) throws IOException {\n sendMessage(new Gson().toJson(new ControlMessage(uuid, action)));\n }", "private void createMsgSample() throws IOException {\n\t\tnew File(\"reply/msg/Sample\").mkdir();\n\t\tSystem.out.print(\"[INFO][PLUGIN][REPLY]:Creating MSG Sample...\");\n\t\tFileWriter sampMsg = new FileWriter(\"reply/msg/Sample/Hello.txt\");\n\t\tsampMsg.write(\"Hello world!\\n\");\n\t\tsampMsg.flush();\n\t\tsampMsg.close();\n\t\tFileWriter sampCmd = new FileWriter(\"reply/cmd/SampleMsg.yml\");\n\t\tsampCmd.write(\"msg\\n\");\n\t\tsampCmd.write(\"Sample\\n\");\n\t\tsampCmd.write(\"Hello&&world!\\n\");\n\t\tsampCmd.write(\"break\\n\");\n\t\tsampCmd.flush();\n\t\tsampCmd.close();\n\t\tSystem.out.println(\"DONE!\");\n\t}", "NoAction createNoAction();", "public NewAction() {\n\t\tsuper(\"New...\", null);\n\t\tputValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, MAIN_MENU_MASK));\n\t}", "private void createPosition() {\n\n switch (new Random().nextInt(4)) {\n\n case 0:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":-90\";\n break;\n\n case 1:\n sendString = enemyPositionX.nextInt(Window.WIDTH) + \":\" + (Window.HEIGHT + 90);\n break;\n\n case 2:\n sendString = \"-90:\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n\n case 3:\n sendString = (Window.WIDTH + 90) + \":\" + enemyPositionY.nextInt(Window.HEIGHT);\n break;\n }\n sendString += \":\" + new Random().nextInt(4);\n sendString += \":\" + new Random().nextInt(2);\n }", "public void createMessage(int tid, int uid, int rank, String detail);", "protected abstract void createTriggerOrAction();", "CustomAction(String actionType, String color, double startX, double startY){\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"color\", color);\n attributes.put(\"startX\", startX);\n attributes.put(\"startY\", startY);\n action.put(\"Action\", attributes);\n }", "void receiveGameCreationMessage(String fromPlayer, String msg) throws RpcException;", "public Message newMessage(String type) {\n\tString address = null;\n\n\t/*\n * Provide the default address from the original open.\n */\n\n\tif (((m_mode & Connector.WRITE) > 0) && (host != null)) {\n\t address = ADDRESS_PREFIX + host;\n\t if (m_iport != 0) {\n\t\taddress = address + \":\" + String.valueOf(m_iport);\n\t }\n\t}\n\n\treturn newMessage(type, address);\n }", "protected IAction createAction(IEvent event, String label, String assign)\n\t\t\tthrows RodinDBException {\n\t\tIAction action = event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t\taction.setLabel(label, null);\n\t\taction.setAssignmentString(assign, null);\n\t\treturn action;\n\t}", "public ActorNPC() {\r\n }", "@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}", "public MessageResponseAction(Message message) {\n this(message, 0);\n }", "public MessageCommand(IMessage message, String action, String arg) {\n\t\tthis.message = requireNonNull(message);\n\t\tthis.action = requireNonNull(action).toLowerCase();\n\t\tthis.arg = arg;\n\t}", "@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}", "public void addActionCreate(ActionListener create) {\n btnCreateGame.addActionListener(create);\n }", "ActionEvent createActionEvent();", "POGOProtos.Rpc.CombatActionProtoOrBuilder getMinigameActionOrBuilder();", "private void createMessagesForPhones() {\n int msgQtd = getMessageQuantityInterval().randomValue();\n getEvents().forEach((event)->{\n Phone originPhone = event.getOriginPhone();\n \n Message message = new Message(originPhone, event.getDestinationPhone(), MessageStatus.PHONE_TO_ANTENNA);\n if ( msgQtd > 0 ) {\n message.setSendQuantity(msgQtd);\n message.setSendAgain(false);\n \n originPhone.addMessageToOutbox(message);\n }\n });\n }", "LogAction createLogAction();", "static public BasicAction createActionFor(Object o, String methodName)\n {\n BasicAction ba = null;\n try {\n ba = ByteCodeBuilder.generateBasicAction(o, methodName);\n } catch (GeneratorException ex) {\n SimUtilities.showError(\"Error creating action: \" + methodName +\n \" on \" + o.getClass().getName(), ex);\n System.exit(0);\n }\n\n return ba;\n }", "private void addAgentAction(Event e) {\n AgentActionEvent event = (AgentActionEvent) e;\n int time = this.getEnvironment().getTime();\n\n this.addCycle(time);\n\n var packet = event.getPacket();\n var agentId = event.getAgent().getID();\n\n switch (event.getAction()) {\n case AgentActionEvent.PICK: {\n var action = new PacketAction(packet.getX(), packet.getY(),\n PacketAction.Mode.Pickup, agentId);\n this.historyPackets.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n case AgentActionEvent.PUT: {\n var action = new PacketAction(event.getToX(), event.getToY(),\n PacketAction.Mode.Drop, agentId);\n this.historyPackets.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n case AgentActionEvent.DELIVER: {\n var action = new PacketAction(event.getToX(), event.getToY(),\n PacketAction.Mode.Delivery, agentId);\n this.historyPackets.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n case AgentActionEvent.STEP: {\n var action = new AgentMove(event.getFromX(), event.getFromY(),\n event.getToX(), event.getToY(), agentId);\n this.historyMoves.get(time).add(action);\n this.addRowTable(time, agentId, action.toString());\n break;\n }\n }\n\n repaint();\n }", "@Override\r\n\tpublic void onMessageCreate(MessageCreateEvent event) {\n\t\tif (event.getMessageContent().startsWith(\"!\") && event.getChannel().getId() == 310560101352210432L) {\r\n\t\t\t// remove prefix from string and anything after\r\n\t\t\tString command = event.getMessageContent().substring(1).split(\" \")[0].toLowerCase();\r\n\t\t\t// check if original command name\r\n\t\t\tif (commands.containsKey(command))\r\n\t\t\t\tcommands.get(command).process(event);\r\n\t\t\t// check if alternative name for command\r\n\t\t\telse if (commandAlternative.containsKey(command))\r\n\t\t\t\tcommands.get(commandAlternative.get(command)).process(event);\r\n\r\n\t\t\tlogger.info(event.getMessageAuthor().getDiscriminatedName() + \" invoked: \" + command);\r\n\t\t}\r\n\r\n\t}", "private static String getActionFromMessageAttributes(MessageInfo msgInfo) {\n String action = null;\n if (msgInfo != null\n && msgInfo.getExtensionAttributes() != null) {\n String attr = getAction(msgInfo);\n if (attr != null) {\n action = attr;\n msgInfo.setProperty(ACTION, action);\n }\n }\n return action;\n }", "public POGOProtos.Rpc.CombatActionProto getMinigameAction() {\n if (minigameActionBuilder_ == null) {\n return minigameAction_ == null ? POGOProtos.Rpc.CombatActionProto.getDefaultInstance() : minigameAction_;\n } else {\n return minigameActionBuilder_.getMessage();\n }\n }", "Builder addPotentialAction(Action value);", "public InfoMessage createInfoMessage();", "public String action() { \n return \"Player capped.\";\n }", "public Builder setMinigameAction(POGOProtos.Rpc.CombatActionProto value) {\n if (minigameActionBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n minigameAction_ = value;\n onChanged();\n } else {\n minigameActionBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void create(Object target, NodeDescriptor node, AssertionDescriptor assertion) {\r\n ActionTypeDescriptor actionType = getActionType(Actions.create.toString());\r\n if (actionType != null) {\r\n evaluateAction(Actions.create.toString(), target, null, node, assertion);\r\n }\r\n }", "public static String build(Message msg)\n {\n // Grab our message data\n String action = msg.getAction() + \"\\n\";\n String clientID = msg.getClientID() + \"\\n\";\n String body = \"\\n\" + msg.getBody() + \"\\n\";\n int recipient = msg.getRecipient();\n\n // Need to store the message somewhere\n String message = action + clientID;\n\n // Recipient will be -1 if not\n // present in message\n if(recipient != -1) {\n message += recipient + \"\\n\";\n }\n\n // Add the body\n message += body;\n return message;\n }", "public interface Action {\n\t\n\t/**\n\t * @return The action's printable value\n\t */\n\tpublic String toString();\n\n\tpublic Action actionClone();\n \t\n}", "@Override\n protected Action[] createActions() {\n return new Action[0];\n }", "Actor createActor();", "private void createActions() {\n\n\t\t//-----------------------------------------------\n\t\t// Check if Party Exists\n\t\t//-----------------------------------------------\n\t\tpartyExists = new GuardedRequest<Party>() {\n\t\t\tprotected boolean error() {return emailaddressField.noValue();}\n\t\t\tprotected void send() {super.send(getValue(new PartyExists()));}\n\t\t\tprotected void receive(Party party) {\n\t\t\t\tif (party != null ) {setValue(party);}\n\t\t\t}\n\t\t};\n\n\t\t//-----------------------------------------------\n\t\t// Read Party\n\t\t//-----------------------------------------------\n\t\tactorRead = new GuardedRequest<Party>() {\n\t\t\tprotected boolean error() {return partyField.noValue();}\n\t\t\tprotected void send() {super.send(getValue(new ActorRead()));}\n\t\t\tprotected void receive(Party party){setValue(party);}\n\t\t};\n\n\t\t//-----------------------------------------------\n\t\t// Update Party\n\t\t//-----------------------------------------------\n\t\tactorUpdate = new GuardedRequest<Party>() {\n\t\t\tprotected boolean error() {\n\t\t\t\treturn (\n\t\t\t\t\t\tifMessage(AbstractRoot.noOrganizationid(), Level.TERSE, AbstractField.CONSTANTS.errOrganizationid(), partyField)\n\t\t\t\t\t\t|| ifMessage(partyField.noValue(), Level.TERSE, AbstractField.CONSTANTS.errId(), partyField)\n\t\t\t\t\t\t|| ifMessage(emailaddressField.noValue(), Level.ERROR, AbstractField.CONSTANTS.errEmailaddress(), emailaddressField)\n\t\t\t\t\t\t|| ifMessage(formatdateField.noValue(), Level.ERROR, CONSTANTS.formatdateError(), formatdateField)\n\t\t\t\t\t\t|| ifMessage(formatphoneField.noValue(), Level.ERROR, CONSTANTS.formatphoneError(), formatphoneField)\n\t\t\t\t\t\t|| ifMessage(!Party.isEmailAddress(emailaddressField.getValue()), Level.ERROR, AbstractField.CONSTANTS.errEmailaddress(), emailaddressField)\n//\t\t\t\t\t\t|| ifMessage((typesField.hasValue(Party.Type.Agent.name()) || typesField.hasValue(Party.Type.Organization.name())) && !partyField.hasValue(AbstractRoot.getOrganizationid()), Level.ERROR, CONSTANTS.partytypeError(), partyField)\n\t\t\t\t);\n\t\t\t}\n\t\t\tprotected void send() {super.send(getValue(new ActorUpdate()));}\n\t\t\tprotected void receive(Party party) {\n\t\t\t\tif (parentTable != null) {parentTable.execute(true);}\n\t\t\t\thide();\n\t\t\t}\n\t\t};\n\n\t\t//-----------------------------------------------\n\t\t// Delete Party\n\t\t//-----------------------------------------------\n\t\tactorDelete = new GuardedRequest<Party>() {\n\t\t\tprotected String popup() {return AbstractField.CONSTANTS.errDeleteOK();}\n\t\t\tpublic void cancel() {state = oldstate;}\n\t\t\tprotected boolean error() {\n\t\t\t\treturn (\n\t\t\t\t\t\tifMessage(partyField.noValue(), Level.TERSE, AbstractField.CONSTANTS.errId(), partyField)\n\t\t\t\t);\n\t\t\t}\n\t\t\tprotected void send() {super.send(getValue(new ActorDelete()));}\n\t\t\tprotected void receive(Party party){\n\t\t\t\tif (parentTable != null) {parentTable.execute(true);}\n\t\t\t\thide();\n\t\t\t}\n\t\t};\t\n\t}", "public NamedAction createNamedAction(String name) {\n NamedActionImpl action = new NamedActionImpl();\n action.setName(name);\n return action;\n }", "@Override\n public void setNewAction(Mossa.Action action) {\n jumpMove.setDisable(false);\n Platform.runLater(() -> {\n submitAction.setDisable(true);\n\n });\n switch (action) {\n case BUILD:\n lightBuild();\n if (!inTurno) {\n lightMyPawns();\n inTurno = true;\n firstAction = true;\n } else {\n c = table.getTableCell(table.getXYPawn(getID(), currentPawn, true),\n table.getXYPawn(getID(), currentPawn, false));\n firstAction = false;\n lightAvailable(c, bt[table.getXYPawn(getID(), currentPawn, true)][table.getXYPawn(getID(), currentPawn, false)]);\n\n }\n currentMove = new Mossa();\n currentMove.setAction(action);\n\n break;\n case MOVE:\n lightMove();\n currentMove = new Mossa();\n currentMove.setAction(action);\n if (!inTurno) {\n effetto = true;\n lightMyPawns();\n inTurno = true;\n firstAction = true;\n } else {\n firstAction = false;\n c = table.getTableCell(table.getXYPawn(getID(), currentPawn, true),\n table.getXYPawn(getID(), currentPawn, false));\n lightAvailable(c, bt[table.getXYPawn(getID(), currentPawn, true)][table.getXYPawn(getID(), currentPawn, false)]);//prima era true\n\n }\n }\n }", "void action(String response, GameChatEvent cause) throws InterruptedException, IOException;", "private void sendSignal(){\n\t\tSystem.out.println(inputLine + \"test\");\n\t\tMessageContent messageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM);\n\t\tif(inputLine.equals(Constants.BUTTON_1_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_1_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t\tSystem.out.println(\"oh yeah\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}\n\t\t\t\t\n\t\tString json = messageContent.toJSON();\n\t\tDFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\tsd.setType(Constants.SHUTTER);\n\t\tsd.setName(Constants.PLACE_LIVINGROOM);\n } else {\n\t\tsd.setType(Constants.AUTO_SWITCH);\n\t\tsd.setName(Constants.AUTO_SWITCH_AGENT);\n }\n template.addServices(sd);\n try {\n DFAgentDescription[] result = DFService.search(myAgent, template);\n if (result.length > 0) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\t\t\trequest.setPerformative(ACLMessage.INFORM);\n }\n for (DFAgentDescription receiver : result) {\n if (!receiver.getName().equals(myAgent.getAID())) {\n request.addReceiver(receiver.getName());\n \n }\n }\n request.setContent(json);\n myAgent.send(request);\n }\n } catch(FIPAException fe) {\n fe.printStackTrace();\n }\n\n\n\t}", "public abstract void onCreate(MessageCreateEvent e, List<String> args);", "public void createMessage()\n {\n System.out.println( user + \", type the message you want to send:\" );\n String userInput = sysin.nextLine();\n if( userInput.length() <= MAXLEN )\n msg = userInput;\n else\n msg = userInput.substring( 0, MAXLEN );\n\n }", "@Override\n\tpublic String createMsg_request() {\n\t\treturn null;\n\t}", "public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "protected void pushAction(iNamedObject node)\n\t{\n\t}", "public NormalRoom(String description, Action... action) {\n\t\tsuper(description, action);\n\t}", "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }", "public ActionState createActionState();", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "@Override\n\tpublic ReceiveMessageAction translateToAction(JSONObject json)\n\t{\n\t\t\n\t\tJSONValue jsonObject = json.get(\"success\");\n\t\tJSONObject userObject = jsonObject.isArray().get(0).isObject();\n\t\t\n\t\tInteger id = JSONHelper.getIntValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.ID));\n\t\tString authorUserName = JSONHelper.getStringValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.AUTHOR_USER_NAME));\n\t\tString message = JSONHelper.getStringValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.MESSAGE));\n\t\tLong receivedAt = JSONHelper.getLongValue(userObject, JSONHelper.convertKeyName(ReceiveMessageKeys.RECEIVED_AT));\n\t\t\n\t\t// TODO look into time conversion more\n\t\t// put into JSONHelper?\n\t\t\n\t\tMessage msg= new Message();\n\t\tmsg.setId(id);\n\t\tmsg.setAuthorUserName(authorUserName);\n\t\tmsg.setMessage(message);\n\t\tmsg.setReceivedAt(new Date(receivedAt));\n\t\t\n\t\t\t\t\n\t\t// possibly use builder pattern if it is a lot of data\n\t\tReceiveMessageAction action = new ReceiveMessageAction(msg);\t\n\t\n\t\treturn action;\n\t}", "Builder addPotentialAction(Action.Builder value);", "public com.rpg.framework.database.Protocol.CharacterActionOrBuilder getActionsOrBuilder(\n int index) {\n if (actionsBuilder_ == null) {\n return actions_.get(index); } else {\n return actionsBuilder_.getMessageOrBuilder(index);\n }\n }", "public com.rpg.framework.database.Protocol.CharacterActionOrBuilder getActionsOrBuilder(\n int index) {\n if (actionsBuilder_ == null) {\n return actions_.get(index); } else {\n return actionsBuilder_.getMessageOrBuilder(index);\n }\n }", "@Override\n\tpublic boolean create(NPC_tmpl obj) {\n\t\treturn false;\n\t}", "private void createSendArea() {\n\t\tthis.btnSend = new Button(\"Envoyer\");\n\t\tthis.btnSend.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tboolean sent = window.sendMessage(message.getText());\n\t\t\t\tif(sent) {\n\t\t\t\t\tmessage.setText(\"\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\tnew JFrame(),\n\t\t\t\t\t\t\"Erreur lors de l'envoi du message...\",\n\t\t\t\t\t\t\"Dialog\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "POGOProtos.Rpc.CombatActionProto getCurrentAction();", "public CreateRemoteClassic<Msg, Ref> create();", "@Override\r\n\tpublic void makeMove(A action) {\r\n\t\tgame.execute(action);\r\n\t}", "public static void sendActionBarInfo(Player p, String message) {\n\t\t((CraftPlayer) p).getHandle().playerConnection\n\t\t\t\t.sendPacket(new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a(\"{\\\"text\\\": \\\"\" + message + \"\\\"}\"), ChatMessageType.GAME_INFO));\n\t}", "public Message createMessage()\n {\n return messageFactory.createMessage();\n }", "@Override\n\tprotected final void sendMessage(Object content, Performative performative, AgentAddress to){\n\n\t\tACLMessage message = new ACLMessage(content, performative);\n\t\t\n\t\tmessage.setProtocol(EnumFipaProtocol.FIPA_REQUEST);\n\t\tmessage.setConversationId( getConversationId() );\n\t\t\n\t\tgetRefAclAgent().sendACLMessage(message, to);\n\t\t\n\t\t//System.out.println(\"\\n=> MESSAGE envoyé via REQUEST PROTOCOL : \\n\" + message.toString());\n\t}", "Builder addPotentialAction(String value);", "public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }", "public synchronized void sendMessage(CfAction actionToSend){\n\t\t\tcfCommnicationBridge.sendAction(actionToSend);\n\t}", "private void appendAction(String action) {\n \t\tif (board.isSetupPhase())\n \t\t\treturn;\n \n \t\tif (actionLog == \"\")\n \t\t\tactionLog += \"→ \" + action;\n \t\telse\n \t\t\tactionLog += \"\\n\" + \"→ \" + action;\n \n \t}" ]
[ "0.72192866", "0.65481436", "0.65481436", "0.65481436", "0.640097", "0.6377481", "0.6012229", "0.60000706", "0.58", "0.5764411", "0.57328117", "0.56211734", "0.5614691", "0.56055045", "0.5549477", "0.5542993", "0.5531898", "0.55005383", "0.547457", "0.54695755", "0.54580414", "0.544531", "0.5416662", "0.5401623", "0.53990936", "0.53971463", "0.5393881", "0.53769463", "0.5370805", "0.53632474", "0.535718", "0.53552186", "0.53550404", "0.5325941", "0.5303127", "0.52995545", "0.52977157", "0.52835804", "0.5282884", "0.5280743", "0.52560425", "0.52521265", "0.525119", "0.5246881", "0.52403384", "0.5232679", "0.5228139", "0.5220348", "0.52188414", "0.521292", "0.5200314", "0.5194834", "0.5179851", "0.5171975", "0.5163206", "0.51627177", "0.51449895", "0.5128953", "0.5126377", "0.5124295", "0.51189023", "0.5117779", "0.51174116", "0.5113686", "0.51109785", "0.5110086", "0.5109101", "0.5099613", "0.50976825", "0.5073032", "0.50720096", "0.50595254", "0.50552154", "0.50543964", "0.50439054", "0.5043305", "0.5042272", "0.50382864", "0.5037792", "0.503636", "0.50255466", "0.5024448", "0.5019467", "0.50189817", "0.5017822", "0.5012952", "0.5010322", "0.5009962", "0.5008566", "0.5005763", "0.50035346", "0.5002765", "0.5001232", "0.49814808", "0.49765876", "0.4969292", "0.4968715", "0.49640658", "0.49592268", "0.495763", "0.49547845" ]
0.0
-1
Gets the menu action number (i.e. the action message 'option') clicked.
public int getOption() { return option; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getMenu() {\n\t\tSystem.out.println(\"Choose Options from menu:\");\n\t\tint option = scanner.nextInt();\n\n\t\treturn option;\n\t}", "public int getAction()\n {\n return m_action;\n }", "public int getAction() {\n return action_;\n }", "public int getActionIndex() {\n return actionIndex;\n }", "public int getAction() {\n return action_;\n }", "private int getMenuSelection() {\n return view.printMenuAndGetSelection();\n }", "public int getActionCommand() {\n return actionCommand_;\n }", "public int getAction() {\n\t\treturn action;\n\t}", "public int getAction() {\n return action;\n }", "public int getActionCommand() {\n return actionCommand_;\n }", "public static int getMenuChoice() {\n String line;\n int option = -1;\n\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n\n try {\n option = Integer.parseInt(line);\n } catch (NumberFormatException e) {\n option = -1;\n }\n }\n\n return option;\n }", "int getActionCommand();", "int getAction();", "public Integer getactioncode() {\n return (Integer) getAttributeInternal(ACTIONCODE);\n }", "public String getAction() {\n\t\treturn action.get();\n\t}", "public String getActionWindowID() {\n String[] values = (String[]) pathParams.get(ACTION);\n if (values != null && values.length > 0) {\n return values[0];\n }\n return null;\n }", "public MenuActionRequest getMenuAction() {\n\t\treturn menuAction;\n\t}", "@Override\r\n\tpublic String getAction() {\n\t\tString action = null;\r\n\t\tif(caction.getSelectedIndex() == -1) {\r\n\t\t\treturn null;\r\n\t}\r\n\tif(caction.getSelectedIndex() >= 0) {\r\n\t\t\taction = caction.getSelectedItem().toString();\r\n\t}\r\n\t\treturn action;\r\n\t\r\n\t}", "private int whichButtonClicked( ActionEvent event ) {\n\tfor ( int i = 0; i < NBUTTONS; i++ ) {\n\t if ( event.getSource( ) == button[i] )\n\t\treturn i;\n\t}\n\treturn -1;\n }", "public String getActionArg() {\n\t\treturn actionArg;\n\t}", "public Action getSelectedAction() {\n return selectedAction;\n }", "String getAction();", "String getAction();", "public abstract int getMenu();", "public int getActionType();", "private int getResult(){\n\t\t\t\tButtonModel\tbtnModel = btnGroup.getSelection();\r\n \t\t\tif(btnModel!=null){\r\n \t\t\t\treturn Integer.parseInt(btnModel.getActionCommand());\r\n\t\t\t\t}\r\n\t\t\t\treturn -10; //return -10 if user did not fill selection\r\n\t\t\t}", "public static int Menu(){\n \n String StrOp=JOptionPane.showInputDialog(null, \"Ingrese una opcion:\\n\"+\"0.- Salir\\n\"+\n \"1-Calificacion de notas\\n\"+\n \"2-Promedio de la clase\");\n return(Integer.parseInt(StrOp));\n }", "public Integer getActiontype() {\n return actiontype;\n }", "public int getKeyMenu() {\r\n return getKeyEscape();\r\n }", "public int getCommand() {\r\n\t\tif(this.command == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.command.ordinal();\r\n\t}", "public String getAction () {\n return action;\n }", "public int getMenuId() {\n return 0;\n }", "public String getAction() {\r\n\t\treturn action;\r\n\t}", "public static int current() {\n\t\tString[] parts = MenuPath.path.split(\"_\");\n\t\tint len = parts.length;\n\t\t\n\t\treturn Integer.parseInt(parts[len-1]);\n\t}", "@Override\n\tpublic int getActionId() {\n\t\treturn actionId;\n\t}", "public long getPropertyCurrentAction()\n {\n return iPropertyCurrentAction.getValue();\n }", "public String getAction() {\n return action;\n }", "public String getAction() {\n return action;\n }", "public String getAction() {\n return action;\n }", "public String getAction() {\n return action;\n }", "String getActionName();", "public String getAction() {\n return this.action;\n }", "public int getKeyChangeShipMenu() {\r\n return Input.Keys.valueOf(getKeyChangeShipMenuName());\r\n }", "public void menuItemClicked( Menu2DEvent e );", "public String getAction() {\n\t\treturn action;\n\t}", "public String getAction() {\n\t\treturn action;\n\t}", "public String getAction() {\n\t\treturn action;\n\t}", "public String getAction() {\n\t\treturn action;\n\t}", "public int getUserAction()\n {\n return userAction;\n }", "public int getAddEditMenuText();", "public int openStartUpMenu()\n {\n int option;\n startMenu.drawMainMenu();\n option = input.getIntInput();\n return option;\n }", "public String getCurrentMenuID() {\n\t\treturn currentMenu.getIdMenuElement();\r\n\t}", "public String getActionId() {\n\t\treturn actionId;\n\t}", "public String getActivationMenu();", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "public Action getAction(int index) { return actions.get(index); }", "private static int menu() {\r\n\t\tSystem.out.println(\"Elige opcion de jugada:\");\r\n\t\tSystem.out.println(\"1-Piedra\");\r\n\t\tSystem.out.println(\"2-Papel\");\r\n\t\tSystem.out.println(\"3-Tijera\");\r\n\t\tSystem.out.println(\"0-Salir\");\r\n\t\tSystem.out.print(\"Opcion: \");\r\n\t\treturn Teclado.leerInt();\r\n\t}", "public long getPropertyCurrentAction();", "public Long getActionId() {\n return actionId;\n }", "final public String getActionCommand() {\n return command;\n }", "public String getActionId() {\n return actionId;\n }", "public int getKeyBuyMenu() {\r\n return Input.Keys.valueOf(getKeyBuyMenuName());\r\n }", "public int getAction(int state) {\n return explorationPolicy.ChooseAction(qvalues[state]);\n }", "ActionInfo getActionInfo(long actionID) throws IOException;", "public A getAction() {\r\n\t\treturn action;\r\n\t}", "public int getSelectedItemIndex() {\n // The index of the currently selected item can only be\n // obtained if the menu is showing.\n AbstractListItem selectedItem = getSelectedItem();\n if (selectedItem != null) {\n return getWidgetIndex(selectedItem);\n }\n return -1;\n }", "public native MenuItem getSelectedItem();", "@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n optionEnvoi = choixMessage.getItemAt(choixMessage.getSelectedIndex());\n }", "public void actionPerformed(ActionEvent evt) {\n JComboBox comboBox = (JComboBox)evt.getSource();\n currentCommand = (String)comboBox.getSelectedItem();\n }", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "private static String getActionFromMessageAttributes(MessageInfo msgInfo) {\n String action = null;\n if (msgInfo != null\n && msgInfo.getExtensionAttributes() != null) {\n String attr = getAction(msgInfo);\n if (attr != null) {\n action = attr;\n msgInfo.setProperty(ACTION, action);\n }\n }\n return action;\n }", "default MessageContextMenuInteraction getMessageContextMenuInteraction() {\n return getInteraction().asMessageContextMenuInteraction().get();\n }", "public E getSelected() {\n ButtonModel selection = selectedModelRef.get();\n //noinspection UseOfSystemOutOrSystemErr\n final String actionCommand = selection.getActionCommand();\n //noinspection HardCodedStringLiteral,UseOfSystemOutOrSystemErr\n return Objects.requireNonNull(textMap.get(actionCommand));\n }", "public int getCommand() {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tint value = Integer.parseInt(getToken(\"\"));\r\n\t\t\t\tif (value >= EXIT && value <= SAVE) {\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new NumberFormatException();\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\tSystem.out.print(\"Invalid entry please try again.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "public int getSelectionIndex() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETCURSEL, 0, 0);\n }", "public int getTouchAction()\n\t{\n\t\treturn touchAction;\n\t}", "@Override\n\tpublic Action getAction(int i) {\n\t\treturn this.actions.get(i);\n\t}", "public int getNumActions() {\r\n return numActions;\r\n }", "public String getId() {\n return (String) getValue(ACTION_ID);\n }", "@AutoEscape\n\tpublic String getActionInfo();", "public static int getMenuOption() {\n\t Scanner input = new Scanner(System.in);\t// Create a Scanner object\r\n\t \r\n\t boolean invalid = true; \r\n\t int choice = 0;\r\n\t while(invalid){\r\n\t System.out.println(\"Menu\\n1. Add\\n2. Subtract\\n3. Multiply\\n4. Divide\\n5. Clear\\n6. Quit\"); // Prints out menu of options\r\n\t System.out.print(\"What would you like to do? \");\r\n\t choice = input.nextInt();\r\n\t invalid = (choice >= 1 && choice <=6) ? false : true; // checks if choice is valid\r\n\t if (invalid){\r\n\t System.out.println(\"I'm sorry, \" + choice + \" wasn't one of the options\\n\");\r\n\t }\r\n\r\n\t }\r\n\t return choice;\r\n\t }", "int getCommand();", "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 Integer getActionType() {\n return actionType;\n }", "public static int selectMenuOption(String... options) {\n\n for (int i = 0; i < options.length; ++i) {\n c.writer().printf(\"%d. %s%n\", i + 1, options[i]);\n }\n \n for (;;) {\n final int choice;\n\n try {\n choice = Integer.parseInt(\n c.readLine(\"\\nSelect an option and press Enter: \\n\"\n + \">>\"));\n\n if (choice > 0 && choice < options.length + 1) {\n return choice;\n } else {\n c.printf(\"Your choice is not available! choose another.%n\");\n }\n } catch (NumberFormatException e) {\n c.printf(\n \"Enter a number that corresponds with a menu choice!%n\");\n }\n }\n }", "public int getKeySellMenu() {\r\n return Input.Keys.valueOf(getKeySellMenuName());\r\n }", "@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}", "public static int getMenuOption() {\n Scanner input = new Scanner(System.in);\n\n menuOption = input.next().toLowerCase().charAt(0);\n\n while (menuOption != 'a' && menuOption != 'r' && menuOption != 'f' && menuOption != 'i' && menuOption != 'n' && menuOption != 'q') {\n System.out.print(\"Enter a valid choice: \");\n menuOption = input.next().toLowerCase().charAt(0);\n }\n\n if (menuOption == 'a') {\n return 1;\n } else if (menuOption == 'r') {\n return 2;\n } else if (menuOption == 'f') {\n return 3;\n } else if (menuOption == 'i') {\n return 4;\n } else if (menuOption == 'n') {\n return 5;\n } else {\n return 6;\n }\n }", "void onMenuItemClicked();", "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 }", "private int getSelectedIndex() {\n if (group.getSelectedToggle() == null) {\n return -1;\n }\n return options.indexOf(((RadioButton) group.getSelectedToggle()).getText());\n }", "String getOnAction();", "public int getCommand()\n\t{\n\t\treturn this.command;\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpistaseleccionada = (int) pista.getSelectedItem();\r\n\r\n\t\t\t\t}", "public String getActionInfo() {\n\n String\taction\t= getAction();\n\n if (ACTION_AppsProcess.equals(action)) {\n return \"Process:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_DocumentAction.equals(action)) {\n return \"DocumentAction=\" + getDocAction();\n } else if (ACTION_AppsReport.equals(action)) {\n return \"Report:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_AppsTask.equals(action)) {\n return \"Task:AD_Task_ID=\" + getAD_Task_ID();\n } else if (ACTION_SetVariable.equals(action)) {\n return \"SetVariable:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_SubWorkflow.equals(action)) {\n return \"Workflow:MPC_Order_Workflow_ID=\" + getMPC_Order_Workflow_ID();\n } else if (ACTION_UserChoice.equals(action)) {\n return \"UserChoice:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_UserWorkbench.equals(action)) {\n return \"Workbench:?\";\n } else if (ACTION_UserForm.equals(action)) {\n return \"Form:AD_Form_ID=\" + getAD_Form_ID();\n } else if (ACTION_UserWindow.equals(action)) {\n return \"Window:AD_Window_ID=\" + getAD_Window_ID();\n }\n\n /*\n * else if (ACTION_WaitSleep.equals(action))\n * return \"Sleep:WaitTime=\" + getWaitTime();\n */\n return \"??\";\n\n }", "Menu getMenuHelp();", "public java.lang.Integer getActionFrequency() {\r\n return actionFrequency;\r\n }", "void clickFmFromMenu();", "public Integer getClickNum() {\n return clickNum;\n }", "int promptOption(IMenu menu);" ]
[ "0.70264184", "0.6890855", "0.6801209", "0.67912877", "0.6778439", "0.6757968", "0.67407537", "0.67364943", "0.672892", "0.67219174", "0.6658146", "0.66137075", "0.63145345", "0.6296653", "0.6266927", "0.62519884", "0.6215676", "0.62044704", "0.6186105", "0.6132353", "0.610743", "0.61034125", "0.61034125", "0.59962577", "0.5993441", "0.599019", "0.59839964", "0.5919053", "0.59139913", "0.5911124", "0.59109366", "0.5878861", "0.58751625", "0.5863654", "0.5863073", "0.5842432", "0.584117", "0.584117", "0.584117", "0.58384246", "0.5821832", "0.5813493", "0.58116746", "0.57959706", "0.57936156", "0.57936156", "0.57936156", "0.57936156", "0.57574457", "0.5721009", "0.5718623", "0.5710377", "0.56996465", "0.5686273", "0.56775844", "0.56696475", "0.5668763", "0.5665043", "0.56435406", "0.5636627", "0.5635138", "0.5623563", "0.5597069", "0.55865335", "0.55738634", "0.5573198", "0.5551291", "0.55476904", "0.553991", "0.5539521", "0.5534354", "0.55337965", "0.5527614", "0.5521228", "0.551131", "0.5506162", "0.5489224", "0.54778534", "0.54729414", "0.5468832", "0.54626614", "0.54568315", "0.5455723", "0.54474676", "0.54454255", "0.54442847", "0.54442203", "0.54318285", "0.54317594", "0.5427621", "0.54265", "0.54039645", "0.54025364", "0.5387248", "0.53793186", "0.53781736", "0.53761", "0.5349339", "0.5343282", "0.53382057", "0.5327418" ]
0.0
-1
Gets the index of the npc clicked.
public int getIndex() { return index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getIdx(MouseEvent e) {\n Point p = e.getPoint();\n p.translate(-BORDER_SIZE, -BORDER_SIZE);\n int x = p.x / CELL_SIZE;\n int y = p.y / CELL_SIZE;\n if (0 <= x && x < GUI.SIZE[1] && 0 <= y && y < GUI.SIZE[1]) {\n return GUI.SIZE[1] * x + y;\n } else {\n return -1;\n }\n }", "private int whichButtonClicked( ActionEvent event ) {\n\tfor ( int i = 0; i < NBUTTONS; i++ ) {\n\t if ( event.getSource( ) == button[i] )\n\t\treturn i;\n\t}\n\treturn -1;\n }", "public int getIndex(){\r\n \treturn index;\r\n }", "public int getIndex()\n {\n return m_index;\n }", "int getIndex(){\r\n\t\treturn index;\r\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex(){\n\t\treturn index;\n\t}", "public int getIndex() {\r\n \t\t\treturn index;\r\n \t\t}", "public final int getIndex(){\n return index_;\n }", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public int getIndex() {\r\n return index;\r\n }", "int getMonsterIndex();", "int getMonsterIndex();", "public int getIndex() {\n \t\treturn index;\n \t}", "public int getIndex()\n {\n return index;\n }", "int getIndex() {\n\t\treturn index;\n\t}", "public int getPosition(int index);", "public int getIndex() {\n return index;\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();", "int getSelectedClientIndex();", "public int getIndex()\n {\n return index;\n }", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "public int getIndex() {\r\n\t\treturn index;\r\n\t}", "public int getIndex();", "public int getIndex();", "public int getIndex();", "public int getPosition();", "public Integer getPosition();", "int getParentMonsterIndex();", "public int getIndex() {\n return index;\n }", "public int getAccessibleIndexInParent() {\n return MenuComponent.this.getAccessibleIndexInParent();\n }", "void onClick(int index);", "int index();", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public int getIndex() {\n\t\treturn index;\n\t}", "public static int getSelectedSongIndex() {\n\t\tint x =list.getSelectedIndex();\n\t\treturn x;\n\t}", "public int getIndex() {\r\n return _index;\r\n }", "public int getIndex() {\r\n return _index;\r\n }", "int index(){\n\n\t\t\n\t\tif (cursor == null) \n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn index;\n\t}", "public int getIndex() {\n return mIndex;\n }", "static int getIndexSelected() {\n return indexSelected;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() { return this.index; }", "public int getIndx() {\n return this.indx;\n }", "public int getIndex(\n )\n {return index;}", "int getAccessibleIndexInParent() {\n MenuContainer localParent = parent;\n if (!(localParent instanceof MenuComponent)) {\n // MenuComponents only have accessible index when inside MenuComponents\n return -1;\n }\n MenuComponent localParentMenu = (MenuComponent)localParent;\n return localParentMenu.getAccessibleChildIndex(this);\n }", "@Override\n public void mousePressed(MouseEvent e) {\n idx = getIdx(e);\n }", "public int getIndex() {\n\t\treturn this.mIndex;\n\t}", "public int getIndex() {\n return this.index;\n }", "public int getIndex() {\n return this.index;\n }", "private int getChildIndex(long descendent) {\n long destinationChild = ZQuad.getChildThatsAncestorOf(this.quad, descendent);\n // What is the descendancy of that child relative to this one?\n long descendancy = ZQuad.getDescendancy(destinationChild, 1);\n // The scalar component is what we're looking for.\n return (int) ZQuad.quadToScalar(descendancy, 1);\n }", "public int index();", "@Override\r\n\tpublic int getIndex() {\n\t\treturn index;\r\n\t}", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n return index_;\n }", "public int getIndex() {\n\t\treturn this.index;\n\t}", "public static int currentPlayerIndex() {\n return turn-1;\n }", "public int index() {\n\t\treturn this.index;\n\t}", "int getLeftMonsterIndex();", "int getActivePlayerIndex();", "protected final int getIndex() {\n return index;\n }", "public int getPos(int index) {\r\n return pos[index];\r\n }", "public int getIndex() {\n\t\treturn index & 0xffff;\n\t}", "public int getIndex(int position);", "int getSelectedButton() {\n for (int i = 0; i < buttons.length; i++) {\n if (buttons[i].isSelected()) {\n return (i);\n }\n }\n return (-1);\n }", "public Integer getIndex() {\n return index;\n }", "@Override\n public final int getIndex() {\n return index;\n }", "PACKET getIndex(int index);", "public int cellClicked(Board source, int cellX, int cellY);", "public int getPosition(){\n return -1;\n }", "public int getPositionIndex()\n {\n return positionIndex;\n }", "public int getIdx() {\n return idx;\n }" ]
[ "0.6568724", "0.65466684", "0.6211298", "0.6205042", "0.61609036", "0.6156197", "0.6156197", "0.6156197", "0.6150156", "0.6145599", "0.61355865", "0.61355865", "0.6123881", "0.6113437", "0.6113437", "0.6106709", "0.6104944", "0.61048096", "0.6093437", "0.60835624", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.60693496", "0.6068002", "0.6061459", "0.6052444", "0.60358244", "0.60357034", "0.60357034", "0.60357034", "0.60356027", "0.60350144", "0.6028757", "0.6015033", "0.60138065", "0.60068256", "0.6004556", "0.59656674", "0.59656674", "0.59656674", "0.5957059", "0.5951347", "0.5951347", "0.59490275", "0.59459364", "0.5933488", "0.5929819", "0.5929819", "0.5929819", "0.5929819", "0.5929819", "0.5929819", "0.59188855", "0.59172076", "0.59031266", "0.5901522", "0.58918154", "0.5886191", "0.5886087", "0.5886087", "0.58734035", "0.58722764", "0.58658", "0.5863521", "0.5863521", "0.5863521", "0.5863521", "0.5863521", "0.5863521", "0.5854022", "0.58422524", "0.58136684", "0.58120114", "0.58077323", "0.58069175", "0.5806861", "0.58025485", "0.57846415", "0.5779547", "0.5772394", "0.57316846", "0.57291615", "0.5722133", "0.5720971", "0.5718115", "0.5709397" ]
0.6013212
47
Constructor of the main class. Uses reflection to execute the given commands.
public Main(String[] commandLineArgs) { int claLength = commandLineArgs.length; if (claLength == 0) { help(); } else { command = commandLineArgs[0]; if (claLength >= 2) { arguments = Arrays.asList(commandLineArgs).subList(1, commandLineArgs.length - 1); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Commands(final Main main) {\r\n this.main = main;\r\n main.getCommand(\"fly\").setExecutor(this);\r\n }", "public CommandMAN() {\n super();\n }", "public Command() {\n }", "public CommandManager() {}", "public CommandDirector() {\n\t\t//factory = ApplicationContextFactory.getInstance();\n\t\t//context = factory.getClassPathXmlApplicationContext();\n\t\t\n\t\t//commands.put(\"createEntry\", context.getBean(\"creationEntryCommand\", CreationEntryCommand.class));\n\t\t//commands.put(\"searchEntry\", context.getBean(\"searchingEntryCommand\", SearchingEntryCommand.class));\n\t\t\n\t\tcommands.put(\"createEntry\", new CreationEntryCommand());\n\t\tcommands.put(\"searchEntry\", new SearchingEntryCommand());\n\t\t\n\t}", "private CommandLine() {\n\t}", "public Tree(Console console, String command[]) {\n userFileSystem = console.getFileSystem();\n commandArgument = command;\n }", "private Command() {\n initFields();\n }", "public AbstractCommand()\n {\n this.logger = new ConsoleLogger();\n }", "public void instantiateCommand() throws SystemException {\r\n\t\t// Check the definitation.\r\n\t\tdefinitionCheck();\r\n\t\t\r\n\t\t// Create the fresh instance.\r\n\t\tcommandInstance = new ReadWriteableAttributes();\r\n\t}", "public RemoteControl() {\n onCommands = new ArrayList<Command>(7); // concrete command.Command registers itself with the invoker\n offCommands = new ArrayList<Command>(7);\n\n Command noCommand = new NoCommand(); //Good programming practice to create dummy objects like this\n for (int i = 0;i < 7;i++) {\n onCommands.add(noCommand);\n }\n\n //Initialize the off command objects\n for (int i = 0;i < 7;i++) {\n offCommands.add(noCommand);\n }\n\n undoCommand = noCommand;\n }", "public CommandParser(){\n setLanguage(\"ENGLISH\");\n commandTranslations = getPatterns(new String[] {TRANSLATION});\n commands = new ArrayList<>();\n addErrors();\n }", "private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\n}", "private CommandFactory( ThreadGroup mainThreadGroup ) {\n this.mainThreadGroup = mainThreadGroup;\n \n map = new HashMap<String, String>();\n\n map.put( \"LS\", \"org.ajstark.LinuxShell.Command.LsCommand\" );\n map.put( \"GREP\", \"org.ajstark.LinuxShell.Command.GrepCommand\" );\n map.put( \"PWD\", \"org.ajstark.LinuxShell.Command.PwdCommand\" );\n map.put( \"CD\", \"org.ajstark.LinuxShell.Command.CdCommand\" );\n map.put( \"ENV_VAR\", \"org.ajstark.LinuxShell.Command.SetEnvVarCommand\" );\n map.put( \"ENV\", \"org.ajstark.LinuxShell.Command.EnvCommand\" );\n map.put( \"HISTORY\", \"org.ajstark.LinuxShell.Command.HistoryCommand\" );\n }", "private CommandMapper() {\n }", "public Command() {\r\n\t\t// If default, use a local one.\r\n\t\tmYCommandRegistry = LocalCommandRegistry.getGlobalRegistryStatic();\r\n\t}", "private CommandBrocker() {}", "public Command() {\n this.arguments = new String[0];\n }", "private CommandWord(String commandString)\n {\n this.commandString = commandString;\n }", "@Test\n public void testConstructor() {\n interpreterInstance.interpret(\"cd \");\n Command testCommand = interpreterInstance.getCommand();\n List<String> testArguments = interpreterInstance.getArguments();\n assertEquals(\"driver.ChangeDirectory\", testCommand.getClass().getName());\n assertTrue(testArguments.isEmpty());\n }", "public CLI(String inputCommand)\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = inputCommand;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public CLI()\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = \"\";\r\n\t\t//this.exitStr = exitStr;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public Main() {\n\t\tsuper();\n\t}", "public AbstractCommandController(Class commandClass, String commandName)\r\n/* 21: */ {\r\n/* 22:75 */ setCommandClass(commandClass);\r\n/* 23:76 */ setCommandName(commandName);\r\n/* 24: */ }", "public CommandManager(String path) {\n\n myParser = new TextParser(path);\n myTracker = new VariableTracker();\n preloadCommands();\n\n }", "public CPRCommand()\r\n {\r\n }", "public GetMotorPositionCommand ()\r\n {\r\n }", "public FrameworkCommand(String input, ObjectType init) \n {\n commandString = input.toUpperCase();\n initiator = init;\n\n // todo: verb as first word?\n \n /* This is a crummy timestamp.. We'll hope to do better in subclasses \n using scheduler instances. */\n lTimestamp = System.currentTimeMillis() * 1000;\n }", "public CommandsFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "Commands createCommands();", "public static void main(String[] args) {\n\t\tnew Actions();\r\n\t\t//call constructor\r\n\t}", "public CommandHandler() {\r\n\t\tcommands.put(\"userinfo\", new UserInfoCommand());\r\n\t\tcommands.put(\"verify\", new VerifyCommand());\r\n\t\tcommands.put(\"ping\", new PingCommand());\r\n\t\tcommands.put(\"rapsheet\", new RapsheetCommand());\r\n\t\tcommands.put(\"bet\", new BetCommand());\r\n\t\tcommands.put(\"buttons\", new ButtonCommand());\r\n\r\n\t\t// for each command in commands\r\n\t\t// call getAlternativeName and assign to that key\r\n\t\tcommands.keySet().stream().forEach(key -> {\r\n\t\t\tList<String> alts = commands.get(key).getAlternativeNames();\r\n\t\t\tif (alts != null)\r\n\t\t\t\talts.forEach(a -> commandAlternative.put(a, key));\r\n\t\t});\r\n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "private Visitor createCommand(String[][] cmdTokens)\n {\n Visitor cmd = null;\n\n try {\n String cmdName = Character.toUpperCase(cmdTokens[0][Helpers.CMD].charAt(0)) + cmdTokens[Helpers.CMD][0].substring(1);\n Class<?> aClass = Class.forName(Visitor.class.getPackage().getName() + '.' + cmdName);\n Constructor<?> ctor = aClass.getConstructor(String[].class, User.class, String[].class);\n cmd = (Visitor) ctor.newInstance(cmdTokens[ARGS], currentUser, cmdTokens[FS_ELEMENTS]);\n } catch (Exception ignored) {\n System.out.println(cmdTokens[0][Helpers.CMD] + \": command not found\");\n } finally {\n System.out.println(); // print out a new line after the command runs (or errors)\n }\n\n return cmd;\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public AbstractCommandController(Class commandClass)\r\n/* 16: */ {\r\n/* 17:66 */ setCommandClass(commandClass);\r\n/* 18: */ }", "public static void main(String[] args){\n cmd = args;\r\n init(cmd);\r\n }", "public Main() {\r\n\t}", "PSConsoleCommand(String cmdArgs)\n {\n super();\n m_cmdArgs = cmdArgs;\n }", "private Main() {\n\n super();\n }", "CommandTypes(String command) {\n this.command = command;\n }", "Command(String[] commandArgs) {\n this.commandArgs = commandArgs;\n assert this.commandArgs != null : \"Command with null arguments constructed\";\n }", "public static void main(String[] args) throws Exception{\n\t\tParseTree tree = new ParseTree(new Information(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\", \"Commands\"));\n\t\tFile f = new File(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\");\n\t\tClass[] parameterTypes = new Class[]{URL.class};\n\t\tURL url = (f.toURI()).toURL();\n\t\tURLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n\t\tClass<?> sysclass = URLClassLoader.class;\n\t\tMethod method = sysclass.getDeclaredMethod(\"addURL\", parameterTypes);\n\t\tmethod.setAccessible(true);\n\t\tmethod.invoke(sysloader, new Object[]{ url });\n\t\t\n\t\tClass<?> c = Class.forName(\"Commands\");\n\t\tMethod[] methods = c.getDeclaredMethods();\n\t\t\n\t\tInformation test = new Information(\"C:\\\\Users\\\\Darkras\\\\Documents\\\\CPSC 449\\\\commands.jar\", \"Commands\");\n\t\tList<Integer[]> testList = test.properArguments(\"add\");\n\t\t\n\t\tSystem.out.println(testList);\n\t\t\n\t\t\n\t\tTreeEvaluator e = new TreeEvaluator(test);\n\t\t\n\t\ttree.grow(\"add\",1);\n\t\ttree.grow(\"5\",0);\n\t\ttree.grow(\"5\",0);\n\t\ttree.addReturnTypes();\n\t\tSystem.out.println(tree.isComplete());\n\t\tSystem.out.print(e.evaluate(tree.getRoot()));\n\t}", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "public Shell() {\n commandNumber = 0;\n prevPID = -1;\n command = \"\";\n }", "public NativeExecutable(String command) {\n this.command = command;\n }", "public CommandMAN(String[] arguments) {\n super(arguments);\n }", "public HelpCommand()\n {\n }", "protected void initializeCommands() {\n\t\t\r\n\t\tcommands.add(injector.getInstance(Keys.inputQuestionCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.backCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.helpCommand));\r\n\t\tcommands.add(injector.getInstance(Keys.quitCommand));\r\n\t}", "public Command (int id, String name) {\n if (commands[id] != null) {\n\n } else {\n commands[id] = this;\n this.name = name;\n System.out.println(\"[Command Initialization] Command \" + name + \" successfully initialized with id \"\n + id + \" and allowable arguments:\" /*allowable args will be printed here.*/);\n }\n }", "public CommandFactory() {\n command = new HashMap<>();\n command.put(\"GET/login\", new EmptyCommand());\n command.put(\"POST/login\", new LoginCommand());\n command.put(\"GET/admin\", new ForwardToProfileCommand(Pages.ADMIN_PATH, Pages.USER_PATH));\n command.put(\"GET/user\", new ForwardToProfileCommand(Pages.ADMIN_PATH, Pages.USER_PATH));\n command.put(\"GET/profile\", new ForwardToProfileCommand(Pages.ADMIN_PATH, Pages.USER_PATH));\n command.put(\"POST/ban\", new BanUserCommand());\n command.put(\"POST/changelang\", new ChangeLanguageCommand());\n command.put(\"POST/unban\", new UnbanUserCommand());\n command.put(\"POST/add\", new AddPublicationCommand());\n command.put(\"POST/delete\", new DeletePublicationCommand());\n command.put(\"GET/main\", new ForwardToMainCommand());\n command.put(\"GET/controller/error\", new ForwardToErrorCommand());\n command.put(\"GET/logout\", new LogoutCommand());\n command.put(\"POST/subscribe\", new SubscribeCommand());\n command.put(\"POST/unsubscribe\", new UnsubscribeCommand());\n command.put(\"POST/changename\", new ChangeNameCommand());\n command.put(\"POST/changepassword\", new ChangePasswordCommand());\n command.put(\"POST/adminchangename\", new SetUserNameCommand());\n command.put(\"POST/changebalance\", new SetUserBalanceCommand());\n command.put(\"POST/changepublicationprice\", new SetPublicationPriceCommand());\n command.put(\"POST/changepublicationname\", new SetPublicationNameCommand());\n command.put(\"POST/changepublicationtype\", new SetPublicationTypeCommand());\n command.put(\"GET/admin/publications\", new ForwardToProfileCommand(Pages.PUBLICATIONS_PATH, Pages.USER_PATH));\n command.put(\"GET/user/payments\", new ForwardToProfileCommand(Pages.ADMIN_PATH, Pages.PAYMENTS_PATH));\n command.put(\"GET/admin/users\", new ForwardToProfileCommand(Pages.USERS_PATH, Pages.USERS_PATH));\n command.put(\"POST/login/restore\", new RestorePasswordCommand());\n\n }", "public void execute() {\n\t\ttry {\n\t\t\tMethod method = this.getClass().getMethod(parseMethod(), new Class[0]);\n\t\t\tmethod.invoke(this, new Object[0]);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tSystem.out.println(\"Unknown option: \" + command);\n\t\t} catch (IllegalAccessException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Invalid usage of: \" + command + \", the following error \" + \"was given: \" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\tSystem.out.println(\"An error occurred while executing '\" + command + \"'. The \"\n\t\t\t\t\t+ \"following error was given: \" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Command(String command, int parameterCount) {\n this.command = command;\n this.parameterCount = parameterCount;\n }", "public Trigger(int x, int y, int z, Vector3 size, String RawEvents, TriggerType TType) {\n super(x, y, z, size);\n RawCommands = RawEvents;\n\n ActivationType = TType;\n\n //Parse and then run the script\n String[] Lines = RawCommands.split(\";\");\n for (int i = 0; i < Lines.length; i++) {\n //Replaces all the XML markup chars with real ones, or cuts them for easier parsing later\n Lines[i] = Lines[i].replace(\"&quot;\", \"\");\n Lines[i] = Lines[i].replace(\" \", \"\");\n }\n\n //Max of 10 Args for each command\n Commands = new String[Lines.length][10];\n\n //Populates the Commands array\n for (int i = 0; i < Lines.length; i++) {\n String CommandName = Lines[i].split(\"\\\\(\")[0];\n\n if (CommandName.equals(\"\") || CommandName.equals(\"Null\") || CommandName.equals(\"null\")) {\n Commands[i] = new String[]{CommandName};\n continue;\n }\n\n //System.out.println(CommandName);\n\n String params = \"\";\n\n //Double checks if the Command has parameters\n if (Lines[i].indexOf(\"(\") != -1 && Lines[i].indexOf(\")\") != -1) {\n\n params = Lines[i].substring(\n Lines[i].indexOf(\"(\") + 1,\n Lines[i].indexOf(\")\"));\n\n params = params.replace(\", \", \",\");\n\n }\n\n //System.out.println(params);\n\n\n String[] paramsSplit = params.split(\",\");\n\n String[] temp2 = new String[paramsSplit.length + 1];\n for (int j = 0; j < temp2.length; j++) {\n if (j <= 0) {\n temp2[0] = CommandName;\n } else {\n //IF PARAMS IS EMPTY THEN DONT FILL IT WITH AN EMPTY SCORE\n temp2[j] = paramsSplit[j - 1];\n }\n }\n\n Commands[i] = temp2;\n }\n\n }", "public Commands(){\n this.power = 0;\n this.direction = 0;\n this.started = false;\n this.runTime = new ElapsedTime();\n this.timeGoal = 0;\n }", "private Command getCommand(String s) throws Exception {\n Class c = Class.forName(\"model.command.\" + this.getSymbol(this.getSymbol(s, translations), commandTranslations));\n Constructor ct = c.getConstructor();\n return (Command) ct.newInstance();\n }", "public NativeExecutable(String command, GenerationScript generated) {\n this.command = command;\n this.generated = generated;\n }", "@SuppressWarnings(\"unused\")\n\tprivate AbstractCommand() {\n\t\t//\n\t}", "public Main() {\r\n }", "public Main() {\r\n }", "Command createCommand();", "public void initDefaultCommand() \n {\n }", "@Override\n public Command build() {\n switch (CommandType.fromString(commandName.getEscapedAndStrippedValue())) {\n case ASSIGN:\n return new AssignmentCommand(commandArgs);\n case CAT:\n return new CatCommand(commandArgs);\n case ECHO:\n return new EchoCommand(commandArgs);\n case WC:\n return new WcCommand(commandArgs);\n case PWD:\n return new PwdCommand(commandArgs);\n case GREP:\n return new GrepCommand(commandArgs);\n case EXIT:\n return new ExitCommand(commandArgs);\n default:\n return new OtherCommand(commandName, commandArgs);\n }\n }", "public static void main(String[] args) {\n new DynamicTicTacToe(); // Let the constructor do the job\n }", "public void initDefaultCommand() {\n \tclaw = new DoubleSolenoid(RobotMap.CLAW_PNU_1, RobotMap.CLAW_PNU_2);\n \tpunch = new DoubleSolenoid(RobotMap.PUNCH_PNU_1, RobotMap.PUNCH_PNU_2);\n \t\n \tarm = new VictorSP(RobotMap.ARM_MOTOR);\n \t\n \tarmEncode = new Encoder(RobotMap.ARM_ENCODE_1, RobotMap.ARM_ENCODE_2);\n \t\n \t//armEncode.setPIDSourceType(PIDSourceType.kDisplacement);\n \tarmControl = new PIDController(0.01,0,0, armEncode, arm);\n \t\n }", "public FrameworkCommand(String input, String _verb, ObjectType init) \n {\n this(input, init);\n setVerb(_verb);\n }", "public Main() {\n }", "private void initializeAvailableCommandMap() {\n availableCommandMap = new HashMap<String, Command>();\n availableCommandMap.put(\"cd\", new CdCommand());\n availableCommandMap.put(\"ls\", new LsCommand());\n availableCommandMap.put(\"mkdir\", new MkdirCommand());\n availableCommandMap.put(\"upload\", new UploadCommand());\n availableCommandMap.put(\"download\", new DownloadCommand());\n availableCommandMap.put(\"exit\", new ExitCommand());\n }", "public Command(String[] arguments) {\n this.setArguments(arguments);\n }", "public void initDefaultCommand() {\n \n }", "public Main() {\n }", "public Main() {\n }", "void main(CommandLine cmd);", "protected void initialize() { \n param1 = SmartDashboard.getNumber(\"param1\");\n param2 = SmartDashboard.getNumber(\"param2\");\n param3 = SmartDashboard.getNumber(\"param3\");\n param4 = SmartDashboard.getNumber(\"param4\");\n command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3);\n }", "public RoutingCommandImpl() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand() {\n }", "public void initDefaultCommand()\n {\n }" ]
[ "0.6858387", "0.6838231", "0.6809933", "0.6750254", "0.6602909", "0.65671134", "0.656511", "0.65261245", "0.6516642", "0.6516483", "0.6486852", "0.6482856", "0.64493483", "0.63935715", "0.63662297", "0.6364107", "0.63407695", "0.6338522", "0.6318671", "0.62823236", "0.6248197", "0.624753", "0.6228672", "0.6210466", "0.62095505", "0.62006986", "0.61843574", "0.61756474", "0.61750984", "0.6172347", "0.61702627", "0.6163777", "0.61258036", "0.611618", "0.61016655", "0.6075591", "0.60632855", "0.60529155", "0.60504436", "0.6043919", "0.602907", "0.60243475", "0.60209864", "0.59932804", "0.5992877", "0.5984855", "0.59746194", "0.595667", "0.5956205", "0.59301895", "0.58904403", "0.58567894", "0.5851918", "0.58366334", "0.58332735", "0.58310986", "0.58164597", "0.5814944", "0.5814359", "0.5814359", "0.58053297", "0.57901204", "0.5782867", "0.5778202", "0.577788", "0.5775497", "0.57734555", "0.57652843", "0.5763818", "0.5760226", "0.57525754", "0.57525754", "0.57475394", "0.57470274", "0.57369214", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.5728533", "0.57254964" ]
0.0
-1
Prints the help message.
public void help() { String format = "%-20s%s%n"; String[] commands = new String[5]; commands[0] = "help"; commands[1] = "learn"; commands[2] = "alphabet:create"; commands[3] = "alphabet:destroy"; commands[4] = "alphabet:compose"; String[] explanation = new String[5]; explanation[0] = "display this message"; explanation[1] = "starts a learning process. Note: with a large alphabet, this\ncan take a " + "very long time!"; explanation[2] = "creates an alphabet. Currently only working for Android, the\n" + "creation of an iOS alphabet has to be done more or less manually"; explanation[3] = "deletes an existing alphabet"; explanation[4] = "composes an alphabet from existing window dumps."; for (int i = 0; i < commands.length; i++) { System.out.printf(format, commands[i], explanation[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printHelp();", "public static void printHelp() {\n System.out.println(\"Usage:\");\n System.out.println(\"To create a user, post a message.\");\n System.out.println(\"<user name> [command] | <another user name>\");\n System.out.println(\"<user name> -> message - post a message\");\n System.out.println(\"<user name> - read timeline messages\");\n System.out.println(\"<user name> follows <another user name> - follow another user\");\n System.out.println(\"<user name> wall - display users wall\");\n System.out.println(\"-help - help\");\n System.out.println(\"exit - exit the program\");\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around in a dense woods.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the prision.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(parser.showCommands());\n }", "private void printHelp() \n {\n Logger.Log(\"You have somehow ended up in this strange, magical land. But really you just want to go home.\");\n Logger.Log(\"\");\n Logger.Log(\"Your command words are:\");\n parser.showCommands();\n Logger.Log(\"You may view your inventory or your companions\");\n }", "public void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(\" go quit help\");\n }", "private void printHelp() \n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private void printHelp() {\n System.out.println(\"Your available command words are:\");\n parser.showCommands();\n }", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "@Override\n public void printHelp() {\n\n }", "private void showHelp() {\n System.out.println(\"new: \");\n System.out.println(\"new chess and throw the chess bevor away\");\n System.out.println(\"move from to:\");\n System.out.println(\"take the pawn from position from to position to \");\n System.out.println(\"print:\");\n System.out.println(\"print the chess now \");\n System.out.println(\"help:\");\n System.out.println(\"show help\");\n System.out.println(\"quit:\");\n System.out.println(\"quit out\");\n }", "private void printHelp() {\r\n\t\tSystem.out.println(\"Flag Param Details\");\r\n\t\tSystem.out.println(\" -f **x** Add a filter. 'x' is the board letter.\");\r\n\t\tSystem.out.println(\" Can have 0 or more stars before and after the board letter.\");\r\n\t\tSystem.out.println(\" -h Print this message.\");\r\n\t\tSystem.out.println(\" -q Quit interactive session.\");\r\n\t\tSystem.out.println(\" -n xx Display xx number of words.\");\r\n\t\tSystem.out.println(\" -n all Display all words.\");\r\n\t\tSystem.out.println(\" -r Repeat last search.\");\r\n\t\tSystem.out.println(\" -s len Words are sorted by length.\");\r\n\t\tSystem.out.println(\" -s alpha Words are sorted alphapetically.\");\r\n\t\t// System.out.println(\"\");\r\n\t}", "@Override\n public String showHelp()\n {\n return new String(ChatColour.RED + \"Usage: \" + ChatColour.AQUA + this.getName());\n }", "private void printHelp(Options options) {\n\t\tHelpFormatter formatter = new HelpFormatter();\r\n\t\tString header = \"CLI for Message Counter program\\n\\n\";\r\n\t\tString footer = \"End of the help\\n\";\r\n\t\tformatter.printHelp(\"ChatCounter\", header, options, footer, true);\r\n\t}", "private static void DisplayHelp() {\r\n System.out.println();\r\n System.out.println(\"Usage: Consumes messages from a topic/queue\");\r\n System.out.println();\r\n System.out.println(\" SampleConsumerJava [ < response_file ]\");\r\n System.out.println();\r\n return;\r\n }", "public void printHelp() {\n System.out.println(\". - jeden znak (bez znaku nowej linii)\");\n System.out.println(\".* - zero lub więcej znaków\");\n System.out.println(\"\\\\w* - zero lub więcej słów\");\n }", "public void printHelp() throws IOException {\n\n HelpFormatter hf = new HelpFormatter();\n hf.setShellCommand(m_name);\n hf.setGroup(m_options);\n hf.print();\n }", "public static void printHelpGuide() {\n printDivider();\n System.out.println(\"Help arrives!\\n\");\n printUserGuide();\n printDivider();\n }", "public void showHelp();", "public abstract void printHelp(List<String> args);", "private void help() {\n usage(0);\n }", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "private void help() {\n HelpFormatter formater = new HelpFormatter();\n\n formater.printHelp(\"Main\", options);\n System.exit(0);\n }", "public void help() {\n System.out.println(\"Type 'commands' to list all \" +\n \"available commands\");\n System.out.println(\"Type 'start' to play game\");\n System.out.println(\"Player to remove the last stone loses!\");\n System.out.println();\n }", "private void help() {\n System.out.println(\"PLACE X,Y,F #Placing the robot in (X,Y) facing F. \\n\" +\n \"\\tX and Y are numbers between 0 AND 5, F is NORTH, EAST, WEST, SOUTH directions\\n\" +\n \"MOVE #Move one position towards the current direction\\n\" +\n \"LEFT #Turn left\\n\" +\n \"RIGHT #Turn right\\n\" +\n \"REPORT #Prints current position and the direction\\n\" +\n \"HELP #Help menu\");\n }", "private static void help() {\n\t\tHelpFormatter formater = new HelpFormatter();\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\t}", "public static void printInventoryHelpMessage() {\n\n UI.printEmptyLine();\n System.out.println(\"Here is a list of Inventory commands: \");\n\n UI.printEmptyLine();\n int[] lengthPara = {10,60,50};\n printer(new String[]{HELP_HEADER_COMMAND, HELP_HEADER_DESCRIPTION, HELP_HEADER_FORMAT}, lengthPara);\n UI.showLongLine();\n printer(new String[]{HELP_COMMAND, INVENTORY_HELP_DESCRIPTION, MARK_BLANK}, lengthPara);\n printer(new String[]{ADD_COMMAND, INVENTORY_ADD_DESCRIPTION, INVENTORY_ADD_FORMAT}, lengthPara);\n printer(new String[]{LIST_COMMAND, INVENTORY_LIST_DESCRIPTION, INVENTORY_LIST_FORMAT}, lengthPara);\n printer(new String[]{DELETE_COMMAND, INVENTORY_DELETE_DESCRIPTION, INVENTORY_DELETE_FORMAT}, lengthPara);\n printer(new String[]{RETURN_COMMAND, RETURN_DESCRIPTION, MARK_BLANK}, lengthPara);\n }", "private static void displayHelp(){\n System.out.println(\"1. (R)eport\");\n System.out.println(\"2. (M)inimum Spanning Tree\");\n System.out.println(\"3. (S)hortest Path from i j\");\n System.out.println(\"4. (D)own i j\");\n System.out.println(\"5. (U)p i j\");\n System.out.println(\"6. (C)hange Weight i j x\");\n System.out.println(\"7. (E)ulerian\");\n System.out.println(\"8. (Q)uit\");\n }", "protected void helpPage() {\n \n System.out.println(\"Commands:\");\n System.out.println(\"\\tQ [filename]\\t\\t\\tquit and save to filename\"); \n System.out.println(\"\\t ~ is used for a space character\" ); \n System.out.println(\"\\tb [STRING] [INDEX]\\t\\tinsert [STRING] \" +\n \"before [INDEX]\");\n System.out.println(\"\\tr [START] [STOP]\\t\\tremove all charecters\" +\n \" from index start to stop\");\n System.out.println(\"\\td [CHAR]\\t\\t\\tremove all [CHAR] elements \" +\n \"in the list\");\n System.out.println(\"\\tr [CHAR1] [CHAR2]\\t\\treplace all \" + \n \"[CHAR1]'s with [CHAR2]\");\n System.out.println(\"\\tz\\t\\t\\t\\trandomly run other commands several\" +\n \" times\");\n System.out.println(\"\\tp [INDEX] [CLIPBOARD]\\t\\tpaste from \" +\n \"clipboard number [CLIPBOARD] to message index [INDEX]\");\n System.out.println(\"\\tc [START] [STOP] [CLIPBOARD]\\t\" + \n \"copy message values from index [START] to [STOP] to \" + \n \"clipboard [CLIPBOARD]\");\n System.out.println(\"\\tx [STOP] [START] [CLIPBOARD]\\tcut from \" +\n \"message index [START] to [STOP] to clipboard [CLIPBOARD]\");\n System.out.println(\"\\th\\t\\t\\t\\tmeans to show this help page\");\n }", "public static void help() {\n System.out.println(line(\"*\", 80));\n System.out.println(\"SUPPORTED COMMANDS\");\n System.out.println(\"All commands below are case insensitive\");\n System.out.println();\n System.out.println(\"\\tSELECT * FROM table_name; Display all records in the table.\");\n System.out.println(\"\\tSELECT * FROM table_name WHERE rowid = <value>; Display records whose rowid is <id>.\");\n System.out.println(\"\\tDROP TABLE table_name; Remove table data and its schema.\");\n System.out.println(\"\\tVERSION; Show the program version.\");\n System.out.println(\"\\tHELP; Show this help information\");\n System.out.println(\"\\tEXIT; Exit the program\");\n System.out.println();\n System.out.println();\n System.out.println(line(\"*\", 80));\n }", "public static void displayHelp() {\n\t\thelp = getInstance();\n\t\tUIMain.popUpHelp(commandList, inputCommand);\t\n\t\tLoggingLogic.logging(HELP_MESSAGE);\n\t}", "private String printHelp()//refactored\n { String result = \"\";\n result += \"\\n\";\n result += \"You are weak if you have to ask me\\n\";\n result += \"Try not to die, while i´am mocking you.\\n\";\n result += \"\\n\";\n result += \"\" + currentRoom.getDescription() + \"\\n\"; //new\n result += \"\\nExits: \" + currentRoom.getExitDescription() + \"\\n\";//new\n result += \"\\nCommand words:\\n\";\n result += ValidAction.getValidCommandWords();\n result += \"\\n\";\n \n return result;\n }", "private void showHelp() {\n \tHelpFormatter formatter = new HelpFormatter();\n \tformatter.printHelp( \"java -cp moustache.jar Main\", options );\n }", "public void help();", "private void helpService() {\n output.println(\"Help command\");\n output.println(\"-calc <number> \\t Calculates the value of pi based on <number> points; quit \\t Exit from program \");\n }", "private static void help() {\n HelpFormatter formater = new HelpFormatter();\n formater.printHelp(\"SGD-SVM\", options);\n System.exit(0);\n }", "private static void displayHelp()\r\n {\r\n System.out.println(\"Usage: \");\r\n System.out.println(\"======\");\r\n System.out.println(\"\");\r\n System.out.println(\" -i=<file> : The input file name\");\r\n System.out.println(\" -o=<file> : The output file name\");\r\n System.out.println(\" -e : Write the output as embedded glTF\");\r\n System.out.println(\" -b : Write the output as binary glTF\");\r\n System.out.println(\" -c=<type> : The indices component type. \"\r\n + \"The <type> may be GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT \"\r\n + \"or GL_UNSIGNED_INT. The default is GL_UNSIGNED_SHORT\");\r\n System.out.println(\" -m : Create one mesh per primitive, \"\r\n + \"each attached to its own node.\");\r\n System.out.println(\" -h : Print this message.\");\r\n System.out.println(\" -v=<number> : The target glTF version. \"\r\n + \"The <number> may be 1 or 2. The default is 2.\");\r\n System.out.println(\"\");\r\n System.out.println(\"Example: \");\r\n System.out.println(\"========\");\r\n System.out.println(\"\");\r\n System.out.println(\" ObjToGltf -b -i=C:/Input/Example.obj \" \r\n + \"-o=C:/Output/Example.glb\");\r\n }", "public static void help() {\n\n\t\tSystem.out.println(\"--help--Input format should be as below\" + \n\t\t \"\\njava -jar passgen.jar -l\" + \n\t\t\t\t \"\\n\" +\n\t\t\t\t \"\\njava -jar passgen.jar -l\" + \"\\n(where l= length of password)\" + \n\t\t\t\t \"\\n\");\n\n\t}", "private static void help() {\n System.out.println(\"usage: pgen <project name> <args>\");\n System.out.println(\"Arguments:\");\n System.out.println(\"\\t-h | -help : help menu\");\n System.out.println(\"\\t-s | -size <example file amount> : the amount of example files to create. Defaults to 2\");\n System.out.println(\"\\t-t | -template <template> : the template to use. Defaults to java_default\");\n System.out.println(\"\\t\\tValid Templates:\");\n System.out.println(\"\\t\\t\\t* java_default\");\n System.out.println(\"\\t\\t\\t* cpp_default\");\n System.out.println(\"\\t-kattis : fetches the problems from Kattis and creates a makefile and test script for them\");\n System.out.println(\"\\t-local : fetches nothing and creates empty example files\");\n System.exit(0);\n }", "public static void help() {\n\tSystem.out.println(\"-- Avaible options --\");\n\tSystem.out.println(\"-- [arg]: Required argument\");\n\tSystem.out.println(\"-- {arg}: Optional argument\");\n\tSystem.out.println(\"* -s {file} Save the game into a file\");\n\tSystem.out.println(\"* -r {file} Play or Replay a game from a file\");\n\tSystem.out.println(\"* -a [file] Play a binary file or a game file\");\n\tSystem.out.println(\"* -n [file] Create a random game file\");\n\tSystem.out.println(\"* -t [size] Specify the size of the board\");\n\tSystem.out.println(\"* -k Solve the game with the IA solver\");\n\tSystem.out.println(\"* -m Solve the game with the MinMax/AlphaBeta algorithm\");\n\tSystem.out.println(\"----------------------------------------------\");\n\tSystem.out.println(\". Press Enter to Start or Restart\");\n\tSystem.out.println(\". Press Z to Undo the last move\");\n\tSystem.out.println(\"\");\n }", "public void printUsage() {\n System.out.println(\"\\nHelp Invoked on \");\n System.out.println(\"[-hfs] \");\n System.out.println(\"\");\n\n System.out.println(\"Usage: \");\n System.out.println(\"-d [true|false]\");\n System.out.println(\"-f URL-file-pathame\");\n System.out.println(\"-h: invoke help\");\n System.out.println(\"-i: URL-list-input-source [ DEFAULT | USER | FILE ]\");\n System.out.println(\"-s URL-list-separator\");\n }", "void help();", "private static void printHelp(CmdLineParser parser) {\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\\n\");\n\tparser.printUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }", "public void printHelpCommands(){\r\n\t\t//Construct the help command output\r\n\t\tprintAsTable(\"exit\",\t\t \t\t\t\t\"Exit the program.\");\r\n\t\tprintAsTable(\"help\",\t\t \t\t\t\t\"Print out the usage.\");\r\n\t\tprintAsTable(\"host\",\t\t\t\t\t\t\"Enumerate all hosts.\");\r\n\t\tprintAsTable(\"host hname info\", \t\t\t\"Show info of host name.\");\r\n\t\tprintAsTable(\"host hname datastore\", \t\t\"Enumerate datastores of host hname.\");\r\n\t\tprintAsTable(\"host hname network\", \t\t\t\"Enumerate networks of host hname.\");\r\n\t\tprintAsTable(\"vm\", \t\t\t\t\t\t\t\"Enumerate all virtual machines.\");\r\n\t\tprintAsTable(\"vm vname info\", \t\t\t\t\"Show info of VM vname.\");\r\n\t\tprintAsTable(\"vm vname on\", \t\t\t\t\"Power on VM vname and wait until task completes.\");\r\n\t\tprintAsTable(\"vm vname off\", \t\t\t\t\"Power off VM vname and wait until task completes.\");\r\n\t\tprintAsTable(\"vm vname shutdown\", \t\t\t\"Shutdown guest of VM vname.\");\t\t\t\r\n\t}", "private void print_help_and_exit() {\n System.out.println(\"A bunch of simple directus admin cli commands\");\n System.out.println(\"requires DIRECTUS_API_HOST and DIRECTUS_ADMIN_TOKEN environment variables to be set\");\n System.out.println();\n\n COMMAND_METHODS.values().forEach(c -> {\n for (String desriptionLine : c.descriptionLines) {\n System.out.println(desriptionLine);\n }\n System.out.println();\n });\n\n System.out.println();\n System.exit(-1);\n }", "@Override\n \t\t\t\tpublic void doHelp() {\n \n \t\t\t\t}", "private static void printHelp() {\n getConsole().println(\"Keycheck\\n\" +\n \"\\n\" +\n \"Usage:\\n\" +\n \" keycheck.jar parameter1 parameter2 ... file1 file2 ...\\n\" +\n \"Example:\\n\" +\n \" java -jar keycheck.jar -\" + PARAMETER_BASE + \" -\" + PARAMETER_BITS + \" file1.csv file2.csv\" +\n \"\\n\" +\n \"Parameters:\\n\" +\n \" -\" + PARAMETER_GENERATE + \" [512|1024] Generate \" + GENERATED_KEY_COUNT + \" keys\\n\" +\n \" -\" + PARAMETER_NEW_FORMAT + \" New format will be use to load keys from file\\n\" +\n \" -\" + PARAMETER_TRANSFORM + \" Transform all keys to new format to file 'CARD_ICSN.csv'\\n\" +\n \" -\" + PARAMETER_BASE + \" Check base stats of keys\\n\" +\n \" -\" + PARAMETER_BITS + \" Generate statistics for all bits\\n\" +\n \" -\" + PARAMETER_BYTES + \" Generate statistics for all bytes\\n\" +\n \" -\" + PARAMETER_DIFFERENCE + \" Check primes difference\\n\" +\n \" -\" + PARAMETER_STRENGTH + \" Check primes strength\\n\" +\n \" -\" + PARAMETER_TIME + \" Generate time statistics\\n\" +\n \" -\" + PARAMETER_ALL + \" Generate all statistics and check all tests.\\n\");\n }", "private void help() {\n for (GameMainCommandType commandType : GameMainCommandType.values()) {\n System.out.printf(\"%-12s%s\\n\", commandType.getCommand(), commandType.getInfo());\n }\n System.out.println();\n }", "String getHelpString();", "protected void help() {\n println(\"go - Begin execution at Start or resume execution from current pc location\");\n println(\"go <loc1> - Begin execution at <loc1>\");\n println(\"step - Execute next step\");\n println(\"dump <loc1> <loc2> - Dump memory locations from (including) <loc1> - <loc2>\");\n println(\"dumpr - Dump a table of registers\");\n println(\"exit - Exit debugger\");\n println(\"deas <loc1> <loc2> - Deassmble memory locations from (including) <loc1> - <loc2>\");\n println(\"brkt - List the current break point table\");\n println(\"sbrk <loc1> - Set break point at <loc1>\");\n println(\"cbrk <loc1> - Clear break point at <loc1>\");\n println(\"cbrkt - Clear breakpoint table\");\n println(\"help - Print a summary of debugger commands\");\n println(\"chngr <r#> <value> - Change the value of register <r#> to <value>\");\n println(\"chngm <loc1 <value> - Change the value of memory loaction <loc1> to <value>\");\n }", "private static void printHelp(Options options) {\n HelpFormatter formatter = new HelpFormatter();\n String header = \"Generates the JSON file to send to Drupal.\";\n formatter.printHelp(120, \"drupal-builder\", header, options, \"\", true);\n }", "private void printHelp() {\n TablePrinter helpTableHead = new TablePrinter(\"Command Name : \", \"textconvert\");\n helpTableHead.addRow(\"SYNOPSIS : \", \"textconvert [OPTION]...\");\n helpTableHead.addRow(\"DESCRIPTION : \", \"Convert text/file to Binary, Hexadecimal, Base64.\");\n helpTableHead.print();\n TablePrinter helpTable = new TablePrinter(\"Short Opt\", \"Long Opt\", \"Argument\", \"Desc\", \"Short Option Example\", \"Long Option Example\");\n helpTable.addRow(\"-h\", \"--help\", \"not required\", \"Show this help.\", \"help -h\", \"help --help\");\n helpTable.addRow(\"-f\", \"--file\", \"required\", \"Path to file\", \"textconvert -f /PATH/TO/FILE\", \"textconvert --file /PATH/TO/FILE\");\n helpTable.addRow(\"-ttb\", \"--texttobinary\", \"not required\", \"Convert text to Binary\", \"textconvert -ttb -f /PATH/TO/FILE\", \"textconvert --texttobinary --file /PATH/To/File\");\n helpTable.addRow(\"-btt\", \"--binarytotext\", \"not required\", \"Convert Binary to text\", \"textconvert -btt -f /PATH/To/FileWithBinaryData\", \"textconvert --binarytotext --file /PATH/To/FileWithBinaryData\");\n helpTable.print();\n this.done = true;\n }", "private void printHelp(Options options) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.setWidth(79);\n formatter.setOptionComparator(Comparator.comparingInt(this::getOptionOrder));\n formatter.printHelp(\"protostuff-compiler [options] proto_files\", options);\n }", "public static void help() {\n System.out.println(printLine(\"*\",120));\n System.out.println(\"SUPPORTED COMMANDS\");\n System.out.println(\"All commands below are case insensitive\");\n System.out.println();\n System.out.println(\"\\tSHOW TABLES; Display all tables in the schema.\");\n //System.out.println(\"\\tSELECT table_name FROM kavibase_tables; Display all records in the table.\");\n System.out.println(\"\\tCREATE TABLE table_name (column_name data_type [PRIMARY KEY] [NOT NULL],.); Create a table.\");\n System.out.println(\"\\tINSERT INTO TABLE (column_list) table_name VALUES (value_list); Insert a record into table.\");\n System.out.println(\"\\tDELETE FROM TABLE table_name WHERE row_id=key_value; Delete a record from a table.\");\n System.out.println(\"\\tSELECT * FROM table_name; Display all records in the table.\");\n System.out.println(\"\\tSELECT * FROM table_name WHERE rowid = <value>; Display records whose rowid is <id>.\");\n System.out.println(\"\\tDROP TABLE table_name; Remove table data and its schema.\");\n System.out.println(\"\\tVERSION; Show the program version.\");\n System.out.println(\"\\tHELP; Show this help information\");\n System.out.println(\"\\tEXIT; Exit the program\");\n System.out.println(\"\\tQUIT; Exit the program\");\n System.out.println();\n System.out.println();\n System.out.println(printLine(\"*\",120));\n }", "private static void printHelp(){\r\n System.out.println(\"\\n\\n\\t\\t\\t ----HELP---\\n\\n\" +\r\n \"\\nYou can set the length of password like this \\n\" +\r\n \"\\t java -jar nipunpassgen.jar -l (where l is length of password) \\n\\n\" +\r\n \"\\nYou can also specifiy the which type of word your want to use like this-->\\n\" +\r\n \"\\t Type java -jar nipunpassgen.jar -l -tttt \\n \" +\r\n \"Here 1st t will set uselowercase true \\t 2nd t set useUppercase true\\n\" +\r\n \"\\t 3rd t set useDigit True \\t and 4th t set useSpecial Char true\\n\" +\r\n \"You can use 't' or 'T' for setting the true and 'f' or 'F' for setting the false\\n\" +\r\n \"You can pass -c flag at the end of command for directly copy the password in your\\n\" +\r\n \"clipboard without showing in console like this \\t java -jar nipunpassgen.jar -c \\t this will copy a\\n\" +\r\n \"random 8 digit password in your clipboard .\");\r\n }", "public static void help() {\n System.out.println(\"MENU : \");\n System.out.println(\"Step 1 to create a default character.\"); // create and display a character\n System.out.println(\"Step 2 to display characters.\");\n System.out.println(\"Step 3 to choice a character for list his details. \");\n System.out.println(\"Step 4 to start fight between 2 characters\");\n System.out.println(\"step 5 to remove a character.\");\n System.out.println(\"step 6 to create a Warrior.\");\n System.out.println(\"step 7 to create a Wizard.\");\n System.out.println(\"step 8 to create a Thief.\");\n System.out.println(\"Step 9 to exit the game. \");\n System.out.println(\"Step 0 for help ....\");\n\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "private static void help() {\n System.out.println(\"Supported Command List:\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println(\"To draw canvas press: C <width> <height>\");\n System.out.println(\"To draw rectangle press: R <x1> <y1> <x2> <y2>\");\n System.out.println(\"To draw Line press : L <x1> <y1> <x2> <y2>\");\n System.out.println(\"To fill canvas press : B <x> <y> <c>\");\n System.out.println(\"To quit press: Q\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println();\n }", "private static void printCliHelp(String message) {\n \t\tSystem.out.println(message);\n \t\tHelpFormatter formatter = new HelpFormatter();\n\t\tformatter.printHelp(\"java -jar OsmPbfMetadata.jar\", createOptions());\n \t\tSystem.exit(-1);\n \t}", "public String getHelp();", "private static void help() {\n\t\t\n\t\tTask[] taskList = createTaskList();\n\t\t\n\t\tSystem.out.println(\"\\n---------------------------------[ HELP ]--------\"\n\t\t\t\t+ \"------------------------------\\n\");\n\t\t\n\t\t// Post1 Display help (Polymorphism)\n\t\tfor (Task task : taskList) {\n\t\t\ttask.displayHelp();\n\t\t}\n\t\t\n\t}", "public static void printHelp(Parser parser) {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "public void showHelp() {\n\tString shortFormat = \"%16s -- %-20s %n\";\n\tString longFormat = \"%16s -- %-40s %n\";\n System.out.printf(shortFormat, \"ls\", \"list matched tariffs\");\n System.out.printf(shortFormat, \"ls all\", \"list all tariffs\");\n System.out.printf(shortFormat, \"clear\", \"reset filters\");\n System.out.printf(shortFormat, \"exit\", \"exit the program\");\n System.out.printf(longFormat, \"field min max\",\n \"filter tariffs with field having\"\n + \"value between min and max\");\n System.out.println(\"\\nList of available fields:\\n\");\n filterCommands.stream().forEach(System.out::println);\n }", "public void showHelp(CommandSender sender) {\n\t\t\n\t}", "@Override\n public void help()\n {\n System.out.println(\"\\tcd [DEST]\");\n }", "static void printHelp(String processname)\r\n\t{\n\t\tHelpFormatter formatter = new HelpFormatter();\r\n\t\tformatter.printHelp(processname, options);\r\n\r\n\t\tSystem.exit(0);\r\n\t}", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "@Override\r\n\tprotected String getHelpInfor() {\n\t\treturn \"\";\r\n\t}", "private void printHelp()//Method was given\n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "private void printUsage() {\n \n // new formatter\n HelpFormatter formatter = new HelpFormatter();\n \n // add the text and print\n formatter.printHelp(\"arara [file [--log] [--verbose] [--timeout N] [--language L] | --help | --version]\", commandLineOptions);\n }", "@Override\n public void help() {\n\n }", "public String help() {\n\t\t\treturn \"\\nc-m-n backtracking test game.\\n\"\n\t\t\t\t\t\t\t+ \"Moves are integers in the range 0..\"\n\t\t\t\t\t\t\t+ getMM()\n\t\t\t\t\t\t\t+ \"\\nFind \"\n\t\t\t\t\t\t\t+ getCC()\n\t\t\t\t\t\t\t+ \" numbers that sum to \"\n\t\t\t\t\t\t\t+ getNN()\n\t\t\t\t\t\t\t+ \"\\nIf both or neither succeed, game is a draw. 0 quits.\\n\";\n\t\t}", "public static String helpText() {\n return \"Company options:\\n\"\n + String.format(\"%-80s %s\\n\", \"list\", \"Lists whole company\")\n + String.format(\"%-80s %s\\n\", \"add [first name] [surname] [male|female] [birth date (dd.mm.yyyy)] [position]\", \"Creates new employee\")\n + String.format(\"%-80s %s\\n\", \"delete [id]\", \"Deletes employee with specified id\")\n + String.format(\"%-80s %s\\n\", \"sort --first_name\", \"Sort employees by first name\")\n + String.format(\"%-80s %s\\n\", \"sort --age\", \"Sort employees by age\")\n + String.format(\"%-80s %s\\n\", \"export\", \"Export current state of company to YAML file\")\n + String.format(\"%-80s %s\\n\", \"exit\", \"Exit the program\")\n + String.format(\"%-80s %s\\n\", \"help\", \"Show this help text\");\n }", "private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }", "private static void printHelp(final Options options) {\n\t\tHelpFormatter formatter = new HelpFormatter();\n\t\tformatter.printHelp(\"lsc\", options);\n\t}", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "private static void help() {\n\t\tSystem.out.println(\"\\n----------------------------------\");\n\t\tSystem.out.println(\"---Regatta Calculator Commands----\");\n\t\tSystem.out.println(\"----------------------------------\");\n\t\tSystem.out.println(\"addtype -- Adds a boat type and handicap to file. Format: name:lowHandicap:highHandicap\");\n\t\tSystem.out.println(\"format -- Provides a sample format for how input files should be arranged.\");\n\t\tSystem.out.println(\"help -- Lists every command that can be used to process regattas.\");\n\t\tSystem.out.println(\"podium -- Lists the results of the regatta, assuming one has been processed.\");\n\t\tSystem.out.println(\"regatta [inputfile] -- Accepts an input file as a parameter, this processes the regatta results outlined in the file.\");\n\t\tSystem.out.println(\"types -- lists every available boat type.\");\n\t\tSystem.out.println(\"write [outputfile] -- Takes the results of the regatta and writes them to the file passed as a parameter.\");\n\t\tSystem.out.println(\"----------------------------------\\n\");\n\t}", "String getHelpText();", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "public String getHelp() {\r\n String res = \"You can use the following commands:\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"north\\\" to go towards the north\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"south\\\" to go towards the south\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"east\\\" to go towards the south\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"west\\\" to go towards the south\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"attack\\\" to attack a monster\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"look\\\" to look around in the room\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"search\\\" to search the room for treasure\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"use\\\" to use somthing in your inventory\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"gear\\\" to see what gear you got equipped\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"inventory\\\" to see what gear you have in your inventory\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"savegame\\\" to save your progress\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"stop\\\" to quit the game.\" + System.lineSeparator();\r\n return res;\r\n }", "public static void printHelp(String helpDisplay) {\n printMessage(helpDisplay);\n }", "public String showHelp() {\r\n return ctrlDomain.getHidatoDescription();\r\n }", "private void doHelp()\r\n {\r\n Help.showHelp(page, ref, null);\r\n }", "public String showHelp() {\n String helpMessage = \"I don't know nothin' about other commands but \"\n + \"here are the list of commands I understand!\\n\"\n + \"help: displays the list of commands available\\n\"\n + \"\\n\"\n + \"list: displays the list of tasks you have\\n\"\n + \"\\n\"\n + \"find *keyword*: displays the tasks with that keyword\\n\"\n + \"eg find karate\\n\"\n + \"\\n\"\n + \"todo *task description*: adds a task without any\\n\"\n + \"date/time attached to it\\n\" + \"eg todo scold spongebob\\n\"\n + \"\\n\"\n + \"deadline *task description* /by *date+time*: adds a\\n\"\n + \"task that needs to be done before a specific date and time\\n\"\n + \"(date and time to be written in yyyy-mm-dd HHMM format)\\n\"\n + \"eg deadline build spaceship /by 2019-10-15 2359\\n\"\n + \"\\n\"\n + \"event *task description* /at *date+time*: adds a task that\\n\"\n + \"starts at a specific time and ends at a specific time\\n\"\n + \"(date and time to be written in yyyy-mm-dd HHMM format)\\n\"\n + \"eg event karate competition /at 2019-10-15 1200\\n\"\n + \"\\n\"\n + \"done *task number*: marks the task with that number as done\\n\"\n + \"eg done 1\\n\"\n + \"\\n\"\n + \"delete *task number*: deletes the task with that number from the list\\n\"\n + \"eg delete 1\\n\"\n + \"\\n\"\n + \"update *task number* /name *task name*: updates the name of the task with \"\n + \"that number from the list\\n\" + \"update 1 /name help spongebob\\n\"\n + \"\\n\"\n + \"update *task number* /date *task date*: (only for deadline or event tasks!) \"\n + \"updates the date and time of the task with that number from the list\\n\"\n + \"update 1 /date 2020-02-20 1200\\n\"\n + \"\\n\"\n + \"bye: ends the session\";\n return helpMessage;\n }", "private static void printUsage()\n {\n HelpFormatter hf = new HelpFormatter();\n String header = String.format(\n \"%nAvailable commands: ring, cluster, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, bootstrap\");\n String usage = String.format(\"java %s -host <arg> <command>%n\", NodeProbe.class.getName());\n hf.printHelp(usage, \"\", options, header);\n }", "public String help() {\r\n\t\t\tif(this.inBattle()) {\r\n\t\t\t\treturn \"You can use the commands [attack] and [escape] while in battle.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You can use the commands: \\n\" + this.getPlayer().getPlayerCommands().keySet().toString() + \".\";\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic String textHelp() {\n\t\treturn \" HELP: Muestra esta ayuda.\"+\n\t\t\t\tSystem.getProperty(\"line.separator\");\n\t}", "public static void help(){\n System.out.println(\"myRepositories USERNAME | --help\\n\");\n\n System.out.println(\"\\'myReposities\\' returns a list of repositories based on username\\n\");\n\n System.out.println(\"Version\\t: 1.0.0\");\n System.out.println(\"Author\\t: Miguel Menjivar\");\n System.out.println(\"Contact\\t: mamenjivar@cpp.edu\");\n\n }", "private static void doHelp() {\r\n\t\tdoUsage();\r\n\t\tSystem.out.println(\"\\n\" + \"When passed a dictionary and a document, spell check the document. Optionally,\\n\"\r\n\t\t\t\t+ \"the switch -n toggles non-interactive mode; by default, the tool operates in\\n\"\r\n\t\t\t\t+ \"interactive mode. Interactive mode will write the corrected document to disk,\\n\"\r\n\t\t\t\t+ \"backing up the uncorrected document by concatenating a tilde onto its name.\\n\\n\"\r\n\t\t\t\t+ \"The optional -d switch with a dictionary parameter enters dictionary edit mode.\\n\"\r\n\t\t\t\t+ \"Dictionary edit mode allows the user to query and update a dictionary. Upon\\n\"\r\n\t\t\t\t+ \"completion, the updated dictionary is written to disk, while the original is\\n\"\r\n\t\t\t\t+ \"backed up by concatenating a tilde onto its name.\\n\\n\"\r\n\t\t\t\t+ \"The switch -h displays this help and exits.\");\r\n\t\tSystem.exit(0);\r\n\t}", "private static void printUsage()\n {\n StringBuilder usage = new StringBuilder();\n usage.append(String.format(\"semantika %s [OPTIONS...]\\n\", Environment.QUERYANSWER_OP));\n usage.append(\" (to execute query answer)\\n\");\n usage.append(String.format(\" semantika %s [OPTIONS...]\\n\", Environment.MATERIALIZE_OP));\n usage.append(\" (to execute RDB2RDF export)\");\n String header = \"where OPTIONS include:\"; //$NON-NLS-1$\n String footer =\n \"\\nExample:\\n\" + //$NON-NLS-1$\n \" ./semantika queryanswer -c application.cfg.xml -l 100 -sparql 'SELECT ?x WHERE { ?x a :Person }'\\n\" + //$NON-NLS-1$\n \" ./semantika rdb2rdf -c application.cfg.xml -o output.n3 -f N3\"; //$NON-NLS-1$\n mFormatter.setOptionComparator(null);\n mFormatter.printHelp(400, usage.toString(), header, sOptions, footer);\n }", "private static void help(Options options) {\n\t\tHelpFormatter formater = new HelpFormatter();\n\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\n\t}", "static void showHelp(int exitCode)\n {\n System.err.println(\"Usage: SsmController [-b <basedir>] [-c <config_file>] [-h]\\n\");\n System.err.println(\" -b The name of the base directory. Defaults to:\");\n System.err.println(\" /var/opt/totality/mgmt_sv/current/solaris\\n\");\n System.err.println(\" -c The name of the configuration file relative to the\");\n System.err.println(\" base directory. Defaults to: etc/SsmController.cfg\\n\");\n System.exit(exitCode);\n }", "private static void dealwithelp() {\r\n\t\tSystem.out.println(\"1 ) myip - to see your ip address.\");\r\n\t\tSystem.out.println(\"2 ) myport - to see your port number.\");\r\n\t\tSystem.out.println(\"3 ) connect <ip> <port> - connect to peer.\");\r\n\t\tSystem.out.println(\"4 ) list Command - list all the connected peer/peers.\");\r\n\t\tSystem.out.println(\"5 ) send <id> - to send message to peer.\");\r\n\t\tSystem.out.println(\"6 ) terminate <id> - terminate the connection\");\r\n\t\tSystem.out.println(\"7 ) exit - exit the program.\");\r\n\t}", "public void printUsage() {\n printUsage(System.out);\n }", "protected String getHelp() {\r\n return UIManager.getInstance().localize(\"renderingHelp\", \"Help description\");\r\n }", "@Override\n public String getHelp() {\n return name;\n }", "private static void help(){\n\t\tSystem.out.println(\"\\t\\tAge\\n\\tby Sayan Ghosh\\n\\n\"+\n\t\t\t\t\t\t\t\"Calculates Age of Person from Date of Birth (DD MM YYYY).\\n\"+\n\t\t\t\t\t\t\t\"Shows age in two forms:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years, months, days\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years (as fraction)\\n\"+\n\t\t\t\t\t\t\t\"Syntax:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age\\t\\t\\truns program and takes input\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age <dd mm yyyy>\\t\\tdirectly shows result taking dob as parameters\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age --help\\t\\t\\tshows this help\\n\");\n\t}", "private static void printUsage(){\n\t\tprintLine(USAGE_STRING);\n\t}", "private static void doUsage() {\r\n\t\tSystem.out.println(\"Usage: SpellChecker [-i] <dictionary> <document>\\n\"\r\n\t\t\t\t+ \" -d <dictionary>\\n\" + \" -h\");\r\n\t}" ]
[ "0.84718895", "0.81941885", "0.8131552", "0.81229603", "0.8092893", "0.807143", "0.80704254", "0.80296975", "0.8001275", "0.80004406", "0.79533005", "0.78552777", "0.7843692", "0.7813031", "0.7796421", "0.77778035", "0.7776941", "0.77610356", "0.7757024", "0.7713221", "0.7709343", "0.7692741", "0.7687359", "0.7666134", "0.76596516", "0.764408", "0.76089954", "0.75981975", "0.75893354", "0.75774014", "0.75722134", "0.7567252", "0.75533384", "0.75511074", "0.75361735", "0.7527986", "0.7521518", "0.75083566", "0.75053966", "0.7480769", "0.7460135", "0.7459481", "0.74562204", "0.74556863", "0.7448764", "0.74442244", "0.7437445", "0.74331594", "0.7417485", "0.7403946", "0.7353503", "0.7349373", "0.734937", "0.7346816", "0.73452675", "0.7344576", "0.73415256", "0.73134476", "0.73105645", "0.73044854", "0.7290242", "0.7282156", "0.7277878", "0.7265552", "0.72350895", "0.7211337", "0.72075194", "0.72073966", "0.7204273", "0.7195484", "0.7177365", "0.71541107", "0.7140867", "0.71295124", "0.7115682", "0.7106319", "0.7096645", "0.70802945", "0.70417434", "0.7041013", "0.70337445", "0.7031763", "0.70095146", "0.6999333", "0.6978751", "0.6968154", "0.6952362", "0.6951334", "0.69370294", "0.6932897", "0.6923367", "0.6907829", "0.69057864", "0.6899903", "0.6898804", "0.689732", "0.6885465", "0.6879462", "0.6871736", "0.6868128" ]
0.80162823
8
Starts a learning process.
public void learn() throws FileNotFoundException { printConfig(); askConfirm("Are these your settings (y/n)?"); System.out.println("Start Learning Process"); FsmLearner learner = new FsmLearner(); try { learner.setUpLearner(); } catch (FileNotFoundException fnfe) { System.out.println("The alphabet as specified in the config file was not found. Please check " + "if the alphabet exists. If not, use 'alphabet:create' (for Android) to create a new " + "one."); } boolean learning_done = false; while (!learning_done) { try { learner.runExperiment(); learning_done = true; } catch (ConflictException ce) { System.out.println("ConflictException"); learner.instantiateSulsReset(); ce.printStackTrace(); // learner.setUpLearner(); } catch (Exception e) { System.out.println("Something unforseen happened while learning\nPrinting StackTrace:"); e.printStackTrace(); learning_done = true; } } try { learner.printResults(); } catch (IOException e) { System.out.println("An error occurred while printing the results."); e.printStackTrace(); } learner.stopExperiment(); System.out.println("Query Cache Statistics:"); System.out.println(learner.sul.getSum()); System.out.println(learner.sul.getNum()); System.out.println("Finished Learning, doing the postresults"); // this.postLearning(learner, em.getInstrumentator()); System.out.println("Results are in: " + learner.getStamp()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startTrainingMode() {\n\t\t\r\n\t}", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void start() {\n\tanimator = new Thread(this);\n\tanimator.setName(\"erly_boid:::swarm intelligence\");\n\terlang =new Thread(co);\n\terlang.start();\n\tanimator.start();\n \n \n \t\n }", "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 }", "static void startJavaTrainer() {\n initializeMap();\n promptUser();\n startProgram();\n }", "public void train ()\t{\t}", "Sample start();", "public void startTraining(View view) {\n Intent intent = new Intent(this, trainingStarterActivity.class);\n startActivity(intent);\n }", "public void start()\n\t{\n\t\tloopy();\n\t}", "void launch();", "void launch();", "void launch();", "protected LearningAbstractAgent(){}", "public void start() {}", "public void start() {}", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}", "public IObserver train(IContext context) throws ThinklabException;", "public void train(){\n recoApp.training(idsToTest);\n }", "public void train() throws Exception;", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "public void start()\n {\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();", "public static void start(LinearOpMode opMode) {\n }", "public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}", "private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}", "public void start() {\n }", "public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}", "abstract public void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();", "private void train(NeuralDataSet input) {\n\n\tfinal NeuralDataSet theInput = input;\n\tfinal VirtualLibraryButler that = this;\n\n\ttraining = new Thread() {\n\t public void run() {\n\n\t\torg.encog.util.logging.Logging.setConsoleLevel(Level.OFF);\n\n\t\tfinal Train train = new CompetitiveTraining(brain, 0.7,\n\t\t\ttheInput, new NeighborhoodGaussian(\n\t\t\t\tnew GaussianFunction(0.0, 5.0, 1.5)));\n\t\tStrategy smartLearn = new SmartLearningRate();\n\n\t\tsmartLearn.init(train);\n\t\ttrain.addStrategy(smartLearn);\n\n\t\tint epoch = 0;\n\t\tint errorSize = 250;\n\n\t\tdouble[] lastErrors = new double[errorSize];\n\n\t\t// training loop\n\t\tdo {\n\t\t train.iteration();\n\t\t // System.out.println(\"Epoch #\" + epoch + \" Error:\" +\n\t\t // train.getError()); // + \" MovingAvg:\" + movingAvg);\n\t\t lastErrors[epoch % errorSize] = train.getError();\n\n\t\t double avg = 0;\n\t\t for (int i = 0; (i < epoch) && (i < errorSize); ++i)\n\t\t\tavg = (avg * i + lastErrors[i]) / (i + 1);\n\n\t\t if (Math.abs(avg - train.getError()) < 0.01)\n\t\t\ttrain.setError(0.001);\n\n\t\t epoch++;\n\t\t} while (train.getError() > 0.01);\n\n\t\t// System.out.println(\"training complete.\");\n\n\t\tthat.initialized = true;\n\t }\n\t};\n\n\ttraining.start();\n }", "protected void startProcess() {\n System.out.println(\"Process started\");\r\n }", "public void start()\n {}", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void start() {\n\n\t}", "public void startProcess() {\r\n\t\tprocess = true;\r\n\t}", "void start ();", "public MyNLP()\n\t{\n\t\t//create StanfordNLP\n\t\tsnlp = new StanfordNLP();\n\t\t//create Recognizer\n\t\trec = new MyRecognizer();\n\t\t//build recognizers\n\t\trec.build();\n\t\t//create SentimentalAnalysis\n\t\tsa = new SentimentalAnalysis();\n\t}", "private void trainLexicon() throws Exception\n\t{\n\t\tSystem.out.println(\"Starting reading Lexicon Training set ..\");\n\t\tInstanceList lexicon_instance = dbiterator.getInstancesFromAlphabets(DBInstanceIterator.DBSource.LEXICON);\n\t\tSystem.out.println(\"Lexicon Training set : \" + lexicon_instance.size());\n\t\t/*svm_parameter param = new svm_parameter();\n\t\tparam.gamma = 0.0;\n\t\tparam.C = 100.0;*/\n\t\tSVMClassifierTrainer trainer = new SVMClassifierTrainer(new LinearKernel(), true);\n\t\tSystem.out.println(\"SVM Starts Training on lexicon training set ..\");\n\t\tSVMClassifier classifier = trainer.train(lexicon_instance);\n\t\tSystem.out.println(\"Saving SVM Classifier ..\");\n\t\tSystem.out.println(lexicon_instance.targetLabelDistribution());\n\t\tsaveModel(classifier, Lexicon_Train);\n\t\tSystem.out.println(\"Lexicon classifier saved to : \" + Lexicon_Train);\n\t}", "public void start() {\n\t\tthis.controller.run();\n\t}", "private void start() {\n\n\t}", "public void start() {\n\n }", "public void start() throws IOException;", "public void start() {\n\t\tai = new Thread(this);\n\t\tai.start();\n\t}", "public void start() {\n logger.info(\"LeaderSelector start racing for leadership\");\n leaderElection();\n }", "public void start() {\n process(0);\n }", "public boolean isOnlineLearningSupported();", "private void trainFeatures() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.FEATURE);\n\t\tSystem.out.println(\"Starting reading Feature Trainingset ..\");\n\t\tPipe serialpipe = getFeaturePipe();\n\t\tInstanceList feature_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Feature Trainingset ..\");\n\t\tfeature_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Feature Training set : \" + feature_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(feature_instances, Train + \"F.bin\");\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\tfeature_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"feature.dat\")));\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Feature training set ..\");\n\t\tClassifier classifier = trainer.train(feature_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Feature_Train);\n\t\tSystem.out.println(\"Feature classifier saved to : \" + Feature_Train);\n\t}", "public void start() {\r\n try {\r\n // Using command line args instead \r\n // System.setProperty(\"org.lwjgl.librarypath\", new File(\"lib/lwjgl-2.9.2/native/windows\").getAbsolutePath());\r\n createWindow();\r\n initGL();\r\n render();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public TestLearningAPI(String arg0) throws GateException,\n MalformedURLException {\n super(arg0);\n if(!initialized) {\n Gate.init();\n learningHome = new File(new File(Gate.getGateHome(), \"plugins\"),\n \"Learning\");\n Gate.getCreoleRegister().addDirectory(learningHome.toURI().toURL());\n initialized = true;\n }\n }", "public void start() {\n\t\tSystem.out.println(\"BMW.........start!!!.\");\n\t}", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "public void starting();", "public void launch(){\n try{\n System.out.println(\"Main: Creando agentes\");\n \tmap = visualizer.getMapToLoad();\n \tsatelite = new Satelite(id_satelite, map, visualizer);\n \tdrone = new Drone(new AgentID(\"Drone\"), map.getWidth(), map.getHeigh(), id_satelite);\n \tSystem.out.println(\"MAIN : Iniciando agentes...\");\n \tvisualizer.setSatelite(satelite);\n satelite.start();\n drone.start();\n }catch(Exception e){\n \tSystem.err.println(\"Main: Error al crear los agentes\");\n System.exit(-1);\n }\n\t}", "public static void main(String [] argv) {\n runClassifier(new NNge(), argv);\n }", "@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}", "public static void main(String [] args) throws IOException {\n if (args.length != 2) {\n System.out.println(\"Not enough arguments\");\n return;\n }\n\n // Load the System Under Learning (SUL)\n SUL<String,String> sul = new ProcessSUL(args[1]);\n\n\n // the input alphabet\n Collection<String> inputAlphabet = Arrays.asList(args[0].split(\",\"));\n\n // runControlledExperiment for detailed statistics, runSimpleExperiment for just the result\n //BasicLearner.runControlledExperiment(sul, BasicLearner.LearningMethod.TTT, BasicLearner.TestingMethod.RandomWalk, inputAlphabet);\n BasicLearner.runControlledExperiment(sul, BasicLearner.LearningMethod.TTT, BasicLearner.TestingMethod.WpMethod, inputAlphabet);\n }", "public static void main(String argv[]) throws Exception {\n\t\tServerSocketHandler evaluatingServer = new ServerSocketHandler(PORT+1);\n\t\tEvaluator evaluator = new Evaluator(evaluatingServer);\n\t\tevaluatingServer.setController(evaluator);\n\t\tDataRepo evaluatingData = new DataRepo(evaluator);\n\t\tevaluator.setData(evaluatingData);\n\n\t\t//initialize trainer with training server with socket\n\t\tServerSocketHandler trainingServer = new ServerSocketHandler(PORT);\n\t\tTrainer trainer = new Trainer(trainingServer,evaluator);\n\t\ttrainingServer.setController(trainer);\n\t\tDataRepo trainingData = new DataRepo(trainer);\n\t\ttrainer.setData(trainingData);\n\t\t\n\t\t//create connection handlers for each of the servers\n\t\tConnectionHandler trainingConnectionHandler = new ConnectionHandler(trainingServer, trainingData);\n\t\tConnectionHandler evaluatingConnectionHandler = new ConnectionHandler(evaluatingServer, evaluatingData);\n\n\t\t//start training and evaluating\n\t\tnew Thread(trainer).start();\n\t\tnew Thread(evaluator).start();\n\t\tnew Thread(trainingConnectionHandler).start();\n\t\tnew Thread(evaluatingConnectionHandler).start();\n\t}", "public void startup() {\n\t\tstart();\n }", "public void start() throws Exception;", "public void startExperiment() {\n Runnable starter = new Runnable() {\n public void run() {\n manualAdvance = control.isManualControl();\n setStartPeriodButtonEnabled(manualAdvance);\n setSwitchStatus();\n \n control.startExperiment();\n }\n };\n \n Thread stThread = new Thread(starter);\n stThread.start();\n }", "public void start(){\n }", "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 runExperiment() {\n\t\tevaluator = new Evaluator(trainingSet);\n\t\tevaluator.evaluateClassifiers(classifiers);\n\t}", "public boolean start();", "public void start() {\n\t\tpcmList = Collections.synchronizedList(new LinkedList<PCMData>());\n\t\tencodedlist = Collections\n\t\t\t\t.synchronizedList(new LinkedList<EncodedData>());\n\t\taudioRecordThread = new AudioRecordThread(this);\n\t\taudioSpeexEncoderThread = new AudioSpeexEncoderThread(this);\n\t\tflvWriterThread = new AudioFlvWriterThread(this);\n\t\taudioRecordThread.start();\n\t\taudioSpeexEncoderThread.start();\n\t\tflvWriterThread.start();\n\t}", "public void start( )\n {\n // Implemented by student.\n }", "protected void startBatch() {\n \n }", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "public void start()\n throws IOException\n {\n }" ]
[ "0.66956925", "0.65647113", "0.6550629", "0.6531346", "0.62905264", "0.5963445", "0.5949611", "0.5929594", "0.5904146", "0.5814703", "0.5814703", "0.5814703", "0.57818186", "0.57615197", "0.57615197", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.5705065", "0.56871253", "0.56660664", "0.56585926", "0.56583333", "0.56354177", "0.5629952", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56286114", "0.56063807", "0.5605618", "0.56017584", "0.5572437", "0.55507267", "0.55496615", "0.55402875", "0.55402875", "0.55402875", "0.55402875", "0.55402875", "0.553989", "0.55385923", "0.55361867", "0.55302346", "0.55302346", "0.5529503", "0.5529211", "0.55191946", "0.5504052", "0.55015236", "0.5499246", "0.5488369", "0.54847", "0.54830796", "0.5460524", "0.5457149", "0.54463214", "0.54357827", "0.5416426", "0.5415229", "0.5393076", "0.5390784", "0.5387795", "0.53876483", "0.53811455", "0.5376872", "0.53750664", "0.53715175", "0.53673506", "0.5364152", "0.5358514", "0.5358469", "0.53543913", "0.53353775", "0.5329913", "0.5326276", "0.53132886", "0.53064835", "0.53028", "0.5298254", "0.5297845" ]
0.64919573
4
/ This method performs the vulnerability identification part. Automatically executed by the learn() method. When starting to learn DFAs (i.e. setting up the project) enable this method at the very end.
private void postLearning(FsmLearner learner, AndroidEmulatorInstrumentator aei) { Emulator em = new Emulator("Nexus5X"); // Make sure you have setup a correct emulator em.start(); apkConstruct(); // fills apkinfo ResultProcessor rp = new ResultProcessor(learner.getStamp(), aei, this.apkInfo); rp.run(); rp.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void coreTraining() {\n\t\tSystem.out.println(\"加强进攻意识练习\");\n\t}", "private void analyzeApplication() throws InterruptedException {\n int passCount = 0;\n Profiler profiler = bugReporter.getProjectStats().getProfiler();\n profiler.start(this.getClass());\n AnalysisContext.currentXFactory().canonicalizeAll();\n try {\n boolean multiplePasses = executionPlan.getNumPasses() > 1;\n if (executionPlan.getNumPasses() == 0) {\n throw new AssertionError(\"no analysis passes\");\n }\n int[] classesPerPass = new int[executionPlan.getNumPasses()];\n classesPerPass[0] = referencedClassSet.size();\n for (int i = 0; i < classesPerPass.length; i++) {\n classesPerPass[i] = i == 0 ? referencedClassSet.size() : appClassList.size();\n }\n progress.predictPassCount(classesPerPass);\n XFactory factory = AnalysisContext.currentXFactory();\n Collection<ClassDescriptor> badClasses = new LinkedList<ClassDescriptor>();\n for (ClassDescriptor desc : referencedClassSet) {\n try {\n XClass info = Global.getAnalysisCache().getClassAnalysis(XClass.class, desc);\n factory.intern(info);\n } catch (CheckedAnalysisException e) {\n AnalysisContext.logError(\"Couldn't get class info for \" + desc, e);\n badClasses.add(desc);\n } catch (RuntimeException e) {\n AnalysisContext.logError(\"Couldn't get class info for \" + desc, e);\n badClasses.add(desc);\n }\n }\n\n referencedClassSet.removeAll(badClasses);\n long startTime = System.currentTimeMillis();\n bugReporter.getProjectStats().setReferencedClasses(referencedClassSet.size());\n for (Iterator<AnalysisPass> passIterator = executionPlan.passIterator(); passIterator.hasNext();) {\n AnalysisPass pass = passIterator.next();\n yourkitController.advanceGeneration(\"Pass \" + passCount);\n // The first pass is generally a non-reporting pass which\n // gathers information about referenced classes.\n boolean isNonReportingFirstPass = multiplePasses && passCount == 0;\n\n // Instantiate the detectors\n Detector2[] detectorList = pass.instantiateDetector2sInPass(bugReporter);\n\n // If there are multiple passes, then on the first pass,\n // we apply detectors to all classes referenced by the\n // application classes.\n // On subsequent passes, we apply detector only to application\n // classes.\n Collection<ClassDescriptor> classCollection = (isNonReportingFirstPass) ? referencedClassSet : appClassList;\n AnalysisContext.currentXFactory().canonicalizeAll();\n if (PROGRESS || LIST_ORDER) {\n System.out.printf(\"%6d : Pass %d: %d classes%n\", (System.currentTimeMillis() - startTime)/1000, passCount, classCollection.size());\n if (DEBUG)\n XFactory.profile();\n }\n if (!isNonReportingFirstPass) {\n OutEdges<ClassDescriptor> outEdges = new OutEdges<ClassDescriptor>() {\n\n public Collection<ClassDescriptor> getOutEdges(ClassDescriptor e) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, e);\n if (classNameAndInfo instanceof ClassNameAndSuperclassInfo) {\n return ((ClassNameAndSuperclassInfo) classNameAndInfo).getCalledClassDescriptorList();\n }\n assert false;\n return Collections.emptyList();\n } catch (CheckedAnalysisException e2) {\n AnalysisContext.logError(\"error while analyzing \" + e.getClassName(), e2);\n return Collections.emptyList();\n\n }\n }\n };\n\n classCollection = sortByCallGraph(classCollection, outEdges);\n }\n if (LIST_ORDER) {\n System.out.println(\"Analysis order:\");\n for (ClassDescriptor c : classCollection) {\n System.out.println(\" \" + c);\n }\n }\n AnalysisContext.currentAnalysisContext().updateDatabases(passCount);\n\n progress.startAnalysis(classCollection.size());\n int count = 0;\n Global.getAnalysisCache().purgeAllMethodAnalysis();\n Global.getAnalysisCache().purgeClassAnalysis(FBClassReader.class);\n for (ClassDescriptor classDescriptor : classCollection) {\n long classStartNanoTime = 0;\n if (PROGRESS) {\n classStartNanoTime = System.nanoTime();\n System.out.printf(\"%6d %d/%d %d/%d %s%n\", (System.currentTimeMillis() - startTime)/1000,\n passCount, executionPlan.getNumPasses(), count,\n classCollection.size(), classDescriptor);\n }\n count++;\n\n // Check to see if class is excluded by the class screener.\n // In general, we do not want to screen classes from the\n // first pass, even if they would otherwise be excluded.\n if ((SCREEN_FIRST_PASS_CLASSES || !isNonReportingFirstPass)\n && !classScreener.matches(classDescriptor.toResourceName())) {\n if (DEBUG) {\n System.out.println(\"*** Excluded by class screener\");\n }\n continue;\n }\n boolean isHuge = AnalysisContext.currentAnalysisContext().isTooBig(classDescriptor);\n if (isHuge && AnalysisContext.currentAnalysisContext().isApplicationClass(classDescriptor)) {\n bugReporter.reportBug(new BugInstance(\"SKIPPED_CLASS_TOO_BIG\", Priorities.NORMAL_PRIORITY)\n .addClass(classDescriptor));\n }\n currentClassName = ClassName.toDottedClassName(classDescriptor.getClassName());\n notifyClassObservers(classDescriptor);\n profiler.startContext(currentClassName);\n\n try {\n for (Detector2 detector : detectorList) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n if (isHuge && !FirstPassDetector.class.isAssignableFrom(detector.getClass())) {\n continue;\n }\n if (DEBUG) {\n System.out.println(\"Applying \" + detector.getDetectorClassName() + \" to \" + classDescriptor);\n // System.out.println(\"foo: \" +\n // NonReportingDetector.class.isAssignableFrom(detector.getClass())\n // + \", bar: \" + detector.getClass().getName());\n }\n try {\n profiler.start(detector.getClass());\n detector.visitClass(classDescriptor);\n } catch (ClassFormatException e) {\n logRecoverableException(classDescriptor, detector, e);\n } catch (MissingClassException e) {\n Global.getAnalysisCache().getErrorLogger().reportMissingClass(e.getClassDescriptor());\n } catch (CheckedAnalysisException e) {\n logRecoverableException(classDescriptor, detector, e);\n } catch (RuntimeException e) {\n logRecoverableException(classDescriptor, detector, e);\n } finally {\n profiler.end(detector.getClass());\n }\n }\n } finally {\n\n progress.finishClass();\n profiler.endContext(currentClassName);\n if (PROGRESS) {\n long usecs = (System.nanoTime() - classStartNanoTime)/1000;\n if (usecs > 15000) {\n int classSize = AnalysisContext.currentAnalysisContext().getClassSize(classDescriptor);\n long speed = usecs /classSize;\n if (speed > 15)\n System.out.printf(\" %6d usecs/byte %6d msec %6d bytes %d pass %s%n\", speed, usecs/1000, classSize, passCount,\n classDescriptor);\n }\n \n }\n }\n }\n\n if (!passIterator.hasNext())\n yourkitController.captureMemorySnapshot();\n // Call finishPass on each detector\n for (Detector2 detector : detectorList) {\n detector.finishPass();\n }\n\n progress.finishPerClassAnalysis();\n\n passCount++;\n }\n\n\n } finally {\n\n bugReporter.finish();\n bugReporter.reportQueuedErrors();\n profiler.end(this.getClass());\n if (PROGRESS)\n System.out.println(\"Analysis completed\");\n }\n\n }", "AttackResult userAttack();", "@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"잽을 날리다\");\n\t\t}", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"빠르게 근접공격을 하다\");\n\t}", "public static void main(String[] args) {\n\t\tUtility.dirPath = \"C:\\\\Users\\\\imSlappy\\\\workspace\\\\FeelingAnalysis\\\\Documents\\\\2_group_eng\";\n\t\tString sub[] = {\"dup\",\"bug\"};\n\t\tUtility.classLabel = sub;\n\t\tUtility.numdoc = 350;\n\t\tSetClassPath.read_path(Utility.dirPath);\n\t\tUtility.language = \"en\";\n\t\t\n\t\tUtility.stopWordHSEN = Fileprocess.FileHashSet(\"data/stopwordAndSpc_eng.txt\");\n\t\tUtility.dicen = new _dictionary();\n\t\tUtility.dicen.getDictionary(\"data/dicEngScore.txt\");\n\t\t\n\t\tUtility.vocabHM = new HashMap();\n\t\t// ================= completed initial main Program ==========================\n\n\t\tMainExampleNaive ob = new MainExampleNaive();\n\t\t\n\t\t// --------------------- Pre-process -----------------------\n\t\tob.word_arr = new HashSet [Utility.listFile.length][];\n\t\tob.wordSet = new ArrayList<String>();\n\t\tfor (int i = 0; i < Utility.listFile.length; i++) {\n\t\t\tob.word_arr[i]=new HashSet[Utility.listFile[i].length];\n\t\t\tfor (int j = 0; j < Utility.listFile[i].length; j++) {\n\t\t\t\tStringBuffer strDoc = Fileprocess.readFile(Utility.listFile[i][j]);\n\t\t\t\tob.word_arr[i][j]=ob.docTokenization(new String(strDoc));\n\t\t\t}\n\t\t\tob.checkBound(3, 10000);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"++ Total : \"+Utility.vocabHM.size()+\" words\");\n\t\tSystem.out.println(\"++ \"+Utility.vocabHM);\n\t\t\n\t\t// ---------------------- Selection ------------------------\n//\t\tInformationGain ig = new InformationGain(ob.word_arr.length*ob.word_arr[0].length , ob.wordSet,ob.word_arr);\n//\t\tArrayList<String> ban_word = ig.featureSelection(0.0); // selected out with IG = 0\n//\t\t//ob.banFeature(ban_word);\n//\t\tSystem.out.println(\"ban list[\"+ban_word.size()+\"] : \"+ban_word);\n//\t\t\n//\t\tSystem.out.println(\"-- After \"+Utility.vocabHM.size());\n//\t\tSystem.out.println(\"-- \"+Utility.vocabHM);\n\t\t\n\t\tob.setWordPosition();\n\t\t// ---------------------- Processing -----------------------\n\t\tNaiveBayes naive = new NaiveBayes();\n\t\tnaive.naiveTrain(true);\n\t\t\n\t\tint result = naive.naiveUsage(\"after cold reset of my pc (crash of xp) the favorites of firefox are destroyed and all settings are standard again! Where are firefox-favorites stored and the settings ? how to backup them rgularely? All other software on my pc still works properly ! even INternetExplorer\");\n\t\tSystem.out.println(\"\\nResult : \"+Utility.classLabel[result]);\n\t}", "public void attack();", "public void attack() {\n this.attacked = true;\n }", "void startChallenge();", "public void attack() {\n\n }", "@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"날으면서 원거리 공격을 하다.\");\n\t\t}", "AttackResult smartAttack();", "@Override\n\tpublic void assistTraining() {\n\t\tSystem.out.println(\"加强射门练习\");\n\t}", "protected void thoroughInspection() {}", "@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 infect() {\n isInfected = true;\n }", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"땅밑에서 공격하다\");\n\t}", "private void scan(String filename){\n\t\tverifyAutomatons();\n\t\tsymbolTable = new SymbolTable();\n\t\tprogramInternalForm = new ProgramInternalForm();\n\n\t\tString[] tokensVal = getProgramFromFile(filename);\n\n\t\tint i = 0;\n\t\twhile (i < tokensVal.length) {\n\t\t\tverifySingleTokens(tokensVal[i]);\n\t\t\ti++;\n\t\t}\n\t}", "public void resolve(){\n logger.log(Level.FINE,attacker.getName()+\" withering attacked \"+defender.getName());\n AttackState state=new AttackState();\n state.weaponDamage=weapon.getDamage();\n state.initialAttackpool=baseAttackdice+baseAccuracy-woundpenalty;\n attacker.declareWitheringAttack(state); // If the attacker wants to change the pool, he modifies the state accordingly.\n defender.declareWitheringDV(state); // Defender declares their dv against this specific attack. This sets both initialdv and changedDv\n state.initialAttackRoll= new DiceThrow(state.changedAttackpool);\n attacker.modifyWitheringAttackRollAttacker(state); //This sets stuff like modifiedAttackRollAttacker and AttackerRollValuation\n defender.modifyWitheringAttackRollDefender(state); //This sets defender modifiedAttackRollDefender\n state.attackRollSuccesses=state.modifiedAttackRollDefender.evaluateResults(state.AttackRollValuationAttacker);\n state.threshholdSuccesses=state.attackRollSuccesses-state.changedDv;\n logger.log(Level.FINE,attacker.getName()+\" rolled \"+state.changedAttackpool+\" dice against \"+defender.getName()+\"'s dv of \"+state.changedDv+\" and gained \"+state.attackRollSuccesses+\" successes.\");\n attacker.changeWitheringThreshholdAttacker(state); //This sets thresholdModifiedAttacker\n defender.changeWitheringThreshholdDefender(state); //This sets thresholdModifiedDefender\n if(state.thresholdModifiedDefender>=0) {\n logger.log(Level.FINE,attacker.getName()+\" hit \"+defender.getName()+\" with \"+state.thresholdModifiedDefender+\" threshhold successes.\");\n attacker.modifyWitheringRawDamageAttacker(state); //Sets normal raw damageType, based on strength and weapon damageType, and then sets rawDamagemModifiedAttacker\n defender.modifyWitheringRawDamageDefender(state); //this sets rawDamageModifiedDefender, and sets up the various soak values, so natural soak and armor soak.\n logger.log(Level.FINE, \"The raw damage of the attack is: \"+state.rawDamageModifiedDefender);\n state.totalSoak = Math.max(state.defenderArmorSoak - ignoredArmorSoak, 0) + state.defenderNaturalSoak; //\n attacker.modifyTotalSoakAttacker(state); //This sets totalSoakmodifiedAttacker. Don't think this actually has support in the solar charmset, but giving opportunities to work with.\n defender.modifyTotalSoakDefender(state); // This sets totalSoakmodifiedDefender.\n state.postSoakSuccesses=Math.max(state.rawDamageModifiedDefender-state.totalSoakModifiedDefender,weapon.getOverwhelming());\n logger.log(Level.FINE,state.totalSoakModifiedDefender+\" damage is soaked, leading to post soak dice of \"+state.postSoakSuccesses);\n attacker.declarePostSoakAttacker(state); //sets postSoakSuccessesModifiedAttacker\n defender.declarePostSoakDefender(state); //sets postSoakSuccessesModifiedDefender\n DiceThrow droll=new DiceThrow(state.postSoakSuccessesModifiedDefender);\n state.damageRoll=droll;\n attacker.modifyWitheringDamageRollAttacker(state); //sets damageRollmodifiedAttacker and damageRollvValuation\n defender.modifyWitheringDamageRollDefender(state); //sets damageRollmodifiedDefender\n state.initiativeDamageDone=state.damageRollModifiedDefender.evaluateResults(state.damageRollValuation);\n logger.log(Level.FINE,attacker.getName()+\" rolls \"+state.postSoakSuccessesModifiedDefender+\" dice and achieves \"+state.initiativeDamageDone+\" successes.\");\n attacker.modifyInitiativeDamageAttacker(state);\n defender.modifyInitiativeDamageDefender(state); //Since this is the last change of initiative, we can check whether the defender was crashed here.\n attacker.updateInitiativeAttacker(state);\n defender.updateInitiativeDefender(state);//Here we should handle all the initiative changes respectively, with checking if people are crashed etc.\n }\n else{\n attacker.failedWitheringAttackAttacker(state);\n defender.failedWitheringAttackDefender(state);\n }\n\n }", "public void testDeterminizerOnDFAs() throws Exception {\n\t\tIDFA[] dfas = JailTestUtils.getAllDFAs();\n\t\tfor (IDFA dfa: dfas) {\n\t\t\tIDirectedGraph graph = dfa.getGraph();\n\t\t\tINFA nfa = new GraphNFA(graph);\n\t\t\ttestDeterminizer(nfa,dfa);\n\t\t}\n\t}", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\" 원거리 공격을 하다\");\n\t}", "@Override\n\tpublic void challenge17() {\n\n\t}", "@Override\n\tpublic void attack() {\n\n\t}", "void analysisStarting();", "private void doResearch() {\n\t\tSystem.out.println(\"Students must do research\");\n\t}", "private void run()\n {\n searchLexDb(\"^providing_\", true);\n }", "void bypass();", "@Override\n public void attack() {\n\n }", "@Override\n\tpublic void attack() {\n\t\t\n\t}", "@Override\n\tpublic void attack() {\n\t}", "public void identify() {\n\n\t}", "@Override\n public void reportContextSensitivity( Parser parser, DFA dfa, int i, int i1, int i2, ATNConfigSet atnConfigSet )\n {\n }", "public void run() {\n for (List<Boolean> include : includeConstituents) {\r\n // now select an alternative for each constituent\r\n selectConstituent(0, include);\r\n }\r\n }", "@Override\n public void attack(){\n\n }", "public void evalInd() {\n\t\tif (ourIndEval.evaluateInd(anIndividual)) { \n\t\t\tLogger.logDebugConsole(\" success eval\");\n\t\t\tLogger.log(\"Eval success \" + anIndividual.getClassName() + \" = \"\n\t\t\t\t\t+ anIndividual.getClassName() + \" Time: \"+anIndividual.getRunningTime()+\" Fit:\" + anIndividual.getFitness()\n\t\t\t\t\t+ \" TestError:\" + anIndividual.getFunctionalityErrorCount()+ \" ASTNodes: \" + anIndividual.getNumNodes() \n\t\t\t\t\t+ \" GPNodes: \" \t+ anIndividual.getNumGPNodes()\n\t\t\t\t\t+ \" xoverApplied: \" \t+ anIndividual.crossoverApplied()\n\t\t\t\t\t+ \" xovers: \" \t+ anIndividual.getCrossoverAttempts()\n\t\t\t\t\t+ \" mutationApplied: \" \t+ anIndividual.mutationApplied()\n\t\t\t\t\t+ \" mutations: \" \t+ anIndividual.getMutationAttempts());\n\t\t} else {\n\t\t\tLogger.log(\"Eval failed \" + anIndividual.getClassName());\n\t\t}\n\t\t\t\t\n\t}", "@Override\n\tpublic void covidProtection() {\n\t\tSystem.out.println(\"FH---covid protection\");\n\t}", "@Override\n\tvoid attack() {\n\n\t}", "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}", "String attack();", "@Override\n\tpublic void challenge14() {\n\n\t}", "public void doChecking() {\n \tdoCheckingDump();\n \tdoCheckingMatl();\n }", "@Override\n\tpublic void physicAttack() {\n\t\tSystem.out.println(\"进行物理攻击!\");\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 setDareChallenge() {\n while (!(getActiveChallenge()).contains(\"Dare\")) {\n categories.get(indexOfActiveCategory).increaseIndexOfActiveChallenge();\n }\n }", "public void attack() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].attack();\n }\n }", "private void m1866c() {\n /*\n r10 = this;\n r2 = 0;\n r1 = 1;\n r0 = \"DCVpnService\";\n r3 = \"startVPN\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n monitor-enter(r10);\n r0 = r10.f1317a;\t Catch:{ all -> 0x0065 }\n if (r0 == 0) goto L_0x0017;\n L_0x000e:\n r0 = \"DCVpnService\";\n r1 = \"startVPN: already started\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n L_0x0016:\n return;\n L_0x0017:\n r0 = 1;\n r10.f1317a = r0;\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n r0 = \"DCVpnService\";\n r3 = \"startVPN: about to build\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n r0 = com.ppu.fba.FirewallApplication.m1851a();\n r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0);\n r3 = \"data_caching_on\";\n r3 = r0.getBoolean(r3, r2);\n r4 = \"ad_blocking_on\";\n r4 = r0.getBoolean(r4, r1);\n r5 = \"malware_shield_on\";\n r6 = r0.getBoolean(r5, r2);\n if (r3 == 0) goto L_0x0068;\n L_0x003e:\n r5 = r1;\n L_0x003f:\n if (r4 == 0) goto L_0x006a;\n L_0x0041:\n r4 = r1;\n L_0x0042:\n if (r6 == 0) goto L_0x006c;\n L_0x0044:\n r0 = r1;\n L_0x0045:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x0054;\n L_0x0049:\n r3 = new com.ppu.fba.g;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x006e }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x006e }\n L_0x0054:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x00b6;\n L_0x0058:\n r10.f1317a = r2;\n r0 = \"DCVpnService\";\n r1 = \"builder failed: stopSelf() now\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n r10.stopSelf();\n goto L_0x0016;\n L_0x0065:\n r0 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n throw r0;\n L_0x0068:\n r5 = r2;\n goto L_0x003f;\n L_0x006a:\n r4 = r2;\n goto L_0x0042;\n L_0x006c:\n r0 = r2;\n goto L_0x0045;\n L_0x006e:\n r3 = move-exception;\n r3 = new com.ppu.fba.q;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x007b }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x007b }\n goto L_0x0054;\n L_0x007b:\n r3 = move-exception;\n r6 = \"state\";\n r7 = \"vpnFail\";\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"excEst: \";\n r8 = r8.append(r9);\n r9 = r3.getMessage();\n if (r9 != 0) goto L_0x00b1;\n L_0x0091:\n r3 = \"null\";\n L_0x0093:\n r3 = r8.append(r3);\n r3 = r3.toString();\n r8 = 0;\n r3 = com.google.analytics.tracking.android.MapBuilder.createEvent(r6, r7, r3, r8);\n r3 = r3.build();\n com.ppu.fba.p009d.Log1.LogAction(r3);\n r3 = com.ppu.fba.R.string.error_vpn_establish;\n r3 = android.widget.Toast.makeText(r10, r3, r1);\n r3.show();\n goto L_0x0054;\n L_0x00b1:\n r3 = r3.getMessage();\n goto L_0x0093;\n L_0x00b6:\n r3 = r10.m1868e();\n r10.startForeground(r1, r3);\n r3 = \"DCVpnService\";\n r6 = \"init\";\n com.ppu.fba.p009d.Log1.LogF1(r3, r6);\n r3 = r10.f1322g;\n r3 = r3.getFd();\n r6 = r10.getFilesDir();\n r6 = r6.getAbsolutePath();\n r0 = com.ppu.fba.NativeWrapper.jni_dicki(r3, r6, r5, r4, r0);\n if (r0 == 0) goto L_0x00e4;\n L_0x00d8:\n r0 = \"DCVpnService\";\n r2 = \"account_init failed!!!!!\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r2);\n r10.stopForeground(r1);\n goto L_0x0016;\n L_0x00e4:\n r10.f1321f = r2;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.d;\n r1.<init>(r10);\n r2 = \"t4\";\n r0.<init>(r1, r2);\n r10.f1324i = r0;\n r0 = r10.f1324i;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.e;\n r1.<init>(r10);\n r2 = \"t0\";\n r0.<init>(r1, r2);\n r10.f1323h = r0;\n r0 = r10.f1323h;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.f;\n r1.<init>(r10);\n r2 = \"t1\";\n r0.<init>(r1, r2);\n r10.f1319d = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.o;\n r1.<init>(r10);\n r2 = \"t2\";\n r0.<init>(r1, r2);\n r10.f1320e = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.p;\n r1.<init>(r10);\n r2 = \"t3\";\n r0.<init>(r1, r2);\n r10.f1318c = r0;\n r0 = r10.f1319d;\n r0.start();\n r0 = r10.f1320e;\n r0.start();\n r0 = r10.f1318c;\n r0.start();\n goto L_0x0016;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ppu.fba.FirewallVpnService.c():void\");\n }", "private static void check (String filename)\n\t\t\tthrows Exception {\n\t\tpythonLexer lexer = new pythonLexer(\n\t\t\t\tCharStreams.fromFileName(filename));\n\t\tCommonTokenStream tokens = \n\t\t new CommonTokenStream(lexer);\n\t\tParseTree tree =\n\t\t syntacticAnalyse(tokens);\n\t\tcontextualAnalyse(tree,tokens);\n\t}", "@Override\n\tpublic void challenge7() {\n\n\t}", "public void extractKnowledge()\n {\n }", "public void engine() {\n\t\tSystem.out.println(\"Follow engine guidelines\");\n\t}", "@Override\n\tpublic void challenge6() {\n\n\t}", "private static void runTestCWE4() {\n}", "private static void runTestCWE4() {\n}", "private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "abstract public boolean performNextAttack();", "public void solution() {\n\t\t\n\t}", "public static void startInstrumenting() {\n\t\tstate = new InstrumenterState();\n\t\tfirstLevelStore = state.currentLevelStore;\n\t\t\n\t\tdidError = false;\n\t\texception = \"\";\n\t\tinstrumenting = true;\n\t\trunning = false;\n\t}", "@Override\n\tpublic void challenge11() {\n\n\t}", "void aprovarAnalise();", "private static void runTestCWE1() {\n}", "private static void runTestCWE1() {\n}", "public void run() {\n\t\tArrays.fill(label, NOT_AN_INDEX);\r\n\t\t\r\n\t\t// while there is a u in V with considered[u]=0 and mate[u]=0 do\r\n\t\tstage: for (int u = 0; u < gOrig.numVertices(); u++ ) {\r\n\t\t\t// if(mate[u] == NOT_AN_INDEX){\r\n\t\t\tif (gOrig.vertex(u) == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (matching.matches() == gOrig.numVertices() / 2) {\r\n\t\t\t\t// we are done\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(String.format(\"considering vertex u%d\\n\", u));\r\n\t\t\tif ( ! matching.isMatched(u)) {\r\n\t\t\t\t\r\n\t\t\t\t// considered[u]=1,A={empty}\r\n\t\t\t\t// A = new WeightedDigraph(gOrig.numVertices()/2);\r\n\t\t\t\tA.clear();\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do exposed[v]=0\r\n\t\t\t\tArrays.fill(exposed, NOT_AN_INDEX);\r\n\t\t\t\t\r\n\t\t\t\t// Construct the auxiliary digraph\r\n\t\t\t\t\r\n\t\t\t\t// for all (v,w) in E do\r\n\t\t\t\tfor (int v = 0; v < gOrig.numVertices(); v++ ) {\r\n\t\t\t\t\tfor (Edge e : gOrig.eOuts(v)) {\r\n\t\t\t\t\t\tint w = e.right;\r\n\t\t\t\t\t\tassert e.left == v : \"vertex correspondence is wrong\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// if mate[w]=0 and w!=u then exposed[v]=w else if mate[w] !=v,0 then A=union(A,{v,mate[w]})\r\n\t\t\t\t\t\t// if(mate[w] == NOT_AN_INDEX && w != u){\r\n\t\t\t\t\t\t// exposed[v] = w;\r\n\t\t\t\t\t\t// }else if(mate[w] != v && mate[w] != NOT_AN_INDEX){\r\n\t\t\t\t\t\t// A.addEdge(new Edge(v,mate[w]));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( ! matching.isMatched(w) && w != u) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to exposed\\n\", v, w));\r\n\t\t\t\t\t\t\tif (exposed[v] == NOT_AN_INDEX) {\r\n\t\t\t\t\t\t\t\texposed[v] = w;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (matching.mate(w) != v && matching.isMatched(w)) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to A\\n\", v, matching.mate(w)));\r\n\t\t\t\t\t\t\tA.add(new Edge(v, matching.mate(w)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tDEBUG(String.format(\"Exposed vertices={%s}\\n\", printExposed()));\r\n\t\t\t\tif (exposed().size() == 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do seen[v]=0\r\n\t\t\t\tArrays.fill(seen, false);\r\n\t\t\t\t\r\n\t\t\t\t// Q={u}; label[u]=0; if exposed[u]!=0 then augment(u), goto stage;\r\n\t\t\t\tQ.clear();\r\n\t\t\t\tQ.add(u);\r\n\t\t\t\tArrays.fill(label, NOT_AN_INDEX);// unsure whether it was meant to clear label or just unset label[u] OLD_CODE=label[u] = NOT_AN_INDEX;\r\n\t\t\t\tif (isExposed(u)) {\r\n\t\t\t\t\taugment(u);\r\n\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// need to figure out how to handle blossom()\r\n\t\t\t\t\r\n\t\t\t\t// while Q != {empty} do\r\n\t\t\t\twhile ( ! Q.isEmpty()) {\r\n\t\t\t\t\tint v = Q.pop();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// forall unlabeled nodes w in V such that (v,w) in A\r\n\t\t\t\t\tfor (Edge e : A) {\r\n\t\t\t\t\t\tint w = e.left;\r\n\t\t\t\t\t\tif (e.right == v && label[w] == NOT_AN_INDEX && label[v] != w) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Q=union(Q,w), label[w]=v\r\n\t\t\t\t\t\t\tif ( ! Q.contains(w)) {\r\n\t\t\t\t\t\t\t\tQ.offer(w);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tcontinue; ///THIS CONTINUE WAS ADDED LATE AT NIGHT\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlabel[w] = v;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// seen[mate[w]] = 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tint mate = findMate(w);\r\n\t\t\t\t\t\t\t\tseen[mate] = true;\r\n\t\t\t\t\t\t\t}catch(Exception err){\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"error marking mate of %d as seen, mate not found\\n\", w));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if exposed[w]!=0 then augment(w) goto stage;\r\n\t\t\t\t\t\t\tif (isExposed(w)) {\r\n\t\t\t\t\t\t\t\taugment(w);\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\t\t\t\tcontinue stage;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if seen[w]=1 then blossom(w)\r\n\t\t\t\t\t\t\tif (seen[w]) {\r\n\t\t\t\t\t\t\t\tblossom(w);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// remove loops created by the blossoms\r\n\t\t\t\t\tremoveSelfLoops(A);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\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 }", "static void analyze (String s) {\r\n // Assigns the given string to the global lexeme variable\r\n lexeme = s;\r\n\r\n //Ensures all lexemes are under 100 characters long\r\n if (lexeme.length() >= 100) {\r\n System.out.println(\"\\nERROR: Lexeme too long - \" + s);\r\n System.exit(0);\r\n }\r\n\r\n int length = lexeme.length(); // Length of the lexeme\r\n int i = 0;\r\n\r\n //Check the character class of the first character\r\n updateClass(lexeme.charAt(i));\r\n\r\n //First character is a digit\r\n if (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Followed by any number of digits\r\n while (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n }\r\n System.out.print(\"\\nERROR - Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n // First character is a letter\r\n else if (charClass == 2){\r\n\r\n if (lexeme.equals(\"true\")) {\r\n token = \"TRUE\";\r\n return;\r\n }\r\n\r\n if (lexeme.equals(\"false\")) {\r\n token = \"FALSE\";\r\n return;\r\n }\r\n\r\n if (lexeme.equals(\"if\")) {\r\n token = \"IF\";\r\n return;\r\n }\r\n\r\n if (i == length - 1){\r\n token = \"IDENTIFIER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Next characters are any number of letters and numbers\r\n while (charClass == 1 || charClass == 2 || lexeme.charAt(i) == '_'){\r\n\r\n if (i == length - 1){\r\n token = \"IDENTIFIER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n }\r\n System.out.print(\"\\nERROR: Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n // First character is a digit\r\n else if (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Followed by any number of digits\r\n while (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"UNSIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n }\r\n System.out.print(\"\\nERROR - Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n //First character is a sign\r\n else if (lexeme.charAt(i) == '+' || lexeme.charAt(i) == '-'){\r\n\r\n if (i == length - 1){\r\n if (lexeme.charAt(i) == '+'){\r\n token = \"PLUS\";\r\n return;\r\n }\r\n if (lexeme.charAt(i) == '-'){\r\n token = \"MINUS\";\r\n return;\r\n }\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n //Followed by any number of digits\r\n while (charClass == 1){\r\n\r\n if (i == length - 1){\r\n token = \"SIGNED_INTEGER\";\r\n return;\r\n }\r\n i++;\r\n updateClass(lexeme.charAt(i));\r\n\r\n }\r\n System.out.print(\"\\nERROR - Illegal character: \" + lexeme.charAt(i) + \" | Lexeme: \" + lexeme);\r\n System.exit(0);\r\n\r\n }\r\n\r\n else {\r\n lookUp();\r\n if(token == \"ILLEGAL\") {\r\n System.out.print(\"\\nERROR: Illegal token - \" + lexeme);\r\n System.exit(0);\r\n }\r\n }\r\n }", "private static void runTestCWE2() {\n}", "private static void runTestCWE2() {\n}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "public void run() {\n\n ui.startDuke();\n storage.readFile(lists, ui);\n\n Scanner reader = new Scanner(System.in);\n\n while (true) {\n\n String inp = reader.nextLine();\n parse.checkInstruction(inp, storage, ui, lists, tasks);\n }\n }", "public void program() throws Exception {\r\n int valg;\r\n skrivInn(\"dvdarkiv2.txt\");//leser inn fra dvd arkivet\r\n while(true) {\r\n meny();//kaller paa meny for a skrive ut menyen etter hvert fullforte valg\n System.out.println(\"Skriv inn valget ditt\");\n valg = sjekkOmTall();//kaller paa metoden for o sorge for aa faa valg\n if (valg == 1) {\n nyPerson();\n }\n else if (valg == 2) {\n kjop();\n }\n else if (valg == 3) {\n laan();\n }\n else if (valg == 4) {\n visPerson();\n }\n else if (valg == 5) {\n visOversikt();\n }\n else if (valg == 6){\n retur();\n }\n else if (valg == 7) {\n avslutt();\n }\n }\r\n }", "protected void mo6255a() {\n }", "public static void main(String[] args) {\n RegexParser regexParser = new RegexParser(new File(args[0]));\n regexParser.parseCharClasses();\n regexParser.parseTokens();\n regexParser.buildDFATable();\n // write DFA Table to file\n try {\n BufferedWriter tableWriter = new BufferedWriter(new FileWriter(new File(args[2])));\n for (int i = 0; i < regexParser.dfaTable.tableRows.size(); i++) {\n tableWriter.write(\"State\" + i);\n tableWriter.newLine();\n for (int j = 0; j < 95; j++) {\n //if (regexParser.dfaTable.tableRows.get(i).nextStates[j] != 1) {\n tableWriter.write(\" \" + (char)(j + 32) + \" \" + regexParser.dfaTable.tableRows.get(i).nextStates[j]);\n //}\n }\n tableWriter.newLine();\n }\n tableWriter.newLine();\n tableWriter.write(\"Accept States\");\n tableWriter.newLine();\n for (int j = 0; j < regexParser.dfaTable.tableRows.size(); j++) {\n for (int i = 0; i < regexParser.dfaTable.nfa.acceptStates.size(); i++) {\n if (regexParser.dfaTable.tableRows.get(j).nfaStates.contains(regexParser.dfaTable.nfa.acceptStates.get(i))) {\n tableWriter.write(\" \" + j);\n }\n }\n }\n tableWriter.close();\n }\n catch (Exception e) {\n System.out.println(\"Could not write to table file\");\n System.exit(0);\n }\n TableWalker tw = new TableWalker(regexParser.dfaTable, new File(args[1]), new File(args[3]));\n System.out.println(\"Success! Check your output files!\");\n//Part 2, piece 1: parsing the grammar\n LL1GrammarParser parser = new LL1GrammarParser(new File(args[4]), regexParser.specReader.tokens);\n parser.parseGrammar();\n\n//piece 2/3: first and follow sets \n System.out.println(\"Creating First and Follow Sets: \");\n\n LL1FFSets sets = new LL1FFSets(parser.rules);\n\n System.out.println(\"Working on the Parsing Table\");\n//piece 4/5: LL(1) parsing table and running it. Success/reject message here.\n LL1ParsingTable table = new LL1ParsingTable(sets, regexParser.specReader.tokens,tw.parsedTokens, parser.rules);\n System.out.println(table.run());\n\n\n }", "@Override\n public void run() {\n \n initExplorationBounds();\n \n long timer = System.currentTimeMillis();\n \n // ITERATE THROUGH ALL THE POSSIBLE OBJECT SCOPES\n while (configuration.isIncrementalLoopUnroll() ||\n configuration.getObjectScope() <= configuration.getMaximumObjectScope())\n {\n \n // FOR EACH OBJECT SCOPE ITERATE THROUGH ALL THE LOOP UNROLLS\n // UNTIL NO LOOP EXHAUSTION IS ENCOUNTERED\n {\n FajitaRunner.printStep(\"FAJITA: Decorating Java code for \" +\n configuration.getObjectScope() + \" scope and \" +\n configuration.getLoopUnroll() + \" unroll\");\n runFajitaCodeDecorator();\n \n FajitaRunner.printStep(\"FAJITA: Translating Java -> Alloy\");\n runTaco();\n \n if (configuration.isIncrementalLoopUnroll())\n configuration.setInfiniteScope(true);\n \n if (configuration.isOnlyTranslateToAlloy()) {\n System.out.println(\"Translation to Alloy completed.\"); \n return;\n }\n \n if (configuration.getDiscoveredGoals() == 0) {\n System.out.println(\"No goals found for the chosen test selection criterion.\");\n return;\n }\n \n FajitaRunner.printStep(\"FAJITA: Enumerating Solutions using AlloyCLI\");\n runAlloyCli();\n \n FajitaRunner.printStep(\"Reporting Coverage\");\n FajitaOutputProcessor.newProcessor(configuration).getCoverage();\n \n/// boolean loopExhaustionEncountered = configuration.getCoveredGoals().removeAll(\n/// configuration.getLoopExhaustionIncarnations());\n\n System.out.println((System.currentTimeMillis() - timer) / 1000 + \" s\");\n \n // CHECK STOP CONDITIONS\n if (configuration.getCoveredGoals().size() == configuration.getDiscoveredGoals() ||\n configuration.getCoverageCriteria() == CoverageCriteria.CLASS_COVERAGE ||\n (configuration.getCoverageCriteria() == CoverageCriteria.DUAL_CLASS_BRANCH_COVERAGE &&\n (configuration.getDualClassBranchIteration() == 0 ||\n configuration.getCoveredGoals().size() == configuration.getDualDiscoveredBranches())))\n {\n return;\n }\n \n/// if (!loopExhaustionEncountered) break;\n }\n \n if (!configuration.isInfiniteScope()) {\n System.out.println(\"Finite scope exhausted.\");\n break;\n }\n \n configuration.setObjectScope(configuration.getObjectScope() + 1);\n configuration.setLoopUnroll(configuration.getObjectScope() / 2); \n }\n }", "private void setupDFA() {\r\n\t\tcurrentState = 0;\r\n\t\tif (actor.getScheduleFSM() == null) {\r\n\t\t\t// generate trivial DFA in case there is no schedule fsm.\r\n\t\t\t// 1. only one state\r\n\t\t\t// 2. all actions are eligible\r\n\t\t\t// 3. the successor state is always the same\r\n\t\t\teligibleActions = new Action [][] {actions};\r\n\t\t\tsuccessorState = new int [1] [actions.length];\r\n\t\t\tfor (int i = 0; i < actions.length; i++) {\r\n\t\t\t\tsuccessorState[0][i] = 0;\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet stateSets = new HashSet();\r\n\t\t// put initial state into set of state sets\r\n\t\tSet initialState = Collections.singleton(actor.getScheduleFSM().getInitialState());\r\n\t\tstateSets.add(initialState);\r\n\t\tint previousSize = 0;\r\n\t\t// iterate until fixed-point, i.e. we cannot reach any new state set\r\n\t\twhile (previousSize != stateSets.size()) {\r\n\t\t\tpreviousSize = stateSets.size();\r\n\t\t\t// for each action...\r\n\t\t\tfor (int i = 0; i < actions.length; i ++) {\r\n\t\t\t\tSet nextStates = new HashSet();\r\n\t\t\t\t// ... compute the set of states that can be reached through it... \r\n\t\t\t\tfor (Iterator j = stateSets.iterator(); j.hasNext(); ) {\r\n\t\t\t\t\tSet s = (Set) j.next();\r\n\t\t\t\t\tif (isEligibleAction(s, actions[i])) {\r\n\t\t\t\t\t\tnextStates.add(computeNextStateSet(s, actions[i]));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// ... and add them to the state set\r\n\t\t\t\tstateSets.addAll(nextStates);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// The set of all reachable state sets is the state space of the NDA. \r\n\t\tndaStateSets = (Set []) new ArrayList(stateSets).toArray(new Set[stateSets.size()]);\r\n\t\t// Make sure the initial state is state 0.\r\n\t\tfor (int i = 0; i < ndaStateSets.length; i++) {\r\n\t\t\tif (ndaStateSets[i].equals(initialState)) {\r\n\t\t\t\tSet s = ndaStateSets[i];\r\n\t\t\t\tndaStateSets[i] = ndaStateSets[0];\r\n\t\t\t\tndaStateSets[0] = s;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\teligibleActions = new Action [ndaStateSets.length] [];\r\n\t\tsuccessorState = new int [ndaStateSets.length] [];\r\n\t\t// For each state set (i.e. each NDA state), identify the eligible actions,\r\n\t\t// and also the successor state set (i.e. the successor state in the NDA).\r\n\t\tfor (int i = 0; i < ndaStateSets.length; i++) {\r\n\t\t\tList ea = new ArrayList();\r\n\t\t\tList ss = new ArrayList();\r\n\t\t\tfor (int j = 0; j < actions.length; j++) {\r\n\t\t\t\tif (isEligibleAction(ndaStateSets[i], actions[j])) {\r\n\t\t\t\t\tea.add(actions[j]);\r\n\t\t\t\t\tss.add(computeNextStateSet(ndaStateSets[i], actions[j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\teligibleActions[i] = (Action []) ea.toArray(new Action[ea.size()]);\r\n\t\t\tList ds = Arrays.asList(ndaStateSets); // so we can use List.indexOf()\r\n\t\t\tsuccessorState[i] = new int [ss.size()];\r\n\t\t\t// locta the NDA successor state in array\r\n\t\t\tfor (int j = 0; j < ss.size(); j++) {\r\n\t\t\t\tsuccessorState[i][j] = ds.indexOf(ss.get(j));\r\n\t\t\t\t\r\n\t\t\t\t// must be in array, because we iterated until reaching a fixed point.\r\n\t\t\t\tassert successorState[i][j] >= 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void toSelectingAttackTarget() {\n }", "@Override\n public void reportAttemptingFullContext( Parser parser, DFA dfa, int i, int i1, BitSet bitSet,\n ATNConfigSet atnConfigSet )\n {\n }", "public void testDeterminizerOnSimpleExamples() throws Exception {\n\t\tINFA nfa = JailTestUtils.SINGLE_NFA();\n\t\tIDFA dfa = JailTestUtils.SINGLE_DFA();\n\t\ttestDeterminizer(nfa,dfa);\n\t}", "private static void FinalIndVsPAk() {\n\t\tSystem.out.println(\"Pak Lost The Match\");\n\t\t\n\t}", "@Override\n\tpublic void challenge16() {\n\n\t}", "private void loadBypassAndTrailChecks() {\n bypassChecks.add(new BypassPermissionCheck());\n // Spectator Check\n SpectatorModeCheck spectatorModeCheck = new SpectatorModeCheck();\n bypassChecks.add(spectatorModeCheck);\n noTrailChecks.add(spectatorModeCheck);\n // Vanish Checks\n HashSet<Check> vanishChecks = new HashSet<>();\n\n if (pluginLoading(\"PremiumVanish\") || pluginLoading(\"SuperVanish\")) {\n vanishChecks.add(new PremiumSuperVanishCheck());\n } else if (pluginLoading(\"Essentials\")) {\n vanishChecks.add(new EssentialsVanishCheck());\n }\n\n if (!vanishChecks.isEmpty() && pl.getConfManager().isVanishBypass()) {\n bypassChecks.addAll(vanishChecks);\n noTrailChecks.addAll(vanishChecks);\n }\n // Invisibility potion Check\n noTrailChecks.add(new InvisibilityPotionCheck());\n /* DISABLE EMPTY */\n }", "public void edicationLoan() {\n\t\tSystem.out.println(\"hsbc -- education loan\");\n\t\t\n\t}", "public static void main()\n {\n Lex edp = new Lex();\n try\n {\n edp.run();\n } catch (Exception e)\n {\n System.out.println(\"Exception: \" + e.toString());\n e.printStackTrace();\n } // catch\n }", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "public void learn() throws FileNotFoundException {\n\t\tprintConfig();\n\t\taskConfirm(\"Are these your settings (y/n)?\");\n\t\tSystem.out.println(\"Start Learning Process\");\n\t\tFsmLearner learner = new FsmLearner();\n\t\ttry {\n\t\t\tlearner.setUpLearner();\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"The alphabet as specified in the config file was not found. Please check \"\n\t\t\t\t\t+ \"if the alphabet exists. If not, use 'alphabet:create' (for Android) to create a new \" + \"one.\");\n\t\t}\n\t\tboolean learning_done = false;\n\t\twhile (!learning_done) {\n\t\t\ttry {\n\t\t\t\tlearner.runExperiment();\n\t\t\t\tlearning_done = true;\n\t\t\t} catch (ConflictException ce) {\n\n\t\t\t\tSystem.out.println(\"ConflictException\");\n\t\t\t\tlearner.instantiateSulsReset();\n\t\t\t\tce.printStackTrace();\n\t\t\t\t// learner.setUpLearner();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Something unforseen happened while learning\\nPrinting StackTrace:\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tlearning_done = true;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tlearner.printResults();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"An error occurred while printing the results.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tlearner.stopExperiment();\n\t\tSystem.out.println(\"Query Cache Statistics:\");\n\t\tSystem.out.println(learner.sul.getSum());\n\t\tSystem.out.println(learner.sul.getNum());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Finished Learning, doing the postresults\");\n//\t\tthis.postLearning(learner, em.getInstrumentator());\n\t\tSystem.out.println(\"Results are in: \" + learner.getStamp());\n\t}", "public void study() {\n\t\tSystem.out.println(\"学习Java\");\r\n\t}", "public static void experiment2() {\n\t\tList<String> lines = FileUtil.loadFrom(\"docs/corpus-search-results-new-408.txt\");\n\t\tString cipher = Ciphers.cipher[1].cipher;\n\t\tString plain = Ciphers.cipher[1].solution;\n\t\tfor (String line : lines) {\n\t\t\tint pos = plain.indexOf(line.toLowerCase());\n\t\t\tif (pos < 0) System.out.println(\"Could not find \" + line + \" in plaintext\");\n\t\t\telse {\n\t\t\t\tString sub = cipher.substring(pos, pos+line.length());\n\t\t\t\tInfo info = new Info(sub, 0);\n\t\t\t\tSystem.out.println(line + \", \" + sub + \", \" + info.probability);\n\t\t\t}\n\t\t}\n\t}", "public void start() {\r\n\t\tDatabaseHandler db = new DatabaseHandler(context);\r\n\t\trules = db.getAllRulesByType(type);\r\n\t\tdb.close();\r\n\t\tString sequence = \"\";\r\n\t\tfor (Rule r : rules) {\r\n\t\t\tif (r.getActive() == true) {\r\n\t\t\t\tsequence = r.getTreeData();\r\n\t\t\t\tCauseChecker c = new CauseChecker();\r\n\t\t\t\tc.execute(sequence, \"\" + r.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static void startJavaTrainer() {\n initializeMap();\n promptUser();\n startProgram();\n }", "public void run() throws IloException {\n\t\t\n\t\t//Instancie la classe Cplex avec le programme lineaire et la nature\n\t\tCplex cplex = new Cplex(prog, nature);\n\t\tboolean st = false;\n\t\tString info;\n\t\tint i = 0;\n\t\t\n\t\t/*Tant que l'on a des sous tours dans le modèle*/\n\t\tdo {\n\t\t\t//Lancement du solve du model de cplex\n\t\t\tcplex.solve();\n\t\t\t\n\t\t\t//Récupère un booléen en fonction de la présence de sous tours après le solve\n\t\t\tst = contrainteSousTour(cplex);\n\t\t\tinfo = \"Contrainte de sous-tours ajouté au modèle\";\n\t\t\tInterface.majAffichage(info);\n\t\t\ti++;\n\t\t} while (st && i!= 5);\n\n\t}", "@Override\n\tpublic void challenge15() {\n\n\t}", "public void findSolution() {\n\n\t\t// TODO\n\t}", "public void act() \n {\n canSeeAlex();\n }", "public void educationLoan(){\r\n\t\tSystem.out.println(\"HSBC ----educationLoan method called from HSBCBank class\");\r\n\t}", "protected void setup() {\n\t\tSystem.out.println(\" Searching \" + getAID().getName() + \"starts\");\n\t\taddBehaviour(new WakerBehaviour(this, 1000) {\n\t\t\tprotected void handleElapsedTimeout() {\n\t\t\t\t// perform operation X\n\t\t\t\tDFAgentDescription template = new DFAgentDescription();\n\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\tsd.setType(\"Cloth adviser\");\n\t\t\t\ttemplate.addServices(sd);\n\t\t\t\ttry {\n\t\t\t\t\tDFAgentDescription[] resultOfAdviser = DFService.search(myAgent, template);\n\t\t\t\t\tadviser= resultOfAdviser[0].getName();\n\t\t\t\t} catch (FIPAException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tACLMessage recMessage = blockingReceive();\n\t\t\t\tif (recMessage != null) {\n\t\t\t\t\tString senderName = recMessage.getSender().getName();\n\t\t\t\t\tSystem.out.println(getName()+\" receive message from \" + senderName);\n\t\t\t\t\tString rec = recMessage.getContent();\n\t\t\t\t\tSystem.out.println(\"receive message is \" + rec);\n\t\t\t\t\tACLMessage sendMessage = new ACLMessage(ACLMessage.INFORM);\n\t\t\t\t\tsendMessage.setContent(rec);\n\t\t\t\t\tsendMessage.addReceiver(adviser);\n\t\t\t\t\tsend(sendMessage);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"null exception\");\n\t\t\t\t\tblock();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "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 }", "void analysisPostponed();", "void passivateFlowStorer();", "@Override\n\tpublic void challenge8() {\n\n\t}", "void approveSelf() throws IllegalAccessException {\n\t\tif (this.secOpFlag)\n\t\t\tthrow new IllegalAccessException(\"Diagnose requires second opinion and can't be self approved.\");\n\t\tthis.approved = true;\n\t\tthis.secOpFlag = false;\n\t}", "private void m7127a() {\n try {\n if (this.f7134e == null) {\n this.f7134e = new C1636a(this, C1636a.f7386a);\n }\n this.f7134e.mo14509a();\n } catch (Exception unused) {\n this.f7134e = null;\n }\n }" ]
[ "0.58497566", "0.580389", "0.562785", "0.5579269", "0.55519015", "0.55409753", "0.5490898", "0.54481393", "0.5445354", "0.54143643", "0.5374916", "0.53693736", "0.5345078", "0.5331154", "0.53302336", "0.53302336", "0.53302336", "0.5323131", "0.53204316", "0.52900296", "0.52881235", "0.52635175", "0.52556086", "0.52312326", "0.5230609", "0.5224068", "0.52188927", "0.5216966", "0.5214809", "0.52077913", "0.51950896", "0.5184361", "0.5180426", "0.51656085", "0.5125324", "0.51085335", "0.51025474", "0.5089763", "0.5086412", "0.5081557", "0.5078376", "0.50712", "0.50599974", "0.50578517", "0.5053169", "0.5052207", "0.50477225", "0.5030717", "0.5028677", "0.5027231", "0.5022153", "0.49923146", "0.4990677", "0.49765286", "0.49765286", "0.49681076", "0.4966896", "0.4965176", "0.49633205", "0.4957888", "0.49463263", "0.49441636", "0.49441636", "0.49370226", "0.49339098", "0.4921717", "0.49212328", "0.49212328", "0.49212003", "0.49137363", "0.49048257", "0.49034327", "0.49018818", "0.48879653", "0.48821896", "0.4874459", "0.48686844", "0.48649997", "0.48612398", "0.48605496", "0.4860265", "0.4857429", "0.48570728", "0.485035", "0.48465762", "0.48459744", "0.4844122", "0.48430356", "0.4838048", "0.4834686", "0.4834454", "0.48332715", "0.48317632", "0.482904", "0.48258352", "0.48244563", "0.4823708", "0.48174134", "0.48157603", "0.4811602", "0.48090953" ]
0.0
-1
/ This method can be used for manually postprocessing learned graphs, such that learning does not need to take place. Provide the correct stamp of the learned graph.
public void post(){ String stmp = "graphs/graph_1510816061185"; apkConstruct(); // fills apkinfo // Emulator em = new Emulator("Nexus5X"); // em.start(); AndroidEmulatorInstrumentator aei = null; // AndroidEmulatorInstrumentator aei = em.getInstrumentator(); ResultProcessor rp = new ResultProcessor(stmp, aei, this.apkInfo); rp.run(); rp.print(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n \tpublic void transformNewGraph(TransformedGraph inputGraph,\n \t\t\tTransformationContext context) throws TransformerException {\n \t\tthis.context = context;\n \n \t\ttry\n \t\t{\n \t\t\tDouble newScore = getGraphScore(inputGraph.getGraphName(), inputGraph.getMetadataGraphName(), getDirtyConnection());\n \n \t\t\tupdatePublisherScore(inputGraph.getGraphName(),\n \t\t\t\t\tinputGraph.getMetadataGraphName(),\n \t\t\t\t\tnewScore,\n \t\t\t\t\t1);\n \t\t} catch (QualityAssessmentException e) {\n \t\t\tthrow new TransformerException(e);\n \t\t} catch (DatabaseException e) {\n \t\t\tthrow new TransformerException(e);\n \t\t} finally {\n \t\t\tcloseCleanConnection();\n \t\t\tcloseDirtyConnection();\n \t\t}\n \t}", "@Override\n \tpublic void transformExistingGraph(TransformedGraph inputGraph,\n \t\t\tTransformationContext context) throws TransformerException {\n \t\tthis.context = context;\n \n \t\ttry\n \t\t{\n \t\t\tDouble outdatedScore = getGraphScore(inputGraph.getGraphName(), inputGraph.getMetadataGraphName(), getCleanConnection());\n \t\t\tDouble updatedScore = getGraphScore(inputGraph.getGraphName(), inputGraph.getMetadataGraphName(), getDirtyConnection());\n \n \t\t\tupdatePublisherScore(inputGraph.getGraphName(),\n \t\t\t\t\tinputGraph.getMetadataGraphName(),\n \t\t\t\t\tupdatedScore - outdatedScore,\n \t\t\t\t\t0);\n \t\t} catch (QualityAssessmentException e) {\n \t\t\tthrow new TransformerException(e);\n \t\t} catch (DatabaseException e) {\n \t\t\tthrow new TransformerException(e);\n \t\t} finally {\n \t\t\tcloseCleanConnection();\n \t\t\tcloseDirtyConnection();\n \t\t}\n \t}", "private void stamp() {\n mInternalStamp = SystemClock.elapsedRealtime();\n }", "private void saveGraph() {\n try(FileOutputStream fileOut = new FileOutputStream(graphPath + OVERLAY_GRAPH);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut))\n {\n objectOut.writeObject(graph);\n System.out.println(\"The overlay graph was successfully written to a file\");\n } catch (Exception ex) {\n System.out.println(\"Error writing the overlay graph\");\n ex.printStackTrace();\n }\n }", "public void createGraph() {\n System.out.println(\"The overlay graph will be created from scratch\");\n graph = new MatrixOverlayGraph();\n parse(dumpPath);\n saveGraph();\n graph.createSupporters(kdTreeSupporterActived);\n saveSupporters();\n }", "@Override\n public void preSave(BigDataStructureContainer learnedParameters, MemoryConfiguration memoryConfiguration) {\n }", "@Override\n\tpublic void backProp() {\n\t\tdouble dOut = 0;\n\t\tfor (Node n : outputs) {\n\t\t\tdOut += n.dInputs.get(this);\n\t\t}\n\t\tdouble dTotal = activationFunction.derivative(total)*dOut;\n\t\tfor (Node n : inputs) {\n\t\t\tdInputs.put(n, dTotal * weights.get(n).getWeight());\n\t\t\tweights.get(n).adjustWeight(dTotal * n.output);\n\t\t}\n\t\tbiasWeight.adjustWeight(bias * dTotal);\n\t}", "public void predictLossForDayIndex(String destinationDescription, double lossAmount, boolean addBack, double addBackAmount, int dayIndex);", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void finalSave() {\n ArrayList<ArrayList<Tensor<?>>> at = getWeights();\n\n ArrayList<float[]> diff = new ArrayList<>();\n ArrayList<ArrayList<Tensor<?>>> bt = getWeights();\n for(int x = 0; x < 4; x++)\n {\n float[] d = new float[flattenedWeight(bt.get(x).get(0)).length];\n float[] bw = flattenedWeight(bt.get(x).get(0));\n float[] aw = flattenedWeight(at.get(x).get(0));\n\n for(int j = 0; j < bw.length; j++)\n {\n d[j] = aw[j] - bw[j];\n }\n diff.add(d);\n }\n\n save(diff);\n }", "private void addGeneratedTimestamp() {\n\t\tif (getConfig().skipGeneratedTimestamps()) {\n\t\t\treturn;\n\t\t}\n\t\tString value = Processor.class.getName();\n\t\tString date = new SimpleDateFormat(\"dd MMM yyyy hh:mm\").format(new Date());\n\t\tthis.pathBindingClass.addImports(Generated.class);\n\t\tthis.pathBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t\tthis.rootBindingClass.addImports(Generated.class);\n\t\tthis.rootBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t}", "public static void processGraphInformation () {\n\n for (int i = 0; i < data.length(); i++) {\n if (data.charAt(i) == ',')\n cutPoints.add(i);\n }\n if(isNumeric(data.substring(1, cutPoints.get(0))))\n tempPPGWaveBuffer.add(Double.parseDouble(data.substring(1, cutPoints.get(0))));\n for (int j = 0; j < cutPoints.size(); j++) {\n\n if (j==cutPoints.size()-1){\n if(isNumeric(data.substring(cutPoints.get(j)+1,endOfLineIndex )))\n tempPPGWaveBuffer.add(Double.parseDouble(data.substring(cutPoints.get(j)+1,endOfLineIndex )));\n } else{\n if(isNumeric(data.substring(cutPoints.get(j) + 1, cutPoints.get(j+1))))\n tempPPGWaveBuffer.add(Double.parseDouble(data.substring(cutPoints.get(j) + 1, cutPoints.get(j+1))));\n }\n\n }\n graphIn.obtainMessage(handlerState4, Integer.toString(tempSampleTime)).sendToTarget(); //Comment this part to run junit tests\n if (tempSampleTime != 0) {\n tempReceived = true;\n graphIn.obtainMessage(handlerState2, Boolean.toString(tempReceived)).sendToTarget(); //Comment this part to run junit tests\n graphIn.obtainMessage(handlerState1, tempPPGWaveBuffer).sendToTarget(); //Comment this part to run junit tests\n } else {\n tempReceived = false;\n graphIn.obtainMessage(handlerState2, Boolean.toString(tempReceived)).sendToTarget(); //Comment this part to run junit tests\n }\n }", "@Override protected void onPreExecute() { g = new UndirectedGraph(10); }", "public void step() {\n stats.record();\n updateGraph();\n }", "private static void exportToGraphML(SimState state, String filename) {\n\t\tVertexNameProvider<Agent> vertexIDProvider = new VertexNameProvider<Agent>() { \n\t\t\t@Override\n\t\t\tpublic String getVertexName(Agent a) { return String.valueOf(a.getId()); }\n\t\t}; \n\t\tVertexNameProvider<Agent> vertexNameProvider = new VertexNameProvider<Agent>() { \n\t\t\t@Override\n\t\t\tpublic String getVertexName(Agent a) { return String.valueOf(a.getHS()); }\n\t\t};\n\t\tEdgeNameProvider<DefaultEdge> edgeIDProvider = new EdgeNameProvider<DefaultEdge>() {\n\t\t\t@Override \n\t\t\tpublic String getEdgeName(DefaultEdge edge) {\n\t\t\t\treturn g.getEdgeSource(edge) + \" > \" + g.getEdgeTarget(edge); } \n\t\t\t}; \n EdgeNameProvider<DefaultEdge> edgeLabelProvider = new EdgeNameProvider<DefaultEdge>() { \n @Override \n public String getEdgeName(DefaultEdge edge) { \n return String.valueOf(g.getEdgeWeight(edge)); \n } \n }; \n\t GraphMLExporter<Agent, DefaultEdge> exporter =\n\t \t\tnew GraphMLExporter<Agent, DefaultEdge>(vertexIDProvider, vertexNameProvider, edgeIDProvider, edgeLabelProvider);\n\t FileWriter w;\n\t\ttry {\n\t\t\tw = new FileWriter(filename+\".graphml\");\n\t\t\texporter.export(w, g); // ((SN) state).g\n\t\t\tw.close();\n\t\t} catch (Exception e) {\n\t\t\tprintlnSynchronized(e.getMessage());\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n Graph g = new GraphBuilder().build();\n //Connect the graph\n g.connect(isConnected -> {\n //Display that the graph database is connected!\n System.out.println(\"Connected : \" + isConnected);\n\n long timepoint_0 = 0; //the timestamp is a long and represents the time concept\n\n Node sensor0 = g.newNode(0, timepoint_0); //the second param is the time\n sensor0.set(\"id\", Type.STRING, \"4494F\");\n sensor0.set(\"name\", Type.STRING, \"sensor0\");\n sensor0.set(\"value\", Type.DOUBLE, 0.5); //set the value of the sensor\n\n\n long timepoint_1 = 100;\n sensor0.travelInTime(timepoint_1, (Node sensor0T1) -> {\n sensor0T1.set(\"value\", Type.DOUBLE, 21.3); //update the value of the time now\n //Display the value at time 0\n System.out.println(\"T0:\" + sensor0.toString()); //print T0:{\"world\":0,\"time\":0,\"id\":1,\"id\":\"4494F\",\"name\":\"sensor0\",\"value\":0.5}\n //Display the value at time now\n System.out.println(\"T1:\" + sensor0T1.toString()); //print T1:{\"world\":0,\"time\":100,\"id\":1,\"id\":\"4494F\",\"name\":\"sensor0\",\"value\":21.3}\n\n\n long timepoint_2= 50;\n sensor0.travelInTime(timepoint_2, (Node sensor0T2) ->{\n System.out.println(\"T2:\" + sensor0T2.toString()); //prints T2:{\"world\":0,\"time\":50,\"id\":1,\"id\":\"4494F\",\"name\":\"sensor0\",\"value\":0.5}\n });\n\n\n\n });\n\n });\n }", "public static void lastNSample() {\n Node ll1_5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n ll1_5.lastN(1);\n ll1_5.lastN(2);\n ll1_5.lastN(3);\n ll1_5.lastN(4);\n ll1_5.lastN(5);\n ll1_5.lastN(6);\n }", "void postProcess(@NotNull NodePostProcessor postProcessor);", "void analysisPostponed();", "public void graphRollingBack(Graph _graph, Request _request, Throwable _error) throws Exception {\n }", "private void postLearning(FsmLearner learner, AndroidEmulatorInstrumentator aei) {\n\t\tEmulator em = new Emulator(\"Nexus5X\");\t\t// Make sure you have setup a correct emulator\n\t\tem.start();\n\n\t\tapkConstruct(); // fills apkinfo\n\t\tResultProcessor rp = new ResultProcessor(learner.getStamp(), aei, this.apkInfo);\n\t\trp.run();\n\t\trp.print();\n\n\t}", "@Override\r\n\tprotected void afterStep() {\r\n\t\tif (pr_disappearing_potential > 0) {\r\n\t\t\tfor (V v : graph.getVertices()) {\r\n\t\t\t\tif (v instanceof TopicVertex) {\r\n\t\t\t\t\tsetOutputValue(v, getOutputValue(v) + (1 - alpha)\r\n\t\t\t\t\t\t\t* (pr_disappearing_potential * getVertexPrior(v)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpr_disappearing_potential = 0;\r\n\t\t}\r\n\t\t// not necessary for hits-hub\r\n\t\t// if (disappearing_potential.hub > 0) {\r\n\t\t// for (V v : graph.getVertices()) {\r\n\t\t// if (v instanceof TopicVertex) {\r\n\t\t// double new_hub = getOutputValue(v)\r\n\t\t// + (1 - alpha)\r\n\t\t// * (hitsCoeff * disappearing_potential.hub * getVertexPrior(v));\r\n\t\t// setOutputValue(v, new_hub);\r\n\t\t// } else if (v instanceof TopicCategoryVertex) {\r\n\t\t// // auth and hub of topic category\r\n\t\t// }\r\n\t\t// }\r\n\t\t// disappearing_potential.hub = 0;\r\n\t\t// }\r\n\t\t// if (disappearing_potential.authority > 0) {\r\n\t\t// for (V v : graph.getVertices()) {\r\n\t\t// if (v instanceof TopicCategoryVertex) {\r\n\t\t// double new_auth = getOutputValue(v)\r\n\t\t// + (1 - alpha)\r\n\t\t// * (hitsCoeff * disappearing_potential.authority * getVertexPrior(v));\r\n\t\t// setOutputValue(v, new_auth);\r\n\t\t// }\r\n\t\t// }\r\n\t\t// disappearing_potential.authority = 0;\r\n\t\t// }\r\n\r\n\t\tsuper.afterStep();\r\n\t}", "public void saveTraining(File datum) throws IOException, FileNotFoundException {\n bp.writer(datum);\n }", "protected abstract void trace_pre_updates();", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "protected synchronized void updateTimestamp() {\n\t\ttimestamp = System.currentTimeMillis();\n\t}", "@Override\r\n public void postComputeInputOutputHook()\r\n {\n if (view.isTrackingEnabled() || view.isCASelected())\r\n {\r\n //Change to time of last event, by Chao at 9.23.2019\r\n view.addTrackingAt(simulator.getTimeOfLastEvent());\r\n } \r\n \r\n if (view.isCASelected())\r\n {\r\n view.synchronizeCAView();\r\n }\r\n else\r\n {\r\n view.synchronizeView();\r\n }\r\n }", "protected void postVisit(Graph<VLabel, ELabel>.Vertex v) {\n }", "public void updatePredictions (long currTime, TimeSeries inputSeries)\n {\n\n// TODO: decide if this is necessary, it's in PPALg >>\n this.state.clearPredictionsFrom (currTime + stepSize);\n//this.state.clearPredictions();\n\n TimeSeries timeSeries = (TimeSeries) inputSeries.clone();\n\n // if timeSeries is shorter than the minimum stream do nothing.\n if (timeSeries.size() < minStreamLength)\n return;\n\n // trim the first <minPeriod> number of elements from the timeSeries.\n // this removes non-periodicity that is seen in simulators first few elements.\n\n timeSeries.trimFromStart(minPeriodLength);\n\n df.addText (\"First trim of time series : \" + timeSeries.shortToString());\n\n // find the best shift of the time series against iteself that leads to the most matching\n ArrayList shiftGraph = findBestShiftGraph (timeSeries);\n\n // trim the shifted graph to make sure we aren't starting in the middle of an event\n int amountTrimmed = trimShiftGraph (shiftGraph);\n\n df.addText (\"Trim amount : \" + amountTrimmed);\n df.addText (\"final, trimmed shift graph : \" + shiftGraph.toString());\n\n // the offset is the total amount of the time series we have discarded, it is the offset\n // to the leading edge of a periodic repeating occurence\n int offset = amountTrimmed + minPeriodLength;\n\n // create a new periodic event object\n PeriodicEvent pe = getPeriod (shiftGraph, offset);\n\n if (pe == null || pe.getEvent().isEmpty())\n {\n df.addText (\" Periodic event is null \");\n return;\n }\n\n df.addText (\" Periodic Event is : \" + pe.toString());\n\n // get the current time from which we will extrapolate\n long time = currTime;\n\n int period = pe.getPeriod();\n ArrayList event = pe.getEvent();\n\n // if we divide the timeSeries into portions the size of the time period, how much is left over?\n // for this we do not consider the trimmed amount.\n int timeSeriesSize = timeSeries.size() - amountTrimmed;\n\n if (timeSeriesSize <= period)\n return;\n int remainder = getRemainder (timeSeriesSize, period);\n df.addText (\"remainder is : \" + remainder);\n\n // cycle through the remaining portion of the last period adding any predictions based on\n // our periodic event that we have identified.\n // must subtract 1 since index is zero-base, & reaminder is one-based\n for (int i = remainder -1 ; i < event.size(); i++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (i >= 0 && event.get (i) != null)\n {\n prediction = ((Double) event.get(i)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (i)\n\n int extrapolationCount = 2;\n\n // We make <j> additional extapolation into the future beyond the last period fragment\n while (extrapolationCount > 0)\n {\n for (int j = 0; j < event.size(); j++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (event.get (j) != null)\n {\n prediction = ((Double) event.get(j)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (j)\n\n extrapolationCount--;\n } // end while (extapoliationCount)\n\n\n state.updateError (timeSeries, currTime);\n }", "private long calculatePostTime() {\n return System.currentTimeMillis();\n }", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "@Procedure(value = \"mlp.train\", mode = WRITE)\n @Description(\"Backward pass through NN\")\n public void train(@Name(value = \"no. of passes\") long nPasses) {\n\n DataLogger logger = new DataLogger(\"proto1\", \"error\");\n\n for (int i = 0; i < nPasses; i++) {\n updateTrainRate(i + 1);\n forwardPass();\n\n double error = calculateError();\n\n double reward = 1.0 - error;\n\n// if (Math.random() > 0.9) reward = error;\n\n backwardPass(reward);\n moveNext();\n\n\n// System.out.println(String.format(\"Error: %f\", error));\n// if (i % 100 == 0 && i > 0) {\n// double meanError = errors.stream().reduce(0.0, Double::sum) / 100;\n// System.out.println(String.format(\n// \"Mean error: %f, eta: %f\", meanError, eta));\n// errors.clear();\n// }\n// errors.add(error);\n logger.append(error);\n\n\n }\n\n forwardPass();\n logger.close();\n }", "@Override\n\tvoid bp_adam(double learning_rate, int epoch_num) {\n\t\t\n\t}", "private void updateTimeStamp() {\n\t\tthis.timeStamp = new Timestamp(System.currentTimeMillis());\n\t}", "private void processNewFile(String filename) throws IOException {\n \n /*read posture information from file*/\n Posture posture = new Posture(filename);\n /* keep the predictions made by each activity HMM to later choose the best one*/\n Map<Activity, Prediction> predictions = new EnumMap<Activity, Prediction>(Activity.class);\n Prediction prediction;\n Map.Entry<Activity, Prediction> bestPrediction;\n String predictedActivity;\n int preds[], predictedActivityIndex;\n int frameNumber = FileNameComparator.getFileNumber(filename);\n \n for (Activity activity : Activity.values()) {\n /* make a prediction using an activity's HMM*/\n prediction = predictActivity(activity, posture, filename);\n predictions.put(activity, prediction);\n }\n \n /* select the best prediction */\n bestPrediction = chooseBestPrediction(predictions);\n \n preds = bestPrediction.getValue().getPredictions();\n \n /* check to see if no activity has been detected */\n if (preds[preds.length - 1] == 1) {\n predictedActivity = bestPrediction.getKey().getName();\n predictedActivityIndex = bestPrediction.getKey().getIndex();\n } else {\n predictedActivity = \"no activity\";\n predictedActivityIndex = 0;\n }\n \n \n System.out.println(\"Activity from frame \" + frameNumber + \": \" + predictedActivity);\n \n /* log activity prediction to file */\n appendActivityToFile(frameNumber, predictedActivityIndex, bestPrediction.getValue().getProbability());\n \n \n }", "public void prediction() {\n\t\txPriorEstimate = xPreviousEstimate;\n\t\tpPriorCovarianceError = pPreviousCovarianceError;\n\t}", "@Override\n\tpublic void postProcess(NodeCT node) {\n\t}", "public void retrace(){\n\t\t//look at the sPath stack\n\t\tPoint temp = sPath.peek();\n\t\t// find neighbor with lowest score\n\t\tPoint lNeighbor = backtrack(temp);\n\t\t// coordinates of lNeighbor\n\t\tint x = (int) lNeighbor.getX();\n\t\tint y = (int) lNeighbor.getY();\n\t\t// score of neighbor\n\t\tint score = topology[x][y];\n\t\t// if there is no more neighbor then lNeighbor = temp\n\t\t// then we reach the Start then\n\t\twhile(score!=0){\n\t\t\t// push that neighbor on the stack\n\t\t\tsPath.push(lNeighbor);\n\t\t\t// update temp and lNeighbor\n\t\t\ttemp = sPath.peek();\n\t\t\tlNeighbor = backtrack(temp);\n\t\t\t// coordinates of lNeighbor\n\t\t\tx = (int) lNeighbor.getX();\n\t\t\ty = (int) lNeighbor.getY();\n\t\t\t// score of neighbor\n\t\t\tscore = topology[x][y];\n\t\t}\n\t\t// we have to do that until we see the start with score 0\n\t\t// the last lNeighbor is the S with score = 0, push it to the stack\n\t\tsPath.push(lNeighbor);\n\t\twhile(!sPath.isEmpty()){\n\t\t\tPoint track = sPath.pop();\n\t\t\tSystem.out.println(\"(\"+(int)track.getX()+\",\"+(int)track.getY()+\")\");\n\t\t}\n\t}", "private void exportGraphML()\r\n {\r\n // Create the file filter.\r\n SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n new SimpleFileFilter(\"xml\", \"Graph ML (*.xml)\")\r\n };\r\n \r\n // Save the file.\r\n String file = openFileChooser(false, filters);\r\n \r\n // Write the file.\r\n if (file != null)\r\n {\r\n String extension = file.substring(file.length() - 4);\r\n if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n Writer.writeGraphML(m_graph, file);\r\n }\r\n }", "private void generateGraphSignature() {\n \t this.generateVertexSignatures();\n \t Collections.sort(this.vertexSignatures);\n \t this.graphSignature = this.vertexSignatures.get(0);\n \t}", "protected void doPostAlgorithmActions() {\r\n\r\n if (displayLoc == NEW) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "public void saveWorkflow() {\n\t\tsaveWorkflow(engine.getGUI().getGraphCanvas());\n }", "public void updateGraph(){\n\t\tgraph.update(updatePopulations(), iteration);\n\t\titeration++;\n\t}", "private final void restoreOriginalGraph() {\n // Safeguard against multiple restores\n if (startIndex == -1) return;\n \n markEdgesFrom(startIndex, false);\n markEdgesFrom(endIndex, false);\n markHasEdgeToGoal(false);\n nOutgoingEdgess[endIndex] = endOriginalSize;\n nOutgoingEdgess[startIndex] = startOriginalSize;\n nEdges = originalNEdges;\n\n nNodes = originalSize;\n startIndex = -1;\n endIndex = -1;\n }", "private void backPropagate(Node node, double playoutResult) {\n while (node != null) {\n node.addVisit(playoutResult);\n node = node.getParentNode();\n }\n }", "void checkpoint() throws IOException;", "String targetGraph();", "private static void postProcess() {\n Set<Transition> ts = petrinet.getTransitions();\n for(Transition t : ts) {\n List<Flow> outEdges = new ArrayList<Flow>(t.getPostsetEdges());\n List<Flow> inEdges = new ArrayList<Flow>(t.getPresetEdges());\n try {\n Flow f = petrinet.getFlow(t.getId(), \"void\");\n System.out.println(\"contain void!\");\n assert(f.getWeight() == 1);\n //if (outEdges.size() == 1) { // Delete the transition.\n f.setWeight(0);\n //}\n } catch (NoSuchEdgeException e) {}\n }\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "private void backupState(BPState curState) {\n\t\tprogram.generageCFG(\"/asm/cfg/\" + program.getFileName() + \"_test\");\n\t\tprogram.getResultFileTemp().appendInLine(\n\t\t\t\tprogram.getDetailTechnique() + \" Nodes:\" + program.getBPCFG().getVertexCount() + \" Edges:\"\n\t\t\t\t\t\t+ program.getBPCFG().getEdgeCount() + \" \");\n\t}", "void processGraphData(Graph aNodes);", "@Override\n public void process(ElkNode graph, IElkProgressMonitor progressMonitor) {\n progressMonitor.begin(\"WorkingDummyNodePlacementPhase\", graph.getChildren().size());\n Map<Integer, List<ElkNode>> layers = Util.getLayers(graph);\n\n double maxX = 0;\n double maxY = 0;\n double maxWidth = 0;\n ArrayList<LinkedList<ElkNode>> dummyNodePositions = new ArrayList<LinkedList<ElkNode>>();\n ArrayList<LinkedList<ElkNode>> dummyNodeConnections = new ArrayList<LinkedList<ElkNode>>();\n\n for (int i = 0; i < graph.getProperty(LayerBasedMetaDataProvider.OUTPUTS_LAYER_COUNT); i++) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n maxY = 0;\n maxWidth = 0;\n List<ElkNode> layer = layers.getOrDefault(i, Collections.<ElkNode> emptyList());\n ArrayList<LinkedList<ElkNode>> dummyNodePositionsInLayer = new ArrayList<LinkedList<ElkNode>>();\n \n\n layer.sort(Util.COMPARE_POS_IN_LAYER);\n\n for (ElkNode node : layer) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n // Special case for dummy nodes\n if (node.getProperty(LayerBasedLayoutMetadata.OUTPUTS_IS_DUMMY)) {\n Boolean set = false;\n\n for (ElkEdge e : node.getIncomingEdges()) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n if (Util.getSource(e).getProperty(LayerBasedLayoutMetadata.OUTPUTS_IS_DUMMY)) {\n\n // Has to be at the same Y as the last Dummy connected to\n if (Util.getSource(e).getY() < maxY) {\n node.setY(maxY);\n for (LinkedList<ElkNode> dummylines : dummyNodeConnections) {\n if (dummylines.peekLast() == Util.getSource(e)) {\n changeAllBefore(dummylines, dummyNodePositions, dummyNodeConnections, maxY);\n }\n }\n maxY += node.getHeight() + 20;\n } else {\n node.setY(Util.getSource(e).getY());\n maxY = node.getY() + 20; // TODO make the margin an optiopn\n }\n set = true;\n for (LinkedList<ElkNode> dummylines : dummyNodeConnections) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n if (dummylines.peekLast() == Util.getSource(e)) {\n dummylines.add(node);\n }\n }\n }\n }\n if (!set) {\n node.setY(maxY);\n maxY += node.getHeight() + 20; // TODO make the margin an option\n LinkedList<ElkNode> l = new LinkedList<ElkNode>();\n l.add(node);\n dummyNodeConnections.add(l);\n }\n dummyNodePositionsInLayer.add(new LinkedList<ElkNode>());\n\n } else {\n node.setY(maxY);\n maxY += node.getHeight() + 20; // TODO make the margin an option\n }\n node.setX(maxX);\n maxWidth = Math.max(maxWidth, node.getWidth());\n for (LinkedList<ElkNode> following : dummyNodePositionsInLayer) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n following.add(node);\n }\n }\n\n for (ElkNode node : layer) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n if (node.getProperty(LayerBasedLayoutMetadata.OUTPUTS_IS_DUMMY)) {\n node.setWidth(maxWidth);\n }\n progressMonitor.worked(1);\n }\n dummyNodePositions.addAll(dummyNodePositionsInLayer);\n maxX += maxWidth + 20; // TODO make the margin an option\n\n }\n \n progressMonitor.done();\n\n }", "@Override\n\tpublic double predict(long timestamp, SparseVector instance) {\n\t\treturn predict(instance);\n\t}", "public BackPropagationLearningProcess(NeuralNetwork network) {\r\n\t\tsuper(network);\r\n\t}", "public void drawGraph(){\n this.post(new Runnable(){\n @Override\n public void run(){\n removeAllSeries();\n addSeries(xySeries);\n addSeries(currentPoint);\n //addSeries(currentPoint);\n }\n });\n }", "private void save(ComputationGraph net) throws Exception {\r\n ModelSerializer.writeModel(net, locationToSave, saveUpdater);\r\n }", "@Override\n public void ppgRaw(int ppgRaw, int timestamp) {\n }", "private static HashMap<String, String> getLastCheckpoint() {\n return checkpoints.remove(Thread.currentThread());\n }", "@Override\n\tprotected void postprocess(Classifier classifier, PipelineData data) throws Exception {\n\t}", "public void applyBackpropagation( float expectedOutput[] ) {\n\t\t// The code for updating weights goes here \n\t\t// NOTE: if using a single perceptron, this is not technically back-propagation, despite the function name \n }", "private void backwardPropagation(int[] trainingData, int[] trainingLabel, double[] outputActivations, double[] hiddenActiv) {\n\t\tdouble[] delta = new double[SIZE_OUTPUT_LAYER];\n\t\t// Update OutputLayer weights\n\t\tfor(int indexOutput = 0; indexOutput < SIZE_OUTPUT_LAYER; indexOutput++) {\n\t\t\t// We define delta as the difference between the real label and the softmax probability\n\t\t\tdelta[indexOutput] = trainingLabel[indexOutput] - outputActivations[indexOutput];\n\n\t\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden++) {\n\t\t\t\tweightsOfOutputLayer[indexOutput][indexHidden] += learningRate * delta[indexOutput] * hiddenActiv[indexHidden] / datasetSize;\n\t\t\t}\t\n\t\t\tbiasOfOutputLayer[indexOutput] += learningRate * delta[indexOutput] / datasetSize;\n\t\t}\t\n\t\t// Create delta2 \n\t\tdouble[] delta2 = new double[SIZE_HIDDEN_LAYER];\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tdelta2[i] = 0;\n\t\t\tfor(int j = 0; j < SIZE_OUTPUT_LAYER; j++) {\n\t\t\t\t// Why is it multiplying the weights for delta1?\n\t\t\t\tdelta2[i] += delta[j] * weightsOfOutputLayer[j][i];\n\t\t\t}\n\t\t\tdelta2[i] *= dtanh(hiddenActiv[i]);\n\t\t}\n\t\t// Update HiddenLayer weights\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_INPUT_LAYER; j++) {\n weightsOfHiddenLayer[i][j] += learningRate * delta2[i] * (double)trainingData[j] / datasetSize;\n\t\t\t}\n biasOfHiddenLayer[i] += learningRate * delta2[i] / datasetSize;\n\t\t}\t\n\t}", "protected void updateTelemetry(){\n telemetry.addData(\"Runtime\", this.getRuntime());\n Robot.outputToTelemetry(this);\n telemetry.update();\n }", "public void commitExploration() {\n watermarkCommittedTick = watermarkGoalTick;\n }", "public void generateGraph() {\n\t\tMap<Integer, MovingFObject> map = sc.getInitPos();\r\n\t\tgraph = new boolean[map.size()][map.size()];\r\n\t\tfor(int i = 0; i < map.size(); i++) {\r\n\t\t\tMovingFObject cloned = map.get(i).duplicate();\r\n\t\t\tArrayList<Location> locs = sc.traceLinearMotion(i,sc.getMaxVelocity(),cloned.getGoal());\r\n\t\t\tfor(int j = 0; j < map.size(); j++) {\r\n\t\t\t\tif(j != i) {\r\n\t\t\t\t\tfor(int k = 0; k < locs.size(); k++) {\r\n\t\t\t\t\t\tcloned.setLocation(locs.get(k));\r\n\t\t\t\t\t\tif(cloned.locationTouchingLocation(1, map.get(j), 2)) {\r\n\t\t\t\t\t\t\tgraph[i][j] = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(cloned.locationTouchingLocation(1, map.get(j), 0)) {\r\n\t\t\t\t\t\t\tgraph[j][i] = true;\r\n\t\t\t\t\t\t}\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}", "protected void doPostAlgorithmActions() {\r\n if (outputPanel.isOutputNewImageSet()) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "public ForwardFlowAnalysisVerification(DirectedGraph<N> graph)\n {\n super(graph);\n String filePath = \"/tmp/traceLog\";\n File logFile = new File(filePath);\n \n //branchLogIt = getBranchIterator(logFile);\n \n\t\ttry {\n\t\t\tbranchLogIt = FileUtils.lineIterator(logFile, \"UTF-8\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "Graph getRecentGraph();", "public void buildGraph(){\n\t}", "void createGraphForDistributedSingleLoad();", "@Override\n public void ppgDer(int ppgDer, int timestamp) {\n }", "public void trainingPreprocessing() {\n neuralNetAndDataSet = new NeuralNetAndDataSet(neuralNetwork, trainingSet);\n trainingController = new TrainingController(neuralNetAndDataSet);\n neuralNetwork.getLearningRule().addListener(this);\n trainingController.setLmsParams(0.7, 0.01, 0);\n LMS learningRule = (LMS) this.neuralNetAndDataSet.getNetwork().getLearningRule();\n if (learningRule instanceof MomentumBackpropagation) {\n ((MomentumBackpropagation) learningRule).setMomentum(0.2);\n }\n }", "@Override\r\n public void onThinking() {\n }", "@Override\n /**\n * Write the trained model back to stored location.\n */\n public void cleanup(\n BSPPeer<LongWritable, FloatVectorWritable, NullWritable, NullWritable, ParameterMessage> peer) {\n if (peer.getPeerIndex() == peer.getNumPeers() - 1) {\n try {\n LOG.info(String.format(\"End of training, number of iterations: %d.\",\n this.iterations));\n LOG.info(String.format(\"Write model back to %s\",\n inMemoryModel.getModelPath()));\n this.inMemoryModel.writeModelToFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void notify(final ParseResult parseResult) {\n final Calendar when = parseResult.getLocalTimestamp();\n assert( ! when.before(this.lastLearningTime) );\n\n if(when.get(Calendar.DAY_OF_YEAR) !=\n this.lastLearningTime.get(Calendar.DAY_OF_YEAR) \n || when.get(Calendar.YEAR) !=\n this.lastLearningTime.get(Calendar.YEAR)) {\n this.reset();\n }\n\n this.lastLearningTime = when;\n\n if(parseResult.values(0) != null \n && parseResult.values(0).get(field)!=null) {\n final double val = parseResult.values(0).get(field);\n this.learnValue(when, val);\n }\n }", "void save(Graph<V,E> graph, String filename);", "public void updateOriginal() {\n for (Node node : originalGraph.nodes()) {\n mirrorAttributesToOriginal(node);\n }\n for (Edge edge : originalGraph.edges()) {\n mirrorAttributesToOriginal(directEdgeMap.get(edge));\n }\n }", "@Override\n public void backward() {\n Tensor x = modInX.getOutput();\n Tensor tmp = new Tensor(yAdj); // copy\n tmp.elemDivide(x);\n modInX.getOutputAdj().elemAdd(tmp);\n }", "public void resetGraph(){\n removeAllSeries();\n removeSeries(xySeries);\n removeSeries(currentPoint);\n xySeries = new PointsGraphSeries<>();\n currentPoint = new PointsGraphSeries<>();\n initGraph();\n }", "public void script() {\n ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n pc.newProject();\n Workspace workspace = pc.getCurrentWorkspace();\n\n //Generate a new random graph into a container\n Container container = Lookup.getDefault().lookup(Container.Factory.class).newContainer();\n RandomGraph randomGraph = new RandomGraph();\n randomGraph.setNumberOfNodes(500);\n randomGraph.setWiringProbability(0.005);\n randomGraph.generate(container.getLoader());\n\n //Append container to graph structure\n ImportController importController = Lookup.getDefault().lookup(ImportController.class);\n importController.process(container, new DefaultProcessor(), workspace);\n\n //Add a fake 'Date' column to nodes\n GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);\n\n //Add a random date to all nodes - between 1990 and 2010\n Graph graph = graphModel.getGraph();\n Random random = new Random();\n for (Node n : graph.getNodes()) {\n Integer randomDataValue = random.nextInt(21) + 1990;\n n.addInterval(new Interval(randomDataValue, Double.POSITIVE_INFINITY));\n }\n\n //Execute metric\n StatisticsController statisticsController = Lookup.getDefault().lookup(StatisticsController.class);\n DynamicDegree degree = new DynamicDegree();\n degree.setWindow(1.0);\n degree.setTick(1.0);\n degree.setBounds(graphModel.getTimeBounds());\n statisticsController.execute(degree);\n\n //Get averages\n System.out.println(\"Average degree:\");\n TimestampDoubleMap averages = (TimestampDoubleMap) graph.getAttribute(DynamicDegree.DYNAMIC_AVGDEGREE);\n for (double t : averages.getTimestamps()) {\n System.out.println(t + \" -> \" + averages.getDouble(t));\n }\n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "public void startExploration() {\n watermarkGoalTick = currentTick;\n }", "public ProcessingTarget buildGraph(){\n \t\tgetTibbrGraph();\n \n \t\t//Init a project - and therefore a workspace\n \t\tProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n \t\tpc.newProject();\n \t\tWorkspace workspace = pc.getCurrentWorkspace();\n \n \t\t//Get a graph model - it exists because we have a workspace\n \t\tGraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();\n \t\tAttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n \t\tImportController importController = Lookup.getDefault().lookup(ImportController.class);\n \n \t\t//Import file \n \t\tContainer container;\n \t\ttry {\n \t\t\tFile f = new File(this.filename);\n \t\t\tcontainer = importController.importFile(f);\n \t\t\tcontainer.getLoader().setEdgeDefault(EdgeDefault.DIRECTED); //Force DIRECTED\n \t\t container.setAllowAutoNode(false); //Don't create missing nodes\n \t\t} catch (Exception ex) {\n \t\t\tex.printStackTrace();\n \t\t\treturn null;\n \t\t}\n \n \t\t//Append imported data to GraphAPI\n \t\timportController.process(container, new DefaultProcessor(), workspace);\n \n \t\t//See if graph is well imported\n \t\t//DirectedGraph graph = graphModel.getDirectedGraph();\n \t\t//---------------------------\n \n \t\t//Layout for 1 minute\n \t\tAutoLayout autoLayout = new AutoLayout(5, TimeUnit.SECONDS);\n \t\tautoLayout.setGraphModel(graphModel);\n \t\t//YifanHuLayout firstLayout = new YifanHuLayout(null, new StepDisplacement(1f));\n \t\tForceAtlasLayout secondLayout = new ForceAtlasLayout(null);\n \t\tAutoLayout.DynamicProperty adjustBySizeProperty = AutoLayout.createDynamicProperty(\"forceAtlas.adjustSizes.name\", Boolean.TRUE, 0.1f);//True after 10% of layout time\n \t\tAutoLayout.DynamicProperty repulsionProperty = AutoLayout.createDynamicProperty(\"forceAtlas.repulsionStrength.name\", new Double(10000.), 0f);//500 for the complete period\n \t\t//autoLayout.addLayout( firstLayout, 0.5f );\n \t\tautoLayout.addLayout(secondLayout, 1f, new AutoLayout.DynamicProperty[]{adjustBySizeProperty, repulsionProperty});\n \t\tautoLayout.execute();\n \n \n \n \n \n \t\t//Rank color by Degree\n \t\tRankingController rankingController = Lookup.getDefault().lookup(RankingController.class);\n\t\tRanking<?> degreeRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, Ranking.DEGREE_RANKING);\n\t\tAbstractColorTransformer<?> colorTransformer = (AbstractColorTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_COLOR);\n \n \t\tcolorTransformer.setColors(new Color[]{new Color(0xFEF0D9), new Color(0xB30000)});\n \t\trankingController.transform(degreeRanking,colorTransformer);\n \n \t\t//Get Centrality\n \t\tGraphDistance distance = new GraphDistance();\n \t\tdistance.setDirected(true);\n \t\tdistance.execute(graphModel, attributeModel);\n \n \t\t//Rank size by centrality\n \t\tAttributeColumn centralityColumn = attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);\n\t\tRanking<?> centralityRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> sizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_SIZE);\n \t\tsizeTransformer.setMinSize(3);\n \t\tsizeTransformer.setMaxSize(20);\n \t\trankingController.transform(centralityRanking,sizeTransformer);\n \n \t\t//Rank label size - set a multiplier size\n\t\tRanking<?> centralityRanking2 = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> labelSizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.LABEL_SIZE);\n \t\tlabelSizeTransformer.setMinSize(1);\n \t\tlabelSizeTransformer.setMaxSize(3);\n \t\trankingController.transform(centralityRanking2,labelSizeTransformer);\n \n \t\tfloat[] positions = {0f,0.33f,0.66f,1f};\n \t\tcolorTransformer.setColorPositions(positions);\n \t\tColor[] colors = new Color[]{new Color(0x0000FF), new Color(0xFFFFFF),new Color(0x00FF00),new Color(0xFF0000)};\n \t\tcolorTransformer.setColors(colors);\n \n \t\t\n \t\t//---------------------------------\n \t\t//Preview configuration\n \t\tPreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);\n \t\tPreviewModel previewModel = previewController.getModel();\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.DIRECTED, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.BACKGROUND_COLOR, Color.BLACK);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.NODE_LABEL_COLOR, new DependantOriginalColor(Color.YELLOW));\n \t\t\n \t\t\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_CURVED, Boolean.TRUE);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_OPACITY, 100);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_RADIUS, 1f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,0.2f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.ARROW_SIZE,0.2f);\n \n \t\tpreviewController.refreshPreview();\n \n \t\t//----------------------------\n \n \t\t//New Processing target, get the PApplet\n \t\tProcessingTarget target = (ProcessingTarget) previewController.getRenderTarget(RenderTarget.PROCESSING_TARGET);\n \t\t\n \t\tPApplet applet = target.getApplet();\n \t\tapplet.init();\n \n \t\t// Add .1 second delay to fix stability issue - per Gephi forums\n try {\n \t\t\t\tThread.sleep(100);\n \t\t\t} catch (InterruptedException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \n \t\t\n \t\t//Refresh the preview and reset the zoom\n \t\tpreviewController.render(target);\n \t\ttarget.refresh();\n \t\ttarget.resetZoom();\n \t\ttarget.zoomMinus();\n \t\ttarget.zoomMinus();\n \t\t\n \t\treturn target;\n \t\t\n \n \t}", "@Nonnull\n @Override\n public PlannerGraph rewritePlannerGraph(@Nonnull List<? extends PlannerGraph> childGraphs) {\n final var graphForTarget =\n PlannerGraph.fromNodeAndChildGraphs(\n new PlannerGraph.DataNodeWithInfo(NodeInfo.BASE_DATA,\n getResultType(),\n ImmutableList.of(getTargetRecordType())),\n ImmutableList.of());\n\n return PlannerGraph.fromNodeInnerAndTargetForModifications(\n new PlannerGraph.ModificationOperatorNodeWithInfo(this,\n NodeInfo.MODIFICATION_OPERATOR,\n ImmutableList.of(\"INSERT\"),\n ImmutableMap.of()),\n Iterables.getOnlyElement(childGraphs), graphForTarget);\n }", "public StampRes stamp(Stamp stamp) {\n\n\t\t// check validity of arguments\n\t\tcheckStampObjectValidity(stamp);\n\t\t// execute\n\t\tStampRes res = (StampRes) pdf4meClient.customHttp.postUniversalObject(stamp, StampRes.class, \"Stamp/Stamp\");\n\t\t// check response for errors\n\t\tif (res == null) {\n\t\t\tthrow new Pdf4meBackendException(\"Server Error\");\n\t\t} else {\n\t\t\tResponseChecker.checkDocumentForErrors(res.getDocument());\n\t\t}\n\t\treturn res;\n\t}", "public PollutedVarsPointsToAnalysis(DirectedGraph<Unit> graph) {\n super(graph);\n emptyMap = new HashMap<>();\n initialMap = new HashMap<>();\n\n }", "private void tracePath(Node lastVisitedNode)\r\n {\r\n Node pathPtr = lastVisitedNode;\r\n while (pathPtr != Start)\r\n {\r\n pathPtr.isVisited = true;\r\n pathPtr = pathPtr.parent;\r\n }\r\n }", "@Override\n public void redo()\n {\n story.setEstimate(newEstimate);\n }", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void initializeGraph() {\n checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString());\n checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n inputStream = getAssets().open(\"final_graph_hdd.pb\");\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n graph.importGraphDef(graphDef);\n try {\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "void createGraphForSingleLoad();", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void finalSave1() {\n ArrayList<ArrayList<Tensor<?>>> at = getWeightsPrueba();\n int ctr = 0;\n ArrayList<float[]> diff = new ArrayList<>();\n ArrayList<ArrayList<Tensor<?>>> bt = getWeightsPrueba();\n for (int x = 0; x < 2; x++) { ///vale 2 porque solo w1 y b1\n ArrayList<Tensor<?>> u1 = at.get(x); //para pruebas\n Tensor<?> u = at.get(x).get(0); //variable auxiliar para pruebas\n float[] d = new float[flattenedWeight(bt.get(x).get(0)).length];\n float[] bw = flattenedWeight(bt.get(x).get(0));\n float[] aw = flattenedWeight(at.get(x).get(0));\n\n diff.add(aw);\n\n // float aux = at.get(x).get(0);\n // diff.add(at.get(x).get(0));\n for(int j = 0; j < bw.length; j++)\n {\n d[j] = aw[j] - bw[j];\n }\n diff.add(d);\n }\n Log.i(\"COUNTER: \", String.valueOf(ctr));\n savePrueba1(diff);\n }", "public interface GraphTransformationAlgorithm {\n\n /**\n * Return whether the algorithm will perform another transformation.\n *\n * @return true if there is another transformation\n */\n public boolean hasNextStep();\n\n /**\n * Perform the next transformation step and return a description of the\n * transformation.\n *\n * @return description of the transformation\n */\n public String nextStep();\n\n /**\n * Report the current progress of the transformation as an integer between 0\n * and 100.\n *\n * @return progress indication\n */\n public int getProgress();\n\n /**\n * Perform reduction algorithm.\n *\n * @param verbose\n * if true report each step to stdout\n * @return a description of the transformation sequence\n */\n public List<String> run(boolean verbose);\n\n /**\n * Restore the original graph.\n */\n public void reset();\n\n /**\n * Return the normalized length of the specified reduction sequence.\n *\n * <p>\n * The normalized length is the number of Delta-Wye or Wye-Delta\n * transformations required for reduction to K1.\n *\n * @param sequence\n * the reduction sequence to normalize\n * @return normalized length\n */\n public int normalizedLength(List<String> sequence);\n\n /**\n * Return the number of Delta-Wye transformations contained in the specified\n * reduction sequence.\n *\n * @param sequence\n * the reduction sequence to analyze\n * @return number of delta-wye transformations\n */\n public int deltaWyeCount(List<String> sequence);\n\n /**\n * Return the number of Wye-Delta transformations contained in the specified\n * reduction sequence.\n *\n * @param sequence\n * the reduction sequence to analyze\n * @return number of wye-delta transformations\n */\n public int wyeDeltaCount(List<String> sequence);\n\n}", "protected void postRun() {\r\n\t\tthis.calculateFlowBandwidthHops();\r\n\t\tdouble abt = this.ABT();\r\n\t\tdouble agt = this.AGT();\r\n\t\tthis.metrics.add(new ResultMetric(\"ABT\", abt));\r\n\t\tthis.metrics.add(new ResultMetric(\"AGT\", agt));\r\n\t\tthis.metrics.add(new ResultMetric(\"Hops\", this.Hops()));\r\n\t\tthis.metrics.add(new ResultMetric(\"AveHops\", this.Hops()\r\n\t\t\t\t/ this.flows.size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"SuccCount\", this.successfulCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"FailCount\", this.failedCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"ServerNum\", this.dcn\r\n\t\t\t\t.getServerUUIDs().size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"ThroughputPerLink\", abt\r\n\t\t\t\t/ this.dcn.linkCount()));\r\n\t}", "@Override\n public void postLoad(BigDataStructureContainer learnedParameters, MemoryConfiguration memoryConfiguration) {\n }", "@Override\n public void ptt(int value, int timestamp) {\n }", "public String toCheckpoint() {\n return null;\n }", "@Override\n\tpublic void postRound() {\n\t\t\n\t\tJsensor.log(\"Number of Nodes, Number of Channels, Number of Nodes that Joined the Fat-tree, Number of Sensors that Found a Channel, Number of Control Messages, Number of App Messages, Number of App Messages Received by the Sink, Number of Retransmissions\");\n\t\tJsensor.log(\"\" + Jsensor.numNodes +\n\t\t\t\t\t\", \" + Sink.NUM_OF_CHANNELS +\n\t\t\t\t\t\", \" + Sensor.getNumberOfSensorsInTheFatTree() +\n\t\t\t\t\t\", \" + Sensor.getNumberOfSensorThatFoundAChannel() +\n\t\t\t\t\t\", \" + TmcpMessage.getControlMessageCount() +\n\t\t\t\t\t\", \" + TmcpMessage.getJobMessageCount() +\n\t\t\t\t\t\", \" + Sink.getJobMessagesReceived() +\n\t\t\t\t\t\", \" + Sensor.getNumberOfRetransmissions());\n\t}", "public void setDatasetLastAddedToNow() {\n this.datasetLastAdded = new Date();\n }", "public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }", "public void outputCurrentGraphStatistics(ONDEXGraph graph) {\n fireEventOccurred(new GeneralOutputEvent(\"\\nGraph Statistics for \" + graph.getName(), getCurrentMethodName()));\n ONDEXIterator<ONDEXConcept> cit = graph.getConcepts();\n fireEventOccurred(new GeneralOutputEvent(\"\\nConcepts: \" + cit.size(), getCurrentMethodName()));\n cit.close();\n cit = null;\n ONDEXIterator<ONDEXRelation> rit = graph.getRelations();\n if (rit == null) {\n fireEventOccurred(new GeneralOutputEvent(\"\\nRelations: 0\", getCurrentMethodName()));\n } else {\n fireEventOccurred(new GeneralOutputEvent(\"\\nRelations: \" + rit.size(), getCurrentMethodName()));\n rit.close();\n }\n rit = null;\n ONDEXIterator<CV> cvit = graph.getMetaData().getCVs();\n fireEventOccurred(new GeneralOutputEvent(\"\\nCVs: \" + cvit.size(), getCurrentMethodName()));\n cvit.close();\n cvit = null;\n ONDEXIterator<ConceptClass> ccit = graph.getMetaData().getConceptClasses();\n fireEventOccurred(new GeneralOutputEvent(\"\\nCCs: \" + ccit.size(), getCurrentMethodName()));\n ccit.close();\n ccit = null;\n ONDEXIterator<RelationType> rtit = graph.getMetaData().getRelationTypes();\n fireEventOccurred(new GeneralOutputEvent(\"\\nRTs: \" + rtit.size(), getCurrentMethodName()));\n rtit.close();\n rtit = null;\n ONDEXIterator<RelationType> rtsetit = graph.getMetaData().getRelationTypes();\n fireEventOccurred(new GeneralOutputEvent(\"\\nRTsets: \" + rtsetit.size(), getCurrentMethodName()));\n rtsetit.close();\n rtsetit = null;\n }" ]
[ "0.54662603", "0.5205991", "0.51443946", "0.50832516", "0.50668746", "0.5003758", "0.49721476", "0.49448764", "0.4881084", "0.48743004", "0.48645753", "0.4859298", "0.48520023", "0.48446366", "0.48401082", "0.4834246", "0.4833688", "0.47971424", "0.4764325", "0.47636494", "0.47547847", "0.4745861", "0.47347933", "0.47239873", "0.46891305", "0.46671242", "0.46485803", "0.46290913", "0.46195886", "0.46125695", "0.46091968", "0.4608398", "0.459492", "0.45748135", "0.45665437", "0.45529348", "0.45423657", "0.45199296", "0.45050403", "0.44927564", "0.44921437", "0.4480094", "0.44768053", "0.44638094", "0.44619963", "0.44546074", "0.44458488", "0.44388312", "0.44334215", "0.44331276", "0.4429816", "0.44295722", "0.4421858", "0.44211543", "0.4416776", "0.44089434", "0.44055825", "0.4403687", "0.43995464", "0.43989664", "0.43942395", "0.43937194", "0.4392049", "0.43826398", "0.43755925", "0.43728518", "0.43724033", "0.4371274", "0.43657368", "0.43622693", "0.43578547", "0.43547443", "0.43446854", "0.43398303", "0.43397987", "0.43374524", "0.43350154", "0.43272373", "0.43233332", "0.4321512", "0.43214804", "0.4317267", "0.43159458", "0.43150386", "0.43130314", "0.4309072", "0.43082997", "0.43080512", "0.43072066", "0.4306103", "0.4305141", "0.43000758", "0.42808917", "0.4275419", "0.42745316", "0.42725182", "0.42716062", "0.42644072", "0.42611554", "0.4259379" ]
0.44206658
54
Creates a new alphabet from the window_dumps are made using this function.
public void createAlphabet() { System.out.println("This currently only works for Android. Connect your phone to the PC/Mac" + " and make sure that the bunq app is open and 'debug options' are enabled.\n"); Scanner scanner = new Scanner(System.in); System.out.println("Enter a name for your alphabet (please do use only " + "characters and underscores): "); String alphabetName = scanner.nextLine(); System.out.println("\n\nRepeat the following steps for each screen you want to include in the " + "alphabet.\n" + "1. Move to the screen you want to include on your phone.\n" + "2. Type a filename here (e.g. login.xml) and hit enter. \n\n" + "When you are done, type 'stop' instead of a filename.\n\n"); System.out.println("Enter filename (including extension): "); String input; while (scanner.hasNext()) { if ((input = scanner.nextLine()).equals("stop")) { break; } if (runAlphabetScript(alphabetName + "/" + input) != 0) { System.out.println("An error occurred. Please repeat the last action."); } System.out.println("Enter filename (including extension): "); } scanner.close(); composeAlphabet(alphabetName, "alphabet/window_dumps/" + alphabetName + "/"); // composeActivities(alphabetName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void composeAlphabet() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name for this alphabet: \");\n\t\tString alphabetName = scanner.nextLine();\n\t\tSystem.out.println(\"Please enter the location of the window dumps \" + \"(relative to the current folder): \");\n\t\tString alphabetLoc = scanner.nextLine();\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, alphabetLoc);\n\t}", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "public Alphabet()\n {\n \tthis.growing = true;\n this.map = new TObjectIntHashMap<T>();\n this.entries = new ArrayList<T>();\n }", "private void buildRack() {\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n for (char c : alphabet) {\n rack.add(new LetterTile(c,\n IMAGE_DIRECTORY,\n IMAGE_TYPE));\n }\n }", "private void generateCipher()\n {\n for (int i = 0; i < 26; i++)\n {\n if (((i + shiftKey) < 26) && ((i + shiftKey) >= 0))\n {\n cipherAlphabet[i] = Alphabet[i + shiftKey];\n }\n else\n {\n cipherAlphabet[i] = Alphabet[(i + shiftKey) - 26];\n }\n } \n }", "private void composeAlphabet(String alphabetName, String alphabetLoc) {\n\t\tAlphabetFileWriter afw = new AlphabetFileWriter(\"alphabet/\" + alphabetName + \".txt\");\n\t\ttry {\n\t\t\tafw.collectAlphabet(new File(alphabetLoc));\n\t\t\tSystem.out.println(\"An alphabet was created with name \" + alphabetName);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"An error occurred. Please try again. \" + \"Make sure you did not misspell the filelocation.\");\n\t\t}\n\t}", "private TreeMap<Character, Character> generateMap() {\r\n this.charMap = new TreeMap<Character, Character>();\r\n // generates an array of characters representing the alphabet\r\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\r\n\r\n for (int i=0; i<26; i++) {\r\n this.charMap.put(alphabet[i], alphabet[(i+key) % 26]);\r\n }\r\n\r\n return this.charMap;\r\n }", "public void generateAllKeys(){\n\t\tboolean isWhite;\n//\t\tint pitchOffset = 21;\n\t\tint pitchOffset = 1;\n\t\tint keyWidth = this.width / this.numKeys;\n\t\t\n\t\tfor(int i = 0; i<88; i++){\n\t\t\tswitch (i%12){\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 8:\n\t\t\tcase 10:\tisWhite = false;\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\tisWhite = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(isWhite)\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height, keyWidth, i+ pitchOffset, isWhite);\n\t\t\telse\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height / 2, (keyWidth * 2)/3, i+ pitchOffset, isWhite);\n\t\t}\n\t}", "public Object create(String key_letters) throws XtumlException;", "public static Alphabet create() {\n\t\tif (alphabet == null){\n\t\t\talphabet = new DNAAlphabetFactory.DNAAlphabet();\n\t\t}\n\t\treturn alphabet;\n\t}", "private void populateLetterList() {\n int numberOfTabs = LETTERS_IN_ALPHABET / numberInGroup;\n\n if (LETTERS_IN_ALPHABET % numberInGroup != 0) {\n numberOfTabs++;\n }\n for (int i = 0; i < numberOfTabs; i++) {\n Character startLetter = (char) ((i * numberInGroup) + 65);\n Character endLetter = (char) (startLetter + numberInGroup - 1);\n if ((int) endLetter > (25 + 65)) {\n endLetter = (char) (25 + 65);\n }\n startLetterList.put(startLetter, endLetter);\n }\n }", "private String createAlphabeticalIndex(int replicateIndex) {\n StringBuilder builder = new StringBuilder();\n while (replicateIndex >= 26) {\n builder.append((char) (97 + (replicateIndex % 26)));\n replicateIndex /= 26;\n replicateIndex--;\n }\n builder.append((char) (97 + replicateIndex));\n return builder.reverse().toString();\n\n }", "private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }", "private static int[] createAlternates() {\r\n\t\t// Initializes the key list\r\n\t\talternateKeys = new int[6];\r\n\t\t// Adds the KeyEvents to their respected index\r\n\t\talternateKeys[UP] = KeyEvent.VK_UP;\r\n\t\talternateKeys[LEFT] = KeyEvent.VK_LEFT;\r\n\t\talternateKeys[DOWN] = KeyEvent.VK_DOWN;\r\n\t\talternateKeys[RIGHT] = KeyEvent.VK_RIGHT;\r\n\t\talternateKeys[BUTTONA] = 2;\r\n\t\talternateKeys[BUTTONB] = 3;\r\n\t\t// Return (to the constructor, which is send to the super constructor)\r\n\t\treturn alternateKeys;\r\n\t}", "public static void initBoards(String keyword, char[] guessBoard, char[] alphabetBoard) {\n Arrays.fill(guessBoard, '_');\n for(int i = 0; i < 26; i++) alphabetBoard[i] = (char) (65 + i);\n }", "private void generateImage()\r\n {\n String[] letters = imgInfo.get(level-1).getWord().split(\" \");\r\n numOfLetter = letters.length;\r\n String newLetter = \"\";\r\n int counter=0;\r\n for(String s: letters) {\r\n newLetter += s;\r\n numOfAlpha[counter] = s.length();\r\n counter++;\r\n }\r\n charAns = new ArrayList<Character>();\r\n charAns2 = newLetter.toCharArray();\r\n letterBtnLen = 0;\r\n for (int i =0;i<newLetter.length();i++) {\r\n if(charAns.indexOf(charAns2[i]) == -1) {\r\n charAns.add(charAns2[i]);\r\n letterBtnLen++;\r\n }\r\n }\r\n int ranNum,i=0;\r\n letterBtn = new char[letterBtnLen];\r\n while(!charAns.isEmpty())\r\n {\r\n ranNum =(int) (Math.random()* charAns.size());\r\n letterBtn[i] = charAns.get(ranNum);\r\n String strAns = String.valueOf(charAns.get(ranNum));\r\n letter[i].setText(strAns);\r\n charAns.remove(ranNum);\r\n i++;\r\n }\r\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}", "public void initialize() {\n\t\tString alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\t\tint N = alphabet.length();\n\n\t\tRandom r = new Random();\n\t\tString key = \"\";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tkey+= alphabet.charAt(r.nextInt(N));\n\t\t}\n\t\tthis.key = key;\n\t}", "private void createTab() {\n tab = new char[tabSize];\n for (int i = 0; i < tabSize; i++) {\n tab[i] = tabChar;\n }\n }", "private static void crearAlmacenes(Almacen[] almacen) {\n\t\talmacen[0] = new Almacen(\"Muebles SA\", \"Poligono Industrial 34, Madrid\");\n\t\talmacen[1] = new Almacen(\"Leroy Merlin\", \"Plaza España 20, Zaragoza\");\n\t\talmacen[2] = new Almacen(\"Bricomania\", \"Gran Via 77, Barcelona\");\n\t\talmacen[3] = new Almacen(\"Ikea\", \"Calle Mayor 42, Murcia\");\n\t}", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "public void generate(){\r\n\t\tcleanMatrix();\r\n\t\tint a = 0;\r\n\t\twhile(a < parameterObj.getHeight()){\r\n\t\t\tletterMatrix[a][0]= parameterObj.getTypeChar();\r\n\t\t\tletterMatrix[a][parameterObj.getWidth()-1]= parameterObj.getTypeChar();\r\n\t\t\ta++;\r\n\t\t}\r\n\t\tint middleHeight=parameterObj.getHeight()/2;\r\n\t\tint middleWidht=parameterObj.getWidth()/2;\r\n\t\tletterMatrix[middleHeight][middleWidht] = parameterObj.getTypeChar();\r\n\t\ta=middleWidht;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][a]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t}\r\n\t\ta = middleWidht;\r\n\t\tint b = middleHeight;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][b]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t\tb++;\r\n\t\t}//fin while\r\n\t}", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAlphabet[index] = (char)(index+65) + \"\";\n }\n return regularAlphabet;\n }", "public void createAceTable() {\r\n //create ace table\r\n aceTable = new HashMap<>();\r\n\r\n //fill with values\r\n Play[] aTen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] aNine = {Play.NONE, H, S, S, S, S, S, S, S, S, S, S};\r\n Play[] aEight = {Play.NONE, H, S, S, S, S, S, S, S, S, S, S};\r\n Play[] aSeven = {Play.NONE, H, S, D, D, D, D, S, S, H, H, H};\r\n Play[] aSix = {Play.NONE, H, H, D, D, D, D, H, H, H, H, H};\r\n Play[] aFive = {Play.NONE, H, H, H, D, D, D, H, H, H, H, H};\r\n Play[] aFour = {Play.NONE, H, H, H, D, D, D, H, H, H, H, H};\r\n Play[] aThree = {Play.NONE, H, H, H, H, D, D, H, H, H, H, H};\r\n Play[] aTwo = {Play.NONE, H, H, H, H, D, D, H, H, H, H, H};\r\n\r\n aceTable.put(2, aTwo);\r\n aceTable.put(3, aThree);\r\n aceTable.put(4, aFour);\r\n aceTable.put(5, aFive);\r\n aceTable.put(6, aSix);\r\n aceTable.put(7, aSeven);\r\n aceTable.put(8, aEight);\r\n aceTable.put(9, aNine);\r\n aceTable.put(10, aTen);\r\n }", "private void setLevelUpChars() {\n /*\n * check this if you need more symbol set's\n * TODO do this right @me\n\t\t */\n String charset = KeyboardHandler.current_charset;\n if (charset.length() == 36) {\n for (int i = 0; i < 6; ++i) {\n characterAreas.get(i).setChars(\n charset.substring(i * 6, (i + 1) * 6));\n }\n }\n\n if (charset.length() == 40) {\n Log.d(\"main\",charset);\n characterAreas.get(0).setChars(charset.substring(0, 6));\n characterAreas.get(1).setChars(charset.substring(6, 14));\n characterAreas.get(2).setChars(charset.substring(14, 20));\n characterAreas.get(3).setChars(charset.substring(20, 26));\n characterAreas.get(4).setChars(charset.substring(26, 34));\n characterAreas.get(5).setChars(charset.substring(34, 40));\n }\n }", "Alphabet alphabet() {\n return _alphabet;\n }", "private String shiftAlphabet(int key) {\n return ALPHABET.substring(key) + ALPHABET.substring(0, key);\n }", "private String createRandCode() {\n final String ALPHA_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n StringBuilder builder = new StringBuilder();\n int cnt = CODE_LEN;\n while (cnt-- != 0) {\n int charPos = (int) (Math.random()*ALPHA_STRING.length());\n builder.append(ALPHA_STRING.charAt(charPos));\n }\n Log.i(\"GameCode\", \"createRandCode: \" + builder.toString());\n return builder.toString();\n }", "public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }", "private static int[] letterHist(String acharArray) {\n int[] alphabet = new int[26];\n\n for (int i = 0; i < acharArray.length(); i++) {\n char singleChar = acharArray.toLowerCase().charAt(i);\n\n if ('a' <= singleChar && 'z' >= singleChar) {\n alphabet[singleChar - 'a']++;\n }\n }\n return alphabet;\n }", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "public PlayerCharacter createAscio() {\n\t\t\n\t\t\n\t\treturn null;\n\t}", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "private void setUpKeyboardButtons() {\n mQWERTY = \"qwertyuiopasdfghjklzxcvbnm_\";\n mQWERTYWithDot = \"qwertyuiopasdfghjklzxcvbnm.\";\n\n mKeySize = mQWERTY.length();\n\n mLetterButtons = new Button[mQWERTY.length()];\n mKeyObjects = new KeyObject[mQWERTY.length() + 10];\n mIsShiftPressed = false;\n\n\n for (int i = 0; i < mQWERTY.length(); i++) {\n int id = getResources().getIdentifier(mQWERTY.charAt(i) + \"Button\", \"id\", getPackageName());\n mLetterButtons[i] = (Button) findViewById(id);\n\n final int finalI = i;\n mLetterButtons[i].setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n // create KeyObject when button is pressed and assign pressed features\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n mKeyObjects[finalI] = new KeyObject();\n\n Rect buttonShape = new Rect();\n v.getLocalVisibleRect(buttonShape);\n\n mKeyObjects[finalI].setPressedPressure(event.getPressure());\n mKeyObjects[finalI].setPressedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXPressed(event.getX());\n mKeyObjects[finalI].setCoordYPressed(event.getY());\n\n mKeyObjects[finalI].setCenterXCoord(buttonShape.exactCenterX());\n mKeyObjects[finalI].setCenterYCoord(buttonShape.exactCenterY());\n }\n\n // assign release features, check if button is canceled\n if (event.getAction() == MotionEvent.ACTION_UP) {\n mKeyObjects[finalI].setReleasedPressure(event.getPressure());\n mKeyObjects[finalI].setReleasedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXReleased(event.getX());\n mKeyObjects[finalI].setCoordYReleased(event.getY());\n\n if (mIsShiftPressed) {\n mKeyObjects[finalI].setKeyChar(Character.toUpperCase(mQWERTYWithDot.charAt(finalI)));\n } else {\n mKeyObjects[finalI].setKeyChar(mQWERTYWithDot.charAt(finalI));\n }\n\n Log.d(TAG, mKeyObjects[finalI].toString());\n\n\n // add key to buffer and update EditText\n if (mKeyBuffer.add(mKeyObjects[finalI]))\n if (mIsShiftPressed) {\n mPasswordEditText.append((mQWERTYWithDot.charAt(finalI) + \"\").toUpperCase());\n switchToLowerCase();\n } else {\n mPasswordEditText.append(mQWERTYWithDot.charAt(finalI) + \"\");\n }\n }\n\n return false;\n }\n });\n }\n\n mShiftButton = (Button) findViewById(R.id.shiftButton);\n mShiftButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mIsShiftPressed) {\n switchToLowerCase();\n } else {\n switchToUpperCase();\n }\n }\n });\n }", "public Set<Character> alphabet(){\n\t\tSet<Character> a = new HashSet<Character>();\n\t\ta.addAll(gauche.alphabet());\n\t\ta.addAll(droit.alphabet());\n\t\treturn a;\n\t}", "static char[] generateAZLowercaseAndNumbersAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateNumberChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "private void generateBack() {\n\t\tCharacter[] encodeChar = (Character[]) map.values().toArray(new Character[map.size()]);\n\t\tCharacter[] trueChar = (Character[]) map.keySet().toArray(new Character[map.size()]);\n\n\t\tString allencode = \"\";\n\t\tString allTrue = \"\";\n\n\t\tfor (int i = 0; i < encodeChar.length; i++) {\n\t\t\tallencode += encodeChar[i];\n\t\t\tallTrue += trueChar[i];\n\t\t}\n\n\t\tString code = \"import java.util.HashMap;\\n\" + \"import java.util.Map;\\n\" + \"import java.util.Scanner;\\n\"\n\t\t\t\t+ \"public class MyKey {\\n\"\n\t\t\t\t+ \"private static Map<Character, Character> map = new HashMap<Character, Character>();\\n\"\n\t\t\t\t+ \"private static char[] encodeChar = \\\"\" + allencode + \"\\\".toCharArray();\\n\"\n\t\t\t\t+ \"private static char[] trueChar = \\\"\" + allTrue + \"\\\".toCharArray();\\n\"\n\t\t\t\t+ \"private static void mapSetUp() {\\n\" + \"for (int i = 0; i < encodeChar.length; i++) {\\n\"\n\t\t\t\t+ \"map.put(encodeChar[i], trueChar[i]);\\n\" + \"}\\n\" + \"}\\n\"\n\t\t\t\t+ \"private static String decodeMessage(String message) {\\n\" + \"String decode = \\\"\\\";\\n\"\n\t\t\t\t+ \"for (int i = 0; i < message.length(); i++) {\\n\" + \"decode += map.get(message.charAt(i));\\n\" + \"}\\n\"\n\t\t\t\t+ \"return decode;\\n\" + \"}\\n\" + \"public static void main(String[] args){\\n\"\n\t\t\t\t+ \"Scanner sc = new Scanner(System.in);\\n\" + \"System.out.print(\\\"Input your encrypted message : \\\");\"\n\t\t\t\t+ \"String enMessage = sc.nextLine();\" + \"mapSetUp();\\n\"\n\t\t\t\t+ \"System.out.println(\\\"Decrypted message : \\\"+decodeMessage(enMessage));\\n\" + \"}}\";\n\t\tFile f = new File(\"MyKey.java\");\n\t\ttry {\n\t\t\tFileWriter fw = new FileWriter(f);\n\t\t\tBufferedWriter bf = new BufferedWriter(fw);\n\t\t\tbf.write(code);\n\t\t\tbf.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error about IO.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void buildCharMap() {\n\t\tcharMap = new HashMap<Character , Integer>();\n\t\tcharMap.put('a', 0);\n\t\tcharMap.put('b', 1);\n\t\tcharMap.put('c', 2);\n\t\tcharMap.put('d', 3);\n\t\tcharMap.put('e', 4);\n\t\tcharMap.put('f', 5);\n\t\tcharMap.put('g', 6);\n\t\tcharMap.put('h', 7);\n\t\tcharMap.put('i', 8);\n\t\tcharMap.put('j', 9);\n\t\tcharMap.put('k', 10);\n\t\tcharMap.put('l', 11);\n\t\tcharMap.put('m', 12);\n\t\tcharMap.put('n', 13);\n\t\tcharMap.put('o', 14);\n\t\tcharMap.put('p', 15);\n\t\tcharMap.put('q', 16);\n\t\tcharMap.put('r', 17);\n\t\tcharMap.put('s', 18);\n\t\tcharMap.put('t', 19);\n\t\tcharMap.put('u', 20);\n\t\tcharMap.put('v', 21);\n\t\tcharMap.put('w', 22);\n\t\tcharMap.put('x', 23);\n\t\tcharMap.put('y', 24);\n\t\tcharMap.put('z', 25);\t\n\t}", "static char[] generateAZLowercaseAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 2);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }", "Alphabet(String chars) {\n _charsString = chars;\n _chars = new char[chars.length()];\n for (int i = 0; i < _chars.length; i += 1) {\n if (alreadyAdded(chars.charAt(i))) {\n throw new EnigmaException(\"Alphabet cannot have duplicates.\");\n } else {\n _chars[i] = chars.charAt(i);\n }\n }\n }", "static char[] generateAZLowercaseAndNumbers(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 2);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateNumberChar();\n }\n }\n return charArray;\n }", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "private void setUp() {\n\t\tString allLetter = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. 0123456789\";\n\t\tallChar = allLetter.toCharArray();\n\t\tshuffledChar = shuffle(allLetter.toCharArray());\n\t\tmap = new HashMap<Character, Character>();\n\t\tmapSetUp();\n\t}", "public interface KeyCode {\n\n // Alphabet keys:\n int A_UPPER_CASE = 65;\n int B_UPPER_CASE = 66;\n int C_UPPER_CASE = 67;\n int D_UPPER_CASE = 68;\n int E_UPPER_CASE = 69;\n int F_UPPER_CASE = 70;\n int G_UPPER_CASE = 71;\n int H_UPPER_CASE = 72;\n int I_UPPER_CASE = 73;\n int J_UPPER_CASE = 74;\n int K_UPPER_CASE = 75;\n int L_UPPER_CASE = 76;\n int M_UPPER_CASE = 77;\n int N_UPPER_CASE = 78;\n int O_UPPER_CASE = 79;\n int P_UPPER_CASE = 80;\n int Q_UPPER_CASE = 81;\n int R_UPPER_CASE = 82;\n int S_UPPER_CASE = 83;\n int T_UPPER_CASE = 84;\n int U_UPPER_CASE = 85;\n int V_UPPER_CASE = 86;\n int W_UPPER_CASE = 87;\n int X_UPPER_CASE = 88;\n int Y_UPPER_CASE = 89;\n int Z_UPPER_CASE = 90;\n\n // int A_LOWER_CASE = 97;\n // int B_LOWER_CASE = 98;\n // int C_LOWER_CASE = 99;\n // int D_LOWER_CASE = 100;\n // int E_LOWER_CASE = 101;\n // int F_LOWER_CASE = 102;\n // int G_LOWER_CASE = 103;\n // int H_LOWER_CASE = 104;\n // int I_LOWER_CASE = 105;\n // int J_LOWER_CASE = 106;\n // int K_LOWER_CASE = 107;\n // int L_LOWER_CASE = 108;\n // int M_LOWER_CASE = 109;\n // int N_LOWER_CASE = 110;\n // int O_LOWER_CASE = 111;\n // int P_LOWER_CASE = 112;\n // int Q_LOWER_CASE = 113;\n // int R_LOWER_CASE = 114;\n // int S_LOWER_CASE = 115;\n // int T_LOWER_CASE = 116;\n // int U_LOWER_CASE = 117;\n // int V_LOWER_CASE = 118;\n // int W_LOWER_CASE = 119;\n // int X_LOWER_CASE = 120;\n // int Y_LOWER_CASE = 121;\n // int Z_LOWER_CASE = 122;\n\n // Numeric keys:\n int NUMPAD_0 = 96;\n int NUMPAD_1 = 97;\n int NUMPAD_2 = 98;\n int NUMPAD_3 = 99;\n int NUMPAD_4 = 100;\n int NUMPAD_5 = 101;\n int NUMPAD_6 = 102;\n int NUMPAD_7 = 103;\n int NUMPAD_8 = 104;\n int NUMPAD_9 = 105;\n\n int NUM_0 = 48;\n int NUM_1 = 49;\n int NUM_2 = 50;\n int NUM_3 = 51;\n int NUM_4 = 52;\n int NUM_5 = 53;\n int NUM_6 = 54;\n int NUM_7 = 55;\n int NUM_8 = 56;\n int NUM_9 = 57;\n\n int PERSIAN_0 = 1776;\n int PERSIAN_1 = 1777;\n int PERSIAN_2 = 1778;\n int PERSIAN_3 = 1779;\n int PERSIAN_4 = 1780;\n int PERSIAN_5 = 1781;\n int PERSIAN_6 = 1782;\n int PERSIAN_7 = 1783;\n int PERSIAN_8 = 1784;\n int PERSIAN_9 = 1785;\n\n // Function keys:\n int F1 = 112;\n int F2 = 113;\n int F3 = 114;\n int F4 = 115;\n int F5 = 116;\n int F6 = 117;\n int F7 = 118;\n int F8 = 119;\n int F9 = 120;\n int F10 = 121;\n int F11 = 122;\n int F12 = 123;\n\n // Control Keys:\n int BACKSPACE = 8;\n int TAB = 9;\n int ENTER = 13;\n int SHIFT = 16;\n int CTRL = 17;\n int ALT = 18;\n int PAUSE_BREAK = 19;\n int CAPS_LOCK = 20;\n int ESCAPE = 27;\n int PAGEUP = 33;\n int PAGEDOWN = 34;\n int END = 35;\n int HOME = 36;\n int LEFT = 37;\n int UP = 38;\n int RIGHT = 39;\n int DOWN = 40;\n int PRINT_SCREEN = 44;\n int INSERT = 45;\n int DELETE = 46;\n\n // Other Keys:\n int SPACE = 32;\n int EQUALITY = 61;\n int LEFT_WINDOW_KEY = 91;\n int RIGHT_WINDOW_KEY = 92;\n int SELECT_KEY = 93; // besides of right control key (context menu key, usually works like right click)\n int MULTIPLY = 106;\n int ADD = 107;\n int SUBTRACT = 109;\n int DECIMAL_POINT = 110;// . in numpad section\n int DIVIDE = 111;\n int NUM_LOCK = 144;\n int SCROLL_LOCK = 145;\n int SEMI_COLON = 186;// ;\n int EQUAL_SIGN = 187;// =\n int COMMA = 188;// ,\n int DASH = 189;// -\n int PERIOD = 190;// . in alphabet section\n int FORWARD_SLASH = 191;// /\n int GRAVE_ACCENT = 192; // `\n int OPEN_BRACKET = 219; // [\n int BACK_SLASH = 220; // \\\n int CLOSE_BRAKET = 221; // ]\n int SINGLE_QUOTE = 222; // '\n}", "public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }", "Permutation(String cycles, Alphabet alphabet) {\n _alphabet = alphabet;\n initMaps(cycles);\n }", "private StringBuffer2D makeLettersHeader(){\n int actualWidth = getActualWidth();\n StringBuffer2D sb = new StringBuffer2D();\n //letters\n for(int y=0;y<board.getWidth();++y){\n sb.appendRow(0, \" \"+\"_\".repeat((int) Math.ceil(actualWidth/2)) +\n Color.GREEN_UNDERLINED.escape(getCharForNumber(y)) +\n \"_\".repeat((int) Math.ceil(actualWidth/2)));\n }\n return sb;\n }", "public void upadateDictionary(){\n dict.setLength(0);\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n\n }", "public WordDictionary() {\n letters = new WordDictionary[26];\n }", "Pad createPad(String title);", "public void macsToForms(Verbum w){\r\n\t\tchar[] letters = w.macForm.toCharArray();\r\n\t\tArrayList<Integer> indecies = new ArrayList<Integer>();\r\n\t\tfor(int i = 0; i<letters.length; i++){ //Make into ints\r\n\t\t\tif(letters[i]=='*'){\r\n\t\t\t\tindecies.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(w.form1.equals(\"caedes\")){ //Special case\r\n\t\t\tw.form1 = w.macForm;\r\n\t\t} else {\r\n\t\t\tfor(int s : indecies){\r\n\t\t\t\tw.form1 = new StringBuffer(w.form1).insert(s, \"*\").toString();\r\n\t\t\t\tif(w.form2.length()>=findLargest(indecies)){\r\n\t\t\t\t\tw.form2 = new StringBuffer(w.form2).insert(s, \"*\").toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(w.form3.length()>=findLargest(indecies)){\r\n\t\t\t\t\tw.form3 = new StringBuffer(w.form3).insert(s, \"*\").toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(w.form4.length()>=findLargest(indecies)){\r\n\t\t\t\t\tw.form4 = new StringBuffer(w.form4).insert(s, \"*\").toString();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public static void alphabetize() {\r\n\t\tArrayList<Patron> alphabetic = dblogic.getAlphabetic();\r\n\t\tresetTable();\r\n\t\tfor (int i = 0; i < alphabetic.size(); i++) {\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronSince(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "private static String[] shiftLeft(String[] window) {\n\t\tString[] newWindow = new String[(WINDOW_SIZE * 2) + 1];\n\t\t\n\t\t// Loop through old window and populate new\n\t\tfor(int i = 1; i < window.length; i++) {\n\t\t\tnewWindow[i-1] = window[i];\n\t\t}\n\n\t\treturn newWindow;\n\t}", "private void initCharAreas() {\n\n characterAreas = new LinkedList<CharacterArea>();\n float x = 0;\n float y = 0;\n //TODO do this nice @me\n if (KeyboardHandler.character_set.length() > 36) {\n\n float width = mWidth / 10;\n float height = mHeight / 2;\n characterAreas.add(new CharacterArea(x, y, width * 3, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + width * 3, y, width * 4, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + width * 7, y, width * 3, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x, y + height, width * 3, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + width * 3, y + height, width * 4,\n height, KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + width * 7, y + height, width * 3,\n height, KeyboardHandler.char_view_light_color));\n } else {\n float width = mWidth / 3;\n float height = mHeight / 2;\n characterAreas.add(new CharacterArea(x, y, width, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + width, y, width, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + 2 * width, y, width, height,\n KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x, y + height, width, height,\n KeyboardHandler.char_view_light_color));\n characterAreas.add(new CharacterArea(x + width, y + height, width,\n height, KeyboardHandler.char_view_dark_color));\n characterAreas.add(new CharacterArea(x + 2 * width, y + height, width,\n height, KeyboardHandler.char_view_light_color));\n }\n\n setLevelUpChars();\n }", "protected void drawButtons() {\n\t\tint spaceX = 50;\n\t\tint spaceY = 500;\t\n\t\t\n\t\tint aux = 1;\n\t\tfor(int i = 65; i < 91; i++) {\n\n\t\t\tLetterButton button = new LetterButton((char) i, (25 + spaceX ) * aux, spaceY);\n\t\t\taux++;\n\t\t\tif(aux == 14) {\n\t\t\t\tspaceY += 25 + 50;\n\t\t\t\taux = 1;\n\t\t\t}\n\t\t\tthis.add(button);\n\t\t}\n\t\t\n\t}", "public static String shiftAlphabet(int shift) {\r\n int start = 0;\r\n if (shift < 0) {\r\n start = (int) 'Z' + shift + 1;\r\n } else {\r\n start = 'A' + shift;\r\n }\r\n String result = \"\";\r\n char currChar = (char) start;\r\n for (; currChar <= 'Z'; ++currChar) {\r\n result = result + currChar;\r\n }\r\n if (result.length() < 26) {\r\n for (currChar = 'A'; result.length() < 26; ++currChar) {\r\n result = result + currChar;\r\n }\r\n }\r\n return result;\r\n }", "private int runAlphabetScript(String fileName) {\n\t\tSystem.out.println(\"Executing script\");\n\t\tString out = \"alphabet/window_dumps/\" + fileName;\n\n\t\tProcess alphabetScript;\n\t\ttry {\n\t\t\tSystem.out.println(\"In try\");\n\t\t\tRuntime.getRuntime().exec(\"adb shell uiautomator dump\").waitFor();\n\t\t\tSystem.out.println(\"Done dump\");\n\t\t\t// Runtime.getRuntime().exec(\"adb pull /sdcard/window_dump.xml\n\t\t\t// alphabet/window_dumps/\" + fileName).waitFor();\n\t\t\tRuntime.getRuntime()\n//\t\t\t\t\t.exec(\"adb pull /storage/emulated/legacy/window_dump.xml alphabet/window_dumps/\" + fileName)\n\t\t\t\t\t.exec(\"adb pull /sdcard/window_dump.xml alphabet/window_dumps/\" + fileName)\n\n\t\t\t\t\t.waitFor();\n\n\t\t\tSystem.out.println(\"Done pull\");\n\t\t\treturn 0;\n\n\t\t} catch (Exception e) {\n\t\t\t// System.out.println(\"Please repeat your last action: there was a\n\t\t\t// problem executing \" + \"the script.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Ending badly\");\n\t\treturn -1;\n\t}", "public Alphabet(Alphabet o) {\n slexic = new HashMap<String, Integer>(o.slexic);\n slexicinv = new ArrayList<String>(o.slexicinv);\n spair = new HashMap<IntegerPair, Integer>(o.spair);\n spairinv = new ArrayList<IntegerPair>(o.spairinv);\n \t cast00 = cast(0, 0);\n Alphabet.debuggingInstance = this;\n }", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private void buildKeyMap() {\n\t\tcharMapKey = new HashMap<Character , Integer>();\n\t\tcharMapKey.put('a', 0);\n\t\tcharMapKey.put('b', 0);\n\t\tcharMapKey.put('c', 1);\n\t\tcharMapKey.put('d', 1);\n\t\tcharMapKey.put('e', 2);\n\t\tcharMapKey.put('f', 2);\n\t\tcharMapKey.put('g', 3);\n\t\tcharMapKey.put('h', 3);\n\t\tcharMapKey.put('i', 4);\n\t\tcharMapKey.put('j', 4);\n\t\tcharMapKey.put('k', 5);\n\t\tcharMapKey.put('l', 5);\n\t\tcharMapKey.put('m', 6);\n\t\tcharMapKey.put('n', 6);\n\t\tcharMapKey.put('o', 7);\n\t\tcharMapKey.put('p', 7);\n\t\tcharMapKey.put('q', 8);\n\t\tcharMapKey.put('r', 8);\n\t\tcharMapKey.put('s', 9);\n\t\tcharMapKey.put('t', 9);\n\t\tcharMapKey.put('u', 10);\n\t\tcharMapKey.put('v', 10);\n\t\tcharMapKey.put('w', 11);\n\t\tcharMapKey.put('x', 11);\n\t\tcharMapKey.put('y', 12);\n\t\tcharMapKey.put('z', 12);\n\t}", "public static void main(String[] args)\n\t{\n\t\t\n\t\tchar letter = 'Z';\n\t\tint count = 8;\n\t\tchar temp_letter = letter;\n\t\tint temp_count = count;\n\t\t\n\t\tfor(int a = 0; a < count ; a++) {\n\t\t\tfor(int i = 0; i < temp_count ; i++) {\n\t\t\t\tfor(int j = 0; j < count ; j++) {\n\t\t\t\t\tif(temp_letter == 'Z') {\n\t\t\t\t\t\ttemp_letter = (char)('Z' - (26 * i));\n\t\t\t\t\t} else {\n//\t\t\t\t\t\ttemp_letter = (char) (temp_letter + i);\n\t\t\t\t\t};\n\t\t\t\t\tSystem.out.print((char) (temp_letter + i));\t\n\t\t\t\t};\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tcount = count - 1;\n\t\t\t\t\n\t\t\t};\n\t\t\tSystem.out.println();\n\t\t\ttemp_count = temp_count - 1;\n\t\t\tcount = 8;\n\t\t\ttemp_letter = letter;\n\t\t}\n\t\t\t\n\t\t\t\t\n\t}", "private void createWVertices() {\n\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\tvertices.add(new Vertex('w', this.countWID++));\n\t\t}\n\t}", "private void mapSetUp() {\n\t\tfor (int i = 0; i < allChar.length; i++) {\n\t\t\tmap.put(allChar[i], shuffledChar[i]);\n\t\t}\n\t}", "public void writeNewAlpha(){\n\t\tFileSystemHandler.writeVector(Parameters.pathToAlphas, this.newAlpha);\n\t}", "static char[] generateAZLowerRange(int length) {\n charArray = new char[length];\n for (int i = 0; i < length; i++) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n }\n return charArray;\n }", "static char[] generateAZBothCasesAndSpecial(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateAZUpperRangeChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateSpecChar();\n }\n }\n return charArray;\n }", "private static Map generateCharacterMappings() {\n Log.debug(\"Generating default character mappings\");\n Map map = new HashMap();\n Iterator iter = keycodes.keySet().iterator();\n while (iter.hasNext()) {\n Object key = iter.next();\n map.put(keycodes.get(key), key);\n }\n return map;\n }", "public String createPassword() {\n String alphabet= \"abcdefghijklmnopqrstuvwxyz\";\n int count=0;\n String randomPass=\"\";\n while (count<this.length){\n randomPass+=alphabet.charAt(this.randomNumber.nextInt(alphabet.length()-1));\n count++;\n }\n return randomPass;\n }", "public void createCurses() \n\t{\n\t\tcreateElementsArray();\n\t\t\n\t\t\n\t\t//Scheide von oben die Liste ab\n\t\tString[][] newArray = new String[100][3];\n\t\tint j=0;\n\t\t\n\t\t\tfor (int i = 90; i < elementsArray.length; i++) \n\t\t\t{\n\t\t\t\tnewArray[j][0]=elementsArray[i][0];\n\t\t\t\tnewArray[j][1]=elementsArray[i][1];\n\t\t\t\tnewArray[j][2]=elementsArray[i][2];\n\t\t\t\tj++;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\n\t\t\n\t\t//Ermittle letzten Kurs\n\t\tint endeListe=0;\n\t\tfor (int i = 0; i < newArray.length; i++) \n\t\t{\n\t\t\tif (newArray[i][2].equals(\"https://moodle.htwg-konstanz.de/moodle/course/index.php\")) \n\t\t\t{\n\t\t\t\tendeListe = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Baue Ausgabe Array neu\n\t\tString[][] finalArray = new String[endeListe][3];\n\t\t\n\t\tfor (int i = 0; i < endeListe; i++) \n\t\t{\n\t\t\tfinalArray[i][0] = newArray[i][0];\n\t\t\tfinalArray[i][1] = newArray[i][1];\n\t\t\tfinalArray[i][2] = newArray[i][2];\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tthis.elementsArray = finalArray;\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public JLayeredPane makeKeys() {\n\t\t// Initialize\n\t\tString name = \"\";\n\t\tint x = 55;\n\t\tint y = 0;\n\n\t\t// Create layerPane\n\t\tJLayeredPane keyBoard = new JLayeredPane();\n\t\tkeyBoard.setPreferredSize(new Dimension(900, 162));\n\t\tkeyBoard.add(Box.createRigidArea(new Dimension(x, 0)));\n\n\t\t// Add the white key buttons\n\t\tfor (int i = 0; i < NUM_OCTAVES; i++) {\n\t\t\tfor (int j = 0; j < NUM_KEYS; j++) {\n\t\t\t\tImageIcon img = new ImageIcon(\"images/\" + notes[j] + \".png\");\n\t\t\t\tJButton jb = new JButton(img);\n\t\t\t\tname = notes[j] + octave[i];\n\t\t\t\tjb.setName(name);\n\t\t\t\tjb.setActionCommand(name);\n\t\t\t\tjb.addActionListener(this);\n\t\t\t\tjb.setBounds(x, y, 35, 162);\n\t\t\t\tkeyBoard.add(jb, new Integer(1));\n\t\t\t\tkeyBoard.add(Box.createRigidArea(new Dimension(2, 0)));\n\t\t\t\tx += 37;\n\t\t\t}\n\t\t}\n\n\t\t// Reinitialize\n\t\tx = 0;\n\n\t\t// Add the black keys\n\t\tfor (int i = 0; i < NUM_OCTAVES; i++) {\n\n\t\t\tImageIcon img = new ImageIcon(\"images/blackKey.png\");\n\n\t\t\t// Make 5 \"keys\"\n\n\t\t\tJButton jb0 = new JButton(img);\n\t\t\tname = sharps[0] + octave[i];\n\t\t\tjb0.setName(name);\n\t\t\tjb0.setActionCommand(name);\n\t\t\tjb0.addActionListener(this);\n\n\t\t\tJButton jb1 = new JButton(img);\n\t\t\tname = sharps[1] + octave[i];\n\t\t\tjb1.setName(name);\n\t\t\tjb1.setActionCommand(name);\n\t\t\tjb1.addActionListener(this);\n\n\t\t\tJButton jb2 = new JButton(img);\n\t\t\tname = sharps[2] + octave[i];\n\t\t\tjb2.setName(name);\n\t\t\tjb2.setActionCommand(name);\n\t\t\tjb2.addActionListener(this);\n\n\t\t\tJButton jb3 = new JButton(img);\n\t\t\tname = sharps[3] + octave[i];\n\t\t\tjb3.setName(name);\n\t\t\tjb3.setActionCommand(name);\n\t\t\tjb3.addActionListener(this);\n\n\t\t\tJButton jb4 = new JButton(img);\n\t\t\tname = sharps[4] + octave[i];\n\t\t\tjb4.setName(name);\n\t\t\tjb4.setActionCommand(name);\n\t\t\tjb4.addActionListener(this);\n\n\t\t\t// Place the 5 keys\n\t\t\tjb0.setBounds(77 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb0, new Integer(2));\n\n\t\t\tjb1.setBounds(115 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb1, new Integer(2));\n\n\t\t\tjb2.setBounds(188 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb2, new Integer(2));\n\n\t\t\tjb3.setBounds(226 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb3, new Integer(2));\n\n\t\t\tjb4.setBounds(264 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb4, new Integer(2));\n\t\t}\n\t\t// Return the keyboard\n\t\treturn keyBoard;\n\t}", "public void makeWindows()\r\n {\r\n int spacingX = random.nextInt( 3 ) + 3;\r\n int spacingY = random.nextInt( 5 ) + 3;\r\n int windowsX = random.nextInt( 3 ) + 4;\r\n int windowsY = random.nextInt( 3 ) + 5;\r\n int sizeX = ( building.getWidth() - spacingX * ( windowsX + 1 ) ) / windowsX;\r\n int sizeY = ( building.getHeight() - spacingY * ( windowsY + 1 ) ) / windowsY;\r\n \r\n \r\n for( int i = 1; i <= windowsX; i++ )\r\n {\r\n for( int k = 1; k <= windowsY; k++ )\r\n {\r\n \r\n Rectangle r = new Rectangle( building.getXLocation() + ( spacingX / 2 + spacingX * i ) + sizeX * ( i - 1 ), \r\n building.getYLocation() + ( spacingY / 2 + spacingY * k ) + sizeY * ( k - 1 ) );\r\n r.setSize( sizeX, sizeY );\r\n r.setColor( new Color( 254, 254, 34 ) );\r\n add( r );\r\n }\r\n }\r\n }", "public Dictionary()\n\t{\n\t\tfor(Character i = 97; i<=122;i++)\n\t\t\tthis.put(i,new ArrayList<DictionaryElement>());\n\t\t\t\n\t}", "public static ArrayList<char[]> generateBlackMovesOpening(char[] b) {\n\t\tArrayList<char[]> gbmList = new ArrayList<char[]>();\n\t\tArrayList<char[]> gbmswapList = new ArrayList<char[]>();\n\t\t// clone the char array\n\t\tchar[] tmp = b.clone();\n\t\t/*for (int i = 0; i < tmp.length; i++) {\n\t\t\tif (tmp[i] == 'W') {\n\t\t\t\ttmp[i] = 'B';\n\t\t\t} else if (tmp[i] == 'B') {\n\t\t\t\ttmp[i] = 'W';\n\t\t\t}\n\t\t}*/\n tmp=flipBoard(tmp);\n\t\tgbmList = generateAdd(tmp);\n\t\tfor (char[] gb : gbmList) {\n\t\t/*\tfor (int i = 0; i < gb.length; i++) {\n\t\t\t\tif (gb[i] == 'W') {\n\t\t\t\t\tgb[i] = 'B';\n\n\t\t\t\t} else if (gb[i] == 'B') {\n\t\t\t\t\tgb[i] = 'W';\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tgbmswapList.add(flipBoard(gb));\n\t\t}\n\t\treturn gbmswapList;\n\t}", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "private String getBWT(){\n Character[] alphabet = wt.root.alphabetMap.keySet().toArray(new Character[0]);\n String bwt = \"\";\n \n for (int i = 0; i < wt.root.bitVector.length+1; i++) {\n for (int j = 0; j < alphabet.length; j++) {\n int rank1 = wt.rank(alphabet[j].charValue(), i);\n int rank2 = wt.rank(alphabet[j].charValue(), i-1);\n if(rank1 != rank2){\n bwt += alphabet[j];\n }\n }\n }\n return bwt;\n }", "AlphabetNameReference createAlphabetNameReference();", "@Override\r\n\tpublic CharacterStateSet createCharacterStateSet() {\r\n\t\tCharacterStateSetImpl characterStateSet = new CharacterStateSetImpl(getDocument());\r\n\t\tList<Element> currentCharElements = getChildrenByTagName(getFormatElement(), \"char\");\r\n\t\tList<Element> currentSetElements = getChildrenByTagName(getFormatElement(), \"set\");\r\n\t\tif ( ! currentCharElements.isEmpty() ) {\r\n\t\t\tElement firstCharElement = currentCharElements.get(0);\r\n\t\t\tgetFormatElement().insertBefore(characterStateSet.getElement(), firstCharElement);\r\n\t\t}\r\n\t\telse if ( ! currentSetElements.isEmpty() ) {\r\n\t\t\tElement firstSetElement = currentSetElements.get(0);\r\n\t\t\tgetFormatElement().insertBefore(characterStateSet.getElement(), firstSetElement);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgetFormatElement().appendChild( characterStateSet.getElement() );\r\n\t\t}\r\n\t\tmCharacterStateSets.add(characterStateSet);\r\n\t\treturn characterStateSet;\r\n\t}", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "private void newWord() {\r\n defaultState();\r\n int random_id_String = 0;\r\n int random_id_Char[] = new int[4];\r\n Random random = new Random();\r\n if (wordNumber == WordCollection.NO_OF_WORDS) return;//quit if all word list is complete;\r\n wordNumber++;\r\n //in case the word has already occured\r\n while (currentWord.equals(\"\")) {\r\n random_id_String = random.nextInt(WordCollection.NO_OF_WORDS);\r\n currentWord = tempWord[random_id_String];\r\n }\r\n currentWord.toUpperCase();\r\n tempWord[random_id_String] = \"\";//so that this word will not be used again in the game session\r\n //generates 4 random nums each for each btn char\r\n for (int i = 0; i < 4; i++) {\r\n random_id_Char[i] = (random.nextInt(4));\r\n for (int j = i - 1; j >= 0; j--) {\r\n if (random_id_Char[i] == random_id_Char[j]) i--;\r\n }\r\n }\r\n\r\n btn1.setText((currentWord.charAt(random_id_Char[0]) + \"\").toUpperCase());\r\n btn2.setText((currentWord.charAt(random_id_Char[1]) + \"\").toUpperCase());\r\n btn3.setText((currentWord.charAt(random_id_Char[2]) + \"\").toUpperCase());\r\n btn4.setText((currentWord.charAt(random_id_Char[3]) + \"\").toUpperCase());\r\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Enter Character Name\");\r\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.addWindowListener(new WindowListener()\r\n\t\t {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowActivated(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeactivated(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowIconified(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t } ) ;\r\n\r\n //Set up the content pane.\r\n addComponentsToPane(frame.getContentPane());\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setSize(new Dimension(390,90)) ;\r\n frame.setVisible(true);\r\n frame.setResizable(false) ;\r\n }", "public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\t currentLetter = generateRandomLetter();\n\n\t}", "static char[] generateAZBothCasesAndNumbers(int length) {\n charArray = new char[length];\n int k;\n for (int i = 0; i < length; i++) {\n k = (int) (Math.random() * 3);\n if (k == 0) {\n charArray[i] = RandomChar.generateAZLowerRangeChar();\n } else if (k == 1) {\n charArray[i] = RandomChar.generateAZUpperRangeChar();\n } else if (k == 2) {\n charArray[i] = RandomChar.generateNumberChar();\n }\n }\n return charArray;\n }", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "void increaseSortLetter();", "Alphabet(String chars) {\n if (chars.contains(\"(\") || chars.contains(\")\") || chars.contains(\"*\")) {\n throw error(\"Parentheses and asterisks not permitted in alphabet.\");\n }\n Map<Character, Integer> map = new HashMap<>();\n char[] string2chars = chars.toCharArray();\n for (char c : string2chars) {\n if (map.containsKey(c)) {\n throw error(\"Repeated character found: %c\", c);\n } else {\n map.put(c, 1);\n }\n }\n\n _chars = chars;\n }", "public void generateCodes() {\n\t\tArrayList<Chest> chests = new ArrayList<Chest>();\n\t\tArrayList<Key> keys = new ArrayList<Key>();\n\n\t\tfor (Location location : board.getLocations().values()) {\n\t\t\tfor (Tile ta[] : location.getTiles()) {\n\t\t\t\tfor (Tile t : ta) {\n\t\t\t\t\tif (t.getGameObject() instanceof Chest) {\n\t\t\t\t\t\tchests.add((Chest) t.getGameObject());\n\t\t\t\t\t} else if (t.getGameObject() instanceof Key) {\n\t\t\t\t\t\tkeys.add((Key) t.getGameObject());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (keys.size() != chests.size()) {\n\t\t\tthrow new RuntimeException(\"must have same numer of keys and chests\");\n\t\t}\n\n\t\tint num = keys.size();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tint randy = (int) (Math.random() * keys.size());\n\t\t\tint orton = (int) (Math.random() * keys.size());\n\n\t\t\tkeys.get(randy).setCode(i);\n\t\t\tchests.get(orton).setCode(i);\n\t\t\tchests.get(orton).setContents(new Banana(\"Banana\"));\n\t\t\tkeys.remove(randy);\n\t\t\tchests.remove(orton);\n\t\t}\n\n\t}", "public static FontEncoding createFontSpecificEncoding() {\n FontEncoding encoding = new FontEncoding();\n encoding.fontSpecific = true;\n for (int ch = 0; ch < 256; ch++) {\n encoding.unicodeToCode.put(ch, ch);\n encoding.codeToUnicode[ch] = ch;\n encoding.unicodeDifferences.put(ch, ch);\n }\n return encoding;\n }", "public static String randAlnumSym(){\n int n;\n String result = null;\n switch (CAPS){\n case 0:\n n = rand.nextInt(94);\n if (n>83){\n result = String.valueOf(n-84);\n }else {\n result = String.valueOf(KEYBOARD.charAt(rand.nextInt(84))); //both\n }\n break;\n case 1:\n n = rand.nextInt(68);\n if (n>57){\n result = String.valueOf(n-58);\n }else if (n > 25){\n result = randSym();\n }else {\n result = randLower();\n }\n break;\n case 2:\n n = rand.nextInt(68);\n if (n>57){\n result = String.valueOf(n-58);\n }else if (n > 25){\n result = randSym();\n }else {\n result = randUpper();\n }\n break;\n }\n return result;\n }", "public CorrelationWindowEncoder(int window) {\n\t\twindow_ = window;\n\t}", "public Almacen(){}", "private char[] createBoard() {\n for (int i = 1; i < 10; i++) {\n board[i] = 0;\n }\n return board;\n }", "public CodePointIterator base32Encode(final Base32Alphabet alphabet) {\n return base32Encode(alphabet, true);\n }", "public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}", "public static void main(String[] args) {\n String a = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ#-\";\r\n //---------------------------------------------------------------------\r\n \r\n //Memanggil alfabet String yang diinginkan\r\n //Menentukan alfabet untuk Nama\r\n char hasil1 = a.charAt(0);\r\n char hasil2 = a.charAt(25);\r\n char hasil3 = a.charAt(7);\r\n char hasil4 = a.charAt(0);\r\n char hasil5 = a.charAt(17);\r\n char hasil6 = a.charAt(27);\r\n char hasil7 = a.charAt(1);\r\n char hasil8 = a.charAt(4);\r\n char hasil9 = a.charAt(17);\r\n char hasil10 = a.charAt(11);\r\n char hasil11 = a.charAt(8);\r\n char hasil12 = a.charAt(0);\r\n char hasil13 = a.charAt(13);\r\n char hasil14 = a.charAt(0);\r\n //---------------------------------------------------------------------\r\n \r\n //Menentukan alfabet untuk Kelas\r\n char hasil15 = a.charAt(23);\r\n char hasil16 = a.charAt(8);\r\n char hasil17 = a.charAt(8);\r\n char hasil18 = a.charAt(27);\r\n char hasil19 = a.charAt(17);\r\n char hasil20 = a.charAt(15);\r\n char hasil21 = a.charAt(11);\r\n char hasil22 = a.charAt(27);\r\n char hasil23 = a.charAt(1);\r\n //---------------------------------------------------------------------\r\n \r\n //Saat nya memanggil output yang telah di tentukan pada variable-variable diatas\r\n System.out.println(\"ALFABET TERSEDIA : \"+a);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Nama\r\n System.out.println(\"Nama : \"+hasil1+\"\"+hasil2+\"\"+hasil3+\"\"+hasil4+\r\n \"\"+hasil5+\"\"+hasil6+\"\"+hasil7+\"\"+hasil8+\"\"+hasil9+\"\"+hasil10+\"\"\r\n +hasil11+\"\"+hasil12+\"\"+hasil13+\"\"+hasil14);\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Kelas\r\n System.out.println(\"Kelas : \"+hasil15+\"\"+hasil16+\"\"+hasil17+\"\"+\r\n hasil18+\"\"+hasil19+\"\"+hasil20+\"\"+hasil21+\"\"+hasil22+\"\"+hasil23);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n }", "void makePlacement(String placement) {\n\n // Task8 Do not clear the textField in order to place pieces step by step.\n // board.getChildren().clear();\n if (!StepsGame.isPlacementWellFormed(placement)) {\n throw new IllegalArgumentException(\"Hide board incorrect length: \" + placement);\n }\n Rectangle r = new Rectangle(BOARD_X, BOARD_Y, XSIDE*SQUARE_SIZE, YSIDE*SQUARE_SIZE);\n r.setFill(SUBBOARD_FILL);\n r.setStroke(SUBBOARD_STROKE);\n board.getChildren().add(r);\n String alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxy\";\n for (int i = 0; i<50; i++){\n double x = 1.0/3;\n Text t = new Text(BOARD_X + SQUARE_SIZE/3 + (i %XSIDE) * SQUARE_SIZE - 5, BOARD_Y + 2*SQUARE_SIZE/3 +(i / XSIDE) * SQUARE_SIZE + 10, alphabet.substring(i, i+1));\n t.setFont(new Font(20));\n t.setFill(Color.GREY);\n board.getChildren().add(t);\n }\n // Making board and adding the letters.\n\n\n String[] onepiece = placement.split(\"(?<=\\\\G...)\");\n String[] shape = new String[onepiece.length];\n String[] location = new String[onepiece.length];\n char[] loc = new char[onepiece.length];\n int[] lct = new int[onepiece.length];\n for (int i = 0; i<onepiece.length; i++){\n shape[i] = onepiece[i].substring(0, 2);\n location[i] = onepiece[i].substring(2, 3);\n loc[i] = location[i].charAt(0);\n if(loc[i] >= 'A' && loc[i] <= 'Y'){\n lct[i] = (int)loc[i] - 65;\n }else if(loc[i] >= 'a' && loc[i] <= 'y'){\n lct[i] = (int)loc[i] - 72;\n }\n //Split String into 3 letters and NUMBER the positions A-y into 0-49.\n\n\n String tile = shape[i];\n if (tile != \"\")\n board.getChildren().add(new Square(tile, lct[i]-11));\n }\n // Adding shapes\n board.toBack();\n\n // FIXME Task 4: implement the simple placement viewer\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 }" ]
[ "0.608905", "0.60224795", "0.5944439", "0.5708861", "0.5671301", "0.5609708", "0.55582774", "0.55502176", "0.55475354", "0.5535655", "0.55207026", "0.54698235", "0.5456572", "0.5425382", "0.54038423", "0.5398337", "0.5377789", "0.5331358", "0.53006166", "0.52966094", "0.5269002", "0.5269002", "0.5269002", "0.5249925", "0.5222026", "0.5221783", "0.5213922", "0.5210055", "0.5192376", "0.5155566", "0.5138932", "0.5121749", "0.5119359", "0.51144266", "0.5108871", "0.5101097", "0.5096887", "0.5084544", "0.50642323", "0.50583017", "0.5051749", "0.50451046", "0.5029923", "0.50206", "0.50038785", "0.5003606", "0.50012743", "0.49863806", "0.49647662", "0.49570793", "0.49514547", "0.49320853", "0.49062663", "0.48862886", "0.48845935", "0.48698655", "0.48612094", "0.48509604", "0.4832232", "0.4830864", "0.48241135", "0.481936", "0.4817303", "0.48119462", "0.48063195", "0.4799534", "0.4794318", "0.47909066", "0.4780256", "0.4769407", "0.47682717", "0.47511038", "0.47464243", "0.4743349", "0.4725474", "0.47225487", "0.47031987", "0.4696477", "0.46956384", "0.46951124", "0.46937895", "0.4691196", "0.46901459", "0.4664464", "0.4662285", "0.46604148", "0.46450832", "0.46438318", "0.46348244", "0.46291518", "0.46234834", "0.46148497", "0.46137938", "0.46117583", "0.46092638", "0.4603116", "0.4576352", "0.45739824", "0.4562006", "0.45588392" ]
0.6733629
0
Guides you through the composing alphabet process.
public void composeAlphabet() { Scanner scanner = new Scanner(System.in); System.out.println("Please enter a name for this alphabet: "); String alphabetName = scanner.nextLine(); System.out.println("Please enter the location of the window dumps " + "(relative to the current folder): "); String alphabetLoc = scanner.nextLine(); scanner.close(); composeAlphabet(alphabetName, alphabetLoc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "Alphabet(String chars) {\n _charsString = chars;\n _chars = new char[chars.length()];\n for (int i = 0; i < _chars.length; i += 1) {\n if (alreadyAdded(chars.charAt(i))) {\n throw new EnigmaException(\"Alphabet cannot have duplicates.\");\n } else {\n _chars[i] = chars.charAt(i);\n }\n }\n }", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "private byte ensureIsInAlphabet(byte input) {\n return (byte)(ALPHABET_START + (Math.abs(input) % ALPHABET_SIZE));\n }", "public Set<Character> alphabet(){\n\t\tSet<Character> a = new HashSet<Character>();\n\t\ta.addAll(gauche.alphabet());\n\t\ta.addAll(droit.alphabet());\n\t\treturn a;\n\t}", "Alphabet alphabet() {\n return _alphabet;\n }", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}", "public void createAlphabet() {\n\t\tSystem.out.println(\"This currently only works for Android. Connect your phone to the PC/Mac\"\n\t\t\t\t+ \" and make sure that the bunq app is open and 'debug options' are enabled.\\n\");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter a name for your alphabet (please do use only \" + \"characters and underscores): \");\n\t\tString alphabetName = scanner.nextLine();\n\n\t\tSystem.out.println(\"\\n\\nRepeat the following steps for each screen you want to include in the \" + \"alphabet.\\n\"\n\t\t\t\t+ \"1. Move to the screen you want to include on your phone.\\n\"\n\t\t\t\t+ \"2. Type a filename here (e.g. login.xml) and hit enter. \\n\\n\"\n\t\t\t\t+ \"When you are done, type 'stop' instead of a filename.\\n\\n\");\n\n\t\tSystem.out.println(\"Enter filename (including extension): \");\n\t\tString input;\n\t\twhile (scanner.hasNext()) {\n\t\t\tif ((input = scanner.nextLine()).equals(\"stop\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (runAlphabetScript(alphabetName + \"/\" + input) != 0) {\n\t\t\t\tSystem.out.println(\"An error occurred. Please repeat the last action.\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter filename (including extension): \");\n\t\t}\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, \"alphabet/window_dumps/\" + alphabetName + \"/\");\n\t\t// composeActivities(alphabetName);\n\t}", "void increaseSortLetter();", "public static void main(String[] args) {\n\n for(char ch='A'; ch<='Z'; ch++){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //backword--descending\n for (char ch='Z'; ch>='A'; ch--){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //lower case\n for(char ch ='a'; ch<='z'; ch++){\n System.out.print(ch+ \" \");\n }\n\n\n\n }", "public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String str=sc.nextLine();\n int len=str.length();\n int stat[]=new int[26];\n for(int i=0;i<len;i++)\n {\n if((str.charAt(i)>='a') && ( str.charAt(i)<='z'))\n {\n int offset=str.charAt(i) - 'a';\n stat[offset]++; \n }\n if((str.charAt(i)>='A') && ( str.charAt(i)<='Z'))\n {\n int offset=str.charAt(i) - 'A';\n stat[offset]++; \n }\n }\n for(int i=0;i<26;i++)\n {\n \n if( stat[i]==0)\n {\n char ch=(char)('a'+i);\n System.out.print(ch+\" \");\n \n \n \n }\n }\n}", "private String shiftAlphabet(int key) {\n return ALPHABET.substring(key) + ALPHABET.substring(0, key);\n }", "public static void main(String args[]) \n {\n Scanner in=new Scanner(System.in);\n String text=in.nextLine();\n StringBuilder str=new StringBuilder(text);\n int str_len=str.length();\n int key=in.nextInt();\n for(int i=0;i<str_len;i++)\n {\n if(str.charAt(i)!=' ')\n {\n int ch=str.charAt(i)-key;\n if(str.charAt(i)>'A' && str.charAt(i)<'Z')\n {\n if(ch<'A')\n {\n ch=ch+26;\n }\n }\n else if(str.charAt(i)>'a' && str.charAt(i)<'z')\n {\n if(ch<'a')\n {\n ch=ch+26;\n }\n }\n str.setCharAt(i,(char)ch);\n }\n }\n System.out.print(str);\n }", "private void generateCipher()\n {\n for (int i = 0; i < 26; i++)\n {\n if (((i + shiftKey) < 26) && ((i + shiftKey) >= 0))\n {\n cipherAlphabet[i] = Alphabet[i + shiftKey];\n }\n else\n {\n cipherAlphabet[i] = Alphabet[(i + shiftKey) - 26];\n }\n } \n }", "public static void main(String[] args) {\n\n for ( char ch = 'A', ch1 = 'b'; ch <= 'Z' && ch1 <= 'z' ; ch+=2 , ch1+=2 ){\n\n System.out.print(ch +\"-\");\n System.out.print(ch1+ \"-\");\n }\n\n }", "static byte[] getAlphabet( final int options ) {\n if ((options & URL_SAFE) == URL_SAFE)return URL_SAFE_ALPHABET;\n else if ((options & ORDERED) == ORDERED)return ORDERED_ALPHABET;\n return STANDARD_ALPHABET;\n }", "private void composeAlphabet(String alphabetName, String alphabetLoc) {\n\t\tAlphabetFileWriter afw = new AlphabetFileWriter(\"alphabet/\" + alphabetName + \".txt\");\n\t\ttry {\n\t\t\tafw.collectAlphabet(new File(alphabetLoc));\n\t\t\tSystem.out.println(\"An alphabet was created with name \" + alphabetName);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"An error occurred. Please try again. \" + \"Make sure you did not misspell the filelocation.\");\n\t\t}\n\t}", "public void printAlphabetTranscript() \n {\n boolean complete = false;\n for (String c: courses.keySet()) \n {\n if (!courses.get(c).getActive()) \n { \n complete = true;\n System.out.print(courses.get(c).displayAlphabetGrade()); \n }\n }\n if (!complete) \n {\n System.out.println(\"This student hasn't complete any course\"); \n }\n }", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAlphabet[index] = (char)(index+65) + \"\";\n }\n return regularAlphabet;\n }", "private String cipher(String s)\n {\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n char[] input = s.toCharArray();\n \n int pos = 0;\n String finalString = \"\";\n for( int i = 0; i < input.length; i++ )\n {\n if((input[i] >= 'a' && input[i] <= 'z') || (input[i] >= 'A' && input[i] <= 'Z'))\n {\n for( int j = 0; j < alphabet.length; j++ )\n {\n if( alphabet[j] == input[i] )\n {\n pos = j;\n break;\n }\n }\n finalString += alphabet[(rotateValue+pos)%26];\n }\n else{ finalString += input[i]; }\n }\n return finalString;\n }", "public static void main(String[] args) {\n\n\n for(char ch ='A', ch1= 'a'; ch<='Z' && ch1<='z'; ch++ , ch1++){\n System.out.print(ch +\"-\");\n System.out.println(ch1 +\"-\");\n\n }\n }", "Alphabet(String chars) {\n if (chars.contains(\"(\") || chars.contains(\")\") || chars.contains(\"*\")) {\n throw error(\"Parentheses and asterisks not permitted in alphabet.\");\n }\n Map<Character, Integer> map = new HashMap<>();\n char[] string2chars = chars.toCharArray();\n for (char c : string2chars) {\n if (map.containsKey(c)) {\n throw error(\"Repeated character found: %c\", c);\n } else {\n map.put(c, 1);\n }\n }\n\n _chars = chars;\n }", "public static void main(String [] args) {\n\t cryptanalysis();\n\t \n\t for (char cipherChar : cipherText.toCharArray())\n\t\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t\t\t // following line converts letters to numbers between 0 and 25\n\t\t\t int cipher = (int) cipherChar - alphaIndex;\n\t\t\t int plain = decrypt(cipher);\n\t\t\t // following line coverts numbers between 0 and 25 to letters\n\t\t\t char plainChar = (char) (plain + alphaIndex);\n\t\t\t System.out.print(plainChar);\n\t\t }\n\t\t else\n\t\t\t System.out.print(cipherChar);\n }", "private void combine(char[] chars, int begin) {\n\t\tif(begin==chars.length) {\r\n\t\t\tString result = String.valueOf(chars);\r\n\t\t\tif(!list.contains(result)) {\r\n\t\t\t\tlist.add(result);\r\n\t\t\t}\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tfor(int i=begin;i<chars.length;i++) {\r\n\t\t\tswap(chars,i,begin);\r\n\t\t\tcombine(chars, begin+1);\r\n\t\t\tswap(chars,i,begin);\r\n\t\t}\t\r\n\t}", "public static String Caesarify(String Normal, int InputNo) {\n Scanner input = new Scanner(System.in);\r\n int TotalChar = Normal.length(); //total length\r\n String NewNormal = Normal;\r\n String Empty =\"\";\r\n //calculation to get the letters after shift\r\n StringBuffer rtnString = new StringBuffer();\r\n\r\n for (int n = 0; n < TotalChar; n++) {\r\n /*while (InputNo >=27) {\r\n System.out.println(\"Please input your number\");\r\n InputNo = input.nextInt();\r\n }*/\r\n String fixChar = Normal.substring(n, n + 1);\r\n int AlphaNo = shiftAlphabet(0).indexOf(fixChar);\r\n String AlphaChar = shiftAlphabet(InputNo).substring(AlphaNo, AlphaNo + 1);\r\n //rtnString.append(AlphaChar);\r\n for(int j=0;j<AlphaChar.length();j++) {\r\n char vowel = (AlphaChar).charAt(j);\r\n if (vowel == 'A' || vowel == 'E' || vowel == 'I' || vowel == 'O' || vowel == 'U' || vowel == 'Y') {\r\n rtnString.append(\"OB\");\r\n }\r\n rtnString.append(AlphaChar.charAt(j));\r\n }\r\n }\r\n System.out.println(rtnString);\r\n return String.valueOf(rtnString);\r\n }", "public void bewegeKamel(Charakter charakter);", "public static void letterShuff() {\n ArrayList<Character> letter = new ArrayList<Character>();\n for (char i = 'a'; i <= 'z'; i++) {\n letter.add(i);\n }\n Collections.shuffle(letter);\n System.out.println(letter);\n System.out.println(letter.get(letter.size()-1));\n System.out.println(letter.get(0));\n if(letter.get(0) == 'a' || letter.get(0) == 'e' || letter.get(0) == 'i' || letter.get(0) == 'o' || letter.get(0) == 'u') {\n System.out.println(\"I'm a vowel!\");\n }\n }", "private void populateLetterList() {\n int numberOfTabs = LETTERS_IN_ALPHABET / numberInGroup;\n\n if (LETTERS_IN_ALPHABET % numberInGroup != 0) {\n numberOfTabs++;\n }\n for (int i = 0; i < numberOfTabs; i++) {\n Character startLetter = (char) ((i * numberInGroup) + 65);\n Character endLetter = (char) (startLetter + numberInGroup - 1);\n if ((int) endLetter > (25 + 65)) {\n endLetter = (char) (25 + 65);\n }\n startLetterList.put(startLetter, endLetter);\n }\n }", "void decreaseSortLetter();", "public void clearStartAlphabet()\n\t\t\t{\n\t\t\t}", "public static void isInAlphabeticalOrder(String...a) {\n\t\t\r\n\t\tSystem.out.println(\"In which alphabetical order?\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString order = scan.nextLine();\r\n\t\t\r\n\t\tboolean isFinished = false; //detects an early exit from inner loop\r\n\t\t\r\n\t\t// FIXME: compare characters in same position, but in subsequent strings.\r\n\t\t// may input strings with different lengths.\r\n\t\t// It will most likely throw an out of index exception, need to catch it / handle it\r\n\t\t// or make a custom exception\r\n\t\t// will probably need to check for a null value early.\r\n\t\t// might apply this fix by changing the outer loop to a regular loop, since it will only \r\n\t\t// iterate length() - 1 times.\r\n\t\t\r\n\t\tSystem.out.println(a.length);\r\n\t\t\r\n\t\t//check order\r\n\t\tswitch (order) {\r\n\t\t\tcase \"forward\":\t\t\t// the length method in the next line is for an array.\r\n\t\t\t\tfor (int i = 0; i < a.length -1; i++) { //iterates through all the string pairs provided\r\n\t\t\t\t\tfor (int j = 0; j < a[i].length(); j++) { //iterates through characters in the current string\r\n\t\t\t\t\t\t// if the 2 strings differ in length\r\n\t\t\t\t\t\t// i.e. if the next string is shorter than the current one\r\n\t\t\t\t\t\t// might throw an exception\r\n\t\t\t\t\t\t// NOTE: continue moves to the next iteration of a loop.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// the inner loop breaks if it doesn't find anything out of order.\r\n\t\t\t\t\t\t// it should only iterate through the entire string if the \r\n\t\t\t\t\t\t// characters are identical.\r\n\r\n\t\t\t\t\t\tif (a[i].charAt(j) < a[i + 1].charAt(j)) {\r\n\t\t\t\t\t\t\tbreak; // in order; moves on to next pair of strings\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tif (a[i].charAt(j) > a[i + 1].charAt(j)) { // out of order\r\n\t\t\t\t\t\t\tisFinished = true;\r\n\t\t\t\t\t\t\tSystem.out.println(false);\r\n\t\t\t\t\t\t\tbreak; // exit the loop\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (j + 1 == a[i+1].length()) { // check for the end of next string\r\n\t\t\t\t\t\t\t// to avoid an out of bounds exception\r\n\t\t\t\t\t\t\tbreak; // move to the next iteration of the outer loop.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isFinished) { //checks for an early exit in the inner loop\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isFinished) {\r\n\t\t\t\t\tSystem.out.println(true); //will only occur if an early exit does not occur\r\n\t\t\t\t}\r\n\t\t\t\tscan.close();\r\n\t\t\t\tbreak; //close scanner and exit the loop\r\n\t\t\t\r\n\t\t\tcase \"reverse\":\r\n\t\t\t\tfor (int i = 0; i < a.length -1; i++) { //iterates through all the string pairs provided\r\n\t\t\t\t\tfor (int j = 0; j < a[i].length(); j++) { //iterates through characters in the current string\r\n\t\t\t\t\t\t// if the 2 strings differ in length\r\n\t\t\t\t\t\t// i.e. if the next string is shorter than the current one\r\n\t\t\t\t\t\t// might throw an exception\r\n\t\t\t\t\t\t// NOTE: continue moves to the next iteration of a loop.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// the inner breaks if it doesn't find anything out of order.\r\n\t\t\t\t\t\t// it should only iterate through the entire string if the \r\n\t\t\t\t\t\t// characters are identical.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//FIXME: hitting a[2] when it should not be happening.\r\n\t\t\t\t\t\tif (a[i].charAt(j) > a[i + 1].charAt(j)) {\r\n\t\t\t\t\t\t\tbreak; // in order; moves on to next pair of strings\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tif (a[i].charAt(j) < a[i + 1].charAt(j)) { // out of order\r\n\t\t\t\t\t\t\tisFinished = true;\r\n\t\t\t\t\t\t\tSystem.out.println(false);\r\n\t\t\t\t\t\t\tbreak; // exit the loop\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (j + 1 == a[i+1].length()) { // check for the end of next string\r\n\t\t\t\t\t\t\t// to avoid an out of bounds exception\r\n\t\t\t\t\t\t\tbreak; // move to the next iteration of the outer loop.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isFinished) { //checks for an early exit in the inner loop\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isFinished) {\r\n\t\t\t\t\tSystem.out.println(true); //will only occur if an early exit does not occur\r\n\t\t\t\t}\r\n\t\t\t\tscan.close();\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"That's not a good input.\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "public List<String> letterCombinations(String digits) {\n\t \n\t recurse(digits, \"\");\n\t return ans; \n\t}", "public static void main(String[] args) {\n LetterCasePermutation permutation = new LetterCasePermutation();\n List<String> strings = permutation.letterCasePermutation(\"a1B2\");\n System.out.println(strings);\n }", "public static void main(String[] args)\n\t{\n\t\t\n\t\tchar letter = 'Z';\n\t\tint count = 8;\n\t\tchar temp_letter = letter;\n\t\tint temp_count = count;\n\t\t\n\t\tfor(int a = 0; a < count ; a++) {\n\t\t\tfor(int i = 0; i < temp_count ; i++) {\n\t\t\t\tfor(int j = 0; j < count ; j++) {\n\t\t\t\t\tif(temp_letter == 'Z') {\n\t\t\t\t\t\ttemp_letter = (char)('Z' - (26 * i));\n\t\t\t\t\t} else {\n//\t\t\t\t\t\ttemp_letter = (char) (temp_letter + i);\n\t\t\t\t\t};\n\t\t\t\t\tSystem.out.print((char) (temp_letter + i));\t\n\t\t\t\t};\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tcount = count - 1;\n\t\t\t\t\n\t\t\t};\n\t\t\tSystem.out.println();\n\t\t\ttemp_count = temp_count - 1;\n\t\t\tcount = 8;\n\t\t\ttemp_letter = letter;\n\t\t}\n\t\t\t\n\t\t\t\t\n\t}", "public String rotationCipherCrack(String cipher, String alphabet);", "public static void main(String args[]) {\n Scanner s=new Scanner(System.in);\n char c=s.next().charAt(0);\n int k=s.nextInt();\n if(c=='c')\n {\n //char m='z';\n System.out.print(\"z \");\n return;\n }\n else if (c>='a' && c<='z')\n {\n int o=c+'a';\n o=(o-k)%26;\n c=(char)(o+'a');\n }\n else if(c>='A' && c<='Z')\n {\n int o=c+'A';\n o=(o-k)%26;\n c=(char)(o+'A');\n }\n System.out.print(c);\n }", "public static void main(String[] args) {\n\n\t\tScanner input = new Scanner(System.in);\n\t\tchar alphabet;\n\t\tSystem.out.print(\"Input Character:\");\n\t\talphabet = input.next().charAt(0);//문자 입력받기\n\t\t\n\t\t\n\t\tif(alphabet >= 'A' && alphabet<='Z') {\n\t\t\tSystem.out.println(\"result: \" + (char)(alphabet+32));\t\t\t\n\t\t}//대문자일 경우 32를 더해 소문자로 변경한다.\n\t\t\n\t\telse if(alphabet>='a' && alphabet<='z') {\n\t\t\tSystem.out.println(\"result: \" + (char)(alphabet-32));\n\t\t}//소문자일 경우에는 32를 빼 대문자로 변경해준다. \n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"입력오류!\");\n\t\t}\n\t}", "public static String caesarify(String text, int key) {\r\n String newText = \"\";\r\n String alpha = shiftAlphabet(0);\r\n String newAlpha = shiftAlphabet(key);\r\n\r\n for (int i = 0; i < text.length(); i++) {\r\n String currentLetter = String.valueOf(text.charAt(i));\r\n int indexOfLetter = alpha.indexOf(currentLetter);\r\n String letterReplacement = String.valueOf(newAlpha.charAt(indexOfLetter));\r\n\r\n newText += letterReplacement;\r\n\r\n }\r\n return newText;\r\n }", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a word\");\n\t\tString a=scan.nextLine();\n\n\t\tint sayac=0;\n\t\tint sayac1=0;\n\t\tint sayac2=0;\n\t\tint sayac3=0;\n\t\tint sayac4=0;\n\t\tint sayac5=0;\n\t\tint sayac6=0;\n\t\tint sayac7=0;\n\t\tint sayac8=0;\n\t\tint sayac9=0;\n\t\n\t\n\tint b=a.toLowerCase().length();\n\t\nchar[] alphabet= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','u','p','r','s','t','u','z','w','x','v'};\n\t\n\t\n\t\t\n\tfor(int i=0; i<=b-1; i++) {\n\t\tfor(int j=0; j<alphabet.length; j++) {\n\t\tif(a.charAt(i)==alphabet[j] ) {\n\t\t\tSystem.out.println(\"a harfi \"+(i+1)+\". siradadir\");\n\t\t\tsayac++;\n\t\t\tSystem.out.println(sayac+\"tane a.charAt(i) harfi vardir\");\n\t\t}\n\t\t\n\t\t\n\t\n\t\t}}\n\n\n\t}", "public static boolean checkAllAlphabets(String input) {\n if (input.length() < 26) {\n return false;\n }\n\n //Even a single character is missing, return false\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n if (input.indexOf(ch) < 0 && input.indexOf((char) (ch + 32)) < 0) {\n return false;\n }\n }\n return true;\n }", "static char shift(char c, int key) {\n // Handle key values >=ALPHABET_LENGTH \n key %= ALPHABET_LENGTH;\n char start = Character.isUpperCase(c) ? 'A' : 'a';\n // Shift down to 0-25 for a-z\n char shifted = (char) (c - start);\n // Handle wrap-around for negative values:\n shifted = (char) ((shifted + key + ALPHABET_LENGTH) % ALPHABET_LENGTH);\n return (char) (shifted + start);\n }", "public static void main(String args[]) {\n Scanner sc=new Scanner(System.in);\n String s =sc.nextLine();\n int key =sc.nextInt();\n int len =s.length();\n for(int i=0;i<len;i++)\n {\n char ch =s.charAt(i);\n if(ch == ' ')\n System.out.print(\" \");\n else{\n\t\t if(ch >= 65 && ch<= 90){\n\t\t ch = (char)(ch -65);\n\t\t\t ch = (char)((26+ch-key)%26);\n\t\t\t ch =(char)(ch +65);\n\t\t\t System.out.print(ch);\n\t\t }\n\t\t else{\n\t\t ch = (char)(ch -97);\n\t\t\t ch = (char)((26+ch-key)%26);\n\t\t\t ch =(char)(ch +97);\n\t\t\t System.out.print(ch);\n\t\t }\n\t\t \n }\n \n }\n }", "public alphabetize()\n {\n word = new Scanner(System.in);\n }", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"\\n\\nEnter the string to find all possible arrangements (Eg : 'xyz', 'pals', 'palsj' )\\n\\n\");\n\t\t\n\t\tString str = scan.nextLine();\n\t\tscan.close();\n\n\t\tchar[] chArr = str.toCharArray();\n\t\tchar[] temp1 = new char[chArr.length];\n\n\t\ttemp1 = chArr;\n\n\t\tint len = chArr.length;\n \n \n\t\tfor (int cnt = 0; cnt < len; cnt++) {\n\t\t\t\n\t\t\tSystem.out.println(\"letter : \" + temp1[0]);\n\n\t\t\t\n\t\t\tfor (int i = 1; i < len; i++) {\n\n\t\t \ttemp1 = printString(temp1); // to print the first swap\n\t\t\t}\n\n\t\t\ttemp1 = moveString1(temp1, 0);\n\n \n\t\t}\n\n\t}", "private static boolean isEnglishAlphabetPermutation(String str1, String str2) {\r\n if (!validate(str1, str2)) {\r\n return false;\r\n }\r\n if (str1.isEmpty() && str2.isEmpty()) { // simple case\r\n return true;\r\n }\r\n str1 = str1.toLowerCase();\r\n str2 = str2.toLowerCase();\r\n\r\n // we can use array instead of hash map\r\n // because we definitely know amount of characters\r\n int[] counter = new int[CHARS_AMOUNT];\r\n int startCode = Character.codePointAt(\"a\", 0);\r\n for (int i = 0; i < str1.length(); i++) {\r\n int idx = str1.codePointAt(i) - startCode;\r\n if (idx < 0 || idx >= CHARS_AMOUNT) {\r\n throw new IllegalArgumentException(\"Unsupported character.\");\r\n }\r\n counter[idx]++;\r\n }\r\n // no need to create another array for checking\r\n for (int i = 0; i < str2.length(); i++) {\r\n int idx = str2.codePointAt(i) - startCode;\r\n if (idx < 0 || idx >= CHARS_AMOUNT) {\r\n throw new IllegalArgumentException(\"Unsupported character.\");\r\n }\r\n int checkValue = --counter[idx];\r\n if (checkValue < 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public interface Alphabet {\n\n\n Pair transcriptChar(char character);\n\n List<Pair> transcriptWord(String word);\n\n Pair[] getAlphabet();\n}", "public static void printAlphabetInRange(char beginning, char ending ){\n\n if(beginning<ending){\n System.out.println(\"we need to increment from \" + beginning+\" till \"+ending);\n for (char i = beginning; i <=ending ; i++) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else if (beginning>ending){\n System.out.println(\"we need to decrement from \" + beginning+\" till \"+ending);\n for (char i = beginning; i >=ending ; i--) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else{\n System.out.println(\"They are same character\");\n }\n\n }", "public static String shiftAlphabet(int shift) {\r\n int start = 0;\r\n if (shift < 0) {\r\n start = (int) 'Z' + shift + 1;\r\n } else {\r\n start = 'A' + shift;\r\n }\r\n String result = \"\";\r\n char currChar = (char) start;\r\n for (; currChar <= 'Z'; ++currChar) {\r\n result = result + currChar;\r\n }\r\n if (result.length() < 26) {\r\n for (currChar = 'A'; result.length() < 26; ++currChar) {\r\n result = result + currChar;\r\n }\r\n }\r\n return result;\r\n }", "private void changeCipher(char keyChar) {\n int index = (keyChar - 'a');\n char[] temp = Arrays.copyOfRange(ALPHABET, 0, index);\n for (int i = index; i < ALPHABET.length; i++) {\n cipher[i-index] = ALPHABET[i];\n }\n for (int j = 0; j < index; j++) {\n cipher[cipher.length - 1 - index] = temp[j];\n }\n }", "public static void main(String[] args) {\n\t\tString s=\"A\";\n\t\tint l=s.length();\n\t\tint c=0;\n\t\tfor(int i=0;i<l;i++){\n\t\t\tc=(int) (c+(s.charAt(s.length()-i-1)-'A'+1)*Math.pow(26, i));\n\t\t\tSystem.out.println(c);\n\n\t\t}\n\t\t//System.out.println(c);\n\t}", "int getCharacterOrdering(char key);", "static boolean isLetterChoice()\r\n {\r\n\treturn isLetterChoice;\r\n }", "public static char[] insertPlugs(String alphabets){\n\n Scanner scan = new Scanner(System.in);\n String insertedPlugs = scan.nextLine().toUpperCase().replaceAll(\"\\\\s+\",\"\"); //read input\n int plugSize = insertedPlugs.length();\n int alphabetsSize = alphabets.length();\n\n boolean validitySize;\n boolean validityString = false;\n boolean[] validityCharacter = new boolean[20];\n\n boolean validity = false;\n\n //check user input validity\n while(!validity) {\n\n //check if user entered input of correct size\n validitySize = false; //set to default, change to true later in test.\n while(!validitySize){\n\n //check if the size is even and no more than 20\n if((plugSize % 2 == 0) && plugSize <= 20){\n\n System.out.println(\"\");\n System.out.println(plugSize + \" plugs provided.\");\n validitySize = true;\n System.out.println(\"\");\n\n } else {\n\n System.out.println(\"\");\n System.out.println(\"Input invalid, wrong number of characters. Please enter again.\");\n insertedPlugs = scan.nextLine().toUpperCase(); // reset input\n plugSize = insertedPlugs.length(); // reset size\n\n }\n\n }\n\n //check if the input are all alphabets\n while (!validityString) {\n\n //set all characters valid as default, test later\n\n for(int i = 0; i < 20; i++){\n\n validityCharacter[i] = true;\n\n }\n\n //check if characters in input match to any alphabet.\n for (int i = 0; i < plugSize; i++) {\n\n validityCharacter[i] = false; // default, change later.\n\n for (int j = 0; j < alphabetsSize; j++) {\n\n\n if (insertedPlugs.charAt(i) == (alphabets.charAt(j))) {\n\n validityCharacter[i] = true;\n\n }\n\n }\n\n if (validityCharacter[i]) {\n\n System.out.println(insertedPlugs.charAt(i) + \" is a valid character.\");\n\n } else {\n\n System.out.println(insertedPlugs.charAt(i) + \" is an invalid character.\");\n\n }\n\n }\n\n //assess matching results\n\n validityString = true; //set as default. If false, change to false later\n for (int i = 0; i < plugSize; i++) {\n\n if (!validityCharacter[i]) {\n\n validityString = false;\n validitySize = false;\n System.out.println(\"\");\n System.out.println(\"Input invalid, invalid characters. Please enter again.\");\n insertedPlugs = scan.nextLine().toUpperCase(); // reset input\n plugSize = insertedPlugs.length(); // reset size\n\n break;\n\n }\n\n }\n\n if(!validityString){\n\n break;\n\n }\n\n }\n\n //check if the input is valid (all alphabets, even, <=20)\n if (validitySize && validityString) {\n\n validity = true;\n System.out.println(\"\");\n System.out.println(\"Letters \" + insertedPlugs + \" are plugged as pairs.\");\n System.out.println(\"\");\n\n }\n\n }\n\n //casting\n char[] plugboard = insertedPlugs.toCharArray();\n\n //feedback\n System.out.println(\"Plugboard settings: \" + java.util.Arrays.toString(plugboard));\n System.out.println(\"\");\n return plugboard;\n\n }", "private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }", "protected char encode(char current) {\n int index = 0;\n charactersRead++;\n int startPos = charactersRead % keyword.length();\n changeCipher(keyword.charAt(startPos));\n\n for(int i = 0; i < ALPHABET.length; i++) {\n if (ALPHABET[i] == current) {\n index = i;\n }\n }\n return cipher[index];\n }", "private void caseFirstCompressionSub(RuleBasedCollator col, String opt) {\n final int maxLength = 50;\n\n StringBuilder buf1 = new StringBuilder();\n StringBuilder buf2 = new StringBuilder();\n String str1, str2;\n\n for (int n = 1; n <= maxLength; n++) {\n buf1.setLength(0);\n buf2.setLength(0);\n\n for (int i = 0; i < n - 1; i++) {\n buf1.append('a');\n buf2.append('a');\n }\n buf1.append('A');\n buf2.append('a');\n\n str1 = buf1.toString();\n str2 = buf2.toString();\n\n CollationKey key1 = col.getCollationKey(str1);\n CollationKey key2 = col.getCollationKey(str2);\n\n int cmpKey = key1.compareTo(key2);\n int cmpCol = col.compare(str1, str2);\n\n if ((cmpKey < 0 && cmpCol >= 0) || (cmpKey > 0 && cmpCol <= 0) || (cmpKey == 0 && cmpCol != 0)) {\n errln(\"Inconsistent comparison(\" + opt + \"): str1=\" + str1 + \", str2=\" + str2 + \", cmpKey=\" + cmpKey + \" , cmpCol=\" + cmpCol);\n }\n }\n }", "public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }", "public interface KeyCode {\n\n // Alphabet keys:\n int A_UPPER_CASE = 65;\n int B_UPPER_CASE = 66;\n int C_UPPER_CASE = 67;\n int D_UPPER_CASE = 68;\n int E_UPPER_CASE = 69;\n int F_UPPER_CASE = 70;\n int G_UPPER_CASE = 71;\n int H_UPPER_CASE = 72;\n int I_UPPER_CASE = 73;\n int J_UPPER_CASE = 74;\n int K_UPPER_CASE = 75;\n int L_UPPER_CASE = 76;\n int M_UPPER_CASE = 77;\n int N_UPPER_CASE = 78;\n int O_UPPER_CASE = 79;\n int P_UPPER_CASE = 80;\n int Q_UPPER_CASE = 81;\n int R_UPPER_CASE = 82;\n int S_UPPER_CASE = 83;\n int T_UPPER_CASE = 84;\n int U_UPPER_CASE = 85;\n int V_UPPER_CASE = 86;\n int W_UPPER_CASE = 87;\n int X_UPPER_CASE = 88;\n int Y_UPPER_CASE = 89;\n int Z_UPPER_CASE = 90;\n\n // int A_LOWER_CASE = 97;\n // int B_LOWER_CASE = 98;\n // int C_LOWER_CASE = 99;\n // int D_LOWER_CASE = 100;\n // int E_LOWER_CASE = 101;\n // int F_LOWER_CASE = 102;\n // int G_LOWER_CASE = 103;\n // int H_LOWER_CASE = 104;\n // int I_LOWER_CASE = 105;\n // int J_LOWER_CASE = 106;\n // int K_LOWER_CASE = 107;\n // int L_LOWER_CASE = 108;\n // int M_LOWER_CASE = 109;\n // int N_LOWER_CASE = 110;\n // int O_LOWER_CASE = 111;\n // int P_LOWER_CASE = 112;\n // int Q_LOWER_CASE = 113;\n // int R_LOWER_CASE = 114;\n // int S_LOWER_CASE = 115;\n // int T_LOWER_CASE = 116;\n // int U_LOWER_CASE = 117;\n // int V_LOWER_CASE = 118;\n // int W_LOWER_CASE = 119;\n // int X_LOWER_CASE = 120;\n // int Y_LOWER_CASE = 121;\n // int Z_LOWER_CASE = 122;\n\n // Numeric keys:\n int NUMPAD_0 = 96;\n int NUMPAD_1 = 97;\n int NUMPAD_2 = 98;\n int NUMPAD_3 = 99;\n int NUMPAD_4 = 100;\n int NUMPAD_5 = 101;\n int NUMPAD_6 = 102;\n int NUMPAD_7 = 103;\n int NUMPAD_8 = 104;\n int NUMPAD_9 = 105;\n\n int NUM_0 = 48;\n int NUM_1 = 49;\n int NUM_2 = 50;\n int NUM_3 = 51;\n int NUM_4 = 52;\n int NUM_5 = 53;\n int NUM_6 = 54;\n int NUM_7 = 55;\n int NUM_8 = 56;\n int NUM_9 = 57;\n\n int PERSIAN_0 = 1776;\n int PERSIAN_1 = 1777;\n int PERSIAN_2 = 1778;\n int PERSIAN_3 = 1779;\n int PERSIAN_4 = 1780;\n int PERSIAN_5 = 1781;\n int PERSIAN_6 = 1782;\n int PERSIAN_7 = 1783;\n int PERSIAN_8 = 1784;\n int PERSIAN_9 = 1785;\n\n // Function keys:\n int F1 = 112;\n int F2 = 113;\n int F3 = 114;\n int F4 = 115;\n int F5 = 116;\n int F6 = 117;\n int F7 = 118;\n int F8 = 119;\n int F9 = 120;\n int F10 = 121;\n int F11 = 122;\n int F12 = 123;\n\n // Control Keys:\n int BACKSPACE = 8;\n int TAB = 9;\n int ENTER = 13;\n int SHIFT = 16;\n int CTRL = 17;\n int ALT = 18;\n int PAUSE_BREAK = 19;\n int CAPS_LOCK = 20;\n int ESCAPE = 27;\n int PAGEUP = 33;\n int PAGEDOWN = 34;\n int END = 35;\n int HOME = 36;\n int LEFT = 37;\n int UP = 38;\n int RIGHT = 39;\n int DOWN = 40;\n int PRINT_SCREEN = 44;\n int INSERT = 45;\n int DELETE = 46;\n\n // Other Keys:\n int SPACE = 32;\n int EQUALITY = 61;\n int LEFT_WINDOW_KEY = 91;\n int RIGHT_WINDOW_KEY = 92;\n int SELECT_KEY = 93; // besides of right control key (context menu key, usually works like right click)\n int MULTIPLY = 106;\n int ADD = 107;\n int SUBTRACT = 109;\n int DECIMAL_POINT = 110;// . in numpad section\n int DIVIDE = 111;\n int NUM_LOCK = 144;\n int SCROLL_LOCK = 145;\n int SEMI_COLON = 186;// ;\n int EQUAL_SIGN = 187;// =\n int COMMA = 188;// ,\n int DASH = 189;// -\n int PERIOD = 190;// . in alphabet section\n int FORWARD_SLASH = 191;// /\n int GRAVE_ACCENT = 192; // `\n int OPEN_BRACKET = 219; // [\n int BACK_SLASH = 220; // \\\n int CLOSE_BRAKET = 221; // ]\n int SINGLE_QUOTE = 222; // '\n}", "public static void main(String[] args) {\n\n\t\tString s = \"P@$$w!rd\";\n\n\t\tString specialCharacters = s.replaceAll(\"[^@#$%^&*()!_+\\\\-=\\\\[\\\\]{};':\\\"\\\\\\\\|,.<>\\\\/? 0-9]\", \"\");\n\t\tString alphabets = s.replaceAll(\"[^a-zA-Z]\", \"\");\n\n\t\tSystem.out.println(specialCharacters);\n\t\tSystem.out.println(alphabets);\n\n\t\tint a = 0, b = alphabets.length() - 1;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\n\t\t\tif (Character.isAlphabetic(s.charAt(i))) {\n\t\t\t\tSystem.out.print(alphabets.charAt(b));\n\t\t\t\tb--;\n\t\t\t} else {\n\t\t\t\tSystem.out.print(specialCharacters.charAt(a));\n\t\t\t\ta++;\n\t\t\t}\n\n\t\t}\n\n\t}", "public String encrypt(String input)\n {\n StringBuilder encrypted = new StringBuilder(input);\n\n String alphabetLower = alphabet.toLowerCase();\n String shiftedAlphabetLower1 = shiftedAlphabet1.toLowerCase();\n String shiftedAlphabetLower2 = shiftedAlphabet2.toLowerCase();\n\n for (int k = 0; k < encrypted.length() ; k++)\n {\n char currentChar = encrypted.charAt(k);\n int indexOfCurrentCharAlphabet = alphabet.indexOf(currentChar);\n int indexOfCurrentCharLower = alphabetLower.indexOf(currentChar);\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 == 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet1.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 != 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet2.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 == 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower1.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 != 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower2.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n }\n return encrypted.toString();\n }", "public void allCombinations(){\n // Sorts the AI's rack\n combinations = new ArrayList<ArrayList<Piece>>();\n ArrayList<Piece> pieces = playersPieces;\n this.removeNulls(numOfNulls());\n for (int index = 0; index < pieces.size();index++){\n Piece temp = pieces.get(index);\n char compareWord = pieces.get(index).theLetter();\n int lowerIndex = index-1;\n\n while (lowerIndex >=0 && compareWord < pieces.get(lowerIndex).theLetter()){\n pieces.set(lowerIndex+1, pieces.get(lowerIndex));\n lowerIndex--;\n }\n\n pieces.set(lowerIndex+1,temp);\n }\n \n // Makes a list of all combinations through the recursive combine method\n combine(pieces, 0, new ArrayList<Piece>());\n insertionSort(combinations);\n combinations.remove(0);\n \n return;\n }", "public VigenereCipher(String password,Alphabet alphabet) {\n super(alphabet); //call to parent class\n this.password = password;\n }", "public static void main(String[] args) {\n Class<?> clazz = ReverseShuffleMerge.class;\r\n Scanner scanner = new Scanner(\r\n clazz.getResourceAsStream(clazz.getSimpleName() + \".txt\"));\r\n \r\n String input = scanner.next();\r\n scanner.close();\r\n \r\n // Gets letter occurrence\r\n char minLetter = MAX_ASCII_LOWER + 1;\r\n int[] letters = new int[MAX_ASCII_LOWER - MIN_ASCII_LOWER + 1];\r\n for (char letter : input.toCharArray()) {\r\n letters[letter - MIN_ASCII_LOWER]++;\r\n minLetter = (char) Math.min(minLetter, letter);\r\n }\r\n\r\n // Creates word string builder\r\n int wordSize = input.length() / 2;\r\n StringBuilder word = new StringBuilder(wordSize);\r\n \r\n // Loops through letters storing letters that already appeared\r\n int[] seenLetters = new int[MAX_ASCII_LOWER - MIN_ASCII_LOWER + 1];\r\n Queue<Character> buffer = new LinkedList<>();\r\n for (int i = input.length() - 1; i >= 0; i--) {\r\n char letter = input.charAt(i);\r\n int letterIndex = letter - MIN_ASCII_LOWER;\r\n \r\n seenLetters[letterIndex] += 2;\r\n if (letter == minLetter) {\r\n // Prints minimum letter as soon as it appears and is still\r\n // missing from word\r\n if (seenLetters[letterIndex] <= letters[letterIndex]) {\r\n word.append(letter);\r\n }\r\n } else if (seenLetters[letterIndex] > letters[letterIndex]) {\r\n // Prints other letters only when inevitable\r\n while (!buffer.isEmpty()) {\r\n char temp = buffer.poll();\r\n if (temp < letter) {\r\n word.append(temp);\r\n// seenLetters[temp - MIN_ASCII_LOWER] -= 2;\r\n }\r\n }\r\n word.append(letter);\r\n } else {\r\n // Sends letter to buffer\r\n if (seenLetters[letterIndex] < letters[letterIndex]) {\r\n buffer.offer(letter);\r\n }\r\n }\r\n }\r\n \r\n System.out.print(word.toString());\r\n }", "public String alienOrder(String[] words) {\n // HashMap to maintain the map relationship between letters\n HashMap<Character, HashSet<Character>> hashMap = new HashMap<Character, HashSet<Character>>();\n // Store the indegree of each letter\n HashMap<Character, Integer> degree = new HashMap<Character, Integer>();\n StringBuilder ret = new StringBuilder();\n if (words == null || words.length < 1) return ret.toString();\n\n // Init indegree for every letter\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n for (int j = 0; j < word.length(); j++) {\n degree.put(word.charAt(j), 0);\n }\n }\n\n // Build graph\n for (int i = 0; i < words.length - 1; i++) {\n String currentWord = words[i];\n String nextWord = words[i + 1];\n int diffCharIndex = 0;\n int minLength = Math.min(currentWord.length(), nextWord.length());\n while (diffCharIndex < minLength && currentWord.charAt(diffCharIndex) == nextWord.charAt(diffCharIndex))\n diffCharIndex++;\n if (diffCharIndex < minLength) {\n Character currentChar = currentWord.charAt(diffCharIndex);\n Character nextChar = nextWord.charAt(diffCharIndex);\n // Add next letter to the map of current letter\n HashSet<Character> setForCurrentLetter = hashMap.get(currentChar);\n if (setForCurrentLetter == null) {\n setForCurrentLetter = new HashSet<Character>();\n }\n if (!setForCurrentLetter.contains(nextChar)) {\n setForCurrentLetter.add(nextChar);\n hashMap.put(currentChar, setForCurrentLetter);\n // Add 1 to next letter's indegree\n degree.put(nextChar, degree.get(nextChar) + 1);\n }\n }\n }\n\n Queue<Character> queue = new LinkedList<Character>();\n for (Character c: degree.keySet()) {\n if (degree.get(c) == 0) {\n queue.add(c);\n }\n }\n while (!queue.isEmpty()) {\n Character c = queue.poll();\n ret.append(c);\n\n HashSet<Character> setForCurrentChar = hashMap.get(c);\n if (setForCurrentChar != null) {\n for (Character ch: setForCurrentChar) {\n int indegree = degree.get(ch);\n degree.put(ch, indegree - 1);\n if (indegree - 1 == 0) {\n queue.add(ch);\n }\n }\n }\n }\n String retString = ret.toString();\n if (retString.length() != degree.size()) return \"\";\n return retString;\n }", "public static int Main()\n\t{\n\t\ts = (String)malloc(100000 * (Character.SIZE / Byte.SIZE));\n\t\tint[] count = new int[26];\n\t\tint[] p = new int[26];\n\t\tint n;\n\t\tchar cc;\n\t\tchar key = '-';\n\t\tint min = 100001;\n\t\tint i;\n\t\tString tempVar = ConsoleInput.scanfRead();\n\t\tif (tempVar != null)\n\t\t{\n\t\t\tn = Integer.parseInt(tempVar);\n\t\t}\n\t\tString tempVar2 = ConsoleInput.scanfRead(null, 1);\n\t\tif (tempVar2 != null)\n\t\t{\n\t\t\tcc = tempVar2.charAt(0);\n\t\t}\n\n\t\twhile (n-- != 0)\n\t\t{\n\t\t\ts = new Scanner(System.in).nextLine();\n\t\t\tfor (i = 0;i < 26;i++)\n\t\t\t{\n\t\t\t\tcount[i] = 0;\n\t\t\t\tp[i] = 100001;\n\t\t\t}\n\t\t\tfor (i = 0;i < s.length();i++)\n\t\t\t{\n\t\t\t\tcount[*(s.Substring(i)) - 'a']++;\n\t\t\t\tif (p[*(s.Substring(i)) - 'a'] > i)\n\t\t\t\t{\n\t\t\t\t\tp[*(s.Substring(i)) - 'a'] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tkey = '-';\n\t\t\tmin = 100001;\n\t\t\tfor (i = 0;i < 26;i++)\n\t\t\t{\n\t\t\t\tif (count[i] == 1 && p[i] < min)\n\t\t\t\t{\n\t\t\t\t\tkey = 'a' + i;\n\t\t\t\t\tmin = p[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (key == '-')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"no\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%c\\n\",key);\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "Permutation(String cycles, Alphabet alphabet) {\n _alphabet = alphabet;\n initMaps(cycles);\n }", "private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/dannluciano/Sources/MyLanguage/expr.g:163:8: ( 'a' .. 'z' | 'A' .. 'Z' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public static void alphabetize() {\r\n\t\tArrayList<Patron> alphabetic = dblogic.getAlphabetic();\r\n\t\tresetTable();\r\n\t\tfor (int i = 0; i < alphabetic.size(); i++) {\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronSince(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "private static int[] letterHist(String acharArray) {\n int[] alphabet = new int[26];\n\n for (int i = 0; i < acharArray.length(); i++) {\n char singleChar = acharArray.toLowerCase().charAt(i);\n\n if ('a' <= singleChar && 'z' >= singleChar) {\n alphabet[singleChar - 'a']++;\n }\n }\n return alphabet;\n }", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "public Alphabet()\n {\n \tthis.growing = true;\n this.map = new TObjectIntHashMap<T>();\n this.entries = new ArrayList<T>();\n }", "@Test\n\tvoid testLetterCombinationsOfAPhoneNumber() {\n\t\tassertEquals(new ArrayList<String>(), new LetterCombinationsOfAPhoneNumber().letterCombinations(\"\"));\n\t\tassertEquals(Arrays.asList(\"ad\", \"ae\", \"af\", \"bd\", \"be\", \"bf\", \"cd\", \"ce\", \"cf\"),\n\t\t\t\tnew LetterCombinationsOfAPhoneNumber().letterCombinations(\"23\"));\n\t\tassertEquals(Arrays.asList(\"w\", \"x\", \"y\", \"z\"), new LetterCombinationsOfAPhoneNumber().letterCombinations(\"9\"));\n\t}", "public static void main(String[] args) {\n char [] letra = new char [27];\n letra [0] = 'A';\n letra [1] = 'B';\n letra [2] = 'C';\n letra [3] = 'D';\n letra [4] = 'E';\n letra [5] = 'F';\n letra [6] = 'G';\n letra [7] = 'H';\n letra [8] = 'I';\n letra [9] = 'J';\n letra [10] = 'K';\n letra [11] = 'L';\n letra [12] = 'M';\n letra [13] = 'N';\n letra [14] = 'Ñ';\n letra [15] = 'O';\n letra [16] = 'P';\n letra [17] = 'Q';\n letra [18] = 'R';\n letra [19] = 'S';\n letra [20] = 'T';\n letra [21] = 'U';\n letra [22] = 'V';\n letra [23] = 'W';\n letra [24] = 'X';\n letra [25] = 'Y';\n letra [26] = 'Z';\n int [] contadores = new int [27];\n pedirCadena();\n comprobarvocales(letra,contadores);\n }", "public List<String> letterCombinations(String digits) {\n List<String> bags = new ArrayList<>();\n\n Map<Character, String> keys = new HashMap<>();\n keys.put('2', \"abc\");\n keys.put('3', \"def\");\n keys.put('4', \"ghi\");\n keys.put('5', \"jkl\");\n keys.put('6', \"mno\");\n keys.put('7', \"pqrs\");\n keys.put('8', \"tuv\");\n keys.put('9', \"wxyz\");\n\n lc(digits, 0, bags, \"\", keys);\n return bags;\n }", "public static void printLowerCase()\n {\n for(char i = 'a'; i <= 'z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "protected char encrypt1(char c) throws NotInAlphabetException{\n if (passwordPos > password.length()-1) { //reset position to zero after every char is used\n passwordPos = 0; //reset to 0\n }\n //get the current index of where the character being encrypted is and then\n //get the character in the current position of the string using passwordPos and then\n //use this to look up the index in the alphabet\n int temp = ((alphabet.indexOf(c)) + (alphabet.indexOf(password.charAt(passwordPos)))); \n passwordPos += 1; //increment password pos;\n return alphabet.get(wrapInt(temp)); //wrap the index and return\n }", "public static void main(String[] args) {\n Scanner key=new Scanner(System.in);\r\n while(key.hasNext())\r\n {\r\n String s=key.next();\r\n String c=\"\";\r\n for (int i = 0; i <s.length(); i++) {\r\n if((Character)s.charAt(i)=='1'|| (Character)s.charAt(i)=='0'|| (Character)s.charAt(i)=='-')\r\n {\r\n // c=c+c.concat(String.valueOf((Character)s.charAt(i)));\r\n System.out.print((Character)s.charAt(i));\r\n }\r\n else if((Character)s.charAt(i)=='A' || (Character)s.charAt(i)=='B' || (Character)s.charAt(i)=='C')\r\n {\r\n System.out.print(2);\r\n }\r\n else if((Character)s.charAt(i)=='D' || (Character)s.charAt(i)=='E' || (Character)s.charAt(i)=='F')\r\n {\r\n System.out.print(3);\r\n }\r\n else if((Character)s.charAt(i)=='G' || (Character)s.charAt(i)=='H' || (Character)s.charAt(i)=='I')\r\n {\r\n System.out.print(4);\r\n }\r\n else if((Character)s.charAt(i)=='J' || (Character)s.charAt(i)=='K' || (Character)s.charAt(i)=='L')\r\n {\r\n System.out.print(5);\r\n }\r\n else if((Character)s.charAt(i)=='M' || (Character)s.charAt(i)=='N' || (Character)s.charAt(i)=='O')\r\n {\r\n System.out.print(6);\r\n }\r\n else if((Character)s.charAt(i)=='P' || (Character)s.charAt(i)=='Q' || (Character)s.charAt(i)=='R' || (Character)s.charAt(i)=='S')\r\n {\r\n System.out.print(7);\r\n }\r\n else if((Character)s.charAt(i)=='T' || (Character)s.charAt(i)=='U' || (Character)s.charAt(i)=='V')\r\n {\r\n System.out.print(8);\r\n }\r\n else if((Character)s.charAt(i)=='W' || (Character)s.charAt(i)=='X' || (Character)s.charAt(i)=='Y'|| (Character)s.charAt(i)=='Z')\r\n {\r\n System.out.print(9);\r\n }\r\n }\r\n System.out.println();\r\n }\r\n }", "@Test\n public void testLetterCasePermutation() {\n System.out.println(\"testLetterCasePermutation\");\n LetterCasePermutation instance = new LetterCasePermutation();\n\n List<String> result1 = instance.letterCasePermutation(\"a1b2\");\n List<String> expect1 = ListUtil.buildList(new String[]{\"a1b2\", \"a1B2\", \"A1b2\", \"A1B2\"});\n assertTrue(ListUtil.equalsIgnoreOrder(expect1, result1));\n\n List<String> result2 = instance.letterCasePermutation(\"3z4\");\n List<String> expect2 = ListUtil.buildList(new String[]{\"3z4\", \"3Z4\"});\n assertTrue(ListUtil.equalsIgnoreOrder(expect2, result2));\n\n List<String> result3 = instance.letterCasePermutation(\"12345\");\n List<String> expect3 = ListUtil.buildList(new String[]{\"12345\"});\n assertTrue(ListUtil.equalsIgnoreOrder(expect3, result3));\n }", "private static void doLetter(byte letter,MorseAction morseAction) throws InterruptedException {\n Byte b= alphabet.get(new String(new byte[]{letter}));\n\n if (b!=null){\n int h=0,bv=b,i=8;\n while(h==0){\n i--;\n h=bv&masks[i];\n }\n i--;\n while(i>-1) {\n if (stop)\n return;\n h=bv&masks[i];\n morseAction.doAction(MorseAction.morseAction.LOUD);\n if (h==0)\n Thread.sleep(pointDelay);\n else\n Thread.sleep(traitDelay);\n morseAction.doAction(MorseAction.morseAction.SILENCE);\n Thread.sleep(betweenPointOrTraitDelay);\n\n i--;\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString result = \"\";\n\t\tfor(int i=0; i<str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tif(ch>='a' && ch <='z') {\n\t\t\t\tch+=13;\n\t\t\t\tif(ch>'z') {\n\t\t\t\t\tch-=26;\n\t\t\t\t}\n\t\t\t}else if(ch>='A' && ch <='Z') {\n\t\t\t\tch+=13;\n\t\t\t\tif(ch>'Z') {\n\t\t\t\t\tch-=26;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult+=ch;\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "public void setFirstLetterJCB() {\r\n try {\r\n firstLetterJCB.addItem(\"---\");\r\n firstLetterJCB.addItem(\"All\");\r\n for (int i = 0; i < 10; i++) {\r\n firstLetterJCB.addItem(new Integer(i));\r\n }\r\n for (char j = 'A'; j <= 'Z'; j++ ) {\r\n firstLetterJCB.addItem(new Character(j));\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void main(String[] args){\n \tunsortedWords = new ArrayList<String>();\n sortedWords = new ArrayList<String>();\n \ttry{\n \t\tInputStreamReader in = new InputStreamReader(System.in);\n \t\tBufferedReader input = new BufferedReader(in);\n \t\talphabetString = input.readLine();\n \t\tif (alphabetString == null || alphabetString == \"\"){\n \t\t\tthrow new IllegalArgumentException();\n \t\t}\n\n \t\tstr = input.readLine();\n if (str == null || str == \"\"){\n throw new IllegalArgumentException();\n }\n \n \t\twhile (str != null){\n \t\t\tunsortedWords.add(str);\n \t\t\tstr = input.readLine();\n numberOfWords += 1;\n \t\t}\n\n\n\n \t}\n \tcatch (IOException io){\n \t\tSystem.out.println(\"There are no words given\");\n \t\tthrow new IllegalArgumentException();\n\n \t}\n\n alphabetMap = new HashMap<String, Integer>();\n String[] alphabetLetters = alphabetString.split(\"\");\n \tint j = 0;\n \tString letter;\n \t// String[] alphabetLetters = alphabetString.split(\"\");\n \twhile (j < alphabetLetters.length){\n letter = alphabetLetters[j];\n if (alphabetString.length() - alphabetString.replace(letter, \"\").length() > 1) {\n System.out.println(letter);\n throw new IllegalArgumentException();\n }\n alphabetMap.put(alphabetLetters[j], j);\n j += 1;\n }\n //for checking the last value something is in the outputed list. \n lastArrayIndex = 0;\n\n //sorts words\n int k = 0;\n String chosenWord;\n while (k < unsortedWords.size()){\n chosenWord = unsortedWords.get(k);\n sorting(chosenWord, sortedWords);\n k += 1; \n }\n\n //prints words\n int l = 0;\n String printedWord;\n while (l < sortedWords.size()){\n printedWord = sortedWords.get(l);\n System.out.println(printedWord);\n l += 1;\n }\n\n\n \t//making the trie\n // usedTrie = makeATrie(unsortedWords);\n\n //printing out the order\n // recursiveAlphabetSorting(usedTrie, \"\", alphabetString);\n\n\n }", "public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/aofC/AspectParser/AOC.g:186:16: ( ( 'a' .. 'z' | 'A' .. 'Z' ) )\n\t\t\t// src/aofC/AspectParser/AOC.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tchar[] charray = {'c','o','d','i','n','g'};//hard to manipulte\n\t\tString str1 = \"coding\";//easier to manipulate or concatenate\n\t\tString str = \"\";//Empty string\n\t\t//String str2 = \" \";//Non-empty string because of space\n\t\t //Right way to return character at it\n\t\t//str[0] is the incorrect way to return element at ith position\n\t\t//String is a non-primitive data type\n\t\t//Therefore it stores the reference of the character array formed by the string\n\t\tString str2 = \" is fun\";\n\t\tSystem.out.println(str1+str2);//Concatenating in console using '+'\n\t\t//Op: coding is fun\n\t\tstr1 = str1 + str2;//increases the array size and then adds str2 and adds it back to str1\n\t\tSystem.out.println(str1);//op: coding is fun\n\t\t//str1 = str1 +str2; creates an intermediate memory\n//\t\tYou could do this too for avoiding that intermediate memory\n\t\tstr1 = \"coding\";//so that it isn't concatenated to coding is fun\n\t\t//System.out.println(str1.concat(str2));//op:coding is fun\n\t\tSystem.out.println(str1.equals(str2));//op:false\n\t\t String str3 = \"aoding\";\n\t\t String str4 = \"eoding\";\n\t\t System.out.println(str1.compareTo(str3));//op:+ve value tells that\n// coding is ahead of aoding lexicographically(i.e. if placed in alphabetical order)because c>a in ascii\n\t\t System.out.println(str1.compareTo(str4));//op:-ve value tells that\n// eoding is ahead of coding lexicographically(i.e. if placed in alphabetical order) because e>a in ascii\n\t}", "public static void main(String[]args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n System.out.println(\"Enter a character\");\n \n char chr = scan.next().charAt(0);\n \n if((chr>='a' && chr<='z')||(chr>='A' && chr<='Z')) {\n System.out.println(\"The character is in alphabet\");\n }else{\n System.out.println(\"The character is not in alphabet\");\n }\n\t\t scan.close();\n\t\t\n\t}", "private void createAA() {\r\n\r\n\t\tfor( int x = 0 ; x < dnasequence.size(); x++) {\r\n\t\t\tString str = dnasequence.get(x);\r\n\t\t\t//put catch for missing 3rd letter\r\n\t\t\tif(str.substring(0, 1).equals(\"G\")) {\r\n\t\t\t\taasequence.add(getG(str));\r\n\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"C\")) {\r\n\t\t\t\taasequence.add(getC(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"A\")) {\r\n\t\t\t\taasequence.add(getA(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0, 1).equals(\"T\")) {\r\n\t\t\t\taasequence.add(getT(str));\r\n\t\t\t\t\r\n\t\t\t}else if(str.substring(0,1).equals(\"N\")) {\r\n\t\t\t\taasequence.add(\"ERROR\");\r\n\t\t\t}else\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }", "char getContactLetter(ContactSortOrder sortOrder);", "protected char tryReduceChar(char letter) {\n int comp = (letter < 97) ? Character.toLowerCase(letter) : letter;\n return (Integer.compare(comp, 97) > 0) ? (char) (letter - 1) : letter;\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:5: ( ( 'A' .. 'Z' | 'a' .. 'z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:7: ( 'A' .. 'Z' | 'a' .. 'z' )\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "private boolean isAlpha(char toCheck) {\n return (toCheck >= 'a' && toCheck <= 'z') ||\n (toCheck >= 'A' && toCheck <= 'Z') ||\n toCheck == '_';\n }", "public ArrayList<String> letterCombinations(String digits)\n {\n ArrayList<String> result=new ArrayList<String>();\n String[] buttons=initButtons();\n letterCombinations(digits, buttons, 0, new StringBuffer(), result);\n return result;\n }" ]
[ "0.69257563", "0.67053896", "0.66563016", "0.6567063", "0.63940847", "0.63815385", "0.63815385", "0.63815385", "0.63810426", "0.63520473", "0.63428175", "0.63336974", "0.63096124", "0.6291513", "0.62742054", "0.6220186", "0.6212069", "0.619392", "0.6131177", "0.6107785", "0.6035222", "0.60255325", "0.6008954", "0.5976845", "0.5955408", "0.5925085", "0.5913937", "0.5913873", "0.5900593", "0.58855754", "0.58821195", "0.58816177", "0.58625686", "0.58528984", "0.5847195", "0.5841597", "0.5813412", "0.58090574", "0.5781413", "0.5775178", "0.5770494", "0.5766264", "0.5735259", "0.572131", "0.57012063", "0.5699097", "0.5696183", "0.5692763", "0.5679185", "0.56738704", "0.56711", "0.5663627", "0.5663625", "0.5659295", "0.56521016", "0.56503624", "0.5643379", "0.5642892", "0.56407356", "0.562604", "0.5624099", "0.56193894", "0.5617056", "0.5612648", "0.56081146", "0.5606969", "0.5601399", "0.55976206", "0.55931544", "0.5592199", "0.55906874", "0.5586205", "0.55799824", "0.55684817", "0.55681795", "0.55668426", "0.55635065", "0.55625254", "0.5547478", "0.5543561", "0.5542345", "0.5528376", "0.552788", "0.5519784", "0.5519701", "0.55127656", "0.550705", "0.55042756", "0.55016655", "0.54902154", "0.54891676", "0.54814464", "0.54779637", "0.54717046", "0.54705966", "0.54675335", "0.54564", "0.54498315", "0.5445888", "0.5443869" ]
0.7265377
0
Composes the alphabet from previously made windowdumps.
private void composeAlphabet(String alphabetName, String alphabetLoc) { AlphabetFileWriter afw = new AlphabetFileWriter("alphabet/" + alphabetName + ".txt"); try { afw.collectAlphabet(new File(alphabetLoc)); System.out.println("An alphabet was created with name " + alphabetName); } catch (Exception e) { System.out.println( "An error occurred. Please try again. " + "Make sure you did not misspell the filelocation."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void composeAlphabet() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name for this alphabet: \");\n\t\tString alphabetName = scanner.nextLine();\n\t\tSystem.out.println(\"Please enter the location of the window dumps \" + \"(relative to the current folder): \");\n\t\tString alphabetLoc = scanner.nextLine();\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, alphabetLoc);\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}", "public void macsToForms(Verbum w){\r\n\t\tchar[] letters = w.macForm.toCharArray();\r\n\t\tArrayList<Integer> indecies = new ArrayList<Integer>();\r\n\t\tfor(int i = 0; i<letters.length; i++){ //Make into ints\r\n\t\t\tif(letters[i]=='*'){\r\n\t\t\t\tindecies.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(w.form1.equals(\"caedes\")){ //Special case\r\n\t\t\tw.form1 = w.macForm;\r\n\t\t} else {\r\n\t\t\tfor(int s : indecies){\r\n\t\t\t\tw.form1 = new StringBuffer(w.form1).insert(s, \"*\").toString();\r\n\t\t\t\tif(w.form2.length()>=findLargest(indecies)){\r\n\t\t\t\t\tw.form2 = new StringBuffer(w.form2).insert(s, \"*\").toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(w.form3.length()>=findLargest(indecies)){\r\n\t\t\t\t\tw.form3 = new StringBuffer(w.form3).insert(s, \"*\").toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(w.form4.length()>=findLargest(indecies)){\r\n\t\t\t\t\tw.form4 = new StringBuffer(w.form4).insert(s, \"*\").toString();\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public void createAlphabet() {\n\t\tSystem.out.println(\"This currently only works for Android. Connect your phone to the PC/Mac\"\n\t\t\t\t+ \" and make sure that the bunq app is open and 'debug options' are enabled.\\n\");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter a name for your alphabet (please do use only \" + \"characters and underscores): \");\n\t\tString alphabetName = scanner.nextLine();\n\n\t\tSystem.out.println(\"\\n\\nRepeat the following steps for each screen you want to include in the \" + \"alphabet.\\n\"\n\t\t\t\t+ \"1. Move to the screen you want to include on your phone.\\n\"\n\t\t\t\t+ \"2. Type a filename here (e.g. login.xml) and hit enter. \\n\\n\"\n\t\t\t\t+ \"When you are done, type 'stop' instead of a filename.\\n\\n\");\n\n\t\tSystem.out.println(\"Enter filename (including extension): \");\n\t\tString input;\n\t\twhile (scanner.hasNext()) {\n\t\t\tif ((input = scanner.nextLine()).equals(\"stop\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (runAlphabetScript(alphabetName + \"/\" + input) != 0) {\n\t\t\t\tSystem.out.println(\"An error occurred. Please repeat the last action.\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter filename (including extension): \");\n\t\t}\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, \"alphabet/window_dumps/\" + alphabetName + \"/\");\n\t\t// composeActivities(alphabetName);\n\t}", "private static char[] generateAlphabet() {\n char[] bet = new char[26];\n\n int i = 0;\n for(char alpha = 'A'; alpha <= 'Z'; alpha++) {\n bet[i] = alpha;\n i++;\n }\n\n return bet;\n }", "private void setLevelUpChars() {\n /*\n * check this if you need more symbol set's\n * TODO do this right @me\n\t\t */\n String charset = KeyboardHandler.current_charset;\n if (charset.length() == 36) {\n for (int i = 0; i < 6; ++i) {\n characterAreas.get(i).setChars(\n charset.substring(i * 6, (i + 1) * 6));\n }\n }\n\n if (charset.length() == 40) {\n Log.d(\"main\",charset);\n characterAreas.get(0).setChars(charset.substring(0, 6));\n characterAreas.get(1).setChars(charset.substring(6, 14));\n characterAreas.get(2).setChars(charset.substring(14, 20));\n characterAreas.get(3).setChars(charset.substring(20, 26));\n characterAreas.get(4).setChars(charset.substring(26, 34));\n characterAreas.get(5).setChars(charset.substring(34, 40));\n }\n }", "private String shiftAlphabet(int key) {\n return ALPHABET.substring(key) + ALPHABET.substring(0, key);\n }", "public void generateAllKeys(){\n\t\tboolean isWhite;\n//\t\tint pitchOffset = 21;\n\t\tint pitchOffset = 1;\n\t\tint keyWidth = this.width / this.numKeys;\n\t\t\n\t\tfor(int i = 0; i<88; i++){\n\t\t\tswitch (i%12){\n\t\t\tcase 1:\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 8:\n\t\t\tcase 10:\tisWhite = false;\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\tisWhite = true;\n\t\t\t}\n\t\t\t\n\t\t\tif(isWhite)\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height, keyWidth, i+ pitchOffset, isWhite);\n\t\t\telse\n\t\t\t\tallKeys[i] = new vafusion.gui.KeyComponent(0, 0, this.height / 2, (keyWidth * 2)/3, i+ pitchOffset, isWhite);\n\t\t}\n\t}", "private void buildRack() {\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n for (char c : alphabet) {\n rack.add(new LetterTile(c,\n IMAGE_DIRECTORY,\n IMAGE_TYPE));\n }\n }", "public Set<Character> alphabet(){\n\t\tSet<Character> a = new HashSet<Character>();\n\t\ta.addAll(gauche.alphabet());\n\t\ta.addAll(droit.alphabet());\n\t\treturn a;\n\t}", "public void encodeChars() {\n encodedChars = new int[uniqueChars.size()];\n Iterator<Character> mover = uniqueChars.iterator();\n Iterator<Character> moverTwo = uniqueChars.iterator();\n System.out.print(\"\\nEncoding characters to its ASCII integer value:\");\n for(int a = 0; a < uniqueChars.size(); a++) {\n encodedChars[a] = (int)mover.next();\n encodedChars[a] = encodedChars[a] / encodedChars[a] + a - 1;\n System.out.print(moverTwo.next() + \" : \" + encodedChars[a] + \", \");\n }\n System.out.println(\"\\n\");\n }", "private void generateCipher()\n {\n for (int i = 0; i < 26; i++)\n {\n if (((i + shiftKey) < 26) && ((i + shiftKey) >= 0))\n {\n cipherAlphabet[i] = Alphabet[i + shiftKey];\n }\n else\n {\n cipherAlphabet[i] = Alphabet[(i + shiftKey) - 26];\n }\n } \n }", "private void populateLetterList() {\n int numberOfTabs = LETTERS_IN_ALPHABET / numberInGroup;\n\n if (LETTERS_IN_ALPHABET % numberInGroup != 0) {\n numberOfTabs++;\n }\n for (int i = 0; i < numberOfTabs; i++) {\n Character startLetter = (char) ((i * numberInGroup) + 65);\n Character endLetter = (char) (startLetter + numberInGroup - 1);\n if ((int) endLetter > (25 + 65)) {\n endLetter = (char) (25 + 65);\n }\n startLetterList.put(startLetter, endLetter);\n }\n }", "private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }", "private String getBWT(){\n Character[] alphabet = wt.root.alphabetMap.keySet().toArray(new Character[0]);\n String bwt = \"\";\n \n for (int i = 0; i < wt.root.bitVector.length+1; i++) {\n for (int j = 0; j < alphabet.length; j++) {\n int rank1 = wt.rank(alphabet[j].charValue(), i);\n int rank2 = wt.rank(alphabet[j].charValue(), i-1);\n if(rank1 != rank2){\n bwt += alphabet[j];\n }\n }\n }\n return bwt;\n }", "public void toBinMode(){\r\n for(int i=2;i<numbers.length;i++){\r\n numbers[i].setEnabled(false);\r\n }\r\n for(JButton letter : letters){\r\n letter.setEnabled(false);\r\n }\r\n this.revalidate();\r\n this.repaint();\r\n }", "public static void main(String[] args)\n\t{\n\t\t\n\t\tchar letter = 'Z';\n\t\tint count = 8;\n\t\tchar temp_letter = letter;\n\t\tint temp_count = count;\n\t\t\n\t\tfor(int a = 0; a < count ; a++) {\n\t\t\tfor(int i = 0; i < temp_count ; i++) {\n\t\t\t\tfor(int j = 0; j < count ; j++) {\n\t\t\t\t\tif(temp_letter == 'Z') {\n\t\t\t\t\t\ttemp_letter = (char)('Z' - (26 * i));\n\t\t\t\t\t} else {\n//\t\t\t\t\t\ttemp_letter = (char) (temp_letter + i);\n\t\t\t\t\t};\n\t\t\t\t\tSystem.out.print((char) (temp_letter + i));\t\n\t\t\t\t};\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tcount = count - 1;\n\t\t\t\t\n\t\t\t};\n\t\t\tSystem.out.println();\n\t\t\ttemp_count = temp_count - 1;\n\t\t\tcount = 8;\n\t\t\ttemp_letter = letter;\n\t\t}\n\t\t\t\n\t\t\t\t\n\t}", "public void upadateDictionary(){\n dict.setLength(0);\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n\n }", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers between 0 and 25\n\t int cipher = (int) cipherChar - alphaIndex;\n\t // following line increments the value at frequency[cipher] to count frequency of letters used\n\t frequency[cipher] = frequency[cipher] + 1;\n\t }\n\t } \n\t char currChar = 'A';\n \t for (int i = 0; i < 26; i++) {\n \t\t System.out.println(currChar++ + \" \" + frequency[i]);\n \t }\n }", "private void buildCharMap() {\n\t\tcharMap = new HashMap<Character , Integer>();\n\t\tcharMap.put('a', 0);\n\t\tcharMap.put('b', 1);\n\t\tcharMap.put('c', 2);\n\t\tcharMap.put('d', 3);\n\t\tcharMap.put('e', 4);\n\t\tcharMap.put('f', 5);\n\t\tcharMap.put('g', 6);\n\t\tcharMap.put('h', 7);\n\t\tcharMap.put('i', 8);\n\t\tcharMap.put('j', 9);\n\t\tcharMap.put('k', 10);\n\t\tcharMap.put('l', 11);\n\t\tcharMap.put('m', 12);\n\t\tcharMap.put('n', 13);\n\t\tcharMap.put('o', 14);\n\t\tcharMap.put('p', 15);\n\t\tcharMap.put('q', 16);\n\t\tcharMap.put('r', 17);\n\t\tcharMap.put('s', 18);\n\t\tcharMap.put('t', 19);\n\t\tcharMap.put('u', 20);\n\t\tcharMap.put('v', 21);\n\t\tcharMap.put('w', 22);\n\t\tcharMap.put('x', 23);\n\t\tcharMap.put('y', 24);\n\t\tcharMap.put('z', 25);\t\n\t}", "private StringBuffer2D makeLettersHeader(){\n int actualWidth = getActualWidth();\n StringBuffer2D sb = new StringBuffer2D();\n //letters\n for(int y=0;y<board.getWidth();++y){\n sb.appendRow(0, \" \"+\"_\".repeat((int) Math.ceil(actualWidth/2)) +\n Color.GREEN_UNDERLINED.escape(getCharForNumber(y)) +\n \"_\".repeat((int) Math.ceil(actualWidth/2)));\n }\n return sb;\n }", "public interface KeyCode {\n\n // Alphabet keys:\n int A_UPPER_CASE = 65;\n int B_UPPER_CASE = 66;\n int C_UPPER_CASE = 67;\n int D_UPPER_CASE = 68;\n int E_UPPER_CASE = 69;\n int F_UPPER_CASE = 70;\n int G_UPPER_CASE = 71;\n int H_UPPER_CASE = 72;\n int I_UPPER_CASE = 73;\n int J_UPPER_CASE = 74;\n int K_UPPER_CASE = 75;\n int L_UPPER_CASE = 76;\n int M_UPPER_CASE = 77;\n int N_UPPER_CASE = 78;\n int O_UPPER_CASE = 79;\n int P_UPPER_CASE = 80;\n int Q_UPPER_CASE = 81;\n int R_UPPER_CASE = 82;\n int S_UPPER_CASE = 83;\n int T_UPPER_CASE = 84;\n int U_UPPER_CASE = 85;\n int V_UPPER_CASE = 86;\n int W_UPPER_CASE = 87;\n int X_UPPER_CASE = 88;\n int Y_UPPER_CASE = 89;\n int Z_UPPER_CASE = 90;\n\n // int A_LOWER_CASE = 97;\n // int B_LOWER_CASE = 98;\n // int C_LOWER_CASE = 99;\n // int D_LOWER_CASE = 100;\n // int E_LOWER_CASE = 101;\n // int F_LOWER_CASE = 102;\n // int G_LOWER_CASE = 103;\n // int H_LOWER_CASE = 104;\n // int I_LOWER_CASE = 105;\n // int J_LOWER_CASE = 106;\n // int K_LOWER_CASE = 107;\n // int L_LOWER_CASE = 108;\n // int M_LOWER_CASE = 109;\n // int N_LOWER_CASE = 110;\n // int O_LOWER_CASE = 111;\n // int P_LOWER_CASE = 112;\n // int Q_LOWER_CASE = 113;\n // int R_LOWER_CASE = 114;\n // int S_LOWER_CASE = 115;\n // int T_LOWER_CASE = 116;\n // int U_LOWER_CASE = 117;\n // int V_LOWER_CASE = 118;\n // int W_LOWER_CASE = 119;\n // int X_LOWER_CASE = 120;\n // int Y_LOWER_CASE = 121;\n // int Z_LOWER_CASE = 122;\n\n // Numeric keys:\n int NUMPAD_0 = 96;\n int NUMPAD_1 = 97;\n int NUMPAD_2 = 98;\n int NUMPAD_3 = 99;\n int NUMPAD_4 = 100;\n int NUMPAD_5 = 101;\n int NUMPAD_6 = 102;\n int NUMPAD_7 = 103;\n int NUMPAD_8 = 104;\n int NUMPAD_9 = 105;\n\n int NUM_0 = 48;\n int NUM_1 = 49;\n int NUM_2 = 50;\n int NUM_3 = 51;\n int NUM_4 = 52;\n int NUM_5 = 53;\n int NUM_6 = 54;\n int NUM_7 = 55;\n int NUM_8 = 56;\n int NUM_9 = 57;\n\n int PERSIAN_0 = 1776;\n int PERSIAN_1 = 1777;\n int PERSIAN_2 = 1778;\n int PERSIAN_3 = 1779;\n int PERSIAN_4 = 1780;\n int PERSIAN_5 = 1781;\n int PERSIAN_6 = 1782;\n int PERSIAN_7 = 1783;\n int PERSIAN_8 = 1784;\n int PERSIAN_9 = 1785;\n\n // Function keys:\n int F1 = 112;\n int F2 = 113;\n int F3 = 114;\n int F4 = 115;\n int F5 = 116;\n int F6 = 117;\n int F7 = 118;\n int F8 = 119;\n int F9 = 120;\n int F10 = 121;\n int F11 = 122;\n int F12 = 123;\n\n // Control Keys:\n int BACKSPACE = 8;\n int TAB = 9;\n int ENTER = 13;\n int SHIFT = 16;\n int CTRL = 17;\n int ALT = 18;\n int PAUSE_BREAK = 19;\n int CAPS_LOCK = 20;\n int ESCAPE = 27;\n int PAGEUP = 33;\n int PAGEDOWN = 34;\n int END = 35;\n int HOME = 36;\n int LEFT = 37;\n int UP = 38;\n int RIGHT = 39;\n int DOWN = 40;\n int PRINT_SCREEN = 44;\n int INSERT = 45;\n int DELETE = 46;\n\n // Other Keys:\n int SPACE = 32;\n int EQUALITY = 61;\n int LEFT_WINDOW_KEY = 91;\n int RIGHT_WINDOW_KEY = 92;\n int SELECT_KEY = 93; // besides of right control key (context menu key, usually works like right click)\n int MULTIPLY = 106;\n int ADD = 107;\n int SUBTRACT = 109;\n int DECIMAL_POINT = 110;// . in numpad section\n int DIVIDE = 111;\n int NUM_LOCK = 144;\n int SCROLL_LOCK = 145;\n int SEMI_COLON = 186;// ;\n int EQUAL_SIGN = 187;// =\n int COMMA = 188;// ,\n int DASH = 189;// -\n int PERIOD = 190;// . in alphabet section\n int FORWARD_SLASH = 191;// /\n int GRAVE_ACCENT = 192; // `\n int OPEN_BRACKET = 219; // [\n int BACK_SLASH = 220; // \\\n int CLOSE_BRAKET = 221; // ]\n int SINGLE_QUOTE = 222; // '\n}", "public static void toCipher() {\n\t\tString symbols = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\t\tint current = 0;\n\t\tString cipher = \"\";\n\t\tMap<String, Character> map = new HashMap<String, Character>();\n\t\t\n\t\tfor (String[] page : pages) {\n\t\t\tfor (String key : page) {\n\t\t\t\tCharacter val = map.get(key);\n\t\t\t\tif (val == null) {\n\t\t\t\t\tval = symbols.charAt(current++);\n\t\t\t\t\tSystem.out.println(\"KEY/VAL: \" + key + \" = \" + val);\n\t\t\t\t\tSystem.out.println(\"VAL/KEY: \" + val + \" = \" + key);\n\t\t\t\t}\n\t\t\t\tmap.put(key, val);\n\t\t\t\tcipher += val;\n\t\t\t}\n\t\t\tSystem.out.println(cipher);\n\t\t\tcipher = \"\";\n\t\t}\n\t}", "private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }", "private void generateImage()\r\n {\n String[] letters = imgInfo.get(level-1).getWord().split(\" \");\r\n numOfLetter = letters.length;\r\n String newLetter = \"\";\r\n int counter=0;\r\n for(String s: letters) {\r\n newLetter += s;\r\n numOfAlpha[counter] = s.length();\r\n counter++;\r\n }\r\n charAns = new ArrayList<Character>();\r\n charAns2 = newLetter.toCharArray();\r\n letterBtnLen = 0;\r\n for (int i =0;i<newLetter.length();i++) {\r\n if(charAns.indexOf(charAns2[i]) == -1) {\r\n charAns.add(charAns2[i]);\r\n letterBtnLen++;\r\n }\r\n }\r\n int ranNum,i=0;\r\n letterBtn = new char[letterBtnLen];\r\n while(!charAns.isEmpty())\r\n {\r\n ranNum =(int) (Math.random()* charAns.size());\r\n letterBtn[i] = charAns.get(ranNum);\r\n String strAns = String.valueOf(charAns.get(ranNum));\r\n letter[i].setText(strAns);\r\n charAns.remove(ranNum);\r\n i++;\r\n }\r\n }", "public char[] BinaryToAsci(List<Integer> bin) {\n char[] tab = new char[bin.size() / 8]; //tablica przechowująca odkodwane znaki\n char znak;\n for (int j = 0; j < bin.size() / 8; j++) {\n znak = 0;\n for (int i = 0; i < 8; i++) {\n znak += bin.get(7 + (j * 8) - i) * Math.pow(2, i);\n // zamiana zer i jedynek na liczbę w zapisie dzisiętnym, która jest\n znak %= 128; // interpretowana jako znak z tablicy ASCI\n }\n\n tab[j] = znak;\n }\n return tab;\n }", "void increaseSortLetter();", "protected void updateCharArray() {\n StringBuilder activateString = new StringBuilder();\n synchronized (activatorSet) {\n for (Character c : activatorSet) {\n activateString.append(c);\n }\n }\n this.activators = activateString.toString().toCharArray();\n }", "private String encodedBoard() {\r\n char[] result = new char[Square.SQUARE_LIST.size() + 1];\r\n result[0] = turn().toString().charAt(0);\r\n for (Square sq : SQUARE_LIST) {\r\n result[sq.index() + 1] = get(sq).toString().charAt(0);\r\n }\r\n return new String(result);\r\n }", "Alphabet(String chars) {\n char[] newChars = chars.toCharArray();\n Map<Character, Integer> map = new HashMap<>();\n for (char c : newChars) {\n if (map.containsKey(c)) {\n int counter = map.get(c);\n map.put(c, ++counter);\n } else {\n map.put(c, 1);\n }\n }\n\n for (char c : map.keySet()) {\n if (map.get(c) > 1) {\n throw new EnigmaException(\"Duplicates Found\");\n } else {\n _letters = chars;\n }\n }\n }", "private void switchToLowerCase() {\n for (int i = 0; i < mLetterButtons.length; i++) {\n mLetterButtons[i].setText((mQWERTYWithDot.charAt(i) + \"\").toLowerCase());\n }\n mIsShiftPressed = false;\n }", "private static String[] shiftLeft(String[] window) {\n\t\tString[] newWindow = new String[(WINDOW_SIZE * 2) + 1];\n\t\t\n\t\t// Loop through old window and populate new\n\t\tfor(int i = 1; i < window.length; i++) {\n\t\t\tnewWindow[i-1] = window[i];\n\t\t}\n\n\t\treturn newWindow;\n\t}", "public ArrayList<String> letterCombinations(String digits)\n {\n ArrayList<String> result=new ArrayList<String>();\n String[] buttons=initButtons();\n letterCombinations(digits, buttons, 0, new StringBuffer(), result);\n return result;\n }", "public static String[] generateRegularAlphabet()\n {\n String[] regularAlphabet = new String[26];\n for(int index = 0; index<regularAlphabet.length; index++)\n {\n regularAlphabet[index] = (char)(index+65) + \"\";\n }\n return regularAlphabet;\n }", "private static int[] letterHist(String acharArray) {\n int[] alphabet = new int[26];\n\n for (int i = 0; i < acharArray.length(); i++) {\n char singleChar = acharArray.toLowerCase().charAt(i);\n\n if ('a' <= singleChar && 'z' >= singleChar) {\n alphabet[singleChar - 'a']++;\n }\n }\n return alphabet;\n }", "private String createAlphabeticalIndex(int replicateIndex) {\n StringBuilder builder = new StringBuilder();\n while (replicateIndex >= 26) {\n builder.append((char) (97 + (replicateIndex % 26)));\n replicateIndex /= 26;\n replicateIndex--;\n }\n builder.append((char) (97 + replicateIndex));\n return builder.reverse().toString();\n\n }", "public static String shiftAlphabet(int shift) {\r\n int start = 0;\r\n if (shift < 0) {\r\n start = (int) 'Z' + shift + 1;\r\n } else {\r\n start = 'A' + shift;\r\n }\r\n String result = \"\";\r\n char currChar = (char) start;\r\n for (; currChar <= 'Z'; ++currChar) {\r\n result = result + currChar;\r\n }\r\n if (result.length() < 26) {\r\n for (currChar = 'A'; result.length() < 26; ++currChar) {\r\n result = result + currChar;\r\n }\r\n }\r\n return result;\r\n }", "private static int[] createAlternates() {\r\n\t\t// Initializes the key list\r\n\t\talternateKeys = new int[6];\r\n\t\t// Adds the KeyEvents to their respected index\r\n\t\talternateKeys[UP] = KeyEvent.VK_UP;\r\n\t\talternateKeys[LEFT] = KeyEvent.VK_LEFT;\r\n\t\talternateKeys[DOWN] = KeyEvent.VK_DOWN;\r\n\t\talternateKeys[RIGHT] = KeyEvent.VK_RIGHT;\r\n\t\talternateKeys[BUTTONA] = 2;\r\n\t\talternateKeys[BUTTONB] = 3;\r\n\t\t// Return (to the constructor, which is send to the super constructor)\r\n\t\treturn alternateKeys;\r\n\t}", "public void toHexMode(){\r\n for(int i=2;i<numbers.length;i++){\r\n numbers[i].setEnabled(true);\r\n }\r\n for(JButton letter : letters){\r\n letter.setEnabled(true);\r\n }\r\n this.revalidate();\r\n this.repaint();\r\n }", "public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }", "public JLayeredPane makeKeys() {\n\t\t// Initialize\n\t\tString name = \"\";\n\t\tint x = 55;\n\t\tint y = 0;\n\n\t\t// Create layerPane\n\t\tJLayeredPane keyBoard = new JLayeredPane();\n\t\tkeyBoard.setPreferredSize(new Dimension(900, 162));\n\t\tkeyBoard.add(Box.createRigidArea(new Dimension(x, 0)));\n\n\t\t// Add the white key buttons\n\t\tfor (int i = 0; i < NUM_OCTAVES; i++) {\n\t\t\tfor (int j = 0; j < NUM_KEYS; j++) {\n\t\t\t\tImageIcon img = new ImageIcon(\"images/\" + notes[j] + \".png\");\n\t\t\t\tJButton jb = new JButton(img);\n\t\t\t\tname = notes[j] + octave[i];\n\t\t\t\tjb.setName(name);\n\t\t\t\tjb.setActionCommand(name);\n\t\t\t\tjb.addActionListener(this);\n\t\t\t\tjb.setBounds(x, y, 35, 162);\n\t\t\t\tkeyBoard.add(jb, new Integer(1));\n\t\t\t\tkeyBoard.add(Box.createRigidArea(new Dimension(2, 0)));\n\t\t\t\tx += 37;\n\t\t\t}\n\t\t}\n\n\t\t// Reinitialize\n\t\tx = 0;\n\n\t\t// Add the black keys\n\t\tfor (int i = 0; i < NUM_OCTAVES; i++) {\n\n\t\t\tImageIcon img = new ImageIcon(\"images/blackKey.png\");\n\n\t\t\t// Make 5 \"keys\"\n\n\t\t\tJButton jb0 = new JButton(img);\n\t\t\tname = sharps[0] + octave[i];\n\t\t\tjb0.setName(name);\n\t\t\tjb0.setActionCommand(name);\n\t\t\tjb0.addActionListener(this);\n\n\t\t\tJButton jb1 = new JButton(img);\n\t\t\tname = sharps[1] + octave[i];\n\t\t\tjb1.setName(name);\n\t\t\tjb1.setActionCommand(name);\n\t\t\tjb1.addActionListener(this);\n\n\t\t\tJButton jb2 = new JButton(img);\n\t\t\tname = sharps[2] + octave[i];\n\t\t\tjb2.setName(name);\n\t\t\tjb2.setActionCommand(name);\n\t\t\tjb2.addActionListener(this);\n\n\t\t\tJButton jb3 = new JButton(img);\n\t\t\tname = sharps[3] + octave[i];\n\t\t\tjb3.setName(name);\n\t\t\tjb3.setActionCommand(name);\n\t\t\tjb3.addActionListener(this);\n\n\t\t\tJButton jb4 = new JButton(img);\n\t\t\tname = sharps[4] + octave[i];\n\t\t\tjb4.setName(name);\n\t\t\tjb4.setActionCommand(name);\n\t\t\tjb4.addActionListener(this);\n\n\t\t\t// Place the 5 keys\n\t\t\tjb0.setBounds(77 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb0, new Integer(2));\n\n\t\t\tjb1.setBounds(115 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb1, new Integer(2));\n\n\t\t\tjb2.setBounds(188 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb2, new Integer(2));\n\n\t\t\tjb3.setBounds(226 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb3, new Integer(2));\n\n\t\t\tjb4.setBounds(264 + (260 * i), y, 25, 95);\n\t\t\tkeyBoard.add(jb4, new Integer(2));\n\t\t}\n\t\t// Return the keyboard\n\t\treturn keyBoard;\n\t}", "private void combine(char[] chars, int begin) {\n\t\tif(begin==chars.length) {\r\n\t\t\tString result = String.valueOf(chars);\r\n\t\t\tif(!list.contains(result)) {\r\n\t\t\t\tlist.add(result);\r\n\t\t\t}\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tfor(int i=begin;i<chars.length;i++) {\r\n\t\t\tswap(chars,i,begin);\r\n\t\t\tcombine(chars, begin+1);\r\n\t\t\tswap(chars,i,begin);\r\n\t\t}\t\r\n\t}", "private void generateBack() {\n\t\tCharacter[] encodeChar = (Character[]) map.values().toArray(new Character[map.size()]);\n\t\tCharacter[] trueChar = (Character[]) map.keySet().toArray(new Character[map.size()]);\n\n\t\tString allencode = \"\";\n\t\tString allTrue = \"\";\n\n\t\tfor (int i = 0; i < encodeChar.length; i++) {\n\t\t\tallencode += encodeChar[i];\n\t\t\tallTrue += trueChar[i];\n\t\t}\n\n\t\tString code = \"import java.util.HashMap;\\n\" + \"import java.util.Map;\\n\" + \"import java.util.Scanner;\\n\"\n\t\t\t\t+ \"public class MyKey {\\n\"\n\t\t\t\t+ \"private static Map<Character, Character> map = new HashMap<Character, Character>();\\n\"\n\t\t\t\t+ \"private static char[] encodeChar = \\\"\" + allencode + \"\\\".toCharArray();\\n\"\n\t\t\t\t+ \"private static char[] trueChar = \\\"\" + allTrue + \"\\\".toCharArray();\\n\"\n\t\t\t\t+ \"private static void mapSetUp() {\\n\" + \"for (int i = 0; i < encodeChar.length; i++) {\\n\"\n\t\t\t\t+ \"map.put(encodeChar[i], trueChar[i]);\\n\" + \"}\\n\" + \"}\\n\"\n\t\t\t\t+ \"private static String decodeMessage(String message) {\\n\" + \"String decode = \\\"\\\";\\n\"\n\t\t\t\t+ \"for (int i = 0; i < message.length(); i++) {\\n\" + \"decode += map.get(message.charAt(i));\\n\" + \"}\\n\"\n\t\t\t\t+ \"return decode;\\n\" + \"}\\n\" + \"public static void main(String[] args){\\n\"\n\t\t\t\t+ \"Scanner sc = new Scanner(System.in);\\n\" + \"System.out.print(\\\"Input your encrypted message : \\\");\"\n\t\t\t\t+ \"String enMessage = sc.nextLine();\" + \"mapSetUp();\\n\"\n\t\t\t\t+ \"System.out.println(\\\"Decrypted message : \\\"+decodeMessage(enMessage));\\n\" + \"}}\";\n\t\tFile f = new File(\"MyKey.java\");\n\t\ttry {\n\t\t\tFileWriter fw = new FileWriter(f);\n\t\t\tBufferedWriter bf = new BufferedWriter(fw);\n\t\t\tbf.write(code);\n\t\t\tbf.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error about IO.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static String encode(String List) {\n String tempstr = \"\";\n for (int j = 0; j < List.length(); j++) {\n for (int k = 0; k < basealpha.length; k++) {\n if (List.charAt(j) == basealpha[k]) {\n tempstr += temps[k];\n }\n }\n }\n return tempstr;\n }", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }", "public static void main(String[] args) {\n\n for(char ch='A'; ch<='Z'; ch++){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //backword--descending\n for (char ch='Z'; ch>='A'; ch--){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //lower case\n for(char ch ='a'; ch<='z'; ch++){\n System.out.print(ch+ \" \");\n }\n\n\n\n }", "private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }", "public static void main(String[] args) {\n char [] letra = new char [27];\n letra [0] = 'A';\n letra [1] = 'B';\n letra [2] = 'C';\n letra [3] = 'D';\n letra [4] = 'E';\n letra [5] = 'F';\n letra [6] = 'G';\n letra [7] = 'H';\n letra [8] = 'I';\n letra [9] = 'J';\n letra [10] = 'K';\n letra [11] = 'L';\n letra [12] = 'M';\n letra [13] = 'N';\n letra [14] = 'Ñ';\n letra [15] = 'O';\n letra [16] = 'P';\n letra [17] = 'Q';\n letra [18] = 'R';\n letra [19] = 'S';\n letra [20] = 'T';\n letra [21] = 'U';\n letra [22] = 'V';\n letra [23] = 'W';\n letra [24] = 'X';\n letra [25] = 'Y';\n letra [26] = 'Z';\n int [] contadores = new int [27];\n pedirCadena();\n comprobarvocales(letra,contadores);\n }", "Alphabet alphabet() {\n return _alphabet;\n }", "public static ArrayList<String> encode(ArrayList<String> List) {\n String tempstr;\n for (int i = 0; i < List.size(); i++) {\n tempstr = \"\";\n for (int j = 0; j < List.get(i).length(); j++) {\n for (int k = 0; k < basealpha.length; k++) {\n if (List.get(i).charAt(j) == basealpha[k]) {\n tempstr += temps[k];\n }\n }\n }\n List.set(i, tempstr);\n }\n return List;\n }", "static char[] getAutoactivationChars() {\n\n // To enable content proposal on deleting a char\n \n String delete = new String(new char[] { 8 });\n String allChars = LCL + UCL + NUMS + delete;\n return allChars.toCharArray();\n }", "public Alphabet()\n {\n \tthis.growing = true;\n this.map = new TObjectIntHashMap<T>();\n this.entries = new ArrayList<T>();\n }", "public void setFirstLetterJCB() {\r\n try {\r\n firstLetterJCB.addItem(\"---\");\r\n firstLetterJCB.addItem(\"All\");\r\n for (int i = 0; i < 10; i++) {\r\n firstLetterJCB.addItem(new Integer(i));\r\n }\r\n for (char j = 'A'; j <= 'Z'; j++ ) {\r\n firstLetterJCB.addItem(new Character(j));\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }", "public List<String> letterCombinations(String digits) {\n List<String> bags = new ArrayList<>();\n\n Map<Character, String> keys = new HashMap<>();\n keys.put('2', \"abc\");\n keys.put('3', \"def\");\n keys.put('4', \"ghi\");\n keys.put('5', \"jkl\");\n keys.put('6', \"mno\");\n keys.put('7', \"pqrs\");\n keys.put('8', \"tuv\");\n keys.put('9', \"wxyz\");\n\n lc(digits, 0, bags, \"\", keys);\n return bags;\n }", "public static ArrayList<char[]> generateBlackMovesOpening(char[] b) {\n\t\tArrayList<char[]> gbmList = new ArrayList<char[]>();\n\t\tArrayList<char[]> gbmswapList = new ArrayList<char[]>();\n\t\t// clone the char array\n\t\tchar[] tmp = b.clone();\n\t\t/*for (int i = 0; i < tmp.length; i++) {\n\t\t\tif (tmp[i] == 'W') {\n\t\t\t\ttmp[i] = 'B';\n\t\t\t} else if (tmp[i] == 'B') {\n\t\t\t\ttmp[i] = 'W';\n\t\t\t}\n\t\t}*/\n tmp=flipBoard(tmp);\n\t\tgbmList = generateAdd(tmp);\n\t\tfor (char[] gb : gbmList) {\n\t\t/*\tfor (int i = 0; i < gb.length; i++) {\n\t\t\t\tif (gb[i] == 'W') {\n\t\t\t\t\tgb[i] = 'B';\n\n\t\t\t\t} else if (gb[i] == 'B') {\n\t\t\t\t\tgb[i] = 'W';\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tgbmswapList.add(flipBoard(gb));\n\t\t}\n\t\treturn gbmswapList;\n\t}", "Alphabet(String chars) {\n _charsString = chars;\n _chars = new char[chars.length()];\n for (int i = 0; i < _chars.length; i += 1) {\n if (alreadyAdded(chars.charAt(i))) {\n throw new EnigmaException(\"Alphabet cannot have duplicates.\");\n } else {\n _chars[i] = chars.charAt(i);\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel3 = new javax.swing.JPanel();\n jScrollPane4 = new javax.swing.JScrollPane();\n jTextArea3 = new javax.swing.JTextArea();\n jLabel7 = new javax.swing.JLabel();\n XOR = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jScrollPane6 = new javax.swing.JScrollPane();\n jTextArea6 = new javax.swing.JTextArea();\n jPanel2 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTextArea2 = new javax.swing.JTextArea();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n GetRandKey = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n jTextArea5 = new javax.swing.JTextArea();\n FuzzyKey = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea4 = new javax.swing.JTextArea();\n Back1 = new javax.swing.JButton();\n Save1 = new javax.swing.JButton();\n Back = new javax.swing.JButton();\n Save = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setPreferredSize(new java.awt.Dimension(830, 650));\n setSize(new java.awt.Dimension(830, 670));\n getContentPane().setLayout(null);\n\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Cipher Text\"));\n jPanel3.setOpaque(false);\n\n jTextArea3.setEditable(false);\n jTextArea3.setColumns(20);\n jTextArea3.setRows(5);\n jScrollPane4.setViewportView(jTextArea3);\n\n jLabel7.setText(\"Binary Code XOR Random Key\");\n\n XOR.setText(\"XOR\");\n XOR.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n XORMouseClicked(evt);\n }\n });\n\n jLabel9.setText(\"Binary Code XOR Random Key (Text)\");\n\n jTextArea6.setEditable(false);\n jTextArea6.setColumns(20);\n jTextArea6.setRows(5);\n jScrollPane6.setViewportView(jTextArea6);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(42, 42, 42)\n .addComponent(XOR))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 412, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(XOR)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane6)))\n );\n\n getContentPane().add(jPanel3);\n jPanel3.setBounds(10, 370, 800, 159);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Random Code Generator\"));\n jPanel2.setOpaque(false);\n\n jTextArea2.setEditable(false);\n jTextArea2.setColumns(20);\n jTextArea2.setRows(5);\n jScrollPane3.setViewportView(jTextArea2);\n\n jLabel4.setText(\"Random Key\");\n\n jLabel6.setText(\"Random Ket (ASCII)\");\n\n GetRandKey.setText(\"Generate Random Key\");\n GetRandKey.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n GetRandKeyMouseClicked(evt);\n }\n });\n\n jTextArea5.setEditable(false);\n jTextArea5.setColumns(20);\n jTextArea5.setRows(5);\n jScrollPane5.setViewportView(jTextArea5);\n\n FuzzyKey.setText(\"Fuzzy Key\");\n FuzzyKey.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n FuzzyKeyMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(GetRandKey))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(FuzzyKey))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(212, 212, 212)\n .addComponent(jLabel6)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 415, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(GetRandKey)\n .addComponent(FuzzyKey))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3)\n .addComponent(jScrollPane5))\n .addContainerGap())\n );\n\n getContentPane().add(jPanel2);\n jPanel2.setBounds(10, 170, 800, 193);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Plain Text\"));\n jPanel1.setOpaque(false);\n\n jTextArea1.setEditable(false);\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane2.setViewportView(jTextArea1);\n\n jLabel2.setText(\"Binary Code\");\n\n jLabel3.setText(\"Plain Text\");\n\n jTextArea4.setEditable(false);\n jTextArea4.setColumns(20);\n jTextArea4.setRows(5);\n jScrollPane1.setViewportView(jTextArea4);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 417, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(17, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n getContentPane().add(jPanel1);\n jPanel1.setBounds(10, 10, 800, 150);\n\n Back1.setText(\"Exit\");\n Back1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n Back1MouseClicked(evt);\n }\n });\n getContentPane().add(Back1);\n Back1.setBounds(690, 560, 120, 40);\n\n Save1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n Save1.setText(\"Delete File\");\n Save1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n Save1MouseClicked(evt);\n }\n });\n getContentPane().add(Save1);\n Save1.setBounds(330, 550, 170, 50);\n\n Back.setText(\"Back\");\n Back.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n BackMouseClicked(evt);\n }\n });\n getContentPane().add(Back);\n Back.setBounds(20, 560, 120, 40);\n\n Save.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n Save.setText(\"Save\");\n Save.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n SaveMouseClicked(evt);\n }\n });\n getContentPane().add(Save);\n Save.setBounds(150, 550, 170, 50);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/EncBG.jpg\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(-10, -40, 860, 710);\n\n pack();\n }", "private TreeMap<Character, Character> generateMap() {\r\n this.charMap = new TreeMap<Character, Character>();\r\n // generates an array of characters representing the alphabet\r\n char[] alphabet = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\r\n\r\n for (int i=0; i<26; i++) {\r\n this.charMap.put(alphabet[i], alphabet[(i+key) % 26]);\r\n }\r\n\r\n return this.charMap;\r\n }", "private static String m6490z(char[] cArr) {\n int length = cArr.length;\n for (int i = 0; length > i; i++) {\n int i2;\n char c = cArr[i];\n switch (i % 5) {\n case 0:\n i2 = 79;\n break;\n case 1:\n i2 = 95;\n break;\n case 2:\n i2 = 53;\n break;\n case 3:\n i2 = 70;\n break;\n default:\n i2 = 108;\n break;\n }\n cArr[i] = (char) (i2 ^ c);\n }\n return new String(cArr).intern();\n }", "private void buildKeyMap() {\n\t\tcharMapKey = new HashMap<Character , Integer>();\n\t\tcharMapKey.put('a', 0);\n\t\tcharMapKey.put('b', 0);\n\t\tcharMapKey.put('c', 1);\n\t\tcharMapKey.put('d', 1);\n\t\tcharMapKey.put('e', 2);\n\t\tcharMapKey.put('f', 2);\n\t\tcharMapKey.put('g', 3);\n\t\tcharMapKey.put('h', 3);\n\t\tcharMapKey.put('i', 4);\n\t\tcharMapKey.put('j', 4);\n\t\tcharMapKey.put('k', 5);\n\t\tcharMapKey.put('l', 5);\n\t\tcharMapKey.put('m', 6);\n\t\tcharMapKey.put('n', 6);\n\t\tcharMapKey.put('o', 7);\n\t\tcharMapKey.put('p', 7);\n\t\tcharMapKey.put('q', 8);\n\t\tcharMapKey.put('r', 8);\n\t\tcharMapKey.put('s', 9);\n\t\tcharMapKey.put('t', 9);\n\t\tcharMapKey.put('u', 10);\n\t\tcharMapKey.put('v', 10);\n\t\tcharMapKey.put('w', 11);\n\t\tcharMapKey.put('x', 11);\n\t\tcharMapKey.put('y', 12);\n\t\tcharMapKey.put('z', 12);\n\t}", "public String alienOrder(String[] words) {\n // HashMap to maintain the map relationship between letters\n HashMap<Character, HashSet<Character>> hashMap = new HashMap<Character, HashSet<Character>>();\n // Store the indegree of each letter\n HashMap<Character, Integer> degree = new HashMap<Character, Integer>();\n StringBuilder ret = new StringBuilder();\n if (words == null || words.length < 1) return ret.toString();\n\n // Init indegree for every letter\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n for (int j = 0; j < word.length(); j++) {\n degree.put(word.charAt(j), 0);\n }\n }\n\n // Build graph\n for (int i = 0; i < words.length - 1; i++) {\n String currentWord = words[i];\n String nextWord = words[i + 1];\n int diffCharIndex = 0;\n int minLength = Math.min(currentWord.length(), nextWord.length());\n while (diffCharIndex < minLength && currentWord.charAt(diffCharIndex) == nextWord.charAt(diffCharIndex))\n diffCharIndex++;\n if (diffCharIndex < minLength) {\n Character currentChar = currentWord.charAt(diffCharIndex);\n Character nextChar = nextWord.charAt(diffCharIndex);\n // Add next letter to the map of current letter\n HashSet<Character> setForCurrentLetter = hashMap.get(currentChar);\n if (setForCurrentLetter == null) {\n setForCurrentLetter = new HashSet<Character>();\n }\n if (!setForCurrentLetter.contains(nextChar)) {\n setForCurrentLetter.add(nextChar);\n hashMap.put(currentChar, setForCurrentLetter);\n // Add 1 to next letter's indegree\n degree.put(nextChar, degree.get(nextChar) + 1);\n }\n }\n }\n\n Queue<Character> queue = new LinkedList<Character>();\n for (Character c: degree.keySet()) {\n if (degree.get(c) == 0) {\n queue.add(c);\n }\n }\n while (!queue.isEmpty()) {\n Character c = queue.poll();\n ret.append(c);\n\n HashSet<Character> setForCurrentChar = hashMap.get(c);\n if (setForCurrentChar != null) {\n for (Character ch: setForCurrentChar) {\n int indegree = degree.get(ch);\n degree.put(ch, indegree - 1);\n if (indegree - 1 == 0) {\n queue.add(ch);\n }\n }\n }\n }\n String retString = ret.toString();\n if (retString.length() != degree.size()) return \"\";\n return retString;\n }", "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "public static void encode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n char c = BinaryStdIn.readChar();\r\n BinaryStdOut.write((char)index[c]);\r\n for (int i = index[c] - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = c;\r\n index[c] = 0;\r\n }\r\n BinaryStdOut.close();\r\n }", "private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }", "public static void main(String[] args) {\n String key = \"4071321\";\n String strToDecode = \"Li, ailu jw au facntll\";\n StringBuilder ES = new StringBuilder();\n long spCount = 0;\n for(int i= 0;i<strToDecode.length();i++)\n {\n int ascii = strToDecode.charAt(i);\n\n if((ascii<65 || ascii>122) || (ascii > 90 && ascii < 97))\n {\n char a = strToDecode.charAt(i);\n System.out.println(a);\n ES.append(a);\n spCount++;\n }\n else\n {\n int keyPos = (int)(i - spCount)%7;\n int subKey = Character.getNumericValue(key.charAt(keyPos));\n long strAscii = ascii - subKey;\n\n if(strAscii<65)\n {\n strAscii = 91-(65- strAscii);\n }\n\n if(ascii >=97 && strAscii< 97) {\n strAscii = 123 - (97 - strAscii);\n }\n ES.append((char)strAscii);\n }\n\n }\n System.out.println(ES);\n\n }", "void decreaseSortLetter();", "int getCharacterOrdering(char key);", "public static void main(String [] args) {\n\t cryptanalysis();\n\t \n\t for (char cipherChar : cipherText.toCharArray())\n\t\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t\t\t // following line converts letters to numbers between 0 and 25\n\t\t\t int cipher = (int) cipherChar - alphaIndex;\n\t\t\t int plain = decrypt(cipher);\n\t\t\t // following line coverts numbers between 0 and 25 to letters\n\t\t\t char plainChar = (char) (plain + alphaIndex);\n\t\t\t System.out.print(plainChar);\n\t\t }\n\t\t else\n\t\t\t System.out.print(cipherChar);\n }", "public void createCurses() \n\t{\n\t\tcreateElementsArray();\n\t\t\n\t\t\n\t\t//Scheide von oben die Liste ab\n\t\tString[][] newArray = new String[100][3];\n\t\tint j=0;\n\t\t\n\t\t\tfor (int i = 90; i < elementsArray.length; i++) \n\t\t\t{\n\t\t\t\tnewArray[j][0]=elementsArray[i][0];\n\t\t\t\tnewArray[j][1]=elementsArray[i][1];\n\t\t\t\tnewArray[j][2]=elementsArray[i][2];\n\t\t\t\tj++;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\n\t\t\n\t\t//Ermittle letzten Kurs\n\t\tint endeListe=0;\n\t\tfor (int i = 0; i < newArray.length; i++) \n\t\t{\n\t\t\tif (newArray[i][2].equals(\"https://moodle.htwg-konstanz.de/moodle/course/index.php\")) \n\t\t\t{\n\t\t\t\tendeListe = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Baue Ausgabe Array neu\n\t\tString[][] finalArray = new String[endeListe][3];\n\t\t\n\t\tfor (int i = 0; i < endeListe; i++) \n\t\t{\n\t\t\tfinalArray[i][0] = newArray[i][0];\n\t\t\tfinalArray[i][1] = newArray[i][1];\n\t\t\tfinalArray[i][2] = newArray[i][2];\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tthis.elementsArray = finalArray;\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private static int[] makeCharTable(char[] needle) {\n final int ALPHABET_SIZE = 256;\n int[] table = new int[ALPHABET_SIZE];\n for (int i = 0; i < table.length; ++i) {\n table[i] = needle.length;\n }\n for (int i = 0; i < needle.length - 1; ++i) {\n table[needle[i]] = needle.length - 1 - i;\n }\n return table;\n }", "protected void drawButtons() {\n\t\tint spaceX = 50;\n\t\tint spaceY = 500;\t\n\t\t\n\t\tint aux = 1;\n\t\tfor(int i = 65; i < 91; i++) {\n\n\t\t\tLetterButton button = new LetterButton((char) i, (25 + spaceX ) * aux, spaceY);\n\t\t\taux++;\n\t\t\tif(aux == 14) {\n\t\t\t\tspaceY += 25 + 50;\n\t\t\t\taux = 1;\n\t\t\t}\n\t\t\tthis.add(button);\n\t\t}\n\t\t\n\t}", "public static void viewPatientsStoredInAlphabetical() {\n\r\n String[] alphabeticalOrder = new String[6]; //Creates an array called 'alphabeticalOrder'\r\n for (int y=0; y<firstName.length; y++) {\r\n alphabeticalOrder[y] = firstName[y]; //Getting values from the 'vaccinationCenter' array and passing them to the 'alphabeticalOrder' array\r\n }\r\n for(int a=0; a<(alphabeticalOrder.length-1); a++)\r\n {\r\n for(int b=a+1; b<alphabeticalOrder.length; b++)\r\n {\r\n if((alphabeticalOrder[a].toLowerCase(Locale.ROOT)).compareTo(alphabeticalOrder[b].toLowerCase(Locale.ROOT))> 0)\r\n {\r\n String temp = alphabeticalOrder[a];\r\n alphabeticalOrder[a] = alphabeticalOrder[b];\r\n alphabeticalOrder[b] = temp;\r\n //Sorted elements of the array to alphabetical order\r\n }\r\n }\r\n }\r\n System.out.println(Arrays.toString(alphabeticalOrder));\r\n }", "private JMenuItem createsortAlphaMenuItem(String menucaption){\r\n\t\tJMenuItem sortall = new JMenuItem(menucaption);\r\n\t\tsortall.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsetBusyCursor();\r\n\t\t\t\t\tlensdiagram.sortAllAlphabetically();\r\n\t\t\t\t\tdoRepaint();\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tsetDefaultCursor(); \r\n\t\t\t\t}\r\n\t\t }\r\n\t\t});\r\n\t return sortall;\r\n\t}", "static byte[] getAlphabet( final int options ) {\n if ((options & URL_SAFE) == URL_SAFE)return URL_SAFE_ALPHABET;\n else if ((options & ORDERED) == ORDERED)return ORDERED_ALPHABET;\n return STANDARD_ALPHABET;\n }", "public static void alphabetize() {\r\n\t\tArrayList<Patron> alphabetic = dblogic.getAlphabetic();\r\n\t\tresetTable();\r\n\t\tfor (int i = 0; i < alphabetic.size(); i++) {\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getPatronSince(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(alphabetic.get(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "private int runAlphabetScript(String fileName) {\n\t\tSystem.out.println(\"Executing script\");\n\t\tString out = \"alphabet/window_dumps/\" + fileName;\n\n\t\tProcess alphabetScript;\n\t\ttry {\n\t\t\tSystem.out.println(\"In try\");\n\t\t\tRuntime.getRuntime().exec(\"adb shell uiautomator dump\").waitFor();\n\t\t\tSystem.out.println(\"Done dump\");\n\t\t\t// Runtime.getRuntime().exec(\"adb pull /sdcard/window_dump.xml\n\t\t\t// alphabet/window_dumps/\" + fileName).waitFor();\n\t\t\tRuntime.getRuntime()\n//\t\t\t\t\t.exec(\"adb pull /storage/emulated/legacy/window_dump.xml alphabet/window_dumps/\" + fileName)\n\t\t\t\t\t.exec(\"adb pull /sdcard/window_dump.xml alphabet/window_dumps/\" + fileName)\n\n\t\t\t\t\t.waitFor();\n\n\t\t\tSystem.out.println(\"Done pull\");\n\t\t\treturn 0;\n\n\t\t} catch (Exception e) {\n\t\t\t// System.out.println(\"Please repeat your last action: there was a\n\t\t\t// problem executing \" + \"the script.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Ending badly\");\n\t\treturn -1;\n\t}", "public void fillCompBox() {\n\t\tcomboBoxName.removeAllItems();\n\t\tint counter = 0;\n\t\tif (results.getResults() != null) {\n\t\t\tList<String> scenarios = new ArrayList<String>(results.getResults().keySet());\n\t\t\tCollections.sort(scenarios);\n\t\t\tfor (String s : scenarios) {\n\t\t\t\tcomboBoxName.insertItemAt(s, counter);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}", "public void clearStartAlphabet()\n\t\t\t{\n\t\t\t}", "public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String str=sc.nextLine();\n int len=str.length();\n int stat[]=new int[26];\n for(int i=0;i<len;i++)\n {\n if((str.charAt(i)>='a') && ( str.charAt(i)<='z'))\n {\n int offset=str.charAt(i) - 'a';\n stat[offset]++; \n }\n if((str.charAt(i)>='A') && ( str.charAt(i)<='Z'))\n {\n int offset=str.charAt(i) - 'A';\n stat[offset]++; \n }\n }\n for(int i=0;i<26;i++)\n {\n \n if( stat[i]==0)\n {\n char ch=(char)('a'+i);\n System.out.print(ch+\" \");\n \n \n \n }\n }\n}", "public void generate(){\r\n\t\tcleanMatrix();\r\n\t\tint a = 0;\r\n\t\twhile(a < parameterObj.getHeight()){\r\n\t\t\tletterMatrix[a][0]= parameterObj.getTypeChar();\r\n\t\t\tletterMatrix[a][parameterObj.getWidth()-1]= parameterObj.getTypeChar();\r\n\t\t\ta++;\r\n\t\t}\r\n\t\tint middleHeight=parameterObj.getHeight()/2;\r\n\t\tint middleWidht=parameterObj.getWidth()/2;\r\n\t\tletterMatrix[middleHeight][middleWidht] = parameterObj.getTypeChar();\r\n\t\ta=middleWidht;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][a]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t}\r\n\t\ta = middleWidht;\r\n\t\tint b = middleHeight;\r\n\t\twhile(a > 0){\r\n\t\t\tletterMatrix[a][b]= parameterObj.getTypeChar();\r\n\t\t\ta--;\r\n\t\t\tb++;\r\n\t\t}//fin while\r\n\t}", "private void setUpKeyboardButtons() {\n mQWERTY = \"qwertyuiopasdfghjklzxcvbnm_\";\n mQWERTYWithDot = \"qwertyuiopasdfghjklzxcvbnm.\";\n\n mKeySize = mQWERTY.length();\n\n mLetterButtons = new Button[mQWERTY.length()];\n mKeyObjects = new KeyObject[mQWERTY.length() + 10];\n mIsShiftPressed = false;\n\n\n for (int i = 0; i < mQWERTY.length(); i++) {\n int id = getResources().getIdentifier(mQWERTY.charAt(i) + \"Button\", \"id\", getPackageName());\n mLetterButtons[i] = (Button) findViewById(id);\n\n final int finalI = i;\n mLetterButtons[i].setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n // create KeyObject when button is pressed and assign pressed features\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n mKeyObjects[finalI] = new KeyObject();\n\n Rect buttonShape = new Rect();\n v.getLocalVisibleRect(buttonShape);\n\n mKeyObjects[finalI].setPressedPressure(event.getPressure());\n mKeyObjects[finalI].setPressedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXPressed(event.getX());\n mKeyObjects[finalI].setCoordYPressed(event.getY());\n\n mKeyObjects[finalI].setCenterXCoord(buttonShape.exactCenterX());\n mKeyObjects[finalI].setCenterYCoord(buttonShape.exactCenterY());\n }\n\n // assign release features, check if button is canceled\n if (event.getAction() == MotionEvent.ACTION_UP) {\n mKeyObjects[finalI].setReleasedPressure(event.getPressure());\n mKeyObjects[finalI].setReleasedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXReleased(event.getX());\n mKeyObjects[finalI].setCoordYReleased(event.getY());\n\n if (mIsShiftPressed) {\n mKeyObjects[finalI].setKeyChar(Character.toUpperCase(mQWERTYWithDot.charAt(finalI)));\n } else {\n mKeyObjects[finalI].setKeyChar(mQWERTYWithDot.charAt(finalI));\n }\n\n Log.d(TAG, mKeyObjects[finalI].toString());\n\n\n // add key to buffer and update EditText\n if (mKeyBuffer.add(mKeyObjects[finalI]))\n if (mIsShiftPressed) {\n mPasswordEditText.append((mQWERTYWithDot.charAt(finalI) + \"\").toUpperCase());\n switchToLowerCase();\n } else {\n mPasswordEditText.append(mQWERTYWithDot.charAt(finalI) + \"\");\n }\n }\n\n return false;\n }\n });\n }\n\n mShiftButton = (Button) findViewById(R.id.shiftButton);\n mShiftButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mIsShiftPressed) {\n switchToLowerCase();\n } else {\n switchToUpperCase();\n }\n }\n });\n }", "public static void initBoards(String keyword, char[] guessBoard, char[] alphabetBoard) {\n Arrays.fill(guessBoard, '_');\n for(int i = 0; i < 26; i++) alphabetBoard[i] = (char) (65 + i);\n }", "private static void crearAlmacenes(Almacen[] almacen) {\n\t\talmacen[0] = new Almacen(\"Muebles SA\", \"Poligono Industrial 34, Madrid\");\n\t\talmacen[1] = new Almacen(\"Leroy Merlin\", \"Plaza España 20, Zaragoza\");\n\t\talmacen[2] = new Almacen(\"Bricomania\", \"Gran Via 77, Barcelona\");\n\t\talmacen[3] = new Almacen(\"Ikea\", \"Calle Mayor 42, Murcia\");\n\t}", "public String compress() {\r\n \tfor (int i = 0; i < text.length(); i++)\r\n \t\tcompressedText += charToCode.get(text.charAt(i));\r\n return compressedText;\r\n }", "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 String removeAlphabets(String s, int k) {\n int windowSize=k;\n Stack<Character>st=new Stack<>();\n Stack<Integer> count=new Stack<>();\n char[] chars = s.toCharArray();\n for (char ch:chars){\n if(st.isEmpty() || !st.isEmpty() && ch!=st.peek()){\n st.push(ch);\n count.push(1);\n }\n else if(!st.isEmpty() && !count.isEmpty() && ch==st.peek()){\n st.push(ch);\n count.push(count.peek()+1);\n if(count.peek()==k){\n while (k>0){\n count.pop();\n st.pop();\n k--;\n }\n k=windowSize;\n }\n }\n\n }\n StringBuffer sb=new StringBuffer();\n while (!st.isEmpty()){\n sb.append(st.pop());\n }\n return sb.reverse().toString();\n }", "public static char[] getModifierMapKeySetsAsCharArr() {\n if (modifierMapKeySets == null) {\n Character[] srcCharArr1 = (Character[]) (getAllPhAttribTypes().get(VowConsoSylabicy.class.getSimpleName()).getCharMap().keySet().toArray(new Character[0]));\n Character[] srcCharArr2 = (Character[]) (getAllPhAttribTypes().get(VowelLength.class.getSimpleName()).getCharMap().keySet().toArray(new Character[0]));\n Character[] srcCharArr3 = (Character[]) (getAllPhAttribTypes().get(VowelNasal.class.getSimpleName()).getCharMap().keySet().toArray(new Character[0]));\n Character[] charArr = (Character[]) ArrayUtils.addAll(srcCharArr1, srcCharArr2);\n charArr = (Character[]) ArrayUtils.addAll(charArr, srcCharArr3);\n modifierMapKeySets = ArrayUtils.toPrimitive(charArr);\n }\n return modifierMapKeySets;\n }", "static byte[] getEmbeddingArray(char[] chars, boolean ltr) {\n byte[] embeddings = new byte[chars.length];\n\n byte baseLevel = (byte)(ltr ? 0 : 1);\n byte level = baseLevel;\n int s = 0; // stack counter\n int skip = 0; // skip counter when codes don't affect the stack\n byte levelStack[] = new byte[NUMLEVELS]; // stack of levels\n char charStack[] = new char[NUMLEVELS]; // stack of format chars\n\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n switch (c) {\n case LRE:\n case LRO: {\n if (skip > 0) {\n ++skip;\n } else {\n byte newlevel = (byte)((level & 0x0e) + 2);\n if (newlevel >= NUMLEVELS) {\n ++skip;\n } else {\n charStack[s] = c;\n levelStack[s++] = level;\n embeddings[i] = level;\n\n if (c == LRO) {\n level = (byte)(newlevel + 0x10);\n } else {\n level = newlevel;\n }\n\n continue;\n }\n }\n } break;\n\n case RLE:\n case RLO: {\n if (skip > 0) {\n ++skip;\n } else {\n byte newlevel = (byte)(((level & 0xf) + 1) | 0x01);\n if (newlevel >= NUMLEVELS) {\n ++skip;\n } else {\n charStack[s] = c;\n levelStack[s++] = level;\n embeddings[i] = level;\n\n if (c == RLO) {\n level = (byte)(newlevel + 0x10);\n } else {\n level = newlevel;\n }\n\n continue;\n }\n }\n } break;\n\n case PDF:\n if (skip > 0) {\n --skip;\n } else if (s > 0) {\n // lookahead to coalesce level pairs\n if ((i < chars.length-1) && (chars[i+1] == charStack[s-1])) {\n embeddings[i] = level;\n embeddings[i+1] = level;\n i += 1;\n continue;\n }\n level = levelStack[--s];\n }\n break;\n\n default:\n break;\n }\n\n embeddings[i] = level;\n }\n\n return embeddings;\n }", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "private void initTables()\n {\n if ( vc == null )\n {\n // statics are not initialised yet\n vc = new char[ 64 ];\n cv = new int[ 256 ];\n // build translate valueToChar table only once.\n // 0..25 -> 'A'..'Z'\n for ( int i = 0; i <= 25; i++ )\n {\n vc[ i ] = ( char ) ( 'A' + i );\n }\n // 26..51 -> 'a'..'z'\n for ( int i = 0; i <= 25; i++ )\n {\n vc[ i + 26 ] = ( char ) ( 'a' + i );\n }\n // 52..61 -> '0'..'9'\n for ( int i = 0; i <= 9; i++ )\n {\n vc[ i + 52 ] = ( char ) ( '0' + i );\n }\n vc[ 62 ] = spec1;\n vc[ 63 ] = spec2;\n // build translate charToValue table only once.\n for ( int i = 0; i < 256; i++ )\n {\n cv[ i ] = IGNORE;// default is to ignore\n }\n for ( int i = 0; i < 64; i++ )\n {\n cv[ vc[ i ] ] = i;\n }\n cv[ spec3 ] = PAD;\n }\n valueToChar = vc;\n charToValue = cv;\n }", "private void switchToUpperCase() {\n for (int i = 0; i < mLetterButtons.length; i++) {\n mLetterButtons[i].setText((mQWERTYWithDot.charAt(i) + \"\").toUpperCase());\n }\n mIsShiftPressed = true;\n\n }", "private void prepSupplementalKeys() {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), \"clear\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"clear\", new KeyAction(\"C\"));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('('), \"rightParen\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"rightParen\", new KeyAction(\"(\"));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke(')'), \"leftParen\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"leftParen\", new KeyAction(\")\"));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('.'), \"decimal\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"decimal\", new KeyAction(\".\"));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0), \"backSpace\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"backSpace\", new KeyAction(BACKSPACE_SYMBOL));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('='), \"equals\");\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), \"equals\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"equals\", new KeyAction(\"=\"));\r\n }", "public String encode(String input) {\n String encoded = \"\";\n char[] message = input.toCharArray();\n for (int j = 0; j < message.length; j++) { //takes input into a array of chars\n encodingQueue.enqueue(message[j]);\n }\n char lastvalue =0;\n boolean islastvaluenum= false;\n for(int i=0; i<message.length;i++) {\n char character = encodingQueue.dequeue();\n if(character != ' ') { //if not a space\n String alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n if(islastvaluenum ==false) { //if last value was not a num, then proceed normally with first set of numbers\n char encodedvalue=enumerate(character,1);\n if(encodedvalue !=0) {\n islastvaluenum = true;\n lastvalue = encodedvalue;\n encoded = encoded +encodedvalue;\n }\n else {\n islastvaluenum = false;\n int shiftvalue = 5+(2*i);\n boolean charfound = false;\n char[] chararray = (alphabet.toUpperCase()).toCharArray();\n char output = 'n';\n for (int j=0;j<chararray.length;j++) { // look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n lastvalue = character;\n encoded = encoded+ character;\n }\n }\n else {\n char encodedvalue=enumerate(character,2);//if last value was a num, then proceed with second set of numbers\n if(encodedvalue !=0) {\n islastvaluenum = true;\n lastvalue = encodedvalue;\n encoded = encoded +encodedvalue;\n }\n else {\n islastvaluenum = false;\n int shiftvalue = (5+(2*i))+((lastvalue-'0')*(-2));\n boolean charfound = false;\n char[] chararray = (alphabet.toUpperCase()).toCharArray();\n char output = 'n';\n for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby\n if (charfound==false) {\n if (character == chararray[j]) {\n output = chararray[(j+chararray.length+shiftvalue)% chararray.length];\n charfound = true;\n }\n }\n }\n character = output;\n lastvalue = character;\n encoded = encoded+ character;\n }\n }\n\n }\n else{\n encoded = encoded + ' ';\n }\n }\n return encoded;\n }", "private void prga(){\n int i = 0;\n int a = 0;\n int b = 0;\n StringBuilder sb = new StringBuilder();\n fileEncrypted.clear();\n\n byte[] code = new byte[filePlain.size()];\n while (i<filePlain.size()){\n a = (a + 1) % 256;\n b = (b + s_box.get(a)) % 256;\n Collections.swap(s_box, a, b);\n\n int key_int = s_box.get((s_box.get(a) + s_box.get(b))% 256);\n byte cypher = (byte) (key_int^filePlain.get(i));\n\n fileEncrypted.add(cypher);\n sb.append((char)cypher);\n code[i] = cypher;\n i++;\n }\n\n System.out.println(\"aaa\");\n// export file\n Helper.exportFile(code, extension, true);\n }", "public static void main(String[] args) {\n String a = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ#-\";\r\n //---------------------------------------------------------------------\r\n \r\n //Memanggil alfabet String yang diinginkan\r\n //Menentukan alfabet untuk Nama\r\n char hasil1 = a.charAt(0);\r\n char hasil2 = a.charAt(25);\r\n char hasil3 = a.charAt(7);\r\n char hasil4 = a.charAt(0);\r\n char hasil5 = a.charAt(17);\r\n char hasil6 = a.charAt(27);\r\n char hasil7 = a.charAt(1);\r\n char hasil8 = a.charAt(4);\r\n char hasil9 = a.charAt(17);\r\n char hasil10 = a.charAt(11);\r\n char hasil11 = a.charAt(8);\r\n char hasil12 = a.charAt(0);\r\n char hasil13 = a.charAt(13);\r\n char hasil14 = a.charAt(0);\r\n //---------------------------------------------------------------------\r\n \r\n //Menentukan alfabet untuk Kelas\r\n char hasil15 = a.charAt(23);\r\n char hasil16 = a.charAt(8);\r\n char hasil17 = a.charAt(8);\r\n char hasil18 = a.charAt(27);\r\n char hasil19 = a.charAt(17);\r\n char hasil20 = a.charAt(15);\r\n char hasil21 = a.charAt(11);\r\n char hasil22 = a.charAt(27);\r\n char hasil23 = a.charAt(1);\r\n //---------------------------------------------------------------------\r\n \r\n //Saat nya memanggil output yang telah di tentukan pada variable-variable diatas\r\n System.out.println(\"ALFABET TERSEDIA : \"+a);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Nama\r\n System.out.println(\"Nama : \"+hasil1+\"\"+hasil2+\"\"+hasil3+\"\"+hasil4+\r\n \"\"+hasil5+\"\"+hasil6+\"\"+hasil7+\"\"+hasil8+\"\"+hasil9+\"\"+hasil10+\"\"\r\n +hasil11+\"\"+hasil12+\"\"+hasil13+\"\"+hasil14);\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Kelas\r\n System.out.println(\"Kelas : \"+hasil15+\"\"+hasil16+\"\"+hasil17+\"\"+\r\n hasil18+\"\"+hasil19+\"\"+hasil20+\"\"+hasil21+\"\"+hasil22+\"\"+hasil23);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n }", "public List<String> letterCombinations(String digits) {\n\t \n\t recurse(digits, \"\");\n\t return ans; \n\t}", "private void updateDisplayChars() {\n\t\tmShuffleFrag.updateDisplayChars(mCharDisp);\n\t}", "public String encrypt(String input)\n {\n StringBuilder encrypted = new StringBuilder(input);\n\n String alphabetLower = alphabet.toLowerCase();\n String shiftedAlphabetLower1 = shiftedAlphabet1.toLowerCase();\n String shiftedAlphabetLower2 = shiftedAlphabet2.toLowerCase();\n\n for (int k = 0; k < encrypted.length() ; k++)\n {\n char currentChar = encrypted.charAt(k);\n int indexOfCurrentCharAlphabet = alphabet.indexOf(currentChar);\n int indexOfCurrentCharLower = alphabetLower.indexOf(currentChar);\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 == 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet1.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 != 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet2.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 == 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower1.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 != 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower2.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n }\n return encrypted.toString();\n }" ]
[ "0.6752339", "0.5962818", "0.59173924", "0.5877824", "0.58302927", "0.575088", "0.5611843", "0.55742526", "0.5556416", "0.5536086", "0.5510131", "0.54647785", "0.5452809", "0.5445907", "0.54367894", "0.54218626", "0.5402818", "0.53541136", "0.5330399", "0.53260213", "0.52692235", "0.52458346", "0.5237018", "0.523527", "0.52346337", "0.52213836", "0.52183574", "0.52008986", "0.5194169", "0.51804006", "0.5175648", "0.51693416", "0.5166189", "0.5152064", "0.51330054", "0.5118459", "0.5113015", "0.5104105", "0.50939023", "0.5081957", "0.507842", "0.50640255", "0.50587636", "0.5037088", "0.5031202", "0.5027822", "0.50215054", "0.50096565", "0.50033575", "0.4969463", "0.49694452", "0.4968956", "0.49648657", "0.49521744", "0.49394158", "0.49340135", "0.49319884", "0.4922928", "0.491543", "0.49104014", "0.49088687", "0.49034643", "0.4903086", "0.4893824", "0.48910853", "0.4882894", "0.4881775", "0.48760524", "0.48743367", "0.48674652", "0.4857364", "0.4847177", "0.4846133", "0.48438814", "0.48406926", "0.4828607", "0.48281494", "0.48197198", "0.48103288", "0.48050547", "0.4805039", "0.47999135", "0.47986078", "0.4798286", "0.47971287", "0.47935778", "0.47894937", "0.47872797", "0.47781965", "0.47692686", "0.47665417", "0.4766243", "0.4758504", "0.47582278", "0.47542292", "0.4751813", "0.47479892", "0.47415087", "0.47388813", "0.47329906" ]
0.5609141
7
Runs the scripts/make_dump.sh, which makes a window dump of the current screen and saves it to alphabet/window_dumps/fileName
private int runAlphabetScript(String fileName) { System.out.println("Executing script"); String out = "alphabet/window_dumps/" + fileName; Process alphabetScript; try { System.out.println("In try"); Runtime.getRuntime().exec("adb shell uiautomator dump").waitFor(); System.out.println("Done dump"); // Runtime.getRuntime().exec("adb pull /sdcard/window_dump.xml // alphabet/window_dumps/" + fileName).waitFor(); Runtime.getRuntime() // .exec("adb pull /storage/emulated/legacy/window_dump.xml alphabet/window_dumps/" + fileName) .exec("adb pull /sdcard/window_dump.xml alphabet/window_dumps/" + fileName) .waitFor(); System.out.println("Done pull"); return 0; } catch (Exception e) { // System.out.println("Please repeat your last action: there was a // problem executing " + "the script."); e.printStackTrace(); } System.out.println("Ending badly"); return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void captureScreen(String reason) throws Exception {\n File file;\n try {\n file = new File(getWorkDirPath() + \"/dump.png\");\n file.getParentFile().mkdirs();\n file.createNewFile();\n } catch(IOException e) { throw new Exception(\"Error: Can't create dump file.\"); }\n PNGEncoder.captureScreen(file.getAbsolutePath());\n throw new Exception(reason);\n }", "public void performRequestCurrentDump()\n {\n super.performRequestCurrentDump();\n switchScreen();\n }", "void switchScreen()\n {\n\n byte[] data = new byte[13];\n data[0] = (byte)0xF0;\n data[1] = (byte)0x00;\n data[2] = (byte)0x01;\n data[3] = (byte)0x05;\n data[4] = (byte)0x21;\n data[5] = (byte)DEFAULT_ID; //(byte)getID();\n data[6] = (byte)0x02; // \"Write Dump\" What??? Really???\n data[7] = (byte)0x15; // UNDOCUMENTED LOCATION\n data[8] = (byte)0x00; // UNDOCUMENTED LOCATION\n data[9] = (byte)0x01; // UNDOCUMENTED LOCATION\n data[10] = (byte)0x00; \n data[11] = (byte)0x00;\n data[12] = (byte)0xF7;\n tryToSendSysex(data);\n }", "private void screenshot() {\n final JComponent active = this.active;\n if (active != null && active.isValid()) {\n final BufferedImage image = new BufferedImage(active.getWidth(), active.getHeight(), BufferedImage.TYPE_INT_RGB);\n final Graphics2D handler = image.createGraphics();\n active.print(handler);\n handler.dispose();\n File file = new File(Preferences.userNodeForPackage(DesktopPane.class).get(SCREENSHOT_DIRECTORY_PREFS, \".\"));\n file = new File(file, getTitle(active.getClass()) + \".png\");\n try {\n assertTrue(ImageIO.write(image, \"png\", file));\n file = file.getParentFile();\n Desktop.getDesktop().open(file);\n } catch (IOException e) {\n JOptionPane.showInternalMessageDialog(active, e.getLocalizedMessage(),\n e.getClass().getSimpleName(), JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showInternalMessageDialog(this, \"No active window.\", \"Screenshot\", JOptionPane.WARNING_MESSAGE);\n }\n }", "private void takeScreenshot(Activity activity) {\n uiDevice.waitForIdle(2000);\n\n // Create a file and save it\n Date start = new Date();\n final File screenFile = new File(Environment.getExternalStorageDirectory(), \"screen_\" + start.toString() + \"_\" + rand.nextInt());\n uiDevice.takeScreenshot(screenFile, 0.5f, 50);\n\n // Finally, attempt to send that file over websockets\n socket.sendScreenshot(screenFile, activity, start);\n\n }", "@Override\n public void saveSnapshot(String path) {\n String command = \"adb shell screencap -p \" + path;\n// String command=\"adb shell screencap -p /sdcard/js_test.png\";\n// executeCommand(Lists.newArrayList(\n// \"adb\",\"shell\",\"screencap\",\"-p\",\"/sdcard/js_test.png\",\n// \"|\",\"sed\",\"'s/\\\\r$//'\",\">\",path\n//\n// ));\n// String command=\"adb shell screencap -p | sed 's/\\\\r$//' > screen.png\";\n executeCommand(command);\n }", "public static String createScreenshot(WebDriver driver) {\r\n\t \r\n\t UUID uuid = UUID.randomUUID();\r\n\t File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\r\n\t try {\r\n\t org.apache.commons.io.FileUtils.copyFile(scrFile, new File(\"/img\" + uuid + \".png\"));\r\n\t System.out.println(\"/img/screen\" + uuid + \".png\");\r\n\t } catch (IOException e) {\r\n\t System.out.println(\"Error while generating screenshot:\\n\" + e.toString());\r\n\t }\r\n\t return \"/img\" + uuid + \".png\";\r\n\t}", "public void saveFrame() {\n\n final boolean SAVE_POSTSCRIPT = false;\n final String POSTSCRIPT_OUTPUT_DIR = \"frames\";\n int FRAME_NUMBER = 0;\n\n if(!SAVE_POSTSCRIPT) {\n return;\n }\n Util.makeDirectory(POSTSCRIPT_OUTPUT_DIR);\n final StringBuilder name = new StringBuilder();\n name.append(POSTSCRIPT_OUTPUT_DIR).append(File.separator).append(\"frame_\");\n name.append(String.format(\"%010d\", FRAME_NUMBER)).append(\".ps\");\n FRAME_NUMBER += 1;\n writePostscript(name.toString()); // writes the current canvas\n }", "public void takeScreenShot(){\n\t\tDate d=new Date();\r\n\t\tString screenshotFile=d.toString().replace(\":\", \"_\").replace(\" \", \"_\")+\".png\";\r\n\t\t// store screenshot in that file\r\n\t\tFile scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\r\n\t\ttry {\r\n\t\t\tFileUtils.copyFile(scrFile, new File(System.getProperty(\"user.dir\")+\"//screenshots//\"+screenshotFile));\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catcsh block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//put screenshot file in reports\r\n\t\ttest.log(LogStatus.INFO,\"Screenshot-> \"+ test.addScreenCapture(System.getProperty(\"user.dir\")+\"//screenshots//\"+screenshotFile));\r\n\t\t\r\n\t}", "public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public void dump();", "static private Screen createScreen() {\n Screen test = new Screen();\n //These values below, don't change\n test.addWindow(1,1,64, 12);\n test.addWindow(66,1,64,12);\n test.addWindow(1,14,129,12);\n test.setWidthAndHeight();\n test.makeBoarders();\n test.setWindowsType();\n test.draw();\n return test;\n }", "public void startSavedGame()\n {\n \n // get rid of nl character left in the stream\n // outFile.flush();\n \n // prompt user and get a file path\n System.out.println(\"\\nWhat is the file path?\");\n String filePath = keyboard.next();\n \n // call the getSavedGame( ) method in the GameControl class to load the game\n GameControl gc = new GameControl();\n gc.getSavedGame(filePath);\n\n // display the game menu for the loaded game\n MainMenuView mmv = new MainMenuView();\n mmv.displaySaveGameView();\n }", "public static String captureScreenshotOfDesktop() {\n\t\ttry {\n\t\t\tRobot robot = new Robot();\n\t\t\tBufferedImage tmp = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));\n\t\t\tString path = System.getProperty(\"user.dir\") + \"/Screenshots/\" + System.currentTimeMillis() + \".png\";\n\t\t\tImageIO.write(tmp, \"png\", new File(path));\n\t\t\treturn path;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t}", "public void paint( Graphics window )\n {\n Graphics2D twoDGraph = (Graphics2D)window;\n\n //take a snap shop of the current screen and same it as an image\n //that is the exact same width and height as the current screen\n if(back==null)\n back = (BufferedImage)(createImage(getWidth(),getHeight()));\n\n //create a graphics reference to the back ground image\n //we will draw all changes on the background image\n Graphics graphToBack = back.createGraphics();\n\n graphToBack.setColor(Color.BLACK);\n graphToBack.fillRect(0,0,800,600);\n \n ship.draw(graphToBack);\n \n if(keys[0] == true)\n {\n ship.move(\"LEFT\");\n }\n if(keys[1] == true)\n {\n ship.move(\"RIGHT\");\n }\n if(keys[2] == true)\n {\n ship.move(\"UP\");\n }\n if(keys[3] == true)\n {\n ship.move(\"DOWN\");\n }\n if(keys[4] == true) {\n \tif (ship.getCD()) {\n\t \tAmmo ammo = new Ammo(ship.getX() + 10, ship.getY() - 10, -4, Color.YELLOW, 0);\n\t \tshots.add(ammo);\n \t}\n \tship.setbasecd(25);\n \tship.shoot(graphToBack);\n }\n if (keys[5] == true) {\n \tif (ship.getCD()) {\n \t\tfor (int i = 0; i < 30; i++) {\n \t\t\tint speed = (int) (Math.random() * 5 + 1);\n \t\t\tint xspeed = (int) (Math.random() * 3);\n \t\t\tdouble neg = Math.random();\n \t\t\tint mod = 1;\n \t\t\tif (neg >= 0.5) {\n \t\t\t\tmod = -1;\n \t\t\t}\n\t\t \tAmmo ammo = new Ammo(ship.getX() + 10, ship.getY() - 20, -speed, Color.GREEN, xspeed * mod);\n\t\t \tshots.add(ammo);\n \t\t}\n \t}\n \tship.setbasecd(300);\n \tship.shoot(graphToBack);\n }\n \n if (keys[7] == true) {\n \ttimebase = 10;\n \t\n }\n \n ship.setSCD(ship.getSCD()-1);\n \n if (keys[6] == true) {\n \tif (ship.getSCD() <= 0) {\n \t\tship.setSCD(1000);\n \t}\n }\n \n \n \n \n for (Alien al : horde.getList()) {\n \tif (al.getY() > StarFighter.HEIGHT) {\n \t\tgraphToBack.setColor(Color.RED);\n\t\t\tgraphToBack.drawString(\"==> OBLITERATION TIME <==\", 250, 300 );\n \t\tAmmo ammo = new Ammo(al.getX() + 20, al.getY() + al.getWidth() + 5, -1, Color.RED, 0);\n\t \tshots.add(ammo);\n \t }\n \tif (al.getY() > 0) {\n\t \tdouble random = Math.random();\n\t \tif (al.getType().equalsIgnoreCase(\"railgun\")) {\n\t \t\tif (al.getRailgunTicker() > 1) {\n\t \t\t\tal.setRailgunTicker(al.getRailgunTicker() - 1);\n\t\t\t\t \n\t \t\t}\n\t \t\tif (al.getRailgunTicker() == 1) {\n\t \t\t\tfor (int i = 0; i < 200; i++) {\n\t\t \t\t\tint speed = (int) (1 + 100 * Math.random());\n\t\t\t\t \tAmmo ammo = new Ammo(al.getX() + 20, al.getY() + al.getHeight() + 5, speed, Color.RED, 0);\n\t\t\t\t \tshots.add(ammo);\n\t \t\t\t}\n\t \t\t\tal.setRailgunTicker(0);\n\t \t\t\ttry\n\t \t\t {\n\t \t\t URL url = getClass().getResource(\"railgun.jpg\");\n\t \t\t al.setImage(ImageIO.read(url));\n\t \t\t }\n\t \t\t catch(Exception e)\n\t \t\t {\n\t \t\t //feel free to do something here\n\t \t\t \te.printStackTrace();\n\t \t\t }\n\t \t\t}\n\t \t\tif (random >= 0.99D) {\n\t \t\t\tif (al.getRailgunTicker() <= 0) {\n\t \t\t\tal.setRailgunTicker(150);\n\t \t\t\ttry\n\t \t\t {\n\t \t\t URL url = getClass().getResource(\"railgunHOT.jpg\");\n\t \t\t al.setImage(ImageIO.read(url));\n\t \t\t }\n\t \t\t catch(Exception e)\n\t \t\t {\n\t \t\t //feel free to do something here\n\t \t\t \te.printStackTrace();\n\t \t\t }\n\t \t\t\t}\n\t\t\t }\n\t \t} else {\n\t\t\t if (random >= 0.998D) {\n\t\t\t \tAmmo ammo = new Ammo(al.getX() + 20, al.getY() + al.getWidth() + 5, 1, Color.RED, 0);\n\t\t\t \tshots.add(ammo);\n\t\t\t }\n\t \t}\n\t\t if (al.getHp() > 1) {\n\t\t \trandom = Math.random();\n\t\t\t if (random >= 0.8D) {\n\t\t\t \tint speed = (int) (1 + 3 * Math.random());\n\t\t\t \tint yspeed = (int) (1 + 3 * Math.random());\n\t\t\t \tdouble neg = Math.random();\n\t \t\t\tint mod = 1;\n\t \t\t\tif (neg >= 0.5) {\n\t \t\t\t\tmod = -1;\n\t \t\t\t}\n\t\t\t \tAmmo ammo = new Ammo(al.getX() + 80, al.getY() + al.getHeight() + 5, speed, Color.RED, yspeed * mod);\n\t\t\t \tshots.add(ammo);\n\t\t\t }\n\t\t }\n \t}\n }\n\n //add code to move Ship, Alien, etc.\n if (!ship.getCD()) {\n \tship.setTicker(ship.getTicker() - 1);\n \tif (ship.getTicker() < 0) {\n \t\tship.toggleCD();\n \t}\n }\n \n \n //add in collision detection to see if Bullets hit the Aliens and if Bullets hit the Ship\n horde.moveEmAll();\n horde.drawEmAll(graphToBack);\n horde.removeDeadOnes(shots.getList());\n eTicker--;\n if ((horde.getSize() <= 0 && !endless) || (endless && eTicker <= 0)) {\n \tdiffi+=10;\n \thorde.setSize(5 + diffi/30);\n \thorde.populate();\n \tSystem.out.println(diffi + \" \" + horde.getSize());\n \tif ((diffi>=60 && !endless) || diffi >= 300) {\n \t\tgamestate = false;\n \t\tgraphToBack.setColor(Color.GREEN);\n\t\t\tgraphToBack.drawString(\"YOU WON!!!\", 250, 250 );\n \t}\n \tif (diffi % 100 == 0 && diffi >= 100) {\n \t\tAlien bigal = new Alien(300, 10, 200, 50, 1, 20, \"Alien\");\n \t\thorde.add(bigal);\n \t}\n \teTicker+=1000 - diffi * 3;\n }\n\n for (int i = shots.getList().size() - 1; i >= 0; i--) {\n \tAmmo a = shots.getList().get(i);\n \tif (a.getColor() == Color.RED) {\n \t\tif (a.getY() + a.getHeight() <= ship.getY() + ship.getHeight() && a.getY() >= ship.getY()) {\n\t \t\tif ((a.getX() >= ship.getX() && a.getX() + a.getWidth() <= ship.getX() + ship.getWidth())) {\n\t \t\t\tif (!(ship.getSCD() >= 500)) {\n\t\t \t\t\tgamestate = false;\n\t\t \t\t\tgraphToBack.setColor(Color.RED);\n\t\t \t\t\tgraphToBack.drawString(\"YOU DIED!!!\", 250, 250 );\n\t \t\t\t} else {\n\t \t\t\t\t\t\t a.setSpeed(0);\n\t \t\t\t\t\t\t a.setxSpeed(0);\n\t \t\t\t\t\t\t a.setY(-50);\n\t \t\t\t\t\t\t shots.getList().remove(i);\n\t \t\t\t}\n\t \t\t}\n \t\t}\n \t}\n }\n \n for (Alien a : horde.getList()) {\n\t\tif (a.getY() <= ship.getY() + ship.getHeight() && a.getY() + a.getHeight() >= ship.getY()) {\n \t\tif ((a.getX() + a.getWidth() >= ship.getX() && a.getX() <= ship.getX() + ship.getWidth())) {\n \t\t\tgamestate = false;\n \t\t\tgraphToBack.setColor(Color.RED);\n \t\t\tgraphToBack.drawString(\"YOU DIED!!!\", 250, 250 );\n \t\t}\n\t\t}\n \n }\n graphToBack.setColor(Color.RED);\n graphToBack.drawString(\"Star Fighter Game (GAME OF THE YEAR: 2019)\", 250, 50 );\n graphToBack.drawString(\"CONTROLS: \", 250, 80);\n graphToBack.drawString(\"WASD - Movement\", 250, 100);\n graphToBack.drawString(\"SPACE - Standard Fire\", 360, 100);\n graphToBack.drawString(\"E - Scattershot\", 500, 100);\n graphToBack.drawString(\"Q - Shield\", 600, 100);\n \n shots.moveEmAll();\n shots.drawEmAll(graphToBack);\n shots.cleanEmUp();\n \n if (ship.getSCD() >= 500) {\n \tgraphToBack.setColor(Color.CYAN);\n \tfor (int i = 0; i < 3; i++) {\n \t\tgraphToBack.drawOval(ship.getX() - i, ship.getY() - i, ship.getWidth() + i, ship.getHeight() + i);\n \t}\n }\n \n twoDGraph.drawImage(back, null, 0, 0);\n }", "private void createDTScreen() {\n jfDT = new JFrame(DEFINE_TABLES);\n jfDT.setLocation(HORIZ_LOC, VERT_LOC);\n Container cp = jfDT.getContentPane();\n jfDT.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n jfDT.addWindowListener(edgeWindowListener);\n jfDT.getContentPane().setLayout(new BorderLayout());\n jfDT.setVisible(true);\n jfDT.setSize(HORIZ_SIZE + 150, VERT_SIZE);\n\n //setup menubars and menus\n JMenuBar jmbDTMenuBar = new JMenuBar();\n jfDT.setJMenuBar(jmbDTMenuBar);\n\n JMenu jmDTFile = new JMenu(\"File\");\n jmDTFile.setMnemonic(KeyEvent.VK_F);\n jmbDTMenuBar.add(jmDTFile);\n jmiDTOpenEdge = new JMenuItem(\"Open Edge File\");\n jmiDTOpenEdge.setMnemonic(KeyEvent.VK_E);\n jmiDTOpenEdge.addActionListener(menuListener);\n jmiDTOpenSave = new JMenuItem(\"Open Save File\");\n jmiDTOpenSave.setMnemonic(KeyEvent.VK_V);\n jmiDTOpenSave.addActionListener(menuListener);\n jmiDTSave = new JMenuItem(\"Save\");\n jmiDTSave.setMnemonic(KeyEvent.VK_S);\n jmiDTSave.setEnabled(false);\n jmiDTSave.addActionListener(menuListener);\n jmiDTSaveAs = new JMenuItem(\"Save As...\");\n jmiDTSaveAs.setMnemonic(KeyEvent.VK_A);\n jmiDTSaveAs.setEnabled(false);\n jmiDTSaveAs.addActionListener(menuListener);\n jmiDTExit = new JMenuItem(\"Exit\");\n jmiDTExit.setMnemonic(KeyEvent.VK_X);\n jmiDTExit.addActionListener(menuListener);\n jmDTFile.add(jmiDTOpenEdge);\n jmDTFile.add(jmiDTOpenSave);\n jmDTFile.add(jmiDTSave);\n jmDTFile.add(jmiDTSaveAs);\n jmDTFile.add(jmiDTExit);\n\n JMenu jmDTOptions = new JMenu(\"Options\");\n jmDTOptions.setMnemonic(KeyEvent.VK_O);\n jmbDTMenuBar.add(jmDTOptions);\n jmiDTOptionsOutputLocation = new JMenuItem(\"Set Output File Definition Location\");\n jmiDTOptionsOutputLocation.setMnemonic(KeyEvent.VK_S);\n jmiDTOptionsOutputLocation.addActionListener(menuListener);\n jmiDTOptionsShowProducts = new JMenuItem(\"Show Database Products Available\");\n jmiDTOptionsShowProducts.setMnemonic(KeyEvent.VK_H);\n jmiDTOptionsShowProducts.setEnabled(false);\n jmiDTOptionsShowProducts.addActionListener(menuListener);\n jmDTOptions.add(jmiDTOptionsOutputLocation);\n jmDTOptions.add(jmiDTOptionsShowProducts);\n\n /**\n * HELP section\n */\n JMenu jmDTHelp = new JMenu(\"Help\");\n jmDTHelp.setMnemonic(KeyEvent.VK_H);\n jmbDTMenuBar.add(jmDTHelp);\n\n jmiDTHelpAbout = new JMenuItem(\"About\");\n jmiDTHelpAbout.setMnemonic(KeyEvent.VK_A);\n jmiDTHelpAbout.addActionListener(menuListener);\n jmDTHelp.add(jmiDTHelpAbout);\n\n jmiDTHelpFAQ = new JMenuItem(\"FAQ\");\n jmiDTHelpFAQ.setMnemonic(KeyEvent.VK_F);\n jmiDTHelpFAQ.addActionListener(menuListener);\n jmDTHelp.add(jmiDTHelpFAQ);\n\n jmiDTHelpInstructions = new JMenuItem(\"Instructions\");\n jmiDTHelpInstructions.setMnemonic(KeyEvent.VK_I);\n jmiDTHelpInstructions.addActionListener(menuListener);\n jmDTHelp.add(jmiDTHelpInstructions);\n\n jfcEdge = new JFileChooser();\n jfcOutputDir = new JFileChooser();\n effEdge = new ExampleFileFilter(\"edg\", \"Edge Diagrammer Files\");\n effSave = new ExampleFileFilter(\"sav\", \"Edge Convert Save Files\");\n jfcOutputDir.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\n JPanel jpDTBottom = new JPanel(new GridLayout(1, 2));\n\n jbDTCreateDDL = new JButton(\"Create DDL\");\n jbDTCreateDDL.setEnabled(false);\n jbDTCreateDDL.addActionListener(createDDLListener);\n\n jbDTDefineRelations = new JButton(DEFINE_RELATIONS);\n jbDTDefineRelations.setEnabled(false);\n jbDTDefineRelations.addActionListener(\n new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n jfDT.setVisible(false);\n jfDR.setVisible(true); //show the Define Relations screen\n clearDTControls();\n dlmDTFieldsTablesAll.removeAllElements();\n }\n }\n );\n\n jpDTBottom.add(jbDTDefineRelations);\n jpDTBottom.add(jbDTCreateDDL);\n jfDT.getContentPane().add(jpDTBottom, BorderLayout.SOUTH);\n\n JPanel jpDTCenter = new JPanel(new GridLayout(1, 3));\n JPanel jpDTCenterRight = new JPanel(new GridLayout(1, 2));\n dlmDTTablesAll = new DefaultListModel();\n jlDTTablesAll = new JList(dlmDTTablesAll);\n jlDTTablesAll.addListSelectionListener(\n new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent lse) {\n int selIndex = jlDTTablesAll.getSelectedIndex();\n if (selIndex >= 0) {\n String selText = dlmDTTablesAll.getElementAt(selIndex).toString();\n setCurrentDTTable(selText); //set pointer to the selected table\n int[] currentNativeFields = currentDTTable.getNativeFieldsArray();\n jlDTFieldsTablesAll.clearSelection();\n dlmDTFieldsTablesAll.removeAllElements();\n jbDTMoveUp.setEnabled(false);\n jbDTMoveDown.setEnabled(false);\n for (int fIndex = 0; fIndex < currentNativeFields.length; fIndex++) {\n dlmDTFieldsTablesAll.addElement(getFieldName(currentNativeFields[fIndex]));\n }\n }\n disableControls();\n }\n }\n );\n\n dlmDTFieldsTablesAll = new DefaultListModel();\n jlDTFieldsTablesAll = new JList(dlmDTFieldsTablesAll);\n jlDTFieldsTablesAll.addListSelectionListener(\n new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent lse) {\n int selIndex = jlDTFieldsTablesAll.getSelectedIndex();\n if (selIndex >= 0) {\n if (selIndex == 0) {\n jbDTMoveUp.setEnabled(false);\n } else {\n jbDTMoveUp.setEnabled(true);\n }\n if (selIndex == (dlmDTFieldsTablesAll.getSize() - 1)) {\n jbDTMoveDown.setEnabled(false);\n } else {\n jbDTMoveDown.setEnabled(true);\n }\n String selText = dlmDTFieldsTablesAll.getElementAt(selIndex).toString();\n setCurrentDTField(selText); //set pointer to the selected field\n enableControls();\n jrbDataType[currentDTField.getDataType()].setSelected(true); //select the appropriate radio button, based on value of dataType\n if (jrbDataType[0].isSelected()) { //this is the Varchar radio button\n jbDTVarchar.setEnabled(true); //enable the Varchar button\n jtfDTVarchar.setText(Integer.toString(currentDTField.getVarcharValue())); //fill text field with varcharValue\n } else { //some radio button other than Varchar is selected\n jtfDTVarchar.setText(\"\"); //clear the text field\n jbDTVarchar.setEnabled(false); //disable the button\n }\n jcheckDTPrimaryKey.setSelected(currentDTField.getIsPrimaryKey()); //clear or set Primary Key checkbox\n jcheckDTDisallowNull.setSelected(currentDTField.getDisallowNull()); //clear or set Disallow Null checkbox\n jtfDTDefaultValue.setText(currentDTField.getDefaultValue()); //fill text field with defaultValue\n }\n }\n }\n );\n\n JPanel jpDTMove = new JPanel(new GridLayout(2, 1));\n jbDTMoveUp = new JButton(\"^\");\n jbDTMoveUp.setEnabled(false);\n jbDTMoveUp.addActionListener(\n new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n int selection = jlDTFieldsTablesAll.getSelectedIndex();\n currentDTTable.moveFieldUp(selection);\n //repopulate Fields List\n int[] currentNativeFields = currentDTTable.getNativeFieldsArray();\n jlDTFieldsTablesAll.clearSelection();\n dlmDTFieldsTablesAll.removeAllElements();\n for (int fIndex = 0; fIndex < currentNativeFields.length; fIndex++) {\n dlmDTFieldsTablesAll.addElement(getFieldName(currentNativeFields[fIndex]));\n }\n jlDTFieldsTablesAll.setSelectedIndex(selection - 1);\n dataSaved = false;\n }\n }\n );\n\n jbDTMoveDown = new JButton(\"v\");\n jbDTMoveDown.setEnabled(false);\n jbDTMoveDown.addActionListener(\n new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n int selection = jlDTFieldsTablesAll.getSelectedIndex(); //the original selected index\n currentDTTable.moveFieldDown(selection);\n //repopulate Fields List\n int[] currentNativeFields = currentDTTable.getNativeFieldsArray();\n jlDTFieldsTablesAll.clearSelection();\n dlmDTFieldsTablesAll.removeAllElements();\n for (int fIndex = 0; fIndex < currentNativeFields.length; fIndex++) {\n dlmDTFieldsTablesAll.addElement(getFieldName(currentNativeFields[fIndex]));\n }\n jlDTFieldsTablesAll.setSelectedIndex(selection + 1);\n dataSaved = false;\n }\n }\n );\n jpDTMove.add(jbDTMoveUp);\n jpDTMove.add(jbDTMoveDown);\n\n JScrollPane jspDTTablesAll = new JScrollPane(jlDTTablesAll);\n JScrollPane jspDTFieldsTablesAll = new JScrollPane(jlDTFieldsTablesAll);\n JPanel jpDTCenter1 = new JPanel(new BorderLayout());\n JPanel jpDTCenter2 = new JPanel(new BorderLayout());\n JLabel jlabDTTables = new JLabel(\"All Tables\", SwingConstants.CENTER);\n JLabel jlabDTFields = new JLabel(\"Fields List\", SwingConstants.CENTER);\n jpDTCenter1.add(jlabDTTables, BorderLayout.NORTH);\n jpDTCenter2.add(jlabDTFields, BorderLayout.NORTH);\n jpDTCenter1.add(jspDTTablesAll, BorderLayout.CENTER);\n jpDTCenter2.add(jspDTFieldsTablesAll, BorderLayout.CENTER);\n jpDTCenter2.add(jpDTMove, BorderLayout.EAST);\n jpDTCenter.add(jpDTCenter1);\n jpDTCenter.add(jpDTCenter2);\n jpDTCenter.add(jpDTCenterRight);\n\n strDataType = EdgeField.getStrDataType(); //get the list of currently supported data types\n jrbDataType = new JRadioButton[strDataType.length]; //create array of JRadioButtons, one for each supported data type\n ButtonGroup bgDTDataType = new ButtonGroup();\n JPanel jpDTCenterRight1 = new JPanel(new GridLayout(strDataType.length, 1));\n for (int i = 0; i < strDataType.length; i++) {\n jrbDataType[i] = new JRadioButton(strDataType[i]); //assign label for radio button from String array\n jrbDataType[i].setEnabled(false);\n jrbDataType[i].addActionListener(radioListener);\n bgDTDataType.add(jrbDataType[i]);\n jpDTCenterRight1.add(jrbDataType[i]);\n }\n jpDTCenterRight.add(jpDTCenterRight1);\n\n jcheckDTDisallowNull = new JCheckBox(\"Disallow Null\");\n jcheckDTDisallowNull.setEnabled(false);\n jcheckDTDisallowNull.addItemListener(\n new ItemListener() {\n public void itemStateChanged(ItemEvent ie) {\n currentDTField.setDisallowNull(jcheckDTDisallowNull.isSelected());\n dataSaved = false;\n }\n }\n );\n\n jcheckDTPrimaryKey = new JCheckBox(\"Primary Key\");\n jcheckDTPrimaryKey.setEnabled(false);\n jcheckDTPrimaryKey.addItemListener(\n new ItemListener() {\n public void itemStateChanged(ItemEvent ie) {\n currentDTField.setIsPrimaryKey(jcheckDTPrimaryKey.isSelected());\n dataSaved = false;\n }\n }\n );\n\n jbDTDefaultValue = new JButton(\"Set Default Value\");\n jbDTDefaultValue.setEnabled(false);\n jbDTDefaultValue.addActionListener(\n new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n String prev = jtfDTDefaultValue.getText();\n boolean goodData = false;\n int i = currentDTField.getDataType();\n do {\n String result = (String) JOptionPane.showInputDialog(\n null,\n \"Enter the default value:\",\n \"Default Value\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n prev);\n\n if ((result == null)) {\n jtfDTDefaultValue.setText(prev);\n return;\n }\n switch (i) {\n case 0: //varchar\n if (result.length() <= Integer.parseInt(jtfDTVarchar.getText())) {\n jtfDTDefaultValue.setText(result);\n goodData = true;\n } else {\n JOptionPane.showMessageDialog(null, \"The length of this value must be less than or equal to the Varchar length specified.\");\n }\n break;\n case 1: //boolean\n String newResult = result.toLowerCase();\n if (newResult.equals(\"true\") || newResult.equals(\"false\")) {\n jtfDTDefaultValue.setText(newResult);\n goodData = true;\n } else {\n JOptionPane.showMessageDialog(null, \"You must input a valid boolean value (\\\"true\\\" or \\\"false\\\").\");\n }\n break;\n case 2: //Integer\n try {\n int intResult = Integer.parseInt(result);\n jtfDTDefaultValue.setText(result);\n goodData = true;\n } catch (NumberFormatException nfe) {\n JOptionPane.showMessageDialog(null, \"\\\"\" + result + \"\\\" is not an integer or is outside the bounds of valid integer values.\");\n }\n break;\n case 3: //Double\n try {\n double doubleResult = Double.parseDouble(result);\n jtfDTDefaultValue.setText(result);\n goodData = true;\n } catch (NumberFormatException nfe) {\n JOptionPane.showMessageDialog(null, \"\\\"\" + result + \"\\\" is not a double or is outside the bounds of valid double values.\");\n }\n break;\n case 4: //Timestamp\n try {\n jtfDTDefaultValue.setText(result);\n goodData = true;\n } catch (Exception e) {\n\n }\n break;\n }\n } while (!goodData);\n int selIndex = jlDTFieldsTablesAll.getSelectedIndex();\n if (selIndex >= 0) {\n String selText = dlmDTFieldsTablesAll.getElementAt(selIndex).toString();\n setCurrentDTField(selText);\n currentDTField.setDefaultValue(jtfDTDefaultValue.getText());\n }\n dataSaved = false;\n }\n }\n ); //jbDTDefaultValue.addActionListener\n\n jtfDTDefaultValue = new JTextField();\n jtfDTDefaultValue.setEditable(false);\n\n jbDTVarchar = new JButton(\"Set Varchar Length\");\n jbDTVarchar.setEnabled(false);\n jbDTVarchar.addActionListener(\n new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n String prev = jtfDTVarchar.getText();\n String result = (String) JOptionPane.showInputDialog(\n null,\n \"Enter the varchar length:\",\n \"Varchar Length\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n prev);\n if ((result == null)) {\n jtfDTVarchar.setText(prev);\n return;\n }\n int selIndex = jlDTFieldsTablesAll.getSelectedIndex();\n int varchar;\n try {\n if (result.length() > 5) {\n JOptionPane.showMessageDialog(null, \"Varchar length must be greater than 0 and less than or equal to 65535.\");\n jtfDTVarchar.setText(Integer.toString(EdgeField.VARCHAR_DEFAULT_LENGTH));\n return;\n }\n varchar = Integer.parseInt(result);\n if (varchar > 0 && varchar <= 65535) { // max length of varchar is 255 before v5.0.3\n jtfDTVarchar.setText(Integer.toString(varchar));\n currentDTField.setVarcharValue(varchar);\n } else {\n JOptionPane.showMessageDialog(null, \"Varchar length must be greater than 0 and less than or equal to 65535.\");\n jtfDTVarchar.setText(Integer.toString(EdgeField.VARCHAR_DEFAULT_LENGTH));\n return;\n }\n } catch (NumberFormatException nfe) {\n JOptionPane.showMessageDialog(null, \"\\\"\" + result + \"\\\" is not a number\");\n jtfDTVarchar.setText(Integer.toString(EdgeField.VARCHAR_DEFAULT_LENGTH));\n return;\n }\n dataSaved = false;\n }\n }\n );\n\n jtfDTVarchar = new JTextField();\n jtfDTVarchar.setEditable(false);\n\n JPanel jpDTCenterRight2 = new JPanel(new GridLayout(6, 1));\n jpDTCenterRight2.add(jbDTVarchar);\n jpDTCenterRight2.add(jtfDTVarchar);\n jpDTCenterRight2.add(jcheckDTPrimaryKey);\n jpDTCenterRight2.add(jcheckDTDisallowNull);\n jpDTCenterRight2.add(jbDTDefaultValue);\n jpDTCenterRight2.add(jtfDTDefaultValue);\n jpDTCenterRight.add(jpDTCenterRight1);\n jpDTCenterRight.add(jpDTCenterRight2);\n jpDTCenter.add(jpDTCenterRight);\n jfDT.getContentPane().add(jpDTCenter, BorderLayout.CENTER);\n jfDT.validate();\n }", "public void dumpCommand() {\r\n System.out.println(_board);\r\n }", "public void saveScreenshot() {\n if (ensureSDCardAccess()) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n doDraw(1, canvas);\n File file = new File(mScreenshotPath + \"/\" + System.currentTimeMillis() + \".jpg\");\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Panel\", \"FileNotFoundException\", e);\n } catch (IOException e) {\n Log.e(\"Panel\", \"IOEception\", e);\n }\n }\n }", "public void createAlphabet() {\n\t\tSystem.out.println(\"This currently only works for Android. Connect your phone to the PC/Mac\"\n\t\t\t\t+ \" and make sure that the bunq app is open and 'debug options' are enabled.\\n\");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter a name for your alphabet (please do use only \" + \"characters and underscores): \");\n\t\tString alphabetName = scanner.nextLine();\n\n\t\tSystem.out.println(\"\\n\\nRepeat the following steps for each screen you want to include in the \" + \"alphabet.\\n\"\n\t\t\t\t+ \"1. Move to the screen you want to include on your phone.\\n\"\n\t\t\t\t+ \"2. Type a filename here (e.g. login.xml) and hit enter. \\n\\n\"\n\t\t\t\t+ \"When you are done, type 'stop' instead of a filename.\\n\\n\");\n\n\t\tSystem.out.println(\"Enter filename (including extension): \");\n\t\tString input;\n\t\twhile (scanner.hasNext()) {\n\t\t\tif ((input = scanner.nextLine()).equals(\"stop\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (runAlphabetScript(alphabetName + \"/\" + input) != 0) {\n\t\t\t\tSystem.out.println(\"An error occurred. Please repeat the last action.\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter filename (including extension): \");\n\t\t}\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, \"alphabet/window_dumps/\" + alphabetName + \"/\");\n\t\t// composeActivities(alphabetName);\n\t}", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "public void takeScreenShot();", "public void writeDump(File f) {\n\n }", "public void takeScreenShot(String fileName) throws IOException {\n\t\tScreenshot takeScreenShot = new AShot().takeScreenshot(driver);\n\t\tImageIO.write(takeScreenShot.getImage(), \"png\", new File(path+\"\\\\ScreenShots\\\\\" + fileName + \".png\"));\n\t}", "public static void logScreenOfHost(MobileSettings settings, String fileName) {\n if ((settings.deviceType == DeviceType.Simulator) || (settings.deviceType == DeviceType.Emulator)) {\n OSUtils.getScreenshot(\"HostOS_\" + fileName, settings);\n }\n }", "public void displayToScreen(){\n System.out.println(convertBoardToString());\n delay();\n }", "public void dump(File file)\n {\n try\n {\n FileOutputStream out = new FileOutputStream(file);\n BufferedWriter write = new BufferedWriter(new OutputStreamWriter(out, Encoder.UTF_8));\n\n dump(write);\n\n write.close();\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "@FXML\n public void openDumpDesc(MouseEvent event) {\n \tString content = \"The DUMP namelist parameters control the rate at which output files are written, and various other \"\n \t\t\t+ \"global parameters associated with output files. \\n\\n\"\n \t\t\t+ \"Dt_devc: Device data.\\n\\n\"\n \t\t\t+ \"Mass_file: If TRUE, produce an output file listing the total masses of all gas species as a function of \"\n \t\t\t+ \"time. It is FALSE by default because the calculation of all gas species in all mesh cells is timeconsuming.\\n\\n\"\n \t\t\t+ \"Nframes: Number of output dumps per calculation. The default is 1000.\\n\\n\"\n \t\t\t+ \"Smoke_3D: If FALSE, do not produce an animation of the smoke and fire. It is TRUE by default.\";\n \tString namelist = \"DUMP\";\n\t\tValues.openDesc(namelist, content);\n }", "public void fileSave()\n {\n try\n {\n // construct the default file name using the instance name + current date and time\n StringBuffer currentDT = new StringBuffer();\n try {\n currentDT = new StringBuffer(ConnectWindow.getDatabase().getSYSDate());\n }\n catch (Exception e) {\n displayError(e,this) ;\n }\n\n // construct a default file name\n String defaultFileName;\n if (ConnectWindow.isLinux()) {\n defaultFileName = ConnectWindow.getBaseDir() + \"/Output/RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n else {\n defaultFileName = ConnectWindow.getBaseDir() + \"\\\\Output\\\\RichMon \" + instanceName + \" \" + currentDT.toString() + \".html\";\n }\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setSelectedFile(new File(defaultFileName));\n File saveFile;\n BufferedWriter save;\n\n // prompt the user to choose a file name\n int option = fileChooser.showSaveDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n\n // force the user to use a new file name if the specified filename already exists\n while (saveFile.exists())\n {\n JOptionPane.showConfirmDialog(this,\"File already exists\",\"File Already Exists\",JOptionPane.ERROR_MESSAGE);\n option = fileChooser.showOpenDialog(this);\n if (option == JFileChooser.APPROVE_OPTION)\n {\n saveFile = fileChooser.getSelectedFile();\n }\n }\n save = new BufferedWriter(new FileWriter(saveFile));\n saveFile.createNewFile();\n\n // create a process to format the output and write the file\n try {\n OutputHTML outputHTML = new OutputHTML(saveFile,save,\"Database\",databasePanel.getResultCache());\n outputHTML.savePanel(\"Performance\",performancePanel.getResultCache(),null);\n// outputHTML.savePanel(\"Scratch\",scratchPanel.getResultCache(),scratchPanel.getSQLCache());\n\n JTabbedPane scratchTP = ScratchPanel.getScratchTP();\n \n for (int i=0; i < scratchTP.getComponentCount(); i++) {\n try {\n System.out.println(\"i=\" + i + \" class: \" + scratchTP.getComponentAt(i).getClass());\n if (scratchTP.getComponentAt(i) instanceof ScratchDetailPanel) {\n ScratchDetailPanel t = (ScratchDetailPanel)scratchTP.getComponentAt(i);\n System.out.println(\"Saving: \" + scratchTP.getTitleAt(i));\n outputHTML.savePanel(scratchTP.getTitleAt(i), t.getResultCache(), t.getSQLCache());\n }\n } catch (Exception e) {\n // do nothing \n }\n }\n }\n catch (Exception e) {\n displayError(e,this);\n }\n\n // close the file\n save.close();\n }\n }\n catch (IOException e)\n {\n displayError(e,this);\n }\n }", "void exportGame();", "public void capturescreen(WebDriver driver, String testName) throws IOException {\n\t\tTakesScreenshot ts = (TakesScreenshot) driver;\n\t\tFile source = ts.getScreenshotAs(OutputType.FILE);\n\t\tFile target = new File(System.getProperty(\"user.dir\")+ \"\\\\screenshots\\\\\" + testName + \".png\");\n\t\tSystem.out.println(target);\n\t\tFileUtils.copyFile(source, target);\n\t\tSystem.out.println(\"Screenshot Captured for : \" + testName);\n\t}", "public void dumpWindowAnimators(PrintWriter pw, String subPrefix) {\n forAllWindows((Consumer<WindowState>) new Consumer(pw, subPrefix, new int[1]) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$iSsga4uJnJzBuUddn6uWEUo6xO8 */\n private final /* synthetic */ PrintWriter f$0;\n private final /* synthetic */ String f$1;\n private final /* synthetic */ int[] f$2;\n\n {\n this.f$0 = r1;\n this.f$1 = r2;\n this.f$2 = r3;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.lambda$dumpWindowAnimators$18(this.f$0, this.f$1, this.f$2, (WindowState) obj);\n }\n }, false);\n }", "public void customDump() {\n //Same with StandardHeapDumper StripHprofHeapDumper\n new ForkJvmHeapDumper().dump(\"absolute-path\");\n }", "public void takeScreenShot(String fileName) throws IOException {\n File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n DateFormat dateFormat = new SimpleDateFormat(\"yy-mm-dd HH-mm-ss\");\n Date date = new Date();\n FileUtils.copyFile(scrFile, new File(\"TestoutputData/Screenshot/\" + fileName + \"_\" + dateFormat.format(date) + \".png\"));\n }", "private void generateBackUpMysql() {\n Calendar c = Calendar.getInstance();//creamos una instancia de la clase calendar de java\n //java.util.Date fecha = new Date();\n String DiaHoy = Integer.toString(c.get(Calendar.DATE));\n String MesHoy = Integer.toString(c.get(Calendar.MONTH)+1);\n String AnioHoy = Integer.toString(c.get(Calendar.YEAR)); \n \n \n JFileChooser RealizarBackupMySQL = new JFileChooser();\n int resp;\n resp=RealizarBackupMySQL.showSaveDialog(this);//JFileChooser de nombre RealizarBackupMySQL\n if (resp==JFileChooser.APPROVE_OPTION) {//Si el usuario presiona aceptar; se genera el Backup\n try{\n Runtime runtime = Runtime.getRuntime();\n File backupFile = new File(String.valueOf(RealizarBackupMySQL.getSelectedFile().toString())+\" \"+DiaHoy +\"-\"+MesHoy+\"-\"+AnioHoy+\".sql\");\n FileWriter fw = new FileWriter(backupFile);\n \n Process child = runtime.exec(\"C:\\\\xampp\\\\mysql\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n\n // Process child = runtime.exec(\"C:\\\\wamp\\\\bin\\\\mariadb\\\\mariadb10.4.10\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n InputStreamReader irs = new InputStreamReader(child.getInputStream());\n BufferedReader br = new BufferedReader(irs);\n String line;\n while( (line=br.readLine()) != null ) {\n fw.write(line + \"\\n\");\n }\n fw.close();\n irs.close();\n br.close();\n JOptionPane.showMessageDialog(null, \"Archivo generado\",\"Verificar\",JOptionPane. INFORMATION_MESSAGE);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Error no se genero el archivo por el siguiente motivo:\"+e.getMessage(), \"Verificar\",JOptionPane.ERROR_MESSAGE);\n } \n } else if (resp==JFileChooser.CANCEL_OPTION) {\n JOptionPane.showMessageDialog(null,\"Ha sido cancelada la generacion del Backup\");\n }\n }", "private void dumpASCII(Utterance utterance) {\n\tif (waveDumpFile != null) {\n\t LPCResult lpcResult = \n\t\t(LPCResult) utterance.getObject(\"target_lpcres\");\n\t try {\n\t\tif (waveDumpFile.equals(\"-\")) {\n\t\t lpcResult.dumpASCII();\n\t\t} else {\n\t\t lpcResult.dumpASCII(waveDumpFile);\n\t\t}\n\t } catch (IOException ioe) {\n\t\terror(\"Can't dump file to \" + waveDumpFile + \" \" + ioe);\n\t }\n\t}\n }", "public void dumpBag() {\n while (tileBag.size() > 0) {\n System.out.print(tileBag.remove(0) + \" - \");\n }\n }", "public static void dumpPreEdit(String filename) {\r\n dump(filename, ISOLayout.MASTERCARD_ASCII);\r\n }", "public void takeScreenShot() {\r\n \t\tgraph.clearSelection();\r\n \t\tgraph.showScreenShotDialog();\r\n \t}", "public void save(String filename) {\n\n PrintWriter out = null;\n\n try {\n out = new PrintWriter(new BufferedWriter(new FileWriter(filename)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n out.println(undoCommands);\n out.close();\n }", "public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}", "public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }", "public void dumpBack(Printer pw, String prefix) {\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "void takeSnapShot(File fileToSave) {\n try {\n /*Construct a new BufferedImage*/\n BufferedImage exportImage = new BufferedImage(this.getSize().width,\n this.getSize().height,\n BufferedImage.TYPE_INT_RGB);\n\n \n /*Get the graphics from JPanel, use paint()*/\n this.paint(exportImage.createGraphics());\n \n fileToSave.createNewFile();\n ImageIO.write(exportImage, \"PNG\", fileToSave);\n } catch(Exception exe){\n System.out.println(\"DrawCanvas.java - Exception\");\n }//catch\n}", "public void screenShot() {\n\n\t}", "protected void createWindow(int depth, int width, int type, boolean gui,\r\n\t\t\tint monoAttr, int colorAttr, int ul, int upper, int ur, int left,\r\n\t\t\tint right, int ll, int bottom, int lr) {\r\n\r\n\t int lastPos = screen52.getLastPos();\r\n\t int numCols = screen52.getColumns();\r\n\r\n\t\tint c = screen52.getCol(lastPos);\r\n\t\tint w = 0;\r\n\t\twidth++;\r\n\r\n\t\tw = width;\r\n\t\tchar initChar = Screen5250.initChar;\r\n\t\tint initAttr = Screen5250.initAttr;\r\n\r\n\t\t// set leading attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\t// set upper left\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ul, colorAttr, UPPER_LEFT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ul, colorAttr, false);\r\n\t\t}\r\n\r\n\t\t// draw top row\r\n\t\twhile (w-- >= 0) {\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) upper, colorAttr, UPPER,false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) upper, colorAttr, false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// set upper right\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ur, colorAttr, UPPER_RIGHT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ur, colorAttr, false);\r\n\r\n\t\t}\r\n\r\n\t\t// set ending attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\tlastPos = ((screen52.getRow(lastPos) + 1) * numCols) + c;\r\n\t\tscreen52.goto_XY(lastPos);\r\n\r\n\t\t// now handle body of window\r\n\t\twhile (depth-- > 0) {\r\n\r\n\t\t\t// set leading attribute byte\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\t\t\t// set left\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) left, colorAttr, GUI_LEFT, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) left, colorAttr, false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tw = width - 2;\r\n\t\t screen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, true);\r\n\t\t\t// fill it in\r\n\t\t\twhile (w-- >= 0) {\r\n//\t\t\t if (!planes.isUseGui(screen52.getLastPos()))\r\n\t\t\t screen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, false);\r\n\t\t\t}\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, NO_GUI, true);\r\n\r\n\t\t\t// set right\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) right, colorAttr, GUI_RIGHT, false);\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) right, colorAttr, false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t\t\tlastPos = ((screen52.getRow(lastPos) + 1) * numCols) + c;\r\n\t\t\tscreen52.goto_XY(lastPos);\r\n\t\t}\r\n\r\n\t\t// set leading attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ll, colorAttr, LOWER_LEFT, false);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) ll, colorAttr, false);\r\n\r\n\t\t}\r\n\t\tw = width;\r\n\r\n\t\t// draw bottom row\r\n\t\twhile (w-- >= 0) {\r\n\t\t\tif (gui) {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) bottom, colorAttr, BOTTOM, false);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tscreen52.setScreenCharAndAttr((char) bottom, colorAttr, false);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// set lower right\r\n\t\tif (gui) {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) lr, colorAttr, LOWER_RIGHT, false);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tscreen52.setScreenCharAndAttr((char) lr, colorAttr, false);\r\n\t\t}\r\n\r\n\t\t// set ending attribute byte\r\n\t\tscreen52.setScreenCharAndAttr(initChar, initAttr, true);\r\n\r\n\t}", "void saveSet() {\n if( file==null ) {\n int returnVal = fc.showSaveDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n }\n System.out.println(\"Saving to: \" + file.getName());\n try {\n int count = tabbedPane.getTabCount();\n ArrayList l = new ArrayList();\n for(int i=0; i< count; i++) {\n rrpanel= (RoombaRecorderPanel)tabbedPane.getComponentAt(i);\n l.add(rrpanel.copy());\n }\n FileOutputStream fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n //oos.writeObject(loopButton);\n //oos.writeObject(\n oos.writeObject(l);\n oos.close();\n } catch( Exception e ) {\n System.out.println(\"Save error \"+e);\n }\n }", "public String getDumpLocation();", "public void dump_programmemory(String filename)\n {\n Utils.dump(program_memory, filename, PROGRAM_MEMORY_SIZE);\n }", "void save_to_file() {\n\t\tthis.setAlwaysOnTop(false);\n\t\t\n\t\t/**\n\t\t * chose file with file selector \n\t\t */\n\t\t\n\t\tFileDialog fd = new FileDialog(this, \"Choose a save directory\", FileDialog.SAVE);\n\t\t\n\t\t//default path is current directory\n\t\tfd.setDirectory(System.getProperty(\"user.dir\"));\n\t\tfd.setFile(\"*.cmakro\");\n\t\tfd.setVisible(true);\n\t\t\n\t\t\n\t\tString filename = fd.getFile();\n\t\tString path = fd.getDirectory();\n\t\tString file_withpath = path + filename;\n\t\t\n\t\tif (filename != null) {\n\t\t\t System.out.println(\"save path: \" + file_withpath);\n\t\t\t \n\t\ttry {\n\t\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file_withpath));\n\n\t\t\tout.writeObject(Key_Lists);\n\t\t\t\n\t\t\tout.close();\n\t\t\t\n\t\t\tinfo_label.setForeground(green);\n\t\t\tinfo_label.setText(\"file saved :D\");\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\t}\n\t\t\n\t\t\n\t\tthis.setAlwaysOnTop(true);\n\t\t\n\t}", "private void Btn_exportar_bkupActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n SimpleDateFormat d = new SimpleDateFormat(\"dd-MM-yyyy-HH-mm-ss\");\n Date date = new Date(); \n String respaldo= \"Respaldo_\"+d.format(date); \n respaldo=respaldo.toUpperCase();\n \n \n String cmd = \"expdp system/2015VC601 schemas=director directory=DIRECTORIO dumpfile=\"+respaldo+\".dmp logfile=\"+respaldo+\"_txt.log\"; //Comando \n Process exec = Runtime.getRuntime().exec(cmd); \n JOptionPane.showMessageDialog(rootPane, \"Generando respaldo, espere unos minutos.\");\n } catch (IOException | HeadlessException ioe) {\n System.out.println (ioe);\n }\n }", "public void paint( Graphics window )\r\n\t{\n\t\tGraphics2D twoDGraph = (Graphics2D)window;\r\n\r\n\t\t//take a snap shop of the current screen and same it as an image\r\n\t\t//that is the exact same width and height as the current screen\r\n\t\tif(back==null)\r\n\t\t back = (BufferedImage)(createImage(getWidth(),getHeight()));\r\n\r\n\t\t//create a graphics reference to the back ground image\r\n\t\t//we will draw all changes on the background image\r\n\t\tGraphics graphToBack = back.createGraphics();\r\n\t\t\r\n\t\tif(gameWin == false)\r\n\t\t{\r\n\t\tgraphToBack.setColor(Color.magenta);\r\n\t\tgraphToBack.setFont(tr);\r\n\t\tgraphToBack.drawString(\"Jesse Belinsky's final project\", 190, 130);\r\n\t\tgraphToBack.drawString(\"Arrow keys to move.\", 240, 230);\r\n\t\tgraphToBack.drawString(\"Collect seven keys to unlock the exit!\", 140, 330);\r\n\t\tgraphToBack.drawString(\"Press S to start.\", 275, 430);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(check == false)\r\n\t\t\t{\r\n\t\t\t\tgraphToBack.setColor(Color.WHITE);\r\n\t\t\t\tgraphToBack.fillRect(0,0,800,600);\r\n\t\t\t\tcheck = true;\r\n\t\t\t}\r\n\t\t\tgraphToBack.setColor(Color.black);\r\n\t\t\tgraphToBack.setFont(tr);\r\n\t\t\tgraphToBack.drawString(\"You Win!\", 325, 300);\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(keys[4] == true)\r\n\t\t{\r\n\t\t\tmenuStart = true;\r\n\t\t}\r\n\t\t\r\n\t\tif(menuStart == true && gameWin == false)\r\n\t\t{\r\n\t\t\tgraphToBack.setColor(Color.WHITE);\r\n\t\t\tgraphToBack.fillRect(0,0,800,600);\r\n\t\t\t//System.out.println(\"Player x = \" + ship.getX() + \" Player y = \" + ship.getY());\r\n\t\t\r\n\t\t\tif(keys[0] == true)\r\n\t\t\t{\r\n\t\t\t\tif(player.getX()>-0)\r\n\t\t\t\t\tplayer.move(\"LEFT\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif(keys[1] == true)\r\n\t\t\t{\r\n\t\t\t\tif(player.getX()<this.getWidth()-30)\r\n\t\t\t\t\tplayer.move(\"RIGHT\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif(keys[2] == true)\r\n\t\t\t{\r\n\t\t\t\tif(player.getY()>-0)\r\n\t\t\t\t\tplayer.move(\"UP\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif(keys[3] == true)\r\n\t\t\t{\r\n\t\t\t\tif(player.getY()<this.getHeight()-31)\r\n\t\t\t\t\tplayer.move(\"DOWN\");\r\n\t\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(key != null)\r\n\t\t\t{\r\n\t\t\t\tif((player.getX() > (key.getX() - 15) && player.getY() > (key.getY() - 15) \r\n\t\t\t\t\t&& player.getX() < (key.getX() + 15) && player.getY() < (key.getY() + 15)))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Touching\");\r\n\t\t\t\t\r\n\t\t\t\tn = 751;\r\n\r\n\t\t\t\ti = rn.nextInt() % n;\r\n\t\t\t\t\r\n\t\t\t\twhile(i < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\ti = rn.nextInt() % n;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tkeyX = i;\r\n\t\t\t\t\r\n\t\t\t\tn = 551;\r\n\r\n\t\t\t\ti = rn.nextInt() % n;\r\n\t\t\t\t\r\n\t\t\t\twhile(i < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\ti = rn.nextInt() % n;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tkeyY = i;\r\n\t\t\t\t\r\n\t\t\t\tkey = new KeyObject(keyX, keyY);\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Key x is \" + keyX + \" And key y is \" + keyY);\r\n\t\t\t\t\r\n\t\t\t\tscore ++;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t\tif(score > 6)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif(player.getX() > (exit.getX() - 30) && player.getY() > (exit.getY() - 30) \r\n\t\t\t\t\t\t&& player.getX() < (exit.getX() + 30) && player.getY() < (exit.getY() + 30))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tgameWin = true;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t//add code to move stuff\r\n\r\n\t\t\r\n\t\t\r\n\t\t//add in collision detection\r\n\t\t\tif(score < 7)\r\n\t\t\t{\r\n\t\t\t\tkey.draw(graphToBack);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tkey = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tplayer.draw(graphToBack);\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\tif(score > 6)\r\n\t\t\t{\r\n\t\t\t\texit.draw(graphToBack);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttwoDGraph.drawImage(back, null, 0, 0);\r\n\t\t\r\n\t\t\r\n\t}", "public void snapshot(TakesScreenshot drivername, String foldername,String filename) {\r\n\t\t// this method will take screen shot ,require two parameters ,one is\r\n\t\t// driver name, another is file name\r\n String timeString=ts.getTimeString();\r\n\t\tString currentPath = System.getProperty(\"user.dir\");\r\n\t\t// get current workfolder\r\n\t\tFile scrFile = drivername.getScreenshotAs(OutputType.FILE);\r\n\t\t// Now you can do whatever you need to do with it, for example copy\r\n\t\t// somewhere\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"save snapshot path is:\" + currentPath + \"/\"\r\n\t\t\t\t\t+ filename + \".jpg\");\r\n\t\t\tFileUtils.copyFile(scrFile, new File(currentPath +\"\\\\\"+ \"screenshot\"+\"\\\\\"+timeString+\"\\\\\" +foldername+ \"\\\\\"+filename\r\n\t\t\t\t\t+ \".jpg\"));\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Can't save screenshot\");\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tSystem.out.println(\"screen shot finished, it's in \" + currentPath\r\n\t\t\t\t\t+ \" folder\");\r\n\t\t}\r\n\t}", "public void SaveScreenShot(Component component, String filename) throws Exception{\r\n BufferedImage imag = getScreenShot(component);\r\n ImageIO.write(imag, \"png\", new File(filename));\r\n }", "public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }", "private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}", "public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}", "void takesScreenshot();", "@After\t\n public void takeScreenShot() {\n File scrFile = ((TakesScreenshot)getDriver()).getScreenshotAs(OutputType.FILE);\n // now save the screenshot to a file some place\n try {\n\t\t\tFileUtils.copyFile(scrFile, new File(\"c:\\\\tmp\\\\TC_EditAppAddNewApiSTTC.png\"));\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void takeScreenShot() {\n\t\t destDir = \"screenshots\";\n\t\t // Capture screenshot.\n\t\t File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\t // Set date format to set It as screenshot file name.\n\t\t dateFormat = new SimpleDateFormat(\"dd-MMM-yyyy__hh_mm_ssaa\");\n\t\t // Create folder under project with name \"screenshots\" provided to destDir.\n\t\t new File(destDir).mkdirs();\n\t\t // Set file name using current date time.\n\t\t String destFile = dateFormat.format(new Date()) + \".png\";\n\n\t\t try {\n\t\t // Copy paste file at destination folder location\n\t\t FileUtils.copyFile(scrFile, new File(destDir + \"/\" + destFile));\n\t\t } catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\n}", "public void screenshotToFile(final boolean showDialog) {\n Image image = getScreenshot();\n File file = showDialog ? showFileDialog(generateScreenshotName())\n : new File(getDirectory(), generateScreenshotName());\n if (file == null)\n return;\n saveImage(image, file);\n LOGGER.atInfo().addArgument(file.getName()).log(\"Saved screenshot to {}\");\n }", "public void dump()\r\n {\r\n dump(true);\r\n }", "private void winScreen() {\n timer.stop();\n gameModel.setState(\"Win Screen\");\n WinScreen screen = new WinScreen(width, height);\n Button replayButton = screen.getReplayButton();\n replayButton.setOnAction(e -> {\n try {\n Controller newGame = new Controller();\n newGame.start(mainWindow);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n Button exitButton = screen.getExitButton();\n exitButton.setOnAction(e -> {\n System.exit(0);\n });\n Scene scene = screen.getScene();\n mainWindow.setScene(scene);\n }", "public void dump_datamemory(String filename)\n {\n Utils.dump(data_memory, filename, DATA_MEMORY_SIZE);\n }", "public void dump(){\n int address = 0;\n String lastline = new String(\"junk\");\n String nextline;\n boolean star = false, needNewline = false;\n for (int i = 0; i < memory.length; i+=8){\n nextline = buildLine(i);\n if (! lastline.equals(nextline)){\n star = false;\n if (needNewline) System.out.println(); \n System.out.print(Tools.pad(Integer.toHexString(address), 4, \"0\",\n Direction.RIGHT) + \":\\t\");\n System.out.print(nextline); \n needNewline = true;\n } \n\t\t\telse if (lastline.equals(nextline) && (star == false)){\n System.out.println(\" *\");\n needNewline = false;\n star = true;\n } \n address = address + 32;\n lastline = nextline;\n }\n System.out.println();\n }", "private StringBuilder createThreadDump() {\n StringBuilder string = new StringBuilder();\n string.append(\"------------------------------\\n\");\n //\n string.append(\"Entire Thread Dump:\\n\");\n ThreadInfo[] threads = ManagementFactory.getThreadMXBean().dumpAllThreads(true, true);\n\n for (ThreadInfo thread : threads) {\n writeThreadToStringBuilder(thread, string);\n }\n\n string.append(\"------------------------------\\n\");\n\n return string;\n }", "public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {\n boolean dumpWatchers;\n int dumpOp;\n String dumpPackage;\n int dumpUid;\n Throwable th;\n boolean needSep;\n long now;\n int dumpUid2;\n SimpleDateFormat sdf;\n Date date;\n long now2;\n int userRestrictionCount;\n ClientRestrictionState restrictionState;\n int excludedPackageCount;\n boolean hasPackage;\n SimpleDateFormat sdf2;\n Date date2;\n int restrictedOpCount;\n boolean[] restrictedOps;\n int dumpMode;\n boolean dumpWatchers2;\n long now3;\n boolean dumpHistory;\n int dumpOp2;\n String dumpPackage2;\n long now4;\n boolean needSep2;\n SimpleDateFormat sdf3;\n long nowElapsed;\n long nowElapsed2;\n int dumpMode2;\n UidState uidState;\n long now5;\n ArrayMap<String, Ops> pkgOps;\n int dumpOp3;\n String dumpPackage3;\n SimpleDateFormat sdf4;\n long now6;\n int dumpMode3;\n UidState uidState2;\n long nowElapsed3;\n int j;\n Ops ops;\n int dumpOp4;\n String dumpPackage4;\n SimpleDateFormat sdf5;\n long now7;\n int j2;\n boolean printedPackage;\n int mode;\n long nowElapsed4;\n int opModeCount;\n int code;\n int mode2;\n boolean hasPackage2;\n boolean hasOp;\n boolean hasOp2;\n boolean needSep3;\n boolean hasOp3;\n SparseArray<Restriction> restrictions;\n boolean needSep4;\n int dumpUid3;\n boolean needSep5;\n boolean printedHeader;\n long now8;\n boolean needSep6;\n boolean needSep7;\n ArraySet<ModeCallback> callbacks;\n if (DumpUtils.checkDumpAndUsageStatsPermission(this.mContext, TAG, pw)) {\n String dumpPackage5 = null;\n int dumpUid4 = -1;\n boolean dumpOp5 = false;\n if (args != null) {\n int i = 0;\n boolean dumpWatchers3 = false;\n int dumpMode4 = -1;\n int dumpUid5 = -1;\n int dumpOp6 = -1;\n while (i < args.length) {\n String arg = args[i];\n if (\"-h\".equals(arg)) {\n dumpHelp(pw);\n return;\n }\n if (!\"-a\".equals(arg)) {\n if (\"--op\".equals(arg)) {\n i++;\n if (i >= args.length) {\n pw.println(\"No argument for --op option\");\n return;\n }\n int dumpOp7 = Shell.strOpToOp(args[i], pw);\n if (dumpOp7 >= 0) {\n dumpOp6 = dumpOp7;\n } else {\n return;\n }\n } else if (\"--package\".equals(arg)) {\n i++;\n if (i >= args.length) {\n pw.println(\"No argument for --package option\");\n return;\n }\n dumpPackage5 = args[i];\n try {\n dumpUid5 = AppGlobals.getPackageManager().getPackageUid(dumpPackage5, 12591104, 0);\n } catch (RemoteException e) {\n }\n if (dumpUid5 < 0) {\n pw.println(\"Unknown package: \" + dumpPackage5);\n return;\n }\n dumpUid5 = UserHandle.getAppId(dumpUid5);\n } else if (\"--mode\".equals(arg)) {\n i++;\n if (i >= args.length) {\n pw.println(\"No argument for --mode option\");\n return;\n }\n int dumpMode5 = Shell.strModeToMode(args[i], pw);\n if (dumpMode5 >= 0) {\n dumpMode4 = dumpMode5;\n } else {\n return;\n }\n } else if (\"--watchers\".equals(arg)) {\n dumpWatchers3 = true;\n } else if (arg.length() <= 0 || arg.charAt(0) != '-') {\n pw.println(\"Unknown command: \" + arg);\n return;\n } else {\n pw.println(\"Unknown option: \" + arg);\n return;\n }\n }\n i++;\n }\n dumpOp = dumpOp6;\n dumpWatchers = dumpWatchers3;\n dumpPackage = dumpPackage5;\n dumpUid = dumpUid5;\n dumpUid4 = dumpMode4;\n } else {\n dumpOp = -1;\n dumpWatchers = false;\n dumpPackage = null;\n dumpUid = -1;\n }\n synchronized (this) {\n try {\n pw.println(\"Current AppOps Service state:\");\n if (0 == 0 && !dumpWatchers) {\n try {\n this.mConstants.dump(pw);\n } catch (Throwable th2) {\n th = th2;\n }\n }\n pw.println();\n long now9 = System.currentTimeMillis();\n long nowElapsed5 = SystemClock.elapsedRealtime();\n SystemClock.uptimeMillis();\n long nowElapsed6 = nowElapsed5;\n SimpleDateFormat sdf6 = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n Date date3 = new Date();\n if (dumpOp < 0 && dumpUid4 < 0 && dumpPackage == null && this.mProfileOwners != null && !dumpWatchers && 0 == 0) {\n pw.println(\" Profile owners:\");\n for (int poi = 0; poi < this.mProfileOwners.size(); poi++) {\n pw.print(\" User #\");\n pw.print(this.mProfileOwners.keyAt(poi));\n pw.print(\": \");\n UserHandle.formatUid(pw, this.mProfileOwners.valueAt(poi));\n pw.println();\n }\n pw.println();\n }\n if (this.mOpModeWatchers.size() <= 0 || 0 != 0) {\n needSep = false;\n } else {\n boolean j3 = false;\n needSep = false;\n for (int i2 = 0; i2 < this.mOpModeWatchers.size(); i2++) {\n if (dumpOp < 0 || dumpOp == this.mOpModeWatchers.keyAt(i2)) {\n boolean printedOpHeader = false;\n ArraySet<ModeCallback> callbacks2 = this.mOpModeWatchers.valueAt(i2);\n boolean printedHeader2 = j3;\n int j4 = 0;\n while (true) {\n needSep7 = needSep;\n if (j4 >= callbacks2.size()) {\n break;\n }\n ModeCallback cb = callbacks2.valueAt(j4);\n if (dumpPackage != null) {\n callbacks = callbacks2;\n if (dumpUid != UserHandle.getAppId(cb.mWatchingUid)) {\n needSep = needSep7;\n j4++;\n callbacks2 = callbacks;\n }\n } else {\n callbacks = callbacks2;\n }\n if (!printedHeader2) {\n needSep7 = true;\n pw.println(\" Op mode watchers:\");\n printedHeader2 = true;\n } else {\n needSep7 = true;\n }\n if (!printedOpHeader) {\n pw.print(\" Op \");\n pw.print(AppOpsManager.opToName(this.mOpModeWatchers.keyAt(i2)));\n pw.println(\":\");\n printedOpHeader = true;\n }\n pw.print(\" #\");\n pw.print(j4);\n pw.print(\": \");\n pw.println(cb);\n needSep = needSep7;\n j4++;\n callbacks2 = callbacks;\n }\n j3 = printedHeader2;\n needSep = needSep7;\n }\n }\n }\n if (this.mPackageModeWatchers.size() > 0 && dumpOp < 0 && 0 == 0) {\n boolean printedHeader3 = false;\n for (int i3 = 0; i3 < this.mPackageModeWatchers.size(); i3++) {\n if (dumpPackage == null || dumpPackage.equals(this.mPackageModeWatchers.keyAt(i3))) {\n boolean needSep8 = true;\n if (!printedHeader3) {\n pw.println(\" Package mode watchers:\");\n printedHeader3 = true;\n }\n pw.print(\" Pkg \");\n pw.print(this.mPackageModeWatchers.keyAt(i3));\n pw.println(\":\");\n ArraySet<ModeCallback> callbacks3 = this.mPackageModeWatchers.valueAt(i3);\n int j5 = 0;\n while (j5 < callbacks3.size()) {\n pw.print(\" #\");\n pw.print(j5);\n pw.print(\": \");\n pw.println(callbacks3.valueAt(j5));\n j5++;\n needSep8 = needSep8;\n }\n needSep = needSep8;\n printedHeader3 = printedHeader3;\n }\n }\n }\n if (this.mModeWatchers.size() > 0 && dumpOp < 0 && 0 == 0) {\n boolean printedHeader4 = false;\n for (int i4 = 0; i4 < this.mModeWatchers.size(); i4++) {\n ModeCallback cb2 = this.mModeWatchers.valueAt(i4);\n if (dumpPackage != null) {\n if (dumpUid != UserHandle.getAppId(cb2.mWatchingUid)) {\n needSep = needSep;\n }\n }\n needSep = true;\n if (!printedHeader4) {\n pw.println(\" All op mode watchers:\");\n printedHeader4 = true;\n }\n pw.print(\" \");\n pw.print(Integer.toHexString(System.identityHashCode(this.mModeWatchers.keyAt(i4))));\n pw.print(\": \");\n pw.println(cb2);\n printedHeader4 = printedHeader4;\n }\n }\n if (this.mActiveWatchers.size() <= 0 || dumpUid4 >= 0) {\n now = now9;\n } else {\n needSep = true;\n boolean printedHeader5 = false;\n int watcherNum = 0;\n while (watcherNum < this.mActiveWatchers.size()) {\n SparseArray<ActiveCallback> activeWatchers = this.mActiveWatchers.valueAt(watcherNum);\n if (activeWatchers.size() <= 0) {\n needSep6 = needSep;\n } else {\n ActiveCallback cb3 = activeWatchers.valueAt(0);\n if (dumpOp < 0 || activeWatchers.indexOfKey(dumpOp) >= 0) {\n if (dumpPackage != null) {\n needSep6 = needSep;\n } else {\n needSep6 = needSep;\n }\n if (!printedHeader5) {\n pw.println(\" All op active watchers:\");\n printedHeader5 = true;\n }\n pw.print(\" \");\n pw.print(Integer.toHexString(System.identityHashCode(this.mActiveWatchers.keyAt(watcherNum))));\n pw.println(\" ->\");\n pw.print(\" [\");\n int opCount = activeWatchers.size();\n now8 = now9;\n for (int opNum = 0; opNum < opCount; opNum++) {\n if (opNum > 0) {\n pw.print(' ');\n }\n pw.print(AppOpsManager.opToName(activeWatchers.keyAt(opNum)));\n if (opNum < opCount - 1) {\n pw.print(',');\n }\n }\n pw.println(\"]\");\n pw.print(\" \");\n pw.println(cb3);\n watcherNum++;\n needSep = needSep6;\n now9 = now8;\n } else {\n needSep6 = needSep;\n }\n }\n now8 = now9;\n watcherNum++;\n needSep = needSep6;\n now9 = now8;\n }\n now = now9;\n }\n if (this.mNotedWatchers.size() > 0 && dumpUid4 < 0) {\n needSep = true;\n boolean printedHeader6 = false;\n int i5 = 0;\n while (i5 < this.mNotedWatchers.size()) {\n SparseArray<NotedCallback> notedWatchers = this.mNotedWatchers.valueAt(i5);\n if (notedWatchers.size() > 0) {\n NotedCallback cb4 = notedWatchers.valueAt(0);\n if ((dumpOp < 0 || notedWatchers.indexOfKey(dumpOp) >= 0) && (dumpPackage == null || dumpUid == UserHandle.getAppId(cb4.mWatchingUid))) {\n if (!printedHeader6) {\n pw.println(\" All op noted watchers:\");\n printedHeader6 = true;\n }\n pw.print(\" \");\n pw.print(Integer.toHexString(System.identityHashCode(this.mNotedWatchers.keyAt(i5))));\n pw.println(\" ->\");\n pw.print(\" [\");\n int opCount2 = notedWatchers.size();\n i5 = 0;\n while (i5 < opCount2) {\n if (i5 > 0) {\n printedHeader = printedHeader6;\n pw.print(' ');\n } else {\n printedHeader = printedHeader6;\n }\n pw.print(AppOpsManager.opToName(notedWatchers.keyAt(i5)));\n if (i5 < opCount2 - 1) {\n pw.print(',');\n }\n i5++;\n printedHeader6 = printedHeader;\n }\n pw.println(\"]\");\n pw.print(\" \");\n pw.println(cb4);\n printedHeader6 = printedHeader6;\n }\n }\n i5++;\n }\n }\n if (this.mClients.size() <= 0 || dumpUid4 >= 0 || dumpWatchers || 0 != 0) {\n dumpUid2 = dumpUid;\n } else {\n needSep = true;\n boolean j6 = false;\n int i6 = 0;\n while (i6 < this.mClients.size()) {\n try {\n boolean printedClient = false;\n ClientState cs = this.mClients.valueAt(i6);\n if (cs.mStartedOps.size() > 0) {\n boolean printedStarted = false;\n boolean printedHeader7 = j6;\n int j7 = 0;\n while (true) {\n dumpUid3 = dumpUid;\n try {\n if (j7 >= cs.mStartedOps.size()) {\n break;\n }\n Op op = cs.mStartedOps.get(j7);\n if (dumpOp >= 0) {\n needSep5 = needSep;\n if (op.op != dumpOp) {\n j7++;\n dumpUid = dumpUid3;\n needSep = needSep5;\n }\n } else {\n needSep5 = needSep;\n }\n if (dumpPackage == null || dumpPackage.equals(op.packageName)) {\n if (!printedHeader7) {\n pw.println(\" Clients:\");\n printedHeader7 = true;\n }\n if (!printedClient) {\n pw.print(\" \");\n pw.print(this.mClients.keyAt(i6));\n pw.println(\":\");\n pw.print(\" \");\n pw.println(cs);\n printedClient = true;\n }\n if (!printedStarted) {\n pw.println(\" Started ops:\");\n printedStarted = true;\n }\n pw.print(\" \");\n pw.print(\"uid=\");\n pw.print(op.uidState.uid);\n pw.print(\" pkg=\");\n pw.print(op.packageName);\n pw.print(\" op=\");\n pw.println(AppOpsManager.opToName(op.op));\n j7++;\n dumpUid = dumpUid3;\n needSep = needSep5;\n } else {\n j7++;\n dumpUid = dumpUid3;\n needSep = needSep5;\n }\n } catch (Throwable th3) {\n th = th3;\n throw th;\n }\n }\n needSep4 = needSep;\n j6 = printedHeader7;\n } else {\n dumpUid3 = dumpUid;\n needSep4 = needSep;\n }\n i6++;\n dumpUid = dumpUid3;\n needSep = needSep4;\n } catch (Throwable th4) {\n th = th4;\n throw th;\n }\n }\n dumpUid2 = dumpUid;\n }\n try {\n if (this.mAudioRestrictions.size() > 0 && dumpOp < 0 && dumpPackage != null && dumpUid4 < 0 && !dumpWatchers && !dumpWatchers) {\n boolean printedHeader8 = false;\n for (int o = 0; o < this.mAudioRestrictions.size(); o++) {\n String op2 = AppOpsManager.opToName(this.mAudioRestrictions.keyAt(o));\n SparseArray<Restriction> restrictions2 = this.mAudioRestrictions.valueAt(o);\n int i7 = 0;\n while (i7 < restrictions2.size()) {\n if (!printedHeader8) {\n pw.println(\" Audio Restrictions:\");\n printedHeader8 = true;\n needSep = true;\n }\n int usage = restrictions2.keyAt(i7);\n pw.print(\" \");\n pw.print(op2);\n pw.print(\" usage=\");\n pw.print(AudioAttributes.usageToString(usage));\n Restriction r = restrictions2.valueAt(i7);\n pw.print(\": mode=\");\n pw.println(AppOpsManager.modeToName(r.mode));\n if (!r.exceptionPackages.isEmpty()) {\n pw.println(\" Exceptions:\");\n int j8 = 0;\n while (true) {\n restrictions = restrictions2;\n if (j8 >= r.exceptionPackages.size()) {\n break;\n }\n pw.print(\" \");\n pw.println(r.exceptionPackages.valueAt(j8));\n j8++;\n restrictions2 = restrictions;\n }\n } else {\n restrictions = restrictions2;\n }\n i7++;\n printedHeader8 = printedHeader8;\n op2 = op2;\n restrictions2 = restrictions;\n }\n }\n }\n if (needSep) {\n pw.println();\n }\n int i8 = 0;\n while (i8 < this.mUidStates.size()) {\n UidState uidState3 = this.mUidStates.valueAt(i8);\n SparseIntArray opModes = uidState3.opModes;\n ArrayMap<String, Ops> pkgOps2 = uidState3.pkgOps;\n if (dumpWatchers) {\n dumpMode = dumpUid4;\n dumpHistory = dumpOp5;\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n now4 = now;\n dumpPackage2 = dumpPackage;\n dumpOp2 = dumpOp;\n now3 = nowElapsed6;\n } else if (dumpOp5) {\n dumpPackage2 = dumpPackage;\n dumpMode = dumpUid4;\n dumpHistory = dumpOp5;\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n now4 = now;\n dumpOp2 = dumpOp;\n now3 = nowElapsed6;\n } else {\n if (dumpOp >= 0 || dumpPackage != null || dumpUid4 >= 0) {\n boolean hasOp4 = dumpOp < 0 || (uidState3.opModes != null && uidState3.opModes.indexOfKey(dumpOp) >= 0);\n boolean hasPackage3 = dumpPackage == null;\n boolean hasMode = dumpUid4 < 0;\n if (hasMode || opModes == null) {\n hasOp = hasOp4;\n hasPackage2 = hasPackage3;\n } else {\n hasOp = hasOp4;\n int opi = 0;\n while (true) {\n if (hasMode) {\n hasPackage2 = hasPackage3;\n break;\n }\n hasPackage2 = hasPackage3;\n if (opi >= opModes.size()) {\n break;\n }\n if (opModes.valueAt(opi) == dumpUid4) {\n hasMode = true;\n }\n opi++;\n hasPackage3 = hasPackage2;\n }\n }\n if (pkgOps2 != null) {\n dumpHistory = dumpOp5;\n boolean hasPackage4 = hasPackage2;\n int pkgi = 0;\n hasOp2 = hasOp;\n while (true) {\n if (hasOp2 && hasPackage4 && hasMode) {\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n break;\n }\n dumpWatchers2 = dumpWatchers;\n try {\n if (pkgi >= pkgOps2.size()) {\n needSep2 = needSep;\n break;\n }\n Ops ops2 = pkgOps2.valueAt(pkgi);\n if (!hasOp2 && ops2 != null && ops2.indexOfKey(dumpOp) >= 0) {\n hasOp2 = true;\n }\n if (!hasMode) {\n hasOp3 = hasOp2;\n int opi2 = 0;\n while (true) {\n if (hasMode) {\n needSep3 = needSep;\n break;\n }\n needSep3 = needSep;\n if (opi2 >= ops2.size()) {\n break;\n }\n if (((Op) ops2.valueAt(opi2)).mode == dumpUid4) {\n hasMode = true;\n }\n opi2++;\n needSep = needSep3;\n }\n } else {\n hasOp3 = hasOp2;\n needSep3 = needSep;\n }\n if (!hasPackage4 && dumpPackage.equals(ops2.packageName)) {\n hasPackage4 = true;\n }\n pkgi++;\n hasOp2 = hasOp3;\n dumpWatchers = dumpWatchers2;\n needSep = needSep3;\n } catch (Throwable th5) {\n th = th5;\n throw th;\n }\n }\n hasPackage2 = hasPackage4;\n } else {\n dumpHistory = dumpOp5;\n needSep2 = needSep;\n dumpWatchers2 = dumpWatchers;\n hasOp2 = hasOp;\n }\n try {\n if (uidState3.foregroundOps != null && !hasOp2 && uidState3.foregroundOps.indexOfKey(dumpOp) > 0) {\n hasOp2 = true;\n }\n if (!hasOp2 || !hasPackage2) {\n dumpMode = dumpUid4;\n dumpOp2 = dumpOp;\n now4 = now;\n dumpPackage2 = dumpPackage;\n now3 = nowElapsed6;\n } else if (!hasMode) {\n dumpPackage2 = dumpPackage;\n dumpMode = dumpUid4;\n dumpOp2 = dumpOp;\n now4 = now;\n now3 = nowElapsed6;\n }\n } catch (Throwable th6) {\n th = th6;\n throw th;\n }\n } else {\n dumpHistory = dumpOp5;\n dumpWatchers2 = dumpWatchers;\n }\n pw.print(\" Uid \");\n UserHandle.formatUid(pw, uidState3.uid);\n pw.println(\":\");\n pw.print(\" state=\");\n pw.println(AppOpsManager.getUidStateName(uidState3.state));\n if (uidState3.state != uidState3.pendingState) {\n pw.print(\" pendingState=\");\n pw.println(AppOpsManager.getUidStateName(uidState3.pendingState));\n }\n if (uidState3.pendingStateCommitTime != 0) {\n pw.print(\" pendingStateCommitTime=\");\n sdf3 = sdf6;\n nowElapsed = nowElapsed6;\n TimeUtils.formatDuration(uidState3.pendingStateCommitTime, nowElapsed, pw);\n pw.println();\n } else {\n sdf3 = sdf6;\n nowElapsed = nowElapsed6;\n }\n if (uidState3.startNesting != 0) {\n pw.print(\" startNesting=\");\n pw.println(uidState3.startNesting);\n }\n if (uidState3.foregroundOps != null && (dumpUid4 < 0 || dumpUid4 == 4)) {\n pw.println(\" foregroundOps:\");\n for (int j9 = 0; j9 < uidState3.foregroundOps.size(); j9++) {\n if (dumpOp < 0 || dumpOp == uidState3.foregroundOps.keyAt(j9)) {\n pw.print(\" \");\n pw.print(AppOpsManager.opToName(uidState3.foregroundOps.keyAt(j9)));\n pw.print(\": \");\n pw.println(uidState3.foregroundOps.valueAt(j9) ? \"WATCHER\" : \"SILENT\");\n }\n }\n pw.print(\" hasForegroundWatchers=\");\n pw.println(uidState3.hasForegroundWatchers);\n }\n needSep = true;\n if (opModes != null) {\n int opModeCount2 = opModes.size();\n int j10 = 0;\n while (j10 < opModeCount2) {\n int code2 = opModes.keyAt(j10);\n int mode3 = opModes.valueAt(j10);\n if (dumpOp >= 0) {\n opModeCount = opModeCount2;\n code = code2;\n if (dumpOp != code) {\n nowElapsed4 = nowElapsed;\n j10++;\n opModeCount2 = opModeCount;\n nowElapsed = nowElapsed4;\n }\n } else {\n opModeCount = opModeCount2;\n code = code2;\n }\n if (dumpUid4 >= 0) {\n nowElapsed4 = nowElapsed;\n mode2 = mode3;\n if (dumpUid4 != mode2) {\n j10++;\n opModeCount2 = opModeCount;\n nowElapsed = nowElapsed4;\n }\n } else {\n nowElapsed4 = nowElapsed;\n mode2 = mode3;\n }\n pw.print(\" \");\n pw.print(AppOpsManager.opToName(code));\n pw.print(\": mode=\");\n pw.println(AppOpsManager.modeToName(mode2));\n j10++;\n opModeCount2 = opModeCount;\n nowElapsed = nowElapsed4;\n }\n nowElapsed2 = nowElapsed;\n } else {\n nowElapsed2 = nowElapsed;\n }\n if (pkgOps2 == null) {\n dumpPackage2 = dumpPackage;\n dumpMode = dumpUid4;\n sdf6 = sdf3;\n now4 = now;\n dumpOp2 = dumpOp;\n now3 = nowElapsed2;\n } else {\n int pkgi2 = 0;\n while (pkgi2 < pkgOps2.size()) {\n Ops ops3 = pkgOps2.valueAt(pkgi2);\n if (dumpPackage == null || dumpPackage.equals(ops3.packageName)) {\n boolean op3 = false;\n int j11 = 0;\n while (j11 < ops3.size()) {\n try {\n Op op4 = (Op) ops3.valueAt(j11);\n int opCode = op4.op;\n if (dumpOp < 0 || dumpOp == opCode) {\n if (dumpUid4 >= 0) {\n j2 = j11;\n try {\n } catch (Throwable th7) {\n th = th7;\n throw th;\n }\n } else {\n j2 = j11;\n }\n if (!op3) {\n pw.print(\" Package \");\n pw.print(ops3.packageName);\n pw.println(\":\");\n printedPackage = true;\n } else {\n printedPackage = op3;\n }\n pw.print(\" \");\n pw.print(AppOpsManager.opToName(opCode));\n pw.print(\" (\");\n pw.print(AppOpsManager.modeToName(op4.mode));\n int switchOp = AppOpsManager.opToSwitch(opCode);\n if (switchOp != opCode) {\n pw.print(\" / switch \");\n pw.print(AppOpsManager.opToName(switchOp));\n Op switchObj = (Op) ops3.get(switchOp);\n if (switchObj != null) {\n mode = switchObj.mode;\n } else {\n mode = AppOpsManager.opToDefaultMode(switchOp);\n }\n pw.print(\"=\");\n pw.print(AppOpsManager.modeToName(mode));\n }\n pw.println(\"): \");\n uidState2 = uidState3;\n dumpPackage4 = dumpPackage;\n dumpMode3 = dumpUid4;\n dumpOp4 = dumpOp;\n sdf5 = sdf3;\n j = j2;\n ops = ops3;\n now7 = now;\n nowElapsed3 = nowElapsed2;\n dumpStatesLocked(pw, op4, now7, sdf5, date3, \" \");\n if (op4.running) {\n pw.print(\" Running start at: \");\n TimeUtils.formatDuration(nowElapsed3 - op4.startRealtime, pw);\n pw.println();\n }\n if (op4.startNesting != 0) {\n pw.print(\" startNesting=\");\n pw.println(op4.startNesting);\n }\n op3 = printedPackage;\n int i9 = j + 1;\n dumpOp = dumpOp4;\n nowElapsed2 = nowElapsed3;\n dumpUid4 = dumpMode3;\n now = now7;\n sdf3 = sdf5;\n pkgOps2 = pkgOps2;\n ops3 = ops;\n j11 = i9;\n dumpPackage = dumpPackage4;\n uidState3 = uidState2;\n } else {\n j2 = j11;\n }\n dumpMode3 = dumpUid4;\n uidState2 = uidState3;\n sdf5 = sdf3;\n dumpPackage4 = dumpPackage;\n dumpOp4 = dumpOp;\n ops = ops3;\n now7 = now;\n nowElapsed3 = nowElapsed2;\n j = j2;\n int i92 = j + 1;\n dumpOp = dumpOp4;\n nowElapsed2 = nowElapsed3;\n dumpUid4 = dumpMode3;\n now = now7;\n sdf3 = sdf5;\n pkgOps2 = pkgOps2;\n ops3 = ops;\n j11 = i92;\n dumpPackage = dumpPackage4;\n uidState3 = uidState2;\n } catch (Throwable th8) {\n th = th8;\n throw th;\n }\n }\n dumpMode2 = dumpUid4;\n pkgOps = pkgOps2;\n uidState = uidState3;\n dumpPackage3 = dumpPackage;\n now6 = now;\n now5 = nowElapsed2;\n sdf4 = sdf3;\n dumpOp3 = dumpOp;\n } else {\n dumpMode2 = dumpUid4;\n pkgOps = pkgOps2;\n uidState = uidState3;\n sdf4 = sdf3;\n now6 = now;\n dumpPackage3 = dumpPackage;\n dumpOp3 = dumpOp;\n now5 = nowElapsed2;\n }\n pkgi2++;\n dumpPackage = dumpPackage3;\n dumpOp = dumpOp3;\n nowElapsed2 = now5;\n uidState3 = uidState;\n dumpUid4 = dumpMode2;\n now = now6;\n sdf3 = sdf4;\n pkgOps2 = pkgOps;\n }\n dumpMode = dumpUid4;\n sdf6 = sdf3;\n now4 = now;\n dumpPackage2 = dumpPackage;\n dumpOp2 = dumpOp;\n now3 = nowElapsed2;\n }\n i8++;\n dumpPackage = dumpPackage2;\n dumpOp = dumpOp2;\n dumpOp5 = dumpHistory;\n nowElapsed6 = now3;\n dumpWatchers = dumpWatchers2;\n dumpUid4 = dumpMode;\n now = now4;\n }\n needSep = needSep2;\n i8++;\n dumpPackage = dumpPackage2;\n dumpOp = dumpOp2;\n dumpOp5 = dumpHistory;\n nowElapsed6 = now3;\n dumpWatchers = dumpWatchers2;\n dumpUid4 = dumpMode;\n now = now4;\n }\n long now10 = now;\n if (needSep) {\n pw.println();\n }\n int userRestrictionCount2 = this.mOpUserRestrictions.size();\n int i10 = 0;\n while (i10 < userRestrictionCount2) {\n IBinder token = this.mOpUserRestrictions.keyAt(i10);\n ClientRestrictionState restrictionState2 = this.mOpUserRestrictions.valueAt(i10);\n boolean printedTokenHeader = false;\n if (dumpUid4 >= 0 || dumpWatchers) {\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n } else if (dumpOp5) {\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n } else {\n int restrictionCount = restrictionState2.perUserRestrictions != null ? restrictionState2.perUserRestrictions.size() : 0;\n if (restrictionCount <= 0 || dumpPackage != null) {\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n } else {\n boolean printedOpsHeader = false;\n int j12 = 0;\n while (j12 < restrictionCount) {\n int userId = restrictionState2.perUserRestrictions.keyAt(j12);\n boolean[] restrictedOps2 = restrictionState2.perUserRestrictions.valueAt(j12);\n if (restrictedOps2 != null) {\n if (dumpOp < 0 || (dumpOp < restrictedOps2.length && restrictedOps2[dumpOp])) {\n if (!printedTokenHeader) {\n StringBuilder sb = new StringBuilder();\n sdf2 = sdf6;\n sb.append(\" User restrictions for token \");\n sb.append(token);\n sb.append(\":\");\n pw.println(sb.toString());\n printedTokenHeader = true;\n } else {\n sdf2 = sdf6;\n }\n if (!printedOpsHeader) {\n pw.println(\" Restricted ops:\");\n printedOpsHeader = true;\n }\n StringBuilder restrictedOpsValue = new StringBuilder();\n restrictedOpsValue.append(\"[\");\n int restrictedOpCount2 = restrictedOps2.length;\n date2 = date3;\n int k = 0;\n while (k < restrictedOpCount2) {\n if (restrictedOps2[k]) {\n restrictedOps = restrictedOps2;\n restrictedOpCount = restrictedOpCount2;\n if (restrictedOpsValue.length() > 1) {\n restrictedOpsValue.append(\", \");\n }\n restrictedOpsValue.append(AppOpsManager.opToName(k));\n } else {\n restrictedOps = restrictedOps2;\n restrictedOpCount = restrictedOpCount2;\n }\n k++;\n restrictedOps2 = restrictedOps;\n restrictedOpCount2 = restrictedOpCount;\n }\n restrictedOpsValue.append(\"]\");\n pw.print(\" \");\n pw.print(\"user: \");\n pw.print(userId);\n pw.print(\" restricted ops: \");\n pw.println(restrictedOpsValue);\n j12++;\n userRestrictionCount2 = userRestrictionCount2;\n now10 = now10;\n date3 = date2;\n sdf6 = sdf2;\n }\n }\n sdf2 = sdf6;\n date2 = date3;\n j12++;\n userRestrictionCount2 = userRestrictionCount2;\n now10 = now10;\n date3 = date2;\n sdf6 = sdf2;\n }\n userRestrictionCount = userRestrictionCount2;\n now2 = now10;\n sdf = sdf6;\n date = date3;\n }\n int excludedPackageCount2 = restrictionState2.perUserExcludedPackages != null ? restrictionState2.perUserExcludedPackages.size() : 0;\n if (excludedPackageCount2 > 0 && dumpOp < 0) {\n boolean printedPackagesHeader = false;\n int j13 = 0;\n while (j13 < excludedPackageCount2) {\n int userId2 = restrictionState2.perUserExcludedPackages.keyAt(j13);\n String[] packageNames = restrictionState2.perUserExcludedPackages.valueAt(j13);\n if (packageNames == null) {\n excludedPackageCount = excludedPackageCount2;\n restrictionState = restrictionState2;\n } else {\n if (dumpPackage != null) {\n hasPackage = false;\n int length = packageNames.length;\n excludedPackageCount = excludedPackageCount2;\n int excludedPackageCount3 = 0;\n while (true) {\n if (excludedPackageCount3 >= length) {\n restrictionState = restrictionState2;\n break;\n }\n restrictionState = restrictionState2;\n if (dumpPackage.equals(packageNames[excludedPackageCount3])) {\n hasPackage = true;\n break;\n } else {\n excludedPackageCount3++;\n restrictionState2 = restrictionState;\n }\n }\n } else {\n excludedPackageCount = excludedPackageCount2;\n restrictionState = restrictionState2;\n hasPackage = true;\n }\n if (hasPackage) {\n if (!printedTokenHeader) {\n pw.println(\" User restrictions for token \" + token + \":\");\n printedTokenHeader = true;\n }\n if (!printedPackagesHeader) {\n pw.println(\" Excluded packages:\");\n printedPackagesHeader = true;\n }\n pw.print(\" \");\n pw.print(\"user: \");\n pw.print(userId2);\n pw.print(\" packages: \");\n pw.println(Arrays.toString(packageNames));\n }\n }\n j13++;\n excludedPackageCount2 = excludedPackageCount;\n restrictionState2 = restrictionState;\n }\n }\n }\n i10++;\n userRestrictionCount2 = userRestrictionCount;\n now10 = now2;\n date3 = date;\n sdf6 = sdf;\n }\n } catch (Throwable th9) {\n th = th9;\n throw th;\n }\n } catch (Throwable th10) {\n th = th10;\n throw th;\n }\n }\n if (dumpOp5 && !dumpWatchers) {\n this.mHistoricalRegistry.dump(\" \", pw, dumpUid2, dumpPackage, dumpOp);\n }\n }\n }", "public static void TakeScreenShot(String i) throws IOException {//a metod we will use onTestFail listener, I added i so i can call the method for a particular case and put the screenShots in separate files\n Date d =new Date();\n String fileName = d.toString().replace(\":\",\"_\").replace(\" \",\"_\");\n path = System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\Prints\"+i+\"\\\\\"+fileName+\".jpg\";\n File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n FileUtils.copyFile(screenshot,new File(System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\Prints\"+i+\"\\\\\"+fileName+\".jpg\"));\n }", "public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }", "public void saveGame(File fileLocation);", "public String saveGame(String fileName) {\n File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File saveFile = new File(file, fileName);\n\n try {\n PrintWriter writer = new PrintWriter(saveFile.getAbsolutePath(), \"UTF-8\");\n writer.println(\"Black: \" + playerBlack.getScore());\n writer.println(\"White: \" + playerWhite.getScore());\n writer.println(\"Board:\");\n\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n if (boardObject.getSlot(r, c).getColor() == Slot.BLACK) {\n writer.print(\"B \");\n } else if (boardObject.getSlot(r, c).getColor() == Slot.WHITE) {\n writer.print(\"W \");\n } else {\n writer.print(\"O \");\n }\n }\n writer.println();\n }\n\n String nextPlayer = playerWhite.isTurn() ? \"White\" : \"Black\";\n writer.println(\"Next player: \" + nextPlayer);\n\n String humanPlayer = playerWhite.isComputer() ? \"Black\" : \"White\";\n writer.println(\"Human: \" + humanPlayer);\n\n writer.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return saveFile.getAbsolutePath();\n }", "public static void main(String[] args) {\n new screen();\n\n\n\n }", "public void makeWindow(Container pane)\r\n\t{\r\n\t\tboard.display(pane, fieldArray);\r\n\t}", "public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "public void dumpTree() {\n\t\tsendMessage(\"/g_dumpTree\", new Object[] { 0, 0 });\n\t}", "private void createBWScreen() {\n\t\tfloat[] dash1 = { 2f, 0f, 2f };\n\t\t// Color myNewBlue = new Color(136, 69, 19);\n\t\tColor myNewBlue = new Color(153, 118, 55);\n\t\tBasicStroke bs1 = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);\n\n\t\tactionPanel = new ImagePanel(new ImageIcon(ClassLoader.getSystemResource(\"image/BackgroundNFA.png\")).getImage());\n\t\tactionPanel.setBackground(Color.white);\n\t\tactionPanel.setBounds(0, 0, 1259, 719);\n\t\tgetContentPane().add(actionPanel);\n\n\t\tactionPanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tactionPanel.setLayout(null);\n\n\t\tg = (Graphics2D) actionPanel.getGraphics();\n\t\tg.setColor(myNewBlue);\n\t\tg.setStroke(bs1);\n\t\ttimer = new Timer(5, blinker);\n\t\ttimer.start();\n\n\t\ttransitionLabel1121 = new JLabel();\n\t\tappleLabels.put(1121, transitionLabel1121);\n\t\ttransitionLabel1121.setBounds(435, 135, 40, 40);\n\t\ttransitionLabel1121.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1121);\n\n\t\ttransitionLabel1122 = new JLabel();\n\t\tappleLabels.put(1122, transitionLabel1122);\n\t\ttransitionLabel1122.setBounds(616, 135, 40, 40);\n\t\ttransitionLabel1122.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1122);\n\n\t\ttransitionLabel1123 = new JLabel();\n\t\tappleLabels.put(1123, transitionLabel1123);\n\t\ttransitionLabel1123.setBounds(801, 133, 40, 40);\n\t\ttransitionLabel1123.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1123);\n\n\t\ttransitionLabel2131 = new JLabel();\n\t\tappleLabels.put(2131, transitionLabel2131);\n\t\ttransitionLabel2131.setBounds(210, 282, 40, 40);\n\t\ttransitionLabel2131.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2131);\n\n\t\ttransitionLabel2132 = new JLabel();\n\t\tappleLabels.put(2132, transitionLabel2132);\n\t\ttransitionLabel2132.setBounds(264, 282, 40, 40);\n\t\ttransitionLabel2132.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2132);\n\n\t\ttransitionLabel2133 = new JLabel();\n\t\tappleLabels.put(2133, transitionLabel2133);\n\t\ttransitionLabel2133.setBounds(312, 282, 40, 40);\n\t\ttransitionLabel2133.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2133);\n\n\t\ttransitionLabel2234 = new JLabel();\n\t\tappleLabels.put(2234, transitionLabel2234);\n\t\ttransitionLabel2234.setBounds(549, 282, 40, 40);\n\t\ttransitionLabel2234.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2234);\n\n\t\ttransitionLabel2235 = new JLabel();\n\t\tappleLabels.put(2235, transitionLabel2235);\n\t\ttransitionLabel2235.setBounds(615, 282, 40, 40);\n\t\ttransitionLabel2235.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2235);\n\n\t\ttransitionLabel2236 = new JLabel();\n\t\tappleLabels.put(2236, transitionLabel2236);\n\t\ttransitionLabel2236.setBounds(674, 282, 40, 40);\n\t\ttransitionLabel2236.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2236);\n\n\t\ttransitionLabel2337 = new JLabel();\n\t\tappleLabels.put(2337, transitionLabel2337);\n\t\ttransitionLabel2337.setBounds(913, 282, 40, 40);\n\t\ttransitionLabel2337.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2337);\n\n\t\ttransitionLabel2338 = new JLabel();\n\t\tappleLabels.put(2338, transitionLabel2338);\n\t\ttransitionLabel2338.setBounds(966, 282, 40, 40);\n\t\ttransitionLabel2338.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2338);\n\n\t\ttransitionLabel2339 = new JLabel();\n\t\tappleLabels.put(2339, transitionLabel2339);\n\t\ttransitionLabel2339.setBounds(1017, 282, 40, 40);\n\t\ttransitionLabel2339.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2339);\n\n\t\ttransitionLabel3141 = new JLabel();\n\t\tappleLabels.put(3141, transitionLabel3141);\n\t\ttransitionLabel3141.setBounds(118, 460, 40, 40);\n\t\ttransitionLabel3141.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3141);\n\n\t\ttransitionLabel3142 = new JLabel();\n\t\tappleLabels.put(3142, transitionLabel3142);\n\t\ttransitionLabel3142.setBounds(145, 460, 40, 40);\n\t\ttransitionLabel3142.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3142);\n\n\t\ttransitionLabel3143 = new JLabel();\n\t\tappleLabels.put(3143, transitionLabel3143);\n\t\ttransitionLabel3143.setBounds(173, 460, 40, 40);\n\t\ttransitionLabel3143.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3143);\n\n\t\ttransitionLabel3244 = new JLabel();\n\t\tappleLabels.put(3244, transitionLabel3244);\n\t\ttransitionLabel3244.setBounds(237, 460, 40, 40);\n\t\ttransitionLabel3244.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3244);\n\n\t\ttransitionLabel3245 = new JLabel();\n\t\tappleLabels.put(3245, transitionLabel3245);\n\t\ttransitionLabel3245.setBounds(262, 460, 40, 40);\n\t\ttransitionLabel3245.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3245);\n\n\t\ttransitionLabel3246 = new JLabel();\n\t\tappleLabels.put(3246, transitionLabel3246);\n\t\ttransitionLabel3246.setBounds(285, 460, 40, 40);\n\t\ttransitionLabel3246.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3246);\n\n\t\ttransitionLabel3347 = new JLabel();\n\t\tappleLabels.put(3347, transitionLabel3347);\n\t\ttransitionLabel3347.setBounds(346, 460, 40, 40);\n\t\ttransitionLabel3347.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3347);\n\n\t\ttransitionLabel3348 = new JLabel();\n\t\tappleLabels.put(3348, transitionLabel3348);\n\t\ttransitionLabel3348.setBounds(376, 460, 40, 40);\n\t\ttransitionLabel3348.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3348);\n\n\t\ttransitionLabel3349 = new JLabel();\n\t\tappleLabels.put(3349, transitionLabel3349);\n\t\ttransitionLabel3349.setBounds(406, 460, 40, 40);\n\t\ttransitionLabel3349.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3349);\n\n\t\ttransitionLabel34410 = new JLabel();\n\t\tappleLabels.put(34410, transitionLabel34410);\n\t\ttransitionLabel34410.setBounds(469, 460, 40, 40);\n\t\ttransitionLabel34410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34410);\n\n\t\ttransitionLabel34411 = new JLabel();\n\t\tappleLabels.put(34411, transitionLabel34411);\n\t\ttransitionLabel34411.setBounds(496, 460, 40, 40);\n\t\ttransitionLabel34411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34411);\n\n\t\ttransitionLabel34412 = new JLabel();\n\t\tappleLabels.put(34412, transitionLabel34412);\n\t\ttransitionLabel34412.setBounds(524, 460, 40, 40);\n\t\ttransitionLabel34412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34412);\n\n\t\ttransitionLabel35413 = new JLabel();\n\t\tappleLabels.put(35413, transitionLabel35413);\n\t\ttransitionLabel35413.setBounds(588, 460, 40, 40);\n\t\ttransitionLabel35413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35413);\n\n\t\ttransitionLabel35414 = new JLabel();\n\t\tappleLabels.put(35414, transitionLabel35414);\n\t\ttransitionLabel35414.setBounds(616, 460, 40, 40);\n\t\ttransitionLabel35414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35414);\n\n\t\ttransitionLabel35415 = new JLabel();\n\t\tappleLabels.put(35415, transitionLabel35415);\n\t\ttransitionLabel35415.setBounds(642, 460, 40, 40);\n\t\ttransitionLabel35415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35415);\n\n\t\ttransitionLabel36416 = new JLabel();\n\t\tappleLabels.put(36416, transitionLabel36416);\n\t\ttransitionLabel36416.setBounds(704, 460, 40, 40);\n\t\ttransitionLabel36416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36416);\n\n\t\ttransitionLabel36417 = new JLabel();\n\t\tappleLabels.put(36417, transitionLabel36417);\n\t\ttransitionLabel36417.setBounds(733, 460, 40, 40);\n\t\ttransitionLabel36417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36417);\n\n\t\ttransitionLabel36418 = new JLabel();\n\t\tappleLabels.put(36418, transitionLabel36418);\n\t\ttransitionLabel36418.setBounds(758, 460, 40, 40);\n\t\ttransitionLabel36418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36418);\n\n\t\ttransitionLabel37419 = new JLabel();\n\t\tappleLabels.put(37419, transitionLabel37419);\n\t\ttransitionLabel37419.setBounds(820, 460, 40, 40);\n\t\ttransitionLabel37419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37419);\n\n\t\ttransitionLabel37420 = new JLabel();\n\t\tappleLabels.put(37420, transitionLabel37420);\n\t\ttransitionLabel37420.setBounds(848, 460, 40, 40);\n\t\ttransitionLabel37420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37420);\n\n\t\ttransitionLabel37421 = new JLabel();\n\t\tappleLabels.put(37421, transitionLabel37421);\n\t\ttransitionLabel37421.setBounds(876, 460, 40, 40);\n\t\ttransitionLabel37421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37421);\n\n\t\ttransitionLabel38422 = new JLabel();\n\t\tappleLabels.put(38422, transitionLabel38422);\n\t\ttransitionLabel38422.setBounds(938, 460, 40, 40);\n\t\ttransitionLabel38422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38422);\n\n\t\ttransitionLabel38423 = new JLabel();\n\t\tappleLabels.put(38423, transitionLabel38423);\n\t\ttransitionLabel38423.setBounds(965, 460, 40, 40);\n\t\ttransitionLabel38423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38423);\n\n\t\ttransitionLabel38424 = new JLabel();\n\t\tappleLabels.put(38424, transitionLabel38424);\n\t\ttransitionLabel38424.setBounds(992, 460, 40, 40);\n\t\ttransitionLabel38424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38424);\n\n\t\ttransitionLabel39425 = new JLabel();\n\t\tappleLabels.put(39425, transitionLabel39425);\n\t\ttransitionLabel39425.setBounds(1054, 460, 40, 40);\n\t\ttransitionLabel39425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39425);\n\n\t\ttransitionLabel39426 = new JLabel();\n\t\tappleLabels.put(39426, transitionLabel39427);\n\t\ttransitionLabel39426.setBounds(1082, 460, 40, 40);\n\t\ttransitionLabel39426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39426);\n\n\t\ttransitionLabel39427 = new JLabel();\n\t\tappleLabels.put(39427, transitionLabel39427);\n\t\ttransitionLabel39427.setBounds(1111, 460, 40, 40);\n\t\ttransitionLabel39427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39427);\n\n\t\ttreeBWLevel1 = new JLabel(\"\");\n\t\ttreeBWLevel1.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\ttreeBWLevel1.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel1.setBounds(605, 51, 58, 58);\n\t\ttreeBWLevel1.setName(\"11\");\n\t\tactionPanel.add(treeBWLevel1);\n\t\tlabelList.put(11, treeBWLevel1);\n\t\ttreeBWLevel23 = new JLabel(\"\");\n\t\ttreeBWLevel23.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel23.setBounds(956, 200, 58, 58);\n\t\ttreeBWLevel23.setName(\"23\");\n\t\tlabelList.put(23, treeBWLevel23);\n\t\tactionPanel.add(treeBWLevel23);\n\t\ttreeBWLevel22 = new JLabel(\"\");\n\t\ttreeBWLevel22.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel22.setBounds(605, 200, 58, 58);\n\t\ttreeBWLevel22.setName(\"22\");\n\t\tlabelList.put(22, treeBWLevel22);\n\t\tactionPanel.add(treeBWLevel22);\n\t\ttreeBWLevel21 = new JLabel(\"\");\n\t\ttreeBWLevel21.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel21.setBounds(254, 200, 58, 58);\n\t\ttreeBWLevel21.setName(\"21\");\n\t\tlabelList.put(21, treeBWLevel21);\n\t\tactionPanel.add(treeBWLevel21);\n\t\ttreeBWLevel31 = new JLabel(\"\");\n\t\ttreeBWLevel31.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel31.setBounds(137, 350, 58, 58);\n\t\ttreeBWLevel31.setName(\"31\");\n\t\tlabelList.put(31, treeBWLevel31);\n\t\tactionPanel.add(treeBWLevel31);\n\t\ttreeBWLevel32 = new JLabel(\"\");\n\t\ttreeBWLevel32.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel32.setBounds(254, 350, 58, 58);\n\t\ttreeBWLevel32.setName(\"32\");\n\t\tlabelList.put(32, treeBWLevel32);\n\t\tactionPanel.add(treeBWLevel32);\n\t\ttreeBWLevel33 = new JLabel(\"\");\n\t\ttreeBWLevel33.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel33.setBounds(371, 350, 58, 58);\n\t\ttreeBWLevel33.setName(\"33\");\n\t\tlabelList.put(33, treeBWLevel33);\n\t\tactionPanel.add(treeBWLevel33);\n\t\ttreeBWLevel34 = new JLabel(\"\");\n\t\ttreeBWLevel34.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel34.setBounds(488, 350, 58, 58);\n\t\ttreeBWLevel34.setName(\"34\");\n\t\tlabelList.put(34, treeBWLevel34);\n\t\tactionPanel.add(treeBWLevel34);\n\t\ttreeBWLevel35 = new JLabel(\"\");\n\t\ttreeBWLevel35.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel35.setBounds(605, 350, 58, 58);\n\t\ttreeBWLevel35.setName(\"35\");\n\t\tlabelList.put(35, treeBWLevel35);\n\t\tactionPanel.add(treeBWLevel35);\n\t\ttreeBWLevel36 = new JLabel(\"\");\n\t\ttreeBWLevel36.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel36.setBounds(722, 350, 58, 58);\n\t\ttreeBWLevel36.setName(\"36\");\n\t\tlabelList.put(36, treeBWLevel36);\n\t\tactionPanel.add(treeBWLevel36);\n\t\ttreeBWLevel37 = new JLabel(\"\");\n\t\ttreeBWLevel37.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel37.setBounds(839, 350, 58, 58);\n\t\ttreeBWLevel37.setName(\"37\");\n\t\tlabelList.put(37, treeBWLevel37);\n\t\tactionPanel.add(treeBWLevel37);\n\t\ttreeBWLevel38 = new JLabel(\"\");\n\t\ttreeBWLevel38.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel38.setBounds(956, 350, 58, 58);\n\t\ttreeBWLevel38.setName(\"38\");\n\t\tlabelList.put(38, treeBWLevel38);\n\t\tactionPanel.add(treeBWLevel38);\n\t\ttreeBWLevel39 = new JLabel(\"\");\n\t\ttreeBWLevel39.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel39.setBounds(1073, 350, 58, 58);\n\t\ttreeBWLevel39.setName(\"39\");\n\t\tlabelList.put(39, treeBWLevel39);\n\t\tactionPanel.add(treeBWLevel39);\n\t\ttreeBWLevel41 = new JLabel(\"\");\n\t\ttreeBWLevel41.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel41.setBounds(98, 510, 40, 40);\n\t\ttreeBWLevel41.setName(\"41\");\n\t\tlabelList.put(41, treeBWLevel41);\n\t\tactionPanel.add(treeBWLevel41);\n\t\ttreeBWLevel42 = new JLabel(\"\");\n\t\ttreeBWLevel42.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel42.setBounds(137, 510, 40, 40);\n\t\ttreeBWLevel42.setName(\"42\");\n\t\tlabelList.put(42, treeBWLevel42);\n\t\tactionPanel.add(treeBWLevel42);\n\t\ttreeBWLevel43 = new JLabel(\"\");\n\t\ttreeBWLevel43.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel43.setBounds(176, 510, 40, 40);\n\t\ttreeBWLevel43.setName(\"43\");\n\t\tlabelList.put(43, treeBWLevel43);\n\t\tactionPanel.add(treeBWLevel43);\n\t\ttreeBWLevel44 = new JLabel(\"\");\n\t\ttreeBWLevel44.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel44.setBounds(215, 510, 40, 40);\n\t\ttreeBWLevel44.setName(\"44\");\n\t\tlabelList.put(44, treeBWLevel44);\n\t\tactionPanel.add(treeBWLevel44);\n\t\ttreeBWLevel45 = new JLabel(\"\");\n\t\ttreeBWLevel45.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel45.setBounds(254, 510, 40, 40);\n\t\ttreeBWLevel45.setName(\"45\");\n\t\tlabelList.put(45, treeBWLevel45);\n\t\tactionPanel.add(treeBWLevel45);\n\t\ttreeBWLevel46 = new JLabel(\"\");\n\t\ttreeBWLevel46.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel46.setBounds(293, 510, 40, 40);\n\t\ttreeBWLevel46.setName(\"46\");\n\t\tlabelList.put(46, treeBWLevel46);\n\t\tactionPanel.add(treeBWLevel46);\n\t\ttreeBWLevel47 = new JLabel(\"\");\n\t\ttreeBWLevel47.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel47.setBounds(332, 510, 40, 40);\n\t\ttreeBWLevel47.setName(\"47\");\n\t\tlabelList.put(47, treeBWLevel47);\n\t\tactionPanel.add(treeBWLevel47);\n\t\ttreeBWLevel48 = new JLabel(\"\");\n\t\ttreeBWLevel48.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel48.setBounds(371, 510, 40, 40);\n\t\ttreeBWLevel48.setName(\"48\");\n\t\tlabelList.put(48, treeBWLevel48);\n\t\tactionPanel.add(treeBWLevel48);\n\t\ttreeBWLevel49 = new JLabel(\"\");\n\t\ttreeBWLevel49.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel49.setBounds(410, 510, 40, 40);\n\t\ttreeBWLevel49.setName(\"49\");\n\t\tlabelList.put(49, treeBWLevel49);\n\t\tactionPanel.add(treeBWLevel49);\n\t\ttreeBWLevel412 = new JLabel(\"\");\n\t\ttreeBWLevel412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel412.setBounds(527, 510, 40, 40);\n\t\ttreeBWLevel412.setName(\"412\");\n\t\tlabelList.put(412, treeBWLevel412);\n\t\tactionPanel.add(treeBWLevel412);\n\t\ttreeBWLevel410 = new JLabel(\"\");\n\t\ttreeBWLevel410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel410.setBounds(449, 510, 40, 40);\n\t\ttreeBWLevel410.setName(\"410\");\n\t\tlabelList.put(410, treeBWLevel410);\n\t\tactionPanel.add(treeBWLevel410);\n\t\ttreeBWLevel411 = new JLabel(\"\");\n\t\ttreeBWLevel411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel411.setBounds(488, 510, 40, 40);\n\t\ttreeBWLevel411.setName(\"411\");\n\t\tlabelList.put(411, treeBWLevel411);\n\t\tactionPanel.add(treeBWLevel411);\n\t\ttreeBWLevel413 = new JLabel(\"\");\n\t\ttreeBWLevel413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel413.setBounds(566, 510, 40, 40);\n\t\ttreeBWLevel413.setName(\"413\");\n\t\tlabelList.put(413, treeBWLevel413);\n\t\tactionPanel.add(treeBWLevel413);\n\t\ttreeBWLevel414 = new JLabel(\"\");\n\t\ttreeBWLevel414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel414.setBounds(605, 510, 40, 40);\n\t\ttreeBWLevel414.setName(\"414\");\n\t\tlabelList.put(414, treeBWLevel414);\n\t\tactionPanel.add(treeBWLevel414);\n\t\ttreeBWLevel415 = new JLabel(\"\");\n\t\ttreeBWLevel415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel415.setBounds(644, 510, 40, 40);\n\t\ttreeBWLevel415.setName(\"415\");\n\t\tlabelList.put(415, treeBWLevel415);\n\t\tactionPanel.add(treeBWLevel415);\n\t\ttreeBWLevel416 = new JLabel(\"\");\n\t\ttreeBWLevel416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel416.setBounds(683, 510, 40, 40);\n\t\ttreeBWLevel416.setName(\"416\");\n\t\tlabelList.put(416, treeBWLevel416);\n\t\tactionPanel.add(treeBWLevel416);\n\t\ttreeBWLevel417 = new JLabel(\"\");\n\t\ttreeBWLevel417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel417.setBounds(722, 510, 40, 40);\n\t\ttreeBWLevel417.setName(\"417\");\n\t\tlabelList.put(417, treeBWLevel417);\n\t\tactionPanel.add(treeBWLevel417);\n\t\ttreeBWLevel418 = new JLabel(\"\");\n\t\ttreeBWLevel418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel418.setBounds(761, 510, 40, 40);\n\t\ttreeBWLevel418.setName(\"418\");\n\t\tlabelList.put(418, treeBWLevel418);\n\t\tactionPanel.add(treeBWLevel418);\n\n\t\ttreeBWLevel419 = new JLabel(\"\");\n\t\ttreeBWLevel419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel419.setName(\"419\");\n\t\ttreeBWLevel419.setBounds(800, 510, 40, 40);\n\t\tlabelList.put(419, treeBWLevel419);\n\t\tactionPanel.add(treeBWLevel419);\n\n\t\ttreeBWLevel420 = new JLabel(\"\");\n\t\ttreeBWLevel420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel420.setName(\"420\");\n\t\ttreeBWLevel420.setBounds(839, 510, 40, 40);\n\t\tlabelList.put(420, treeBWLevel420);\n\t\tactionPanel.add(treeBWLevel420);\n\n\t\ttreeBWLevel421 = new JLabel(\"\");\n\t\ttreeBWLevel421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel421.setName(\"421\");\n\t\ttreeBWLevel421.setBounds(878, 510, 40, 40);\n\t\tlabelList.put(421, treeBWLevel421);\n\t\tactionPanel.add(treeBWLevel421);\n\n\t\ttreeBWLevel422 = new JLabel(\"\");\n\t\ttreeBWLevel422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel422.setName(\"422\");\n\t\ttreeBWLevel422.setBounds(917, 510, 40, 40);\n\t\tlabelList.put(422, treeBWLevel422);\n\t\tactionPanel.add(treeBWLevel422);\n\n\t\ttreeBWLevel423 = new JLabel(\"\");\n\t\ttreeBWLevel423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel423.setName(\"423\");\n\t\ttreeBWLevel423.setBounds(956, 510, 40, 40);\n\t\tlabelList.put(423, treeBWLevel423);\n\t\tactionPanel.add(treeBWLevel423);\n\n\t\ttreeBWLevel424 = new JLabel(\"\");\n\t\ttreeBWLevel424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel424.setName(\"424\");\n\t\ttreeBWLevel424.setBounds(995, 510, 40, 40);\n\t\tlabelList.put(424, treeBWLevel424);\n\t\tactionPanel.add(treeBWLevel424);\n\n\t\ttreeBWLevel425 = new JLabel(\"\");\n\t\ttreeBWLevel425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel425.setName(\"425\");\n\t\ttreeBWLevel425.setBounds(1034, 510, 40, 40);\n\t\tlabelList.put(425, treeBWLevel425);\n\t\tactionPanel.add(treeBWLevel425);\n\n\t\ttreeBWLevel426 = new JLabel(\"\");\n\t\ttreeBWLevel426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel426.setName(\"426\");\n\t\tlabelList.put(426, treeBWLevel426);\n\t\ttreeBWLevel426.setBounds(1073, 510, 40, 40);\n\t\tactionPanel.add(treeBWLevel426);\n\n\t\ttreeBWLevel427 = new JLabel(\"\");\n\t\ttreeBWLevel427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel427.setName(\"427\");\n\t\ttreeBWLevel427.setBounds(1112, 510, 40, 40);\n\t\tlabelList.put(4127, treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tarrowLabel = new JLabel(\"\");\n\t\tarrowLabel.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/arrow.png\")));\n\t\tarrowLabel.setBounds(660, 600, 30, 30);\n\t\tactionPanel.add(arrowLabel);\n\t\tarrowLabel.setVisible(false);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.LIGHT_GRAY);\n\t\tpanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tpanel.setBounds(6, 599, 1250, 98);\n\t\tactionPanel.add(panel);\n\t\tpanel.setLayout(null);\n\t\ttestPanel = new JPanel();\n\t\ttestPanel.setBounds(650, 27, 245, 39);\n\t\tpanel.add(testPanel);\n\t\ttestPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n\n\t\ttestBtn1 = new JButton(\"\");\n\t\ttestBtn1.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn1);\n\n\t\ttestBtn2 = new JButton(\"\");\n\t\ttestBtn2.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn2);\n\n\t\ttestBtn3 = new JButton(\"\");\n\t\ttestBtn3.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn3);\n\n\t\ttestPanel.setVisible(false);\n\t\ttestPanel.setBackground(Color.LIGHT_GRAY);\n\n\t\tpanel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.LIGHT_GRAY);\n\t\tpanel_1.setBounds(181, 27, 376, 44);\n\t\tpanel.add(panel_1);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Enter Test string\");\n\t\tpanel_1.add(lblNewLabel);\n\n\t\ttestField = new JTextField();\n\t\ttestField.setBounds(20, 40, 161, 27);\n\t\tpanel_1.add(testField);\n\t\ttestField.setColumns(10);\n\t\ttestBtn = new JButton(\"Test\");\n\t\ttestBtn.setBounds(340, 20, 92, 30);\n\t\tpanel_1.add(testBtn);\n\n\t\ttestBtn.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\ttestPanel.setVisible(true);\n\t\t\t\tarrowLabel.setVisible(true);\n\n\t\t\t\ttestString = testField.getText().toString();\n\n\t\t\t\ttestBtn1.setText(String.valueOf(testString.charAt(0)));\n\t\t\t\ttestBtn2.setText(String.valueOf(testString.charAt(1)));\n\t\t\t\ttestBtn3.setText(String.valueOf(testString.charAt(2)));\n\t\t\t\tactionPanel.revalidate();\n\t\t\t\tactionPanel.repaint();\n\t\t\t\t// testBtn1.setText(\" \" + testString.charAt(0));\n\n\t\t\t\ttestBtn1.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tarrowLabel.setBounds(700, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 1));\n\t\t\t\t\t\ttestBtn1.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GRAY);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn2.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(745, 600, 30, 30);\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 2));\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn3.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(790, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 3));\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GREEN);\n\t\t\t\t\t\tarrowLabel.setVisible(false);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t}", "private void DBScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm2.setIcon(new ImageIcon(dbImages.get(currentDBFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "public void makeBreakdownShell(SizeBreakdown breakdown)\n throws IOException {\n \n Map<String, CodeCollection> nameToCodeColl = breakdown.nameToCodeColl;\n Map<String, LiteralsCollection> nameToLitColl = breakdown.nameToLitColl;\n \n // copy from the bin directory to the current directory\n String classPath = GlobalInformation.settings.resources.get();\n if (classPath == null) {\n classPath = System.getProperty(\"java.class.path\");\n }\n if (!classPath.endsWith(\"/\")) {\n classPath += \"/\";\n }\n String inputFileName = \"roundedCorners.css\";\n File inputFile = new File(classPath + inputFileName);\n File outputFile = getOutFile(\"roundedCorners.css\");\n copyFileOrDirectory(inputFile, outputFile, classPath, inputFileName, false);\n \n inputFileName = \"classLevel.css\";\n File inputFile2 = new File(classPath + inputFileName);\n File outputFile2 = getOutFile(\"classLevel.css\");\n copyFileOrDirectory(inputFile2, outputFile2, classPath, inputFileName,\n false);\n \n inputFileName = \"images\";\n File inputDir = new File(classPath + \"images\");\n File outputDir = getOutFile(\"images\");\n copyFileOrDirectory(inputDir, outputDir, classPath, inputFileName, true);\n \n final PrintWriter outFile = new PrintWriter(getOutFile(shellFileName(breakdown)));\n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//IETF//DTD HTML//EN\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<title>Story of Your Compile - Top Level Dashboard for Permutation</title>\");\n \n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"roundedCorners.css\\\">\");\n outFile.println(\"<style type=\\\"text/css\\\">\");\n outFile.println(\"body {background-color: #728FCE}\");\n outFile.println(\"h2 {background-color: transparent}\");\n outFile.println(\"p {background-color: fuchsia}\");\n outFile.println(\"</style>\");\n outFile.println(\"</head>\");\n \n outFile.println(\"<body>\");\n outFile.println(\"<center>\");\n outFile.println(\"<h3>Story of Your Compile Dashboard</h3>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n \n outFile.println(\"</center>\");\n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<b>Package breakdown</b>\");\n outFile.println(\" </div>\");\n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<b>Code type breakdown</b>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Package Name</div>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Code Type</div>\");\n outFile.println(\" </div>\");\n \n String packageBreakdownFileName = makePackageHtml(breakdown);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:left;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + packageBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n String codeTypeBreakdownFileName = makeCodeTypeHtml(breakdown,\n nameToCodeColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:right;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + codeTypeBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<b>Literals breakdown</b>\");\n outFile.println(\" </div>\");\n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<b>String literals breakdown</b>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:50%; float:left; padding-top: 10px;\\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">Literal Type</div>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" <div style=\\\"width:48%; float:right; padding-top: 10px; \\\">\");\n outFile.println(\"<div style=\\\"width: 110px; float: left; font-size:16px;\\\">Size</div>\");\n outFile.println(\"<div style=\\\"width: 200px; float: left; text-align:left; font-size:16px; \\\">String Literal Type</div>\");\n outFile.println(\" </div>\");\n \n String literalsBreakdownFileName = makeLiteralsHtml(breakdown,\n nameToLitColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:left;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + literalsBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\"</div>\");\n \n String stringLiteralsBreakdownFileName = makeStringLiteralsHtml(breakdown,\n nameToLitColl);\n outFile.println(\"<div style=\\\"height:35%; width:48%; margin:0 auto; background-color:white; float:right;\\\">\");\n outFile.println(\"<iframe src=\\\"\" + stringLiteralsBreakdownFileName\n + \"\\\" width=100% height=100% scrolling=auto></iframe>\");\n outFile.println(\" </div>\");\n \n outFile.println(\" </body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }", "public static Bitmap tomarScreenShot(Activity actividad) {\n View rootView = actividad.getWindow().getDecorView().findViewById(android.R.id.content);\n View screenView = rootView.getRootView();\n Bitmap bitmap = Bitmap.createBitmap(screenView.getWidth(), screenView.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n Drawable bgDrawable = screenView.getBackground();\n if (bgDrawable != null) {\n bgDrawable.draw(canvas);\n } else {\n canvas.drawColor(Color.WHITE);\n }\n screenView.draw(canvas);\n return bitmap;\n }", "private void makeScreenshot(TakesScreenshot d) {\n\t\tFile screenshot = d.getScreenshotAs(OutputType.FILE);\n\t\ttry {\n\t\t\tFileUtils.copyFile(screenshot, new File(screenshot.getName()));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void getCurrentScreenshots(String filePath, String fileName) {\n\t\ttry {\n\t\t\tString screenPath = filePath;\n\t\t\tString timeStamp = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\")\n\t\t\t\t\t.format(Calendar.getInstance().getTime());\n\t\t\tString fileID = fileName + \"_\" + timeStamp;\n\t\t\tString screenName = String.format(\"%s.png\", fileID);\n\t\t\tscreenPath = screenPath + screenName;\n\t\t\tFile screenshot = ((TakesScreenshot) Driver.getInstance())\n\t\t\t\t\t.getScreenshotAs(OutputType.FILE);\n\t\t\tFileUtils.copyFile(screenshot, new File(screenPath));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void printScreen()\n {\n try\n {\n Graphics g = getGraphics();\n if(drawingArea != null && g != null)\n {\n g.drawImage(drawingArea, 0, 0, null);\n }\n\n // Sync the display on some systems.\n // (on Linux, this fixes event queue problems)\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n }\n catch(Exception ex)\n {\n System.out.println(\"Graphics error: \" + ex);\n }\n }", "private void printHelp(){\n System.out.println(\"Available commands:\");\n System.out.println(\"\\tmove SOURCE DESTINATION\");\n System.out.println(\"\\t\\tMoves single card from SOURCE to DESTINATION.\");\n System.out.println(\"\\t\\tSOURCE is any deck - d|r|s\");\n System.out.println(\"\\t\\tDESTINATION is any target deck or stack - d|s\");\n System.out.println(\"\\t\\tAlterantives: mv|m\");\n System.out.println(\"\\tmove SOURCE DESTINATION CARD\");\n System.out.println(\"\\t\\tMoves group of cards begining with CARD from SOURCE to DESTINATION.\");\n System.out.println(\"\\t\\tSOURCE is any deck - d|r|s\");\n System.out.println(\"\\t\\tDESTINATION is any target deck or stack - d|s\");\n System.out.println(\"\\t\\tCARD is value of card in SOURCE, from which is pack taken.\");\n System.out.println(\"\\t\\tAlterantives: mv|m\");\n System.out.println(\"\\tnext\");\n System.out.println(\"\\t\\tShow next card in card repository.\");\n System.out.println(\"\\t\\tAlterantives: n\");\n System.out.println(\"\\trenew\");\n System.out.println(\"\\t\\tTurn over repository.\");\n System.out.println(\"\\t\\tAlterantives: rn\");\n System.out.println(\"\\tundo\");\n System.out.println(\"\\t\\tUndo last move.\");\n System.out.println(\"\\t\\tAlterantives: u\");\n System.out.println(\"\\tredo\");\n System.out.println(\"\\t\\tRedo last move.\");\n System.out.println(\"\\t\\tAlterantives: rd|r\");\n System.out.println(\"\\tquit\");\n System.out.println(\"\\t\\tExit the game.\");\n System.out.println(\"\\t\\tAlterantives: q\");\n System.out.println(\"\\tsave FILENAME\");\n System.out.println(\"\\t\\tSaves game under specified name.\");\n System.out.println(\"\\t\\tFILENAME is name of saved game without extension.\");\n System.out.println(\"\\tload FILENAME\");\n System.out.println(\"\\t\\tLoads game from file with given name.\");\n System.out.println(\"\\t\\tFILENAME is name of saved game without extension.\");\n System.out.println(\"\\thint\");\n System.out.println(\"\\t\\tShow hints for current state of game.\");\n System.out.println(\"\\t\\tAlternatives: h\");\n System.out.println(\"\\thelp\");\n System.out.println(\"\\t\\tDisplays help.\");\n }", "public static String takeScreenshot(String filename) {\n\t\tTakesScreenshot ts= (TakesScreenshot)driver;\n\t\tFile file=ts.getScreenshotAs(OutputType.FILE);\n\t\tString destinationFile=Constants.SCREENSHOT_FILEPATH+filename+\".png\";\n\t\ttry {\n\t\tFileUtils.copyFile(file, new File(\"screenshot/\"+filename+\".pig\"));\n\t\t}catch (Exception ex) {\n\t\t\tSystem.out.println(\"Cannot take screenshot!\");\n\t\t}\n\t\treturn destinationFile;\n\t}", "public void screenShot(String data) throws IOException {\nTakesScreenshot screenShot=(TakesScreenshot) driver;\nFile screenshotAs = screenShot.getScreenshotAs(OutputType.FILE);\nFile file=new File(System.getProperty(\"user.dir\")+\"\\\\target\\\\\"+data+\".png\");\nFileUtils.copyFile(screenshotAs, file);\n\n}", "public static File captureRootScreenShot(Activity activity){\n View decor = activity.getWindow().getDecorView();\n decor.setDrawingCacheEnabled(true);\n\n // Configure screenshot bounds\n Bitmap decorBmp = decor.getDrawingCache();\n\n // Create the screenshot per se\n Bitmap screenShot = Bitmap.createBitmap(decorBmp, 0, 0, decorBmp.getWidth(), decorBmp.getHeight());\n\n // Recycle the intial bitmap\n decorBmp.recycle();\n\n // Disable drawing cache on the decor\n decor.setDrawingCacheEnabled(false);\n\n // Save the newly generated screenshot into a temporary variable\n try {\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"PNG_\" + timeStamp + \"_\";\n File cacheDir = activity.getCacheDir();\n File tempFile = File.createTempFile(imageFileName, \".png\", cacheDir);\n\n // Write bitmap to file\n boolean result = screenShot.compress(Bitmap.CompressFormat.PNG, 0, new FileOutputStream(tempFile));\n if(result)\n return tempFile;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public void takescreenshot() throws IOException {\n\t\tString pwd = System.getProperty(\"user.dir\");\n\t\tFile sFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\tFileUtils.copyFile(sFile, new File(pwd + \"\\\\Output_screen.jpg\"));\n\t}", "void PrintOnScreen(String toPrnt);", "abstract public void _dump(Dump d);", "public void dump() throws IOException;", "public void DrawScreen() {\r\n DrawScreen(0, false, null);\r\n }" ]
[ "0.6247969", "0.59167224", "0.57988304", "0.5542295", "0.52317697", "0.52108485", "0.51518935", "0.5145081", "0.5140845", "0.5065431", "0.50608706", "0.50414103", "0.502741", "0.49974996", "0.4996751", "0.49881315", "0.49868664", "0.49517432", "0.49344835", "0.490472", "0.48796007", "0.48775432", "0.48742318", "0.4863705", "0.4862326", "0.48589826", "0.48549867", "0.48254526", "0.4825418", "0.48179227", "0.48170862", "0.48139882", "0.48005185", "0.4795612", "0.4789718", "0.47829443", "0.47651723", "0.4764161", "0.4752993", "0.4747866", "0.47424346", "0.47282314", "0.47206944", "0.47206944", "0.47206944", "0.47206944", "0.47206944", "0.47206944", "0.47206944", "0.47206944", "0.47206944", "0.4714622", "0.47094688", "0.46873075", "0.46858662", "0.4667463", "0.46657315", "0.46379146", "0.46346387", "0.4627106", "0.4618349", "0.46119803", "0.46034375", "0.46005526", "0.45799333", "0.4577707", "0.45762667", "0.45694125", "0.45684457", "0.45677045", "0.4564289", "0.45591968", "0.45580387", "0.45579395", "0.45572853", "0.45546287", "0.45546222", "0.4543865", "0.45424256", "0.45376763", "0.45365128", "0.4524354", "0.4522811", "0.450806", "0.4507982", "0.4507626", "0.45043713", "0.44958568", "0.44931588", "0.44915292", "0.44914573", "0.4481736", "0.4480104", "0.44766885", "0.44763917", "0.44722256", "0.44721302", "0.44709387", "0.44584927", "0.44549772" ]
0.57947993
3
Asks and waits for a confirmation of the given config settings. Expects y or n.
private void askConfirm(String question) { Scanner scanner = new Scanner(System.in); String confirm = "y"; while (!confirm.equals("y") && !confirm.equals("n")) { System.out.println(question); confirm = scanner.nextLine(); if (confirm.equals("y")) { System.out.println("Thank you."); } else if (confirm.equals("n")) { System.out.println("You can edit the config settings in src/main/config"); System.exit(1); } else { System.out.println("Really funny. Try again."); } } scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void confirmation() throws InterruptedException {\n Scanner scan = new Scanner(System.in);\n String confirm = \"\";\n confirm = InputValidation.regexValidate(scan, \"yn\");\n\n if (confirm.equalsIgnoreCase(\"Y\")) {\n entryCheck();\n computeResult();\n System.out.println(Pet.petCollection.get(Pet.getIndex()).getCompetition());\n }\n Competition.c.setOpponent(Pet.PetGenerator());\n }", "static boolean promptForComfirmation(String prompt) {\n String line;\n\n line = promptWithOptions(Arrays.asList(\"y\", \"n\"), prompt);\n\n return (line.compareTo(\"y\") == 0);\n }", "public boolean promptYesNo(String str)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "public void selectNCDConfirmed ()\r\n\t{\r\n\r\n\t\tList<WebElement> ncdconfirmedradiobuttons = orPolicyVehicleHub.rdoVehicleNCDConfirmed;\r\n\t\tfor (WebElement ncdconfirmedradiobutton : ncdconfirmedradiobuttons)\r\n\t\t{\r\n\t\t\tif (ncdconfirmedradiobutton.getAttribute (\"value\").equals (\"Y\"))\r\n\t\t\t{\r\n\t\t\t\tncdconfirmedradiobutton.click ();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@SuppressWarnings(\"resource\")\n public static boolean askYN()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Continue(Y/N)?\");\n while (true)\n {\n char ans = Character.toUpperCase(scanner.nextLine().charAt(0));\n if (ans == 'Y' || ans == 'N')\n return (ans == 'Y');\n System.err.println(\"Error: y or n only.\");\n }\n }", "boolean waitForConfirmationOnAll(int timeout_ms) throws IOException;", "public void askLoadSettings() {\r\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"Load previous settings? (Y/N)\");\r\n String bool = scanner.nextLine();\r\n if (isStringYN(bool)) {\r\n System.out.println(\"Selected \" + bool);\r\n if (Objects.equals(bool, \"Y\")) {\r\n skip = true;\r\n try {\r\n loadAll();\r\n } catch (IOException e) {\r\n System.out.println(\"File not found\");\r\n }\r\n }\r\n } else {\r\n System.out.println(\"Invalid Input\");\r\n askLoadSettings();\r\n }\r\n }", "private void confirm() {\n\t\tcheckGlobalStatus();\n\n\t\tfinal Set<CyNetwork> networks = networkManager.getNetworkSet();\n\t\tfinal Iterator<CyNetwork> itr = networks.iterator();\n\t\tCyNetwork network = itr.next();\n\n\t\tcheckNetwork(network);\n\t}", "protected boolean Confirm(String message) {\n String line = inputLine(message);\n if (line.length() == 0 || line.toUpperCase().charAt(0) == 'Y') {\n return true;\n } else {\n return false;\n }\n }", "void confirm();", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().trim().toLowerCase();\r\n while (!response.equals(\"y\") && !response.equals(\"n\")) {\r\n System.out.println(\"Please answer y or n.\");\r\n System.out.print(prompt + \" (y/n)? \");\r\n response = console.nextLine().trim().toLowerCase();\r\n }\r\n return response.equals(\"y\");\r\n }", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().trim().toLowerCase();\r\n while (!response.equals(\"y\") && !response.equals(\"n\")) {\r\n System.out.println(\"Please answer y or n.\");\r\n System.out.print(prompt + \" (y/n)? \");\r\n response = console.nextLine().trim().toLowerCase();\r\n }\r\n return response.equals(\"y\");\r\n }", "@Test\n public void basicPromptConfirmHandlingChangeAndDismissTest(){\n\n WebElement promptButton = driver.findElement(By.id(\"promptexample\"));\n WebElement promptResult = driver.findElement(By.id(\"promptreturn\"));\n\n assertEquals(\"pret\", promptResult.getText());\n promptButton.click();\n\n String alertMessage = \"I prompt you\";\n Alert promptAlert = driver.switchTo().alert();\n assertEquals(alertMessage,promptAlert.getText());\n\n promptAlert.sendKeys(\"Hello\");\n promptAlert.dismiss();\n assertEquals(\"pret\", promptResult.getText());\n }", "public static String promptConfirmation(String[] parseInput) {\n String text = \" Are you sure all the listed details are correct?\\n\"\n + \" NRIC : \" + parseInput[0].toUpperCase().trim() + \"\\n\"\n + \" Date : \" + parseInput[1].trim() + \"\\n\"\n + \" Time : \" + parseInput[2].trim() + \"\\n\"\n + \" Reason : \" + parseInput[3].trim() + \"\\n\"\n + \" (Y/N)?\";\n return text;\n }", "@Override\r\n\t\tpublic boolean promptYesNo(String message) {\n\t\t\treturn true;\r\n\t\t}", "public static boolean askYesNo(String message) {\n\n\t\t// Present the choice (and log it where chosen.)\n\t\tpresent(message + \" [Y/N] :: \");\n\n\t\tString choice = \"\";\n\n\t\t// Get a result from the user.\n\t\ttry {\n\t\t\tboolean chosen = false;\n\t\t\twhile ( !(chosen)) {\n\n\t\t\t\tchoice = System.console().readLine();\n\n\t\t\t\tchoice = choice.toUpperCase().trim();\n\n\t\t\t\tif ((choice.compareTo(\"Y\") == 0) || (choice.compareTo(\"N\") == 0) ){\n\t\t\t\t\tchosen = true;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch\t(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Log the user's choice. \n\t\taddLine(\"(The user chose: \\\"\" + choice + \"\\\".)\");\n\n\t\tif (choice.compareTo(\"Y\") == 0 ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "void resetConfirm(){\n\t\tconfirmed = false;\n\t}", "public static void main(String[] args) {\n \n int result=JOptionPane.showConfirmDialog(null,\"Are you sure to Exit?\",\n \"My Question\",JOptionPane.YES_NO_OPTION);\n \n switch(result){\n case JOptionPane.YES_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do..\");\n break;\n \n case JOptionPane.NO_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do not..\");\n break;\n \n case JOptionPane.CANCEL_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we cancel it..\");\n }\n }", "private boolean testConfig(Window parent, Channel ch) {\n if (mConfig.getExternalChannel(ch) == null) {\n int ret = JOptionPane.showConfirmDialog(parent, mLocalizer.msg(\"channelAssign\", \"Please assign Channel first\"), mLocalizer.msg(\"channelAssignTitle\", \"Assign Channel\"), JOptionPane.YES_NO_OPTION);\n\n if (ret == JOptionPane.YES_OPTION) {\n SimpleConfigDialog dialog = new SimpleConfigDialog(parent, this,\n mConnection, mConfig);\n UiUtilities.centerAndShow(dialog);\n\n if (dialog.wasOkPressed()) {\n mConfig = dialog.getConfig();\n mName = dialog.getName();\n }\n }\n return false;\n }\n\n return true;\n }", "private void setConfirmState() {\n if (state == CONFIRM_STATE)\n return;\n consoleLayout.setVisibility(GONE);\n confirmContainer.setVisibility(VISIBLE);\n state = CONFIRM_STATE;\n }", "static boolean yesNoQuestion(String prompt){\r\n while(true){\r\n System.out.println(prompt);\r\n String input = Console.in.readWord();\r\n if (input.equals(\"yes\")) return true;\r\n else if (input.equals(\"no\")) return false;\r\n }\r\n }", "@Test\n public void basicPromptConfirmHandlingChangeAndAcceptTest(){\n\n WebElement promptButton = driver.findElement(By.id(\"promptexample\"));\n WebElement promptResult = driver.findElement(By.id(\"promptexample\"));\n\n assertEquals(\"pret\", promptResult.getText());\n promptButton.click();\n\n String alertMessage = \"I prompt you\";\n Alert promptAlert = driver.switchTo().alert();\n assertEquals(alertMessage,promptAlert.getText());\n\n promptAlert.sendKeys(\"Hello\");\n promptAlert.accept();\n assertEquals(\"Hello\", promptResult.getText());\n }", "public static boolean askUserYesNo() {\n // Variable declarations\n String userInput = \"\"; // User input string\n\n // Get user input\n userInput = scnr.nextLine();\n\n // Validate whether user input is ok, and continue asking until right\n while (!userInput.equalsIgnoreCase(\"y\") &&\n !userInput.equalsIgnoreCase(\"yes\") &&\n !userInput.equalsIgnoreCase(\"n\") &&\n !userInput.equalsIgnoreCase(\"no\")) {\n System.out.print(\"That is not a valid input. Please try again. (y/n): \");\n userInput = scnr.nextLine();\n }\n\n // Return true if user says yes, and false if user says no\n if (userInput.equalsIgnoreCase(\"y\") || userInput.equalsIgnoreCase(\"yes\")) {\n return true;\n } else {\n return false;\n }\n }", "public boolean nextYN() {\n this.inputStr = this.s.nextLine();\n\n if (inputStr.toLowerCase().contains(\"yes\")) {\n return true;\n } else if (inputStr.toLowerCase().contains(\"y\")) {\n return true;\n }\n return false;\n }", "private static void askForContinue() {\n\t\t\t\n\t\t}", "public String confirm()\n\t{\n\t\tconfirm = true;\n\t\treturn su();\n\t}", "private static void JGUI5() {\n\t\tint response = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Do you want to continue?\", \"Confirm\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n\t\tif (response == JOptionPane.NO_OPTION) {\n\t\t\tSystem.out.println(\"No button clicked\");\n\t\t} else if (response == JOptionPane.YES_OPTION) {\n\t\tSystem.out.println(\"Yes button clicked\");\n\t\t} else if (response == JOptionPane.CLOSED_OPTION) {\n\t\t\tSystem.out.println(\"JOptionPane closed\");\n\t\t}\n\t}", "public boolean saidYes(boolean onQuit) {\r\n\r\n System.out.print(\" (Y/N) \");\r\n \r\n\t\tchar responce = Keyboard.readChar();\r\n responce = Character.toLowerCase(responce);\r\n\r\n\t\tswitch (responce) {\r\n case 'y':\r\n return true;\r\n\r\n case 'q':\r\n case 'e':\r\n\r\n // Is the user is being asked to quit?\r\n if (onQuit) {\r\n return true;\r\n\t\t\t\t}\r\n\r\n endGameSwitch = true;\r\n return false;\r\n\r\n default:\r\n return false;\r\n }\r\n\t}", "public void confirmOK(String expectedMessage) throws InterruptedException {\r\n\t\tfor (int second = 0;; second++) {\r\n\t\t\tif (second >= 60)\r\n\t\t\t\tfail(\"timeout\");\r\n\t\t\ttry {\r\n\t\t\t\tif (selenium.isConfirmationPresent())\r\n\t\t\t\t\tbreak;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t\tThread.sleep(1000);\r\n\t\t}\r\n\t\tString actual = selenium.getConfirmation();\r\n\t\t// selenium.chooseOkOnNextConfirmation();\r\n\t\t// System.out.println(s+\" confirmMessage: \"+confirmMessage);\r\n\t\tassertTrue(\"Did not see matching confirm message. \" + \"\\n Expected: \"\r\n\t\t\t\t+ expectedMessage + \"\\n Actual: \" + actual, actual\r\n\t\t\t\t.matches(expectedMessage));\r\n\t}", "private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }", "private void confirmacion(String P, String T) {\n int n = JOptionPane.showConfirmDialog(\n null,\n P,\n T,\n JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n N_Cupon ventana = new N_Cupon(conexion);\n ventana.setVisible(true);\n this.setVisible(false);\n //Abrir nueva ventana para insertar Ticket en cupon\n } else {\n this.setVisible(false);\n }\n }", "public abstract boolean confirm();", "@After\n \tpublic void confirm() {\n \t\tcheckGlobalStatus();\n \n \t\tIterator<CyNetworkView> viewIt = viewManager.getNetworkViewSet().iterator();\n \n \t\tCyNetworkView view = viewIt.next(); \n \t\tCyNetwork network = view.getModel();\n \t\t\n \t\tcheckNetwork(network);\n \t\tcheckNetworkView(network);\n \t\tcheckAttributes(network);\n \t}", "private void configActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configActionPerformed\n java.awt.EventQueue.invokeLater(() -> {\n if (dialog == null) {\n dialog = new ConfigurationDlg(this, true);\n }\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n dialog.dispose();\n }\n });\n dialog.setVisible(true);\n });\n }", "public boolean editTaskProgSetting(){\r\n\t\tboolean result = false;\r\n\t\tint txtBxValue = 0;\r\n\t\ttry{\r\n\t\t\tfindElement(By.xpath(\"//div[@class='actionBtnHolderPopup']//input[@value='Edit']\")).click();\r\n\t\t\tif(driver.findElement(By.id(\"afterEdit\")).getAttribute(\"style\").contains(\"block\")){\r\n\t\t\t\tfor(String iSrcString : iSourceStatusString){\r\n\t\t\t\t\tiSourceStatus = (iSrcString.split(\";\"))[0];\r\n\t\t\t\t\tRFI = Integer.parseInt((iSrcString.split(\";\"))[1]);\r\n\t\t\t\t\tRFP = Integer.parseInt((iSrcString.split(\";\"))[2]);\r\n\t\t\t\t\tRFQ = Integer.parseInt((iSrcString.split(\";\"))[3]);\r\n\t\t\t\t\tAuction = Integer.parseInt((iSrcString.split(\";\"))[4]);\r\n\t\t\t\t\tfor(int itr = 1; itr<5; itr++){\r\n\t\t\t\t\t\tif(itr==1)\r\n\t\t\t\t\t\t\ttxtBxValue = RFI; \r\n\t\t\t\t\t\telse if(itr==2)\r\n\t\t\t\t\t\t\ttxtBxValue = RFP;\r\n\t\t\t\t\t\telse if(itr==3)\r\n\t\t\t\t\t\t\ttxtBxValue = RFQ;\r\n\t\t\t\t\t\telse if(itr==4)\r\n\t\t\t\t\t\t\ttxtBxValue = Auction;\r\n\t\t\t\t\t\tWebElement txtBx = driver.findElement(By.xpath(\"//table/tbody/tr[td[text()='\"+iSourceStatus+\"']]/td[\"+itr+1+\"]/input\"));\r\n\t\t\t\t\t\ttxtBx.clear();\r\n\t\t\t\t\t\ttxtBx.sendKeys(String.valueOf(txtBxValue));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfindElement(By.name(\"savenapply\")).click();\r\n\t\t\t\t\tif(driver.findElement(ConfirmationDialog.getDialogTitle()).isDisplayed()){\r\n\t\t\t\t\t\tif(driver.findElement(ConfirmationDialog.getPopupMsg()).getText().contains(\"You are changing % progress for iSource status\")){\r\n\t\t\t\t\t\t\tfindElement(ConfirmationDialog.getDialogYesBtn()).click();\r\n\t\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\t}else\r\n\t\t\t\t\t\t\tlogger.log(LogStatus.INFO, \"Incorrect Confirmation Dialog message displayed\");\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t\tlogger.log(LogStatus.INFO, \"Confirmation Dialog not displayed\");\r\n\t\t\t\t}\r\n\t\t\t}else\r\n\t\t\t\tlogger.log(LogStatus.INFO, \"Edit button not working\");\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "protected abstract boolean isConfirmEnabled();", "private boolean doGetConfirmPassword() {\n\t\tcurrentStep = OPERATION_NAME+\": getting confirm password\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(PROMPT_FOR_CONFIRM_PASSWORD)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tconfirmPassword = _atmssHandler.doKPGetPasswd(TIME_LIMIT);\n\t\tif (confirmPassword == null) {\n\t\t\trecord(\"KP\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_KEYPAD)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t} else if (confirmPassword.equals(KP_CANCEL)) {\n\t\t\trecord(\"USER\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_USER_CANCELLING)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t\trecord(\"confirm password typed\");\n\t\treturn true;\n\t}", "boolean checkYesNo (String choice){\r\n if (choice.equalsIgnoreCase(\"N\") || choice.equalsIgnoreCase(\"Y\")){\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "public void presetYesNo() {\n pollOptions.clear();\n pollOptions.add(\"Yes\");\n pollOptions.add(\"No\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }", "public static boolean isSure() {\n Scanner in = new Scanner(System.in);\n in = new Scanner(System.in);\n String danger = \"This action might result in a loss of data,\";\n danger += \" do you want to continue? (yes/no)\";\n System.out.println(danger);\n String answer = in.nextLine();\n if (answer.equals(\"no\")) {\n return false;\n }\n return true;\n }", "public void generateConfiramtionCode(){\n \n double tempNum;\n \n //generate random confirmation code (4 - digit)\n try{\n do{\n tempNum = Math.random();\n confirmationCode = (int) (tempNum*10000);\n System.out.println(\"Confirmation Code: \" + confirmationCode);\n }while(confirmationCode<1000);\n }catch(Exception e){}\n \n System.out.println(\"Confirmation Code: \" + confirmationCode);\n JOptionPane.showMessageDialog(null, \"Confirmation Code: \" + confirmationCode);\n }", "private boolean promptCommand() {}", "public void registerConfirm_Dear(WebDriver driver) {\n\t\tString ActualValue_RegConfDear = op.getText(driver, RegisterConfirmObj.textDearFnLn);\r\n\t\tString expectedValue_RegConfDear = \"Dear Sangam Y,\";\r\n\r\n\t\t// validation\r\n\t\tif(expectedValue_RegConfDear.equals(ActualValue_RegConfDear))\r\n\r\n\t\t\tSystem.out.println(\"Pass - Dear Sangam Y\");\r\n\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Fail - Dear Sangam Y\");\r\n\t}", "public static boolean yesNo(String prompt) throws Exception {\n if (scanner == null) {\n throw new Exception(\"Input Utility's scanner is not set\");\n }\n boolean response;\n\n // enter the string\n if (prompt != null) {\n System.out.print(prompt);\n }\n response = scanner.nextLine().toLowerCase().contains(\"y\");\n return response;\n }", "private static boolean checkYorNResponse() {\n logger.log(Level.INFO, \"Logging method checkYorNResponse() in Ui.\");\n String response;\n do {\n response = readUserInput();\n assert response != null : \"response should not be null\";\n switch (response.trim()) {\n case Y:\n response = Y;\n break;\n case N:\n response = N;\n break;\n default:\n logger.log(Level.INFO, \"User entered response other than 'y' or 'n'\");\n logger.log(Level.INFO, \"Re-prompting...\");\n printInvalidYorNResponse();\n }\n } while (!response.trim().equals(Y) && !response.trim().equals(N));\n assert (response.equals(Y) || response.equals(N)) : \"Response should be y/n\";\n return response.equals(Y);\n }", "public void setAutoConfirm(boolean autoConfirm) {\n this.autoConfirm = autoConfirm;\n }", "private static boolean getUserYesOrNo(SimpleReader in, SimpleWriter out) {\r\n String answer = in.nextLine();\r\n boolean answerIsYes = true;\r\n while (!answer.equalsIgnoreCase(\"y\") && !answer.equalsIgnoreCase(\"n\")) {\r\n out.print(\"Error: please enter 'y' or 'n' as a response: \");\r\n answer = in.nextLine();\r\n }\r\n if (answer.equalsIgnoreCase(\"n\")) {\r\n answerIsYes = false;\r\n }\r\n return answerIsYes;\r\n }", "private boolean askCustom(){\n String title = \"Custom mode?\";\n String message = \"Now the game mode is classical mode. \\nDo you wish to play custom pieces?\";\n ConfirmBox.display(title, message);\n return ConfirmBox.isConfirmed;\n }", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "public void payedConfirmation(){\n\t\tassert reserved: \"a seat also needs to be reserved when bought\";\n\t\tassert customerId != -1: \"this seat needs to have a valid user id\";\n\t\tpayed = true;\n\t}", "public static boolean continueOrdering(){\n // Create a Scanner object\n Scanner input = new Scanner(System.in);\n\n boolean Continue = false;\n int x = 0;\n //Ask user if they would like to order\n do {\n System.out.print(\"\\nWould you like to order more (y or n): \");\n\n String answer = input.nextLine();\n switch (answer) {\n case \"Y\":\n case \"y\":\n case \"Yes\":\n case \"yes\":\n Continue = true;\n x=0;\n break;\n case \"N\":\n case \"n\":\n case \"No\":\n case \"no\":\n Continue = false;\n x=0;\n break;\n default:\n System.out.println(\"invalid choice\");\n x++;\n break;\n }\n } while (x>0);\n return Continue;\n }", "public static boolean yesOrno(){\n boolean result;\n Scanner input = new Scanner(System.in);\n do {\n String choice = input.next();\n if (choice.equals(\"y\")) {\n result = true;\n break;\n } else if (choice.equals(\"n\")) {\n result = false;\n break;\n } else {\n System.out.println(\"Wrong Input please enter y or n !\");\n }\n } while (true);\n\n return result;\n\n }", "public void ClickYes()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Yes\")).click();\n\t}", "@OnClick(R.id.buttonConfirmSymptoms)\n public void buttonConfirmSymptoms() {\n if (sharedPreferences.getInt(\"symptomCounter\", 0) == 0) {\n Toast.makeText(ExaminationActivity.this, getString(R.string.not_enough), Toast.LENGTH_SHORT).show();\n } else {\n startActivity(new Intent(ExaminationActivity.this, DiagnoseActivity.class));\n finish();\n }\n }", "private void checkSave() {\n if (config.needsSave() || motes.needsSave()) {\n System.out.println(\"need save\");\n int save = JOptionPane.showConfirmDialog(frame, \"Do you want to save this configuration?\", \"Save Configuration\", JOptionPane.YES_NO_OPTION);\n if (save == JOptionPane.YES_OPTION) {\n saveConfiguration(DEFAULT_DB_CONFIG_TABLE);\n }\n }\n }", "public boolean yesNoQuestion(String message) {\n System.out.println(message + \" y/n\");\n String answer = scanner.nextLine();\n while (!(answer.equals(\"y\") || (answer.equals(\"n\")))) {\n System.out.println(\"Type 'y' or 'n'\");\n answer = scanner.nextLine();\n }\n return answer.equals(\"y\");\n }", "public static String yes() {\n\t\treturn \"allowusersetup yes\" + delimiter + \"allowusersetup yes \";\n\t}", "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 main(String[] args)\n {\n Scanner input2 = new Scanner(System.in);\n boolean cond = true;\n while (cond)\n {\n calculateTips();\n System.out.print(\"Another bill? (y/n)\\n\");\n String answer = input2.nextLine();\n \n if (new String(answer).equals(\"n\") || new String(answer).equals(\"N\"))\n {\n System.out.print(\"See ya later. \");\n cond = false;\n }\n else if (answer != \"y\" || answer != \"Y\")\n {\n } \n }\n }", "public void confirmPasswordRequest() {\n\t\tStreamObserver<BoolValue> responseObserver = new StreamObserver<BoolValue>() {\t//\tUsed for sending orreceiving stream messages\n\t\t\t\n\t\t\t//\tStreamObserver methods\n\t\t\tpublic void onNext(BoolValue boolValue) {\t//\tReceives value from stream\n\t\t\t\tif (boolValue.getValue()) {\n\t\t\t\t\tlogger.info(\"Entered password is correct\");\n\t\t\t\t} else {\n\t\t\t\t\tlogger.info(\"Entered password is incorrect\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpublic void onError(Throwable throwable) {\n\t\t\t\tlogger.info(throwable.getLocalizedMessage());\n\t\t\t}\n\n\t\t\tpublic void onCompleted() {\n\t\t\t\tlogger.info(\"Completed\");\n\t\t\t}\n\t\t};\n\n\t\t\tasyncPasswordStub.validate(ConfirmPasswordRequest.newBuilder()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .setPassword(password)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .setSalt(salt)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .setHashedPassword(hashedPassword)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .build(), responseObserver);\t\n\t}", "private void bidMenu() {\r\n String command;\r\n input = new Scanner(System.in);\r\n\r\n command = input.next();\r\n\r\n if (command.equals(\"N\")) {\r\n System.out.println(\"You are now returning to the main menu\");\r\n }\r\n if (command.equals(\"Y\")) {\r\n setBid();\r\n }\r\n }", "public static boolean newOrder(){\n // Create a Scanner object\n Scanner input = new Scanner(System.in);\n\n boolean Continue = false;\n int x = 0;\n //Ask user if they would like to order\n do {\n System.out.print(\"\\nWould you like to start a new order (y or n): \");\n\n String answer = input.nextLine();\n switch (answer) {\n case \"Y\":\n case \"y\":\n case \"Yes\":\n case \"yes\":\n Continue = true;\n x=0;\n break;\n case \"N\":\n case \"n\":\n case \"No\":\n case \"no\":\n Continue = false;\n x=0;\n break;\n default:\n System.out.println(\"invalid choice\");\n x++;\n break;\n }\n } while (x>0);\n return Continue;\n }", "@Test\n public void basicPromptConfirmHandlingAcceptTest(){\n\n WebElement promptButton = driver.findElement(By.id(\"promptexample\"));\n WebElement promptResult = driver.findElement(By.id(\"promptreturn\"));\n\n assertEquals(\"pret\", promptResult.getText());\n promptButton.click();\n String alertMessage = \"I prompt you\";\n Alert promptAlert = driver.switchTo().alert();\n\n // IE prompt now shows the correct message so no need for any caveat\n assertEquals(alertMessage,promptAlert.getText());\n promptAlert.accept();\n assertEquals(\"change me\", promptResult.getText());\n }", "private static void JGUI2() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "private static void JGUI4() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "@Test\n public void basicConfirmHandlingAcceptTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.accept();\n assertEquals(\"true\", confirmResult.getText());\n }", "private boolean confirmReplace() {\n\t\tString answer = \"\";\n\t\tint attempts = 3;\n\t\t// takes user input\n\t\t// if string is invalid it loops 3 times before exiting with the false\n\t\t// return\n\t\tdo {\n\t\t\tSystem.out.println(\"Files already exists.Do you want to replace it? y/n\");\n\t\t\tScanner in = new Scanner(System.in);\n\t\t\tanswer = in.nextLine();\n\t\t\tattempts--;\n\t\t} while (isValidEntry(answer) && attempts > 0);\n\t\t\n\t\tif (answer.charAt(0) == 'y')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }", "public void setOkToCancelQuestion(String string) {\r\n\t\t_okToCancelQuestion = string;\r\n\t}", "public boolean chooseArgs(String arg) {\n\t\tSystem.out.println(\"Do you want \" + arg + \"? (y/n)\");\n\t\tString s = Main.sc.next();\n\t\twhile (s.length() != 1 && !(s.contains(\"y\") || s.contains(\"n\"))) {\n\t\t\tMain.wrongEntry();\n\t\t\tSystem.out.print(\"Press 'y' for yes and 'n' for no >\");\n\t\t}\n\t\treturn (s.contains(\"y\"));\n\t}", "void acknowledgeConfiguration() {\n // First ensure that both players have their correct color\n Player player0 = game.getPlayers().get(0);\n Player player1 = game.getPlayers().get(1);\n player1.setStone(player0.getStone() == Stone.BLACK ? 2 : 1);\n\n leader.acknowledgeConfig();\n opponent.acknowledgeConfig();\n }", "private void confirmOptionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_confirmOptionsActionPerformed\n outputDir = outputDirText.getText();\n outputType = outputTypeGroup.getSelection().getActionCommand();\n outputMerge = outputMergeCheck.isSelected();\n options.setVisible(false);\n }", "protected boolean promptBoolean(String prompt) {\r\n\tSystem.out.print(prompt + \" ('y' or 'n'): \");\r\n\tchar userResponse = reader.nextLine().charAt(0);\r\n\r\n\twhile (userResponse != 'y' && userResponse != 'n') {\r\n\t System.out.print(\"Please enter a valid choice.\\n\" + prompt + \" ('y' or 'n'): \");\r\n\t userResponse = reader.nextLine().charAt(0);\r\n\t}\r\n\r\n\tif (userResponse == 'y') {\r\n\t return true;\r\n\t} else {\r\n\t return false;\r\n\t}\r\n }", "@Test\n public void basicConfirmHandlingDismissTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.dismiss();\n assertEquals(\"false\", confirmResult.getText());\n }", "public void confirmExit() {\n boolean confirmOnExit = getIntent().getExtras().getBoolean(MapsActivity.PARAMETERS.CONFIRM_ON_EXIT, true);\n if (confirmOnExit) {\n new AlertDialog.Builder(this).setTitle(R.string.button_confirm_exit_title)\n .setMessage(R.string.button_confirm_exit)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n finish();\n return;\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n }).show();\n } else {\n finish();\n }\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tSystem.out.println(\"Danton: Captain sir, I am to show you the ropes of this operation.\");\r\n\t\tThread.sleep(1000);\r\n\t\tSystem.out.println(\"Danton: Our target today is in an old resource depot near Tharsis highway.\");\r\n\t\tThread.sleep(1000);\r\n\t\tSystem.out.println(\"Danton: Do you have any questions about an operation, sir?\");\r\n\t\t\r\n\t\tString opAnswers[] = {\"What is an operation?\", \"What are the results of an operation?\", \"Nothing.\"};\r\n\t\t\r\n\t\tboolean answers = false;\r\n\t\t\r\n\t\tdo{\r\n\t\tString opResponses = (String) JOptionPane.showInputDialog(null, \"Questions?\", null, JOptionPane.QUESTION_MESSAGE,null, opAnswers, opAnswers[0]);\r\n\t\t\r\n\t\tif (opResponses == \"What is an operation?\"){\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Danton: An operation is a mission where you head down to the surface of the planet with a specific purpose in mind.\");\r\n\t\t\tanswers = false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (opResponses == \"What are the results of an operation?\") {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Danton: If you successfully complete the mission, the ship may get water, food, or raw materials. Cool items may also be found planetside\");\r\n\t\t\tSystem.out.println(\"Whether you fail or pass an operation, however, your ship's food, water, and fuel supply diminish.\");\r\n\t\t\tanswers = false;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (opResponses == \"Nothing.\")\r\n\t\t\r\n\t\t\tanswers = true;\r\n\t\t\r\n\t\t}while (answers == false);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Danton: Very well sir.\");\r\n\t\tSystem.out.println(\"Danton: Scanners indicate a hostile presence in the area. \");\r\n\t\tSystem.out.println(\"Danton: Don't worry about getting shot too much, our med bay should patch you up so long as you aren't dead.\");\r\n\t\tSystem.out.println(\"I'll head around, you hold guard.\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"The ensuing, somber silence is shaken by a sniper shot\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Raider: Let's see what you're made of!\");\r\n\t\t\r\n\t\tint enemyhealth = 30;\r\n\t\tint health = 100;\r\n\t\tboolean cantFlee = false;\r\n\t\t\r\n\t\tcombat.battle(health, enemyhealth,cantFlee);\r\n\t}", "public void actionPerformed(ActionEvent e) {\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Go Back?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\r\n if (m == 0)\r\n {\r\n frame.dispose();\r\n new init();\r\n }\r\n }", "private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}", "private boolean yesOrNo(String prompt) {\r\n\t\tString more = getToken(prompt + \" (Y|y)[es] or anything else for no\");\r\n\t\tif (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }", "protected void painelConfirmacaoSetup() {\n\t\tJPanel painelConfirmacao = new JPanel();\n\t\tpainelConfirmacao.setBounds(5, 322, 444, 44);\n\t\tcontentPanel.add(painelConfirmacao);\n\t\tpainelConfirmacao.setBackground(Color.WHITE);\n\t\tpainelConfirmacao.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\n\t\tJButton okButton = new JButton(\"Confirmar\");\n\t\tokButton.setForeground(SystemColor.activeCaptionText);\n\t\tokButton.setBackground(SystemColor.inactiveCaption);\n\t\tokButton.setFont(new Font(\"Dubai Light\", Font.PLAIN, 15));\n\t\tokButton.setFocusPainted(false);\n\t\tokButton.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (textFieldNome.getText().isBlank() || textFieldDescricao.getText().isBlank()) {\n\t\t\t\t\tJOptionPane.showMessageDialog( CriarPromocaoDialog.this, \"Todos os dados têm de ser preenchidos!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgravarPromocao();\n\t\t\t}\n\t\t});\n\t\tokButton.setActionCommand(\"OK\");\n\t\tpainelConfirmacao.add(okButton);\n\t\tgetRootPane().setDefaultButton(okButton);\n\n\n\t\tJButton cancelButton = new JButton(\"Cancelar\");\n\t\tcancelButton.setBackground(SystemColor.inactiveCaption);\n\t\tcancelButton.setFont(new Font(\"Dubai Light\", Font.PLAIN, 15));\n\t\tcancelButton.setFocusPainted(false);\n\t\tcancelButton.setActionCommand(\"Cancel\");\n\t\tpainelConfirmacao.add(cancelButton);\n\t\tcancelButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\n\t\t\t}\n\t\t});\n\t}", "public boolean promptUserWantsShutdown() {\r\n boolean result = true;\r\n\r\n if (isGUI()) {\r\n String msg = Messages.MainModel_4.toString();\r\n String title = Messages.MainModel_5.toString();\r\n int ans = JOptionPane.showConfirmDialog(null, msg, title,\r\n JOptionPane.OK_CANCEL_OPTION);\r\n\r\n if (ans == JOptionPane.CANCEL_OPTION) {\r\n result = false;\r\n }\r\n }\r\n\r\n return result;\r\n\r\n }", "private void exitWithoutSave()\n {\n String reply = \"\";\n Scanner console = new Scanner(System.in);\n \n do\n {\n boolean valid = false;\n while (!valid)\n {\n System.out.print(\"\\t\\tSo, you want to exit without saving your changes?(y/n) \");\n reply = console.nextLine().trim().toLowerCase();\n valid = validation.checkNoBlank(reply);\n }\n reply = reply.substring(0, 1);\n if (reply.equals(\"y\"))\n exitRegards();\n else\n if (reply.equals(\"n\"))\n return; \n else\n System.out.println(\"\\t\\tPlease enter your answer again (y/n) \");\n }while (!reply.equals(\"n\") && !reply.equals(\"y\")); \n }", "protected abstract InGameServerCommand getCommandOnConfirm();", "public static void crearConfirmacion(String titulo,String mensaje){\n Alert alert=new Alert(Alert.AlertType.CONFIRMATION);\n alert.setHeaderText(null);\n alert.setTitle(titulo);\n alert.setContentText(mensaje);\n alert.showAndWait();\n }", "void chooseOkOnNextConfirmFor(final ContentPattern aMessagePattern) {\n message = aMessagePattern;\n result = true;\n }", "protected boolean promptToDiscardChanges() {\n if (!boxChanged) {\n return false;\n }\n switch (JOptionPane.showConfirmDialog(this,\n bundle.getString(\"Do_you_want_to_discard_the_changes_to_\")\n + boxFile.getName() + \"?\",\n APP_NAME, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE)) {\n case JOptionPane.YES_OPTION:\n return true;\n default:\n return false;\n }\n }", "public void sendConfig() {\n Intent intent = new Intent(ConfigVotingActivity.this, VoteActivity.class);\n intent.putExtra(\"totalParticipants\", totalParticipants);\n intent.putExtra(\"topic\", topicName.getText());\n intent.putExtra(\"description\", editDescription.getText());\n intent.putExtra(\"date\", editDate.getText());\n startActivity(intent);\n }", "@Test\n public void basicPromptConfirmHandlingDismissTest(){\n\n WebElement promptButton = driver.findElement(By.id(\"promptexample\"));\n WebElement promptResult = driver.findElement(By.id(\"promptreturn\"));\n\n assertEquals(\"pret\", promptResult.getText());\n promptButton.click();\n\n String alertMessage = \"I prompt you\";\n Alert promptAlert = driver.switchTo().alert();\n\n // In IE the alert always used to return \"Script Prompt:\" and not the\n // actual prompt text but now it works fine\n assertEquals(alertMessage,promptAlert.getText());\n\n promptAlert.dismiss();\n assertEquals(\"pret\", promptResult.getText());\n }", "private boolean areYouSure(String text) {\n return JOptionPane.showConfirmDialog(null, text, \"Are you sure?\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;\n }", "public void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "public void actionPerformed( ActionEvent event )\n {\n if ( !getEnvironmentWindow().getEnvironment().getLock().equals(\n KalumetConsoleApplication.getApplication().getUserid() ) )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.locked\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if the user can do it\n if ( !getEnvironmentWindow().adminPermission && !getEnvironmentWindow().softwareUpdatePermission )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"action.restricted\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if some change has not yet been saved\n if ( parent.getEnvironmentWindow().isUpdated() )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.notsaved\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n final String configurationFileName = event.getActionCommand();\n // display confirm window\n KalumetConsoleApplication.getApplication().getDefaultWindow().getContent().add(\n new ConfirmWindow( new ActionListener()\n {\n public void actionPerformed( ActionEvent event )\n {\n // add a message into the log pane and the journal\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" update in progress ...\", parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" update requested.\" );\n // start the update thread\n final UpdateConfigurationFileThread updateThread = new UpdateConfigurationFileThread();\n updateThread.configurationFileName = configurationFileName;\n updateThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( updateThread.ended )\n {\n if ( updateThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n updateThread.message, parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add( updateThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" updated.\", parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" updated.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }\n } ) );\n }", "private boolean promptNewOrder(String productName) {\r\n System.out.println(\"It doesn't look like you've placed this order before. \"\r\n + \"Would you like to place a new order for - \" + productName + \"?\\n\"\r\n + \"ENTER \\\"YES\\\" to Place a New Order or \\\"NO\\\" to continue.\");\r\n boolean responseIsYes;\r\n try {\r\n responseIsYes = scan.next().equalsIgnoreCase(\"yes\");\r\n } \r\n //if the user does not type anything, default to \"Yes\"\r\n catch(java.util.NoSuchElementException e){\r\n responseIsYes = true;\r\n }\r\n if (responseIsYes) {\r\n System.out.println(\"Thank you! A new Order will be placed.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return true;\r\n }\r\n System.out.println(\"Thank you! This order has been cancelled.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return false;\r\n }", "private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tisAccepted = MainFrame.settings.UpdateParameters(\n\t\t\t\t\t\t\t\ttxtUsername.getText(), \n\t\t\t\t\t\t\t\ttxtPassword.getText(), \n\t\t\t\t\t\t\t\t((Integer) spnCheckInterval.getValue()).longValue(), \n\t\t\t\t\t\t\t\tchkEnableSound.isSelected(), \n\t\t\t\t\t\t\t\tchkScreen.isSelected());\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Dispose the box.\n\t\t\t\t\t\tComponent component = (Component) e.getSource();\n\t\t\t\t JDialog dialog = (JDialog) SwingUtilities.getRoot(component);\n\t\t\t\t dialog.dispose();\n\t\t\t\t\t}", "private boolean yesOrNo(String prompt) {\n String more = getToken(prompt + \" (Y|y)[es] or anything else for no: \");\n if (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\n return false;\n }\n return true;\n }", "private boolean yesOrNo(String prompt) {\n String more = getToken(prompt + \" (Y|y)[es] or anything else for no: \");\n if (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\n return false;\n }\n return true;\n }", "public void makeConfirmationDialog(View view) {\n new AlertDialog.Builder(this)\n .setTitle(\"Are you sure?\")\n .setCancelable(false)\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n startExperiment();\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n return;\n }\n }).show();\n }" ]
[ "0.62804425", "0.5844773", "0.5805603", "0.56642026", "0.56434757", "0.56045914", "0.5485112", "0.5465447", "0.54526806", "0.5407363", "0.5401416", "0.5401416", "0.53486246", "0.5323589", "0.53138864", "0.53050596", "0.53012836", "0.5281978", "0.5254402", "0.52360225", "0.521906", "0.51937497", "0.5189091", "0.5186672", "0.5180081", "0.5160064", "0.51252615", "0.51111805", "0.5099473", "0.5097163", "0.50947785", "0.50861114", "0.5084759", "0.5076871", "0.50763255", "0.5067593", "0.5061853", "0.50602114", "0.50270945", "0.50263983", "0.49934757", "0.49827385", "0.4971503", "0.49619278", "0.49578273", "0.49567342", "0.495347", "0.49479237", "0.49478638", "0.4946844", "0.49451965", "0.49413198", "0.49371305", "0.4916808", "0.49094048", "0.49038237", "0.4903812", "0.49034214", "0.48946306", "0.4891158", "0.4891017", "0.48787177", "0.48772207", "0.48720002", "0.48610517", "0.48602533", "0.485917", "0.48404625", "0.48376703", "0.48340636", "0.48337632", "0.4826939", "0.48260665", "0.48250404", "0.4817333", "0.48126334", "0.4809766", "0.4801325", "0.47959054", "0.47921994", "0.47891748", "0.47764173", "0.47721195", "0.4769769", "0.47696722", "0.47659695", "0.47659177", "0.47609377", "0.47579637", "0.47556642", "0.47549337", "0.4734106", "0.47335005", "0.47328597", "0.47311676", "0.47210068", "0.4719899", "0.47169706", "0.47169706", "0.47108525" ]
0.7300979
0
Executes the method given on the start of the application.
public void execute() { try { Method method = this.getClass().getMethod(parseMethod(), new Class[0]); method.invoke(this, new Object[0]); } catch (NoSuchMethodException | SecurityException e) { System.out.println("Unknown option: " + command); } catch (IllegalAccessException | IllegalArgumentException e) { System.out.println( "Invalid usage of: " + command + ", the following error " + "was given: " + e.getMessage()); } catch (InvocationTargetException e) { System.out.println("An error occurred while executing '" + command + "'. The " + "following error was given: " + e.getCause()); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startApp()\r\n\t{\n\t}", "public void startup(){}", "public abstract void startup();", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "@Override\n protected void appStart() {\n }", "public void doMyStartupStuff() {\n System.out.println(\"init method\");\n }", "public void startup() {\n\t\tstart();\n }", "@Override\n public void startup() {\n }", "public void intialRun() {\n }", "protected void start() {\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "public void start() {\n }", "public void doMyStartupStuff(){\r\n System.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n }", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "public void start() {}", "public void start() {}", "public void doMyStartupStuff() {\r\n\t\tSystem.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n\t}", "public void start() {\n\n }", "public void startup()\n\t{\n\t\t; // do nothing\n\t}", "public void start(){\n }", "public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}", "@Override\n public void run() {\n startup();\n }", "public void start() {\n\n\t}", "@Override\n\tpublic void onStart(ITestContext arg0) {\n\t\tSystem.out.println(\"when started\");\n\t}", "public void start()\n {\n }", "public void start()\n {}", "private void start() {\n\n\t}", "void start() {\n }", "void launch();", "void launch();", "void launch();", "public void startExecuting() {}", "void startup();", "void startup();", "public static void main(String[] args) {\n\t\tinitializeMethod();\n\n\t}", "@Override public void run(ApplicationArguments args) {\n }", "public static void main(String[] args) {\n startApplication();\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void starting();", "@Override public void start() {\n }", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "public abstract void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();", "public abstract void start();", "@Override\r\n public void start() {\r\n }", "@Override\n public void start() { }", "public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "public void start() {\n System.out.println(\"start\");\n }", "private void doBeforeInvokeApplication(final PhaseEvent arg0) {\n\t}", "@Override\n public void run(ApplicationArguments args) {\n }", "@Override\n public void start() {}", "public void initialize() {\n\n getStartUp();\n }", "public void onStartImpl() {\n }", "@Override\n public void start() {\n }", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void onStart(ITestContext arg0) {\n\t\t\r\n\t}", "public void onStart(ITestContext arg0) {\n\t\t\r\n\t}", "void launchApp();", "public void onStart(ITestContext arg0) {\n\t\t\n\t}", "public void onStart(ITestContext arg0) {\n\t\t\n\t}", "public void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }", "public void onStart(ITestContext arg0) {\n\n\t}", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void startExecuting()\n {\n super.startExecuting();\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\r\n\tpublic void onStart(ITestContext arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onStart(ITestContext arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void start() {\n\n\t}", "protected abstract void preRun();", "public void start(){\n\t\tsuper.start();\n\t}", "public void start() {\n\r\n }", "public final void begin() {\n Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {\n public void uncaughtException(Thread t, Throwable e) {\n\t\t\t\t/*\n\t\t\t\t * Thread interruptions will always throw a thread death exception, and since thread.stop()\n\t\t\t\t * is called from another thread, this default exception handler always receives the throwable, even if thread.stop is surrounded\n\t\t\t\t * by a try-catch.\n\t\t\t\t * TLDR; dont print em...\n\t\t\t\t */\n if (e instanceof ThreadDeath) return;\n log(Level.SEVERE, e.getClass().getSimpleName() + \" caught in thread \" + t.getName() + \": \" + e.getMessage());\n for (StackTraceElement ste : e.getStackTrace()) {\n log(Level.SEVERE, ste.toString());\n }\n }\n });\n\t\t/*\n\t\t * Load the random event pool\n\t\t */\n if (!(this instanceof RandomEvent)) {\n context.randomEvents = new RandomEventPool(context);\n }\n\t\t\n\t\t/*\n\t\t * Check if the script wants to execute\n\t\t */\n boolean initialized = false;\n try {\n initialized = init();\n } catch (Exception exc) {\n //ignore it\n }\n if (!initialized) {\n log(Level.WARNING, \"Script \" + manifest.name() + \" refused to start.\");\n context.getBot().popScript();\n }\n }", "public void runtimeCallback(final x10.core.Rail<java.lang.String> args) {\n // call the original app-main method\n Launcher.main(args);\n }", "static void startJavaTrainer() {\n initializeMap();\n promptUser();\n startProgram();\n }", "public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}" ]
[ "0.74790853", "0.71737224", "0.69920623", "0.69652396", "0.69169116", "0.6911977", "0.6880269", "0.6822395", "0.6722022", "0.6639705", "0.6637964", "0.6630313", "0.66291916", "0.661124", "0.661124", "0.661124", "0.6595169", "0.6595169", "0.6591677", "0.65806174", "0.6569034", "0.65487087", "0.6531034", "0.6529423", "0.6483844", "0.6474187", "0.6471206", "0.64562947", "0.6452328", "0.6436637", "0.6371323", "0.6371323", "0.6371323", "0.63534397", "0.6333861", "0.6333861", "0.6333693", "0.63330376", "0.63167745", "0.6302061", "0.6302061", "0.62699515", "0.6260103", "0.6234033", "0.6234033", "0.6229484", "0.6229484", "0.6229484", "0.6229484", "0.6229484", "0.62285274", "0.62254", "0.6215433", "0.6210752", "0.6210752", "0.6210752", "0.6210752", "0.6210752", "0.6210752", "0.6210752", "0.6205903", "0.6204198", "0.6193974", "0.61911637", "0.6188294", "0.61867094", "0.6183615", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6183343", "0.6173073", "0.6173073", "0.6172306", "0.6171332", "0.6171332", "0.6167366", "0.61624074", "0.61525416", "0.61494595", "0.6146908", "0.6146908", "0.6146908", "0.61417246", "0.61417246", "0.6140665", "0.61257726", "0.6094304", "0.60938716", "0.6093305", "0.60839224", "0.60819596", "0.60783285" ]
0.0
-1
Prints the most important config settings so that the user can verify if they are correct or not. Prints: os, alphabetFile, resetMethod, dumpFileExtension.
public void printConfig() { Property props = Property.getInstance(); System.out.println("You are using the following settings. If this is correct, " + "you do not have to do anything. If they are not correct, please alter " + "your config files."); String[] importantSettings = new String[] { "apkname", "alphabetFile", "learningAlgorithm", "EquivMethod","deviceName" }; for (int i = 0; i < importantSettings.length; i++) { System.out.printf("%-25s%s%n", importantSettings[i], " = " + props.get(importantSettings[i])); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printConfig();", "public void printSettings() {\n Logger.println(\"\\n---------- Simulated Annealing Settings ----------\");\n Logger.println(\" Max Iteration = \" + MAX_ITERATION);\n Logger.println(\" Denominator = \" + denominatorString());\n Logger.println(\" Initial Solution = \" + initialSolutionString());\n Logger.println(\"--------------------------------------------------\\n\");\n }", "public void printSettingsContents() {\n String fileName = \"collect.settings\";\n try {\n ClassLoader classLoader = getClass().getClassLoader();\n FileInputStream fin = new FileInputStream(\n classLoader.getResource(fileName).getFile());\n ObjectInputStream ois = new ObjectInputStream(fin);\n Map<?, ?> user_entries = (Map<?, ?>) ois.readObject();\n for (Map.Entry<?, ?> entry : user_entries.entrySet()) {\n Object v = entry.getValue();\n Object key = entry.getKey();\n System.out.println(\"user.\" + key.toString() + \"=\" + v.toString());\n }\n Map<?, ?> admin_entries = (Map<?, ?>) ois.readObject();\n for (Map.Entry<?, ?> entry : admin_entries.entrySet()) {\n Object v = entry.getValue();\n Object key = entry.getKey();\n System.out.println(\"admin.\" + key.toString() + \"=\" + v.toString());\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "static void printGeneralOptions(){\n System.out.println(GeneralInfo.PREFIX_COMMAND_DESCRIPTION + \"NameWeapon/Powerup: read the description of that weapon/powerup\");\n }", "public static void printSeLionConfigValues() {\n SeLionLogger.getLogger().entering();\n StringBuilder builder = new StringBuilder(\"SeLion configuration: {\");\n boolean isFirst = true;\n for (ConfigProperty configProperty : ConfigProperty.values()) {\n if (!isFirst) {\n builder.append(\", \");\n }\n builder.append(String.format(\"(%s: %s)\", configProperty,\n Config.getConfig().getString(configProperty.getName())));\n isFirst = false;\n }\n builder.append(\"}\\n\");\n SeLionLogger.getLogger().info(builder.toString());\n SeLionLogger.getLogger().exiting();\n }", "private static void printRunOptions(){\n\t\tSystem.out.println(\"Run options:\");\n\t\tSystem.out.println(\" -simple <configFile> <pathToApplication> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -simpleSpeedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -sweep <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -sweepRemote <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)> <hostAddress> <hostPort>\");\n\t\tSystem.out.println(\" -synthesize <configFile> <pathToApplication> <methodName> <scheduleCDFG(true/false)>\");\n\t\tSystem.out.println(\" -test <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -speedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -testCGRAVerilog <configFile> <pathToApplication>\");\n\t}", "protected void printValConfig(){\n\t\t//System.out.println(\"writing values\");\n\t\tif(valueFxn.compareToIgnoreCase(\"additive\")==0){\n\t\t\tprintAdditive();\n\n\t\t}else if(valueFxn.compareToIgnoreCase(\"schedule\")==0){\n\t\t\tprintSchedule();\n\n\n\t\t}else if(valueFxn.compareToIgnoreCase(\"contract\")==0){\n\t\t\tprintContracts();\n\n\t\t}else{\n\t\t\tSystem.out.println(\"Value function not set correctly.\");\n\t\t}\n\t}", "protected static void dumpConfig() {\n try {\n logger.info( Configuration.CN_WKBOTANICA_API_CONTEXT_PATH + getContextPath());\n logger.info( Configuration.CN_DNS + \" \" + Configuration.CN_DNS_ADD_LOCALS + shouldAddLocalDns());\n logger.info( Configuration.CN_HTTP + \" \" + Configuration.CN_HTTP_PORT + getHttpPort());\n logger.info( Configuration.CN_FLICKR_API_KEY + \" \" + getFlickrApiKey());\n logger.info( Configuration.CN_FLICKR_USER_ID + \" \" + getFlickrUserId());\n logger.info( Configuration.CN_FLICKR_PHOTOSET_ID + \" \" + getFickrPhotosetId());\n }\n catch (Exception e) {\n logger.info(\"GRAVE:\" + e.getMessage());\n }\n }", "public void printComputerSummary() {\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\tSystem.out.println(comp.getDescription());\n\t\t}\n\t}", "public String dumpConfig() \n\t\t\tthrows PermissionDeniedException, FileNotFoundException;", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "private void printOptionsMessage() {\n System.out.println(\"\\n\");\n System.out.print(\"Visible arrays: \");\n if (showArray == true) {\n System.out.println(\"On\");\n } else {\n System.out.println(\"Off\");\n }\n\n System.out.println(\"Selected Algorithms: \");\n if (selected[0] == true) {\n System.out.print(\" MergeSort\");\n }\n if (selected[1] == true) {\n System.out.print(\" QuickSort\");\n }\n if (selected[2] == true) {\n System.out.print(\" HeapSort\");\n }\n\n System.out.println();\n }", "private void outputConfig() {\n //output config info to the user\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Input configuration: {0} items, {1} transactions, \", new Object[]{numItems, numTransactions});\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"minsup = {0}%\", minSup);\n }", "public void printOptions() {\n\t\t\n\t}", "protected void printStateFiles(){\n\t\tprintServerConfig();\n\t\tprintValConfig();\n\n\t\t//case where simultaneous sequential auctions are being run\n\t\tif(maxSeq>1 && maxSim>1){\n\t\t\t printSeqSimConfig();\n\t\t\t for(int i = 0; i<(maxSeq*maxSim); i++){\n\t\t\t\t\tif(i<maxSeq){\n\t\t\t\t\t\t//System.out.println(\"SeqNum \"+i);\n\t\t\t\t\t\tprintSimConfig(i);\n\t\t\t\t\t}\n\t\t\t\t\tprintSubAuction(i);\n\t\t\t\t}\n\t\t//case where sequential auctions are being run\n\t\t }else if(maxSeq>1){\n\t\t\t printSeqConfig(0);\n\t\t\t for(int i = 0; i<maxSeq; i++){\n\t\t\t\t\tprintSubAuction(i);\n\t\t\t}\n\t\t//case where simultaneous auctions are being run\n\t\t }else if(maxSim>1){\n\t\t\t printSimConfig(0);\n\t\t\t for(int i = 0; i<maxSim; i++){\n\t\t\t\t\tprintSubAuction(i);\n\t\t\t}\n\t\t//case where a single auction is being run\n\t\t }else if(maxSeq==1 && maxSim==1){\n\t\t\t //printSimConfig(0);\n\t\t\t printSubAuction(0);\n\t\t }else{\n\t\t\t System.out.println(\"ERROR: no auctions\");\n\t\t }\n\n\t\tprintIP_Port();\n\n\t}", "private void ausgebenSystem() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Rechner: \" + InetAddress.getLocalHost().getHostName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println();\n\t\tString txt = System.getProperties().toString();\n\t\twhile (txt.indexOf(\",\") > 0) {\n\t\t\tSystem.out.println(txt.substring(0, txt.indexOf(\",\") + 1));\n\t\t\ttxt = txt.substring(txt.indexOf(\",\") + 2);\n\n\t\t}\n\t\tSystem.out.println(txt);\n\t}", "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "private static void printConfigOnce() {\r\n \r\n if (printedConfigLocation) {\r\n return;\r\n }\r\n\r\n printedConfigLocation = true;\r\n\r\n boolean displayMessageString = GrouperConfig.retrieveConfig().propertyValueBoolean(\"configuration.display.startup.message\", true);\r\n \r\n String grouperStartup = \"Grouper starting up: \" + versionTimestamp();\r\n if (!displayMessageString) {\r\n //just log this to make sure we can\r\n try {\r\n LOG.warn(grouperStartup);\r\n } catch (RuntimeException re) {\r\n //this is bad, print to stderr rightaway (though might dupe)\r\n System.err.println(GrouperUtil.LOG_ERROR);\r\n re.printStackTrace();\r\n throw new RuntimeException(GrouperUtil.LOG_ERROR, re);\r\n }\r\n \r\n return;\r\n }\r\n\r\n StringBuilder resultString = new StringBuilder();\r\n resultString.append(grouperStartup + \"\\n\");\r\n \r\n String propertiesFileLocation = GrouperUtil.getLocationFromResourceName(\"grouper.properties\");\r\n if (propertiesFileLocation == null) {\r\n propertiesFileLocation = \"not found\";\r\n }\r\n resultString.append(\"grouper.properties read from: \" + propertiesFileLocation + \"\\n\");\r\n\r\n if (GrouperConfig.retrieveConfig().propertyValueBoolean(\"grouper.api.readonly\", false)) {\r\n resultString.append(\"grouper.api.readonly: true\\n\");\r\n }\r\n \r\n resultString.append(\"Grouper current directory is: \" + new File(\"\").getAbsolutePath() + \"\\n\");\r\n \r\n resultString.append(GrouperUtil.logDirPrint());\r\n String hibPropertiesFileLocation = GrouperUtil.getLocationFromResourceName(\"grouper.hibernate.properties\");\r\n if (hibPropertiesFileLocation == null) {\r\n hibPropertiesFileLocation = \" [cant find grouper.hibernate.properties]\";\r\n }\r\n resultString.append(\"grouper.hibernate.properties: \" + hibPropertiesFileLocation + \"\\n\");\r\n \r\n String url = StringUtils.trim(GrouperHibernateConfig.retrieveConfig().propertyValueString(\"hibernate.connection.url\"));\r\n String user = StringUtils.trim(GrouperHibernateConfig.retrieveConfig().propertyValueString(\"hibernate.connection.username\"));\r\n resultString.append(\"grouper.hibernate.properties: \" + user + \"@\" + url + \"\\n\");\r\n System.out.println(resultString);\r\n try {\r\n if (!GrouperUtil.isPrintGrouperLogsToConsole()) {\r\n LOG.warn(resultString);\r\n } else {\r\n //print something to log to make sure we can\r\n LOG.warn(grouperStartup);\r\n }\r\n } catch (RuntimeException re) {\r\n //this is bad, print to stderr rightaway (though might dupe)\r\n System.err.println(GrouperUtil.LOG_ERROR);\r\n re.printStackTrace();\r\n throw new RuntimeException(GrouperUtil.LOG_ERROR, re);\r\n }\r\n }", "private static void printConfig(Properties prop) {\n prop.keySet().forEach(x -> System.out.println(x));\n prop.forEach((key, value) -> System.out.println(\"Key : \" + key + \", Value : \" + value));\n }", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "public static void printValues(){\n\t\tSet s = config.entrySet();\n\t\tIterator si = s.iterator();\n\t\tMap.Entry me;\n\t\twhile(si.hasNext()){\n\t\t\tme = ((Map.Entry) (si.next()));\n\t\t\tSystem.out.println(me.getKey() + \" \" + me.getValue());\n\t\t}\n\n\t}", "private void showPreferenceSettings() {\n \tfor(PrefKeysE k: PrefKeysE.values()) {\n \t\tString key = k.getKey();\n \t\tboolean isFound = Tt.isPreferencePresent(key);\n \t\tint prtFlags = 0; //don't print from getPreference()\n// \t\tboolean valB;\n// \t\tint valI;\n// \t\tdouble valD;\n \t\tString valFoundStr = \"\";\n \t\tString prefix = String.format(\"%-40s: %-7s: found? %s, default \", key, k.getType().name(), (isFound ? \"Y\" : \"N\"));\n \t\tswitch(k.getType()) {\n \t\tcase BOOLEAN:\n \t\t\tboolean dfltB = k.getDefaultBoolean();\n \t\t\tvalFoundStr += dfltB;\n \t\t\tif(isFound) {\n \t\t\t\tboolean val = Tt.getPreference(k, dfltB, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase INT:\n \t\t\tint dfltI = k.getDefaultInt();\n \t\t\tvalFoundStr += dfltI;\n \t\t\tif(isFound) {\n \t\t\t\tint val = Tt.getPreference(k, dfltI, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase DOUBLE:\n \t\t\tdouble dfltD = k.getDefaultDouble();\n \t\t\tvalFoundStr = String.format(\"% 1.4f\", dfltD);\n \t\t\tif(isFound) {\n \t\t\t\tdouble val = Tt.getPreference(k, dfltD, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += String.format(\", current % 1.4f\", val);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase STRING:\n \t\t\tString dfltS = k.getDefaultString();\n\t\t\t\tvalFoundStr += \"'\" + dfltS + \"'\";\n \t\t\tif(isFound) {\n \t\t\t\tString val = Tt.getPreference(k, dfltS, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current '\" + val + \"'\";\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n\t\t\tP.println(prefix + valFoundStr);\n\n// \t\tif(k.getType().equals(PrefTypeE.BOOLEAN)) \n \t}\n }", "public void resetSettings()\n {\n PrintWriter writer;\n try\n {\n writer = new PrintWriter(new File(\"settings.txt\"));\n int[] r = {0,2,0,0};\n for(int x:r)\n writer.println(x);\n writer.close();\n }\n catch(IOException e)\n {}\n }", "private static void displayUsage() {\n System.out.println(\"\\n MEKeyTool argument combinations:\\n\\n\" +\n \" -help\\n\" +\n \" -import [-MEkeystore <filename>] \" +\n \"[-keystore <filename>]\\n\" +\n \" [-storepass <password>] -alias <key alias> \" +\n \"[-domain <domain>]\\n\" +\n \" -list [-MEkeystore <filename>]\\n\" +\n \" -delete [-MEkeystore <filename>]\\n\" +\n \" (-owner <owner name> | -number <key number>)\\n\" +\n \"\\n\" +\n \" The default for -MEkeystore is \\\"\" + \n System.getProperty(DEFAULT_MEKEYSTORE_PROPERTY, \"appdb/_main.ks\") +\n \"\\\".\\n\" +\n \" The default for -keystore is \\\"\" + \n System.getProperty(DEFAULT_KEYSTORE_PROPERTY, \"$HOME/.keystore\") + \n \"\\\".\\n\");\n }", "public void dump(PrintWriter pw) {\n pw.println(\" Settings:\");\n pw.print(\" \");\n pw.print(KEY_TOP_STATE_SETTLE_TIME);\n pw.print(\"=\");\n TimeUtils.formatDuration(this.TOP_STATE_SETTLE_TIME, pw);\n pw.println();\n pw.print(\" \");\n pw.print(KEY_FG_SERVICE_STATE_SETTLE_TIME);\n pw.print(\"=\");\n TimeUtils.formatDuration(this.FG_SERVICE_STATE_SETTLE_TIME, pw);\n pw.println();\n pw.print(\" \");\n pw.print(KEY_BG_STATE_SETTLE_TIME);\n pw.print(\"=\");\n TimeUtils.formatDuration(this.BG_STATE_SETTLE_TIME, pw);\n pw.println();\n }", "protected void printSeqSimConfig(){\n\t\t//Create the SeqSim file\n\t\t//File superAuctionFile = new File(System.getProperty(\"user.dir\")+\"/src/auctions/\n\t\t//\"+gameName+\"/Config_Sequential_of_Simultaneous.txt\");\n\t\tFile superAuctionFile = new File(\"src/auctions/Config_Sequential_of_Simultaneous.txt\");\n\n\t\t//if the file does not already exist, create it and write the file contents\n\t\tif(!superAuctionFile.exists()){\n\t\t\ttry{\n\t\t\t\tsuperAuctionFile.createNewFile();\n\t\t\t\tFileWriter fstreamsuper = new FileWriter(superAuctionFile);\n\t\t\t\tBufferedWriter outSuper = new BufferedWriter(fstreamsuper);\n\n//\t\t\t\toutSuper.write(\"Valuation:\"+valueFxn +\" Config_File:Config_Valuation\"+valueFxn+\".txt\");\n//\t\t\t\tif(valueFxn.compareToIgnoreCase(\"contracts\")==0){\n//\t\t\t\t\toutSuper.write(\" Contracts_Per_Client:\"+numContracts);\n//\t\t\t\t}\n//\t\t\t\toutSuper.newLine();\n\n\t\t\t\t//print a line for each sequential auction\n\t\t\t\tfor(int i=0;i<maxSeq;i++){\n\t\t\t\t\toutSuper.write(\"Auction_Type:SimultaneousAuction\");\n\t\t\t\t\toutSuper.write(\" Config_File:Config_SimultaneousAuction_\"+i+\".txt\");\n\t\t\t\t\toutSuper.newLine();\n\t\t\t\t}\n\n\t\t\t\toutSuper.close();\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.out.println(\"File error creating Sequential Simultaneous Config.\");\n\t\t\t}\n\n\t\t}\n\n\t}", "protected String readSettings() {\n String output = \"\";\n for (String setting: settings.keySet()) {\n String value = settings.get(setting);\n output += setting + \":\" + value + \"\\n\";\n }\n return output;\n }", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "public void print() {\n \n for (int i=0 ; i< getNumberOfCases() ; i++) {\n Configuration conf = get(i);\n conf.print();\n System.out.print(\"\\n\");\n }\n}", "private void showUserSettings() {\n\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t}", "private static void saveSettings() {\n try {\n File settings = new File(\"settings.txt\");\n FileWriter writer = new FileWriter(settings);\n //Options\n writer.append(defaultSliderPosition + \"\\n\");\n writer.append(isVerticalSplitterPane + \"\\n\");\n writer.append(verboseCompiling + \"\\n\");\n writer.append(warningsEnabled + \"\\n\");\n writer.append(clearOnMethod + \"\\n\");\n writer.append(compileOptions + \"\\n\");\n writer.append(runOptions + \"\\n\");\n //Colors\n for(int i = 0; i < colorScheme.length; i++) \n writer.append(colorScheme[i].getRGB() + \"\\n\");\n writer.append(theme + \"\\n\");\n\n writer.close(); \n } catch (IOException i) {\n println(\"IO exception when saving settings.\", progErr);\n }\n }", "public static void prtProperties() {\n prop.list(System.out);\n }", "public void printAnc() {\n\tSystem.out.println(\"numOfControl: \" + numOfControl);\n\tfor (int ii = 0; ii < numOfControl; ii++ ) {\n\t paramFile[ii].printDevice();\n\t paramFile[ii].printUserParameters();\n\t paramFile[ii].printInstParameters();\n\t}\n }", "private void printHelp() {\r\n\t\tSystem.out.println(\"Flag Param Details\");\r\n\t\tSystem.out.println(\" -f **x** Add a filter. 'x' is the board letter.\");\r\n\t\tSystem.out.println(\" Can have 0 or more stars before and after the board letter.\");\r\n\t\tSystem.out.println(\" -h Print this message.\");\r\n\t\tSystem.out.println(\" -q Quit interactive session.\");\r\n\t\tSystem.out.println(\" -n xx Display xx number of words.\");\r\n\t\tSystem.out.println(\" -n all Display all words.\");\r\n\t\tSystem.out.println(\" -r Repeat last search.\");\r\n\t\tSystem.out.println(\" -s len Words are sorted by length.\");\r\n\t\tSystem.out.println(\" -s alpha Words are sorted alphapetically.\");\r\n\t\t// System.out.println(\"\");\r\n\t}", "public void print() \n\t{\n\t\tSystem.out.println(\"existing files:\\n\");\n\t\tIterator<Entry<String, byte[]>> existing = this.existingFile.entrySet().iterator();\n\t\twhile (existing.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = existing.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\\nprefix files:\\n\");\n\t\tIterator<Entry<String, byte[]>> prefix = this.prefix.entrySet().iterator();\n\t\twhile (prefix.hasNext()) \n\t\t{\n\t\t\tEntry<String, byte[]> entry = prefix.next();\n\t\t\tString key = entry.getKey();\n\t\t\tbyte[] macValue = entry.getValue();\n\t\t\tSystem.out.println(key + \" - \" + bytes2HexString(macValue));\n\t\t}\n\t}", "private void showUserSettings() {\n\t\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t\t}", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void printInfo() {\n\t\tSystem.out.println(\"User: \" + userName);\n\t\tSystem.out.println(\"Login: \" + loginName);\n\t\tSystem.out.println(\"Host: \" + hostName);\n\t}", "public void printUsage() {\n printUsage(System.out);\n }", "public void writeDefaultSettings(){\r\n try{\r\n File propFile;\r\n CodeSource codeSource = EMSimulationSettingsView.class.getProtectionDomain().getCodeSource();\r\n File jarFile = new File(codeSource.getLocation().toURI().getPath());\r\n File jarDir = jarFile.getParentFile();\r\n propFile = new File(jarDir, \"default_EMSettings.txt\");\r\n\r\n // Does the file already exist \r\n if(!propFile.exists()){ \r\n try{ \r\n // Try creating the file \r\n propFile.createNewFile(); \r\n }\r\n catch(IOException ioe) { \r\n ioe.printStackTrace(); \r\n } \r\n }\r\n try{\r\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(propFile)));\r\n out.println(\"Minim Method\\t\"+jComboBox1.getSelectedIndex()); \r\n\r\n if(jTextField1.getText().equals(\"\")){\r\n out.println(\"Step Size\\t0\");\r\n }\r\n else{\r\n out.println(\"Step Size\\t\"+jTextField1.getText().trim());\r\n }\r\n\r\n if(jTextField2.getText().equals(\"\")){\r\n out.println(\"Numsteps\\t0\");\r\n }\r\n else{\r\n out.println(\"Numsteps\\t\"+jTextField2.getText().trim());\r\n }\r\n\r\n if(jTextField3.getText().equals(\"\")){\r\n out.println(\"Convergence\\t0\");\r\n }\r\n else{\r\n out.println(\"Convergence\\t\"+jTextField3.getText().trim());\r\n }\r\n\r\n if(jTextField4.getText().equals(\"\")){\r\n out.println(\"Interval\\t0\");\r\n }\r\n else{\r\n out.println(\"Interval\\t\"+jTextField4.getText().trim());\r\n } \r\n out.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Exception caught writting settings\");\r\n e.printStackTrace();\r\n }\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Exception caught writting settings\");\r\n e.printStackTrace();\r\n }\r\n \r\n }", "protected void printServerConfig(){\n\t\t/*String filePrefix = System.getProperty(\"user.dir\")+\"/src/server/\"+gameName;\n\t\tFile gameFolderServ = new File(filePrefix);\n\t\tString filePrefix2 = System.getProperty(\"user.dir\")+\"/src/auctions/\"+gameName;\n\t\tFile gameFolderAuct = new File(filePrefix2);\n\n\t\tFile server_config = new File(filePrefix+\"/Config_AuctionServer.txt\");\n\t\t*/\n\t\tFile server_config = new File(\"src/server/\"+\"Config_AuctionServer.txt\");\n\t\tif(!server_config.exists()){\n\n\t\t\t try{\n\n\t\t\t\t //gameFolderServ.mkdir();\n\t\t\t\t // gameFolderAuct.mkdir();\n\t\t\t\t server_config.createNewFile();\n\t\t\t\t FileWriter fstream = new FileWriter(server_config);\n\t\t\t\t BufferedWriter out = new BufferedWriter(fstream);\n\t\t\t\t if(localIP){\n\t\t\t\t\t out.write(\"Host_IP:local\\n\");\n\t\t\t\t }else{\n\t\t\t\t\t out.write(\"Host_IP:public\\n\");\n\t\t\t\t }\n\n\t\t\t\t out.write(\"Port_Number:\"+port+\"\\n\");\n\t\t\t\t //out.newLine();\n\n\t\t\t\t out.write(\"Min_Number_Clients:\"+minClients+\"\\n\");\n\t\t\t\t out.write(\"Max_Number_Clients:\"+maxClients+\"\\n\");\n\t\t\t\t out.write(\"Max_Wait_For_Clients:\"+maxWait+\"\\n\");\n\t\t\t\t out.write(\"Response_Time:\"+responseTime);\n\t\t\t\t out.newLine();\n\t\t\t\t if(respTime){\n\t\t\t\t\t out.write(\"Full_Response_Time:true\");\n\t\t\t\t }else{\n\t\t\t\t\t out.write(\"Full_Response_Time:false\");\n\t\t\t\t }\n\t\t\t\t out.newLine();\n\t\t\t\t out.write(\"Server_Log_File:Log_AuctionServer.txt\");\n\t\t\t\t out.newLine();\n\t\t\t\t out.write(\"Server_Results_File:Results_AuctionServer.txt\");\n\t\t\t\t out.newLine();\n\n\t\t\t\t if(maxSeq>1 && maxSim>1){\n\t\t\t\t\t out.write(\"Auction_Type:SequentialAuction\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t\t out.write(\"Auction_Config_File:Config_Sequential_of_Simultaneous.txt\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t }else if(maxSeq>1){\n\t\t\t\t\t out.write(\"Auction_Type:SequentialAuction\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t\t out.write(\"Auction_Config_File:Config_SequentialAuction_0.txt\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t }else if(maxSim>1){\n\t\t\t\t\t out.write(\"Auction_Type:SimultaneousAuction\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t\t out.write(\"Auction_Config_File:Config_SimultaneousAuction_0.txt\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t }else if(maxSeq==1 && maxSim==1){\n\t\t\t\t\t out.write(\"Auction_Type:\"+getAuctionName(auctionsSchedule[0])+\"\\n\");\n\t\t\t\t\t out.write(\"Auction_Config_File:Config_\"+getAuctionName(auctionsSchedule[0])+\"_0_0.txt\");\n\t\t\t\t\t out.newLine();\n\t\t\t\t }else{\n\t\t\t\t\t System.out.println(\"ERROR: no auctions\");\n\t\t\t\t }\n\n\t\t\t\t out.write(\"Valuation_Type:\"+valueFxn);\n\t\t\t\t out.newLine();\n\t\t\t\t out.write(\"Valuation_Config_File:Config_Valuation\"+valueFxn+\".txt\");\n\n\t\t\t\t out.close();\n\n\t\t\t }catch (IOException e){\n\t\t\t\t\tSystem.out.println(\"file error creating Server Config.\");\n\t\t\t}\n\t\t}\n\t}", "private void doPrint(final PrintStream out) {\n\t\tdoPrintLine(out);\n\t\tprintComponent(out, \"modules\", \"components\", \"plugins\");\n\t\tdoPrintLine(out);\n\t\tprintComponents(out, \"boot\", bootConfig.getComponentConfigs());\n\t\tfor (final ModuleConfig moduleConfig : modules) {\n\t\t\tdoPrintLine(out);\n\t\t\tprintModule(out, moduleConfig);\n\t\t}\n\t\tdoPrintLine(out);\n\t}", "public void printUsage() {\n System.out.println(\"\\nHelp Invoked on \");\n System.out.println(\"[-hfs] \");\n System.out.println(\"\");\n\n System.out.println(\"Usage: \");\n System.out.println(\"-d [true|false]\");\n System.out.println(\"-f URL-file-pathame\");\n System.out.println(\"-h: invoke help\");\n System.out.println(\"-i: URL-list-input-source [ DEFAULT | USER | FILE ]\");\n System.out.println(\"-s URL-list-separator\");\n }", "private static void printHelp(){\r\n System.out.println(\"\\n\\n\\t\\t\\t ----HELP---\\n\\n\" +\r\n \"\\nYou can set the length of password like this \\n\" +\r\n \"\\t java -jar nipunpassgen.jar -l (where l is length of password) \\n\\n\" +\r\n \"\\nYou can also specifiy the which type of word your want to use like this-->\\n\" +\r\n \"\\t Type java -jar nipunpassgen.jar -l -tttt \\n \" +\r\n \"Here 1st t will set uselowercase true \\t 2nd t set useUppercase true\\n\" +\r\n \"\\t 3rd t set useDigit True \\t and 4th t set useSpecial Char true\\n\" +\r\n \"You can use 't' or 'T' for setting the true and 'f' or 'F' for setting the false\\n\" +\r\n \"You can pass -c flag at the end of command for directly copy the password in your\\n\" +\r\n \"clipboard without showing in console like this \\t java -jar nipunpassgen.jar -c \\t this will copy a\\n\" +\r\n \"random 8 digit password in your clipboard .\");\r\n }", "private static void printUsage() {\n System.err.println(\"\\n\\nUsage:\\n\\tAnalyzeRandomizedDB [-p] [-v] [--enzyme <enzymeName> [--mc <number_of_missed_cleavages>]] <original_DB> <randomized_DB>\");\n System.err.println(\"\\n\\tFlag significance:\\n\\t - p : print all redundant sequences\\n\\t - v : verbose output (application flow and basic statistics)\\n\");\n System.exit(1);\n }", "public void printDeviceConfig(Context context) {\r\n\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\r\n\t\ttry {\r\n\t\t\tstringBuilder.append(\"=============== Current Version ===============================\\n\");\r\n\t\t\tstringBuilder.append(\"1.1 Build (Released on 28-09-2011 12:23 PM)\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"=============== HEAP INFO ===============================\");\r\n\t\t\tstringBuilder.append(\"=============== HEAP INFO(S) ===============================\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\r\n\t\t\tActivityManager activityManager = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);\r\n\t\t\tMemoryInfo memoryInfo = new ActivityManager.MemoryInfo();\r\n\t\t\tactivityManager.getMemoryInfo(memoryInfo);\r\n\t\t\tSystem.err.println(\"Over All Memory: \" + (memoryInfo.availMem / 1024) + \" KB\");\r\n\t\t\tstringBuilder.append(\"Over All Memory: \" + (memoryInfo.availMem / 1024) + \" KB\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"low Memory: \" + memoryInfo.lowMemory);\r\n\t\t\tstringBuilder.append(\"low Memory: \" + memoryInfo.lowMemory);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"Threshold Memory: \" + (memoryInfo.threshold / 1024) + \" KB\");\r\n\t\t\tstringBuilder.append(\"Threshold Memory: \" + (memoryInfo.threshold / 1024) + \" KB\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\r\n\t\t\tSystem.err.println(\"=============== OS INFO ===============================\");\r\n\t\t\tstringBuilder.append(\"=============== OS INFO ===============================\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"Device MODEL: \" + android.os.Build.MODEL);\r\n\t\t\tstringBuilder.append(\"Device MODEL: \" + android.os.Build.MODEL);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"VERSION RELEASE: \" + android.os.Build.VERSION.RELEASE);\r\n\t\t\tstringBuilder.append(\"VERSION RELEASE: \" + android.os.Build.VERSION.RELEASE);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"VERSION SDK: \" + android.os.Build.VERSION.SDK);\r\n\t\t\tstringBuilder.append(\"VERSION SDK: \" + android.os.Build.VERSION.SDK);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\r\n\t\t\tSystem.err.println(\"=============== Device Information ===============================\");\r\n\t\t\tstringBuilder.append(\"=============== Device Information ===============================\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tDisplayMetrics dm = new DisplayMetrics();\r\n\t\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\r\n\t\t\tSystem.err.println(\"Device Resolution (WxH)= \" + dm.widthPixels + \" x \" + dm.heightPixels);\r\n\t\t\twidth = dm.widthPixels;\r\n\t\t\theight = dm.heightPixels;\r\n\t\t\tdensity = dm.densityDpi;\r\n\t\t\torientation = getResources().getConfiguration().orientation;\r\n\r\n\t\t\tstringBuilder.append(\"Device Resolution (WxH)= \" + dm.widthPixels + \" x \" + dm.heightPixels);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tSystem.err.println(\"Density DPI= \" + dm.densityDpi);\r\n\t\t\tstringBuilder.append(\"Density DPI= \" + dm.densityDpi);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\r\n\t\t} catch (Throwable e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tStringWriter stackTrace = new StringWriter();\r\n\t\t\te.printStackTrace(new PrintWriter(stackTrace));\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tstringBuilder.append(\"=============== Exception while Fetching Information ===============================\");\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t\tstringBuilder.append(stackTrace);\r\n\t\t\tstringBuilder.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\tappendLog(stringBuilder.toString());\r\n\r\n\t}", "public void showInfo() {\n\t\t\n\t\tsuper.showInfo();\n\t\tSystem.out.println(\"Your Checking Account features: \"\n\t\t\t\t+ \"\\nDebit Card Number: \" + debitCardNumber\n\t\t\t\t+ \"\\nDebit Card PIN: \" + debitCardPin\n\t\t\t\t+ \"\\n****************\"\n\t\t\t\t);\n\t\t\n\t}", "public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public void showInfo() {\n\t\tsuper.showInfo();\n\t\tSystem.out.println(\n\t\t\t\t\" Your Savings Account Features: \" +\n\t\t\t\t\"\\n debitCardNumber: \" + debitCardNumber + \n\t\t\t\t\"\\n debitCardPIN: \" + debitCardPIN);\n\t}", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "protected void printSimConfig(int seqNum){\n\t\t/*File superAuctionFile = new File(System.getProperty(\"user.dir\")+\n\t\t\t\t\"/src/auctions/\"+gameName+\"/Config_SimultaneousAuction_\"+seqNum+\".txt\");*/\n\t\tFile superAuctionFile = new File(\"src/auctions/Config_SimultaneousAuction_\"+seqNum+\".txt\");\n\t\tif(!superAuctionFile.exists()){\n\t\t\ttry{\n\t\t\t\tsuperAuctionFile.createNewFile();\n\t\t\t\tFileWriter fstreamsuper = new FileWriter(superAuctionFile);\n\t\t\t\tBufferedWriter outSuper = new BufferedWriter(fstreamsuper);\n\n//\t\t\t\toutSuper.write(\"Valuation:\"+valueFxn +\" Config_File:Config_Valuation\"+valueFxn+\".txt\");\n//\t\t\t\tif(valueFxn.compareToIgnoreCase(\"contracts\")==0){\n//\t\t\t\t\toutSuper.write(\" Contracts_Per_Client:\"+numContracts);\n//\t\t\t\t}\n//\t\t\t\toutSuper.newLine();\n\n\n\t\t\t\t//String auctName = \"\";\n\t\t\t\t//for(int j = (maxSim*maxSeq)-1; j>0;){\n\t\t\t\tfor(int j = maxSim; j>0; j--){\n\t\t\t\t\t/* METHOD CREATED\n\t\t\t\t\tswitch(auctionsSchedule[maxSeq*(j-1)+(seqNum)]){\n\t\t\t\t\t\tcase 1: auctName = \"FirstPriceAuction\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: auctName = \"SecondPriceAuction\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: auctName = \"AscendingAuction\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4: auctName = \"DescendingAuction\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}*/\n\t\t\t\t\toutSuper.write(\"Auction_Type:\"+ getAuctionName(auctionsSchedule[maxSeq*(j-1)+(seqNum)]));\n\t\t\t\t\toutSuper.write(\" Config_File:Config_\"+\n\t\t\t\t\t\t\tgetAuctionName(auctionsSchedule[maxSeq*(j-1)+(seqNum)])+\"_\"+seqNum+\"_\"+((maxSeq*(j-1)+(seqNum))/maxSeq)+\".txt\");\n\t\t\t\t\toutSuper.newLine();\n\n\n\n\t\t\t\t}\n\t\t\t\toutSuper.close();\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.out.println(\"File error creating Simultaneous Config.\");\n\t\t\t}\n\n\t\t}\n\n\t}", "private static void printHelp() {\n getConsole().println(\"Keycheck\\n\" +\n \"\\n\" +\n \"Usage:\\n\" +\n \" keycheck.jar parameter1 parameter2 ... file1 file2 ...\\n\" +\n \"Example:\\n\" +\n \" java -jar keycheck.jar -\" + PARAMETER_BASE + \" -\" + PARAMETER_BITS + \" file1.csv file2.csv\" +\n \"\\n\" +\n \"Parameters:\\n\" +\n \" -\" + PARAMETER_GENERATE + \" [512|1024] Generate \" + GENERATED_KEY_COUNT + \" keys\\n\" +\n \" -\" + PARAMETER_NEW_FORMAT + \" New format will be use to load keys from file\\n\" +\n \" -\" + PARAMETER_TRANSFORM + \" Transform all keys to new format to file 'CARD_ICSN.csv'\\n\" +\n \" -\" + PARAMETER_BASE + \" Check base stats of keys\\n\" +\n \" -\" + PARAMETER_BITS + \" Generate statistics for all bits\\n\" +\n \" -\" + PARAMETER_BYTES + \" Generate statistics for all bytes\\n\" +\n \" -\" + PARAMETER_DIFFERENCE + \" Check primes difference\\n\" +\n \" -\" + PARAMETER_STRENGTH + \" Check primes strength\\n\" +\n \" -\" + PARAMETER_TIME + \" Generate time statistics\\n\" +\n \" -\" + PARAMETER_ALL + \" Generate all statistics and check all tests.\\n\");\n }", "protected void printHelp(PrintStream ps) {\n ps.println();\n ps.println(\"Sets the test environment to point to.\");\n ps.println(\"Usage : setenv <environment>\");\n ps.println(\"Options: oracle - sample oracle env\");\n ps.println(\" p6spy - sample p6spy env\"); \n ps.println(\" hdsq1 - sample hsql env\");\n ps.println();\n }", "private void printTestList()\n {\n print(\"\");\n print(SECTION_DIVIDER);\n print(\"Press <1> to Display Main Video Output Port\");\n print(\"Press <2> to Display All Video Output Configurations\");\n print(\"Press <3> to Change Main Video Configuration with Listener\");\n print(\"Press <INFO> Display Test Options\");\n }", "private static void printUsage() throws Exception {\n\t\tSystem.out.println(new ResourceGetter(\"uk/ac/cam/ch/wwmm/oscar3/resources/\").getString(\"usage.txt\"));\n\t}", "private static void printUsage() {\n\t\tSystem.out.println(\"[0] apk files directory\");\n\t\tSystem.out.println(\"[1] android-jar directory\");\n\t}", "public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}", "void acceptSettings() throws Exception{\n try {\n File myObj = new File(\"settings.conf\");\n myObj.createNewFile();\n String[] toWrite = new String[]{\"protocol\", \"dnsmanagement\", \"dnstype\", \"customdns\", \"killswitch\", \"lanaccess\", \"splittunneling\"};\n FileWriter settingsWriter = new FileWriter(\"settings.conf\");\n for (int i = 0; i < 7; i++) {\n switch (i){\n case 0:\n RadioButton selectedProtocol = (RadioButton) protocol.getSelectedToggle(); //need to have this in order to use .getText()\n String protocolValue = selectedProtocol.getText();\n settingsWriter.write(toWrite[i] + \"=\" + protocolValue.toLowerCase() + \"\\n\");\n break;\n case 1:\n String dnsEnabled = String.valueOf(dnsToggle.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + dnsEnabled + \"\\n\");\n break;\n case 2:\n RadioButton selectedDns = (RadioButton) dnsGroup.getSelectedToggle();\n String dnsValue;\n if(selectedDns.getText().equals(\"Use ProtonVPN DNS (DNS Leak Protection)\")){\n dnsValue = \"proton\";\n }\n else{\n dnsValue = \"custom\";\n }\n settingsWriter.write(toWrite[i] + \"=\" + dnsValue + \"\\n\");\n break;\n case 3:\n String customDNS = dnsEntry.getText();\n if(customDNS.equals(\"\")){\n customDNS = \"null\";\n }\n settingsWriter.write(toWrite[i] + \"=\" + customDNS + \"\\n\");\n break;\n case 4:\n String killSwitchEnabled = String.valueOf(killSwitch.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + killSwitchEnabled + \"\\n\");\n break;\n case 5:\n String lanAccessEnabled = String.valueOf(lanAccess.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + lanAccessEnabled + \"\\n\");\n break;\n case 6:\n String splitTunnelingEnabled = String.valueOf(splitTunneling.isSelected());\n settingsWriter.write(toWrite[i] + \"=\" + splitTunnelingEnabled + \"\\n\");\n break;\n }\n }\n settingsWriter.close();\n// }\n// else {\n// System.out.println(\"File already exists.\");\n// }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void help() {\n for (GameMainCommandType commandType : GameMainCommandType.values()) {\n System.out.printf(\"%-12s%s\\n\", commandType.getCommand(), commandType.getInfo());\n }\n System.out.println();\n }", "private void printUsage() {\n \n // new formatter\n HelpFormatter formatter = new HelpFormatter();\n \n // add the text and print\n formatter.printHelp(\"arara [file [--log] [--verbose] [--timeout N] [--language L] | --help | --version]\", commandLineOptions);\n }", "private String getAllConfigsAsXML() {\n StringBuilder configOutput = new StringBuilder();\n //getConfigParams\n configOutput.append(Configuration.getInstance().getXmlOutput());\n //getRocketsConfiguration\n configOutput.append(RocketsConfiguration.getInstance().getXmlOutput());\n //getCountries\n CountriesList countriesList = (CountriesList) AppContext.getContext().getBean(AppSpringBeans.COUNTRIES_BEAN);\n configOutput.append(countriesList.getListInXML());\n //getWeaponConfiguration\n configOutput.append(WeaponConfiguration.getInstance().getXmlOutput());\n //getPerksConfiguration\n configOutput.append(\"\\n\");\n configOutput.append(PerksConfiguration.getInstance().getXmlOutput());\n //getRankingRules\n ScoringRules scoreRules = (ScoringRules) AppContext.getContext().getBean(AppSpringBeans.SCORING_RULES_BEAN);\n configOutput.append(scoreRules.rankingRulesXml());\n\n configOutput.append(AchievementsConfiguration.getInstance().getXmlOutput());\n\n configOutput.append(\"\\n\");\n configOutput.append(AvatarsConfiguration.getInstance().getXmlOutput());\n\n\n return configOutput.toString();\n }", "private void printHelp() {\n System.out.println(\"Your available command words are:\");\n parser.showCommands();\n }", "private static void help() {\n\t\tSystem.out.println(\"\\n----------------------------------\");\n\t\tSystem.out.println(\"---Regatta Calculator Commands----\");\n\t\tSystem.out.println(\"----------------------------------\");\n\t\tSystem.out.println(\"addtype -- Adds a boat type and handicap to file. Format: name:lowHandicap:highHandicap\");\n\t\tSystem.out.println(\"format -- Provides a sample format for how input files should be arranged.\");\n\t\tSystem.out.println(\"help -- Lists every command that can be used to process regattas.\");\n\t\tSystem.out.println(\"podium -- Lists the results of the regatta, assuming one has been processed.\");\n\t\tSystem.out.println(\"regatta [inputfile] -- Accepts an input file as a parameter, this processes the regatta results outlined in the file.\");\n\t\tSystem.out.println(\"types -- lists every available boat type.\");\n\t\tSystem.out.println(\"write [outputfile] -- Takes the results of the regatta and writes them to the file passed as a parameter.\");\n\t\tSystem.out.println(\"----------------------------------\\n\");\n\t}", "private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}", "public void reportMissingOptions()\n {\n // Get the missing configuration options that are not configuration sections\n List<String> missingOptions = getMissingOptionPaths();\n\n // Report to console\n ConsoleCommandSender console = Bukkit.getConsoleSender();\n Console consoleConfig = new Console(plugin);\n\n // Stop execution if settings are added automatically\n ConfigAPI config = new ConfigAPI(FileType.CONFIG, false, plugin);\n boolean autoAdd = config.getBoolean(\"auto_add_missing_options\");\n if (autoAdd)\n {\n return;\n }\n\n if (missingOptions.size() > 0)\n {\n String message1 = \"A missing option has been found in \" + fileName + \"!\";\n String message2 = missingOptions.size() + \" Missing options have been found in \" + fileName + \"!\";\n String message3 = \"Please add the missing option(s) manually or delete this file and perform a reload (/bs reload)\";\n String message4 = \"The default values will be used until then\";\n\n if (consoleConfig.isNegativeRed()) {\n if (missingOptions.size() == 1)\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message1);\n else console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message2);\n\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message3);\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message4);\n } else {\n if (missingOptions.size() == 1)\n console.sendMessage(\"[BetterSleeping] \" + message1);\n else console.sendMessage(\"[BetterSleeping] \" + message2);\n\n console.sendMessage(\"[BetterSleeping] \" + message3);\n console.sendMessage(\"[BetterSleeping] \" + message4);\n }\n\n ArrayList<String> currentPath = new ArrayList<>();\n currentPath.add(\"\");\n for (String path : missingOptions)\n {\n // Handle value\n Object value = defaultConfig.get(path);\n\n\n // Change formatting if the setting is a String\n if (value instanceof String)\n value = \"\\\"\" + value + \"\\\"\";\n\n\n // Handle path\n String[] sections = path.split(\"\\\\.\"); // Split the path in its sections\n path = \"\"; // Reset the path variable\n\n\n // Remove part of the path that is a deeper level than this setting can possibly be\n if (currentPath.size() > sections.length)\n {\n currentPath.subList(sections.length, currentPath.size()).clear();\n }\n\n\n // Handle subsection logging and indentation\n int index = 0; // Index of the current path level\n String indentation = \"\"; // Indentation for the current level\n for (String section : sections)\n {\n if (index+1 != sections.length) { // Prevents the option name itself to be viewed as part of path\n if (index > currentPath.size() || !currentPath.get(index).equals(section)) // If the current option is in a different subsection\n {\n // Set the path change\n if (index > currentPath.size()) // If index does NOT exist\n {\n // Add to the end of list\n currentPath.add(section);\n } else { // If index DOES exist\n // Replace the element at index\n currentPath.set(index, section);\n // Remove deprecated sub-branches\n currentPath.subList(index, currentPath.size()).clear();\n }\n\n // Print path change\n String message = indentation + \"In subsection: \\'\" + section + \"\\'\";\n if (consoleConfig.isNegativeRed())\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.DARK_RED + message);\n else\n console.sendMessage(\"[BetterSleeping] \" + message);\n }\n\n indentation += \" \";\n index++;\n }\n }\n\n path += \"'\" + sections[0] + \"'\"; // Get the actual setting name\n\n // Print the missing option with its defaul value\n String message = indentation + \"Missing option: \" + path + \" with default value: \" + value;\n if (consoleConfig.isNegativeRed())\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.DARK_RED + message);\n else\n console.sendMessage(\"[BetterSleeping] \" + message);\n }\n } else {\n\n String message = \"No missing options were found in \" + fileName + \"!\";\n\n if (consoleConfig.isPositiveGreen())\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.GREEN + message);\n else\n console.sendMessage(\"[BetterSleeping] \" + message);\n }\n }", "public static void saveSettings() {\n\n Writer output = null;\n try {\n output = new BufferedWriter(new FileWriter(getConfigFile()));\n final Set<String> set = m_Settings.keySet();\n final Iterator<String> iter = set.iterator();\n while (iter.hasNext()) {\n final String sKey = iter.next();\n final String sValue = m_Settings.get(sKey);\n output.write(sKey + \"=\" + sValue + \"\\n\");\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n finally {\n if (output != null) {\n try {\n output.close();\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n }\n\n }", "private void logConfigLocations() {\n\t\tlogger.info(\"XD config location: \" + environment.resolvePlaceholders(XD_CONFIG_LOCATION));\n\t\tlogger.info(\"XD config names: \" + environment.resolvePlaceholders(XD_CONFIG_NAME));\n\t\tlogger.info(\"XD module config location: \" + environment.resolvePlaceholders(XD_MODULE_CONFIG_LOCATION));\n\t\tlogger.info(\"XD module config name: \" + environment.resolvePlaceholders(XD_MODULE_CONFIG_NAME));\n\t}", "public void printOn(PrintStream os, GPVariables cfg) {\n\n super.printOn(os, cfg);\n os.println(\"StartingFunds = \"+StartingFunds);\n os.println(\"NumTestTraders = \"+NumTestTraders);\n os.println(\"NumSteps = \"+NumSteps);\n }", "public void printPreferences() {\n\t\tint first, second,third, fourth, fifth, sixth, seventh, eighth, ninth, tenth;\n\t first = second = third = fourth = fifth = sixth = seventh = eighth = ninth = tenth =0;\n\t\t\n\t\tEnumeration<CandidateAssignment> e = assignments.elements();\n\t\twhile(e.hasMoreElements()) {\n\t\t\tCandidateAssignment current = e.nextElement();\n\t\t\tswitch(current.getAssignmentRank()){\n\t\t\t case 0: first++; break;\n\t\t\t case 1: second++; break;\n\t\t\t case 2: third++; break;\n\t\t\t case 3: fourth++; break;\n\t\t\t case 4: fifth++; break;\n\t\t\t case 5: sixth++; break;\n\t\t\t case 6: seventh++; break;\n\t\t\t case 7: eighth++; break;\n\t\t\t case 8: ninth++; break;\n\t\t\t case 9: tenth++; break; \n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"first Preferences awarded: \" + first + \"\\nSecond Preferences awarded: \" + second + \"\\nThird Preferences awarded: \" + third + \"\\nFourth Preferences awarded: \" + fourth + \"\\nFifth Preferences awarded: \" + fifth + \"\\nSixth Preferences awarded: \" + sixth + \"\\nSeventh Preferences awarded: \" + seventh + \"\\nEight Preferences awarded: \" + eighth + \"\\nNinth Preferences awarded: \" + ninth + \"\\nTenth Preferences awarded: \" + tenth);\n\t}", "public void writeSettings(String name){\r\n try{\r\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name + \"_EMSettings.txt\")));\r\n out.println(\"Minim Method\\t\"+jComboBox1.getSelectedIndex()); \r\n\r\n if(jTextField1.getText().equals(\"\")){\r\n out.println(\"Step Size\\t0\");\r\n }\r\n else{\r\n out.println(\"Step Size\\t\"+jTextField1.getText().trim());\r\n }\r\n\r\n if(jTextField2.getText().equals(\"\")){\r\n out.println(\"Numsteps\\t0\");\r\n }\r\n else{\r\n out.println(\"Numsteps\\t\"+jTextField2.getText().trim());\r\n }\r\n\r\n if(jTextField3.getText().equals(\"\")){\r\n out.println(\"Convergence\\t0\");\r\n }\r\n else{\r\n out.println(\"Convergence\\t\"+jTextField3.getText().trim());\r\n }\r\n\r\n if(jTextField4.getText().equals(\"\")){\r\n out.println(\"Interval\\t0\");\r\n }\r\n else{\r\n out.println(\"Interval\\t\"+jTextField4.getText().trim());\r\n } \r\n out.close();\r\n \r\n }\r\n catch(Exception e){\r\n System.out.println(\"Exception caught writting settings\");\r\n e.printStackTrace();\r\n }\r\n \r\n }", "public void printContribuintes (){\n for(String s : contribuintes.keySet()){\n System.out.printf(\"%s\",getContribuinte(s).toString());\n }\n }", "public static String debugString()\n {\n return\n \"ECSDefaults:\" + '\\n'\n + '\\t' + \"DefaultFilterState=\" + getDefaultFilterState() +'\\n'\n + '\\t' + \"DefaultFilterAttributeState=\" + getDefaultFilterAttributeState() +'\\n'\n + '\\t' + \"DefaultAttributeEqualitySign='\" + getDefaultAttributeEqualitySign() +\"'\\n\"\n + '\\t' + \"DefaultBeginStartModifier='\" + getDefaultBeginStartModifier() + \"'\\n\"\n + '\\t' + \"DefaultEndStartModifier='\" + getDefaultEndStartModifier() + \"'\\n\"\n + '\\t' + \"DefaultBeginEndModifier='\" + getDefaultBeginEndModifier() + \"'\\n\"\n + '\\t' + \"DefaultEndEndModifier='\" + getDefaultEndEndModifier() + \"'\\n\"\n + '\\t' + \"DefaultAttributeQuoteChar=\" + getDefaultAttributeQuoteChar() + '\\n'\n + '\\t' + \"DefaultAttributeQuote=\" + getDefaultAttributeQuote() +'\\n'\n + '\\t' + \"DefaultEndElement=\" + getDefaultEndElement() +'\\n'\n + '\\t' + \"DefaultCodeset='\" + getDefaultCodeset() + \"'\\n\"\n + '\\t' + \"DefaultPosition=\" + getDefaultPosition() +'\\n'\n + '\\t' + \"DefaultCaseType=\" + getDefaultCaseType() +'\\n'\n + '\\t' + \"DefaultStartTag='\" + getDefaultStartTag() + \"'\\n\"\n + '\\t' + \"DefaultEndTag='\" + getDefaultEndTag() + \"'\\n\"\n + '\\t' + \"DefaultPrettyPrint=\" + getDefaultPrettyPrint();\n }", "public void dump() {\n\t\tfor(Symbol s: assignments.keySet()) {\n\t\t\tSystem.out.println(s.toString() + \" = \" + assignments.get(s));\n\t\t}\t\n\t}", "public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}", "public static void printUsage() {\n\t\tSystem.out.println(getVersions());\n\t\tSystem.out.println(\"Collect BE Metrics about Cache, Agent, and RTC\");\n\t\tSystem.out.println(\"BEJMX Usage:\");\n\t\tSystem.out.println(\"java com.tibco.metrics.bejmx.BEJMX -config <configFile> [-pid <pidList>]\");\n\t}", "public void dump() {\n List<String> variableStrings = new ArrayList<>();\n for (int i = 1; i <= VARIABLE_COUNT; i++) {\n if (variables.containsKey(i)) {\n variableStrings.add(variables.get(i).toString());\n }\n }\n System.out.println(String.format(\"site %d - %s\", id, String.join(\", \", variableStrings)));\n }", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "private void printOptionsForPlaylist() {\n System.out.println(\"\\n\\t0. Return to main menu \\n\\t1. print Options For Playlist \\n\\t2. Skip forward (next song) \\n\\t3. skip backwards (previous song)\" +\n \"\\n\\t4. removing song in playlist\" + \" \\n\\t5. repeat the current song\" + \" \\n\\t6. current song played\"\n + \" \\n\\t7. show list songs of playlist \");\n }", "private void printVersion() {\n \n // print the version\n System.out.println(\"arara \".concat(AraraConstants.VERSION).concat(\" - \").concat(localization.getMessage(\"Header_Slogan\")));\n System.out.println(\"Copyright (c) \".concat(AraraConstants.COPYRIGHTYEAR).concat(\", Paulo Roberto Massa Cereda\"));\n System.out.println(localization.getMessage(\"Header_AllRightsReserved\").concat(\"\\n\"));\n }", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "void makeConfig()\n\t{\n\t\t\t\t\n\t\tbuf.append(\"\\t\\tUplink Setup Work order for \" + myDay.toString() + \" Rel 0.2\\n\");\n\t\tbuf.append(\"\\t\\t-----------------------------------------------------------------\\n\\n\");\n\t\t\n\t\tbuf.append(\"\\n1. Channel : \" + channelNumber + \" RF Source : \" + (rfSource==0?\"ASI\":(rfSource==1?\"RF\":\"MPEGoIP\")) + \"\\n\");\n\t\tbuf.append(\"\\n2. Physical Connection : \" + param.get(16) + \"\\n\");\t\n\t\t\n\t\t\n\t\tbuf.append(\"\\n3. Input Test Case : \" + Utility.getIntVal(param.get(1)) + \"\\n\\n\");\n\t\tString[] inpTCParamName = new String[] {\"TC Name\", \"Format/Modulation\", \"Rate (Msym)\", \"Bandwidth (Mbit)\"};\n\t\tprintTCParam(4, 13, Utility.getIntVal(param.get(1)), inpTCParamName);\n\t\t\n\t\tbuf.append(\"\\n4. CA Test Case : \" + Utility.getIntVal(param.get(2)) + \"\\n\\n\");\n\t\tString[] caTCParamName = new String[] {\"Scrambling Mode\", \"#Signal Source\", \"#DCD\", \"#Algorithm\", \"MSK\", \"Channel Setup\"};\n\t\tprintTCParam(5, 10, Utility.getIntVal(param.get(2)), caTCParamName);\n\n\t\tbuf.append(\"\\n5. Video Test Case : \" + Utility.getIntVal(param.get(3)) + \"\\n\\n\");\n\t\tString[] vidTCParamName = new String[] {\"Video Format\", \"Picture (resolution)\", \"Profile/Feature\", \"GOP Settings\", \"3:2 PullDown\", \n\t\t\t\t \t\t\t\t\"Video Bit Rate\", \"Video Rate\", \"#Encoder Parameters\"};\n\t\tprintTCParam(7, 8, Utility.getIntVal(param.get(3)), vidTCParamName);\n\t\n\t\tbuf.append(\"\\n6. Audio#1 Test Case : \" + Utility.getIntVal(param.get(4)) + \"\\n\\n\");\n\t\tString[] audTCParamName = new String[] {\"TC Name\", \"#Audio Type\", \"#Bit Rates\", \"#Encoder Flags #1\", \"#Encoder Flags #2\",\n \"#Encoder 1:Stereo\", \"#Encoder 2:Dual Mono\", \"#Encoder 3:Single Mono\", \n \"#Encoder 4:3/2 Surround & 5.1\", \"#PCM/Compress\", \"#DDP Mode\", \"#1:Stereo\", \n \"#2:Dual Mono\", \"#3:Single Mono\", \"#4:3/2 Surround & 5.1\"};\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\t\n\t\tbuf.append(\"\\n7. Audio#2 Test Case :\" + Utility.getIntVal(param.get(5)) + \"\\n\\n\");\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\n\t\tbuf.append(\"\\n8. Trancode#1 Test Case : \" + Utility.getIntVal(param.get(6)) + \" subject of automatic setup\\n\");\n\t\t\n\t\tbuf.append(\"\\n9. Trancode#2 Test Case : \" + Utility.getIntVal(param.get(7)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n10. Subtitle Test Case : \" + Utility.getIntVal(param.get(8)) + \"\\n\\n\");\n\t\tString[] sbtTCParamName = new String[] {\"TC Name\", \"Video Std\", \"Subtitle Std\", \"#Stream/Subtitle enc\"};\n\t\tprintTCParam(8, 10, Utility.getIntVal(param.get(8)), sbtTCParamName);\n\t\n\t\tbuf.append(\"\\n11. VBI Test Case : \" + Utility.getIntVal(param.get(9)) + \"\\n\\n\");\n\t\tString[] vbiTCParamName = new String[] {\"TC Name\", \"#Video Frame Rate\", \"#NABTS\", \"#WST\", \"#Invert WST\", \"#VITC PAL(1)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"#AMOL-I(3)\", \"#AMOL-II(3)\", \"#VPS\", \"#WSS\", \"#VITS\", \"#GEMTAR(1x)(2)\", \n\t\t\t\t\t\t\t\t\t\t\t\t\"#GEMTAR(2x)(2)\", \"#Monochrome\", \"#VBItotal bit rate (KBits)\"};\n\t\tprintTCParam(9, 9, Utility.getIntVal(param.get(9)), vbiTCParamName);\n\t\t\n\t\tbuf.append(\"\\n12. LSD Test Case : \" + Utility.getIntVal(param.get(10)) + \"\\n\\n\");\n\t\tString[] lsdTCParamName = new String[] {\"TC Name\", \"#Data rate\"};\n\t\tprintTCParam(10, 9, Utility.getIntVal(param.get(10)), lsdTCParamName);\n\t\n\t\tbuf.append(\"\\n13. MPE Test Case : \" + Utility.getIntVal(param.get(11)) + \"\\n\\n\");\n\t\tString[] mpeTCParamName = new String[] {\"TC Name\", \"#PIDs\", \"Rate per PID (Mbits)\", \"Aggregate Rate (Mbits)\", \"Frame Size\", \"Flow Type\"};\n\t\tprintTCParam(11, 8, Utility.getIntVal(param.get(11)), mpeTCParamName);\n\t\t\n\t\tbuf.append(\"\\n14. FPT Test Case : \" + (Utility.getIntVal(param.get(12))==1?\"Yes\":\"No\") + \"\\n\");\n\t\t\n\t\tbuf.append(\"\\n15. CC Test Case : \" + (Utility.getIntVal(param.get(13))==1?\"Yes\":\"No\") + \"\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n16. DPM 58/59 Test Case : \" + Utility.getIntVal(param.get(14)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n17. DPM 24/54 Test Case : \" + Utility.getIntVal(param.get(15)) + \" subject of automatic setup\\n\");\t\n\n\t\tbuf.append(\"\\n\\n*** End of Uplink Setup Work order ***\\n\");\n\t\t\n\t\tString fileName = null;\n\t\ttry {\n\t\t\t SimpleDateFormat timeStamp = new SimpleDateFormat(\"dd-MMM-yyyy_HH-mm-ss\");\n\t\t\t Calendar cal = Calendar.getInstance();\n\t\t\t \n\t\t\t cal.setTime(myDay);\n\t\t\t fileName = STS.outputDirectory + \"\\\\\" + \"Uplink_Setup_\" + timeStamp.format(cal.getTime()) + \".txt\";\n\n\t\t\tFileOutputStream out = new FileOutputStream(fileName);\n\t\t\tout.write(buf.toString().getBytes());\n\t\t\tout.close();\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Can not write into file \" + fileName);\n\t\t}\n\n\t\t\n\t}", "public void print(){\r\n\t\tSystem.out.println(\"Size of each block:\\t\\t\" + this.blockSize);\r\n\t\tSystem.out.println(\"Total Number of Inodes:\\t\\t\" + this.inodeCount);\r\n\t\tSystem.out.println(\"Total Number of Blocks:\\t\\t\" + this.blocksCount);\r\n\t\tSystem.out.println(\"Number of Free Blocks:\\t\\t\" + this.freeBlocksCount);\r\n\t\tSystem.out.println(\"Number of Free Inodes:\\t\\t\" + this.freeInodesCount);\r\n\t\tSystem.out.println(\"First Data Block:\\t\\t\" + this.firstDataBlock);\r\n\t\tSystem.out.println(\"Last Written Date and Time:\\t\" + GeneralUtils.getDateFromLong(this.wTime));\r\n\t\tSystem.out.println(\"First Inode:\\t\\t\\t\" + this.firstInode);\r\n\t\tSystem.out.println(\"Inode Size:\\t\\t\\t\" + this.inodeSize);\r\n\t}", "public void printAll() {\n\t\tSystem.out.println(mainPot);\n\t\tcurrentPlayer.printHandAndPocket();\n\t\tcurrentPlayer.printCombos();\n\t\topponentPlayer.printCombos();\n\t\tSystem.out.println();\n\t}", "public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }", "public void printTypeInfo(){\n\t\tSystem.out.println(\"This type of computer is suitable for massive usage, when it comes to portability.\");\n\t\tSystem.out.println(\"Main thing at these computers is portability and funcionality.\");\n\t\t\n\t}", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "private String getSystemProperties() {\n\t\tStringWriter swriter = new StringWriter();\n\t\tPrintWriter writer = new PrintWriter(swriter);\n\t\twriter.println(\"<html>\");\n\t\twriter.println(\"<head><title>Java Properties</title></head>\");\n\t\twriter.println(\"<body>\");\n\t\twriter.println(\"<pre>\");\n\t\tProperties properties = System.getProperties();\n\t\tproperties.list(writer);\n\t\twriter.println(\"</pre>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\treturn swriter.toString();\n\t}", "protected void showUsage() {\n\n\tStringBuffer usage = new StringBuffer();\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\" \" + APP_NAME + \" \" + APP_VERSION + \"\\n\");\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\"Prints the Tool Kit name for the given Branch and \\n\");\n\tusage.append(\"Component.\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"USAGE:\\n\");\n\tusage.append(\"------\\n\");\n\tusage.append(APP_NAME + \" <-c component> <-b branch> [-y] [-h] [-db dbMode]\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\" component = Component name (ess, pds, model, einstimer ...).\\n\");\n\tusage.append(\" branch = Branch name.\\n\");\n\tusage.append(\" -y = (optional) Verbose mode (echo messages to screen)\\n\");\n\tusage.append(\" dbMode = (optional) DEV | PROD (defaults to PROD)\\n\");\n\tusage.append(\" -h = Help (shows this information)\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"Return Codes\\n\");\n\tusage.append(\"------------\\n\");\n\tusage.append(\" 0 = application ran ok\\n\");\n\tusage.append(\" 1 = application error\\n\");\n\tusage.append(\"\\n\");\n\n\tSystem.out.println(usage);\n\n }", "private void printHelp() \n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "void dump()\n\t\t{\n\t\t\tlog.info(\"Ch # \"+ch+\" Mode=\"+Hex.formatByte(mode)+\" Base=\"+Hex.formatWord(base.getValue())+\" Count=\"+Hex.formatWord(count.getValue()));\n\t\t\tlog.info(\"Ch # \"+ch+\" Hold=\"+hold+\" Request=\"+request+\" TC=\"+tc+\" Enabled=\"+enabled+\" Mask=\"+mask);\n\t\t}", "public void printProperties(IJml2bConfiguration config, JmlFile jf)\n\t\tthrows LanguageException {\n\t\tstream.println(\"PROPERTIES\");\n\t\tprinter.printJvaluesProperties();\n\t\tprinter.printJml2bDefs(config, true);\n\t\tprinter.printSubtypes(config);\n\t\tprintFieldTypes();\n\t\tstream.println(\"\\nDEFINITIONS\");\n\t\tprinter.firstItem = true;\n\t\tprintFormulasDef(jf.getClasses(), 2);\n\t\tstream.println(\"\\n\");\n\t}", "protected void dumpStats() {\n\t\t// Print the header.\n\t\tSystem.out.println(\"\\n\"+phCode+\" \"+minDelta+\" \"+maxDelta);\n\t\t\n\t\t// Print the data.\n\t\tSystem.out.println(\"Bias:\");\n\t\tfor(int j=0; j<bias.size(); j++) {\n\t\t\tSystem.out.format(\" %3d range = %6.2f, %6.2f fit = %11.4e, \"+\n\t\t\t\t\t\"%11.4e\\n\",j,bias.get(j).minDelta,bias.get(j).maxDelta,\n\t\t\t\t\tbias.get(j).slope,bias.get(j).offset);\n\t\t}\n\t\tSystem.out.println(\"Spread:\");\n\t\tfor(int j=0; j<spread.size(); j++) {\n\t\t\tSystem.out.format(\" %3d range = %6.2f, %6.2f fit = %11.4e, \"+\n\t\t\t\t\t\"%11.4e\\n\",j,spread.get(j).minDelta,spread.get(j).maxDelta,\n\t\t\t\t\tspread.get(j).slope,spread.get(j).offset);\n\t\t}\n\t\tSystem.out.println(\"Observability:\");\n\t\tfor(int j=0; j<observ.size(); j++) {\n\t\t\tSystem.out.format(\" %3d range = %6.2f, %6.2f fit = %11.4e, \"+\n\t\t\t\t\t\"%11.4e\\n\",j,observ.get(j).minDelta,observ.get(j).maxDelta,\n\t\t\t\t\tobserv.get(j).slope,observ.get(j).offset);\n\t\t}\n\t}", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "void saveConfig() {\r\n\t\ttry {\r\n\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(\"open-ig-mapeditor-config.xml\"), 64 * 1024), \"UTF-8\"));\r\n\t\t\ttry {\r\n\t\t\t\tout.printf(\"<?xml version='1.0' encoding='UTF-8'?>%n\");\r\n\t\t\t\tout.printf(\"<mapeditor-config>%n\");\r\n\t\t\t\tout.printf(\" <window x='%d' y='%d' width='%d' height='%d' state='%d'/>%n\", getX(), getY(), getWidth(), getHeight(), getExtendedState());\r\n\t\t\t\tout.printf(\" <language id='%s'/>%n\", ui.languageEn.isSelected() ? \"en\" : \"hu\");\r\n\t\t\t\tout.printf(\" <splitters main='%d' preview='%d' surfaces='%d'/>%n\", split.getDividerLocation(), toolSplit.getDividerLocation(), featuresSplit.getDividerLocation());\r\n\t\t\t\tout.printf(\" <editmode type='%s'/>%n\", ui.buildButton.isSelected());\r\n\t\t\t\tout.printf(\" <tabs selected='%d'/>%n\", propertyTab.getSelectedIndex());\r\n\t\t\t\tout.printf(\" <lights preview='%d' map='%s'/>%n\", alphaSlider.getValue(), Float.toString(alpha));\r\n\t\t\t\tout.printf(\" <filter surface='%s' building='%s'/>%n\", XML.toHTML(filterSurface.getText()), XML.toHTML(filterBuilding.getText()));\r\n\t\t\t\tout.printf(\" <allocation worker='%s' strategy='%d'/>%n\", ui.allocationPanel.availableWorkers.getText(), ui.allocationPanel.strategies.getSelectedIndex());\r\n\t\t\t\tout.printf(\" <view buildings='%s' minimap='%s' textboxes='%s' zoom='%s' standard-fonts='%s' placement-hints='%s'/>%n\", ui.viewShowBuildings.isSelected(), \r\n\t\t\t\t\t\tui.viewSymbolicBuildings.isSelected(), ui.viewTextBackgrounds.isSelected(), Double.toString(renderer.scale), ui.viewStandardFonts.isSelected()\r\n\t\t\t\t\t\t, ui.viewPlacementHints.isSelected());\r\n\t\t\t\tout.printf(\" <custom-surface-names>%n\");\r\n\t\t\t\tfor (TileEntry te : surfaceTableModel.rows) {\r\n\t\t\t\t\tout.printf(\" <tile id='%s' type='%s' name='%s'/>%n\", te.id, XML.toHTML(te.surface), XML.toHTML(te.name));\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </custom-surface-names>%n\");\r\n\t\t\t\tout.printf(\" <custom-building-names>%n\");\r\n\t\t\t\tfor (TileEntry te : buildingTableModel.rows) {\r\n\t\t\t\t\tout.printf(\" <tile id='%s' type='%s' name='%s'/>%n\", te.id, XML.toHTML(te.surface), XML.toHTML(te.name));\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </custom-building-names>%n\");\r\n\t\t\t\tout.printf(\" <recent>%n\");\r\n\t\t\t\tfor (int i = ui.fileRecent.getItemCount() - 1; i >= 2 ; i--) {\r\n\t\t\t\t\tout.printf(\" <entry file='%s'/>%n\", XML.toHTML(ui.fileRecent.getItem(i).getText()));\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </recent>%n\");\r\n\t\t\t\tout.printf(\"</mapeditor-config>%n\");\r\n\t\t\t} finally {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "private void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the prision.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(parser.showCommands());\n }", "private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }" ]
[ "0.73997223", "0.72436655", "0.6867167", "0.64379054", "0.6431943", "0.63834965", "0.63008404", "0.6250685", "0.61741394", "0.60932153", "0.60586566", "0.6039773", "0.60131556", "0.6002321", "0.5980612", "0.58978564", "0.5869039", "0.5862351", "0.5807828", "0.57967114", "0.575436", "0.5749794", "0.5749445", "0.5729286", "0.5710531", "0.56941617", "0.56600183", "0.55973643", "0.5575697", "0.555156", "0.55446196", "0.55405337", "0.5531429", "0.55131745", "0.55106163", "0.550486", "0.5504419", "0.5500586", "0.5482981", "0.547491", "0.54687977", "0.54598904", "0.5445451", "0.54359865", "0.5420738", "0.5408222", "0.540392", "0.53753024", "0.5369284", "0.53494865", "0.5349123", "0.53476435", "0.5345284", "0.5340254", "0.53336746", "0.53207713", "0.5314285", "0.5306649", "0.5300975", "0.5296522", "0.529427", "0.5284474", "0.52711093", "0.52697587", "0.52661353", "0.52655685", "0.5264796", "0.5255683", "0.52538335", "0.52504957", "0.52423555", "0.52419376", "0.5234833", "0.5219419", "0.52101433", "0.52010006", "0.51949555", "0.5188801", "0.5186892", "0.51859725", "0.5185263", "0.5184733", "0.5183894", "0.517818", "0.5177739", "0.5177127", "0.51730233", "0.51705647", "0.5169929", "0.5168874", "0.5159066", "0.5155776", "0.5155541", "0.5152299", "0.5149134", "0.5144999", "0.51399523", "0.5134427", "0.51339936", "0.51335454" ]
0.8298689
0
Deletes an alphabet with the given name.
public void destroyAlphabet() { Scanner scanner = new Scanner(System.in); System.out.println("Please enter the name of the alphabet: "); String alphabetName = scanner.nextLine(); File alphaFile = new File("alphabet/" + alphabetName + ".txt"); if (alphaFile.exists()) { alphaFile.delete(); System.out.println("Alphabet file was deleted successfully."); } else { System.out.println("The file containing " + alphabetName + " could not be found."); } scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteByName(String name) {\n\t\tint del = name.toUpperCase().charAt(0) - 'A';\r\n\t\tfor (int i = 0; i < array[del].size(); i++) {\r\n\t\t\tif (array[del].get(i).name == name) {\r\n\t\t\t\tarray[del].remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void deleteCharFromName() {\n \t\tif (playerName.length() > 0 && state == 4) {\n \t\t\tplayerName = playerName.substring(0, playerName.length() - 1);\n \t\t}\n \t}", "@Override\n\tpublic void deleteByName(String name) {\n\t\t\n\t}", "public void delete(String name) {\n\t\t\tset(name, \"-delete-\", -30);\n\t\t}", "String removeEdible(String name);", "public void deleteByName(String name){\r\n repository.deleteByName(name);\r\n }", "public void remove(String name);", "void remove(String name);", "void remove(String name);", "public CommandBase removeCmd(String name){\n\t\treturn cmds.remove(name.toLowerCase());\n\t}", "@Override\n\tpublic int deleteByName(String cname) {\n\t\treturn cm.deleteByName(cname);\n\t}", "@Override\n\tpublic int delete(String name) {\n\t\treturn zongjieDao.delete(name);\n\t}", "@Override\n\tpublic void delete(String name) {\n\t}", "void delete(SpCharInSeq spCharInSeq);", "void remove(String name) throws Exception;", "public void deleteContact(String name){\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n\t\tdb.execSQL(\"delete from MYSELF where name=\\\"\"+name+\"\\\";\");\r\n\t\tdb.close();\r\n\t}", "public final void removeFromChest(String name) {\n chestCharacters.remove(name);\n }", "void eraseContact(String name) \r\n\t\t{\r\n\t\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t\t{\r\n\t\t\t String n = this.get(i).getContactName();\r\n\t\t\t \r\n\t\t\t\tif(n.equalsIgnoreCase(name))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(n);\r\n\t\t\t\t\tCalendar.deleteEventBycontact(this.get(i));\r\n\t\t\t\t\tthis.remove(i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "boolean remove(String name);", "void deleteKeyword(String name);", "public void DELETE(String name){\r\n\r\n try {\r\n out.println(\"DELE \" + name);\r\n out.flush();\r\n System.out.println(in.readLine());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n\r\n }", "public void removeLetter(char c)\n {\n String s = (c + \"\").toUpperCase();\n if (find(s) == null) //If letter node does not exist\n {\n System.out.println(\"Letter node \" + c + \" is not in the list!\");\n return;\n }\n Node n = find(s);\n while (n.next.next != null && n.next.next.data.length() != 1) //remove each string one by one until there's only one left\n {\n remove(n.next.data);\n }\n remove(n.next.data); //Remove the final string and the letter node\n }", "@Override\r\n\tpublic void deleteBankAccount(String name) {\n\t\t\r\n\t}", "public void delLetters(JSONArray letters) {\n List<Letter> result = letterBean.findLetters(letters);\n\n if (result != null) {\n letterBean.delLetters(result);\n }\n\n }", "public static void removeCharacter(String username)\r\n\t{\r\n\t\tcharacters.remove(username);\r\n\t}", "public abstract boolean remove(String name);", "public void remove(final String name) {\r\n\t\tremove(names.indexOf(name));\r\n\t}", "void deleteCategoryByName(String categoryName);", "public String DELETE(String name){\n this.clientData.remove(name);\n\n return \"OK\";\n }", "public boolean delete(String name){\n\t\t// this first line is given in the assignment file\n\t\tBankAccount toRemove = lookUp(name);\n\t\t// complete this:\n\t\tif(toRemove == null)\t// Verifying the account name exists in names tree, returns false if not\n\t\t\treturn false;\n\n\t\tint numberToRemove = toRemove.getAccountNumber();\n\t\tif(lookUp(numberToRemove) == null)\t// Verifying the account number exists in account numbers tree, returns false if not\n\t\t\treturn false;\n\n\t\t// Removing the account from both trees:\n\t\tnamesTree.remove(toRemove);\n\t\taccountNumbersTree.remove(toRemove);\n\t\treturn true;\n\t}", "public Characters removeCharacter(String characterName) {\n return characters.remove(characterName);\n }", "void decreaseSortLetter();", "@Override\n\tpublic void delete(String name) {\n\t\tdocument.removeChild(document.getElementsByTagName(name).item(0));\n\t\tsaveDocument();\n\t}", "public void delete(String name)\r\n\t{\r\n\t\tOntResource res = this.obtainOntResource(name);\r\n\t\tres.remove();\r\n\t}", "public void delete(String name) {\n db = helper.getWritableDatabase();\n db.delete(\"student\", \"name=?\", new String[]{name});\n Log.i(\"db1\", name + \"정상적으로 삭제 되었습니다.\");\n }", "public void deleteUser(String name);", "public void deleteCookie(final String name);", "private void delete(String name) {\n File f = new File(name);\n if (f.exists()) {\n f.delete();\n }\n }", "private String removeFirstChar(String name) {\n\t\treturn name.substring(1, name.length());\n\t}", "public boolean removeAnimal(String name);", "public void del(String name) {\n\t\tfor (AddrBean ad : addrlist) {\n\t\t\tif (name.equals(ad.getUsername())) {\n\t\t\t\taddrlist.remove(ad);\n\t\t\t}\n\t\t}\n\t}", "private String RemoveCharacter(String strName) {\r\n String strRemover = \"( - )|( · )\";\r\n String[] strTemp = strName.split(strRemover);\r\n if (strTemp.length >= 2) {\r\n strName = strTemp[0].trim() + \" - \" + strTemp[1].trim();\r\n }\r\n\r\n strName = strName.replace(\"–\", \"-\");\r\n strName = strName.replace(\"’\", \"'\");\r\n strName = strName.replace(\":\", \",\");\r\n\r\n strName = strName.replace(\"VA - \", \"\");\r\n strName = strName.replace(\"FLAC\", \"\");\r\n return strName;\r\n }", "public static String removeNonAlphaNumericCharacters(final String name)\n\t{\n\t\treturn RegExUtils.removePattern(name, NON_ALPHA_NUMERIC_CHARACTER_REGEX);\n\t}", "@Override\r\n\tpublic int deleteMarketByName(String name) {\n\t\treturn session.delete(\"kdc.market.deleteMarketByName\", name);\r\n\t}", "public void deleteOptsetByName(String name) {\n int index = findIndexOfOptset(name);\n if (index != -1) {\n this.optionSet.remove(index);\n } else {\n System.out.println(\"The optionset named \" + name + \" no exists !!!\");\n }\n }", "public int deleteByName(String name) {\r\n\t\tint status = 0;\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"delete from student where name=?\");\r\n\t\t\tps.setString(1, name);\r\n\t\t\tstatus = ps.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\t\treturn status;\r\n\t}", "void unsetName();", "String delete(int index);", "public void removeByname(java.lang.String name)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private DeleteLetter(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "public abstract void destroy(String name);", "public void deleteByName(String nume) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tString query = deleteQuery(\"nume\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setString(1, nume);\n\t\t\tst.executeUpdate();\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:deleteByName\" + e.getMessage());\n\t\t}\n\t}", "void delete(String identifier) throws IOException;", "public int deletePack(String name)\n {\n dbObj=new dbFlashCards(userId);\n \n return dbObj.deletePack(name);\n \n \n }", "@DeleteMapping(\"/authority/{name:\" + Constants.AUTHORITY_REGEX + \"}\")\n @Timed\n @PreAuthorize(\"hasRole(\\\"\" + AuthoritiesConstants.ADMIN + \"\\\")\")\n public ResponseEntity<Void> deleteAuthority(@PathVariable String name) {\n log.debug(\"REST request to delete Authority: {}\", name);\n userService.deleteAuthority(name);\n return ResponseEntity.ok().headers(HeaderUtil.createAlert( \"userManagement.deleted\", name)).build();\n }", "public void deleteContainer(String name)\r\n \t\tthrows NoSuchElementException, IllegalArgumentException;", "public void deleteCurrentCharacter() {\n\t\tint currentCharacterIndex = 0;\n\t\tList<Entry<Long, String>> characters = m_characterRepo.queryList();\n\t\tlong characterForDeletion = m_currentCharacterID;\n\n\t\tfor (int i = 0; i < characters.size(); i++) {\n\t\t\tif (characterForDeletion == characters.get(i).getKey()){\n\t\t\t\tcurrentCharacterIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (characters.size() == 1) {\n\t\t\taddNewCharacterAndSelect();\n\t\t} else {\n\t\t\tint charToSelect = (currentCharacterIndex == 0) ? 1 : 0;\n\t\t\tsetSelectedCharacter(characters.get(charToSelect).getKey());\n\t\t\tloadSelectedCharacter();\n\t\t}\n\n\t\tm_characterRepo.delete(characterForDeletion);\n\t\tLog.i(TAG, \"Deleted current character: \" + characterForDeletion);\n\t}", "public void remove(String name)\n/* */ {\n/* 1177 */ for (int i = 0; i < this.attributes.size(); i++) {\n/* 1178 */ XMLAttribute attr = (XMLAttribute)this.attributes.elementAt(i);\n/* 1179 */ if (attr.getName().equals(name)) {\n/* 1180 */ this.attributes.removeElementAt(i);\n/* 1181 */ return;\n/* */ }\n/* */ }\n/* */ }", "public static char [] deletion(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\n\t\t\t\ttemp[i] = word[i+1];\n\t\t}\n\t\treturn temp;\n\t}", "public void removeChar(int index) {\r\n\t\tcommandsQueue.add(new String[] { \"remove\", \"\" + index });\r\n\t}", "@Override\n\tpublic void deleteByname(String adminname) {\n\t\tSettingMapper.deleteByname(adminname);\n\t}", "void remove(String identifier) throws GuacamoleException;", "public void deleteDepartmentByDeptName(String dept_name);", "public void removeCharacter(Character c) {\n chars.remove(c);\n }", "public void eliminarAlergia(String alergia){\n String[] alergiaBorrar = {alergia};\n db.delete(\"alergia\",\"alergia=?\",alergiaBorrar);\n }", "public String removeAddressBook(String name)\n\t{\n\t\tif(!Utility.validateStringForAlphanumericOflength20(name))\n\t\t\treturn \"AddressBook Name should be Alphanumeric of Length 3-20 And Start with a Letter\";\n\t\tif(controller.isAddressBookExists(name).equals(Constants.SUCCSESS))\n\t\t\treturn controller.deleteAddressBook(name);\n\t\telse\n\t\t\treturn \"AddressBook '\"+ name +\"' doesn't exists...!!!\";\n\t}", "public void delNomFromMac(Verbum w){\r\n\t\tw.macForm = w.macrons.substring(0, w.macrons.length()-w.nomFormLengh);\r\n\t\tif(w.macForm.length()>0){ //avoid index out of bounds\r\n\t\t\tif(w.macForm.charAt(w.macForm.length()-1)=='*'){\r\n\t\t\t\tw.macForm = w.macForm.substring(0, w.macForm.length()-2);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}", "public void deleteStock(String name){\n Log.d(TAG, \"deleteStock: \"+name);\n int cnt = database.delete(TABLE_NAME, STOCK_NAME + \" = ?\", new String[]{name});\n Log.d(TAG, \"deleteStock: \"+cnt);\n }", "public static boolean delete(String name) {\n String querySQL = \"delete from exam_type where exam_type_name = ?\";\n PreparedStatement pStmt = null;\n try {\n pStmt = globalCon.prepareStatement(querySQL);\n pStmt.setString(1, testString(name, 0, 40));\n pStmt.executeUpdate();\n return true;\n } catch (SQLException e) {\n System.out.println(\"Query Failed: \" + querySQL);\n System.out.println(\"Error Type: \" + e.getClass().getName());\n return false;\n } catch (Exception e) {\n System.out.println(\"Failed: \" + e.getMessage());\n System.out.println(\"Error Type: \" + e.getClass().getName());\n return false;\n } finally {\n if (pStmt != null) {\n try {\n pStmt.close();\n } catch (SQLException ex) {\n System.out.println(\"pStmt.close() failed\");\n System.out.println(\"Error Type: \" + ex.getClass().getName());\n }\n }\n }\n }", "public void deleteAssetClass(String name_);", "public Campus removeByname(java.lang.String name)\n\t\tthrows NoSuchCampusException;", "private int deleteRecordParam(String name) {\n println(\"deleting records using parameters.\");\n\n String[] whereArgs = {\"Rice\"};\n\n int rowAffected = db.delete(name,\n \"name = ?\",\n whereArgs);\n\n return rowAffected;\n }", "public void deletingArticlesByName(String string) {\n\t\tSystem.out.println(\"\\nArticles anomenats \" + string + \" :\");\n\t\t\n\t\tObjectSet<Article> articles = db.query(new Predicate<Article>() {\n\t\t\tpublic boolean match(Article article) {\n\t\t\t\treturn article.getName().equalsIgnoreCase(string);\n\t\t\t}\n\t\t});\n\t\tarticles.stream()\n\t\t\t\t.peek(System.out::println)\n\t\t\t\t.forEach(db::delete);\n\t}", "public void deleteAccount(String userName) {\n\n }", "public void deleteQuestion(ArrayList<Question> a) {\n\n for (int count = 0; count < a.size(); count++) {\n\n //Searching for the correct question to delete\n for (int i = 0; i < quesCollec.size(); i++) {\n\n /* If the question name is the same as the question name in the array, then\n * we have found our question.\n */\n if (a.get(count).equals(quesCollec.get(i))) {\n quesCollec.remove(i);\n break;\n }\n }\n }\n }", "public void removeEnemy(String name){\n\t\tint remove = findEnemyNamePosition(name);\r\n\t\t\r\n\t\t//subtract in one the size of the array\r\n\t\tsize--;\r\n\t\t\r\n\t\t//make all the values in the array down in one position, in the position to remove\r\n\t\tfor(int i = remove + 1; i < size; i++){\r\n\t\t\tenemy[i - 1] = enemy[i];\r\n\t\t}\r\n\t}", "public void deleteRecord(String name) {\n if (name == null || !addressBook.containsKey(name))\n throw new NullPointerException();\n addressBook.remove(name);\n }", "public static void removeName(WebDriver driver, String name) throws InterruptedException {\n WebElement toBeRemovedElement = driver.findElement(By.xpath(\"//td[.='\"+name+\"']/preceding-sibling::td\"));\n toBeRemovedElement.click();\n\n WebElement deleteButton = driver.findElement(By.xpath(\"//input[@id='ctl00_MainContent_btnDelete']\"));\n deleteButton.click();\n\n Thread.sleep(3000);\n\n List<WebElement> allNamesAfterDeletetion = driver.findElements(By.xpath(\"//table[@class='SampleTable']//td[2]\"));\n\n for (WebElement eachName : allNamesAfterDeletetion) {\n if(eachName.getText().equals(name)){\n Assert.fail(\"The name was not deleted\");\n }\n }\n Assert.assertTrue(true,name + \" is already deleted\");\n\n }", "@Test\n\tpublic void IsCaseNameDeleted(){\n\t\tString caseName = \"led\";\n\t\tboolean isNameValid = CaseManagerService.deleteCaseType(caseName);\n\t\tassertTrue(isNameValid);\n\t}", "public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/VSLLexer.g:15:17: ( 'a' .. 'z' )\n\t\t\t// src/VSLLexer.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public void delete(String s){\r\n int x = getIndex(s);\r\n if(x != 0){\r\n table[x] = DEFUNCT;\r\n }\r\n }", "String delete(int pos, int count);", "public void removeClassificacao(String name)\n {\n this.classificacao.remove(name);\n }", "public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/aofC/AspectParser/AOC.g:186:16: ( ( 'a' .. 'z' | 'A' .. 'Z' ) )\n\t\t\t// src/aofC/AspectParser/AOC.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "@Request(id = 8, retryable = false, response = ResponseMessageConst.VOID)\n void destroy(String name);", "public boolean deleteDeck(String name)\n {\n return deckStore.delete(name);\n }", "@Test\n public void filesByNameDeleteTest() throws ApiException {\n String name = null;\n api.filesByNameDelete(name);\n\n // TODO: test validations\n }", "public final void mLETTER() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:5: ( ( 'A' .. 'Z' | 'a' .. 'z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:7: ( 'A' .. 'Z' | 'a' .. 'z' )\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public void deleteCharacter(int characterId) {\n\n try {\n\n SQLiteDatabase db = getWritableDatabase();\n db.delete(CharacterAttacksContract.getTableName(),\n CharacterAttacksContract.getCharacterIdColName() + \"=\" + characterId,\n null);\n db.close();\n\n } catch (SQLiteException e) {\n\n e.printStackTrace();\n Log.e(ERROR_SQLite, \"Deleting a character failed\");\n }\n }", "public Integer deleteData(String name) {\n SQLiteDatabase db = this.getWritableDatabase();\n int i = db.delete(TABLE_NAME, col1 + \" =?\", new String[]{name});\n return i;\n }", "@Override\r\n public void removeExtension(String name) {\n this.DecoratedSortAlgo.removeExtension(name);\r\n }", "public void deleteMapName(String name){\n\t\tLinkedList<String> names=new LinkedList<String>();\n\t\t\n\t\tboolean present = false;\n\t\tFileReader r;\n\t\ttry {\n\t\t\tr = new FileReader (\"mapRecords.txt\");\n\t\t\tBufferedReader b = new BufferedReader (r);\n\t\t\tString s=b.readLine();\n\t\t\t\n\t\t\twhile(s!=null){\n\t\t\t\tif(s.equals(name))\n\t\t\t\t\tpresent =true; \n\t\t\t\t\n\t\t\t\tnames.add(s);\n\t\t\t\ts=b.readLine();\n\t\t\t\t\n\t\t\t}\n\n\t\t\tr.close();\n\t\t\tb.close();\n\t\t\t\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//e.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.out.println(\"Can't read file\");\n\t\t}\n\t\t\n\n\t\tif (present){\n\t\t\tnames.remove(name);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFileWriter w= new FileWriter(new File(\"mapRecords.txt\"));\n\t\t\t\tfor (String n: names){\n\t\t\t\t\tw.write(n+\"\\n\");\n\t\t\t\t\tw.write(System.lineSeparator())\t;\n\t\t\t\t}\t\n\t\t\t\tw.flush();\n\t\t\t\tw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e.printStackTrace();\n\t\t\t\tSystem.out.println(\"Can't write to the file\");\n\t\t\t}\n\t\t}\n\t\telse //there is nothing to remove the file is not present \n\t\t\treturn;\n\t\t\n\t}", "public void clearStartAlphabet()\n\t\t\t{\n\t\t\t}", "public boolean destroyBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buff = null;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuff = Bookings.get(i);\r\n\t\t\t\tif(name.contentEquals(buff.getBooker())) {\r\n\t\t\t\t\tBookings.remove(buff);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}", "public void removeName(Name arg0) {\n\n\t}", "@RequestLine(\"DELETE /zones/{zoneName}\")\n void deleteZone(@Param(\"zoneName\") final String zoneName);", "@Override\n\tpublic void eliminaCategoria(String nome) {\n\t\tDB db = getDB();\n\t\tMap<Long, Categoria> categorie = db.getTreeMap(\"categorie\");\n\t\tlong hash = nome.hashCode();\n\t\tcategorie.remove(hash);\n\t\tdb.commit();\n\t}", "String removeAccount(String userName);", "public void delete(String username);", "SpCharInSeq delete(Integer spcharinseqId);" ]
[ "0.80442345", "0.6857633", "0.6455481", "0.6362956", "0.632333", "0.61494166", "0.6128829", "0.6081621", "0.6081621", "0.60195166", "0.59811544", "0.5972112", "0.5954892", "0.5952085", "0.5944898", "0.5941242", "0.59140164", "0.58870286", "0.58770597", "0.5875322", "0.58717525", "0.58351654", "0.58091676", "0.58028156", "0.57877016", "0.57805204", "0.5776045", "0.5769305", "0.57272583", "0.57052773", "0.56769896", "0.56683564", "0.5660501", "0.5654284", "0.565395", "0.5629904", "0.5626475", "0.56147176", "0.5614414", "0.5590963", "0.55892015", "0.55752176", "0.55616224", "0.5542751", "0.5542448", "0.55211544", "0.5519651", "0.54922575", "0.5488825", "0.5488037", "0.54833025", "0.548201", "0.5479901", "0.5464206", "0.54498166", "0.54430485", "0.5431129", "0.5418179", "0.54154944", "0.54116565", "0.54113626", "0.5400563", "0.5398145", "0.53885347", "0.5369595", "0.5362817", "0.53517705", "0.5351473", "0.5351407", "0.53451306", "0.5339716", "0.5312251", "0.531147", "0.5311386", "0.53104013", "0.5294405", "0.5291285", "0.5288361", "0.52822393", "0.52805424", "0.52726376", "0.52715343", "0.527103", "0.52685875", "0.526853", "0.525854", "0.5253001", "0.5239201", "0.52382267", "0.5233277", "0.5223249", "0.5217076", "0.5210308", "0.52034515", "0.5203354", "0.519944", "0.51945937", "0.51926535", "0.5191813", "0.5189629" ]
0.7036556
1
To be called from commandline for testing
public void apkk() { this.apkInfo = new apkinfo(); this.apkInfo.selectAPKInput(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "public static void main(String[] args)\r\t{", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(String[] args) {\n\n\t\t\n\t}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "public static void main(String[] args){\n\t\t\r\n\t}", "public static void main(String[] args) {\n \n \n \n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = new String[]{\"-i\", \"-p\", \"src/test/resources/problems_resp.xml\", \"src/test/resources/context.txt\"};\n PrintStream prev = System.out;\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(bos));\n XpathGenerator.main(args);\n System.setOut(prev);\n System.out.println(bos.toString());\n assertTrue(bos.toString().startsWith(\"/fhir:Bundle[1]\"));\n }", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\t\n\t\t\n\t}", "private CommandLine() {\n\t}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[]args) {\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\n\t\t\n\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "void main(CommandLine cmd);", "public static void main(String[] args) {\t}", "public static void main(String[] args) {\n\t\t\t\t\n\t}", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String []args){\n\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "static public void main(String[] args) {\n\t}", "public static void main(String[] args) {\n \n\t\t}", "public static void main (String[]args) throws IOException {\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}" ]
[ "0.69554496", "0.67720747", "0.66833013", "0.6657526", "0.66457224", "0.66457224", "0.66251415", "0.6564648", "0.655858", "0.65566844", "0.65566844", "0.65566844", "0.6542321", "0.6539871", "0.6533099", "0.652403", "0.64940315", "0.6486689", "0.64813495", "0.6472378", "0.6472378", "0.6472378", "0.6472378", "0.6472378", "0.6472378", "0.6472378", "0.6472378", "0.6472378", "0.6470488", "0.64664894", "0.64655954", "0.6464133", "0.6461882", "0.6461816", "0.64554876", "0.6444065", "0.6444065", "0.6444065", "0.6444065", "0.6432996", "0.6428452", "0.6428452", "0.6420699", "0.6420699", "0.6420699", "0.6420699", "0.6420699", "0.6420699", "0.64200175", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6418748", "0.6417711", "0.6417711", "0.6417711", "0.6417711", "0.6417711", "0.6417711", "0.6417711", "0.6412763", "0.6410763", "0.6403896", "0.63947475", "0.63920265", "0.638704", "0.63788706", "0.63740027", "0.63740027", "0.63740027", "0.63740027", "0.63657725", "0.63657725", "0.63619214", "0.6357235", "0.63554895", "0.6348927" ]
0.0
-1
parses the methods given. When the method is of the format object:action, this will translate to actionObject
private String parseMethod() { String[] splitted = command.split(":", 2); if (splitted.length == 1) { return splitted[0]; } else { return splitted[1] + splitted[0].substring(0, 1).toUpperCase() + splitted[0].substring(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addActions(Object bean) {\n Class<?> clazz = bean.getClass();\n Method[] ms = clazz.getMethods();\n for (Method m : ms) {\n if (isActionMethod(m)) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n String url = mapping.value();\n UrlMatcher matcher = new UrlMatcher(url);\n if (matcher.getArgumentCount()!=m.getParameterTypes().length) {\n warnInvalidActionMethod(m, \"Arguments in URL '\" + url + \"' does not match the arguments of method.\");\n continue;\n }\n log.info(\"Mapping url '\" + url + \"' to method '\" + m.toGenericString() + \"'.\");\n urlMap.put(matcher, new Action(bean, m));\n }\n }\n }", "protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }", "Object executeMethodCall(ActionType actionType, String actionName, Map<String, Object> inParams) throws APIException;", "protected void init_actions()\r\n {\r\n action_obj = new CUP$parser$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$parser$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$A4Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$A4Parser$actions(this);\n }", "abstract String applicable(Method[] getters) throws InvalidObjectException;", "protected void init_actions()\r\n {\r\n action_obj = new CUP$MJParser$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$ParserForms$actions(this);\n }", "K invoke(Map<String, Method> methods, T object);", "String[] getActions();", "protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$CoolParser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$CompParser$actions(this);\n }", "protected abstract void action(Object obj);", "protected void init_actions()\n {\n action_obj = new CUP$XPathParser$actions(this);\n }", "public void executeAction( String actionInfo );", "protected void init_actions()\r\n {\r\n action_obj = new CUP$LuaGrammarCup$actions(this);\r\n }", "@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }", "private void processGameAction(GameAction gameAction) {\r\n // Get all of the methods to be called by this setting as strings\r\n ArrayList<String> methods = gameAction.getGameActionMethods();\r\n \r\n // Set each method into an array to be run using the mapMethodSetting\r\n for (String methodName : methods) {\r\n try {\r\n // Get the specific method to run from this class \r\n Method method = GameManager.class.getMethod(methodName, \r\n this.methodMapGameActions.get(methodName));\r\n \r\n // Set an array to hold the arguments for this \r\n Object[] arguments = \r\n new Object[method.getParameterTypes().length];\r\n \r\n // Loop through the values and add them to the arguments list\r\n for (int i = 0; i < arguments.length; i++) {\r\n arguments[i] = gameAction.getNextActionValue();\r\n }\r\n \r\n // Invoke the method with the arguments array\r\n method.invoke(this, arguments);\r\n }\r\n catch (NoSuchMethodException|IllegalAccessException|\r\n InvocationTargetException e) {\r\n System.out.println(e.getCause());\r\n }\r\n }\r\n }", "boolean isActionMethod(Method m) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n if (mapping==null)\n return false;\n if (mapping.value().length()==0) {\n warnInvalidActionMethod(m, \"Url mapping cannot be empty.\");\n return false;\n }\n if (Modifier.isStatic(m.getModifiers())) {\n warnInvalidActionMethod(m, \"method is static.\");\n return false;\n }\n Class<?>[] argTypes = m.getParameterTypes();\n for (Class<?> argType : argTypes) {\n if (!converterFactory.canConvert(argType)) {\n warnInvalidActionMethod(m, \"unsupported parameter '\" + argType.getName() + \"'.\");\n return false;\n }\n }\n Class<?> retType = m.getReturnType();\n if (retType.equals(void.class)\n || retType.equals(String.class)\n || Renderer.class.isAssignableFrom(retType)\n )\n return true;\n warnInvalidActionMethod(m, \"unsupported return type '\" + retType.getName() + \"'.\");\n return false;\n }", "public static Action parseLine(String string){\n String[] arr = string.split(\"\\\\.\");\n String[] command = arr[1].split(\"\\\\(\"); //[\"move\", \"3);\"]\n String method = command[0];\n String value = command[1].split(\"\\\\)\")[0];\n\n if (method.equals(\"move\")) {\n return new Action(Action.ActionType.MOVE, Integer.parseInt(value));\n } else if (method.equals(\"turn\")) {\n if (value.equals(\"right\")) {\n return new Action(Action.ActionType.TURN_RIGHT, -1);\n } else {\n return new Action(Action.ActionType.TURN_LEFT, -1);\n }\n }\n\n return null;\n\n }", "protected abstract Action stringToAction(String stringAction);", "@Test\n\tpublic void testGetActionMethods() throws ClassNotFoundException,\n\t\t\tNoSuchMethodException, SecurityException {\n\t\tConcreteActionsFactory concreteActionsFactory = new ConcreteActionsFactory();\n\n\t\tClass clazz = Class.forName(\"org.dsol.service.ConcreteActions1\");\n\t\tList<Method> methods = concreteActionsFactory.getActionMethods(clazz);\n\n\t\tAssert.assertEquals(2, methods.size());\n\n\t\tAssert.assertTrue(methods.contains(clazz.getMethod(\"hi\", String.class,\n\t\t\t\tString.class)));\n\t\tAssert.assertTrue(methods.contains(clazz.getMethod(\"getStarted\")));\n\n\t}", "private void parseOpcode(final List<Action> actions) throws AssemblerException\n {\n final FileLocation opfl = this.getFileLocation();\n final String opcs = this.getStringValue();\n final HashMap<AddressingMode, Opcode> opcm = Opcodes.BY_NAME_MAPPED.get(opcs);\n this.consume();\n\n final int actionsBefore = actions.size();\n\n // Is next token unrelated?\n AddressingMode addrMode = null;\n if (this.peek().getType() == Token.Type.IMMEDIATE)\n {\n addrMode = AddressingMode.IMMEDIATE;\n this.consume();\n }\n else if (opcm.size() == 1 && opcm.containsKey(AddressingMode.RELATIVE))\n {\n addrMode = AddressingMode.RELATIVE;\n }\n else\n {\n boolean nextUnrelated = false;\n switch (this.peek().getType())\n {\n case OPCODE:\n case LABEL:\n case SUB_LABEL:\n case META:\n case EOF:\n case STRING:\n case SCR_STRING:\n nextUnrelated = true;\n break;\n case PC:\n case WORD:\n case SUB_WORD:\n nextUnrelated = this.peek(1).getType() == Token.Type.ASSIGN;\n break;\n default:\n break;\n }\n if (nextUnrelated)\n {\n addrMode = AddressingMode.IMPLIED;\n }\n }\n\n if (addrMode != null) // Implied, Immediate\n {\n final Opcode opc = opcm.get(addrMode);\n if (opc == null)\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n switch (addrMode)\n {\n case IMMEDIATE:\n case RELATIVE:\n actions.addAll(this.parseExpression());\n actions.add(new AssembleOpcodeAction(opfl, opc));\n break;\n case IMPLIED:\n actions.add(new AssembleOpcodeAction(opfl, opc));\n break;\n default:\n throw new AssemblerException(opfl, \"Internal error, uncatched addressing mode: \" + addrMode);\n }\n }\n else\n {\n // Check for indirect modes\n if (this.peek().getType() == Type.BRACE_OPEN)\n {\n this.consume();\n actions.addAll(this.parseExpression());\n if (this.peek().getType() == Token.Type.COMMA)\n {\n this.consume();\n if (this.peek().getType() != Token.Type.WORD || !this.peek().getStringValue().equals(\"X\"))\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode, ',X' expected\");\n }\n this.consume();\n if (this.peek().getType() != Token.Type.BRACE_CLOSE)\n {\n throw new AssemblerException(this.getFileLocation(), \"')' expected\");\n }\n this.consume();\n addrMode = AddressingMode.INDIRECT_INDEXED;\n }\n else if (this.peek().getType() == Token.Type.BRACE_CLOSE)\n {\n this.consume();\n if (this.peek().getType() == Token.Type.COMMA)\n {\n this.consume();\n if (this.peek().getType() != Token.Type.WORD || !this.peek().getStringValue().equals(\"Y\"))\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode, 'Y' expected\");\n }\n this.consume();\n addrMode = AddressingMode.INDEXED_INDIRECT;\n }\n else\n {\n addrMode = AddressingMode.INDIRECT;\n }\n }\n else\n {\n throw new AssemblerException(this.getFileLocation(), \"Syntax error\");\n }\n final Opcode opc = opcm.get(addrMode);\n if (opc == null)\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n actions.add(new AssembleOpcodeAction(opfl, opc));\n }\n else\n {\n final List<Action> expr = this.parseExpression();\n actions.addAll(expr);\n final Long exprValue = this.evaluateStaticExpression(expr);\n final int width = exprValue == null ? 0 : ((exprValue.longValue() & 0xffff) < 256 ? 1 : 2);\n final int index;\n if (this.peek().getType() == Token.Type.COMMA)\n {\n this.consume();\n if (this.peek().getType() == Token.Type.WORD && this.peek().getStringValue().equals(\"Y\"))\n {\n index = 2;\n }\n else if (this.peek().getType() == Token.Type.WORD && this.peek().getStringValue().equals(\"X\"))\n {\n index = 1;\n }\n else\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode, 'X' or 'Y' expected\");\n }\n this.consume();\n }\n else\n {\n index = 0;\n }\n\n int mask = 0;\n switch (index)\n {\n case 0:\n mask = (opcm.containsKey(AddressingMode.ZEROPAGE) ? 1 : 0)\n | (opcm.containsKey(AddressingMode.ABSOLUTE) ? 2 : 0);\n break;\n case 1:\n mask = (opcm.containsKey(AddressingMode.ZEROPAGE_X) ? 1 : 0)\n | (opcm.containsKey(AddressingMode.ABSOLUTE_X) ? 2 : 0);\n break;\n case 2:\n mask = (opcm.containsKey(AddressingMode.ZEROPAGE_Y) ? 1 : 0)\n | (opcm.containsKey(AddressingMode.ABSOLUTE_Y) ? 2 : 0);\n break;\n }\n if (mask == 0)\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n\n switch (width)\n {\n case 0:\n if (mask == 3)\n {\n switch (index)\n {\n case 0:\n actions.add(new AssembleOpcodeAction(opfl, opcs, WidthType.ABSOLUTE));\n break;\n case 1:\n actions.add(new AssembleOpcodeAction(opfl, opcs, WidthType.ABSOLUTE_X));\n break;\n case 2:\n actions.add(new AssembleOpcodeAction(opfl, opcs, WidthType.ABSOLUTE_Y));\n break;\n }\n }\n else\n {\n switch (index)\n {\n case 0:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE : AddressingMode.ABSOLUTE;\n break;\n case 1:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_X : AddressingMode.ABSOLUTE_X;\n break;\n case 2:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_Y : AddressingMode.ABSOLUTE_Y;\n break;\n }\n actions.add(new AssembleOpcodeAction(opfl, opcm.get(addrMode)));\n }\n break;\n case 1:\n switch (index)\n {\n case 0:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE : AddressingMode.ABSOLUTE;\n break;\n case 1:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_X : AddressingMode.ABSOLUTE_X;\n break;\n case 2:\n addrMode = (mask & 1) != 0 ? AddressingMode.ZEROPAGE_Y : AddressingMode.ABSOLUTE_Y;\n break;\n }\n actions.add(new AssembleOpcodeAction(opfl, opcm.get(addrMode)));\n break;\n case 2:\n switch (index)\n {\n case 0:\n addrMode = AddressingMode.ABSOLUTE;\n break;\n case 1:\n addrMode = AddressingMode.ABSOLUTE_X;\n break;\n case 2:\n addrMode = AddressingMode.ABSOLUTE_Y;\n break;\n }\n if (addrMode == null || !opcm.containsKey(addrMode))\n {\n throw new AssemblerException(opfl, \"Illegal addressing mode\");\n }\n actions.add(new AssembleOpcodeAction(opfl, opcm.get(addrMode)));\n break;\n }\n }\n }\n // TODO ... *sigh*\n if (actionsBefore == actions.size())\n {\n throw new AssemblerException(opfl, \"Internal error, no opcode action written\");\n }\n }", "public final java_cup.runtime.Symbol CUP$A4Parser$do_action(\n int CUP$A4Parser$act_num,\n java_cup.runtime.lr_parser CUP$A4Parser$parser,\n java.util.Stack CUP$A4Parser$stack,\n int CUP$A4Parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$A4Parser$result;\n\n /* select the action based on the action number */\n switch (CUP$A4Parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // type ::= STRING \n {\n String RESULT = null;\n\t\t RESULT = \"String\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(21/*type*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // type ::= REAL \n {\n String RESULT = null;\n\t\t RESULT = \"double\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(21/*type*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // type ::= INT \n {\n String RESULT = null;\n\t\t RESULT = \"int\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(21/*type*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // EPActualParams ::= \n {\n String RESULT = null;\n\t\t RESULT = \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(18/*EPActualParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // EPActualParams ::= COMMA expr EPActualParams \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \", \" + x1 + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(18/*EPActualParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // ActualParams ::= expr EPActualParams \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(17/*ActualParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // expr ::= INTNUMBER \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // expr ::= REALNUMBER \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // expr ::= IDENTIFIER LPAREN ActualParams RPAREN \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = x1 + \"(\" + x2 + \")\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // expr ::= IDENTIFIER \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // expr ::= LPAREN expr RPAREN \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = \"(\" + x1 + \")\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // expr ::= expr DIVIDE expr \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \"/\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // expr ::= expr TIMES expr \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \"*\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // expr ::= expr MINUS expr \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \"-\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // expr ::= expr PLUS expr \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \"+\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // BoolExpression ::= expr ISNOTEQUAL expr \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \"!=\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(20/*BoolExpression*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // BoolExpression ::= expr ISEQUAL expr \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \"==\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(20/*BoolExpression*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // ReadStmt ::= READ LPAREN IDENTIFIER COMMA QUOTE RPAREN SEMI \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\t RESULT = \"$br = new BufferedReader(new FileReader(\" + x2 + \"));\" + x1 + \"=new Integer($br.readLine()).intValue();\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(16/*ReadStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // WriteStmt ::= WRITE LPAREN expr COMMA QUOTE RPAREN SEMI \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\t RESULT = \"$tmp_real=\" + x1 + \";\\n$bw=new BufferedWriter(new FileWriter(\" + x2 + \"));\\n$bw.write(\\\"\\\" + $tmp_real);\\n$bw.close();\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(15/*WriteStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // IfStmt ::= IF LPAREN BoolExpression RPAREN Statment ELSE Statment \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x3left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x3right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x3 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"if (\" + x1 + \")\" + x2 + \" else \" + x3; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(14/*IfStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // IfStmt ::= IF LPAREN BoolExpression RPAREN Statment \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"if (\" + x1 + \")\" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(14/*IfStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // ReturnStmt ::= RETURN expr SEMI \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = \"return \" + x1 + \";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(13/*ReturnStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // AssignStmt ::= IDENTIFIER EQUAL QUOTE SEMI \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = x1 + \"=\" + x2 + \";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*AssignStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // AssignStmt ::= IDENTIFIER EQUAL expr SEMI \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = x1 + \"=\" + x2 + \";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*AssignStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // LocalVarDecl ::= type AssignStmt \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \" \" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(11/*LocalVarDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // LocalVarDecl ::= type IDENTIFIER SEMI \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = x1 + \" \" + x2 + \";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(11/*LocalVarDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // Statment ::= ReadStmt \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // Statment ::= WriteStmt \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // Statment ::= IfStmt \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // Statment ::= ReturnStmt \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // Statment ::= AssignStmt \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // Statment ::= LocalVarDecl \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // Statment ::= Block \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*Statment*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // Statements ::= Statment \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(9/*Statements*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // Statements ::= Statment Statements \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(9/*Statements*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // Block ::= BEGIN Statements END \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = \"{\" + x1 + \"}\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(8/*Block*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // FormalParam ::= type IDENTIFIER \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \" \" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(5/*FormalParam*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // EPFormalParams ::= \n {\n String RESULT = null;\n\t\t RESULT = \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(7/*EPFormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // EPFormalParams ::= COMMA FormalParam EPFormalParams \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \", \" + x1 + \" \" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(7/*EPFormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // FormalParams ::= \n {\n String RESULT = null;\n\t\t RESULT = \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(6/*FormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // FormalParams ::= FormalParam EPFormalParams \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \" \" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(6/*FormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // MethodDecl ::= type IDENTIFIER LPAREN FormalParams RPAREN Block \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint x3left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x3right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x3 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x4left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x4right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x4 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"public static \" + x1 + \" \" + x2 + \"(\" + x3 + \")\" + x4; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(4/*MethodDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // MethodDecl ::= type MAIN IDENTIFIER LPAREN FormalParams RPAREN Block \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint x3left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint x3right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString x3 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint x4left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x4right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x4 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"public static void main (String[] args) throws Exception\" + x4; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(4/*MethodDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // Program ::= MethodDecl Program \n {\n String RESULT = null;\n\t\tint x1left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint x1right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString x1 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint x2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint x2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x1 + \" \" + x2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(3/*Program*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // Program ::= MethodDecl \n {\n String RESULT = null;\n\t\tint xleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint xright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString x = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = x; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(3/*Program*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= Program2 EOF \n {\n Object RESULT = null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString start_val = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$A4Parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n /* ACCEPT */\n CUP$A4Parser$parser.done_parsing();\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // Program2 ::= Program \n {\n String RESULT = null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString e = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"import java.io.*;\\npublic class A4 {\\n static BufferedReader $br;\\nstatic BufferedWriter $bw;\\nstatic double $tmp_real;\\n\" + e + \"}\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(22/*Program2*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number found in internal parse table\");\n\n }\n }", "public T caseAction(Action object) {\n\t\treturn null;\n\t}", "protected void init_actions()\r\n {\r\n action_obj = new CUP$AnalizadorSintactico$actions(this);\r\n }", "public static Collection<Action> actions(String... ids) {\n/* 216 */ List<Action> result = new ArrayList<>();\n/* 217 */ for (String id : ids) {\n/* 218 */ if (id.startsWith(\"---\")) result.add(ActionUtils.ACTION_SEPARATOR); \n/* 219 */ Action action = action(id);\n/* 220 */ if (action != null) result.add(action); \n/* */ } \n/* 222 */ return result;\n/* */ }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$SintaxAnalysis$actions(this);\r\n }", "@Override\n\tpublic Void visit(OwnMethodCall method) {\n\t\tprintIndent(\"implicit dispatch\");\n\t\tindent++;\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Override\n\tpublic Action[] getActions(Object target, Object sender) {\n\t\treturn ACTIONS;\n\t}", "private static String getActionFromMessageAttributes(MessageInfo msgInfo) {\n String action = null;\n if (msgInfo != null\n && msgInfo.getExtensionAttributes() != null) {\n String attr = getAction(msgInfo);\n if (attr != null) {\n action = attr;\n msgInfo.setProperty(ACTION, action);\n }\n }\n return action;\n }", "public ActionList getActions();", "public interface ObjectAction {\n\t/**\n\t * Get menu filter associated with the tool\n\t */\n\tpublic ObjectMenuFilter getMenuFilter();\n\n\t/**\n\t * Sets menu filter for the tool\n\t */\n\tpublic void setMenuFilter(ObjectMenuFilter filter);\n\n\t/**\n\t * Get tool type\n\t */\n\tpublic int getToolType();\n\n\t/**\n\t * Check if this action is applicable to given node\n\t * \n\t * @param node\n\t * node object\n\t * @return true if applicable\n\t */\n\tpublic boolean isApplicableForNode(AbstractNode node);\n}", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "public interface MyActions {\n\n String GET_ROUTINES = \"get-routines\";\n String RENAME_ROUTINE = \"rename-routine\";\n String DELETE_ROUTINE = \"delete-routine\";\n String CREATE_ROUTINE = \"create-routine\";\n String UPDATE_TASKS = \"update-tasks\";\n String GET_TASKS = \"get-tasks\";\n\n String CREATE_TASK = \"create-task\";\n String DELETE_TASK = \"delete-task\";\n void deleteTask(String routine, Task task);\n String UPDATE_TASK = \"update-task\";\n String UPDATE_BREAK_INTERVAL = \"update-break-interval\";\n String GET_BREAK_INTERVAL = \"get-break-interval\";\n String SAVE_HISTORY = \"save-history\"; //save after each task completes\n String GET_HISTORY = \"get-history\";\n String LOGIN = \"login\";\n\n void getRoutines();\n\n void renameRoutine(String oldName, String newName);\n\n void deleteRoutine(String routine);\n\n void createRoutine(String name, int priority);\n\n void updateTask(String routine, Task oldTask, Task newTask, int position);\n\n void updateBreakInterval(String routine, int interval);\n\n void getBreakInterval(String routine);\n\n void getTasks(String routine);\n\n void createTask(String routine, Task task, int priority);\n\n void updateTasks(String routine, List<Task> tasks);\n\n void login(String userEmail);\n\n void saveHistory(String routine, Task task, String date, String time);\n\n void getHistory();\n\n}", "String getMethod();", "String getMethod();", "private void findMethods() {\n List<Method> methods = new ArrayList<Method>(Arrays.asList(getObject().getClass().getMethods()));\r\n List<Method> objectMethods = new ArrayList<Method>(Arrays.asList(Object.class.getMethods()));\r\n methods.removeAll(objectMethods);\r\n \r\n for(Method method:methods) {\r\n //does method have @ManagedAttribute annotation?\r\n if(method.isAnnotationPresent(ManagedAttribute.class) || method.isAnnotationPresent(Property.class)) {\r\n exposeManagedAttribute(method);\r\n }\r\n //or @ManagedOperation\r\n else if (method.isAnnotationPresent(ManagedOperation.class) || isMBeanAnnotationPresentWithExposeAll()){\r\n exposeManagedOperation(method); \r\n } \r\n }\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$Sintactico$actions(this);\n }", "@Override\r\n\tpublic void actionMapper(String action) {\n\t\tProperty prop = javaScriptWindow.propertyTable.getPropertyTable()\r\n\t\t\t\t.getSelectedProperty();\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.SAVEASNEWBUTTON)) {\r\n\t\t\tsaveAsNewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.NEWBUTTON)) {\r\n\t\t\tnewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.LOADBUTTON)) {\r\n\t\t\tloadButtonAction();\r\n\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(JavaScriptConstants.SEARCHTEXTBOX)) {\r\n\t\t\tsearchTextAction();\r\n\t\t}\r\n\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.RIGHTSIDECENTERTABLE)) {\r\n\t\t\trightSideCenterTableAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.DELETEBUTTON)) {\r\n\t\t\tdeleteButtonAction();\r\n\t\t}\r\n\t}", "@Override\n\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\tparsingMethod = new Method(name, desc, parsingClass);\n\t\tparsingClass.getMethods().add(parsingMethod);\n\t\treturn completeMethodVisitor;\n\t}", "public static void parseActions(EList<Action> actions, BufferedWriter writer, ResourceMapping resMap) throws IOException {\n\t\tint count = actions.size();\n\t\tfor(Action action : actions) {\n\t\t\tString concept = action.getState().getName();\n\t\t\t//TODO now it's simplified without dealing with parameters... and set..\n\t\t\twriter.write(resMap.getDSL_Resource(concept).getName() + \".act() \");\n\t\t\tif(--count > 0) {\n\t\t\t\twriter.write(\" , \");\n\t\t\t}\n\t\t}\n\t\twriter.write(\"\\r\\n\");\n\t}", "protected void init_actions()\n {\n action_obj = new CUP$Asintactico$actions(this);\n }", "@Override\r\n public void refactor(AnActionEvent e)\r\n {\r\n PsiElementFactory factory = PsiElementFactory.getInstance(project);\r\n\r\n String[] splited = targetMethodCallExp.getText().replace(\"()\", \"\").split(\"\\\\.\");\r\n String replaced = splited[0] + \".\" + splited[2] + \"()\";\r\n String type = targetMethodCallExp.getType().getPresentableText();\r\n PsiExpression exp = factory.createExpressionFromText(replaced, null);\r\n\r\n String Method = \"public \" + type + \" \" + splited[2] + \"() {\\n\" +\r\n reference + \".\" + splited[2] + \"();\\n\" +\r\n \"}\";\r\n\r\n PsiMethod method = factory.createMethodFromText(Method, null);\r\n PsiClass cls = isReturnTypeExistedAsClass(targetType, targetClass);\r\n\r\n WriteCommandAction.runWriteCommandAction(project, () -> {\r\n targetMethodCallExp.replace(exp);\r\n cls.addBefore(method, cls.getLastChild());\r\n });\r\n }", "public String parseBattleAction() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Attack (A)\");\n\t\tSystem.out.println(\"Spell (S)\");\n\t\tSystem.out.println(\"Equip/Unequip/Use Item (E)\");\n\t\tboolean isValidMove = false;\n\t\tString s = null;\n\t\twhile(!isValidMove) {\n\t\t\t s = parseString().toUpperCase();\n\t\t\t\n\t\t\tswitch(s) {\n\t\t\t\tcase \"A\":\t\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"P\":\n\t\t\t\t\tisValidMove = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprintErrorParse();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t\t\n\t}", "CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }", "Object executeMethodCall(String actionName, String inMainParamValue) throws APIException;", "public Action newAction(Object data) throws Exception;", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public Action[] getActions(Object target, Object sender) {\n \t\treturn actions;\n \t}", "@SuppressWarnings(\"unchecked\")\n private static void parseActions() throws DataConversionException {\n \t\n \tlogger.info(\"Parsing actions !\");\n \t\n imagingActions = new ArrayList<ImagingAction>();\n \n SAXBuilder sxb = new SAXBuilder();\n Document document = null;\n try {\n String url = \"imaging-fdsdocument-actions.xml\";\n URI uri = ImagingActionsParser.class.getClassLoader().getResource(url).toURI();\n File actionsFileDefinition = new File(uri);\n document = sxb.build(actionsFileDefinition);\n } catch (Exception e) {\n logger.error(\"Cannot parse imaging actions xml !\");\n }\n\n Element racine = document.getRootElement();\n List<Element> actions = (List<Element>) racine.getChildren(\"action\");\n Iterator<Element> actionsIterator = actions.iterator();\n while (actionsIterator.hasNext()) {\n Element currentAction = actionsIterator.next();\n \n //Constructor put default values\n ImagingAction imagingAction = new ImagingAction();\n //ACTION NAME\n imagingAction.setName(currentAction.getChild(\"name\").getText());\n //ACTION TYPE\n Attribute attrType = currentAction.getAttribute(\"type\");\n if (attrType != null) {\n imagingAction.setType(attrType.getValue());\n if (attrType.getValue().equals(\"url\")) {\n \t//ACTION URL TARGET\n \tAttribute attrTarget = currentAction.getAttribute(\"target\");\n \timagingAction.setUrlTarget(attrTarget.getValue());\n }\n }\n //ACTION URL\n Element urlElement = currentAction.getChild(\"url\");\n if (urlElement != null) {\n imagingAction.setUrl(urlElement.getText());\n }\n //ACTION EVALUATOR\n Element evaluatorsElement = currentAction.getChild(\"evaluators\");\n if (evaluatorsElement != null) {\n\t List<Element> evaluators = (List<Element>) evaluatorsElement.getChildren(\"evaluator\");\n\t Iterator<Element> evalIterator = evaluators.iterator();\n\t while (evalIterator.hasNext()) {\n\t Element evaluator = evalIterator.next();\n\t Attribute negateAttribute = evaluator.getAttribute(\"negate\");\n\t boolean negate = false;\n\t if (negateAttribute != null && negateAttribute.getBooleanValue()) {\n\t negate = true;\n\t }\n\t imagingAction.addEvaluator(new ImagingActionEvaluator(evaluator.getText(), negate));\n\t }\n }\n //ACTION DISPLAY VIEWS\n Element displayElement = currentAction.getChild(\"display\");\n if (displayElement != null) {\n\t List<Element> views = (List<Element>) displayElement.getChildren(\"view\");\n\t Iterator<Element> viewIterator = views.iterator();\n\t while (viewIterator.hasNext()) {\n\t Element view = viewIterator.next();\n\t imagingAction.addView(view.getText());\n\t }\n }\n imagingActions.add(imagingAction);\n }\n }", "public abstract Action getAction();", "public static void register(Object target) {\n/* 116 */ for (Method method : target.getClass().getDeclaredMethods()) {\n/* */ \n/* 118 */ Annotation[] annotations = method.getAnnotationsByType((Class)ActionProxy.class);\n/* 119 */ if (annotations.length != 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 127 */ int paramCount = method.getParameterCount();\n/* 128 */ Class[] paramTypes = method.getParameterTypes();\n/* */ \n/* 130 */ if (paramCount > 2) {\n/* 131 */ throw new IllegalArgumentException(String.format(\"Method %s has too many parameters\", new Object[] { method.getName() }));\n/* */ }\n/* */ \n/* 134 */ if (paramCount == 1 && !ActionEvent.class.isAssignableFrom(paramTypes[0])) {\n/* 135 */ throw new IllegalArgumentException(String.format(\"Method %s -- single parameter must be of type ActionEvent\", new Object[] { method.getName() }));\n/* */ }\n/* */ \n/* 138 */ if (paramCount == 2 && (!ActionEvent.class.isAssignableFrom(paramTypes[0]) || \n/* 139 */ !Action.class.isAssignableFrom(paramTypes[1]))) {\n/* 140 */ throw new IllegalArgumentException(String.format(\"Method %s -- parameters must be of types (ActionEvent, Action)\", new Object[] { method.getName() }));\n/* */ }\n/* */ \n/* 143 */ ActionProxy annotation = (ActionProxy)annotations[0];\n/* */ \n/* 145 */ AnnotatedActionFactory factory = determineActionFactory(annotation);\n/* 146 */ AnnotatedAction action = factory.createAction(annotation, method, target);\n/* */ \n/* 148 */ String id = annotation.id().isEmpty() ? method.getName() : annotation.id();\n/* 149 */ actions.put(id, action);\n/* */ } \n/* */ } \n/* */ }", "public final java_cup.runtime.Symbol CUP$A4Parser$do_action(\n int CUP$A4Parser$act_num,\n java_cup.runtime.lr_parser CUP$A4Parser$parser,\n java.util.Stack CUP$A4Parser$stack,\n int CUP$A4Parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$A4Parser$result;\n\n /* select the action based on the action number */\n switch (CUP$A4Parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // ActualParam ::= \n {\n String RESULT = null;\n\t\tRESULT=\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(22/*ActualParam*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // ActualParam ::= COMMA Expr ActualParam \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint apleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint apright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString ap = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \", \" + ex + ap; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(22/*ActualParam*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // ActualParams ::= \n {\n String RESULT = null;\n\t\t RESULT=\"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(21/*ActualParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // ActualParams ::= Expr ActualParam \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint apleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint apright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString ap = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = ex + ap + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(21/*ActualParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // BoolExpr ::= Expr NOTEQUAL Expr \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint ex2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint ex2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString ex2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = ex +\" != \" + ex2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(20/*BoolExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // BoolExpr ::= Expr EQUAL Expr \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint ex2left = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint ex2right = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString ex2 = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = ex +\" == \" + ex2; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(20/*BoolExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // PrimaryExpr ::= ID LEBRAC ActualParams RIGBRAC \n {\n String RESULT = null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).value;\n\t\tint apleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint apright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString ap = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = i+\"(\" +ap +\")\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(23/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // PrimaryExpr ::= LEBRAC Expr RIGBRAC \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = \"(\"+ ex +\")\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(23/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // PrimaryExpr ::= ID \n {\n String RESULT = null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = i + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(23/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // PrimaryExpr ::= NUMBER \n {\n String RESULT = null;\n\t\tint nleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint nright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tObject n = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = n + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(23/*PrimaryExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // MultiExprOps ::= \n {\n String RESULT = null;\n\t\tRESULT=\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(19/*MultiExprOps*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // MultiExprOps ::= DIVIDE PrimaryExpr MultiExprOps \n {\n String RESULT = null;\n\t\tint peleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint peright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString pe = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint meoleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint meoright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString meo = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\tRESULT = \"/\" + pe + meo; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(19/*MultiExprOps*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // MultiExprOps ::= MULT PrimaryExpr MultiExprOps \n {\n String RESULT = null;\n\t\tint peleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint peright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString pe = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint meoleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint meoright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString meo = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\tRESULT = \"*\" + pe + meo; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(19/*MultiExprOps*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // MultiExpr ::= PrimaryExpr MultiExprOps \n {\n String RESULT = null;\n\t\tint peleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint peright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString pe = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint meoleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint meoright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString meo = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\tRESULT = pe + meo + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(18/*MultiExpr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // ExprOps ::= \n {\n String RESULT = null;\n\t\tRESULT=\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(16/*ExprOps*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // ExprOps ::= PLUS MultiExpr ExprOps \n {\n String RESULT = null;\n\t\tint meleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint meright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString me = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint eoleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint eoright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString eo = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"+\" + me + eo + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(16/*ExprOps*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // ExprOps ::= MINUS MultiExpr ExprOps \n {\n String RESULT = null;\n\t\tint meleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint meright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString me = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint eoleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint eoright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString eo = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"-\" + me + eo + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(16/*ExprOps*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // Expr ::= MultiExpr ExprOps \n {\n String RESULT = null;\n\t\tint meleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint meright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString me = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint eoleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint eoright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString eo = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = me + eo + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(17/*Expr*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // ReadStmt ::= READ LEBRAC ID COMMA QUOTATIONS RIGBRAC SCOLON \n {\n String RESULT = null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint qleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint qright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tObject q = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\t RESULT = \"$br = new BufferedReader(new FileReader(\" + q + \"));\\n\" + i + \" = new Integer($br.readLine()).intValue();\\n$br.close();\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(15/*ReadStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // WriteStmt ::= WRITE LEBRAC Expr COMMA QUOTATIONS RIGBRAC SCOLON \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint qleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint qright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tObject q = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\t RESULT = \"$bw = new BufferedWriter(new FileWriter(\" + q +\"));\\n$bw.write(\\\"\\\"+ (\"+ex+\"));\\n$bw.close();\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(14/*WriteStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // unmdstmt ::= IF LEBRAC BoolExpr RIGBRAC mdstmt ELSE unmdstmt \n {\n String RESULT = null;\n\t\tint beleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint beright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString be = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint mleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint mright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString m = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint umleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint umright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString um = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"if( \" + be + \")\\n\" + m +\" else \" + um; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(7/*unmdstmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // unmdstmt ::= IF LEBRAC BoolExpr RIGBRAC _Statement \n {\n String RESULT = null;\n\t\tint beleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint beright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString be = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint _sleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint _sright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString _s = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"if( \" + be + \")\\n\" + _s; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(7/*unmdstmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // mdstmt ::= Other \n {\n String RESULT = null;\n\t\tint oleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint oright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString o = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = o + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(8/*mdstmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // mdstmt ::= IF LEBRAC BoolExpr RIGBRAC mdstmt ELSE mdstmt \n {\n String RESULT = null;\n\t\tint beleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint beright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tString be = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint mleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint mright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString m = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint dleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint dright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString d = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"if( \" + be + \")\\n\" + m +\" else \" + d; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(8/*mdstmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // _Statement ::= unmdstmt \n {\n String RESULT = null;\n\t\tint umleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint umright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString um = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = um + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(25/*_Statement*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // _Statement ::= mdstmt \n {\n String RESULT = null;\n\t\tint mleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint mright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString m = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = m + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(25/*_Statement*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // ReturnStmt ::= RETURN Expr SCOLON \n {\n String RESULT = null;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = \"return \" + ex +\";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(13/*ReturnStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // AssignStmt ::= ID COLEQUAL QUOTATIONS SCOLON \n {\n String RESULT = null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).value;\n\t\tint qleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint qright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tObject q = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = i + \"= \" + q +\";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(11/*AssignStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // AssignStmt ::= ID COLEQUAL Expr SCOLON \n {\n String RESULT = null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).value;\n\t\tint exleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint exright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString ex = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = i + \"= \" + ex +\";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(11/*AssignStmt*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // LocalVarDecl ::= Type AssignStmt \n {\n String RESULT = null;\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString h = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint asleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint asright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString as = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = h + as + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*LocalVarDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // LocalVarDecl ::= Type ID SCOLON \n {\n String RESULT = null;\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString h = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = h + i + \";\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(10/*LocalVarDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // Other ::= ReadStmt \n {\n String RESULT = null;\n\t\tint rtleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint rtright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString rt = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = rt + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*Other*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // Other ::= WriteStmt \n {\n String RESULT = null;\n\t\tint wsleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint wsright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString ws = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = ws + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*Other*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // Other ::= ReturnStmt \n {\n String RESULT = null;\n\t\tint rsleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint rsright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString rs = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = rs + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*Other*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // Other ::= AssignStmt \n {\n String RESULT = null;\n\t\tint asleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint asright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString as = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = as + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*Other*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // Other ::= LocalVarDecl \n {\n String RESULT = null;\n\t\tint lvleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint lvright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString lv = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = lv; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*Other*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // Other ::= Block \n {\n String RESULT = null;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString b = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = b; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(12/*Other*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // Statement ::= \n {\n String RESULT = null;\n\t\tRESULT=\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(24/*Statement*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // Statement ::= _Statement Statement \n {\n String RESULT = null;\n\t\tint _sleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint _sright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString _s = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString s = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \"\\n\" + _s + s + \"\\n\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(24/*Statement*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // Block ::= BEGIN _Statement Statement END \n {\n String RESULT = null;\n\t\tint _sleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint _sright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString _s = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString s = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\t RESULT = \"{\\n\" + _s + \"\\n\" + s +\"\\n}\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(9/*Block*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // FormalParam ::= Type ID \n {\n String RESULT = null;\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString h = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = h + i + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(5/*FormalParam*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // _FormalParams ::= \n {\n String RESULT = null;\n\t\tRESULT=\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(6/*_FormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // _FormalParams ::= COMMA FormalParam _FormalParams \n {\n String RESULT = null;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString f = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint pleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint pright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString p = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = \", \" + f + p; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(6/*_FormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // FormalParams ::= \n {\n String RESULT = null;\n\t\tRESULT=\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(4/*FormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // FormalParams ::= FormalParam _FormalParams \n {\n String RESULT = null;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString f = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint pleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint pright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString p = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t RESULT = f + p + \"\"; \n CUP$A4Parser$result = new java_cup.runtime.Symbol(4/*FormalParams*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // MethodDecl ::= Type ID LEBRAC FormalParams RIGBRAC Block \n {\n String RESULT = null;\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).right;\n\t\tString h = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).value;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString f = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString b = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t\n RESULT = \"static\"+ h + i + \"(\"+ f + \")throws Exception \" + b + \"\\n\";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(3/*MethodDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // MethodDecl ::= Type MAIN ID LEBRAC FormalParams RIGBRAC Block \n {\n String RESULT = null;\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).right;\n\t\tString h = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).value;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-4)).value;\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).right;\n\t\tString f = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-2)).value;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString b = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t\n RESULT = \"public static void main (String[] args) throws Exception\" + b + \"\\n\";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(3/*MethodDecl*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // _Program ::= \n {\n String RESULT = null;\n\t\tRESULT = \"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(2/*_Program*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // _Program ::= MethodDecl _Program \n {\n String RESULT = null;\n\t\tint dleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint dright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString d = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint gleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint gright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString g = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t\n RESULT = d + g+\"\";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(2/*_Program*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // Type ::= STRING \n {\n String RESULT = null;\n\t\t\n RESULT = \" String \";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(26/*Type*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // Type ::= REAL \n {\n String RESULT = null;\n\t\t\n RESULT = \" double \";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(26/*Type*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // Type ::= INT \n {\n String RESULT = null;\n\t\t\n RESULT = \" int \";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(26/*Type*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // Program ::= MethodDecl _Program \n {\n String RESULT = null;\n\t\tint dleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint dright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString d = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tint gleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint gright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString g = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\tRESULT= d+g+\"\";\n CUP$A4Parser$result = new java_cup.runtime.Symbol(1/*Program*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= ExtraNonTerminal EOF \n {\n Object RESULT = null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).right;\n\t\tString start_val = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$A4Parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n /* ACCEPT */\n CUP$A4Parser$parser.done_parsing();\n return CUP$A4Parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // ExtraNonTerminal ::= Program \n {\n String RESULT = null;\n\t\tint gleft = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left;\n\t\tint gright = ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right;\n\t\tString g = (String)((java_cup.runtime.Symbol) CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).value;\n\t\t\n RESULT = \"import java.io.*;\\npublic class A4\\n{\\nstatic BufferedReader $br;\\nstatic BufferedWriter $bw;\\n\" + g + \"\\n}\";\n \n CUP$A4Parser$result = new java_cup.runtime.Symbol(27/*ExtraNonTerminal*/, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$A4Parser$stack.elementAt(CUP$A4Parser$top-0)).right, RESULT);\n }\n return CUP$A4Parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number found in internal parse table\");\n\n }\n }", "protected void init_actions() {\r\n action_obj = new CUP$SintacticoH$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$Grm$actions();\n }", "public Method getActionMethod() {\n return this.method;\n }", "public interface ActionMapperVisitor {\r\n\r\n\t/**\r\n\t * This method creates a new AcquirePermitTile action according to the AcquirePermitTileDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * return an AcquirePermitTile action with all the parameters set\r\n\t */\r\n\tpublic AcquirePermitTile map(AcquirePermitTileDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new BuildByKing action according to the BuildByKingDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * return a BuildByKing action with all the parameters set\r\n\t */\r\n\tpublic BuildByKing map(BuildByKingDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new BuildByPermitTile action according to the BuildByPermitTileDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an BuildByPermitTile action with all the parameters set\r\n\t */\r\n\tpublic BuildByPermitTile map(BuildByPermitTileDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ChangePermitTiles action according to the ChangePermitTilesDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ChangePermitTiles action with all the parameters set\r\n\t */\r\n\tpublic ChangePermitTiles map(ChangePermitTilesDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ElectCouncillor action according to the ElectCouncillorDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ElectCouncillor action with all the parameters set\r\n\t */\r\n\tpublic ElectCouncillor map(ElectCouncillorDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ElectCouncillorByAssistant action according to the ElectCouncillorByAssistantDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ElectCouncillorByAssistant action with all the parameters set\r\n\t */\r\n\tpublic ElectCouncillorByAssistant map(ElectCouncillorByAssistantDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new MakeAnOffer action according to the MakeAnOfferDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an MakeAnOffer action with all the parameters set\r\n\t */\r\n\tpublic MakeAnOffer map(MakeAnOfferDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new AcceptAnOffer action according to the AcceptAnOfferDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an AcceptAnOffer action with all the parameters set\r\n\t */\r\n\tpublic AcceptAnOffer map(AcceptAnOfferDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new ChooseCityBonusAction action according to the ChooseCityBonusActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an ChooseCityBonusAction action with all the parameters set\r\n\t */\r\n\tpublic ChooseCityBonusAction map(ChooseCityActionDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new PurchasedPermitTileAction action according to the PurchasedPermitTileActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an PurchasedPermitTileAction action with all the parameters set\r\n\t */\r\n\tpublic PurchasedPermitTileAction map(PurchasedPermitTileActionDTO selectedActionDTO);\r\n\t\r\n\t/**\r\n\t * This method creates a new PickPermitTileBonusAction action according to the PickPermitTileBonusActionDTO received,\r\n\t * then maps all the parameters DTO into their corresponding real objects, setting them to the real action created\r\n\t * @param selectedActionDTO is the action selected by the client whose parameters need to be translated\r\n\t * @return an PickPermitTileBonusAction action with all the parameters set\r\n\t */\r\n\tpublic PickPermitTileBonusAction map(PickPermitTileActionDTO pickPermitTileActionDTO);\r\n\t\r\n}", "public static Action action(String id) {\n/* 205 */ return actions.get(id);\n/* */ }", "public static void updateActions() {\n\t\tjEdit.removeActionSet(apiCommands);\r\n\t\tapiCommands.removeAllActions();\r\n\t\tStringTokenizer tokenizer = new StringTokenizer(\r\n\t\t\tjEdit.getProperty(\"options.javadoc.path\", \"\"), File.pathSeparator);\r\n\t\twhile (tokenizer.hasMoreTokens()) {\r\n\t\t\tString token = tokenizer.nextToken();\r\n\t\t\ttry {\r\n\t\t\t\tapiCommands.addAction(ApiAction.create(token));\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tjEdit.addActionSet(apiCommands);\r\n\t}", "@Override\n public String getActions() {\n\treturn \"\";\n }", "public String[] getActions() {\n return impl.getActions();\n }", "public interface ZabbixAction {\n String getName();\n\n void setName(String name);\n\n Integer getEventsource();\n\n void setEventsource(Integer eventsource);\n\n Integer getEvaltype();\n\n void setEvaltype(Integer evaltype);\n\n Integer getEscPeriod();\n\n void setEscPeriod(Integer escPeriod);\n\n String getDefLongdata();\n\n void setDefLongdata(String defLongdata);\n\n List<Condition> getConditions();\n\n void setConditions(List<Condition> conditions);\n\n List<Operation> getOperations();\n\n void setOperations(List<Operation> operations);\n}", "Action createAction();", "Action createAction();", "Action createAction();", "@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}", "public OpenAtMethodAction(String filename, String method)\n\t{\n\t\tsuper();\n\t\tsetFilename(filename);\n\t\tsetMethodName(method);\n\t}", "public interface Action {\n\t\n\t/**\n\t * @return The action's printable value\n\t */\n\tpublic String toString();\n\n\tpublic Action actionClone();\n \t\n}", "public abstract ActionInMatch act();", "public T CallFunctions(T obj) {\n for (Function<T,T> action : actions) {\n obj = action.apply(obj);\n }\n \n return obj;\n }", "@Override\n\tprotected void generatePrimitives(SoAction action) {\n\n\t}", "public void setActions() {\n actions = new HashMap<String, Action>();\n for (Action a: jsonManager.getActionsFromJson()) {\n actions.put(a.getName(), a);\n }\n }", "private void parseFile(String fileName) {\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(fileName));\n\t\t\tString line;\n\t\t\tint counter = 0;\n\t\t\tString lastMethod = null;\n\t\t\t\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t// Logic for method consolidation\n\t\t\t\tif (line.contains(\"Method Call\")) {\n\t\t\t\t\tlastMethod = line.substring(line.indexOf(\"target=\")+7);\n\t\t\t\t\tlastMethod = lastMethod.substring(lastMethod.indexOf('#')+1).replace(\"\\\"\",\"\").trim();\n\t\t\t\t\tlastMethod = lastMethod + \":\" + counter++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (line.contains(\"Field Write\")) {\n\t\t\t\t\tString[] tokens = line.split(\",\");\n\t\t\t\t\t\n\t\t\t\t\tString object = tokens[4].substring(tokens[4].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString field = tokens[5].substring(0, tokens[5].indexOf(\"=\")).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString value = tokens[5].substring(tokens[5].indexOf(\"=\") + 1).replace(\"\\\"\", \"\").trim();\n\t\t\t\t\tString fld = object.replace(\"/\", \".\") + \".\" + field;\n\t\t\t\t\tevents.add(new Event(fld, value, lastMethod));\n\t\t\t\t\t\n\t\t\t\t\tallFields.add(fld);\n\t\t\t\t}\n//\t\t\t\tif (line.contains(\"Method Returned\")) {\n//\t\t\t\t\t//operations for this method ended\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "ISourceMethod[] getMethods();" ]
[ "0.6182113", "0.5910069", "0.5869392", "0.5835467", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57972986", "0.57829875", "0.57556266", "0.57556266", "0.57556266", "0.57556266", "0.57556266", "0.575065", "0.575065", "0.5723913", "0.56504107", "0.5578294", "0.55668974", "0.55535907", "0.5548522", "0.5548522", "0.5541076", "0.5530429", "0.54190195", "0.5393767", "0.53905344", "0.538369", "0.5376481", "0.5369074", "0.53592247", "0.53441143", "0.5342384", "0.5315961", "0.52779496", "0.5272611", "0.5235089", "0.52263105", "0.5221263", "0.5193796", "0.51841086", "0.5183531", "0.51664686", "0.5154783", "0.5153061", "0.51376164", "0.51326776", "0.51271194", "0.51271194", "0.51245224", "0.5112141", "0.511167", "0.510812", "0.5102503", "0.5100668", "0.5076684", "0.5075168", "0.507488", "0.50723517", "0.5072013", "0.50617707", "0.50602376", "0.50513154", "0.5033194", "0.5017287", "0.49917224", "0.49894843", "0.49780273", "0.49773252", "0.49690306", "0.49674237", "0.4960582", "0.4957667", "0.4942162", "0.4942095", "0.49355343", "0.49355343", "0.49355343", "0.49300557", "0.49191627", "0.49158677", "0.4913609", "0.49103874", "0.49064952", "0.4905467", "0.4900051", "0.48984045", "0.4894197" ]
0.5653605
28
The main method of the application. Creates a Main instance and executes all the assignments it gets.
public static void main(String[] args) { Main main = new Main(args); main.execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main()\n\t{\n\t}", "public static void main() {\n \n }", "public static void main(String[] args){\n\n MyApp myApp = new MyApp(); //1\n myApp.runMyApp(); //2\n System.out.println(\"End of Program\"); //3\n }", "public static void main() {\n }", "public static void main(String... args) {\n doMain().run();\n }", "public static void main(String[] args) {\n new Main();\n }", "public static void main(String[] args) {\n Main main = new Main();\n main.begin();\n }", "public static void main(){\n\t}", "public Main() {\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n new Main();\r\n }", "public static void main(String [] args){\n Main m = new Main(args);\n }", "public static void main(String[] args) {\n new Main().run();\n }", "public Main() {\n \n \n }", "public Main() {}", "public static void main(String[] args) {\n\t\t\n\t\tnew Main();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tnew Main();\n\t}", "public static void main(String[] args) {\n\t\tnew Main();\n\t}", "public static void main(String[] args) {\n\t\tnew Main();\n\t}", "public static void main(String[] args) {\n\t\tnew Main();\n\t}", "public static void main(String[] args) {\n\t\tnew Main();\n\t}", "public Main() {\r\n\t}", "public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }", "public static void main(String[] args) {\n\t\tnew main();\n\t}", "public static void main(String[] args) {\n\t\tnew App();\r\n\t}", "public static void main(String[] args){\n\t\tInitializeProgram startProgram = new InitializeProgram();\n\t\tstartProgram.runProgram();\n\t}", "public static void main(String[] args) {\n new Program();\n }", "public Main() {\n }", "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 static void main(String[] args) {\n\t\tMainControl mControl = new MainControl();\n\t}", "public Main() {\n }", "public Main() {\n }", "public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}", "public Main() {\r\n }", "public Main() {\r\n }", "public static void main(String args[]){\n\n createConnection();\n\n if (conn == null) {\n System.err.println(\"Failed to establish connection!\");\n }\n\n new App();\n\n }", "public void main(){\n }", "public static void main(String[] args) {\n MainIntrence mainintrence = new MainIntrence();\r\n\r\n\r\n\r\n }", "public static void main(String[] args) {\n\t\tMain _Main = new Main();\n\t\t_Main.xxx();\n\t\t\n\t}", "public static void main(String[] args) {\n //launch it\n launch();\n }", "public static void main(String[] args) {\n new Main().doMain(args);\n }", "private Main() {\n\n super();\n }", "public static void main(String[] args) {\n\t\tMainClass mainWindow = new MainClass();\n\t\t\n\t}", "public static void main(String[] args)\n {\n new Launcher();\n }", "public static void main(String[] args)\n { \n // Create a new instance of the application and make the currently\n \tEntryPoint theApp = new EntryPoint(); \n \t// running thread the application's event dispatch thread.\n theApp.enterEventDispatcher();\n }", "public static void main(String[] args) {\n new Main(args).run();\n }", "public static void main(String[] args) {\n new GraphicStudyApp();\n }", "public static void main(String[] args) {\n\t\trunApplication();\n\t}", "private Main() {}", "public static void main(String[] args){\n // Creates an instance of our program\n Main gui = new Main();\n // Lets the computer know to start it in the event thread\n SwingUtilities.invokeLater(gui);\n }", "public static void main(String[] args) {\n\t\tAbstractDataHandlerFactory dataHandlerFactory = DataHandler.getDataHandlerInstance(); \n\t\t\n\t\t// Create a Controller object to begin the application and control code flow \n\t\tController control = new Controller(dataHandlerFactory);\t\n\t}", "public static void main(String[] args) {\n\t\tOliveMain myMain = new OliveMain(10);\n\n\t\t// set up class\n\t\tmyMain.setUp();\n\n\t\t// run the program\n\t\tmyMain.runProgram();\n\t}", "public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}", "public static void main(String[] args) {\n new MyApp();\n }", "public static void main(final String... args) {\n\n Application.launch();\n }", "public static void main(String[] args) {\n Model model = new Model();\n View view = new View(model);\n Controller controller = new Controller(model, view);\n\n /*main program (each loop):\n -player token gets set\n -game status gets shown visually and user input gets requested\n -game grid gets updated\n -if the game is determined: messages gets shown and a system exit gets called*/\n while (model.turnCounter < 10) {\n model.setToken();\n view.IO();\n controller.update();\n if (controller.checker()){\n System.out.println(\"player \" + model.playerToken + \" won!\");\n System.exit(1);\n }\n System.out.println(\"draw\");\n }\n }", "public static void main( String[] args )\n\t{\n\t\trunApp();\n\t}", "public static void main(String[] args) throws IOException {\n// new Homework01();\n new Homework02();\n }", "public static void main(String[] args) {\n ItemRegistry itemRegistry = new ItemRegistry();\n Printer printer = new Printer();\n AccountingHandler accountingHandler = new AccountingHandler();\n InventoryHandler inventoryHandler = new InventoryHandler();\n Register register = new Register(printer, itemRegistry, accountingHandler, inventoryHandler);\n Controller contr = new Controller(register);\n View view = new View(contr);\n\n view.sampleExecution();\n }", "public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}", "public static void main(String[] args)\n {\n Injector guice = Guice.createInjector(new DiscountGuiceModule());\n\n // Inject the application which contains a separate object graph which contains all the business logic\n // When we call the top level class, BasicApplication, guice will inject every static dependency that we request\n // via @Inject\n BasicApplication basicApplication = guice.getInstance(BasicApplication.class);\n\n // now start the application\n basicApplication.start();\n }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "public static void main(String args[]) throws IOException {\n GUI app = new GUI();\n }", "public static void main (String [] args) throws IOException {\n\t\tlogger.info(\"This is Team 18's Weather App - starting...\");\n\n\t\t// data\n\t\tlogger.info(\"Initializing weather data components\");\n\t\tLocalWeatherData localData = new LocalWeatherData();\n\t\tShortTermData shortTermData = new ShortTermData();\n\t\tDataRequester dataRequester = new DataRequester(localData,shortTermData);\n\t\tlogger.info(\"End of weather data components\");\n\n\t\tRefreshButton refreshButton = new RefreshButton(dataRequester);\n\n\t\t// views\n\t\tlogger.info(\"Initializing weather views/tabs\");\n\t\tLocalWeatherView localView = new LocalWeatherView(localData, refreshButton);\n\t\tShortTermView shortView = new ShortTermView(shortTermData);\n\t\tSelectionPage selectionPage = new SelectionPage(localView, shortView, dataRequester);\n\t\tlogger.info(\"End of views\");\n\n\t\t// place views into tabs\n\t\tlogger.info(\"Putting views into tabs\");\n\t\tTabbedViews tabs = new TabbedViews(selectionPage, localView, shortView);\n\n\t\t//main window/frame\n\t\tlogger.info(\"Initializing main JFrame with tabbed view\");\n\t\tJFrame mainFrame = new JFrame(\"Team18 Weather\");\n\t\tmainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tmainFrame.setBackground(Color.WHITE);\n\t\tmainFrame.setSize(600, 450);\n\t\tmainFrame.add(tabs, BorderLayout.CENTER);\n\t\tmainFrame.setVisible(true);\n\t\tlogger.info(\"Main window created\");\n\t}", "public static void main(String[] args) {\n Simulation sim = new Simulation();\n //runs it.\n sim.Run();\n }", "public static void main(String[] args) {\n Run();\n }", "public static void main(String[] args) {\n Main main = new Main();\n main.start();\n }", "public static void main(String[] args)\n\t{\n\t\tgo = new GUI();\n\t\tgo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tgo.setExtendedState(JFrame.MAXIMIZED_BOTH); // Method to make auto-full screen\n\n\t\tgo.setVisible(true); // Basic frame stuff\n\t\tgo.init();\n\t\tr = new Runner();\n\t}", "public static void main(String[] args) {\n init();\n\n }", "public static void main(String[] args){\n\t\tView view = new View();\r\n\t\tDatabaseInteraction model = new DatabaseInteraction();\r\n\r\n\t\t//Initialize controller. \r\n\t\tController controller = new Controller(view,model);\r\n\r\n\t\t//Connect database, start user interaction, and let the controller respond to user options. \r\n\t\tmodel.connectDatabase();\r\n\t\tcontroller.userInteracion();\r\n\t\tcontroller.respondToUserOption();\r\n\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"*****************************Assignment 1 ********************************\");\n Assignment1 assignment1 = new Assignment1();\n assignment1.dataTypesMethod();\n int variable5 = Assignment1.variableAssignmentMethod(6);\n System.out.println(\"Value of int variable5 in mainMethod is: \" + variable5);\n Assignment1.characterAssignment();\n\n // Assignment2 dated Oct 7 2020\n System.out.println(\"*****************************Assignment 2 Part 1********************************\");\n Assignment2 assignment2 = new Assignment2();\n assignment2.arithmeticOperators(5, 7);\n assignment2.incrementOperators(3);\n System.out.println(\"*****************************Assignment 2 Part 2********************************\");\n assignment2.table(2);\n\n // Assignment dated Oct 9 2020\n System.out.println(\"*****************************Assignment 3********************************\");\n Assignment3 assignment3 = new Assignment3();\n assignment3.arithmeticLogicalOperators(3, 4, 6);\n assignment3.bitwiseOperators();\n\n }", "private Main() {\n }", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "public static void main(String[] args) {\n \t\tSystem.out.println(\"main thread enters main() from command line loader.\");\n \t\tnew ExpressionCalculator(); //load rest of program\n \t\tSystem.out.println(\"main thread returning to the command line loader\");\n \t\t\n \t}", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Start main\");\r\n\t\tSystem.out.println(\"sum of two num :\"+ new AppManager().sum(5,10));\r\n\t\tSystem.out.println(\"End main\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tTestProgram et = new TestProgram();\n\t\tet.Slotmachine();\n\t}", "public static void main(String[] args) {\n init();\n runIterator();\n Scanner scanner = new Scanner(System.in);\n runApplication(scanner);\n }", "public static void main(String[] args) {\n DatabaseController.login();\r\n\r\n //Log in to email\r\n Email.login();\r\n\r\n //Update local database - in real deployment this would run twice per day, not every startup\r\n SyncMain.main(new String[]{});\r\n\r\n //Load cached data\r\n CSVController.loadFiles();\r\n\r\n //Start GUI\r\n launch(args);\r\n\r\n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main (String[] args) \n {\n runAsApplication(new TurtleWorld(), \"TurtleWorld\"); \n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\n launch(args);\r\n \r\n }", "public static void main(String[] args) {\n \n RunProject r = new RunProject(); // creates new instance of RunProject class\n r.mainMenu(); //runs main menu method for new instance.(r)\n \n }", "public main() {\n initComponents();\n \n }", "public static void main(String[] args) {\n System.out.println(\"in main\");\n }", "public static void main(String[] args) {\n\n console(\"main...\");\n autoGrader = new AutoGrader2();\n\n console(\"launching...\");\n //---------- start the GUI ----------\n launch(args);\n\n //---------- Commit the AG options to the JSON file ----------\n autoGrader.saveConfiguration();\n\n console(\"Exiting main()...\");\n }", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\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) {\n MainController mainController = new MainController();\n mainController.showView();\n SessionManager.getSessionManager().getSession();\n }", "public static void main(String[] args) {\n \t\tnew CoreEngine();\n \t}", "public static void main(String[] args) {\n BasicConfigurator.configure();\n // note: running mode starts as a result of finishing building mode\n BuildingWindow buildingWindow = new BuildingWindow(\"Game Build\");\n buildingWindow.start();\n }", "public void Main(){\n }", "public static void main(String[] args) // every Java program starts with a main method or function\r\n\t{\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"In Main\");\r\n\t}", "public static void main (String[] args) {\n launch(args);\n }", "public static void main(String[] args) {\n\t\tset();\n\t}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n\n //MainWindow mainWindow=new MainWindow();\n\n }" ]
[ "0.75811267", "0.7442325", "0.7365641", "0.7315987", "0.72967714", "0.72765446", "0.7272445", "0.7222641", "0.7209519", "0.71990323", "0.71959805", "0.7173267", "0.71671486", "0.7161886", "0.7160825", "0.70654565", "0.7055247", "0.7055247", "0.7055247", "0.7055247", "0.7055247", "0.70097995", "0.7001555", "0.69903564", "0.698333", "0.6982272", "0.69799715", "0.69486994", "0.69480634", "0.6947353", "0.6914808", "0.6914808", "0.6912137", "0.6908265", "0.6908265", "0.6904121", "0.6893709", "0.6875877", "0.6838154", "0.68114656", "0.68106085", "0.67957693", "0.678719", "0.6783492", "0.6778402", "0.67778397", "0.6776751", "0.67751163", "0.6773041", "0.6766615", "0.67659193", "0.67653704", "0.6762105", "0.6745203", "0.6742557", "0.6741958", "0.6741433", "0.6739", "0.6738063", "0.67312384", "0.67147726", "0.6704279", "0.6704139", "0.6698336", "0.6694237", "0.66942114", "0.66887677", "0.668362", "0.66801864", "0.66777986", "0.6677241", "0.6674905", "0.666456", "0.6659365", "0.6649907", "0.6647", "0.6645549", "0.66406983", "0.66388345", "0.6638399", "0.6638399", "0.66381484", "0.66333526", "0.66328955", "0.6632085", "0.6630393", "0.66294146", "0.6623609", "0.66104263", "0.66061634", "0.6601468", "0.65996057", "0.6598262", "0.65977216", "0.65949905", "0.65918237", "0.65907717", "0.6574807", "0.6572388", "0.6567775" ]
0.6755755
53
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent arg0) { }
{ "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
02. java.util.Date > java.time.LocalDate
public static LocalDate DateToLocalDate(Date date) { Instant instant = date.toInstant(); ZoneId zone = ZoneId.systemDefault(); LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); return localDateTime.toLocalDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date date(LocalDate date);", "LocalDate getDate();", "@Test\n\tpublic void testLocalDateLocalDateTimeConsistency() {\n\t\tfinal LocalDate referenceDate = LocalDate.of(2016, 1, 1);\n\t\tfor(int i=0; i<1000; i++) {\n\t\t\tfinal LocalDate date = referenceDate.plusDays(i);\n\n\t\t\tfinal double floatingPointDate = FloatingpointDate.getFloatingPointDateFromDate(referenceDate, date);\n\t\t\tfinal double floatingPointDateTime = FloatingpointDate.getFloatingPointDateFromDate(LocalDateTime.of(referenceDate, LocalTime.of(12, 0)), LocalDateTime.of(date, LocalTime.of(12, 0)));\n\n\t\t\tAssert.assertEquals(\"Comparing Date to DateTime\", floatingPointDate, floatingPointDateTime, 0.2/SECONDS_PER_DAY);\n\t\t}\n\t}", "@Test\n public void testSetLocalDateWithType() throws SQLException {\n LocalDate data = LocalDate.parse(\"1971-12-15\");\n java.sql.Date actual = insertThenReadWithType(data, Types.DATE, \"date_column\", java.sql.Date.class);\n java.sql.Date expected = java.sql.Date.valueOf(\"1971-12-15\");\n assertEquals(expected, actual);\n }", "protected void saveLocalDate() {\n\n }", "private Date convertLocalDateToDate(LocalDateTime localDate) {\n return Date.from(localDate.atZone(ZoneId.systemDefault()).toInstant());\n }", "private LocalDate nowLocalDate() {\n\t\tInstant instantNow = Instant.ofEpochMilli( System.currentTimeMillis() );\n\t\tLocalDate nowLocalDate = instantNow.atOffset(ZoneOffset.UTC).toLocalDate();\n\t\treturn nowLocalDate;\n\t}", "protected LocalDate toLocalDate(Object obj) {\n return DfTypeUtil.toLocalDate(obj, getDBFluteSystemFinalTimeZone());\n }", "@Test\n public void testSetLocalDateWithoutType() throws SQLException {\n LocalDate data = LocalDate.parse(\"1971-12-15\");\n java.sql.Date actual = insertThenReadWithoutType(data, \"date_column\", java.sql.Date.class);\n java.sql.Date expected = java.sql.Date.valueOf(\"1971-12-15\");\n assertEquals(expected, actual);\n }", "LocalDate getDateOfBirth();", "public interface DateInterface \n{\n /*\n Dada uma data, determina a sua estação do ano (Primavera, Verão, Outono ou Inverno) de acordo com o hemisfério Norte.\n */\n public String estacaoDoAno(LocalDate d);\n \n /*\n Determina o dia da semana do primeiro dia de um ano.\n */\n public DayOfWeek primeiroDiaSemanaAno(int ano);\n \n /*\n Determina o dia da semana de uma data.\n */\n public DayOfWeek diaDaSemana(LocalDate d);\n \n /*\n Determina o dia do ano de uma data (por exemplo, 10/01/2018 corresponde ao 10º dia do ano de 2018).\n */\n public int diaDoAno(LocalDate d);\n \n /*\n Determina em que trimestre do ano uma data se situa.\n */\n public int trimestre(LocalDate d);\n \n /*\n Determina o número de semanas completas entre duas datas, sendo uma delas a atual.\n */\n public long numSemanasAteData(LocalDate d);\n \n /*\n Determina se um ano é bissexto ou não.\n */\n public boolean anoBissexto(Year ano);\n \n /*\n Determina o século, o milénio e a era de uma data.\n */\n public TuploSeculoMilenioEra seculoMilenioEraData(LocalDate d);\n \n /*\n Determina quanto tempo falta até à próxima passagem do cometa Halley. Mostra o resultado em dias totais, meses totais\n e anos totais.\n */\n public ParDataDiaMesAno cometaHalley();\n \n /*\n Determina o número de dias úteis entre duas dadas datas.\n */\n public int diasUteisEntreDatas(LocalDate d1, LocalDate d2);\n \n /*\n Determina quantos fins-de-semanas completos um ano tem. Caso o ano inserido possua um sábado ou um domingo extra, \n estes também são sinalizados.\n */\n public ParFimDeSemana numFinsDeSemanaAno(int ano);\n \n /*\n Determina quantos dias faltam até ao próximo Natal.\n */\n public long diasAteNatal();\n \n /*\n Determina o salário de um indivíduo sabendo quanto ganha por hora e o ano que pretende calcular. Apresenta o resultado\n em dias, semanas, meses e ano.\n */\n public SalarioAno salarioDiaMesSemanaAno(float salarioHora, int ano); \n \n /*\n Determina o número de dias úteis (isto é, que não são fins-de-semana) de um ano.\n */\n public int numDiasUteisAno(int ano);\n \n /*\n Determina em que dias são os fins-de-semana de um dado mês. Por exemplo, em Janeiro de 2018 o primeiro fim-de-semana\n ocorre nos dias 6 (Sábado) e 7 (Domingo).\n */\n public Map<Integer, DayOfWeek> finsDeSemanaDoMes(int ano, int mes);\n \n /*\n A uma dada data são somados anos, meses, semanas e dias.\n */\n public LocalDate somaData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n A uma dada data são subtraidos anos, meses, semanas e dias.\n */\n public LocalDate subtraiData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n Dado um número de dias, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana e quantos\n dias úteis faltam até lá.\n */\n public TuploDataDia_SemanaDias_Uteis eventoDaquiXDias(int dias);\n \n /*\n Dado um número de dias úteis, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana.\n */\n public ParDataDiaDaSemana eventoDaquiXDiasUteis(int dias);\n \n /*\n Determina qual a data da próxima Black Friday e quantos dias faltam até essa data.\n */\n public ParDataDia proxBlackFriday();\n \n /*\n Calcula a data da Páscoa de um determinado ano.\n */\n public LocalDate proxPascoa(int ano);\n \n /*\n Para um dado ano apresenta a data dos feriados nacionais e em que dia da semana ocorrem.\n */\n public Map<String, MonthDay> dataFeriadosNacionais(int ano);\n \n /*\n Calcula a diferença entre duas datas. Apresenta o resultado em anos, meses e dias. Por exemplo, de 01/01/2018 até \n 10/02/2018 existe uma diferença de 0 anos, 1 mês e 9 dias.\n */\n public static TuploAnosMesesDias difEntreDatas(LocalDate d1, LocalDate d2)\n { \n boolean stop = false;\n boolean stop2 = false;\n long dias;\n int meses;\n int anos;\n \n anos = 0;\n meses = 0;\n dias = 0;\n\n while((d1.getYear() != d2.getYear() || d1.getMonthValue() != d2.getMonthValue())&&!stop && !stop2)\n {\n \n \n while(d1.getMonthValue() != d2.getMonthValue() && !stop2)\n {\n if(d1.getYear() == (d2.getYear() - 1) && d1.getMonthValue() == 12 && d2.getMonthValue() == 1 && d2.getDayOfMonth() < d1.getDayOfMonth())\n {\n stop2 = true;\n dias = 31 - d1.getDayOfMonth() + d2.getDayOfMonth();\n }\n if(stop2 == false)\n {\n YearMonth anoMes = YearMonth.of(d1.getYear(), d1.getMonth());\n int daysInMonth = anoMes.lengthOfMonth(); \n\n if(((d2.getYear() - d1.getYear()) == 0) \n &&((d2.getMonthValue() - d1.getMonthValue()) == 1)\n &&(d1.getDayOfMonth() > d2.getDayOfMonth()))\n {\n\n dias = d2.getDayOfMonth() + daysInMonth - d1.getDayOfMonth(); \n stop = true;\n break;\n }\n\n meses++;\n\n d1 = d1.plusMonths(1);\n }\n }\n if(stop2 == false)\n {\n if(d1.getMonthValue() == d2.getMonthValue() && d1.getYear() !=d2.getYear())\n {\n meses++;\n d1 = d1.plusMonths(1);\n }\n }\n }\n \n if(d1.getMonthValue() == d2.getMonthValue())\n {\n dias = d2.getDayOfMonth() - d1.getDayOfMonth();\n }\n\n while(meses > 12)\n {\n anos++;\n meses-=12;\n }\n \n return new TuploAnosMesesDias(anos, meses, dias);\n \n }\n}", "private DateTime goodLocalDateUse() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n LocalTime now = LocalTime.now();\n return new DateTime(ld.getYear(), ld.getMonthOfYear(), ld.getDayOfYear(), now.getHourOfDay(),\n now.getMinuteOfHour(), now.getSecondOfMinute(), now.getMillisOfSecond(),\n DateTimeZone.forID(\"America/New_York\"))\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "@Override\r\n\tpublic LocalDate toGraphProperty(Date value) {\n\t\treturn LocalDate.from(value.toInstant());\r\n\t}", "boolean isValidForDate(LocalDate date);", "private DateTime goodLocalDateUse2() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n LocalTime now = LocalTime.now();\n return new DateTime(ld.getYear(), ld.getMonthOfYear(), ld.getDayOfYear(), now.getHourOfDay(),\n now.getMinuteOfHour(), now.getSecondOfMinute(), now.getMillisOfSecond(),\n DateTimeZone.getDefault())\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "public LocalDate getDate() {\n return date;\n }", "public static void testDate() {\n\t\tDate oldDate = new Date();\r\n\t\tSystem.out.println(oldDate);\r\n\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(2000, 0, 17);\r\n\t\tDate oldDate2 = c.getTime();\r\n\t\tSystem.out.println(oldDate2);\r\n\r\n\t\t// Dates created with Java 8\r\n\t\tLocalDateTime newDateTime = LocalDateTime.now();\r\n\t\tLocalDate newDate = LocalDate.now();\r\n\t\tLocalTime newTime = LocalTime.now();\r\n\t\tSystem.out.println(newTime);\r\n\r\n\t\tnewDateTime = LocalDateTime.of(newDate, newTime);\r\n\t\tSystem.out.println(newDateTime);\r\n\r\n\t\tLocalDateTime newDateTime1 = LocalDateTime.of(2015, 12, 1, 10, 2, 3, 4);\r\n\t\tSystem.out.println(newDateTime1);\r\n\r\n\t\tnewDateTime1 = newDateTime1.plusYears(1);\r\n\t\tSystem.out.println(newDateTime1);\r\n\r\n\t\tDateTimeFormatter dtf = DateTimeFormatter\r\n\t\t\t\t.ofLocalizedDateTime(FormatStyle.SHORT);\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\t\tdtf = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\r\n\t\tdtf = DateTimeFormatter.ofPattern(\"MMMM dd yyyy, hh:mm:ss\");\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\t}", "public LocalDate getStartDate() { return this.startDate; }", "protected LocalDate asLocalDate(JsonNode jsonNode) {\n Assertion.isNotNull(jsonNode, \"jsonNode is required\");\n return LocalDate.parse(jsonNode.asText(), DateTimeFormatter.ISO_DATE);\n }", "public void setDate(LocalDate date) {\n this.date = date;\n }", "public final java.util.Date getLocalDate()\n {\n return ordinal == NULL_ORDINAL ? null : new java.util.Date(getLocalTimeStamp());\n }", "private LocalDate createDate(String date) {\n LocalDate localDate = LocalDate.parse(date);\n\n return localDate;\n }", "@Override\n public LocalDate getDate() {\n return null;\n }", "@Override\n public LocalDate getReturnDate() {\n return returnDate;\n }", "@Override\n\tpublic Date convertToDatabaseColumn(LocalDate attribute) {\n\t\treturn Date.valueOf(attribute);\n\t}", "@Override\r\n\tpublic Date toEntityAttribute(LocalDate value) {\n\t\treturn Date.from(value.atStartOfDay(ZoneId.systemDefault()).toInstant());\r\n\t}", "public LocalDate getStart_date(){\n return this.start_date;\n }", "public LocalDate getViewDate();", "public LocalDate getDate() {\n return date;\n }", "public LocalDate getDate() {\n return date;\n }", "public LocalDate ToLocalDate(Date dateToConvert) {\n\t return dateToConvert.toInstant()\n\t .atZone(ZoneId.systemDefault())\n\t .toLocalDate();\n\t}", "@Test\r\n public void testAddDaysToDate() {\r\n LocalDate date1 = LocalDate.parse(\"2018-03-21\");\r\n Date res1 = DateUtil.addDaysToDate(Date.from(date1.atStartOfDay(ZoneId.systemDefault()).toInstant()), 6);\r\n assertTrue(LocalDate.parse(\"2018-03-28\").equals(res1.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()));\r\n\r\n date1 = LocalDate.parse(\"2018-04-06\");\r\n Date res2 = DateUtil.addDaysToDate(Date.from(date1.atStartOfDay(ZoneId.systemDefault()).toInstant()), 4);\r\n assertTrue(LocalDate.parse(\"2018-04-11\").equals(res2.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()));\r\n\r\n date1 = LocalDate.parse(\"2018-12-21\");\r\n Date res3 = DateUtil.addDaysToDate(Date.from(date1.atStartOfDay(ZoneId.systemDefault()).toInstant()), 5);\r\n assertTrue(LocalDate.parse(\"2018-12-28\").equals(res3.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()));\r\n\r\n }", "public boolean checkDateEqual(LocalDate date) {\n return date.equals(this.date);\n }", "public void setDate(LocalDate date) {\n\t\tthis.date = date;\n\t}", "void setDateOfBirth(LocalDate dateOfBirth);", "@Override\n\tpublic LocalDate convertToEntityAttribute(Date dbData) {\n\t\treturn dbData.toLocalDate();\n\t}", "LocalDate getCheckInDate();", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "public static LocalDate DateToLocalDate (Date data){\r\n\t\tif (data == null) return null;\r\n\t\t\r\n\t\tString[] splitter = data.toString().split(\" \");\r\n\t\t\r\n\t\treturn LocalDate.of(\r\n\t\t\t\tInteger.parseInt(splitter[5]), \r\n\t\t\t\tmonthStringToInteger(splitter[1]), \r\n\t\t\t\tInteger.parseInt(splitter[2])\r\n\t\t\t\t);\r\n\t}", "private boolean isEqualDate(DateStruct d1, DateStruct d2)\n {\n boolean isEqual = false;\n if ( d1.year == d2.year && d1.month == d2.month && d1.day == d2.day )\n {\n isEqual = true;\n }\n return isEqual;\n }", "abstract protected Date getDate(E o2, Date date);", "public static void main(String[] args) {\n\t\tLocalDate localDate = LocalDate.now();\n\n\t\tSystem.out.println(\"LocalDate: \" + localDate);\n\n\t\tSystem.out.println(LocalDate.of(2019, 04, 16));\n\n\t\tSystem.out.println(LocalDate.parse(\"2019-04-16\"));\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tLocalDate tomorrow = LocalDate.now().plusDays(1);\n\n\t\tSystem.out.println(\"LocalDate +1 day : \" + tomorrow);\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tLocalDate previousMonthSameDay = LocalDate.now().minus(1, ChronoUnit.MONTHS);\n\n\t\tSystem.out.println(\"Previous month, same day: \" + previousMonthSameDay);\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tDayOfWeek sunday = LocalDate.parse(\"2019-04-18\").getDayOfWeek();\n\n\t\tSystem.out.println(\"Which day was at 2019-04-18 ? \" + sunday);\n\n\t\tint twelve = LocalDate.parse(\"2019-04-18\").getDayOfMonth();\n\n\t\tSystem.out.println(\"Which day was at 2016-06-12 ? \" + twelve);\n\n\t\t/////////////////////////////////////////////////////////\n\n\t\tboolean leapYear = LocalDate.now().isLeapYear();\n\n\t\tSystem.out.println(\"Is leap year? \" + leapYear);\n\n\t\t/////////////////////////////////////////////////////////\n\n\t\tboolean notBefore = LocalDate.parse(\"2016-06-12\").isBefore(LocalDate.parse(\"2016-06-11\"));\n\n\t\tSystem.out.println(\"Not before: \" + notBefore);\n\n\t\tboolean isAfter = LocalDate.parse(\"2016-06-12\").isAfter(LocalDate.parse(\"2016-06-11\"));\n\n\t\tSystem.out.println(\"Is after: \" + isAfter);\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tLocalDate firstDayOfTheMonth = LocalDate.parse(\"2016-06-12\").with(TemporalAdjusters.firstDayOfMonth());\n\t\tSystem.out.println(\"First day of 2016.06: \" + firstDayOfTheMonth);\n\t\tLocalDate nextMonday = LocalDate.parse(\"2016-06-12\").with(TemporalAdjusters.next(DayOfWeek.MONDAY));\n\t\tSystem.out.println(\"Next monday: \" + nextMonday);\n\t}", "@Test\n\tpublic void t5_localdate_main() {\n\t\tLocalDate in = K_ZDT.toLocalDate();\n\t\t\n\t\t_TestEntityWithLocalDate toDb = new _TestEntityWithLocalDate();\n\t\ttoDb.setId(new Random().nextLong());\n\t\ttoDb.setUserEntered(in);\n\t\t\n\t\tmongo.save(toDb);\n\t\t\n\t\t_TestEntityWithLocalDate fromDb = mongo.findById(toDb.getId(), _TestEntityWithLocalDate.class);\n\t\tassertNotNull(fromDb);\n\t\t\n\t\tassertEquals(in, fromDb.getUserEntered());\n\t}", "Date getForDate();", "@Override\n public void setReturnDate(LocalDate date) {\n this.returnDate = date;\n }", "public LocalDate GetFechaActual() throws RemoteException;", "public static void main(String[] args) \r\n {\n\t Date date = new Date();\r\n\t System.out.println(date);\r\n\t \r\n\t //comparision of dates\r\n\t /*\r\n\t Return\r\n 1. It returns the value 0 if the argument Date is equal to this Date. \r\n 2. It returns a value less than 0 if this Date is before the Date argument.\r\n 3. It returns a value greater than 0 if this Date is after the Date argument.\r\n\t */\r\n\t Date d=new Date(2021,05,31);\r\n\t System.out.println(d.equals(date));\r\n Date d1=new Date(2021,5,26); \r\n int comparison=d.compareTo(d1); \r\n System.out.println();\r\n System.out.println(\"Your comparison value is : \"+comparison); \r\n }", "private boolean isOutdatedDate(LocalDate date) {\n return date.isBefore(LocalDate.now());\n }", "public void setDateOfBirth(LocalDate dateOfBirth) {\n this.dateOfBirth = dateOfBirth;\n }", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public Boolean validarFecha(LocalDate fechaIngresada);", "@RequiresApi(api = Build.VERSION_CODES.O)\n public static LocalDate getLocalDate() {\n return LocalDate.now();\n }", "public static void main(String[] args) {\nDate d1 = new Date( 2019, 02, 22);\nSystem.out.println(d1);\n\n\nDate d2= new Date();\nSystem.out.println(d2);\nDate d3 = new Date(2000,11,11);\nSystem.out.println(d3);\nint a = d1.compareTo(d3);\nSystem.out.println(a);\nboolean b = d1.after(d2);\n\tSystem.out.println(b);\n\t}", "Date getDate();", "Date getDate();", "Date getDate();", "@Override\n public long dateCompare(LocalDate localDate1, LocalDate localDate2) {\n return localDate1.until(localDate2, ChronoUnit.MONTHS);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello World!\");\r\n\t\t/*\r\n\t\tDate d = new Date(); // Current Date\r\n\t\tSystem.out.println(d);\r\n\t\tDate d1 = new Date(1000000000); // set ne w Date\r\n\t\tSystem.out.println(d1);\r\n\t\t//System.out.println(d.after(d1)); // true\r\n\t\t//System.out.println(d1.after(d)); // false\r\n\t\tDate d2 = (Date) d1.clone(); // Making Deep copy\r\n\t\tSystem.out.println(d2);\r\n\t\tSystem.out.println(d.compareTo(d1)); // 1\r\n\t\tSystem.out.println(d1.compareTo(d)); // -1\r\n\t\tSystem.out.println(d1.compareTo(d2)); \r\n\t\tSystem.out.println(d1.equals(d2)); // true\r\n\t\tSystem.out.println(d1.equals(d)); // false\r\n\t\tSystem.out.println(d.getTime());\r\n\t*/\r\n\t\tSystem.out.println(\"Today's date: \" + LocalDate.now());\r\n\t\tSystem.out.println(\"Specified date: \" + LocalDate.of(2000, 1, 1));\r\n\r\n\r\n\t}", "public LocalDateAdapter() {\r\n\t\tsuper();\r\n\t}", "private DateTime goodLocalDateUse4() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n return new DateTime().toDateTime(DateTimeZone.forID(\"America/New_York\"))\n .withDate(ld)\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "private static boolean isDate(final Object obj) {\n return dateClass != null && dateClass.isAssignableFrom(obj.getClass());\n }", "@Test\n public void equalsOk(){\n Date date = new Date(1,Month.january,1970);\n assertTrue(date.equals(date));\n }", "public Date getNormalizedDate(Date date)\n/* */ {\n/* 208 */ return new Date(date.getTime());\n/* */ }", "private Date toDate(LocalDate randomDate) {\n Date d = Date.from(randomDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());\n return d;\n }", "boolean hasDate();", "public void problem1() // problem 1 method\n\t{\n\t\tDateNew d1 = new DateNew(10,12,2002);\n\t\tDateNew d2 = new DateNew(\"March\",23,2010);\n\t\tDateNew d3 = new DateNew(12,2009);\n\t\t\n\t\tSystem.out.printf(\"Date object d1's output is %s\",d1.toString());\n\t\tSystem.out.printf(\"Date object d2's output is %s\\n\",d2.toString2());\n\t\tSystem.out.printf(\"Date object d3's output is %s\\n\",d3.toString3());\t\n\t}", "private java.sql.Date convert(Date datet) {\n\t\treturn null;\n\t}", "public LocalDate getDate () {\n\t\treturn DateUtils.toLocalDate(this.start);\n\t}", "public LocalDate GetFechaUltimoCambio() throws RemoteException;", "public LocalDate getOpenDate(){\n\t\treturn openDate;\n\t}", "@ApiModelProperty(example = \"Fri Aug 08 01:00:00 BST 2008\", required = true, value = \"Date of the marriage\")\n @NotNull\n\n @Valid\n\n public LocalDate getDateOfMarriage() {\n return dateOfMarriage;\n }", "public java.util.Date getDate(){\n return localDate;\n }", "public static Date localDateToDate(LocalDate localDate) {\r\n return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());\r\n }", "public LocalDate getWhen(){\n return by;\n }", "public int trimestre(LocalDate d);", "public static LocalDate convertDate(Date dateToConvert) {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n return LocalDate.parse(format.format(dateToConvert));\n }", "public static Date localDateToDate(LocalDate data) {\r\n\t\tif(data == null) return null;\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.set(Calendar.YEAR, data.getYear());\r\n\t\tcal.set(Calendar.MONTH, data.getMonthValue()-1);\r\n\t\tcal.set(Calendar.DAY_OF_MONTH, data.getDayOfMonth());\r\n\t\treturn cal.getTime();\r\n\t}", "public LocalDate getDate() {\r\n\t\treturn loanDate;\r\n\t}", "public void testDateTimeConverters() throws Exception {\n long currentTime = System.currentTimeMillis();\n java.util.Date utilDate = new java.util.Date(currentTime);\n assertConversion(\"DateToLong\", new DateTimeConverters.DateToLong(), utilDate, currentTime);\n assertConversion(\"DateToSqlDate\", new DateTimeConverters.DateToSqlDate(), utilDate, new java.sql.Date(currentTime));\n assertConversion(\"DateToString\", new DateTimeConverters.DateToString(), utilDate, utilDate.toString());\n //assertConversion(\"StringToDate\", new DateTimeConverters.StringToDate(), utilDate.toString(), utilDate);\n assertConversion(\"DateToTimestamp\", new DateTimeConverters.DateToTimestamp(), utilDate, new java.sql.Timestamp(currentTime));\n // Source class = java.sql.Date\n java.sql.Date sqlDate = new java.sql.Date(currentTime);\n assertConversion(\"SqlDateToDate\", new DateTimeConverters.SqlDateToDate(), sqlDate, utilDate);\n assertConversion(\"SqlDateToString\", new DateTimeConverters.SqlDateToString(), sqlDate, sqlDate.toString());\n //assertConversion(\"StringToSqlDate\", new DateTimeConverters.StringToSqlDate(), sqlDate.toString(), sqlDate);\n java.sql.Timestamp timestamp = new java.sql.Timestamp(currentTime);\n assertConversion(\"SqlDateToTimestamp\", new DateTimeConverters.SqlDateToTimestamp(), sqlDate, timestamp);\n assertConversion(\"StringToTimestamp\", new DateTimeConverters.StringToTimestamp(), timestamp.toString(), timestamp);\n assertConversion(\"TimestampToDate\", new DateTimeConverters.TimestampToDate(), timestamp, utilDate);\n assertConversion(\"TimestampToSqlDate\", new DateTimeConverters.TimestampToSqlDate(), timestamp, sqlDate);\n //assertConversion(\"TimestampToString\", new DateTimeConverters.TimestampToString(), timestamp, timestamp.toString());\n }", "public LocalDate getFecha() {\n\t\treturn fecha;\n\t}", "@Override\n public int compareTo(Date ARG) {\n if (year < ARG.year)\n {\n \treturn -1;\n }\n else if( year > ARG.year)\n {\n \treturn 1;\n }\n \n else{\n \tif (dayOfMonth < ARG.dayOfMonth)\n \t{\n \t\treturn -1; \n \t\t\n \t}\n \telse if (dayOfMonth > ARG.dayOfMonth)\n \t{\n \t\treturn 1; \n \t}\n \telse\n \t{\n \t\tif (dayOfMonth < ARG.dayOfMonth)\n \t\t{\n \t\t\treturn -1;\n \t\t}\n \t\telse if(dayOfMonth > ARG.dayOfMonth)\n \t\t{\n \t\t\treturn 1;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn 0; \n \t\t}\n \t}\n \t\n } \t\n }", "public static void main(String[] args) {\n\t\t LocalDate ldt = LocalDate.of(2016,12,21);\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MMM-dd\");\n DateTimeFormatter format1 = DateTimeFormatter.ofPattern(\"YYYY-mmm-dd\");\n System.out.println(ldt.format(format));\n System.out.println(ldt.format(format1));\n\t}", "private DateTime goodLocalDateUse5() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n return new DateTime().toDateTime(DateTimeZone.getDefault())\n .withDate(ld)\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "public static void main(String[] args) {\n\t\tLocalDate date = LocalDate.of(2018, 2, 9);\n\t\tint year = date.getYear();\n\t\tMonth month = date.getMonth();\n\t\tint day = date.getDayOfMonth();\n\t\tDayOfWeek dow = date.getDayOfWeek();\n\t\tint len = date.lengthOfMonth();\n\t\tboolean leap = date.isLeapYear();\n\n\t\tSystem.out.println(\"date = \" + date);\n\t\tSystem.out.println(\"year = \" + year);\n\t\tSystem.out.println(\"month = \" + month);\n\t\tSystem.out.println(\"day = \" + day);\n\t\tSystem.out.println(\"dow = \" + dow);\n\t\tSystem.out.println(\"len = \" + len);\n\t\tSystem.out.println(\"leap = \" + leap);\n\n\t\t/*\n\t\t * To obtains the current date from the system clock using the now\n\t\t * factory method:\n\t\t */\n\t\tLocalDate today = LocalDate.now();\n\t\tSystem.out.println(\"today = \" + today);\n\n\t\t/*\n\t\t * Reading LocalDate values using a TemporalField\n\t\t */\n\t\tint year1 = today.get(ChronoField.YEAR);\n\t\tint month1 = today.get(ChronoField.MONTH_OF_YEAR);\n\t\tint day1 = today.get(ChronoField.DAY_OF_MONTH);\n\t\tSystem.out.println(\"year1 = \" + year1);\n\t\tSystem.out.println(\"month1 = \" + month1);\n\t\tSystem.out.println(\"day1 = \" + day1);\n\n\t\t/*\n\t\t * LocalDate can be created by parsing a String representing\n\t\t */\n\t\tLocalDate anotherDate = LocalDate.parse(\"2014-03-18\");\n\t\tSystem.out.println(\"anotherDate = \" + anotherDate);\n\t}", "private LocalDate get_DATE(int column) {\n // DATE column is always 10 chars long\n String dateString = dataBuffer_.getCharSequence(columnDataPosition_[column - 1],\n 10, charset_[column - 1]).toString();\n return LocalDate.parse(dateString, DRDAConstants.DB2_DATE_FORMAT);\n// return DateTime.dateBytesToDate(dataBuffer_,\n// columnDataPosition_[column - 1],\n// cal,\n// charset_[column - 1]);\n }", "public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean isDate() {\n return false;\n }", "com.google.type.Date getAcquireDate();", "protected static java.sql.Date getConvertedDate(java.util.Date date) {\n\t\tif (date == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new java.sql.Date(date.getTime());\n\t\t}\n\t}", "private DateTime goodLocalDateUse3() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n return ld.toDateTimeAtStartOfDay(DateTimeZone.forID(\"America/New_York\"))\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "@Test\r\n public void testCompareTo1() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertTrue(d1.compareTo(d2) > 0);\r\n }", "static String getReadableDate(LocalDate date){\r\n\t\tString readableDate = null;\r\n\t\t//convert only if non-null\r\n\t\tif(null != date){\r\n\t\t\t//convert date to readable form\r\n\t\t\treadableDate = date.toString(\"MM/dd/yyyy\");\r\n\t\t}\r\n\t\t\r\n\t\treturn readableDate;\r\n\t}", "private static Date toUtilDate(Date date) {\n return (date != null) ? new Date(date.getTime()) : null;\n }", "public LocalDate getDateOfCreation() {\n return this.dateOfCreation;\n }", "public T caseDate(Date object) {\n\t\treturn null;\n\t}", "@Column(name = \"DATE\")\n@org.hibernate.annotations.Type(type = \"org.joda.time.contrib.hibernate.PersistentDateTime\")\n \n \n public DateTime getDate() {\n return date;\n }", "public LocalDate getDate() {\n\t\treturn this.date;\n\t}", "Date getDateField();", "public static void main(String[] args) {\n\n LocalDate today = LocalDate.now();\n System.out.println(\"today = \" + today);\n\n LocalDate tomorrow = today.plus(1, ChronoUnit.DAYS);\n System.out.println(\"tomorrow = \" + tomorrow );\n\n LocalDate yesterday = tomorrow.minusDays(2);\n System.out.println(\"yesterday = \" + yesterday);\n\n LocalDate independenceDay = LocalDate.of(2019, Month.DECEMBER, 11);\n DayOfWeek dayOfWeek = independenceDay.getDayOfWeek();\n System.out.println(\"dayOfWeek = \" + dayOfWeek);\n\n\n\n\n }", "public void setOpenDate(LocalDate date){\n\t\topenDate = date;\n\t}" ]
[ "0.7476886", "0.721649", "0.6445011", "0.6370571", "0.630149", "0.6232512", "0.61944056", "0.61805594", "0.6147586", "0.6147205", "0.61298317", "0.61091", "0.609674", "0.6092867", "0.6071956", "0.60400355", "0.60381573", "0.59960365", "0.5990893", "0.5989601", "0.5989135", "0.59750265", "0.59623903", "0.59582615", "0.5949505", "0.5931445", "0.5924073", "0.5923452", "0.59011954", "0.59011954", "0.5883355", "0.58613443", "0.5845874", "0.58362323", "0.58278066", "0.5823904", "0.5822782", "0.57946724", "0.5778291", "0.57039714", "0.570278", "0.5673691", "0.56643707", "0.5641742", "0.56350446", "0.5633976", "0.56328857", "0.5629645", "0.5623418", "0.56219876", "0.56113285", "0.56069696", "0.56041735", "0.5603515", "0.5603515", "0.5603515", "0.5601934", "0.5593171", "0.5591395", "0.5562578", "0.55614644", "0.555274", "0.55434287", "0.5527002", "0.55133903", "0.55124474", "0.55102944", "0.55101746", "0.5499599", "0.54987717", "0.547721", "0.54643255", "0.54625887", "0.54613394", "0.5457289", "0.5454225", "0.54370946", "0.543577", "0.5425973", "0.54091287", "0.5405174", "0.5397662", "0.5395742", "0.5387075", "0.5382291", "0.5378063", "0.5370029", "0.53640735", "0.5363162", "0.5362163", "0.53514236", "0.5348527", "0.53473383", "0.534183", "0.53375995", "0.53257227", "0.5319446", "0.531619", "0.5315862", "0.5314677" ]
0.5711239
39
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_firestore, container, false); }
{ "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
Creates a new instance of Magazzino
public Magazzino() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Manusia() {}", "public FiltroMicrorregiao() {\r\n }", "Foco createFoco();", "public Mafia() {\n super(Side.MAFIA);\n }", "public CMObject newInstance();", "public Gasto() {\r\n\t}", "private MApi() {}", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "protected final MareaPesca createInstance() {\n MareaPesca mareaPesca = new MareaPesca();\n return mareaPesca;\n }", "public Mitarbeit() {\r\n }", "public Magasin() {\n initComponents();\n }", "public Corso() {\n\n }", "public MPaciente() {\r\n\t}", "private Marinator() {\n }", "private Marinator() {\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public maquina() {\n initComponents();\n }", "private MazeBuilder() {\n\t}", "public ObjectFactory() {\n super(grammarInfo);\n }", "public Contato() {\n }", "public Curso() {\r\n }", "public Genio() {\n initComponents();\n }", "public Juego() {\n init(); // Llama al metodo init para inicializar todas las variables\n start(); // Llama al metodo start para crear el hilo\n }", "public Musik(){}", "public AFMV() {\r\n }", "public Odontologo() {\n }", "public XONImageMaker() {\r\n\t\tthis(true, null);\r\n\t}", "public Mobile() { }", "public Captura() {\n initComponents();\n }", "public CorreoElectronico() {\n }", "public ExamMB() {\n }", "public Mannschaft() {\n }", "public Corrida(){\n\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public Troco() {\n }", "public Farmerko()\n {\n Config.parseConfig();\n \n if (init_db())\n {\n initComponents();\n initSize();\n auto_log_in();\n }\n }", "public static OpenFrgament newInstance() {\n OpenFrgament fragment = new OpenFrgament();\n// Bundle args = new Bundle();\n//\n// fragment.setArguments(args);\n return fragment;\n }", "public BuscaMedicamento() {\n initComponents();\n }", "@Override\n public Vehicule creer(String immatriculation, String marque, String modele, Client client, int tonnage, int hauteur) {\n return new Camion(immatriculation,marque,modele,client,tonnage,hauteur);\n }", "public CMN() {\n\t}", "public Vaccine() {\n\t}", "public Prestamo() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Monster() {\n\t\t\n\t}", "MaximaProcess makeProcess() {\r\n \t\treturn new MaximaProcess(processBuilder, processConfig);\r\n \t}", "public Produto() {}", "public OVChipkaart() {\n\n }", "public PopulationfosaController() {\n }", "public Busca(){\n }", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "Reproducible newInstance();", "public Carrera(){\n }", "public CadastroMicrobio() {\n initComponents();\n setIcon();\n }", "public ObjectFactory() {\n\t}", "public Alojamiento() {\r\n\t}", "public CalculoMedia() {\n initComponents();\n \n }", "@Override\n\tpublic Maze MakeMaze() {\n\t\treturn new Maze();\t\n\t}", "public Pizza build(){\n Pizza pizza = new Pizza(this);\n return pizza;\n }", "Oracion createOracion();", "public Plantas() {\r\n initComponents();\r\n limpiar();\r\n \r\n hilor = new HiloReloj(lbhora);\r\n hilor.start();\r\n }", "public ObjectFactory() {\r\n\t}", "public MusiqueFiducial(){\n\t\tinitialisation();\n\t}", "public LarvaSkeleton() {\n\n }", "public MnjMfgFabinsProdLEOImpl() {\n }", "public Visita() {\n initialize();\n }", "public MorteSubita() {\n }", "Instance createInstance();", "private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "public Hazmat() {\n }", "public JSFOla() {\n }", "public Factory() {\n\t\tsuper();\n\t}", "public Lienzo() {\n initComponents();\n }", "public CrearQuedadaVista() {\n }", "public MovimientoControl() {\n }", "public Imagen(){\n \n }", "public RecipeMB() {\n }", "Parcelle createParcelle();", "public Celula() { // Sentinela\n\t\tthis.item = new Jogador();\n\t\tproximo = null;\n\t}", "public ApplicationCreator() {\n }", "public abstract Anuncio creaAnuncioTematico();", "private Instantiation(){}", "public Anasayfa() {\n initComponents();\n }", "private SIModule(){}", "public Artemis(){\r\n super(\"Artemis\",\r\n new StandardWinCondition(),\r\n new DoubleNoBackMove(new StandardMove()), new StandardBuild(),\r\n false,\r\n false\r\n );\r\n }", "public Venda() {\n }", "public Maze(){}", "public DemoPluginFactory() {}", "private static void createAndShowGUI() {\n Functionality func = new Functionality();\n }", "public CommandMAN() {\n super();\n }", "public Simulador(){\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public static void main(String[] args) {\n\t\tMeni f = new Meni();\r\n\t}", "public GantBuilder ( ) { }", "public Fish() {\r\n\t}", "public HMetis() {\n\t\tthis.init();\n\t}", "private void inizializzazione()\n {\n //Costruzione della Istanza display\n display = new Display(titolo,larghezza,altezza);\n \n /*Viene aggiunto il nostro gestore degli input da tastiera\n * alla nostra cornice.*/\n display.getCornice().addKeyListener(gestoreTasti);\n display.getCornice().addMouseListener(gestoreMouse);\n display.getCornice().addMouseMotionListener(gestoreMouse);\n display.getTelaGrafica().addMouseListener(gestoreMouse);\n display.getTelaGrafica().addMouseMotionListener(gestoreMouse);\n \n //Codice temporaneo per caricare la nostra immagine nel nostro programma\n /*testImmagine = CaricatoreImmagini.caricaImmagini(\"/Textures/Runner Stickman.png\");*/\n \n //Inizializzazione dell'attributo \"foglio\". Gli viene passato come parametro \n //\"testImmagine\" contenente l'immagine del nostro sprite sheet.\n /*foglio = new FoglioSprite(testImmagine);*/\n \n /*Inizializzazione della classe Risorse.*/\n Risorse.inizializzazione();\n \n maneggiatore = new Maneggiatore(this);\n /*Inizializzazione Camera di Gioco*/\n camera = new Camera(maneggiatore,0,0);\n \n /*Inizializzazione degli stati di gioco.*/\n statoMenu = new StatoMenù(maneggiatore);\n Stato.setStato(statoMenu);\n }", "public TCubico(){}" ]
[ "0.65550655", "0.6161527", "0.6041821", "0.6003117", "0.5957426", "0.5946342", "0.5881346", "0.5859691", "0.58164537", "0.57988036", "0.5762141", "0.57479537", "0.57311106", "0.57306814", "0.57306814", "0.57159954", "0.5707043", "0.5691692", "0.5649585", "0.55725485", "0.55636746", "0.55624264", "0.5558852", "0.5527798", "0.5522727", "0.55137867", "0.5508156", "0.549916", "0.54954827", "0.5494326", "0.5487948", "0.54858786", "0.54850364", "0.5440648", "0.54362017", "0.54279435", "0.5420456", "0.54163677", "0.54140073", "0.54086834", "0.5393726", "0.539098", "0.53712094", "0.5354053", "0.5351977", "0.53486055", "0.5337807", "0.53173256", "0.531434", "0.5308796", "0.5307968", "0.53056836", "0.5302871", "0.5299127", "0.52912986", "0.5290927", "0.52901757", "0.5289014", "0.5272568", "0.52645904", "0.5258705", "0.52523696", "0.52488416", "0.5247367", "0.5246895", "0.5246872", "0.5246608", "0.5241924", "0.5237217", "0.5236257", "0.5225284", "0.52235615", "0.5219676", "0.52136976", "0.5212944", "0.5212925", "0.5211045", "0.5207495", "0.5206604", "0.5199538", "0.51990783", "0.51913476", "0.51881886", "0.5186399", "0.5178804", "0.51772463", "0.5175283", "0.5174935", "0.5172007", "0.5170443", "0.51697737", "0.5166491", "0.5166491", "0.5166491", "0.516499", "0.5164632", "0.51561844", "0.515218", "0.5150251", "0.5149573" ]
0.8309602
0
Creates a new instance of UniformVector (Vector3 with zero means).
public UniformVector() { super(3); this.min = new VectorN(3); this.max = new VectorN(1.0, 1.0, 1.0); this.idum = -1; this.rn = new RandomNumber(this.idum); fillVector(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UniformVector(VectorN mn, VectorN mx){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "public UniformVector(VectorN mn, VectorN mx, long seed){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n if (seed > 0) seed = -seed;\n this.idum = seed;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "public Vector3D() {\n zero();\n }", "public ThreeVector unitVector() {\r\n\t\tif (this.magnitude()==0) { \r\n\t\t\treturn new ThreeVector(0,0,0);\r\n\t\t} else {\r\n\t\t\treturn new ThreeVector(this.x/this.magnitude(), this.y/this.magnitude(), this.z/this.magnitude());\r\n\t\t}\r\n\t}", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "public ThreeVector() { \r\n\t\t//returns null for no arguments\r\n\t}", "public Vector3 () {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tz = 0;\r\n\t}", "private void randomNormal(Vector3f v)\n // Create a unit vector. The x- and y- values can be +ve or -ve.\n // The z-value is positive, so facing towards the viewer.\n {\n float z = (float) Math.random(); // between 0-1\n float x = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n float y = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n v.set(x, y, z);\n v.normalize();\n }", "public Vector(double x, double y, double z) {\n this(new Point3D(x, y, z));\n }", "public Vector3 () {\n }", "public Vector3 zeroed() {\n return new Vector3(zeroed(x), zeroed(y), zeroed(z));\n }", "public Vector3 normalized() {\n\t\tif (isZeroVector(this)) {\n\t\t\treturn this;\n\t\t}\n\t\treturn new Vector3(x / norm(), y / norm(), z / norm());\n\t}", "Vector getZeroVector();", "public Vector(double x1, double y1, double z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public Vector(Point3D p) {\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head = new Point3D(p);\n }", "public Vector(Coordinate x1, Coordinate y1, Coordinate z1) {\n Point3D p = new Point3D(x1, y1, z1);\n if (p.equals(Point3D.ZERO))\n throw new IllegalArgumentException(\"no meaning to the vector\");\n head=new Point3D(p);\n }", "public Vec3D() {\n\t\tx = y = z = 0.0f;\n\t}", "public Vector(Coordinate x, Coordinate y, Coordinate z) {\n this(new Point3D(x, y, z));\n }", "public Coordinates unitVector(Coordinates vector, Coordinates origin);", "public Vec3(float initializer){\n\t\tthis(initializer, initializer, initializer);\n\t}", "final public Normal3 asNormal(){\n return new Normal3(x, y, z);\n }", "public Vector3()\n\t{\n\t\tx = y = z = 0;\n\t}", "public static Vector4 zero()\n {\n return new Vector4(0,0,0,0);\n }", "public\n\tVector3()\n\t{\n\t\tdata = new double[3];\n\t\tdata[0] = 0;\n\t\tdata[1] = 0;\n\t\tdata[2] = 0;\n\t}", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public Coordinates unitVector(Coordinates vector);", "public Vector scalar(double scalar) {\n return new Vector(\n scalar * getX(),\n scalar * getY(),\n scalar * getZ()\n );\n }", "public Vector() {\n construct();\n }", "public FloatVector3D(){}", "public abstract Vector4fc zero();", "public Vector(double x, double y, double z) {\n super(new double[][] {\n { x },\n { y },\n { z },\n { 1 }\n });\n }", "public Vector(double x, double y, double z, double w) {\n super(new double[][] {\n { x },\n { y },\n { z },\n { w }\n });\n }", "public VectorA normal()\n {\n return new VectorA(this.x/this.mag(), this.y/this.mag());\n }", "public Vector3 (double x, double y, double z) {\n set(x, y, z);\n }", "public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "@Model\r\n\tpublic Vector() {\r\n\t\tthis(50,50);\r\n\t}", "public Vector2D unitVector()\n {\n if (this.getR() != 0)\n return new Vector2D(this.x / this.getR(), this.y / this.getR());\n return new Vector2D(0, 0);\n }", "private Vector3D(int x, int y, int z) {\n this(x, y, z, null);\n }", "public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}", "public WB_Normal3d(final WB_Point3d v) {\r\n\t\tsuper(v);\r\n\t}", "public ThreeVector(double v1,double v2,double v3) {\r\n\t\tthis.x=v1;\r\n\t\tthis.y=v2;\r\n\t\tthis.z=v3;\r\n\t}", "public Vector3(double s)\n\t{\n\t\tx = y = z = s;\n\t}", "public Vector3D multVector(Vector3D u, Vector3D v) {\n\t\treturn new Vector3D(\n\t\t\t\tthis.x = (u.y * v.z) - (u.z * v.y), \n\t\t\t\tthis.y = (u.z * v.x) - (u.x * v.z),\n\t\t\t\tthis.z = (u.x * v.y) - (u.y * v.x));\n\t}", "public ColladaFloatVector() {\n super();\n }", "public Vector3<T> build() {\n return new Vector3<>(x, y, z);\n }", "public Vector3(NBTTagCompound nbt)\n {\n this(nbt.getDouble(\"x\"), nbt.getDouble(\"y\"), nbt.getDouble(\"z\"));\n }", "public CMLVector3() {\r\n }", "public Vector(double x, double y, double z){\n double longueur = Math.sqrt(sqr(x) + sqr(y) + sqr(z));\n\n this.x = longueur > 0 ? x/longueur : this.x;\n this.y = longueur > 0 ? y/longueur : this.y;\n this.z = longueur > 0 ? z/longueur : this.z;\n \n }", "public Vector3(double x, double y, double z) {\n this.x = x; this.y = y; this.z = z;\n }", "final public Vector3 normalized(){\n return new Vector3(x/magnitude, y/magnitude, z/magnitude);\n }", "public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }", "public Vector(int v1, int v2, int v3) {\n\t\tx = v1;\n\t\ty = v2;\n\t\tz = v3;\n\t}", "public Vector3 clone(){\r\n\t\tVector3 vec = new Vector3();\r\n\t\tvec.set(this.x, this.y, this.z);\r\n\t\treturn vec;\r\n\t}", "public Vector3(double x, double y, double z) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Vector3 normalized() {\n float length = length();\n return new Vector3(x / length, y / length, z / length);\n }", "public LorentzVector(LorentzVector vect){\n\t\tthis.vector = new Vector3(vect.px(), vect.py(), vect.pz());\n\t\tthis.energy = vect.e();\n\t}", "public Vec3(float x, float y, float z){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\ttrunc();\n\t}", "public Vector3D addVector(Vector3D u, Vector3D v) {\n\t\treturn new Vector3D(this.x = u.x + v.x, this.y = u.y + v.y, \n\t\t\t\tthis.z = u.z + v.z);\n\t}", "public Vector3(double x, double y, double z)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t}", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public Vec3D(Vec3D vec) {\n\t\tx = vec.x;\n\t\ty = vec.y;\n\t\tz = vec.z;\n\t}", "@Override\n public Vector3 clone()\n {\n return new Vector3(this);\n }", "public Vector3D(double x, double y, double z) {\r\n super(x, y, z);\r\n\t}", "private Vector(double x, double y){\n this.x = x;\n this.y = y;\n }", "public Vector3(double x, double y,double z){\n \n double pytago;\n \n this.x = x;\n this.y = y;\n this.z = z;\n \n pytago = (x*x) + (y*y) + (z*z);\n \n magnitude = Math.sqrt(pytago);\n }", "public VectorA scalarAdd(double z)\n {\n return new VectorA(this.x+z, this.y+z);\n }", "public Vector2() {\n\t\tthis(0.0f, 0.0f);\n\t}", "public Vector produitVectorielle(Vector vec){\n return new Vector(y * vec.z - z * vec.y, z * vec.x - x * vec.z, x * vec.y - y * vec.x);\t\t\n }", "public Vector3 getNormal() {\n\t\tdouble mag = this.magnitude();\n\t\tif (mag > 0) {\n\t\t\treturn new Vector3(\n\t\t\t\t\tthis.x/mag,\n\t\t\t\t\tthis.y/mag,\n\t\t\t\t\tthis.z/mag\n\t\t\t\t\t);\n\t\t} else {\n\t\t\treturn new Vector3();\n\t\t}\n\t}", "public\n\tVector3( Point3 point )\n\t{\n\t\tdata = new double[3];\n\t\tcopy( point );\n\t}", "final public Vector3 x(final Vector3 v){\n if(v == null){\n throw new IllegalArgumentException(\"v must not be null\");\n }\n return new Vector3((y*v.z)-(z*v.y), (z*v.x)-(x*v.z), (x*v.y)-(y*v.x)); \n }", "public Vector2f() {\n this(0, 0);\n }", "public Vector3 (float x, float y, float z) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.z = z;\r\n\t}", "public CMLVector3(CMLPoint3 p) {\r\n Vector3 v = new Vector3(p.getEuclidPoint3());\r\n this.setXYZ3(v.getArray());\r\n }", "public Vec3(float[] init){\n\t\tif(init.length >= 3){\n\t\t\tx = init[0];\n\t\t\ty = init[1];\n\t\t\tz = init[2];\n\t\t\ttrunc();\n\t\t}\n\t}", "public static Vector4 up()\n {\n return new Vector4(0,1,0,0);\n }", "public Vector3D(double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Vec2f() {\n\t\tthis(0, 0);\n\t}", "public static Vect3 makeXYZ(double x, String ux, double y, String uy, double z, String uz) {\n\t\treturn new Vect3(Units.from(ux,x),Units.from(uy,y),Units.from(uz,z));\n\t}", "public VelocityComponent(double xVector, double yVector, double zVector) {\n velocity = new Point3D(xVector, yVector, zVector);\n }", "public Vector3 boostVector() {\n\t\tif (this.e() == 0)\n\t\t\treturn new Vector3(0., 0., 0.);\n\t\treturn new Vector3(this.px() / this.e(), this.py() / this.e(), this.pz() / this.e());\n\t}", "public Vector3D(double x, double y, double z) {\n this.xCoord = x;\n this.yCoord = y;\n this.zCoord = z;\n }", "public Vector3 (double[] values) {\n set(values);\n }", "public Vector()\r\n {\r\n // initialise instance variables\r\n first = null;\r\n last = null;\r\n count = 0;\r\n }", "public Vector(double... elems) {\n\t\tthis(false, elems);\n\t}", "public VOIVector() {\r\n super();\r\n }", "public Vector normalize ( );", "public Vector(double x, double y){\n this.x=x;\n this.y=y;\n }", "public Quaternion()\n {\n this.x = 0.0f;\n this.y = 0.0f;\n this.z = 0.0f;\n this.w = 0.0f;\n }", "public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }", "public TransformationMatrix(Tuple3<Double,Double,Double> vector) {\n\t\tthis(1, 0, 0, vector.x, \n\t\t 0, 1, 0, vector.y, \n\t\t 0, 0, 1, vector.z);\n\t}", "public Vector330Class(){\n this.x = 0;\n this.y = 0;\n }", "public Vector4d() {\n\t\t// intentionally left empty\n\t}", "public Vector(Point point) {\n\t\tthis(point.x, point.y);\n\t}", "@java.lang.Override\n public godot.wire.Wire.Vector3 getNormal() {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }", "public static Vector normalize(Vector v) {\r\n Vector w = new Vector(v);\r\n w.normalize();\r\n return w;\r\n }", "public Vec3(Vec3 copy){\n\t\tthis(copy.x, copy.y, copy.z);\n\t}", "public Vector2D normalizedVect() {\n return new Vector2D(x / magnitude(), y / magnitude());\n }", "public Vector getNormal(Point3D point) throws Exception {\n\n // Setting the U vector\n Vector vecU = new Vector(_p1.getX().getCoordinate()-_p2.getX().getCoordinate(),\n _p1.getY().getCoordinate()-_p2.getY().getCoordinate(),\n _p1.getZ().getCoordinate()-_p2.getZ().getCoordinate());\n // Setting the V vector\n Vector vecV = new Vector(_p1.getX().getCoordinate()-_p3.getX().getCoordinate(),\n _p1.getY().getCoordinate()-_p3.getY().getCoordinate(),\n _p1.getZ().getCoordinate()-_p3.getZ().getCoordinate());\n\n // Finding the normal vector and normalize it\n Vector _normal = new Vector(vecU.crossProduct(vecV));\n _normal.normalize();\n _normal.scale(-1);\n\n return _normal;\n }" ]
[ "0.71402556", "0.6973253", "0.6805557", "0.6670234", "0.6554242", "0.64856076", "0.6191045", "0.6164515", "0.6144158", "0.61190456", "0.61093515", "0.6106219", "0.6072409", "0.6067974", "0.60021037", "0.6001431", "0.5949087", "0.5933322", "0.5921287", "0.59041595", "0.5880606", "0.5856047", "0.58487785", "0.58337694", "0.58229935", "0.579457", "0.57797706", "0.57412446", "0.57157195", "0.5709596", "0.5703288", "0.5698391", "0.5650712", "0.5649422", "0.56435496", "0.56425095", "0.5631906", "0.562839", "0.56066376", "0.5575177", "0.55704105", "0.5561686", "0.55473393", "0.5546953", "0.55352926", "0.5532563", "0.5532559", "0.5531715", "0.5520153", "0.5488707", "0.5477346", "0.5464259", "0.5422928", "0.54226506", "0.5421309", "0.54065037", "0.5405856", "0.5391502", "0.5386466", "0.5351383", "0.53431875", "0.53241307", "0.53163457", "0.5288359", "0.5273075", "0.52669024", "0.52637064", "0.5247013", "0.52457863", "0.5244358", "0.5241638", "0.52339846", "0.52269864", "0.5224645", "0.52185583", "0.5218407", "0.52162385", "0.5207354", "0.52053434", "0.51966834", "0.5192393", "0.5188668", "0.5186925", "0.5171098", "0.51592326", "0.5159026", "0.5158273", "0.514834", "0.5147705", "0.5143518", "0.5134865", "0.5131348", "0.5128967", "0.5122071", "0.5109751", "0.508668", "0.50810564", "0.5078634", "0.5070298", "0.50553405" ]
0.8139516
0
Create a UniformVector given a VectorN containing the mins and another containing the max values.
public UniformVector(VectorN mn, VectorN mx){ super(mn.length); mx.checkVectorDimensions(mn); this.min = new VectorN(mn); this.max = new VectorN(mx); this.idum = -1; this.rn = new RandomNumber(this.idum); fillVector(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }", "public UniformVector(VectorN mn, VectorN mx, long seed){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n if (seed > 0) seed = -seed;\n this.idum = seed;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }", "public RangeVector(float[] values, float[] upper, float[] lower) {\n checkArgument(values.length > 0, \" dimensions must be > 0\");\n checkArgument(values.length == upper.length && upper.length == lower.length, \"dimensions must be equal\");\n for (int i = 0; i < values.length; i++) {\n checkArgument(upper[i] >= values[i] && values[i] >= lower[i], \"incorrect semantics\");\n }\n this.values = Arrays.copyOf(values, values.length);\n this.upper = Arrays.copyOf(upper, upper.length);\n this.lower = Arrays.copyOf(lower, lower.length);\n }", "public LongRange(Number number1, Number number2) {\n/* 132 */ if (number1 == null || number2 == null) {\n/* 133 */ throw new IllegalArgumentException(\"The numbers must not be null\");\n/* */ }\n/* 135 */ long number1val = number1.longValue();\n/* 136 */ long number2val = number2.longValue();\n/* 137 */ if (number2val < number1val) {\n/* 138 */ this.min = number2val;\n/* 139 */ this.max = number1val;\n/* 140 */ if (number2 instanceof Long) {\n/* 141 */ this.minObject = (Long)number2;\n/* */ }\n/* 143 */ if (number1 instanceof Long) {\n/* 144 */ this.maxObject = (Long)number1;\n/* */ }\n/* */ } else {\n/* 147 */ this.min = number1val;\n/* 148 */ this.max = number2val;\n/* 149 */ if (number1 instanceof Long) {\n/* 150 */ this.minObject = (Long)number1;\n/* */ }\n/* 152 */ if (number2 instanceof Long) {\n/* 153 */ this.maxObject = (Long)number2;\n/* */ }\n/* */ } \n/* */ }", "public Coordinates unitVector(Coordinates vector, Coordinates origin);", "public RangeVector(RangeVector base) {\n int dimensions = base.values.length;\n this.values = Arrays.copyOf(base.values, dimensions);\n this.upper = Arrays.copyOf(base.upper, dimensions);\n this.lower = Arrays.copyOf(base.lower, dimensions);\n }", "public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }", "public Coordinates unitVector(Coordinates vector);", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }", "public LongRange(long number1, long number2) {\n/* 110 */ if (number2 < number1) {\n/* 111 */ this.min = number2;\n/* 112 */ this.max = number1;\n/* */ } else {\n/* 114 */ this.min = number1;\n/* 115 */ this.max = number2;\n/* */ } \n/* */ }", "public FXRequestVector( int maxFloor ) {\n this( \"Unnamed vector\", maxFloor );\n }", "public static float[] createRandom3f(float[] min_vec,float[] max_vec){\t\t\n\t\tfloat[] rand_vec = new float[3];\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\trand_vec[i] = Utilities.createRandomf(min_vec[i], max_vec[i]);\n\t\t}\n\t\treturn rand_vec;\n\t}", "public void initVector(int n) {\n\t\tvector = new ArrayList<Integer>(n);\n\t\tfor(int i=0;i<n;i++)\n\t\tvector.add(0);\n\t}", "protected double[] clampV(double nextVabs, double nextVarg)\r\n\t\t{\r\n//\t\t\tif(nextVabs < v_min)\r\n//\t\t\t\tnextVabs = v_min;\r\n//\t\t\telse if(nextVabs > v_max)\r\n//\t\t\t\tnextVabs = v_max;\r\n\t\t\t\r\n\t\t\treturn new double[]{nextVabs, nextVarg};\r\n\t\t}", "public static Vector2 GetUnitVector(Vector2 vector2){\n float length = vector2.Length();\n return new Vector2(vector2.x / length, vector2.y / length);\n }", "public LongRange(Number number) {\n/* 87 */ if (number == null) {\n/* 88 */ throw new IllegalArgumentException(\"The number must not be null\");\n/* */ }\n/* 90 */ this.min = number.longValue();\n/* 91 */ this.max = number.longValue();\n/* 92 */ if (number instanceof Long) {\n/* 93 */ this.minObject = (Long)number;\n/* 94 */ this.maxObject = (Long)number;\n/* */ } \n/* */ }", "@Test\r\n public void testMinMaxVector() {\r\n System.out.println(\"minMaxVector\");\r\n int[] vector = {1,8,3,4};\r\n VectorHelper instance = new VectorHelper();\r\n int[]expResult= {1,8};\r\n int []result=instance.minMaxVector(vector);\r\n assertArrayEquals(expResult,result);\r\n \r\n }", "public static double uniform(double[] parameters) {\r\n double a, b;\r\n a = parameters[0];\r\n b = parameters[1];\r\n return a + uniform() * (b-a);\r\n }", "@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }", "public static <N extends Number & Comparable<N>> PropertyConstraint<N> inRange(final N minInclusive, final N maxInclusive) {\n return ConstraintFactory.fromPredicate(\n new Predicate<N>() {\n @Override\n public boolean test(N t) {\n return minInclusive.compareTo(t) <= 0 && maxInclusive.compareTo(t) >= 0;\n }\n },\n \"Should be between \" + minInclusive + \" and \" + maxInclusive\n );\n\n }", "public void setUV(float u0, float v0,\n float u1, float v1,\n float u2, float v2) {\n // sets & scales uv texture coordinates to center of the pixel\n u_array[0] = (u0 * F_TEX_WIDTH + 0.5f) * 65536f;\n u_array[1] = (u1 * F_TEX_WIDTH + 0.5f) * 65536f;\n u_array[2] = (u2 * F_TEX_WIDTH + 0.5f) * 65536f;\n v_array[0] = (v0 * F_TEX_HEIGHT + 0.5f) * 65536f;\n v_array[1] = (v1 * F_TEX_HEIGHT + 0.5f) * 65536f;\n v_array[2] = (v2 * F_TEX_HEIGHT + 0.5f) * 65536f;\n }", "private static Vector filterInternal(Vector before, double[] mins, double[] maxes)\n\t{\n\t\tif (before == null)\n\t\t\tthrow new IllegalArgumentException();\n\t\tif (mins == null)\n\t\t\tthrow new IllegalArgumentException();\n\t\tif(before.size() != mins.length)\n\t\t\tthrow new IllegalArgumentException(String.format(\"Unexpected input vector size. \" +\n\t\t\t\t\t\"Expected size %d but was size %d\", mins.length, before.size()));\n\t\tdouble[] after = new double[before.size()];\n\t\tfor(int c = 0; c < mins.length; c++)\n\t\t{\n\t\t\tif(Vector.isUnknown(mins[c])) // if the attribute is nominal or ignored...\n\t\t\t\tafter[c] = before.get(c);\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(Vector.isUnknown(before.get(c)))\n\t\t\t\t{\n\t\t\t\t\tafter[c] = Vector.getUnknownValue();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (mins[c] != maxes[c])\n\t\t\t\t\t{\n\t\t\t\t\t\tafter[c] = ((before.get(c) - mins[c]) / (maxes[c] - mins[c]) * range) + base;\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\t// There is only 1 value in this column.\n\t\t\t\t\t\tif (before.get(c) > 0)\n\t\t\t\t\t\t\tafter[c] = base + range;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tafter[c] = base;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Vector(after, before.getWeight());\n\t}", "public static double randn(double miu, double sigma, double min, double max) {\n\t\tdouble x, y, dScope;\n\t\tdo {\n\t\t\tx = rand(min, max);\n\t\t\ty = normal(x, miu, sigma);\n\t\t\tdScope = rand(0.0, normal(miu, miu, sigma));\n\t\t} while (dScope > y);\n\t\treturn x;\n\t}", "public NormExpression(int minimum, int maximum, int numSteps){\n \n // Set caching values\n this.minimum = minimum;\n this.maximum = maximum;\n this.numSteps = numSteps;\n \n // Allocate space for caching\n values = new double[numSteps];\n }", "public RandomVaries(String name, int probability, float minUnits, float maxUnits){\n super(name);\n this.probability=probability;\n if(minUnits<0)generator=true;\n this.minUnits=Math.abs(minUnits);\n this.maxUnits=Math.abs(maxUnits);\n }", "private float vec_stdDevBounded(float[] v, int n, float lower, float upper){\n\t\tfloat t=(float)0.0, t2=(float)0.0;\n\t\tlong m=0;\n\t \n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif (v[i] >= lower && v[i] <= upper)\n\t\t\t{\n\t\t\t\tm++;\n\t\t\t\tt+=v[i];\n\t\t\t\tt2+=v[i]*v[i];\n\t\t\t}\n\t\t}\n\n\t\tif (m <= 1) return 0;\n\t \n\t\treturn (float)Math.sqrt((double)(t2/m - (t/m)*(t/m)));\n\t}", "public DoubleGenerator range(double min, double max) {\n this.max = max;\n this.min = min;\n return this;\n }", "public Vector normalize ( );", "public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }", "public DoubleBoundedRangeModel(\n double v,\n double e,\n double minimum,\n double maximum)\n {\n this(v, e, minimum, maximum, 10);\n\n }", "public LongRange(long number) {\n/* 73 */ this.min = number;\n/* 74 */ this.max = number;\n/* */ }", "public AdornmentTypeRange(final int min, final int max) {\n\t\tthis.maxInteger = max;\n\t\tthis.minInteger = min;\n\t}", "public Vector3D multVector(Vector3D u, Vector3D v) {\n\t\treturn new Vector3D(\n\t\t\t\tthis.x = (u.y * v.z) - (u.z * v.y), \n\t\t\t\tthis.y = (u.z * v.x) - (u.x * v.z),\n\t\t\t\tthis.z = (u.x * v.y) - (u.y * v.x));\n\t}", "private void randomNormal(Vector3f v)\n // Create a unit vector. The x- and y- values can be +ve or -ve.\n // The z-value is positive, so facing towards the viewer.\n {\n float z = (float) Math.random(); // between 0-1\n float x = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n float y = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n v.set(x, y, z);\n v.normalize();\n }", "public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }", "public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "@Override\r\n public void setMinMax(Double min, Double max) {\r\n this.minIn = min;\r\n this.maxIn = max;\r\n }", "public SpriteIndexRandom(int min, int max) {\n\n this.min = min;\n this.max = max;\n }", "int[] MinSubUnion(int x, ArrayList<Integer> vn, ArrayList<Integer> vnComp){\n\tint[] ret = new int[x];\n\t\n\t/*\n\t * Build the set for legitimate users\n\t */\n\t//ArrayList<String> L = new ArrayList<String>();\n\tArrayList<String> LComp = new ArrayList<String>();\n\t//for (int v : vn)\n\t//\tL.addAll(this.LiSet[v]);\n\tfor (int v : vnComp){\n\t\tLComp.removeAll(this.LiSet[v]);\n\t\tLComp.addAll(this.LiSet[v]);\n\t}\n\t\n\tfor(int i = 0; i < x; i ++){\n\t\tint gain = 1000000000;\n\t\tint v_min = -1;\n\t\t\n\t\tfor(int v : vn){\n\t\t\tArrayList<String> temp = this.LiSet[v];\n\t\t\ttemp.removeAll(LComp);\n\t\t\tif(gain > temp.size()){\n\t\t\t\tgain = temp.size();\n\t\t\t\tv_min = v;\n\t\t\t}\n\t\t}\n\t\tif(v_min == -1)\n\t\t\tcontinue;\n\n\t\t//L.removeAll(this.LiSet[v_max]);\n\t\tLComp.removeAll(this.LiSet[v_min]);\n\t\tLComp.addAll(this.LiSet[v_min]);\n\t\tvn.remove(vn.indexOf(v_min));\n\t\tvnComp.add(v_min);\n\t\tret[i] = v_min;\n\t}\n\treturn ret;\n}", "public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}", "public Vector3 (double[] values) {\n set(values);\n }", "public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "static Vec vector(PointDouble a, PointDouble b) {\n return new Vec(b.x - a.x, b.y - a.y);\n }", "private <T extends TType> void createAdamaxSlot(Output<T> v) {\n Operand<T> firstMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), FIRST_MOMENT, firstMomentInitializer);\n Operand<T> secondMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), SECOND_MOMENT, secondMomentInitializer);\n }", "public JTensor clamp(JType minValue, JType maxValue) {\n JTensor r = new JTensor();\n TH.THTensor_(clamp)(r, this, minValue, maxValue);\n return r;\n }", "abstract public RandomRange getPlunderRange(Unit attacker);", "ValueRangeConstraint createValueRangeConstraint();", "private void initGeneValueDistributionRangeVector() {\n\t\tfor (int i = 0; i < GATracker.GENE_VALUE_DISTRIBUTION_SIZE; i++) {\n\t\t\t// Rounding the number off to the 4 significand digits\n\t\t\tgene_value_distribution_range[i] = i;\n\n\t\t}\n\t}", "static pair getMinMax(long a[], long n) \n {\n Arrays.sort(a);\n return new pair(a[0],a[(int)(n-1)]);\n }", "protected abstract R toRange(D lower, D upper);", "public WeighedNormalRandomOutputGenerator(final int min, final int max) {\n this(min, max, 1);\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}", "private static JSpinner createRangedSpinner(int initialValue, int min, int max)\r\n\t\t{\r\n\t\tSpinnerModel spinnerModel = new SpinnerNumberModel(initialValue, min, max, 1); //default value,lower bound,upper bound,increment by\r\n\t\treturn new JSpinner(spinnerModel);\r\n\t\t}", "public static double uniform( double a, double b ) {\n return a + uniform() * ( b - a );\n }", "public Vector(boolean useGiven, double... elems) {\n\t\tif (useGiven) {\n\t\t\tthis.elements = elems;\n\t\t} else {\n\t\t\tthis.elements = new double[elems.length];\n\t\t\tfor (int i = elems.length - 1; i >= 0; i--) {\n\t\t\t\tthis.elements[i] = elems[i];\n\t\t\t}\n\t\t}\n\t\tdimensions = elems.length;\n\t}", "public static int[][] packU(int n, int[] from, int[] to, int max) {\n int[][] g = new int[n][];\n int[] p = new int[n];\n for (int i = 0; i < max; i++) p[from[i]]++;\n for (int i = 0; i < max; i++) p[to[i]]++;\n for (int i = 0; i < n; i++) g[i] = new int[p[i]];\n for (int i = 0; i < max; i++) {\n g[from[i]][--p[from[i]]] = to[i];\n g[to[i]][--p[to[i]]] = from[i];\n }\n return g;\n }", "public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}", "public void setMaximum(int n) {\r\n int newMin = Math.min(n, min);\r\n int newValue = Math.min(n, getValue());\r\n int newExtent = Math.min(n - newValue, getExtent());\r\n setRangeProperties(newValue, newExtent, newMin, n, isAdjusting);\r\n }", "public void setMinimum(int n) {\r\n int newMax = Math.max(n, max);\r\n int newValue = Math.max(n, getValue());\r\n int newExtent = Math.min(newMax - newValue, getExtent());\r\n setRangeProperties(newValue, newExtent, n, newMax, isAdjusting);\r\n }", "public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}", "private int alea(final int valeurMin,\n final int valeurMax) {\n Random r = new Random();\n return valeurMin + r.nextInt(valeurMax - valeurMin);\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "public TwoBody(double mu, VectorN r, VectorN v)\n\t{\n\t\tthis.mu = mu;\n\t\trv2Elements(r, v);\n\t}", "public Coordinates scaleVector(Coordinates vector, double factor, Coordinates origin);", "public Range(Double val) {\n\t\tminSum = maxSum = val;\n\t\tupdated = false;\n\t}", "public ThreeVector unitVector() {\r\n\t\tif (this.magnitude()==0) { \r\n\t\t\treturn new ThreeVector(0,0,0);\r\n\t\t} else {\r\n\t\t\treturn new ThreeVector(this.x/this.magnitude(), this.y/this.magnitude(), this.z/this.magnitude());\r\n\t\t}\r\n\t}", "public Vector3 normalized() {\n\t\tif (isZeroVector(this)) {\n\t\t\treturn this;\n\t\t}\n\t\treturn new Vector3(x / norm(), y / norm(), z / norm());\n\t}", "public static int[] f_fill_vector_age_people(int N){\n int[] v_vector_age= new int[N];\n for(int i=0; i<N; i++){\n\n v_vector_age[i]= (int) (Math.random()*100)+1;\n\n }\n return v_vector_age;\n }", "public ReversedLinearValueFunction(double min, double max) {\n if (min == max) {\n LOGGER.error(\n \"The upper bound is equal to the lower bound in the constructor of the\"\n + \" LinearValueFunction.\");\n throw new IllegalArgumentException(\"The upper bound can't be equal to the lower bound.\");\n }\n interval = Range.closed(min, max);\n LOGGER.info(\n \"The interval [{}, {}] has been set with success in the LinearValueFunction class.\",\n min,\n max);\n }", "private void setMinMaxPoints(BlockVector pt1, BlockVector pt2) {\r\n List<Vector> points = new ArrayList<Vector>();\r\n points.add(pt1);\r\n points.add(pt2);\r\n setMinMaxPoints(points);\r\n }", "public double[] partialU(double u, double v) {\n return null;\n }", "public static ArrayList<Integer> createRandomList(int n) {\n\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tRandom rand = new Random();\n\n\t\tint max = 1000000;\n\t\tint min = -1000000;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint value = (int) ((Math.random() * (max - min)) + min);\n\t\t\tlist.add(value);\n\t\t}\n\t\treturn list;\n\t}", "public RealIntervalBroadcaster(double min, boolean minInclusive, double max, boolean maxInclusive) {\n super(min, minInclusive, max, maxInclusive);\n }", "private void doSetRangeProps(\n double v,\n double e,\n double minimum,\n double maximum,\n int p)\n {\n double dblValue;\n\n if (minimum > maximum)\n {\n maximum = minimum;\n }\n if (maximum < minimum)\n {\n minimum = maximum;\n }\n if ((v + e) > maximum)\n {\n v = maximum - e;\n }\n if (v < minimum)\n {\n v = minimum;\n }\n\n precision = p;\n multiplier = Double.valueOf(Math.pow(10, p)).intValue();\n\n dblMinimum = minimum;\n setMinimum((int) (dblMinimum * multiplier));\n dblMaximum = maximum;\n setMaximum((int) (dblMaximum * multiplier));\n dblValue = v;\n setValue((int) (dblValue * multiplier));\n dblExtent = e;\n setExtent((int) (dblExtent * multiplier));\n }", "UnsignedValue createUnsignedValue();", "public UniformInBoxPointSequence2D(int size, double width, double height) {\n super((List<T>) generateRandomPoints(size, width, height));\n }", "private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }", "private int unmapToInt(double x, double max, double min, int n) {\n\t\treturn (int) ( (x - max) * ( Math.pow(2, n) - 1 ) / (max - min) );\n\t}", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }", "public void restrictVelocity() {\n\t\tif (velocity.x > MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = MAX_VELOCITY.x;\r\n\t\tif (velocity.y > MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = MAX_VELOCITY.y;\r\n\t\t\r\n\t\tif (velocity.x < -MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = -MAX_VELOCITY.x;\r\n\t\tif (velocity.y < -MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = -MAX_VELOCITY.y;\r\n\t}", "public static <T extends Vector> T Min(T a, T b, T result){\n for(int i = 0; i < result.axis.length; i++){\n result.axis[i] = Math.min(a.axis[i],b.axis[i]);\n }\n return result;\n }", "public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }", "Duration(int minimum, int maximum) {\n\t\t_minimum = minimum;\n\t\t_maximum = maximum;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public void sample_V() {\n\t\t//Note, sumV and sumVVT are update in the update function itself. Hence, when\n\t\t//sample_V is called after the 1 iteration of all vertices, we already have the sum.\n\t\t\n\t\t//meanV = (SUM V_j)/N\n\t\tRealVector meanV = params.sumV.mapMultiply(1.0/datasetDesc.getNumItems());\n\t\t//meanS = (SUM (V_j*V_j')/N)\n\t\tRealMatrix meanS = params.sumVVT.scalarMultiply(1.0/datasetDesc.getNumItems());\n\t\t\n\t\t//mu0 = (beta0*mu0 + meanV)/(beta0 + N)\n\t\tRealVector mu0_ = (params.mu0_V.mapMultiply(params.beta0_V).add(meanV)).mapDivide((params.beta0_V + datasetDesc.getNumItems()));\n\t\t\n\t\tdouble beta0_ = params.beta0_V + datasetDesc.getNumItems();\n\t\tint nu0_ = params.nu0_V + datasetDesc.getNumItems();\n\t\t\n\t\t//W0 = inv( inv(W0) + N*meanS + (beta0*N/(beta0 + N))(mu0 - meanU)*(mu0 - meanU)'\n\t\tRealVector tmp = params.mu0_V.subtract(meanV);\n\t\tRealMatrix mu0_d_meanV_T = tmp.outerProduct(tmp); \n\t\tmu0_d_meanV_T = mu0_d_meanV_T.scalarMultiply((params.beta0_V*datasetDesc.getNumItems()/(params.beta0_V + datasetDesc.getNumItems())));\n\t\tRealMatrix invW0_ = params.invW0_V.add(params.sumVVT).add(mu0_d_meanV_T);\n\n\t\t//Update all the values.\n\t\tparams.mu0_V = mu0_;\n\t\tparams.beta0_V = beta0_;\n\t\tparams.nu0_V = nu0_;\n\t\tparams.invW0_V = invW0_;\n\t\tparams.W0_V = (new LUDecompositionImpl(invW0_)).getSolver().getInverse();\n\t\t\n\t\t//Sample lambda_V and mu_V from the Gaussian Wishart distribution\n\t\t// http://en.wikipedia.org/wiki/Normal-Wishart_distribution#Generating_normal-Wishart_random_variates\n\t\t//Draw lambda_V from Wishart distribution with scale matrix w0_U.\n\t\tparams.lambda_V = sampleWishart(params.invW0_V, params.nu0_V);\n\t\t//Compute cov = inv(beta0*lambda) \n\t\tRealMatrix cov = (new LUDecompositionImpl(params.lambda_V.scalarMultiply(params.beta0_V))).getSolver().getInverse();\n\t\t//Draw mu_V from multivariate normal dist with mean mu0_V and covariance inv(beta0_V*lambda)\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(params.mu0_V.toArray(), \n\t\t\t\tcov.getData());\n\t\tparams.mu_V = new ArrayRealVector(dist.sample());\n\t\t\n\t\t//Reset the sum of latent factors.\n\t\tparams.sumV.mapMultiply(0);\n\t\tparams.sumVVT.scalarMultiply(0);\n\t}", "public AggregateMinMaxResponse aggregateMinMax(AggregateMinMaxRequest request) throws GPUdbException {\n AggregateMinMaxResponse actualResponse_ = new AggregateMinMaxResponse();\n submitRequest(\"/aggregate/minmax\", request, actualResponse_, false);\n return actualResponse_;\n }", "public Vector(double... elems) {\n\t\tthis(false, elems);\n\t}", "public void addGUVectorLimit() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"g-u-vector-limit\",\n null,\n childrenNames());\n }", "public abstract Vector4fc min(IVector4f v);", "public Vector2D normalizedVect() {\n return new Vector2D(x / magnitude(), y / magnitude());\n }", "public static Vector normalize(Vector v) {\r\n Vector w = new Vector(v);\r\n w.normalize();\r\n return w;\r\n }", "public FXRequestVector( String name, int maxFloor ) {\n this.name = name;\n floors = maxFloor;\n //bitVectorProperty().addListener( new DebugListener());\n }", "public Builder mergeNormal(godot.wire.Wire.Vector3 value) {\n if (normalBuilder_ == null) {\n if (normal_ != null) {\n normal_ =\n godot.wire.Wire.Vector3.newBuilder(normal_).mergeFrom(value).buildPartial();\n } else {\n normal_ = value;\n }\n onChanged();\n } else {\n normalBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public void ComputeBounds( Vec3 min, Vec3 max )\r\n\t{\r\n\t\tfor ( int iTempCount = 1; iTempCount <= 3; iTempCount++ )\r\n\t\t{\r\n\t\t\tVec3 tempPoint = m_vertices[iTempCount];\r\n\t\t\t\r\n\t\t\tif ( tempPoint.xCoord < min.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.xCoord = tempPoint.xCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.xCoord > max.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.xCoord = tempPoint.xCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.yCoord < min.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.yCoord = tempPoint.yCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.yCoord > max.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.yCoord = tempPoint.yCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.zCoord < min.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.zCoord = tempPoint.zCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.zCoord > max.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.zCoord = tempPoint.zCoord;\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t}", "Lista<V> valuesInRange(K init, K end);", "public Coordinates scaleVector(Coordinates vector, double factor);", "public static double makeUtmostVelocity(double staticVelocity,\n double outerVelocity) {\n return (outerVelocity == 0) ? 0 : (outerVelocity + staticVelocity) / 2;\n }" ]
[ "0.6985098", "0.6624931", "0.61554444", "0.524722", "0.50657207", "0.50472087", "0.49875146", "0.49669155", "0.49064627", "0.48704806", "0.4851601", "0.48328465", "0.48313278", "0.47948936", "0.46943855", "0.4682149", "0.46464735", "0.46320048", "0.46297425", "0.46130773", "0.46107444", "0.45989898", "0.45988628", "0.4592601", "0.4592117", "0.45657566", "0.455821", "0.45434022", "0.4523369", "0.45230806", "0.45085287", "0.45009083", "0.4498924", "0.44752485", "0.44720674", "0.446462", "0.4458526", "0.4456996", "0.44478068", "0.44411755", "0.4439233", "0.44376957", "0.44164366", "0.44114983", "0.4397595", "0.4391706", "0.4378495", "0.43571654", "0.4351163", "0.4349697", "0.43440294", "0.43312338", "0.43285665", "0.4316068", "0.42975256", "0.42973483", "0.429649", "0.42939276", "0.42807597", "0.42710644", "0.42708856", "0.4263493", "0.4260593", "0.42473203", "0.42469165", "0.42457378", "0.4242818", "0.42382428", "0.42376912", "0.42349064", "0.42311287", "0.42201528", "0.42184395", "0.42035198", "0.41917905", "0.41888216", "0.41881487", "0.4181959", "0.4172048", "0.41713664", "0.4165093", "0.41562116", "0.41561437", "0.41555354", "0.41433758", "0.4141723", "0.4140505", "0.41357014", "0.41347378", "0.41300023", "0.41295117", "0.41272995", "0.4125142", "0.41171345", "0.41073373", "0.4105241", "0.41046417", "0.41029727", "0.4095679", "0.40928313" ]
0.70487505
0
Create a UniformVector given a VectorN containing the mins and another containing the max values.
public UniformVector(VectorN mn, VectorN mx, long seed){ super(mn.length); mx.checkVectorDimensions(mn); this.min = new VectorN(mn); this.max = new VectorN(mx); if (seed > 0) seed = -seed; this.idum = seed; this.rn = new RandomNumber(this.idum); fillVector(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UniformVector(VectorN mn, VectorN mx){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }", "public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }", "public RangeVector(float[] values, float[] upper, float[] lower) {\n checkArgument(values.length > 0, \" dimensions must be > 0\");\n checkArgument(values.length == upper.length && upper.length == lower.length, \"dimensions must be equal\");\n for (int i = 0; i < values.length; i++) {\n checkArgument(upper[i] >= values[i] && values[i] >= lower[i], \"incorrect semantics\");\n }\n this.values = Arrays.copyOf(values, values.length);\n this.upper = Arrays.copyOf(upper, upper.length);\n this.lower = Arrays.copyOf(lower, lower.length);\n }", "public LongRange(Number number1, Number number2) {\n/* 132 */ if (number1 == null || number2 == null) {\n/* 133 */ throw new IllegalArgumentException(\"The numbers must not be null\");\n/* */ }\n/* 135 */ long number1val = number1.longValue();\n/* 136 */ long number2val = number2.longValue();\n/* 137 */ if (number2val < number1val) {\n/* 138 */ this.min = number2val;\n/* 139 */ this.max = number1val;\n/* 140 */ if (number2 instanceof Long) {\n/* 141 */ this.minObject = (Long)number2;\n/* */ }\n/* 143 */ if (number1 instanceof Long) {\n/* 144 */ this.maxObject = (Long)number1;\n/* */ }\n/* */ } else {\n/* 147 */ this.min = number1val;\n/* 148 */ this.max = number2val;\n/* 149 */ if (number1 instanceof Long) {\n/* 150 */ this.minObject = (Long)number1;\n/* */ }\n/* 152 */ if (number2 instanceof Long) {\n/* 153 */ this.maxObject = (Long)number2;\n/* */ }\n/* */ } \n/* */ }", "public Coordinates unitVector(Coordinates vector, Coordinates origin);", "public RangeVector(RangeVector base) {\n int dimensions = base.values.length;\n this.values = Arrays.copyOf(base.values, dimensions);\n this.upper = Arrays.copyOf(base.upper, dimensions);\n this.lower = Arrays.copyOf(base.lower, dimensions);\n }", "public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }", "public Coordinates unitVector(Coordinates vector);", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }", "public LongRange(long number1, long number2) {\n/* 110 */ if (number2 < number1) {\n/* 111 */ this.min = number2;\n/* 112 */ this.max = number1;\n/* */ } else {\n/* 114 */ this.min = number1;\n/* 115 */ this.max = number2;\n/* */ } \n/* */ }", "public FXRequestVector( int maxFloor ) {\n this( \"Unnamed vector\", maxFloor );\n }", "public static float[] createRandom3f(float[] min_vec,float[] max_vec){\t\t\n\t\tfloat[] rand_vec = new float[3];\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\trand_vec[i] = Utilities.createRandomf(min_vec[i], max_vec[i]);\n\t\t}\n\t\treturn rand_vec;\n\t}", "public void initVector(int n) {\n\t\tvector = new ArrayList<Integer>(n);\n\t\tfor(int i=0;i<n;i++)\n\t\tvector.add(0);\n\t}", "protected double[] clampV(double nextVabs, double nextVarg)\r\n\t\t{\r\n//\t\t\tif(nextVabs < v_min)\r\n//\t\t\t\tnextVabs = v_min;\r\n//\t\t\telse if(nextVabs > v_max)\r\n//\t\t\t\tnextVabs = v_max;\r\n\t\t\t\r\n\t\t\treturn new double[]{nextVabs, nextVarg};\r\n\t\t}", "public static Vector2 GetUnitVector(Vector2 vector2){\n float length = vector2.Length();\n return new Vector2(vector2.x / length, vector2.y / length);\n }", "public LongRange(Number number) {\n/* 87 */ if (number == null) {\n/* 88 */ throw new IllegalArgumentException(\"The number must not be null\");\n/* */ }\n/* 90 */ this.min = number.longValue();\n/* 91 */ this.max = number.longValue();\n/* 92 */ if (number instanceof Long) {\n/* 93 */ this.minObject = (Long)number;\n/* 94 */ this.maxObject = (Long)number;\n/* */ } \n/* */ }", "@Test\r\n public void testMinMaxVector() {\r\n System.out.println(\"minMaxVector\");\r\n int[] vector = {1,8,3,4};\r\n VectorHelper instance = new VectorHelper();\r\n int[]expResult= {1,8};\r\n int []result=instance.minMaxVector(vector);\r\n assertArrayEquals(expResult,result);\r\n \r\n }", "public static double uniform(double[] parameters) {\r\n double a, b;\r\n a = parameters[0];\r\n b = parameters[1];\r\n return a + uniform() * (b-a);\r\n }", "@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }", "public static <N extends Number & Comparable<N>> PropertyConstraint<N> inRange(final N minInclusive, final N maxInclusive) {\n return ConstraintFactory.fromPredicate(\n new Predicate<N>() {\n @Override\n public boolean test(N t) {\n return minInclusive.compareTo(t) <= 0 && maxInclusive.compareTo(t) >= 0;\n }\n },\n \"Should be between \" + minInclusive + \" and \" + maxInclusive\n );\n\n }", "public void setUV(float u0, float v0,\n float u1, float v1,\n float u2, float v2) {\n // sets & scales uv texture coordinates to center of the pixel\n u_array[0] = (u0 * F_TEX_WIDTH + 0.5f) * 65536f;\n u_array[1] = (u1 * F_TEX_WIDTH + 0.5f) * 65536f;\n u_array[2] = (u2 * F_TEX_WIDTH + 0.5f) * 65536f;\n v_array[0] = (v0 * F_TEX_HEIGHT + 0.5f) * 65536f;\n v_array[1] = (v1 * F_TEX_HEIGHT + 0.5f) * 65536f;\n v_array[2] = (v2 * F_TEX_HEIGHT + 0.5f) * 65536f;\n }", "private static Vector filterInternal(Vector before, double[] mins, double[] maxes)\n\t{\n\t\tif (before == null)\n\t\t\tthrow new IllegalArgumentException();\n\t\tif (mins == null)\n\t\t\tthrow new IllegalArgumentException();\n\t\tif(before.size() != mins.length)\n\t\t\tthrow new IllegalArgumentException(String.format(\"Unexpected input vector size. \" +\n\t\t\t\t\t\"Expected size %d but was size %d\", mins.length, before.size()));\n\t\tdouble[] after = new double[before.size()];\n\t\tfor(int c = 0; c < mins.length; c++)\n\t\t{\n\t\t\tif(Vector.isUnknown(mins[c])) // if the attribute is nominal or ignored...\n\t\t\t\tafter[c] = before.get(c);\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(Vector.isUnknown(before.get(c)))\n\t\t\t\t{\n\t\t\t\t\tafter[c] = Vector.getUnknownValue();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (mins[c] != maxes[c])\n\t\t\t\t\t{\n\t\t\t\t\t\tafter[c] = ((before.get(c) - mins[c]) / (maxes[c] - mins[c]) * range) + base;\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\t// There is only 1 value in this column.\n\t\t\t\t\t\tif (before.get(c) > 0)\n\t\t\t\t\t\t\tafter[c] = base + range;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tafter[c] = base;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Vector(after, before.getWeight());\n\t}", "public static double randn(double miu, double sigma, double min, double max) {\n\t\tdouble x, y, dScope;\n\t\tdo {\n\t\t\tx = rand(min, max);\n\t\t\ty = normal(x, miu, sigma);\n\t\t\tdScope = rand(0.0, normal(miu, miu, sigma));\n\t\t} while (dScope > y);\n\t\treturn x;\n\t}", "public NormExpression(int minimum, int maximum, int numSteps){\n \n // Set caching values\n this.minimum = minimum;\n this.maximum = maximum;\n this.numSteps = numSteps;\n \n // Allocate space for caching\n values = new double[numSteps];\n }", "public RandomVaries(String name, int probability, float minUnits, float maxUnits){\n super(name);\n this.probability=probability;\n if(minUnits<0)generator=true;\n this.minUnits=Math.abs(minUnits);\n this.maxUnits=Math.abs(maxUnits);\n }", "private float vec_stdDevBounded(float[] v, int n, float lower, float upper){\n\t\tfloat t=(float)0.0, t2=(float)0.0;\n\t\tlong m=0;\n\t \n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif (v[i] >= lower && v[i] <= upper)\n\t\t\t{\n\t\t\t\tm++;\n\t\t\t\tt+=v[i];\n\t\t\t\tt2+=v[i]*v[i];\n\t\t\t}\n\t\t}\n\n\t\tif (m <= 1) return 0;\n\t \n\t\treturn (float)Math.sqrt((double)(t2/m - (t/m)*(t/m)));\n\t}", "public DoubleGenerator range(double min, double max) {\n this.max = max;\n this.min = min;\n return this;\n }", "public Vector normalize ( );", "public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }", "public DoubleBoundedRangeModel(\n double v,\n double e,\n double minimum,\n double maximum)\n {\n this(v, e, minimum, maximum, 10);\n\n }", "public LongRange(long number) {\n/* 73 */ this.min = number;\n/* 74 */ this.max = number;\n/* */ }", "public AdornmentTypeRange(final int min, final int max) {\n\t\tthis.maxInteger = max;\n\t\tthis.minInteger = min;\n\t}", "public Vector3D multVector(Vector3D u, Vector3D v) {\n\t\treturn new Vector3D(\n\t\t\t\tthis.x = (u.y * v.z) - (u.z * v.y), \n\t\t\t\tthis.y = (u.z * v.x) - (u.x * v.z),\n\t\t\t\tthis.z = (u.x * v.y) - (u.y * v.x));\n\t}", "private void randomNormal(Vector3f v)\n // Create a unit vector. The x- and y- values can be +ve or -ve.\n // The z-value is positive, so facing towards the viewer.\n {\n float z = (float) Math.random(); // between 0-1\n float x = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n float y = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n v.set(x, y, z);\n v.normalize();\n }", "public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }", "public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "@Override\r\n public void setMinMax(Double min, Double max) {\r\n this.minIn = min;\r\n this.maxIn = max;\r\n }", "public SpriteIndexRandom(int min, int max) {\n\n this.min = min;\n this.max = max;\n }", "int[] MinSubUnion(int x, ArrayList<Integer> vn, ArrayList<Integer> vnComp){\n\tint[] ret = new int[x];\n\t\n\t/*\n\t * Build the set for legitimate users\n\t */\n\t//ArrayList<String> L = new ArrayList<String>();\n\tArrayList<String> LComp = new ArrayList<String>();\n\t//for (int v : vn)\n\t//\tL.addAll(this.LiSet[v]);\n\tfor (int v : vnComp){\n\t\tLComp.removeAll(this.LiSet[v]);\n\t\tLComp.addAll(this.LiSet[v]);\n\t}\n\t\n\tfor(int i = 0; i < x; i ++){\n\t\tint gain = 1000000000;\n\t\tint v_min = -1;\n\t\t\n\t\tfor(int v : vn){\n\t\t\tArrayList<String> temp = this.LiSet[v];\n\t\t\ttemp.removeAll(LComp);\n\t\t\tif(gain > temp.size()){\n\t\t\t\tgain = temp.size();\n\t\t\t\tv_min = v;\n\t\t\t}\n\t\t}\n\t\tif(v_min == -1)\n\t\t\tcontinue;\n\n\t\t//L.removeAll(this.LiSet[v_max]);\n\t\tLComp.removeAll(this.LiSet[v_min]);\n\t\tLComp.addAll(this.LiSet[v_min]);\n\t\tvn.remove(vn.indexOf(v_min));\n\t\tvnComp.add(v_min);\n\t\tret[i] = v_min;\n\t}\n\treturn ret;\n}", "public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}", "public Vector3 (double[] values) {\n set(values);\n }", "public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "static Vec vector(PointDouble a, PointDouble b) {\n return new Vec(b.x - a.x, b.y - a.y);\n }", "private <T extends TType> void createAdamaxSlot(Output<T> v) {\n Operand<T> firstMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), FIRST_MOMENT, firstMomentInitializer);\n Operand<T> secondMomentInitializer =\n tf.fill(tf.shape(v), tf.dtypes.cast(tf.constant(0.0f), v.type()));\n createSlot(v.asOutput(), SECOND_MOMENT, secondMomentInitializer);\n }", "public JTensor clamp(JType minValue, JType maxValue) {\n JTensor r = new JTensor();\n TH.THTensor_(clamp)(r, this, minValue, maxValue);\n return r;\n }", "abstract public RandomRange getPlunderRange(Unit attacker);", "ValueRangeConstraint createValueRangeConstraint();", "private void initGeneValueDistributionRangeVector() {\n\t\tfor (int i = 0; i < GATracker.GENE_VALUE_DISTRIBUTION_SIZE; i++) {\n\t\t\t// Rounding the number off to the 4 significand digits\n\t\t\tgene_value_distribution_range[i] = i;\n\n\t\t}\n\t}", "static pair getMinMax(long a[], long n) \n {\n Arrays.sort(a);\n return new pair(a[0],a[(int)(n-1)]);\n }", "protected abstract R toRange(D lower, D upper);", "public WeighedNormalRandomOutputGenerator(final int min, final int max) {\n this(min, max, 1);\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}", "private static JSpinner createRangedSpinner(int initialValue, int min, int max)\r\n\t\t{\r\n\t\tSpinnerModel spinnerModel = new SpinnerNumberModel(initialValue, min, max, 1); //default value,lower bound,upper bound,increment by\r\n\t\treturn new JSpinner(spinnerModel);\r\n\t\t}", "public static double uniform( double a, double b ) {\n return a + uniform() * ( b - a );\n }", "public Vector(boolean useGiven, double... elems) {\n\t\tif (useGiven) {\n\t\t\tthis.elements = elems;\n\t\t} else {\n\t\t\tthis.elements = new double[elems.length];\n\t\t\tfor (int i = elems.length - 1; i >= 0; i--) {\n\t\t\t\tthis.elements[i] = elems[i];\n\t\t\t}\n\t\t}\n\t\tdimensions = elems.length;\n\t}", "public static int[][] packU(int n, int[] from, int[] to, int max) {\n int[][] g = new int[n][];\n int[] p = new int[n];\n for (int i = 0; i < max; i++) p[from[i]]++;\n for (int i = 0; i < max; i++) p[to[i]]++;\n for (int i = 0; i < n; i++) g[i] = new int[p[i]];\n for (int i = 0; i < max; i++) {\n g[from[i]][--p[from[i]]] = to[i];\n g[to[i]][--p[to[i]]] = from[i];\n }\n return g;\n }", "public static int generatRandomPositiveNegitiveValue(int max , int min) {\n\t int ii = -min + (int) (Math.random() * ((max - (-min)) + 1));\n\t return ii;\n\t}", "public void setMaximum(int n) {\r\n int newMin = Math.min(n, min);\r\n int newValue = Math.min(n, getValue());\r\n int newExtent = Math.min(n - newValue, getExtent());\r\n setRangeProperties(newValue, newExtent, newMin, n, isAdjusting);\r\n }", "public void setMinimum(int n) {\r\n int newMax = Math.max(n, max);\r\n int newValue = Math.max(n, getValue());\r\n int newExtent = Math.min(newMax - newValue, getExtent());\r\n setRangeProperties(newValue, newExtent, n, newMax, isAdjusting);\r\n }", "public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}", "private int alea(final int valeurMin,\n final int valeurMax) {\n Random r = new Random();\n return valeurMin + r.nextInt(valeurMax - valeurMin);\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "public TwoBody(double mu, VectorN r, VectorN v)\n\t{\n\t\tthis.mu = mu;\n\t\trv2Elements(r, v);\n\t}", "public Coordinates scaleVector(Coordinates vector, double factor, Coordinates origin);", "public Range(Double val) {\n\t\tminSum = maxSum = val;\n\t\tupdated = false;\n\t}", "public ThreeVector unitVector() {\r\n\t\tif (this.magnitude()==0) { \r\n\t\t\treturn new ThreeVector(0,0,0);\r\n\t\t} else {\r\n\t\t\treturn new ThreeVector(this.x/this.magnitude(), this.y/this.magnitude(), this.z/this.magnitude());\r\n\t\t}\r\n\t}", "public Vector3 normalized() {\n\t\tif (isZeroVector(this)) {\n\t\t\treturn this;\n\t\t}\n\t\treturn new Vector3(x / norm(), y / norm(), z / norm());\n\t}", "public static int[] f_fill_vector_age_people(int N){\n int[] v_vector_age= new int[N];\n for(int i=0; i<N; i++){\n\n v_vector_age[i]= (int) (Math.random()*100)+1;\n\n }\n return v_vector_age;\n }", "public ReversedLinearValueFunction(double min, double max) {\n if (min == max) {\n LOGGER.error(\n \"The upper bound is equal to the lower bound in the constructor of the\"\n + \" LinearValueFunction.\");\n throw new IllegalArgumentException(\"The upper bound can't be equal to the lower bound.\");\n }\n interval = Range.closed(min, max);\n LOGGER.info(\n \"The interval [{}, {}] has been set with success in the LinearValueFunction class.\",\n min,\n max);\n }", "private void setMinMaxPoints(BlockVector pt1, BlockVector pt2) {\r\n List<Vector> points = new ArrayList<Vector>();\r\n points.add(pt1);\r\n points.add(pt2);\r\n setMinMaxPoints(points);\r\n }", "public double[] partialU(double u, double v) {\n return null;\n }", "public static ArrayList<Integer> createRandomList(int n) {\n\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tRandom rand = new Random();\n\n\t\tint max = 1000000;\n\t\tint min = -1000000;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint value = (int) ((Math.random() * (max - min)) + min);\n\t\t\tlist.add(value);\n\t\t}\n\t\treturn list;\n\t}", "public RealIntervalBroadcaster(double min, boolean minInclusive, double max, boolean maxInclusive) {\n super(min, minInclusive, max, maxInclusive);\n }", "private void doSetRangeProps(\n double v,\n double e,\n double minimum,\n double maximum,\n int p)\n {\n double dblValue;\n\n if (minimum > maximum)\n {\n maximum = minimum;\n }\n if (maximum < minimum)\n {\n minimum = maximum;\n }\n if ((v + e) > maximum)\n {\n v = maximum - e;\n }\n if (v < minimum)\n {\n v = minimum;\n }\n\n precision = p;\n multiplier = Double.valueOf(Math.pow(10, p)).intValue();\n\n dblMinimum = minimum;\n setMinimum((int) (dblMinimum * multiplier));\n dblMaximum = maximum;\n setMaximum((int) (dblMaximum * multiplier));\n dblValue = v;\n setValue((int) (dblValue * multiplier));\n dblExtent = e;\n setExtent((int) (dblExtent * multiplier));\n }", "UnsignedValue createUnsignedValue();", "public UniformInBoxPointSequence2D(int size, double width, double height) {\n super((List<T>) generateRandomPoints(size, width, height));\n }", "private int _getRandomFromRange(int min, int max) {\n\t \n return min + random_.nextInt(max - min + 1);\n }", "private int unmapToInt(double x, double max, double min, int n) {\n\t\treturn (int) ( (x - max) * ( Math.pow(2, n) - 1 ) / (max - min) );\n\t}", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }", "public void restrictVelocity() {\n\t\tif (velocity.x > MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = MAX_VELOCITY.x;\r\n\t\tif (velocity.y > MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = MAX_VELOCITY.y;\r\n\t\t\r\n\t\tif (velocity.x < -MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = -MAX_VELOCITY.x;\r\n\t\tif (velocity.y < -MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = -MAX_VELOCITY.y;\r\n\t}", "public static <T extends Vector> T Min(T a, T b, T result){\n for(int i = 0; i < result.axis.length; i++){\n result.axis[i] = Math.min(a.axis[i],b.axis[i]);\n }\n return result;\n }", "public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }", "Duration(int minimum, int maximum) {\n\t\t_minimum = minimum;\n\t\t_maximum = maximum;\n\t\t_range = new Range(_minimum, _maximum);\n\t}", "public void sample_V() {\n\t\t//Note, sumV and sumVVT are update in the update function itself. Hence, when\n\t\t//sample_V is called after the 1 iteration of all vertices, we already have the sum.\n\t\t\n\t\t//meanV = (SUM V_j)/N\n\t\tRealVector meanV = params.sumV.mapMultiply(1.0/datasetDesc.getNumItems());\n\t\t//meanS = (SUM (V_j*V_j')/N)\n\t\tRealMatrix meanS = params.sumVVT.scalarMultiply(1.0/datasetDesc.getNumItems());\n\t\t\n\t\t//mu0 = (beta0*mu0 + meanV)/(beta0 + N)\n\t\tRealVector mu0_ = (params.mu0_V.mapMultiply(params.beta0_V).add(meanV)).mapDivide((params.beta0_V + datasetDesc.getNumItems()));\n\t\t\n\t\tdouble beta0_ = params.beta0_V + datasetDesc.getNumItems();\n\t\tint nu0_ = params.nu0_V + datasetDesc.getNumItems();\n\t\t\n\t\t//W0 = inv( inv(W0) + N*meanS + (beta0*N/(beta0 + N))(mu0 - meanU)*(mu0 - meanU)'\n\t\tRealVector tmp = params.mu0_V.subtract(meanV);\n\t\tRealMatrix mu0_d_meanV_T = tmp.outerProduct(tmp); \n\t\tmu0_d_meanV_T = mu0_d_meanV_T.scalarMultiply((params.beta0_V*datasetDesc.getNumItems()/(params.beta0_V + datasetDesc.getNumItems())));\n\t\tRealMatrix invW0_ = params.invW0_V.add(params.sumVVT).add(mu0_d_meanV_T);\n\n\t\t//Update all the values.\n\t\tparams.mu0_V = mu0_;\n\t\tparams.beta0_V = beta0_;\n\t\tparams.nu0_V = nu0_;\n\t\tparams.invW0_V = invW0_;\n\t\tparams.W0_V = (new LUDecompositionImpl(invW0_)).getSolver().getInverse();\n\t\t\n\t\t//Sample lambda_V and mu_V from the Gaussian Wishart distribution\n\t\t// http://en.wikipedia.org/wiki/Normal-Wishart_distribution#Generating_normal-Wishart_random_variates\n\t\t//Draw lambda_V from Wishart distribution with scale matrix w0_U.\n\t\tparams.lambda_V = sampleWishart(params.invW0_V, params.nu0_V);\n\t\t//Compute cov = inv(beta0*lambda) \n\t\tRealMatrix cov = (new LUDecompositionImpl(params.lambda_V.scalarMultiply(params.beta0_V))).getSolver().getInverse();\n\t\t//Draw mu_V from multivariate normal dist with mean mu0_V and covariance inv(beta0_V*lambda)\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(params.mu0_V.toArray(), \n\t\t\t\tcov.getData());\n\t\tparams.mu_V = new ArrayRealVector(dist.sample());\n\t\t\n\t\t//Reset the sum of latent factors.\n\t\tparams.sumV.mapMultiply(0);\n\t\tparams.sumVVT.scalarMultiply(0);\n\t}", "public AggregateMinMaxResponse aggregateMinMax(AggregateMinMaxRequest request) throws GPUdbException {\n AggregateMinMaxResponse actualResponse_ = new AggregateMinMaxResponse();\n submitRequest(\"/aggregate/minmax\", request, actualResponse_, false);\n return actualResponse_;\n }", "public Vector(double... elems) {\n\t\tthis(false, elems);\n\t}", "public void addGUVectorLimit() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"g-u-vector-limit\",\n null,\n childrenNames());\n }", "public abstract Vector4fc min(IVector4f v);", "public Vector2D normalizedVect() {\n return new Vector2D(x / magnitude(), y / magnitude());\n }", "public static Vector normalize(Vector v) {\r\n Vector w = new Vector(v);\r\n w.normalize();\r\n return w;\r\n }", "public FXRequestVector( String name, int maxFloor ) {\n this.name = name;\n floors = maxFloor;\n //bitVectorProperty().addListener( new DebugListener());\n }", "public Builder mergeNormal(godot.wire.Wire.Vector3 value) {\n if (normalBuilder_ == null) {\n if (normal_ != null) {\n normal_ =\n godot.wire.Wire.Vector3.newBuilder(normal_).mergeFrom(value).buildPartial();\n } else {\n normal_ = value;\n }\n onChanged();\n } else {\n normalBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public void ComputeBounds( Vec3 min, Vec3 max )\r\n\t{\r\n\t\tfor ( int iTempCount = 1; iTempCount <= 3; iTempCount++ )\r\n\t\t{\r\n\t\t\tVec3 tempPoint = m_vertices[iTempCount];\r\n\t\t\t\r\n\t\t\tif ( tempPoint.xCoord < min.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.xCoord = tempPoint.xCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.xCoord > max.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.xCoord = tempPoint.xCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.yCoord < min.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.yCoord = tempPoint.yCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.yCoord > max.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.yCoord = tempPoint.yCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.zCoord < min.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.zCoord = tempPoint.zCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.zCoord > max.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.zCoord = tempPoint.zCoord;\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t}", "Lista<V> valuesInRange(K init, K end);", "public Coordinates scaleVector(Coordinates vector, double factor);", "public static double makeUtmostVelocity(double staticVelocity,\n double outerVelocity) {\n return (outerVelocity == 0) ? 0 : (outerVelocity + staticVelocity) / 2;\n }" ]
[ "0.70487505", "0.6985098", "0.61554444", "0.524722", "0.50657207", "0.50472087", "0.49875146", "0.49669155", "0.49064627", "0.48704806", "0.4851601", "0.48328465", "0.48313278", "0.47948936", "0.46943855", "0.4682149", "0.46464735", "0.46320048", "0.46297425", "0.46130773", "0.46107444", "0.45989898", "0.45988628", "0.4592601", "0.4592117", "0.45657566", "0.455821", "0.45434022", "0.4523369", "0.45230806", "0.45085287", "0.45009083", "0.4498924", "0.44752485", "0.44720674", "0.446462", "0.4458526", "0.4456996", "0.44478068", "0.44411755", "0.4439233", "0.44376957", "0.44164366", "0.44114983", "0.4397595", "0.4391706", "0.4378495", "0.43571654", "0.4351163", "0.4349697", "0.43440294", "0.43312338", "0.43285665", "0.4316068", "0.42975256", "0.42973483", "0.429649", "0.42939276", "0.42807597", "0.42710644", "0.42708856", "0.4263493", "0.4260593", "0.42473203", "0.42469165", "0.42457378", "0.4242818", "0.42382428", "0.42376912", "0.42349064", "0.42311287", "0.42201528", "0.42184395", "0.42035198", "0.41917905", "0.41888216", "0.41881487", "0.4181959", "0.4172048", "0.41713664", "0.4165093", "0.41562116", "0.41561437", "0.41555354", "0.41433758", "0.4141723", "0.4140505", "0.41357014", "0.41347378", "0.41300023", "0.41295117", "0.41272995", "0.4125142", "0.41171345", "0.41073373", "0.4105241", "0.41046417", "0.41029727", "0.4095679", "0.40928313" ]
0.6624931
2
Fills the vector components with random numbers.
public void fillVector(){ int n = min.length; for (int i = 0; i < n; i++) { this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] f_fill_vector_age_people(int N){\n int[] v_vector_age= new int[N];\n for(int i=0; i<N; i++){\n\n v_vector_age[i]= (int) (Math.random()*100)+1;\n\n }\n return v_vector_age;\n }", "public static void generator(){\n int vector[]= new int[5];\r\n vector[10]=20;\r\n }", "public static <E> Vector<E> randomize(final Vector<E> vector, final Random random) {\n\t\tfor(int i = 0; i < vector.size() - 1; ++i) { //start at the first element and go to the second to last element\n\t\t\tint fromIndex = ((int)(random.nextFloat() * (vector.size() - i))) + i; //get a random number (from zero to the number of elements left minus one), and put it into the range at our current slot\n\t\t\tif(fromIndex != i) { //if we should move our current object\n\t\t\t\tfinal E tempObject = vector.elementAt(i); //get a reference to the element to be replaced\n\t\t\t\tvector.setElementAt(vector.elementAt(fromIndex), i); //copy the specified element from its index into the current slot\n\t\t\t\tvector.setElementAt(tempObject, fromIndex); //put the element that used to be in this slot where the other one came from\n\t\t\t}\n\t\t}\n\t\treturn vector; //return the vector, which is now randomized\n\t}", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "private void populate ()\n\t{\n\t\t//create a random object\n\t\tRandom rand = new Random(); \n\t\t//for loop for row\n\t\tfor (int row =0; row < currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column = 0; column < currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assign byte values from [0 to state-1] into array\n\t\t\t\tcurrentVersion[row][column] = (byte) rand.nextInt((this.state-1));\n\t\t\t}\n\t\t}\n\t}", "public static void randomInit(int r) { }", "public void setRandomValues(float avg, float distr) {\n\t\tfor(int i = 0; i < size; i++)\n\t\t\tvector[i] = avg+MathUtils.randomTriangular()*distr;\n\t}", "RedSphere() {\n Random random = new Random();\n for (int i = 0; i < 6; i++) {\n value[i] = random.nextInt(33) + 1;\n }\n }", "private double[] getRandomVector(int dimension) {\n double[] s = new double[dimension];\n Random gen = new Random();\n for (int i = 0; i < s.length; ++i) {\n s[i] = (2 * gen.nextDouble()) - 1;\n }\n return s;\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public List<Vec> sample(int count, Random rand);", "static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }", "public static void randomize(Object[] v) throws NotImplementedException {\r\n if(v instanceof Integer[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = getRandom(Integer.MIN_VALUE, Integer.MAX_VALUE);\r\n }\r\n } else if(v instanceof Short[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (short) getRandom(Short.MIN_VALUE, Short.MAX_VALUE);\r\n }\r\n } else if(v instanceof Boolean[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (getRandom(0, 1) == 1);\r\n }\r\n } else if(v instanceof Character[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (char) getRandom(0, 127); // 255\r\n }\r\n } else if(v instanceof Float[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (float) (-1000.0 + Math.random() * 1000.0);\r\n }\r\n } else {\r\n throw new NotImplementedException();\r\n }\r\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "private void random() {\n\n\t}", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "@Override\n public void randomize(int randomSeed) {\n Random rand = new Random(randomSeed);\n for(int j = size - 1; j > 0; j --){\n int randIndex = rand.nextInt(j);\n \n int [] tmp = data[randIndex];\n data[randIndex] = data[j];\n data[j] = tmp;\n \n int tmpl = labels[randIndex];\n labels[randIndex] = labels[j];\n labels[j] = tmpl;\n \n float tmpw = weights[randIndex];\n weights[randIndex] = weights[j];\n weights[j] = tmpw;\n }\n }", "public void initVector(int n) {\n\t\tvector = new ArrayList<Integer>(n);\n\t\tfor(int i=0;i<n;i++)\n\t\tvector.add(0);\n\t}", "public void populateArray()\n { \n Random rand = new Random(); // calling random class to generate random numbers\n randInt = new int[this.getWidth()]; // initializing array to its panel width\n rand.setSeed(System.currentTimeMillis());\n for(int i = 0; i < this.getWidth();i++) // assigning the random values to array \n {\n randInt[i] = rand.nextInt(this.getHeight() -1) + 1;\n }\n this.repaint(); // calling paint method\n }", "BlueSphere() {\n Random random = new Random();\n value[0] = random.nextInt(16) + 1;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "private void randomizeNum() {\n randomNums.clear();\n for (int i = 0; i < 4; i++) {\n Integer rndNum = rnd.nextInt(10);\n randomNums.add(rndNum);\n }\n }", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "public RandomizedCollection() {\n nums = new ArrayList<>();\n num2Index = new HashMap<>();\n rand = new Random();\n }", "public UniformVector(VectorN mn, VectorN mx, long seed){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n if (seed > 0) seed = -seed;\n this.idum = seed;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "void randomize() {\r\n\t\trandomize(1, this.length());\r\n\t}", "public static <E> Vector<E> randomize(final Vector<E> vector) {\n\t\tRandom random = new Random(); //create a randomizing object\n\t\treturn randomize(vector, random); //randomize the vector and return it\n\t}", "public void setRandom(Random r) {\n this.r = r;\n }", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "RandomArrayGenerator() {\n this.defaultLaenge = 16;\n }", "private void randomNormal(Vector3f v)\n // Create a unit vector. The x- and y- values can be +ve or -ve.\n // The z-value is positive, so facing towards the viewer.\n {\n float z = (float) Math.random(); // between 0-1\n float x = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n float y = (float) (Math.random() * 2.0 - 1.0); // -1 to 1\n v.set(x, y, z);\n v.normalize();\n }", "public void randomize()\n {\n int max = list.length;\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * max) + 1;\n }", "static void fill(int[] array)\n\t{\n\t\tRandom r = new Random();\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tarray[i] = r.nextInt(100);\n\t\t}\n\t}", "public void randomArray(int size){\n paintIntegers[] arrayNew = new paintIntegers[size];\n paintIntegers.initPaint(arrayNew);\n //updates n\n n = size;\n for(int i = 0; i < arrayNew.length; i++){\n arrayNew[i].val = i + 1;\n }//init the array with 0 to n;\n for(int i = 0; i < arrayNew.length; i++){ // shuffles the array\n //random index past current -> thats why random\n int ridx = i + rand.nextInt(arrayNew.length - i);\n //swap values\n int temp = arrayNew[ridx].val;\n arrayNew[ridx].val = arrayNew[i].val;\n arrayNew[i].val = temp;\n }\n // new origarray array\n origArray = arrayNew.clone();\n }", "private void initializeStateWithRandomValues(Assignment x, List<RandomVariable> Z){\n for (RandomVariable Zi: Z){\n Object randomValue = Zi.getDomain().get(new Random().nextInt(Zi.getDomain().size()));\n x.set(Zi, randomValue);\n\n }\n }", "private static void __exercise36(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = i + StdRandom.uniform(N - i);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "static void initValues()\n\t // Initializes the values array with random integers from 0 to 99.\n\t {\n\t Random rand = new Random();\n\t for (int index = 0; index < SIZE; index++)\n\t values[index] = Math.abs(rand.nextInt(100001));\n\t for (int i = 0; i < RANDSAMP; i++)\n\t \tvalues2[i] = values[Math.abs(rand.nextInt(SIZE+1))]; \n\t }", "public void setRandomCombi(){\r\n Random rand = new Random();\r\n\r\n for (int i = 0; i < COMBI_LENGTH; i++){\r\n //Take a random Color, put length - 1 to avoid picking EMPTY color\r\n this.combi[i] = Colors.values()[rand.nextInt(Colors.values().length - 1)];\r\n }\r\n }", "public Tribute()\n {\n vectOfCoef = new Vector<Double>(numOfCoef);\n for(int x =0; x < numOfCoef; x++)\n {\n vectOfCoef.addElement((Math.random() * 2) - 1);\n }\n }", "public void newCoord() {\n\t\tx = Data.generateRandomX();\n\t\ty = Data.generateRandomY();\n\t}", "private void generateColors(){\n\t\tRandom r = new Random();\n\t\tcurrentIndex = 0;\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tcolors[i] = COLORS_DEFAULT[r.nextInt(COLORS_DEFAULT.length)];\n\t\t}\n\t}", "public static void fill(int[] array,int start,int ende){\n\tfor (int c=0; c<array.length; c++){\r\n\t\tRandom rand = new Random(); \r\n\t\tarray[c] = rand.nextInt(ende+1-start) + start;\r\n\t}\r\n\tSystem.out.print(\"\\n\");\r\n}", "public void mutate(Solution solution) {\n int size = solution.values.length;\n int first = random.nextInt(size-1);\n int second = first + random.nextInt(size-first);\n\n int firstCopy = solution.values[first];\n solution.values[first] = solution.values[second];\n solution.values[second] = firstCopy;\n }", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public void mixArray(int[] v){\n Random rnd = new Random();\n for (int i = v.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n int a = v[index];\n v[index] = v[i];\n v[i] = a;\n }\n }", "public void init() throws ServletException {\n modTime = System.currentTimeMillis()/1000*1000;\r\n for(int i=0; i<numbers.length; i++) {\r\n numbers[i] = randomNum();\r\n }\r\n }", "private void fillVector()\r\n {\r\n // The x and y coordinates of a point\r\n int xPoint;\r\n int yPoint;\r\n \r\n // The x and y coordinates of a point with the displacement of the plot \r\n // origin from the component origin taken into consideration\r\n int xPointOffset, yPointOffset;\r\n \r\n // The point to be stored in the vector\r\n SPlotPoint plotPoint;\r\n\r\n\r\n // Get the max of the data types to figure out how to scale plot\r\n maxX_ = (new Double(xData_.getMax())).intValue();\r\n maxY_ = (new Double(yData_.getMax())).intValue();\r\n \r\n // Want max axes to be max of 200. Need to calculate the scaling factor\r\n xFactor_ = maxX_/MAX_AXIS_LENGTH;\r\n yFactor_ = maxY_/MAX_AXIS_LENGTH;\r\n \r\n // Extract x and y values, generate SPlotPoints and store in vector\r\n for (int i = 0; i < xSize_; i++)\r\n {\r\n xPoint = (int)(xData_.getValue(i) / xFactor_);\r\n yPoint = (int)(yData_.getValue(i) / yFactor_); \r\n\r\n\r\n // The xy coordinates where to plot the point (after taking the \r\n // offset btn the plot origin and the component origin into account\r\n xPointOffset = xPoint+OFFSET;\r\n yPointOffset = yPoint+OFFSET;\r\n \r\n // Generate SPlotPoints and store in vector\r\n plotPoint = new SPlotPoint(xPointOffset,\r\n yPointOffset);\r\n \r\n // Set the id of the scatter plot point (corresponds to the row\r\n // number in the .dbf\r\n // Must add one to compensate for geodata starting at 1 and vector\r\n // index starting at 0\r\n plotPoint.setId(i+1);\r\n \r\n pointVector_.addElement(plotPoint);\r\n }\r\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "public void mutate() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutate = rand.nextInt(4);\n\t\t\twhile (mutate == 0) {\n\t\t\t\tmutateHelper();\n\t\t\t\tmutate = rand.nextInt(4);\n\t\t\t}\n\t\t}\n\t}", "static void fillArray(int[] ar)\n\t{\n\t Random r= new Random();\n\t for(int i = 0; i< ar.length; i++)\n\t {\n\t\t ar[i]= r.nextInt(100);\n\t }\n\t}", "public void nextSet(){\n this.fillVector();\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public void reset(int baseNumberElements) {\n randomGenerator = new Random(seed);\n clearDataStructure();\n populate(baseNumberElements);\n }", "public Element setToRandom() {\n this.value = Math.abs(ThreadSecureRandom.get().nextLong()) % field.order;\n\n return mod();\n }", "public void reset() {\n x = random(-2*width, 3*width); // set the x position\n y = random(-height, 2*height); // set the y position\n c[0] = color(random(150, 255), random(150, 255), random(150, 255)); // set the top color (a bit lighter)\n // randomly set the 4 colors in the base of the shape\n for (int i=1; i<5; i++) {\n c[i] = color(random(255), random(255), random(255)); // random RGB color\n }\n }", "public void insertar2(){\n for (int i = 0; i < tamano; i++) {\n vectorpila2[i]=(int) (Math.random() *100+1);\n \n cima++;\n }\n }", "@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 static Vector randomForce(Vector velocity) {\n\t\tdouble randX = -RANDOM_FORCE_MAGNITUDE + 2 * RANDOM_FORCE_MAGNITUDE\n\t\t\t\t* Math.random();\n\t\tdouble randY = -RANDOM_FORCE_MAGNITUDE + 2 * RANDOM_FORCE_MAGNITUDE\n\t\t\t\t* Math.random();\n\t\treturn new Vector(velocity.x + randX, velocity.y + randY);\n\t}", "public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}", "public RandomizedSet() {\n this.valueToIndex = new HashMap<>();\n this.values = new ArrayList<>();\n this.random = new Random();\n }", "private static void __exercise37(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = StdRandom.uniform(N);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public void initMatrixRandom(DoubleMatrix m){\n\t\tfor(int i = 0; i < m.rows; i++)\n\t\t\tfor(int j = 0; j < m.columns; j++)\n\t\t\t\tm.put(i, j, randomValue());\n\t}", "static void fillArray(int[] array) {\n\t\tint i = 0;\r\n\t\tint number = 1;\r\n\t\twhile (i < array.length) {\r\n\t\t\tif ((int) Math.floor(Math.random() * Integer.MAX_VALUE) % 2 == 0) {\r\n\t\t\t\tnumber = number + (int) Math.floor(Math.random() * 5);\r\n\t\t\t\tarray[i] = number;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnumber++;\r\n\t\t\t\tarray[i] = number;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "void setRandomNumbersUp() {\n\t\tInteger[] numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tInteger[] numbers2 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tList<Integer> numsList = Arrays.asList(numbers);\n\t\tCollections.shuffle(numsList);\n\t\tList<Integer> numsList2 = Arrays.asList(numbers2);\n\t\tCollections.shuffle(numsList2);\n\t\tList<Integer> combinedList = Stream.of(numsList, numsList2).flatMap(Collection::stream).collect(Collectors.toList());\n\t\t\n\t\t\n\t\tint counter = 0;\n\t\tfor (Node node : SquaresBoard.getChildren()) {\n\t\t\n\t\t\tif (node instanceof Label) {\n\t\t\t\t((Label) node).setText(combinedList.get(counter).toString());\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t}", "public static Vector4f randomColor() {\n return new Vector4f(RANDOM.nextFloat(), RANDOM.nextFloat(), RANDOM.nextFloat(), 1);\n }", "public void spinOnce()\n {\n\tfor (int x = 0; x < _fruits.length; x+= 1){\n\t /*\n\t //not sure which method for randomization is best.\n\t int oneRandInd= ((int)(Math.random()*24));\n\t int twoRandInd = ((int)(Math.random()*24));\n\t swap(oneRandInd, twoRandInd);\n\t */\n\t int randInd = (int) (Math.random()*24);\n\t swap(x, randInd);\n\t}\n }", "public void genField() {\n\t\tint mines = (int)(height * width * .1);\r\n\t\tRandom random = new Random();\r\n\t\tint x;\r\n\t\tint y;\r\n\t\tint i = 0;\r\n\t\twhile(i < mines) {\r\n\t\t\tx = random.nextInt(width);\r\n\t\t\ty = random.nextInt(height);\r\n\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\tcells.get(x).get(y).setValue(-1);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(x = 0; x < width; x++) {\r\n\t\t\tfor(y = 0; y < height; y++) {\r\n\t\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\t\tprocessCell(x, y); //generate cell number\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setRandomItems(ArrayList<RandomItem> items);", "public UniformVector(VectorN mn, VectorN mx){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }", "public void setRandomX(int x) {\r\n\t\tthis.x1 = (int) (Math.random()*1000);\r\n\t}", "public void generateRandomArray() {\n for (int i = 0; i < arraySize; i++) {\n theArray[i] = (int) (Math.random() * 10) + 10;\n }\n }", "public void setSeed(ArrayList<Cell> newSeed) {\n\t\n\t\t for (int y=0;y<MAX_Y;y++) {\n\t\t\tfor (int x=0;x<MAX_X;x++) {\n\t\t\t\tseed[x][y] = new Cell(x,y,false);\t\t \n\t\t\t}//end for x\n\t\t }//end for y\n\t\t \n\t\t for (int k=0; k<newSeed.size();k++) {\n\t\t\t int x1 = Math.abs(newSeed.get(k).getX()) % MAX_X;\n\t\t\t int y1 = Math.abs(newSeed.get(k).getY()) % MAX_Y;\n\t\t\t \n\t\t\t seed[x1][y1] = newSeed.get(k);\n\t\t }//end for k\n\t\t repaint(); //repaint's the grid with new generation\n\t\t updateUI();\n\t }", "public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}", "public void randomWalk(){\r\n int newAngle = (int) ( (double) Math.random() * 360) ;\r\n\r\n super.xVelocity = (velocity * Math.cos(newAngle * Math.PI/180));\r\n super.yVelocity = (velocity * Math.cos(newAngle * Math.PI/180));\r\n }", "public RandomizedCollection() {\n map=new HashMap();\n li=new ArrayList();\n rand=new Random();\n }", "public Position sampleRandomUniformPosition();", "private void setWeightsUniformly(RandomDataImpl rnd, double eInit) {\n\t\tfor (int i = 0; i < weights.length; i++) {\t\t\n\t\t\tweights[i] = rnd.nextUniform(-eInit, eInit);\n\t\t}\n\t}", "public RandomizedSet() {\n data=new ArrayList<>();\n valueIndex=new HashMap<>();\n random=new Random();\n }", "public void SetVector(int[] v){ this.vector=v;}", "private void fillMas() { //the method created\r\n\r\n for (int i = 0; i < mas.length; i++) {\r\n mas[i] = (int) (Math.random() * 100); //massive filled with random numbers\r\n System.out.print(mas[i] + \" \"); //massive elements printed\r\n }\r\n System.out.print(\"- this is unsorted massive\");\r\n }", "private void makeInitial(){\r\n for (int row = 0; row < 9; row++)\r\n System.arraycopy(solution[row], 0, initial[row], 0, 9);\r\n List<Position> fields = new ArrayList<Position>();\r\n for (int row = 0; row < 9; row++)\r\n for (int col = 0; col < 9; col++)\r\n fields.add(new Position(row, col));\r\n Collections.shuffle(fields);\r\n for (int index = 0; index < 40; index ++)\r\n initial[fields.get(index).row][fields.get(index).col] = 0;\r\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "private double[] generateRandomCoordinates() {\n return generateRandomCoordinates(CoordinateDomain.GEOGRAPHIC, 0.05f);\n }", "public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}", "public void randomTick(World world, BlockPos pos, IBlockState state, Random random) {\n\t\tVolcano.genVolcano(world.getChunkFromBlockCoords(pos), world);\n\t}", "private void fillRandomEmptyCell(int value, PredatorPreyCell cell, Grid<Integer> grid) {\n\t\tRandom r = new Random();\n\t\tPredatorPreyCell randCell = getEmptyCells(grid).get(r.nextInt(getEmptyCells(grid).size()));\n\t\tswap(cell, randCell);\n\t}", "public void generateIDs() {\n Random randomGenerator = new Random();\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n identificationNumbers[i][j] = randomGenerator.nextInt(2);\n }\n }", "public Rng() {\n\t\tr = new Random();\n\t}", "public void randomize(final double[] d) {\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\td[i] = randomize(d[i]);\n\t\t}\n\n\t}", "void pluck()\n\t{\n\t\tfor(int i = 0; i < rb.length(); i++)\n\t\t{\n\t\t\tdouble random = (Math.random() - 0.5) * AMPLITUDE; //[-0.5,0.5)\n\t\t\trb.dequeue();\n\t\t\trb.enqueue(random);\n\t\t}\n\t}", "private void initMatrix() {\n\t\ttry {\n\t\t\tRandom random = new Random();\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\t// generate alive cells, with CHANCE_OF_ALIVE chance\n\t\t\t\t\tboolean value = (random.nextInt(100) < CHANCE_OF_ALIVE);\n\t\t\t\t\t_matrix.setCellValue(row, column, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t}\n\t}", "@Override\n public void run() {\n list.add(new Random().nextInt(11)+ 6);\n }", "public void randomize(final Double[] d) {\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\td[i] = randomize(d[i]);\n\t\t}\n\t}" ]
[ "0.6717995", "0.64984053", "0.64032024", "0.6317773", "0.62917054", "0.6261322", "0.6214036", "0.6207729", "0.61502755", "0.614071", "0.6130911", "0.61202097", "0.6079114", "0.60526985", "0.60462093", "0.6028843", "0.6023771", "0.602037", "0.60188466", "0.6011639", "0.6011429", "0.60097855", "0.5930695", "0.59210134", "0.59153384", "0.5909634", "0.59033036", "0.58898413", "0.5871073", "0.5866872", "0.5859111", "0.5844463", "0.58427644", "0.5834911", "0.58294046", "0.5820162", "0.5820111", "0.58167356", "0.580359", "0.57824475", "0.5774334", "0.57600605", "0.5749892", "0.5739461", "0.5731462", "0.5725751", "0.5725498", "0.5720516", "0.5716467", "0.5710659", "0.57041186", "0.56908", "0.56902844", "0.56886744", "0.5678386", "0.5677954", "0.5675493", "0.56729406", "0.5642479", "0.56365496", "0.55927205", "0.55864984", "0.5583864", "0.55833274", "0.55818164", "0.5578506", "0.55783194", "0.55596566", "0.55584884", "0.55514973", "0.55488586", "0.5547007", "0.5543962", "0.55430186", "0.55233485", "0.551073", "0.5510243", "0.55077064", "0.55065554", "0.5496183", "0.5491069", "0.54903907", "0.54763097", "0.54610133", "0.5459527", "0.5452991", "0.5436973", "0.543584", "0.5435064", "0.5419078", "0.54190415", "0.5418994", "0.54167265", "0.54117507", "0.5411508", "0.5411305", "0.5408438", "0.5401924", "0.53993654", "0.53990436" ]
0.70835555
0
Fills the vector components with the next set of random numbers.
public void nextSet(){ this.fillVector(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }", "public static int[] f_fill_vector_age_people(int N){\n int[] v_vector_age= new int[N];\n for(int i=0; i<N; i++){\n\n v_vector_age[i]= (int) (Math.random()*100)+1;\n\n }\n return v_vector_age;\n }", "public static <E> Vector<E> randomize(final Vector<E> vector, final Random random) {\n\t\tfor(int i = 0; i < vector.size() - 1; ++i) { //start at the first element and go to the second to last element\n\t\t\tint fromIndex = ((int)(random.nextFloat() * (vector.size() - i))) + i; //get a random number (from zero to the number of elements left minus one), and put it into the range at our current slot\n\t\t\tif(fromIndex != i) { //if we should move our current object\n\t\t\t\tfinal E tempObject = vector.elementAt(i); //get a reference to the element to be replaced\n\t\t\t\tvector.setElementAt(vector.elementAt(fromIndex), i); //copy the specified element from its index into the current slot\n\t\t\t\tvector.setElementAt(tempObject, fromIndex); //put the element that used to be in this slot where the other one came from\n\t\t\t}\n\t\t}\n\t\treturn vector; //return the vector, which is now randomized\n\t}", "public static void generator(){\n int vector[]= new int[5];\r\n vector[10]=20;\r\n }", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public static void fill(int[] array,int start,int ende){\n\tfor (int c=0; c<array.length; c++){\r\n\t\tRandom rand = new Random(); \r\n\t\tarray[c] = rand.nextInt(ende+1-start) + start;\r\n\t}\r\n\tSystem.out.print(\"\\n\");\r\n}", "public List<Vec> sample(int count, Random rand);", "private void populate ()\n\t{\n\t\t//create a random object\n\t\tRandom rand = new Random(); \n\t\t//for loop for row\n\t\tfor (int row =0; row < currentVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor(int column = 0; column < currentVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assign byte values from [0 to state-1] into array\n\t\t\t\tcurrentVersion[row][column] = (byte) rand.nextInt((this.state-1));\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "static void fill(int[] array)\n\t{\n\t\tRandom r = new Random();\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tarray[i] = r.nextInt(100);\n\t\t}\n\t}", "private void randomizeNum() {\n randomNums.clear();\n for (int i = 0; i < 4; i++) {\n Integer rndNum = rnd.nextInt(10);\n randomNums.add(rndNum);\n }\n }", "private static void __exercise36(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = i + StdRandom.uniform(N - i);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "static void fillWithRandomColors() {\n\n for ( int row = 0; row < ROWS; row++ ) {\n for ( int column = 0; column < COLUMNS; column++ ) {\n changeToRandomColor( row, column );\n }\n }\n }", "public void populateArray()\n { \n Random rand = new Random(); // calling random class to generate random numbers\n randInt = new int[this.getWidth()]; // initializing array to its panel width\n rand.setSeed(System.currentTimeMillis());\n for(int i = 0; i < this.getWidth();i++) // assigning the random values to array \n {\n randInt[i] = rand.nextInt(this.getHeight() -1) + 1;\n }\n this.repaint(); // calling paint method\n }", "public void spinOnce()\n {\n\tfor (int x = 0; x < _fruits.length; x+= 1){\n\t /*\n\t //not sure which method for randomization is best.\n\t int oneRandInd= ((int)(Math.random()*24));\n\t int twoRandInd = ((int)(Math.random()*24));\n\t swap(oneRandInd, twoRandInd);\n\t */\n\t int randInd = (int) (Math.random()*24);\n\t swap(x, randInd);\n\t}\n }", "static void fillArray(int[] array) {\n\t\tint i = 0;\r\n\t\tint number = 1;\r\n\t\twhile (i < array.length) {\r\n\t\t\tif ((int) Math.floor(Math.random() * Integer.MAX_VALUE) % 2 == 0) {\r\n\t\t\t\tnumber = number + (int) Math.floor(Math.random() * 5);\r\n\t\t\t\tarray[i] = number;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnumber++;\r\n\t\t\t\tarray[i] = number;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public static void randomInit(int r) { }", "static void fillArray(int[] ar)\n\t{\n\t Random r= new Random();\n\t for(int i = 0; i< ar.length; i++)\n\t {\n\t\t ar[i]= r.nextInt(100);\n\t }\n\t}", "public void mutate() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutate = rand.nextInt(4);\n\t\t\twhile (mutate == 0) {\n\t\t\t\tmutateHelper();\n\t\t\t\tmutate = rand.nextInt(4);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void randomize(int randomSeed) {\n Random rand = new Random(randomSeed);\n for(int j = size - 1; j > 0; j --){\n int randIndex = rand.nextInt(j);\n \n int [] tmp = data[randIndex];\n data[randIndex] = data[j];\n data[j] = tmp;\n \n int tmpl = labels[randIndex];\n labels[randIndex] = labels[j];\n labels[j] = tmpl;\n \n float tmpw = weights[randIndex];\n weights[randIndex] = weights[j];\n weights[j] = tmpw;\n }\n }", "private Vec3 calculateRandomValues(){\n\n Random rand1 = new Random();\n float randX = (rand1.nextInt(2000) - 1000) / 2000f;\n float randZ = (rand1.nextInt(2000) - 1000) / 2000f;\n float randY = rand1.nextInt(1000) / 1000f;\n\n return new Vec3(randX, randY, randZ).normalize();\n }", "public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}", "private void generateColors(){\n\t\tRandom r = new Random();\n\t\tcurrentIndex = 0;\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tcolors[i] = COLORS_DEFAULT[r.nextInt(COLORS_DEFAULT.length)];\n\t\t}\n\t}", "private void initializeStateWithRandomValues(Assignment x, List<RandomVariable> Z){\n for (RandomVariable Zi: Z){\n Object randomValue = Zi.getDomain().get(new Random().nextInt(Zi.getDomain().size()));\n x.set(Zi, randomValue);\n\n }\n }", "private static void __exercise37(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = StdRandom.uniform(N);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "void setRandomNumbersUp() {\n\t\tInteger[] numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tInteger[] numbers2 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tList<Integer> numsList = Arrays.asList(numbers);\n\t\tCollections.shuffle(numsList);\n\t\tList<Integer> numsList2 = Arrays.asList(numbers2);\n\t\tCollections.shuffle(numsList2);\n\t\tList<Integer> combinedList = Stream.of(numsList, numsList2).flatMap(Collection::stream).collect(Collectors.toList());\n\t\t\n\t\t\n\t\tint counter = 0;\n\t\tfor (Node node : SquaresBoard.getChildren()) {\n\t\t\n\t\t\tif (node instanceof Label) {\n\t\t\t\t((Label) node).setText(combinedList.get(counter).toString());\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t}", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "public void initVector(int n) {\n\t\tvector = new ArrayList<Integer>(n);\n\t\tfor(int i=0;i<n;i++)\n\t\tvector.add(0);\n\t}", "public void randomArray(int size){\n paintIntegers[] arrayNew = new paintIntegers[size];\n paintIntegers.initPaint(arrayNew);\n //updates n\n n = size;\n for(int i = 0; i < arrayNew.length; i++){\n arrayNew[i].val = i + 1;\n }//init the array with 0 to n;\n for(int i = 0; i < arrayNew.length; i++){ // shuffles the array\n //random index past current -> thats why random\n int ridx = i + rand.nextInt(arrayNew.length - i);\n //swap values\n int temp = arrayNew[ridx].val;\n arrayNew[ridx].val = arrayNew[i].val;\n arrayNew[i].val = temp;\n }\n // new origarray array\n origArray = arrayNew.clone();\n }", "public void reset(int baseNumberElements) {\n randomGenerator = new Random(seed);\n clearDataStructure();\n populate(baseNumberElements);\n }", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "RedSphere() {\n Random random = new Random();\n for (int i = 0; i < 6; i++) {\n value[i] = random.nextInt(33) + 1;\n }\n }", "public void randomize()\n {\n int max = list.length;\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * max) + 1;\n }", "@Override\n public void run() {\n list.add(new Random().nextInt(11)+ 6);\n }", "private void random() {\n\n\t}", "static void initValues()\n\t // Initializes the values array with random integers from 0 to 99.\n\t {\n\t Random rand = new Random();\n\t for (int index = 0; index < SIZE; index++)\n\t values[index] = Math.abs(rand.nextInt(100001));\n\t for (int i = 0; i < RANDSAMP; i++)\n\t \tvalues2[i] = values[Math.abs(rand.nextInt(SIZE+1))]; \n\t }", "public void setRandomValues(float avg, float distr) {\n\t\tfor(int i = 0; i < size; i++)\n\t\t\tvector[i] = avg+MathUtils.randomTriangular()*distr;\n\t}", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public void setRandomCombi(){\r\n Random rand = new Random();\r\n\r\n for (int i = 0; i < COMBI_LENGTH; i++){\r\n //Take a random Color, put length - 1 to avoid picking EMPTY color\r\n this.combi[i] = Colors.values()[rand.nextInt(Colors.values().length - 1)];\r\n }\r\n }", "public RandomizedSet() {\n this.valueToIndex = new HashMap<>();\n this.values = new ArrayList<>();\n this.random = new Random();\n }", "public void insertar2(){\n for (int i = 0; i < tamano; i++) {\n vectorpila2[i]=(int) (Math.random() *100+1);\n \n cima++;\n }\n }", "private double[] getRandomVector(int dimension) {\n double[] s = new double[dimension];\n Random gen = new Random();\n for (int i = 0; i < s.length; ++i) {\n s[i] = (2 * gen.nextDouble()) - 1;\n }\n return s;\n }", "public UniformVector() {\n super(3);\n this.min = new VectorN(3);\n this.max = new VectorN(1.0, 1.0, 1.0);\n this.idum = -1;\n this.rn = new RandomNumber(this.idum);\n fillVector();\n }", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "public Element setToRandom() {\n this.value = Math.abs(ThreadSecureRandom.get().nextLong()) % field.order;\n\n return mod();\n }", "public RandomizedCollection() {\n nums = new ArrayList<>();\n num2Index = new HashMap<>();\n rand = new Random();\n }", "private void fillVector()\r\n {\r\n // The x and y coordinates of a point\r\n int xPoint;\r\n int yPoint;\r\n \r\n // The x and y coordinates of a point with the displacement of the plot \r\n // origin from the component origin taken into consideration\r\n int xPointOffset, yPointOffset;\r\n \r\n // The point to be stored in the vector\r\n SPlotPoint plotPoint;\r\n\r\n\r\n // Get the max of the data types to figure out how to scale plot\r\n maxX_ = (new Double(xData_.getMax())).intValue();\r\n maxY_ = (new Double(yData_.getMax())).intValue();\r\n \r\n // Want max axes to be max of 200. Need to calculate the scaling factor\r\n xFactor_ = maxX_/MAX_AXIS_LENGTH;\r\n yFactor_ = maxY_/MAX_AXIS_LENGTH;\r\n \r\n // Extract x and y values, generate SPlotPoints and store in vector\r\n for (int i = 0; i < xSize_; i++)\r\n {\r\n xPoint = (int)(xData_.getValue(i) / xFactor_);\r\n yPoint = (int)(yData_.getValue(i) / yFactor_); \r\n\r\n\r\n // The xy coordinates where to plot the point (after taking the \r\n // offset btn the plot origin and the component origin into account\r\n xPointOffset = xPoint+OFFSET;\r\n yPointOffset = yPoint+OFFSET;\r\n \r\n // Generate SPlotPoints and store in vector\r\n plotPoint = new SPlotPoint(xPointOffset,\r\n yPointOffset);\r\n \r\n // Set the id of the scatter plot point (corresponds to the row\r\n // number in the .dbf\r\n // Must add one to compensate for geodata starting at 1 and vector\r\n // index starting at 0\r\n plotPoint.setId(i+1);\r\n \r\n pointVector_.addElement(plotPoint);\r\n }\r\n }", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "private void fillMas() { //the method created\r\n\r\n for (int i = 0; i < mas.length; i++) {\r\n mas[i] = (int) (Math.random() * 100); //massive filled with random numbers\r\n System.out.print(mas[i] + \" \"); //massive elements printed\r\n }\r\n System.out.print(\"- this is unsorted massive\");\r\n }", "public void mixArray(int[] v){\n Random rnd = new Random();\n for (int i = v.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n int a = v[index];\n v[index] = v[i];\n v[i] = a;\n }\n }", "public void generateRandomArray() {\n for (int i = 0; i < arraySize; i++) {\n theArray[i] = (int) (Math.random() * 10) + 10;\n }\n }", "public void setSeed(ArrayList<Cell> newSeed) {\n\t\n\t\t for (int y=0;y<MAX_Y;y++) {\n\t\t\tfor (int x=0;x<MAX_X;x++) {\n\t\t\t\tseed[x][y] = new Cell(x,y,false);\t\t \n\t\t\t}//end for x\n\t\t }//end for y\n\t\t \n\t\t for (int k=0; k<newSeed.size();k++) {\n\t\t\t int x1 = Math.abs(newSeed.get(k).getX()) % MAX_X;\n\t\t\t int y1 = Math.abs(newSeed.get(k).getY()) % MAX_Y;\n\t\t\t \n\t\t\t seed[x1][y1] = newSeed.get(k);\n\t\t }//end for k\n\t\t repaint(); //repaint's the grid with new generation\n\t\t updateUI();\n\t }", "public void initializeDemandVector() {\r\n\t\tdouble marketSplit = Parameters.marketSplit / 100.0;\r\n\t\tfor (int i = 0; i < demandVector.length; i++) {\r\n\t\t\t\r\n\t\t\tdouble r = RandomHelper.nextDoubleFromTo(0, 1);\r\n\t\t\t\r\n\t\t\tdemandVector[i] = r < marketSplit ? 1 : 0;\r\n\t\t}\r\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public void mutate(Solution solution) {\n int size = solution.values.length;\n int first = random.nextInt(size-1);\n int second = first + random.nextInt(size-first);\n\n int firstCopy = solution.values[first];\n solution.values[first] = solution.values[second];\n solution.values[second] = firstCopy;\n }", "RandomArrayGenerator() {\n this.defaultLaenge = 16;\n }", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "public void setRandom(Random r) {\n this.r = r;\n }", "public void init() throws ServletException {\n modTime = System.currentTimeMillis()/1000*1000;\r\n for(int i=0; i<numbers.length; i++) {\r\n numbers[i] = randomNum();\r\n }\r\n }", "void pluck()\n\t{\n\t\tfor(int i = 0; i < rb.length(); i++)\n\t\t{\n\t\t\tdouble random = (Math.random() - 0.5) * AMPLITUDE; //[-0.5,0.5)\n\t\t\trb.dequeue();\n\t\t\trb.enqueue(random);\n\t\t}\n\t}", "private void generateCombination() {\r\n\r\n\t\tfor (byte x = 0; x < field.length; x++) {\r\n\t\t\tfor (byte y = 0; y < field[x].length; y++) {\r\n\t\t\t\tfield[x][y].setValue((byte) newFigure(Constants.getRandom()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void generateIDs() {\n Random randomGenerator = new Random();\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n identificationNumbers[i][j] = randomGenerator.nextInt(2);\n }\n }", "public void permutate(int[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "void fill()\n\t{\n\t\tif(!mySeq.isEmpty())\n\t\t{\t\n\t\t\tPair temp = mySeq.removeFirst();\t\t\n\t\t\tthis.nextPos = temp.getSecond();\n\t\t\tthis.myTurn = temp.getFirst();\n\t\t}\n\t}", "void randomize() {\r\n\t\trandomize(1, this.length());\r\n\t}", "private void makeInitial(){\r\n for (int row = 0; row < 9; row++)\r\n System.arraycopy(solution[row], 0, initial[row], 0, 9);\r\n List<Position> fields = new ArrayList<Position>();\r\n for (int row = 0; row < 9; row++)\r\n for (int col = 0; col < 9; col++)\r\n fields.add(new Position(row, col));\r\n Collections.shuffle(fields);\r\n for (int index = 0; index < 40; index ++)\r\n initial[fields.get(index).row][fields.get(index).col] = 0;\r\n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "private void collectRandomRIDs(){\n\t\tint numRIDs = iterations + 1;\n\t\trandomRID_list = new String[numRIDs];\n\t\tString randomClusterName;\n\t\tint clusterID, randomPosition;\n\t\t\n\t\t// Collect #iterations of random RID's\n\t\tfor(int i=0; i < numRIDs; i++){\n\t\t\trandomClusterName = env.VERTEX_PREFIX + (int) (Math.random() * env.NUM_VERTEX_TYPE);\n\t\t\tclusterID = db.getClusterIdByName(randomClusterName); \n\t\t\tOClusterPosition [] range = db.getStorage().getClusterDataRange(clusterID);\n\t\t\t\n\t\t\trandomPosition = (int) (Math.random() * range[1].intValue()) + range[0].intValue();\n\t\t\trandomRID_list[i] = \"#\" + clusterID + \":\" + randomPosition;\n\t\t}\n\t\t\n\t}", "public RandomizedSet() {\n data=new ArrayList<>();\n valueIndex=new HashMap<>();\n random=new Random();\n }", "public static int[] populateRandomNumber(int count) {\n\t\tif (count < 1) {\n\t\t\tthrow new IllegalArgumentException(\"count less than 0\");\n\t\t}\n\t\tint[] data = new int[count];\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\tfor (int i = count - 1; i >= 0; i--) {\n\t\t\t// Find random between 0 to i-1.\n\t\t\tint random = new Random().nextInt(i);\n\t\t\t// swap.\n\t\t\tint temp = data[i];\n\t\t\tdata[i] = data[random];\n\t\t\tdata[random] = temp;\n\t\t}\n\t\treturn data;\n\t}", "BlueSphere() {\n Random random = new Random();\n value[0] = random.nextInt(16) + 1;\n }", "public static void randFillArray(int[] array) {\r\n\t\tRandom random = new Random();\r\n\t\tfor (int i=0; i < SIZE_OF_ARRAY; i++)\r\n\t\t\tarray[i] = random.nextInt(100);\r\n\t}", "public XorShiftRandom() {\n\t\tthis(System.nanoTime());\n\t}", "public UniformVector(VectorN mn, VectorN mx, long seed){\n super(mn.length);\n mx.checkVectorDimensions(mn);\n this.min = new VectorN(mn);\n this.max = new VectorN(mx);\n if (seed > 0) seed = -seed;\n this.idum = seed;\n this.rn = new RandomNumber(this.idum); \n fillVector();\n }", "public WB_Vector nextVector();", "public void setRandomItems(ArrayList<RandomItem> items);", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\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 }", "@Override\n\tpublic void beginGeneration() {\n\t\tfor(int seqIndex = 0; seqIndex < NUM_SEQUENCES; ++seqIndex) {\n\t\t\tfor(int pieceIndex = 0; pieceIndex < SEQUENCE_LENGTH; ++pieceIndex) {\n\t\t\t\tsequences[seqIndex][pieceIndex] = random.nextInt(State.N_PIECES);\n\t\t\t}\n\t\t}\n\t}", "private static int[] genValues(int[] original) {\n Random rand = new Random();\n int max = original.length - 1;\n\n while (max > 0) {\n swap(original, max, rand.nextInt(max));\n max--;\n }\n return original;\n }", "public RandomizedSet() {\n realSet = new HashSet<>();\n allSet = new Integer[10];\n random = new Random();\n }", "public static void randomize(Object[] v) throws NotImplementedException {\r\n if(v instanceof Integer[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = getRandom(Integer.MIN_VALUE, Integer.MAX_VALUE);\r\n }\r\n } else if(v instanceof Short[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (short) getRandom(Short.MIN_VALUE, Short.MAX_VALUE);\r\n }\r\n } else if(v instanceof Boolean[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (getRandom(0, 1) == 1);\r\n }\r\n } else if(v instanceof Character[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (char) getRandom(0, 127); // 255\r\n }\r\n } else if(v instanceof Float[]) {\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] = (float) (-1000.0 + Math.random() * 1000.0);\r\n }\r\n } else {\r\n throw new NotImplementedException();\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\tMPMergeSortTest.MPParallelRandomGen(start, end, r, data);\n\n\t}", "@Test\n public void genRandom() {\n runAndWait(() -> genRandom(10_000, 500, 1), 32, 2000);\n runAndWait(() -> genRandom(10_000, 500, 100), 32, 2000);\n runAndWait(() -> genRandom(250_000, 4000, 50), 4, 5_000);\n }", "@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}", "PermutationGenerator(Random random) {\n\t\tm_random = random;\n\t}", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "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 scramble(){\r\n for (int i = 0; i < data.length / 2; i++){\r\n int randomIndex1 = (int)(Math.random()*(data.length - 1));\r\n int randomIndex2 = (int)(Math.random()*(data.length - 1));\r\n swap(randomIndex1, randomIndex2);\r\n }\r\n }", "public void randomize(){\r\n int random = (int) (Math.random()*36);\r\n for(int i = 0;i<7;i++){\r\n for(int j = 0;j<36;j++){\r\n temparray[1] = gameBoard[random];\r\n temparray[2] = gameBoard[j];\r\n gameBoard[j] = temparray[1];\r\n gameBoard[random] = temparray[2];\r\n \r\n }\r\n }\r\n \r\n }", "public static <E> Vector<E> randomize(final Vector<E> vector) {\n\t\tRandom random = new Random(); //create a randomizing object\n\t\treturn randomize(vector, random); //randomize the vector and return it\n\t}", "public void permutate(float[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public void genField() {\n\t\tint mines = (int)(height * width * .1);\r\n\t\tRandom random = new Random();\r\n\t\tint x;\r\n\t\tint y;\r\n\t\tint i = 0;\r\n\t\twhile(i < mines) {\r\n\t\t\tx = random.nextInt(width);\r\n\t\t\ty = random.nextInt(height);\r\n\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\tcells.get(x).get(y).setValue(-1);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(x = 0; x < width; x++) {\r\n\t\t\tfor(y = 0; y < height; y++) {\r\n\t\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\t\tprocessCell(x, y); //generate cell number\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void fillArray() {\r\n\t\tfor (int i = 0; i < myOriginalArray.length - 1; i++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tmyOriginalArray[i] = rand.nextInt(250);\r\n\t\t}\r\n\t\t// Copies original array 4 times for algorithm arrays\r\n\t\tmyBubbleArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmySelectionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyInsertionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyQuickArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t}" ]
[ "0.72505987", "0.67395145", "0.6459422", "0.63841033", "0.62147367", "0.6192717", "0.61683905", "0.6122653", "0.6101582", "0.6099204", "0.6050119", "0.60305405", "0.596613", "0.5951817", "0.58883625", "0.58864367", "0.5884824", "0.5883532", "0.5863748", "0.5859721", "0.58486366", "0.58369184", "0.5827992", "0.5827932", "0.58264965", "0.5821764", "0.5802301", "0.57965016", "0.57699054", "0.57680255", "0.57628506", "0.5762064", "0.5761442", "0.5756555", "0.5753753", "0.5744198", "0.57053816", "0.5695195", "0.5691515", "0.56817275", "0.5675172", "0.564557", "0.5640775", "0.5605346", "0.55964625", "0.55863404", "0.5577174", "0.5576496", "0.55746233", "0.55698574", "0.5564182", "0.5553575", "0.55479944", "0.554606", "0.55406535", "0.5540065", "0.5526271", "0.55156875", "0.55127823", "0.55117834", "0.55106723", "0.55085295", "0.5504348", "0.55041754", "0.547168", "0.5471151", "0.54616964", "0.5444664", "0.5437961", "0.5429815", "0.54219943", "0.54168904", "0.5413025", "0.5399032", "0.53983057", "0.5398126", "0.5392959", "0.5387349", "0.5385829", "0.53822935", "0.5366305", "0.5362327", "0.535696", "0.53556657", "0.53555363", "0.53540653", "0.5338536", "0.53278106", "0.5318291", "0.53127235", "0.5299306", "0.5297142", "0.52966917", "0.5293912", "0.52923846", "0.5287434", "0.5280615", "0.52778304", "0.52722293", "0.52706283" ]
0.67737657
1
Contexts: Expression returns Minus Addition returns Minus Addition.Plus_1_0_0_0 returns Minus Addition.Minus_1_0_1_0 returns Minus Multiplication returns Minus Multiplication.Multi_1_0_0_0 returns Minus Multiplication.Div_1_0_1_0 returns Minus PrimaryExpression returns Minus Constraint: (left=Addition_Minus_1_0_1_0 right=Multiplication)
protected void sequence_Addition(ISerializationContext context, Minus semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.MINUS__LEFT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.MINUS__LEFT)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.MINUS__RIGHT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.MINUS__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(), semanticObject.getLeft()); feeder.accept(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0(), semanticObject.getRight()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression unaryExpressionNotPlusMinus() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tif (isKind(OP_EXCLAMATION)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first,op,e);\r\n\t\t} else \t{\r\n\t\t\treturn primary(); //errors will be reported by primary()\r\n\t\t}\r\n\t}", "ComparableExpression<T> min();", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public Minus(Expression expression1, Expression expression2) {\n super(expression1, expression2);\n }", "@Override\n public Expression create(Expression a, Expression b) {\n return new Minus(a, b);\n }", "@Override\n public Expression simplify() {\n Expression right = getExpRight().simplify();\n Expression left = getExpLeft().simplify();\n //check if you can simplify more\n Num zero = new Num(0), one = new Num(1);\n //check if the left expression equals to zero\n if (zero.isEqual(left)) {\n return zero;\n }\n //check if the right expression equals to zero\n if (zero.isEqual(right)) {\n return zero;\n }\n //check if the left expression equals to one\n if (one.isEqual(left)) {\n return right;\n }\n //check if the right expression equals to one\n if (one.isEqual(right)) {\n return left;\n }\n try {\n //check if the expression is a number\n double value = evaluate();\n return new Num(value);\n } catch (Exception e) {\n return new Mult(left, right);\n }\n }", "@Override\r\n\tpublic Expression simplify() {\n\t\tSystem.out.println(\"减法化简\");\r\n\t\tExpression newLeft = left.simplify();\r\n Expression newRight = right.simplify();\r\n ConstantExpression leftConst =null;\r\n ConstantExpression rightConst =null;\r\n NegateExpression rightNegate =null;\r\n try {\r\n \tleftConst =(ConstantExpression) newLeft;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightConst =(ConstantExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightNegate =(NegateExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\t\r\n\t\tif ( leftConst != null && rightConst != null )\r\n {\r\n // two constants; just evaluate it;\r\n return new ConstantExpression( leftConst.getValue()- rightConst.getValue());\r\n }\r\n else if ( leftConst != null && leftConst.getValue()== 0 )\r\n {\r\n // 0 - y; return -y;\r\n if ( rightNegate != null )\r\n {\r\n // y = -u (--u); return u;\r\n return rightNegate.child;\r\n }\r\n return new NegateExpression( newRight );\r\n }\r\n else if ( rightConst != null && rightConst.getValue()== 0 )\r\n {\r\n // x - 0; return x;\r\n return newLeft;\r\n }\r\n else if ( rightNegate != null )\r\n {\r\n // x - -y; return x + y;\r\n return new AddExpression( newLeft, rightNegate.child );\r\n }\r\n\t\tif(newLeft.toString().equals(newRight.toString())){\r\n\t\t\treturn new ConstantExpression(0);\r\n\t\t}\r\n // x - y; no simplification\r\n return new SubExpression( newLeft, newRight );\r\n\t}", "public final EObject ruleMinOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4953:28: ( ( () otherlv_1= 'min' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4954:1: ( () otherlv_1= 'min' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4954:1: ( () otherlv_1= 'min' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4954:2: () otherlv_1= 'min'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4954:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4955:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getMinOperatorAccess().getMinOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,69,FOLLOW_69_in_ruleMinOperator11209); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getMinOperatorAccess().getMinKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public final EObject ruleMinimumFunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_3=null;\r\n Token otherlv_5=null;\r\n EObject lv_operator_0_0 = null;\r\n\r\n EObject lv_values_2_0 = null;\r\n\r\n EObject lv_values_4_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3181:28: ( ( ( (lv_operator_0_0= ruleMinOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3182:1: ( ( (lv_operator_0_0= ruleMinOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3182:1: ( ( (lv_operator_0_0= ruleMinOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3182:2: ( (lv_operator_0_0= ruleMinOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3182:2: ( (lv_operator_0_0= ruleMinOperator ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3183:1: (lv_operator_0_0= ruleMinOperator )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3183:1: (lv_operator_0_0= ruleMinOperator )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3184:3: lv_operator_0_0= ruleMinOperator\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getMinimumFunctionAccess().getOperatorMinOperatorParserRuleCall_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleMinOperator_in_ruleMinimumFunction6827);\r\n lv_operator_0_0=ruleMinOperator();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getMinimumFunctionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"operator\",\r\n \t\tlv_operator_0_0, \r\n \t\t\"MinOperator\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,43,FOLLOW_43_in_ruleMinimumFunction6839); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getMinimumFunctionAccess().getLeftParenthesisKeyword_1());\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3204:1: ( (lv_values_2_0= ruleNumberExpression ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3205:1: (lv_values_2_0= ruleNumberExpression )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3205:1: (lv_values_2_0= ruleNumberExpression )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3206:3: lv_values_2_0= ruleNumberExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getMinimumFunctionAccess().getValuesNumberExpressionParserRuleCall_2_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleNumberExpression_in_ruleMinimumFunction6860);\r\n lv_values_2_0=ruleNumberExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getMinimumFunctionRule());\r\n \t }\r\n \t\tadd(\r\n \t\t\tcurrent, \r\n \t\t\t\"values\",\r\n \t\tlv_values_2_0, \r\n \t\t\"NumberExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3222:2: (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )*\r\n loop43:\r\n do {\r\n int alt43=2;\r\n int LA43_0 = input.LA(1);\r\n\r\n if ( (LA43_0==20) ) {\r\n alt43=1;\r\n }\r\n\r\n\r\n switch (alt43) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3222:4: otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t {\r\n \t otherlv_3=(Token)match(input,20,FOLLOW_20_in_ruleMinimumFunction6873); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_3, grammarAccess.getMinimumFunctionAccess().getCommaKeyword_3_0());\r\n \t \r\n \t }\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3226:1: ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3227:1: (lv_values_4_0= ruleNumberExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3227:1: (lv_values_4_0= ruleNumberExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3228:3: lv_values_4_0= ruleNumberExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getMinimumFunctionAccess().getValuesNumberExpressionParserRuleCall_3_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumberExpression_in_ruleMinimumFunction6894);\r\n \t lv_values_4_0=ruleNumberExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getMinimumFunctionRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"values\",\r\n \t \t\tlv_values_4_0, \r\n \t \t\t\"NumberExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop43;\r\n }\r\n } while (true);\r\n\r\n otherlv_5=(Token)match(input,44,FOLLOW_44_in_ruleMinimumFunction6908); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_5, grammarAccess.getMinimumFunctionAccess().getRightParenthesisKeyword_4());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Override\n public Expression simplify() {\n try {\n return new Num(this.evaluate());\n } catch (Exception e) {\n if (getExpression1().simplify().toString().equals(getExpression2().simplify().toString())) {\n return new Num(0);\n }\n if (getExpression1().simplify().toString().equals(\"0.0\")) {\n return new Neg(getExpression2().simplify());\n }\n if (getExpression2().simplify().toString().equals(\"0.0\")) {\n return getExpression1().simplify();\n }\n return new Minus(getExpression1().simplify(), getExpression2().simplify());\n }\n }", "Expression unaryExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tif (isKind(OP_PLUS)) { //throw away the plus here\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first, op, e);\r\n\t\t}\r\n\t\telse if (isKind(OP_MINUS)){\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first, op, e);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn unaryExpressionNotPlusMinus();\r\n\t\t}\r\n\t}", "LogicExpression getLeftExp();", "private static final EvaluationAccessor min(EvaluationAccessor operand, EvaluationAccessor[] arguments) {\r\n EvaluationAccessor result = null;\r\n Value oVal = operand.getValue();\r\n if (oVal instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) oVal;\r\n IDatatype contType = ((Container) cont.getType()).getContainedType();\r\n int contSize = cont.getElementSize();\r\n \r\n if (contSize > 0) {\r\n Value rValue = null;\r\n \r\n // Determine min for number containers \r\n if (contType.isAssignableFrom(RealType.TYPE)) {\r\n // Handle min for Reals\r\n double min = (Double) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n double tmp = (Double) cont.getElement(i).getValue();\r\n if (tmp < min) {\r\n min = tmp;\r\n }\r\n }\r\n \r\n try {\r\n rValue = ValueFactory.createValue(contType, min);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n } else if (contType.isAssignableFrom(IntegerType.TYPE)) {\r\n // Handle min for Reals\r\n int min = (Integer) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n int tmp = (Integer) cont.getElement(i).getValue();\r\n if (tmp < min) {\r\n min = tmp;\r\n }\r\n }\r\n \r\n // Create min value\r\n try {\r\n rValue = ValueFactory.createValue(contType, min);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n }\r\n \r\n if (null != rValue) {\r\n result = ConstantAccessor.POOL.getInstance().bind(rValue, operand.getContext());\r\n }\r\n }\r\n }\r\n return result;\r\n }", "Expression powerExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = unaryExpression();\r\n\t\tif (isKind(OP_POWER)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\treturn new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "private Expr unary() {\n if(match(BANG, MINUS)) { // If this thing can be accurately considered a unary...\n Token operator = previous();\n Expr right = unary();\n return new Expr.Unary(operator, right);\n }\n\n return call(); // Otherwise, pass it up the chain of precedence\n }", "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final CQLParser.additiveExpression_return additiveExpression() throws RecognitionException {\n CQLParser.additiveExpression_return retval = new CQLParser.additiveExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set97=null;\n CQLParser.multiplicativeExpression_return multiplicativeExpression96 = null;\n\n CQLParser.multiplicativeExpression_return multiplicativeExpression98 = null;\n\n\n Object set97_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:2: ( multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:4: multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1862);\n multiplicativeExpression96=multiplicativeExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multiplicativeExpression96.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:29: ( ( PLUS | DIFF ) multiplicativeExpression )*\n loop26:\n do {\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( ((LA26_0>=PLUS && LA26_0<=DIFF)) ) {\n alt26=1;\n }\n\n\n switch (alt26) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:30: ( PLUS | DIFF ) multiplicativeExpression\n \t {\n \t set97=(Token)input.LT(1);\n \t set97=(Token)input.LT(1);\n \t if ( (input.LA(1)>=PLUS && input.LA(1)<=DIFF) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set97), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1872);\n \t multiplicativeExpression98=multiplicativeExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multiplicativeExpression98.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop26;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "@Override\n public Expression differentiate(String var) {\n return new Minus(getExpression1().differentiate(var), getExpression2().differentiate(var));\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public final EObject ruleAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n EObject this_MultiplicativeExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:632:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:634:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1447);\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_MultiplicativeExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:1: ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==33) ) {\n int LA10_2 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n else if ( (LA10_0==34) ) {\n int LA10_3 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:3: ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:6: ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:656:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:661:2: ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t int alt9=2;\n \t int LA9_0 = input.LA(1);\n\n \t if ( (LA9_0==33) ) {\n \t alt9=1;\n \t }\n \t else if ( (LA9_0==34) ) {\n \t alt9=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 9, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt9) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:664:3: lv_op_2_1= '+'\n \t {\n \t lv_op_2_1=(Token)match(input,33,FOLLOW_33_in_ruleAdditiveExpression1519); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getAdditiveExpressionAccess().getOpPlusSignKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:676:8: lv_op_2_2= '-'\n \t {\n \t lv_op_2_2=(Token)match(input,34,FOLLOW_34_in_ruleAdditiveExpression1548); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getAdditiveExpressionAccess().getOpHyphenMinusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:691:4: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:693:3: lv_right_3_0= ruleMultiplicativeExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1587);\n \t lv_right_3_0=ruleMultiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"MultiplicativeExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "public final void additiveExpression() throws RecognitionException {\n int additiveExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"additiveExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(807, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 119) ) { return ; }\n // Java.g:808:5: ( multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )* )\n dbg.enterAlt(1);\n\n // Java.g:808:9: multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )*\n {\n dbg.location(808,9);\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4840);\n multiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(808,34);\n // Java.g:808:34: ( ( '+' | '-' ) multiplicativeExpression )*\n try { dbg.enterSubRule(140);\n\n loop140:\n do {\n int alt140=2;\n try { dbg.enterDecision(140);\n\n int LA140_0 = input.LA(1);\n\n if ( ((LA140_0>=105 && LA140_0<=106)) ) {\n alt140=1;\n }\n\n\n } finally {dbg.exitDecision(140);}\n\n switch (alt140) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:808:36: ( '+' | '-' ) multiplicativeExpression\n \t {\n \t dbg.location(808,36);\n \t if ( (input.LA(1)>=105 && input.LA(1)<=106) ) {\n \t input.consume();\n \t state.errorRecovery=false;state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t dbg.recognitionException(mse);\n \t throw mse;\n \t }\n\n \t dbg.location(808,48);\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4852);\n \t multiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop140;\n }\n } while (true);\n } finally {dbg.exitSubRule(140);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 119, additiveExpression_StartIndex); }\n }\n dbg.location(809, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"additiveExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public final void rule__AddExp__OpAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1899:1: ( ( '+' ) | ( '-' ) )\n int alt14=2;\n int LA14_0 = input.LA(1);\n\n if ( (LA14_0==12) ) {\n alt14=1;\n }\n else if ( (LA14_0==13) ) {\n alt14=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n }\n switch (alt14) {\n case 1 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1901:1: '+'\n {\n before(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n match(input,12,FOLLOW_12_in_rule__AddExp__OpAlternatives_1_1_04042); \n after(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1909:1: '-'\n {\n before(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n match(input,13,FOLLOW_13_in_rule__AddExp__OpAlternatives_1_1_04062); \n after(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static void main(String args[]) {\n\tExpr e3 = new Minus(new Num(100),new Num(99));\n\tSystem.out.println(\"e3 is \" + e3.exprToString());\n\t// outputs \"e4 is (4*5-(100-99))\"\n\tExpr e4 = new Minus(new Times(new Num(4),new Num(5)),e3);\n\tSystem.out.println(\"e4 is \" + e4.exprToString());\n }", "public Expression commutativeExp() {\r\n return this;\r\n }", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "public final ASTOperatorParser.expr_return expr() throws RecognitionException {\n ASTOperatorParser.expr_return retval = new ASTOperatorParser.expr_return();\n retval.start = input.LT(1);\n int expr_StartIndex = input.index();\n\n Object root_0 = null;\n\n Token char_literal4 = null;\n Token char_literal5 = null;\n ParserRuleReturnScope mexpr3 = null;\n ParserRuleReturnScope mexpr6 = null;\n\n Object char_literal4_tree = null;\n Object char_literal5_tree = null;\n\n try {\n if (state.backtracking > 0 && alreadyParsedRule(input, 2)) {\n return retval;\n }\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:2: ( mexpr ( ( '+' ^| '-' ^) mexpr )* )\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:4: mexpr ( ( '+' ^| '-' ^) mexpr )*\n {\n root_0 = (Object) adaptor.nil();\n\n pushFollow(FOLLOW_mexpr_in_expr63);\n mexpr3 = mexpr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, mexpr3.getTree());\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:10: ( ( '+' ^| '-' ^) mexpr )*\n loop2: while (true) {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if (((LA2_0 >= 9 && LA2_0 <= 10))) {\n alt2 = 1;\n }\n\n switch (alt2) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:11: ( '+' ^| '-' ^) mexpr\n {\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:11: ( '+' ^| '-' ^)\n int alt1 = 2;\n int LA1_0 = input.LA(1);\n if ((LA1_0 == 9)) {\n alt1 = 1;\n } else if ((LA1_0 == 10)) {\n alt1 = 2;\n }\n\n else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 1, 0,\n input);\n throw nvae;\n }\n\n switch (alt1) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:12: '+' ^\n {\n char_literal4 = (Token) match(input, 9, FOLLOW_9_in_expr67);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n char_literal4_tree = (Object) adaptor.create(char_literal4);\n root_0 = (Object) adaptor.becomeRoot(\n char_literal4_tree,\n root_0);\n }\n\n }\n break;\n case 2:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:17: '-' ^\n {\n char_literal5 = (Token) match(input, 10, FOLLOW_10_in_expr70);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n char_literal5_tree = (Object) adaptor.create(char_literal5);\n root_0 = (Object) adaptor.becomeRoot(\n char_literal5_tree,\n root_0);\n }\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_mexpr_in_expr74);\n mexpr6 = mexpr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, mexpr6.getTree());\n\n }\n break;\n\n default:\n break loop2;\n }\n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if (state.backtracking == 0) {\n retval.tree = (Object) adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n retval.tree = (Object) adaptor.errorNode(\n input,\n retval.start,\n input.LT(-1),\n re);\n } finally {\n // do for sure before leaving\n if (state.backtracking > 0) {\n memoize(input, 2, expr_StartIndex);\n }\n\n }\n return retval;\n }", "public static BinaryExpression power(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public String getLeftOperand()\r\n {\r\n if (leftOperand == null)\r\n {\r\n return null;\r\n }\r\n if (leftOperand.contains(\"+1i\"))\r\n {\r\n return leftOperand.replace(\"+1i\", \"+i\");\r\n }\r\n else if (leftOperand.contains(\"-1i\"))\r\n {\r\n return leftOperand.replace(\"-1i\", \"-i\");\r\n }\r\n return leftOperand;\r\n }", "public Expression simplify() {\n Expression exp = this.getExp().simplify();\n if (exp.getVariables().isEmpty()) {\n try {\n Num n = new Num(this.evaluate());\n return n;\n } catch (Exception e) {\n int checkStyleFix = 0;\n }\n }\n Cos s = new Cos(exp);\n return s;\n }", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "void visit(PlusExpression expression);", "public final EObject ruleAddition() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_Multiplication_0 = null;\n\n EObject lv_right_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4104:28: ( (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4106:5: this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n {\n \n newCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9227);\n this_Multiplication_0=ruleMultiplication();\n\n state._fsp--;\n\n \n current = this_Multiplication_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:1: ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n loop39:\n do {\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( ((LA39_0>=66 && LA39_0<=67)) ) {\n alt39=1;\n }\n\n\n switch (alt39) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) )\n \t int alt38=2;\n \t int LA38_0 = input.LA(1);\n\n \t if ( (LA38_0==66) ) {\n \t alt38=1;\n \t }\n \t else if ( (LA38_0==67) ) {\n \t alt38=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 38, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt38) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: () otherlv_2= '+'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4115:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_2=(Token)match(input,66,FOLLOW_66_in_ruleAddition9250); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: () otherlv_4= '-'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4126:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_4=(Token)match(input,67,FOLLOW_67_in_ruleAddition9279); \n\n \t \tnewLeafNode(otherlv_4, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4135:3: ( (lv_right_5_0= ruleMultiplication ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4137:3: lv_right_5_0= ruleMultiplication\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9302);\n \t lv_right_5_0=ruleMultiplication();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_5_0, \n \t \t\t\"Multiplication\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop39;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "Expression relExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = addExpression();\r\n\t\twhile(isKind(OP_LT,OP_GT,OP_LE,OP_GE)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = addExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "protected IExpressionValue min()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MIN FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2<ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,false);\r\n\t\t\r\n\t}", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public final void unaryOperator() throws RecognitionException {\n try {\n // css21.g:102:5: ( MINUS | PLUS )\n // css21.g:\n {\n if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {\n input.consume();\n state.errorRecovery=false;\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }", "public Addition(int precedence){\n super(\"+\", precedence);\n }", "public static BinaryExpression lessThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public E min() {\n\n }", "private Proof mulLeftZero(Expression a) {\n Variable x = var(\"x\");\n Proof equalitySymConvert = equalitySymConvert(faxm8Gen(zero(), x));\n Proof faxm6gen = faxm6Gen(multi(zero(), x));\n Proof axm2convert = faxm2Convert(equalitySymConvert, faxm6gen);\n Proof axm2convertOnce = faxm2ConvertOnce(zero(), equalitySymConvert(axm2convert));\n return inductConclusion(x, a, faxm7Gen(zero()), axm2convertOnce);\n }", "public final void unaryExpression() throws RecognitionException {\n int unaryExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"unaryExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(815, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 121) ) { return ; }\n // Java.g:816:5: ( '+' unaryExpression | '-' unaryExpression | '++' unaryExpression | '--' unaryExpression | unaryExpressionNotPlusMinus )\n int alt142=5;\n try { dbg.enterDecision(142);\n\n switch ( input.LA(1) ) {\n case 105:\n {\n alt142=1;\n }\n break;\n case 106:\n {\n alt142=2;\n }\n break;\n case 109:\n {\n alt142=3;\n }\n break;\n case 110:\n {\n alt142=4;\n }\n break;\n case Identifier:\n case FloatingPointLiteral:\n case CharacterLiteral:\n case StringLiteral:\n case HexLiteral:\n case OctalLiteral:\n case DecimalLiteral:\n case 47:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n case 65:\n case 66:\n case 69:\n case 70:\n case 71:\n case 72:\n case 111:\n case 112:\n case 113:\n {\n alt142=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 142, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(142);}\n\n switch (alt142) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:816:9: '+' unaryExpression\n {\n dbg.location(816,9);\n match(input,105,FOLLOW_105_in_unaryExpression4918); if (state.failed) return ;\n dbg.location(816,13);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4920);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:817:9: '-' unaryExpression\n {\n dbg.location(817,9);\n match(input,106,FOLLOW_106_in_unaryExpression4930); if (state.failed) return ;\n dbg.location(817,13);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4932);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:818:9: '++' unaryExpression\n {\n dbg.location(818,9);\n match(input,109,FOLLOW_109_in_unaryExpression4942); if (state.failed) return ;\n dbg.location(818,14);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4944);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:819:9: '--' unaryExpression\n {\n dbg.location(819,9);\n match(input,110,FOLLOW_110_in_unaryExpression4954); if (state.failed) return ;\n dbg.location(819,14);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4956);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:820:9: unaryExpressionNotPlusMinus\n {\n dbg.location(820,9);\n pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression4966);\n unaryExpressionNotPlusMinus();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 121, unaryExpression_StartIndex); }\n }\n dbg.location(821, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"unaryExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "Expression getExp();", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "@Override\n public Expression differentiate(String var) {\n return new Minus(getA().differentiate(var), getB().differentiate(var));\n }", "public abstract Expression getInitialExpression();", "public static UnaryExpression increment(Expression expression) { throw Extensions.todo(); }", "PlusExpr (Expr l, Expr r) {\n leftOperand = l;\n rightOperand = r;\n }", "public final EObject ruleAdditiveExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_MultiplicativeExpression_0 = null;\r\n\r\n EObject lv_operator_2_1 = null;\r\n\r\n EObject lv_operator_2_2 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2799:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2800:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2800:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2801:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6015);\r\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_MultiplicativeExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:1: ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\r\n loop38:\r\n do {\r\n int alt38=2;\r\n int LA38_0 = input.LA(1);\r\n\r\n if ( ((LA38_0>=64 && LA38_0<=65)) ) {\r\n alt38=1;\r\n }\r\n\r\n\r\n switch (alt38) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:2: () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2810:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2815:2: ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2816:1: ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2816:1: ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2817:1: (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2817:1: (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator )\r\n \t int alt37=2;\r\n \t int LA37_0 = input.LA(1);\r\n\r\n \t if ( (LA37_0==65) ) {\r\n \t alt37=1;\r\n \t }\r\n \t else if ( (LA37_0==64) ) {\r\n \t alt37=2;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 37, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n \t switch (alt37) {\r\n \t case 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2818:3: lv_operator_2_1= ruleSubstractionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOperatorSubstractionOperatorParserRuleCall_1_1_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleSubstractionOperator_in_ruleAdditiveExpression6047);\r\n \t lv_operator_2_1=ruleSubstractionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_1, \r\n \t \t\t\"SubstractionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2833:8: lv_operator_2_2= ruleAdditionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOperatorAdditionOperatorParserRuleCall_1_1_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAdditionOperator_in_ruleAdditiveExpression6066);\r\n \t lv_operator_2_2=ruleAdditionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_2, \r\n \t \t\t\"AdditionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2851:2: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2852:1: (lv_right_3_0= ruleMultiplicativeExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2852:1: (lv_right_3_0= ruleMultiplicativeExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2853:3: lv_right_3_0= ruleMultiplicativeExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6090);\r\n \t lv_right_3_0=ruleMultiplicativeExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"MultiplicativeExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop38;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject ruleUnaryExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n EObject this_UnaryExpression_1 = null;\n\n EObject this_UnaryExpression_3 = null;\n\n EObject this_UnaryExpressionNotPlusMinus_4 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:841:28: ( ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:1: ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:1: ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus )\n int alt13=3;\n switch ( input.LA(1) ) {\n case 33:\n {\n alt13=1;\n }\n break;\n case 34:\n {\n alt13=2;\n }\n break;\n case RULE_INT:\n case RULE_LONG:\n case RULE_FLOAT:\n case RULE_DOUBLE:\n case RULE_CHAR:\n case RULE_STRING:\n case RULE_ID:\n case 38:\n case 39:\n case 41:\n case 42:\n case 43:\n case 44:\n case 45:\n case 48:\n case 49:\n case 50:\n case 51:\n {\n alt13=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 0, input);\n\n throw nvae;\n }\n\n switch (alt13) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:2: (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:2: (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:4: otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression\n {\n otherlv_0=(Token)match(input,33,FOLLOW_33_in_ruleUnaryExpression1951); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getUnaryExpressionAccess().getPlusSignKeyword_0_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionParserRuleCall_0_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpression1973);\n this_UnaryExpression_1=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_1; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:6: (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:6: (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:8: otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression\n {\n otherlv_2=(Token)match(input,34,FOLLOW_34_in_ruleUnaryExpression1992); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getUnaryExpressionAccess().getHyphenMinusKeyword_1_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionParserRuleCall_1_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpression2014);\n this_UnaryExpression_3=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_3; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:871:5: this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionNotPlusMinusParserRuleCall_2()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpressionNotPlusMinus_in_ruleUnaryExpression2042);\n this_UnaryExpressionNotPlusMinus_4=ruleUnaryExpressionNotPlusMinus();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpressionNotPlusMinus_4; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public Expression simplify() {\r\n return this;\r\n }", "public static BinaryExpression power(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public final void rule__AstExpressionAdditive__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2946:1: ( ( '+' ) | ( '-' ) )\n int alt17=2;\n int LA17_0 = input.LA(1);\n\n if ( (LA17_0==28) ) {\n alt17=1;\n }\n else if ( (LA17_0==29) ) {\n alt17=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 17, 0, input);\n\n throw nvae;\n }\n switch (alt17) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2947:1: ( '+' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2947:1: ( '+' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2948:1: '+'\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getOperatorPlusSignKeyword_1_1_0_0()); \n match(input,28,FOLLOW_28_in_rule__AstExpressionAdditive__OperatorAlternatives_1_1_06365); \n after(grammarAccess.getAstExpressionAdditiveAccess().getOperatorPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2955:6: ( '-' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2955:6: ( '-' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2956:1: '-'\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getOperatorHyphenMinusKeyword_1_1_0_1()); \n match(input,29,FOLLOW_29_in_rule__AstExpressionAdditive__OperatorAlternatives_1_1_06385); \n after(grammarAccess.getAstExpressionAdditiveAccess().getOperatorHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Complex Minus (Complex z) {\n\nreturn new Complex(u-z.u,v-z.v);\n\n}", "@Override\n\tpublic Number operate(Number expr1) {\n\t\treturn null;\n\t}", "@Override\n public Expression simplify() {\n Expression ex1Simp = getEx2().simplify(), ex2Simp = getEx2().simplify();\n\n try {\n if (ex2Simp.evaluate() == 1) {\n return ex1Simp.simplify();\n }\n } catch (Exception e) {\n\n }\n ;\n Boolean equality = false;\n try {\n if (ex1Simp.evaluate() == ex2Simp.evaluate()) {\n equality = true;\n } else {\n equality = false;\n }\n } catch (Exception e) {\n }\n\n List<String> vars = ex1Simp.getVariables();\n List<String> vars2 = ex2Simp.getVariables();\n\n if (vars.containsAll(vars2) && vars2.containsAll(vars)) {\n Map<String, Double> varsMap = new TreeMap<>();\n double i = 2;\n for (String s : vars) {\n varsMap.put(s, i);\n i += 1;\n }\n\n try {\n if (ex1Simp.evaluate(varsMap) == ex2Simp.evaluate(varsMap)) {\n equality = true;\n } else {\n equality = false;\n }\n } catch (Exception e) {\n }\n\n }\n\n\n if (equality) {\n return new Num(1);\n } else return new Log(getEx2().simplify(), getEx2().simplify());\n }", "public static UnaryExpression unaryPlus(Expression expression) {\n return makeUnary(ExpressionType.UnaryPlus, expression, expression.getType());\n }", "public AdditionOp(Expression left, Expression right, String id){\n super(left, \"+\", right, id);\n this.setType(ExpType.ADDITION);\n }", "Plus createPlus();", "Plus createPlus();", "Plus createPlus();", "private ASTNode unaryMinusRules(ASTNode operand){\n Token operandToken = operand.getToken();\n if (operand instanceof UnaryOP && operandToken.getType() == TokenType.MINUS) {\n return ((UnaryOP) operand).getOperand();\n }\n else{\n return operand;\n }\n }", "public final EObject ruleMultiplicativeExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n Token lv_op_2_3=null;\n EObject this_UnaryExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:729:28: ( (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:730:1: (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:730:1: (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:731:5: this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getUnaryExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleMultiplicativeExpression1682);\n this_UnaryExpression_0=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:1: ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )*\n loop12:\n do {\n int alt12=2;\n switch ( input.LA(1) ) {\n case 35:\n {\n int LA12_2 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n case 36:\n {\n int LA12_3 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n case 37:\n {\n int LA12_4 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n\n }\n\n switch (alt12) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:2: ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:2: ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:3: ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:6: ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:7: () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:756:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:761:2: ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:762:1: ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:762:1: ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:763:1: (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:763:1: (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' )\n \t int alt11=3;\n \t switch ( input.LA(1) ) {\n \t case 35:\n \t {\n \t alt11=1;\n \t }\n \t break;\n \t case 36:\n \t {\n \t alt11=2;\n \t }\n \t break;\n \t case 37:\n \t {\n \t alt11=3;\n \t }\n \t break;\n \t default:\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 11, 0, input);\n\n \t throw nvae;\n \t }\n\n \t switch (alt11) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:764:3: lv_op_2_1= '*'\n \t {\n \t lv_op_2_1=(Token)match(input,35,FOLLOW_35_in_ruleMultiplicativeExpression1768); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getMultiplicativeExpressionAccess().getOpAsteriskKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:776:8: lv_op_2_2= '/'\n \t {\n \t lv_op_2_2=(Token)match(input,36,FOLLOW_36_in_ruleMultiplicativeExpression1797); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getMultiplicativeExpressionAccess().getOpSolidusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 3 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:788:8: lv_op_2_3= '%'\n \t {\n \t lv_op_2_3=(Token)match(input,37,FOLLOW_37_in_ruleMultiplicativeExpression1826); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_3, grammarAccess.getMultiplicativeExpressionAccess().getOpPercentSignKeyword_1_0_0_1_0_2());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_3, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:803:4: ( (lv_right_3_0= ruleUnaryExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:804:1: (lv_right_3_0= ruleUnaryExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:804:1: (lv_right_3_0= ruleUnaryExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:805:3: lv_right_3_0= ruleUnaryExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightUnaryExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleUnaryExpression_in_ruleMultiplicativeExpression1865);\n \t lv_right_3_0=ruleUnaryExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"UnaryExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop12;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static BinaryExpression leftShift(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "ExpOperand createExpOperand();", "private ASTNode binaryMinusRules(ASTNode left, ASTNode right) throws Exception {\n\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n TokenType numType = TokenType.NUMBER;\n TokenType varType = TokenType.VAR;\n TokenType minusType = TokenType.MINUS;\n TokenType plusType = TokenType.PLUS;\n\n Token tempToken;\n\n if (patternMatcher(leftType, rightType, numType, numType)){\n //left is num and right is num -> num\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n Double sum = leftVal + rightVal;\n\n //if sum is negative, store the new node as unaryMinus(abs(left+right))\n if (sum < 0){\n tempToken = new Token(minusType);\n Token tempInnerToken = new Token(numType, String.valueOf(sum * -1));\n ASTNode tempOperand = new Num(tempInnerToken);\n return new UnaryOP(tempToken, tempOperand);\n }\n else{\n String tempString = String.valueOf(sum);\n tempToken = new Token(numType, tempString);\n return new Num(tempToken);\n }\n }\n else if (patternMatcher(leftType, rightType, varType, varType)){\n //left is var and right is var -> 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightType == minusType && right instanceof UnaryOP){\n //left is anything and right is unary minus -> var+right.operand\n tempToken = new Token(plusType);\n return new BinaryOp(tempToken, left, ((UnaryOP) right).getOperand());\n }\n else if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0 -> anything\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything -> -anything\n tempToken = new Token(minusType);\n return new UnaryOP(tempToken, right);\n }\n //else\n tempToken = new Token(minusType);\n return new BinaryOp(tempToken ,left, right);\n }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "protected final IntervalNode treeMin() {\n\tIntervalNode x = this;\n\twhile(x.left != IntervalNode.nullIntervalNode) {\n\t x = x.left;\n\t}\n\treturn(x);\n }", "ExpressionCalculPrimary getExpr();", "public LowPrecedenceNode(ArrayList<HighPrecedenceNode> highPrecedenceNodes, ArrayList<Enums.Operator> operators) {\n //Check for illegal operators\n if (!(operators.contains(Enums.Operator.ADD) || operators.contains(Enums.Operator.SUB))) {\n throw new CompilerException(\"MUL, DIV & MOD are not Low Precedence\", getCodePosition());\n }\n this.highPrecedenceNodes = highPrecedenceNodes;\n this.operators = operators;\n }", "@Override\n public Expression assign(String var, Expression expression) {\n return new Minus(getExpression1().assign(var, expression), getExpression2().assign(var, expression));\n }", "public Snippet visit(MinExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t Snippet f6 = n.identifier1.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"Math.min(\"+f4.returnTemp+\", \"+f6.returnTemp+\")\";\n\t return _ret;\n\t }", "private Expr unaryPre(Position pos, X10Unary_c.Operator op, Expr e) throws SemanticException {\n Type ret = e.type();\n Expr one = getLiteral(pos, ret, 1);\n Assign.Operator asgn = (op == X10Unary_c.PRE_INC) ? Assign.ADD_ASSIGN : Assign.SUB_ASSIGN;\n Expr a = assign(pos, e, asgn, one);\n a = visitAssign((Assign) a);\n return a;\n }", "E minVal();", "SEIntegerVariable getOperand1();", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "LogicExpression getLeft();", "public Node negaposi()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.PLUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Positive(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\tif(lexer.getToken()==Lexer.Token.MINUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Negative(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn power();\r\n\t}", "public final EObject ruleMultiplication() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_PrimaryExpression_0 = null;\n\n EObject lv_right_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4173:28: ( (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4174:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4174:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4175:5: this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )*\n {\n \n newCompositeNode(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0()); \n \n pushFollow(FOLLOW_rulePrimaryExpression_in_ruleMultiplication9397);\n this_PrimaryExpression_0=rulePrimaryExpression();\n\n state._fsp--;\n\n \n current = this_PrimaryExpression_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:1: ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )*\n loop41:\n do {\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( ((LA41_0>=68 && LA41_0<=69)) ) {\n alt41=1;\n }\n\n\n switch (alt41) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:2: ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:2: ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) )\n \t int alt40=2;\n \t int LA40_0 = input.LA(1);\n\n \t if ( (LA40_0==68) ) {\n \t alt40=1;\n \t }\n \t else if ( (LA40_0==69) ) {\n \t alt40=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 40, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt40) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:3: ( () otherlv_2= '*' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:3: ( () otherlv_2= '*' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:4: () otherlv_2= '*'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:4: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4184:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_2=(Token)match(input,68,FOLLOW_68_in_ruleMultiplication9420); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:6: ( () otherlv_4= '/' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:6: ( () otherlv_4= '/' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:7: () otherlv_4= '/'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:7: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4195:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_4=(Token)match(input,69,FOLLOW_69_in_ruleMultiplication9449); \n\n \t \tnewLeafNode(otherlv_4, grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4204:3: ( (lv_right_5_0= rulePrimaryExpression ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4205:1: (lv_right_5_0= rulePrimaryExpression )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4205:1: (lv_right_5_0= rulePrimaryExpression )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4206:3: lv_right_5_0= rulePrimaryExpression\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0()); \n \t \t \n \t pushFollow(FOLLOW_rulePrimaryExpression_in_ruleMultiplication9472);\n \t lv_right_5_0=rulePrimaryExpression();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicationRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_5_0, \n \t \t\t\"PrimaryExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop41;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject ruleUnaryExpressionNotPlusMinus() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n EObject this_UnaryExpression_1 = null;\n\n EObject this_UnaryExpression_3 = null;\n\n EObject this_CastedExpression_4 = null;\n\n EObject this_PrimaryExpression_5 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:899:28: ( ( (otherlv_0= '~' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '!' this_UnaryExpression_3= ruleUnaryExpression ) | ( ( ruleCastedExpression )=>this_CastedExpression_4= ruleCastedExpression ) | this_PrimaryExpression_5= rulePrimaryExpression ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:900:1: ( (otherlv_0= '~' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '!' this_UnaryExpression_3= ruleUnaryExpression ) | ( ( ruleCastedExpression )=>this_CastedExpression_4= ruleCastedExpression ) | this_PrimaryExpression_5= rulePrimaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:900:1: ( (otherlv_0= '~' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '!' this_UnaryExpression_3= ruleUnaryExpression ) | ( ( ruleCastedExpression )=>this_CastedExpression_4= ruleCastedExpression ) | this_PrimaryExpression_5= rulePrimaryExpression )\n int alt14=4;\n alt14 = dfa14.predict(input);\n switch (alt14) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:900:2: (otherlv_0= '~' this_UnaryExpression_1= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:900:2: (otherlv_0= '~' this_UnaryExpression_1= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:900:4: otherlv_0= '~' this_UnaryExpression_1= ruleUnaryExpression\n {\n otherlv_0=(Token)match(input,38,FOLLOW_38_in_ruleUnaryExpressionNotPlusMinus2125); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getUnaryExpressionNotPlusMinusAccess().getTildeKeyword_0_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionNotPlusMinusAccess().getUnaryExpressionParserRuleCall_0_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpressionNotPlusMinus2147);\n this_UnaryExpression_1=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_1; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:914:6: (otherlv_2= '!' this_UnaryExpression_3= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:914:6: (otherlv_2= '!' this_UnaryExpression_3= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:914:8: otherlv_2= '!' this_UnaryExpression_3= ruleUnaryExpression\n {\n otherlv_2=(Token)match(input,39,FOLLOW_39_in_ruleUnaryExpressionNotPlusMinus2166); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getUnaryExpressionNotPlusMinusAccess().getExclamationMarkKeyword_1_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionNotPlusMinusAccess().getUnaryExpressionParserRuleCall_1_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpressionNotPlusMinus2188);\n this_UnaryExpression_3=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_3; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:928:6: ( ( ruleCastedExpression )=>this_CastedExpression_4= ruleCastedExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:928:6: ( ( ruleCastedExpression )=>this_CastedExpression_4= ruleCastedExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:928:7: ( ruleCastedExpression )=>this_CastedExpression_4= ruleCastedExpression\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionNotPlusMinusAccess().getCastedExpressionParserRuleCall_2()); \n \n }\n pushFollow(FOLLOW_ruleCastedExpression_in_ruleUnaryExpressionNotPlusMinus2222);\n this_CastedExpression_4=ruleCastedExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_CastedExpression_4; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 4 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:939:5: this_PrimaryExpression_5= rulePrimaryExpression\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionNotPlusMinusAccess().getPrimaryExpressionParserRuleCall_3()); \n \n }\n pushFollow(FOLLOW_rulePrimaryExpression_in_ruleUnaryExpressionNotPlusMinus2250);\n this_PrimaryExpression_5=rulePrimaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_PrimaryExpression_5; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject ruleSignedConstant() throws RecognitionException {\n EObject current = null;\n\n AntlrDatatypeRuleToken lv_op_0_0 = null;\n\n EObject lv_ownedPropertyExpression_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalSafetyParser.g:11165:2: ( ( ( (lv_op_0_0= rulePlusMinus ) ) ( (lv_ownedPropertyExpression_1_0= ruleConstantValue ) ) ) )\n // InternalSafetyParser.g:11166:2: ( ( (lv_op_0_0= rulePlusMinus ) ) ( (lv_ownedPropertyExpression_1_0= ruleConstantValue ) ) )\n {\n // InternalSafetyParser.g:11166:2: ( ( (lv_op_0_0= rulePlusMinus ) ) ( (lv_ownedPropertyExpression_1_0= ruleConstantValue ) ) )\n // InternalSafetyParser.g:11167:3: ( (lv_op_0_0= rulePlusMinus ) ) ( (lv_ownedPropertyExpression_1_0= ruleConstantValue ) )\n {\n // InternalSafetyParser.g:11167:3: ( (lv_op_0_0= rulePlusMinus ) )\n // InternalSafetyParser.g:11168:4: (lv_op_0_0= rulePlusMinus )\n {\n // InternalSafetyParser.g:11168:4: (lv_op_0_0= rulePlusMinus )\n // InternalSafetyParser.g:11169:5: lv_op_0_0= rulePlusMinus\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getSignedConstantAccess().getOpPlusMinusParserRuleCall_0_0());\n \t\t\t\t\n }\n pushFollow(FollowSets000.FOLLOW_113);\n lv_op_0_0=rulePlusMinus();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getSignedConstantRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"op\",\n \t\t\t\t\t\tlv_op_0_0,\n \t\t\t\t\t\t\"org.osate.xtext.aadl2.properties.Properties.PlusMinus\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n // InternalSafetyParser.g:11186:3: ( (lv_ownedPropertyExpression_1_0= ruleConstantValue ) )\n // InternalSafetyParser.g:11187:4: (lv_ownedPropertyExpression_1_0= ruleConstantValue )\n {\n // InternalSafetyParser.g:11187:4: (lv_ownedPropertyExpression_1_0= ruleConstantValue )\n // InternalSafetyParser.g:11188:5: lv_ownedPropertyExpression_1_0= ruleConstantValue\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getSignedConstantAccess().getOwnedPropertyExpressionConstantValueParserRuleCall_1_0());\n \t\t\t\t\n }\n pushFollow(FollowSets000.FOLLOW_2);\n lv_ownedPropertyExpression_1_0=ruleConstantValue();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getSignedConstantRule());\n \t\t\t\t\t}\n \t\t\t\t\tadd(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"ownedPropertyExpression\",\n \t\t\t\t\t\tlv_ownedPropertyExpression_1_0,\n \t\t\t\t\t\t\"org.osate.xtext.aadl2.properties.Properties.ConstantValue\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "Multiply createMultiply();", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "NumericExpression createNumericExpression();", "@Override\n public void visit(CalcExpr node) {\n }", "public MvtPlus() {\r\n\t\tsuper('+');\r\n\t}", "Unary expr(Expr e);", "double getActiveOperand();" ]
[ "0.6180532", "0.5993962", "0.5988793", "0.5987825", "0.5820549", "0.58159435", "0.57224697", "0.57146585", "0.5650072", "0.5611276", "0.5588088", "0.5584811", "0.5550385", "0.5531367", "0.5527388", "0.55253047", "0.544314", "0.5438921", "0.54327166", "0.5383124", "0.5379312", "0.5355912", "0.53408545", "0.5337392", "0.5330318", "0.5310136", "0.5242288", "0.5238948", "0.5198813", "0.5188336", "0.5170983", "0.51669204", "0.5151728", "0.5139804", "0.5138488", "0.5137365", "0.5122409", "0.5114398", "0.5113567", "0.51103604", "0.51086354", "0.51054126", "0.5102807", "0.5079351", "0.5077051", "0.50702924", "0.5059669", "0.50518817", "0.5049368", "0.5034139", "0.5017472", "0.5014231", "0.5005762", "0.49880382", "0.49872628", "0.49847212", "0.49829572", "0.49703658", "0.4968868", "0.4960742", "0.495825", "0.49513283", "0.49481568", "0.4935397", "0.49341047", "0.4915548", "0.49138984", "0.49111837", "0.49005616", "0.49005616", "0.49005616", "0.48938063", "0.4892276", "0.4878527", "0.4870757", "0.48670363", "0.48610285", "0.48550716", "0.48448855", "0.48437583", "0.48406613", "0.48309925", "0.4823575", "0.48207915", "0.4807998", "0.48072112", "0.48038894", "0.47984245", "0.479433", "0.4793502", "0.47763154", "0.47758204", "0.47703308", "0.47656244", "0.47652426", "0.4749488", "0.47491443", "0.4746473", "0.47447044", "0.47422054" ]
0.5021996
50
Contexts: Expression returns Plus Addition returns Plus Addition.Plus_1_0_0_0 returns Plus Addition.Minus_1_0_1_0 returns Plus Multiplication returns Plus Multiplication.Multi_1_0_0_0 returns Plus Multiplication.Div_1_0_1_0 returns Plus PrimaryExpression returns Plus Constraint: (left=Addition_Plus_1_0_0_0 right=Multiplication)
protected void sequence_Addition(ISerializationContext context, Plus semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.PLUS__LEFT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.PLUS__LEFT)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.PLUS__RIGHT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.PLUS__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(), semanticObject.getLeft()); feeder.accept(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0(), semanticObject.getRight()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void visit(PlusExpression expression);", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final void rule__AddExp__OpAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1899:1: ( ( '+' ) | ( '-' ) )\n int alt14=2;\n int LA14_0 = input.LA(1);\n\n if ( (LA14_0==12) ) {\n alt14=1;\n }\n else if ( (LA14_0==13) ) {\n alt14=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n }\n switch (alt14) {\n case 1 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1901:1: '+'\n {\n before(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n match(input,12,FOLLOW_12_in_rule__AddExp__OpAlternatives_1_1_04042); \n after(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1909:1: '-'\n {\n before(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n match(input,13,FOLLOW_13_in_rule__AddExp__OpAlternatives_1_1_04062); \n after(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "PlusExpr (Expr l, Expr r) {\n leftOperand = l;\n rightOperand = r;\n }", "public final void rule__AstExpressionAdditive__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2946:1: ( ( '+' ) | ( '-' ) )\n int alt17=2;\n int LA17_0 = input.LA(1);\n\n if ( (LA17_0==28) ) {\n alt17=1;\n }\n else if ( (LA17_0==29) ) {\n alt17=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 17, 0, input);\n\n throw nvae;\n }\n switch (alt17) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2947:1: ( '+' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2947:1: ( '+' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2948:1: '+'\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getOperatorPlusSignKeyword_1_1_0_0()); \n match(input,28,FOLLOW_28_in_rule__AstExpressionAdditive__OperatorAlternatives_1_1_06365); \n after(grammarAccess.getAstExpressionAdditiveAccess().getOperatorPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2955:6: ( '-' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2955:6: ( '-' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2956:1: '-'\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getOperatorHyphenMinusKeyword_1_1_0_1()); \n match(input,29,FOLLOW_29_in_rule__AstExpressionAdditive__OperatorAlternatives_1_1_06385); \n after(grammarAccess.getAstExpressionAdditiveAccess().getOperatorHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public final CQLParser.additiveExpression_return additiveExpression() throws RecognitionException {\n CQLParser.additiveExpression_return retval = new CQLParser.additiveExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set97=null;\n CQLParser.multiplicativeExpression_return multiplicativeExpression96 = null;\n\n CQLParser.multiplicativeExpression_return multiplicativeExpression98 = null;\n\n\n Object set97_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:2: ( multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:4: multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1862);\n multiplicativeExpression96=multiplicativeExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multiplicativeExpression96.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:29: ( ( PLUS | DIFF ) multiplicativeExpression )*\n loop26:\n do {\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( ((LA26_0>=PLUS && LA26_0<=DIFF)) ) {\n alt26=1;\n }\n\n\n switch (alt26) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:30: ( PLUS | DIFF ) multiplicativeExpression\n \t {\n \t set97=(Token)input.LT(1);\n \t set97=(Token)input.LT(1);\n \t if ( (input.LA(1)>=PLUS && input.LA(1)<=DIFF) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set97), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1872);\n \t multiplicativeExpression98=multiplicativeExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multiplicativeExpression98.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop26;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }", "public final void additiveExpression() throws RecognitionException {\n int additiveExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"additiveExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(807, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 119) ) { return ; }\n // Java.g:808:5: ( multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )* )\n dbg.enterAlt(1);\n\n // Java.g:808:9: multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )*\n {\n dbg.location(808,9);\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4840);\n multiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(808,34);\n // Java.g:808:34: ( ( '+' | '-' ) multiplicativeExpression )*\n try { dbg.enterSubRule(140);\n\n loop140:\n do {\n int alt140=2;\n try { dbg.enterDecision(140);\n\n int LA140_0 = input.LA(1);\n\n if ( ((LA140_0>=105 && LA140_0<=106)) ) {\n alt140=1;\n }\n\n\n } finally {dbg.exitDecision(140);}\n\n switch (alt140) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:808:36: ( '+' | '-' ) multiplicativeExpression\n \t {\n \t dbg.location(808,36);\n \t if ( (input.LA(1)>=105 && input.LA(1)<=106) ) {\n \t input.consume();\n \t state.errorRecovery=false;state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t dbg.recognitionException(mse);\n \t throw mse;\n \t }\n\n \t dbg.location(808,48);\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4852);\n \t multiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop140;\n }\n } while (true);\n } finally {dbg.exitSubRule(140);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 119, additiveExpression_StartIndex); }\n }\n dbg.location(809, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"additiveExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final EObject ruleAdditionOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4767:28: ( ( () otherlv_1= '+' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4768:1: ( () otherlv_1= '+' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4768:1: ( () otherlv_1= '+' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4768:2: () otherlv_1= '+'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4768:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4769:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getAdditionOperatorAccess().getAdditionOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,64,FOLLOW_64_in_ruleAdditionOperator10657); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getAdditionOperatorAccess().getPlusSignKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "Plus createPlus();", "Plus createPlus();", "Plus createPlus();", "public final ASTOperatorParser.expr_return expr() throws RecognitionException {\n ASTOperatorParser.expr_return retval = new ASTOperatorParser.expr_return();\n retval.start = input.LT(1);\n int expr_StartIndex = input.index();\n\n Object root_0 = null;\n\n Token char_literal4 = null;\n Token char_literal5 = null;\n ParserRuleReturnScope mexpr3 = null;\n ParserRuleReturnScope mexpr6 = null;\n\n Object char_literal4_tree = null;\n Object char_literal5_tree = null;\n\n try {\n if (state.backtracking > 0 && alreadyParsedRule(input, 2)) {\n return retval;\n }\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:2: ( mexpr ( ( '+' ^| '-' ^) mexpr )* )\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:4: mexpr ( ( '+' ^| '-' ^) mexpr )*\n {\n root_0 = (Object) adaptor.nil();\n\n pushFollow(FOLLOW_mexpr_in_expr63);\n mexpr3 = mexpr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, mexpr3.getTree());\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:10: ( ( '+' ^| '-' ^) mexpr )*\n loop2: while (true) {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if (((LA2_0 >= 9 && LA2_0 <= 10))) {\n alt2 = 1;\n }\n\n switch (alt2) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:11: ( '+' ^| '-' ^) mexpr\n {\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:11: ( '+' ^| '-' ^)\n int alt1 = 2;\n int LA1_0 = input.LA(1);\n if ((LA1_0 == 9)) {\n alt1 = 1;\n } else if ((LA1_0 == 10)) {\n alt1 = 2;\n }\n\n else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 1, 0,\n input);\n throw nvae;\n }\n\n switch (alt1) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:12: '+' ^\n {\n char_literal4 = (Token) match(input, 9, FOLLOW_9_in_expr67);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n char_literal4_tree = (Object) adaptor.create(char_literal4);\n root_0 = (Object) adaptor.becomeRoot(\n char_literal4_tree,\n root_0);\n }\n\n }\n break;\n case 2:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:17: '-' ^\n {\n char_literal5 = (Token) match(input, 10, FOLLOW_10_in_expr70);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n char_literal5_tree = (Object) adaptor.create(char_literal5);\n root_0 = (Object) adaptor.becomeRoot(\n char_literal5_tree,\n root_0);\n }\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_mexpr_in_expr74);\n mexpr6 = mexpr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, mexpr6.getTree());\n\n }\n break;\n\n default:\n break loop2;\n }\n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if (state.backtracking == 0) {\n retval.tree = (Object) adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n retval.tree = (Object) adaptor.errorNode(\n input,\n retval.start,\n input.LT(-1),\n re);\n } finally {\n // do for sure before leaving\n if (state.backtracking > 0) {\n memoize(input, 2, expr_StartIndex);\n }\n\n }\n return retval;\n }", "public static UnaryExpression unaryPlus(Expression expression) {\n return makeUnary(ExpressionType.UnaryPlus, expression, expression.getType());\n }", "public final EObject ruleAddition() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_Multiplication_0 = null;\n\n EObject lv_right_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4104:28: ( (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4106:5: this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n {\n \n newCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9227);\n this_Multiplication_0=ruleMultiplication();\n\n state._fsp--;\n\n \n current = this_Multiplication_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:1: ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n loop39:\n do {\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( ((LA39_0>=66 && LA39_0<=67)) ) {\n alt39=1;\n }\n\n\n switch (alt39) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) )\n \t int alt38=2;\n \t int LA38_0 = input.LA(1);\n\n \t if ( (LA38_0==66) ) {\n \t alt38=1;\n \t }\n \t else if ( (LA38_0==67) ) {\n \t alt38=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 38, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt38) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: () otherlv_2= '+'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4115:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_2=(Token)match(input,66,FOLLOW_66_in_ruleAddition9250); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: () otherlv_4= '-'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4126:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_4=(Token)match(input,67,FOLLOW_67_in_ruleAddition9279); \n\n \t \tnewLeafNode(otherlv_4, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4135:3: ( (lv_right_5_0= ruleMultiplication ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4137:3: lv_right_5_0= ruleMultiplication\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9302);\n \t lv_right_5_0=ruleMultiplication();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_5_0, \n \t \t\t\"Multiplication\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop39;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public final EObject ruleAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n EObject this_MultiplicativeExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:632:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:634:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1447);\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_MultiplicativeExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:1: ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==33) ) {\n int LA10_2 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n else if ( (LA10_0==34) ) {\n int LA10_3 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:3: ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:6: ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:656:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:661:2: ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t int alt9=2;\n \t int LA9_0 = input.LA(1);\n\n \t if ( (LA9_0==33) ) {\n \t alt9=1;\n \t }\n \t else if ( (LA9_0==34) ) {\n \t alt9=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 9, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt9) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:664:3: lv_op_2_1= '+'\n \t {\n \t lv_op_2_1=(Token)match(input,33,FOLLOW_33_in_ruleAdditiveExpression1519); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getAdditiveExpressionAccess().getOpPlusSignKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:676:8: lv_op_2_2= '-'\n \t {\n \t lv_op_2_2=(Token)match(input,34,FOLLOW_34_in_ruleAdditiveExpression1548); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getAdditiveExpressionAccess().getOpHyphenMinusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:691:4: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:693:3: lv_right_3_0= ruleMultiplicativeExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1587);\n \t lv_right_3_0=ruleMultiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"MultiplicativeExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public void completePlusExpr_Op(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {\n\t\t// subclasses may override\n\t}", "public final void mPLUS() throws RecognitionException {\n try {\n int _type = PLUS;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:25:6: ( '+' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:25:8: '+'\n {\n match('+'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "long addExpression(Expression expression);", "public final void unaryExpression() throws RecognitionException {\n int unaryExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"unaryExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(815, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 121) ) { return ; }\n // Java.g:816:5: ( '+' unaryExpression | '-' unaryExpression | '++' unaryExpression | '--' unaryExpression | unaryExpressionNotPlusMinus )\n int alt142=5;\n try { dbg.enterDecision(142);\n\n switch ( input.LA(1) ) {\n case 105:\n {\n alt142=1;\n }\n break;\n case 106:\n {\n alt142=2;\n }\n break;\n case 109:\n {\n alt142=3;\n }\n break;\n case 110:\n {\n alt142=4;\n }\n break;\n case Identifier:\n case FloatingPointLiteral:\n case CharacterLiteral:\n case StringLiteral:\n case HexLiteral:\n case OctalLiteral:\n case DecimalLiteral:\n case 47:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n case 65:\n case 66:\n case 69:\n case 70:\n case 71:\n case 72:\n case 111:\n case 112:\n case 113:\n {\n alt142=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 142, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(142);}\n\n switch (alt142) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:816:9: '+' unaryExpression\n {\n dbg.location(816,9);\n match(input,105,FOLLOW_105_in_unaryExpression4918); if (state.failed) return ;\n dbg.location(816,13);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4920);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:817:9: '-' unaryExpression\n {\n dbg.location(817,9);\n match(input,106,FOLLOW_106_in_unaryExpression4930); if (state.failed) return ;\n dbg.location(817,13);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4932);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:818:9: '++' unaryExpression\n {\n dbg.location(818,9);\n match(input,109,FOLLOW_109_in_unaryExpression4942); if (state.failed) return ;\n dbg.location(818,14);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4944);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:819:9: '--' unaryExpression\n {\n dbg.location(819,9);\n match(input,110,FOLLOW_110_in_unaryExpression4954); if (state.failed) return ;\n dbg.location(819,14);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4956);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:820:9: unaryExpressionNotPlusMinus\n {\n dbg.location(820,9);\n pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression4966);\n unaryExpressionNotPlusMinus();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 121, unaryExpression_StartIndex); }\n }\n dbg.location(821, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"unaryExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final void rule__OpAdd__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1953:1: ( ( '+' ) | ( '-' ) )\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0==23) ) {\n alt8=1;\n }\n else if ( (LA8_0==24) ) {\n alt8=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 8, 0, input);\n\n throw nvae;\n }\n switch (alt8) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1954:1: ( '+' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1954:1: ( '+' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1955:1: '+'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \n }\n match(input,23,FOLLOW_23_in_rule__OpAdd__Alternatives4123); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1962:6: ( '-' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1962:6: ( '-' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1963:1: '-'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \n }\n match(input,24,FOLLOW_24_in_rule__OpAdd__Alternatives4143); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "Expression unaryExpressionNotPlusMinus() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tif (isKind(OP_EXCLAMATION)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first,op,e);\r\n\t\t} else \t{\r\n\t\t\treturn primary(); //errors will be reported by primary()\r\n\t\t}\r\n\t}", "public final void mPLUS() throws RecognitionException {\r\n try {\r\n int _type = PLUS;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:279:6: ( '+' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:279:8: '+'\r\n {\r\n match('+'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public final void additionExp() throws RecognitionException {\n\t\ttry {\n\t\t\t// Exp.g:23:5: ( multiplyExp ( '+' multiplyExp | '-' multiplyExp )* )\n\t\t\t// Exp.g:23:10: multiplyExp ( '+' multiplyExp | '-' multiplyExp )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multiplyExp_in_additionExp60);\n\t\t\tmultiplyExp();\n\t\t\tstate._fsp--;\n\n\t\t\t// Exp.g:24:10: ( '+' multiplyExp | '-' multiplyExp )*\n\t\t\tloop1:\n\t\t\twhile (true) {\n\t\t\t\tint alt1=3;\n\t\t\t\tint LA1_0 = input.LA(1);\n\t\t\t\tif ( (LA1_0==9) ) {\n\t\t\t\t\talt1=1;\n\t\t\t\t}\n\t\t\t\telse if ( (LA1_0==10) ) {\n\t\t\t\t\talt1=2;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt1) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// Exp.g:24:12: '+' multiplyExp\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,9,FOLLOW_9_in_additionExp73); \n\t\t\t\t\tpushFollow(FOLLOW_multiplyExp_in_additionExp75);\n\t\t\t\t\tmultiplyExp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// Exp.g:25:12: '-' multiplyExp\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,10,FOLLOW_10_in_additionExp88); \n\t\t\t\t\tpushFollow(FOLLOW_multiplyExp_in_additionExp90);\n\t\t\t\t\tmultiplyExp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public final void rule__OpAdd__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2486:1: ( ( '+' ) | ( '-' ) )\r\n int alt12=2;\r\n int LA12_0 = input.LA(1);\r\n\r\n if ( (LA12_0==30) ) {\r\n alt12=1;\r\n }\r\n else if ( (LA12_0==31) ) {\r\n alt12=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 12, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt12) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2487:1: ( '+' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2487:1: ( '+' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2488:1: '+'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \r\n }\r\n match(input,30,FOLLOW_30_in_rule__OpAdd__Alternatives5294); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2495:6: ( '-' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2495:6: ( '-' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2496:1: '-'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \r\n }\r\n match(input,31,FOLLOW_31_in_rule__OpAdd__Alternatives5314); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void mPLUS() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = PLUS;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:434:5: ( '+' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:434:16: '+'\n\t\t\t{\n\t\t\tmatch('+'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public static UnaryExpression increment(Expression expression) { throw Extensions.todo(); }", "public final void mPLUS() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = PLUS;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// src/VSLLexer.g:42:11: ( '+' )\n\t\t\t// src/VSLLexer.g:42:13: '+'\n\t\t\t{\n\t\t\tmatch('+'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public <V extends Number> FluentExp<V> plus (SQLExpression<V> expr)\n {\n return new Add<V>(this, expr);\n }", "public Arginfo visit(PlusExpression n, Arginfo argu) {\n\t \t Arginfo _ret=null;\n\t int num=labelctr++;\n\t System.out.println(\"BEGIN\\n NOOP\\nRETURN PLUS \");\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t \n\t System.out.println(\"\\nEND\\n\");\n\t return _ret;\n }", "public static UnaryExpression unaryPlus(Expression expression, Method method) {\n return makeUnary(ExpressionType.UnaryPlus, expression, expression.getType(), method);\n }", "public final void mPLUS() throws RecognitionException {\n try {\n int _type = PLUS;\n // /Users/benjamincoe/HackWars/C.g:209:12: ( '+' )\n // /Users/benjamincoe/HackWars/C.g:209:14: '+'\n {\n match('+'); \n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "public final EObject ruleAdditiveExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_MultiplicativeExpression_0 = null;\r\n\r\n EObject lv_operator_2_1 = null;\r\n\r\n EObject lv_operator_2_2 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2799:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2800:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2800:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2801:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6015);\r\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_MultiplicativeExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:1: ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\r\n loop38:\r\n do {\r\n int alt38=2;\r\n int LA38_0 = input.LA(1);\r\n\r\n if ( ((LA38_0>=64 && LA38_0<=65)) ) {\r\n alt38=1;\r\n }\r\n\r\n\r\n switch (alt38) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:2: () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2810:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2815:2: ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2816:1: ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2816:1: ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2817:1: (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2817:1: (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator )\r\n \t int alt37=2;\r\n \t int LA37_0 = input.LA(1);\r\n\r\n \t if ( (LA37_0==65) ) {\r\n \t alt37=1;\r\n \t }\r\n \t else if ( (LA37_0==64) ) {\r\n \t alt37=2;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 37, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n \t switch (alt37) {\r\n \t case 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2818:3: lv_operator_2_1= ruleSubstractionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOperatorSubstractionOperatorParserRuleCall_1_1_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleSubstractionOperator_in_ruleAdditiveExpression6047);\r\n \t lv_operator_2_1=ruleSubstractionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_1, \r\n \t \t\t\"SubstractionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2833:8: lv_operator_2_2= ruleAdditionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOperatorAdditionOperatorParserRuleCall_1_1_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAdditionOperator_in_ruleAdditiveExpression6066);\r\n \t lv_operator_2_2=ruleAdditionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_2, \r\n \t \t\t\"AdditionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2851:2: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2852:1: (lv_right_3_0= ruleMultiplicativeExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2852:1: (lv_right_3_0= ruleMultiplicativeExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2853:3: lv_right_3_0= ruleMultiplicativeExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6090);\r\n \t lv_right_3_0=ruleMultiplicativeExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"MultiplicativeExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop38;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public static BinaryExpression add(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void rule__PredicateAddition__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4291:1: ( ( '+' ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4292:1: ( '+' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4292:1: ( '+' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4293:1: '+'\n {\n before(grammarAccess.getPredicateAdditionAccess().getPlusSignKeyword_1_1()); \n match(input,30,FOLLOW_30_in_rule__PredicateAddition__Group_1__1__Impl8442); \n after(grammarAccess.getPredicateAdditionAccess().getPlusSignKeyword_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Object visitAdditiveExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"+\")) {\n result = (Long) a + (Long) b;\n }\n else if (op.equals(\"-\")) {\n result = (Long) a - (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public SymbolicElement<T> getAddition();", "public AdditionOp(Expression left, Expression right, String id){\n super(left, \"+\", right, id);\n this.setType(ExpType.ADDITION);\n }", "public static NodeValue unaryPlus(NodeValue nv) {\n NumericType opType = classifyNumeric(\"unaryPlus\", nv) ;\n return nv ;\n }", "public Object visitUnaryPlusExpression(GNode n) {\n nonboolean = true;\n \n return dispatch(n.getGeneric(0));\n }", "public String visit(PlusExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t String e0 = n.f0.accept(this, argu);\n\t String e1 = n.f2.accept(this, argu);\n\t \n\t if (e0.equals(\"int\") && e1.equals(\"int\"))\n\t {\n\t \t_ret = \"int\";\n\t }\n\t return _ret;\n\t}", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public MvtPlus() {\r\n\t\tsuper('+');\r\n\t}", "public MType visit(PlusExpression n, MType argu) {\n \tMType _ret = new MInteger();\n \tn.f0.accept(this, argu);\n \tn.f2.accept(this, argu);\n \treturn _ret;\n }", "public Addition(int precedence){\n super(\"+\", precedence);\n }", "Expression unaryExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tif (isKind(OP_PLUS)) { //throw away the plus here\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first, op, e);\r\n\t\t}\r\n\t\telse if (isKind(OP_MINUS)){\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first, op, e);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn unaryExpressionNotPlusMinus();\r\n\t\t}\r\n\t}", "public String visit(PlusExpression n, String s) {\n n.f0.accept(this, null);\n n.f2.accept(this, null);\n return null;\n }", "public String visit(PlusExpression n, LLVMRedux argu) throws Exception {\n\n String arg1 = n.f0.accept(this, argu);\n String arg2 = n.f2.accept(this, argu);\n u.println(u.getReg()+\" = add i32 \"+arg1+\", \"+arg2);\n return u.getLastReg();\n }", "@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}", "public Snippet visit(PlusExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t\t Snippet f0 = n.identifier.accept(this, argu);\n\t\t n.nodeToken.accept(this, argu);\n\t\t Snippet f2 = n.identifier1.accept(this, argu);\n\t\t _ret.returnTemp = f0.returnTemp+\" + \"+f2.returnTemp;\n\t return _ret;\n\t }", "public final EObject ruleUnaryExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n EObject this_UnaryExpression_1 = null;\n\n EObject this_UnaryExpression_3 = null;\n\n EObject this_UnaryExpressionNotPlusMinus_4 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:841:28: ( ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:1: ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:1: ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus )\n int alt13=3;\n switch ( input.LA(1) ) {\n case 33:\n {\n alt13=1;\n }\n break;\n case 34:\n {\n alt13=2;\n }\n break;\n case RULE_INT:\n case RULE_LONG:\n case RULE_FLOAT:\n case RULE_DOUBLE:\n case RULE_CHAR:\n case RULE_STRING:\n case RULE_ID:\n case 38:\n case 39:\n case 41:\n case 42:\n case 43:\n case 44:\n case 45:\n case 48:\n case 49:\n case 50:\n case 51:\n {\n alt13=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 0, input);\n\n throw nvae;\n }\n\n switch (alt13) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:2: (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:2: (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:4: otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression\n {\n otherlv_0=(Token)match(input,33,FOLLOW_33_in_ruleUnaryExpression1951); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getUnaryExpressionAccess().getPlusSignKeyword_0_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionParserRuleCall_0_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpression1973);\n this_UnaryExpression_1=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_1; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:6: (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:6: (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:8: otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression\n {\n otherlv_2=(Token)match(input,34,FOLLOW_34_in_ruleUnaryExpression1992); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getUnaryExpressionAccess().getHyphenMinusKeyword_1_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionParserRuleCall_1_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpression2014);\n this_UnaryExpression_3=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_3; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:871:5: this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionNotPlusMinusParserRuleCall_2()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpressionNotPlusMinus_in_ruleUnaryExpression2042);\n this_UnaryExpressionNotPlusMinus_4=ruleUnaryExpressionNotPlusMinus();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpressionNotPlusMinus_4; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "BaseNumber add(BaseNumber operand);", "@Override\r\n\tpublic int plus(int left, int right) {\n\t\treturn left + right; \r\n\t\t//return 0;\r\n\t}", "public final PythonParser.arith_op_return arith_op() throws RecognitionException {\n PythonParser.arith_op_return retval = new PythonParser.arith_op_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token PLUS206=null;\n Token MINUS207=null;\n\n PythonTree PLUS206_tree=null;\n PythonTree MINUS207_tree=null;\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:1238:5: ( PLUS | MINUS )\n int alt99=2;\n int LA99_0 = input.LA(1);\n\n if ( (LA99_0==PLUS) ) {\n alt99=1;\n }\n else if ( (LA99_0==MINUS) ) {\n alt99=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 99, 0, input);\n\n throw nvae;\n }\n switch (alt99) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1238:7: PLUS\n {\n root_0 = (PythonTree)adaptor.nil();\n\n PLUS206=(Token)match(input,PLUS,FOLLOW_PLUS_in_arith_op5409); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n PLUS206_tree = (PythonTree)adaptor.create(PLUS206);\n adaptor.addChild(root_0, PLUS206_tree);\n }\n if ( state.backtracking==0 ) {\n retval.op = operatorType.Add;\n }\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1240:7: MINUS\n {\n root_0 = (PythonTree)adaptor.nil();\n\n MINUS207=(Token)match(input,MINUS,FOLLOW_MINUS_in_arith_op5427); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n MINUS207_tree = (PythonTree)adaptor.create(MINUS207);\n adaptor.addChild(root_0, MINUS207_tree);\n }\n if ( state.backtracking==0 ) {\n retval.op = operatorType.Sub;\n }\n\n }\n break;\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 void buttonPlus(View v) {\n\n /* Add the character to the expression and update screen. */\n expression += \"+\";\n\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n }", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "Expression getExp();", "@Override\n\tpublic Void visit(Plus plus) {\n\t\tprintIndent(plus.token.getText());\n\t\tindent++;\n\t\tplus.left.accept(this);\n\t\tplus.right.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "Expression relExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = addExpression();\r\n\t\twhile(isKind(OP_LT,OP_GT,OP_LE,OP_GE)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = addExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final CQLParser.arithmeticExpression_return arithmeticExpression() throws RecognitionException {\n CQLParser.arithmeticExpression_return retval = new CQLParser.arithmeticExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n CQLParser.additiveExpression_return additiveExpression95 = null;\n\n\n\n errorMessageStack.push(\"Arithmetic expression\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:396:2: ( additiveExpression )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:396:4: additiveExpression\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_additiveExpression_in_arithmeticExpression1850);\n additiveExpression95=additiveExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, additiveExpression95.getTree());\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop();\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "@Override\r\n\tpublic Expression simplify() {\n\t\tSystem.out.println(\"减法化简\");\r\n\t\tExpression newLeft = left.simplify();\r\n Expression newRight = right.simplify();\r\n ConstantExpression leftConst =null;\r\n ConstantExpression rightConst =null;\r\n NegateExpression rightNegate =null;\r\n try {\r\n \tleftConst =(ConstantExpression) newLeft;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightConst =(ConstantExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightNegate =(NegateExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\t\r\n\t\tif ( leftConst != null && rightConst != null )\r\n {\r\n // two constants; just evaluate it;\r\n return new ConstantExpression( leftConst.getValue()- rightConst.getValue());\r\n }\r\n else if ( leftConst != null && leftConst.getValue()== 0 )\r\n {\r\n // 0 - y; return -y;\r\n if ( rightNegate != null )\r\n {\r\n // y = -u (--u); return u;\r\n return rightNegate.child;\r\n }\r\n return new NegateExpression( newRight );\r\n }\r\n else if ( rightConst != null && rightConst.getValue()== 0 )\r\n {\r\n // x - 0; return x;\r\n return newLeft;\r\n }\r\n else if ( rightNegate != null )\r\n {\r\n // x - -y; return x + y;\r\n return new AddExpression( newLeft, rightNegate.child );\r\n }\r\n\t\tif(newLeft.toString().equals(newRight.toString())){\r\n\t\t\treturn new ConstantExpression(0);\r\n\t\t}\r\n // x - y; no simplification\r\n return new SubExpression( newLeft, newRight );\r\n\t}", "Expression powerExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = unaryExpression();\r\n\t\tif (isKind(OP_POWER)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\treturn new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final void rule__UpdateAddition__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7470:1: ( ( '+' ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7471:1: ( '+' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7471:1: ( '+' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7472:1: '+'\n {\n before(grammarAccess.getUpdateAdditionAccess().getPlusSignKeyword_1_1()); \n match(input,30,FOLLOW_30_in_rule__UpdateAddition__Group_1__1__Impl14655); \n after(grammarAccess.getUpdateAdditionAccess().getPlusSignKeyword_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic void visit(Addition arg0) {\n\n\t}", "public final void mRULE_PLUS() throws RecognitionException {\n try {\n int _type = RULE_PLUS;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12805:11: ( '+' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12805:13: '+'\n {\n match('+'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "protected void sequence_Addition(ISerializationContext context, Minus semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.MINUS__LEFT) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.MINUS__LEFT));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.MINUS__RIGHT) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.MINUS__RIGHT));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(), semanticObject.getLeft());\n\t\tfeeder.accept(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0(), semanticObject.getRight());\n\t\tfeeder.finish();\n\t}", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "public final void rule__OpAdd__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:2748:1: ( ( '+' ) | ( '-' ) )\r\n int alt14=2;\r\n int LA14_0 = input.LA(1);\r\n\r\n if ( (LA14_0==34) ) {\r\n alt14=1;\r\n }\r\n else if ( (LA14_0==35) ) {\r\n alt14=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 14, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt14) {\r\n case 1 :\r\n // InternalDroneScript.g:2749:2: ( '+' )\r\n {\r\n // InternalDroneScript.g:2749:2: ( '+' )\r\n // InternalDroneScript.g:2750:3: '+'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \r\n }\r\n match(input,34,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:2755:2: ( '-' )\r\n {\r\n // InternalDroneScript.g:2755:2: ( '-' )\r\n // InternalDroneScript.g:2756:3: '-'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \r\n }\r\n match(input,35,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "T visit(Addition node);", "private Expr unary() {\n if(match(BANG, MINUS)) { // If this thing can be accurately considered a unary...\n Token operator = previous();\n Expr right = unary();\n return new Expr.Unary(operator, right);\n }\n\n return call(); // Otherwise, pass it up the chain of precedence\n }", "ExpOperand createExpOperand();", "public T casePlus(Plus object)\n {\n return null;\n }", "@Override\n public Expression asExpression(TokenValue<?> token, Deque<Value<Expression>> next) {\n Additive op = token.getValue(); // + | -\n // + is always followed by an argument\n Expression arg = next.pollFirst().getTarget(); // b argument\n Term<Additive> term = new Term<>(op, arg);\n return term;\n }", "public Expression commutativeExp() {\r\n return this;\r\n }", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public BigInt plus(BigInt rhs) throws BigIntException {\n if (null == rhs) {\n throw new BigIntException(\"null parameter\");\n }\n\n if (isPositive && !rhs.isPositive) {\n // x+(-y)=x-y\n return minus(new BigInt(rhs.number, true));\n } else if (!isPositive && !rhs.isPositive) {\n // -x-y=-(x+y)\n BigInt num1 = new BigInt(number, true);\n BigInt num2 = new BigInt(rhs.number, true);\n\n BigInt result = num1.plus(num2);\n result.swapSign();\n\n return result;\n } else if (!isPositive && rhs.isPositive) {\n // -x+y=y-x\n return rhs.minus(new BigInt(number, true));\n }\n\n // x+y\n int length = Math.max(number.size(), rhs.number.size());\n\n int digitSum = 0;\n ArrayList<Integer> sum = new ArrayList<Integer>();\n for (int i = 0; i < length; ++i) {\n // Calculate the digits sum including the carry from the last sum\n digitSum += getDigit(i) + rhs.getDigit(i);\n\n sum.add(digitSum % 10);\n digitSum = Math.floorDiv(digitSum, 10);\n }\n\n // We got a carry at the end so we need to add another '1' digit\n if (0 != digitSum) {\n sum.add(1);\n }\n\n return new BigInt(sum, true);\n }", "public final void eval() throws RecognitionException {\n\t\ttry {\n\t\t\t// Exp.g:18:5: ( additionExp )\n\t\t\t// Exp.g:18:10: additionExp\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_additionExp_in_eval38);\n\t\t\tadditionExp();\n\t\t\tstate._fsp--;\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public static BinaryExpression add(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public final void rule__XAdditiveExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17607:1: ( ( ( ruleOpAdd ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17608:1: ( ( ruleOpAdd ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17608:1: ( ( ruleOpAdd ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17609:1: ( ruleOpAdd )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17610:1: ( ruleOpAdd )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17611:1: ruleOpAdd\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementOpAddParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleOpAdd_in_rule__XAdditiveExpression__FeatureAssignment_1_0_0_135558);\r\n ruleOpAdd();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementOpAddParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XAdditiveExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12362:1: ( ( ( ruleOpAdd ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12363:1: ( ( ruleOpAdd ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12363:1: ( ( ruleOpAdd ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12364:1: ( ruleOpAdd )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12365:1: ( ruleOpAdd )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12366:1: ruleOpAdd\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementOpAddParserRuleCall_1_0_0_1_0_1()); \n }\n pushFollow(FOLLOW_ruleOpAdd_in_rule__XAdditiveExpression__FeatureAssignment_1_0_0_124806);\n ruleOpAdd();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementOpAddParserRuleCall_1_0_0_1_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAdditiveExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final Enumerator ruleAdditiveOperator() throws RecognitionException {\n Enumerator current = null;\n\n setCurrentLookahead(); resetLookahead(); \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6799:6: ( ( ( '+' ) | ( '-' ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6800:1: ( ( '+' ) | ( '-' ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6800:1: ( ( '+' ) | ( '-' ) )\n int alt100=2;\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==70) ) {\n alt100=1;\n }\n else if ( (LA100_0==61) ) {\n alt100=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"6800:1: ( ( '+' ) | ( '-' ) )\", 100, 0, input);\n\n throw nvae;\n }\n switch (alt100) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6800:2: ( '+' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6800:2: ( '+' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6800:4: '+'\n {\n match(input,70,FOLLOW_70_in_ruleAdditiveOperator11918); \n\n current = grammarAccess.getAdditiveOperatorAccess().getAdditionEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n createLeafNode(grammarAccess.getAdditiveOperatorAccess().getAdditionEnumLiteralDeclaration_0(), null); \n \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6806:6: ( '-' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6806:6: ( '-' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6806:8: '-'\n {\n match(input,61,FOLLOW_61_in_ruleAdditiveOperator11933); \n\n current = grammarAccess.getAdditiveOperatorAccess().getSubtractionEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n createLeafNode(grammarAccess.getAdditiveOperatorAccess().getSubtractionEnumLiteralDeclaration_1(), null); \n \n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "private double processExpression() throws ParsingException {\n double result = processTerm();\n\n while (true) {\n if (tryCaptureChar('+')) {\n result += processTerm();\n } else if (tryCaptureChar('-')) {\n result -= processTerm();\n } else {\n break;\n }\n }\n return result;\n }", "public final EObject ruleRelationalExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_operator_2_1=null;\n Token lv_operator_2_2=null;\n Token lv_operator_2_3=null;\n Token lv_operator_2_4=null;\n Token lv_operator_2_5=null;\n Token lv_operator_2_6=null;\n EObject this_Addition_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3972:28: ( (this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3973:1: (this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3973:1: (this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3974:5: this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )*\n {\n \n newCompositeNode(grammarAccess.getRelationalExpressionAccess().getAdditionParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleAddition_in_ruleRelationalExpression8921);\n this_Addition_0=ruleAddition();\n\n state._fsp--;\n\n \n current = this_Addition_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3982:1: ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )*\n loop37:\n do {\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( ((LA37_0>=60 && LA37_0<=65)) ) {\n alt37=1;\n }\n\n\n switch (alt37) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3982:2: () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3982:2: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3983:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getRelationalExpressionAccess().getBooleanOperationLeftAction_1_0(),\n \t current);\n \t \n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3988:2: ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3989:1: ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3989:1: ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3990:1: (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3990:1: (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' )\n \t int alt36=6;\n \t switch ( input.LA(1) ) {\n \t case 60:\n \t {\n \t alt36=1;\n \t }\n \t break;\n \t case 61:\n \t {\n \t alt36=2;\n \t }\n \t break;\n \t case 62:\n \t {\n \t alt36=3;\n \t }\n \t break;\n \t case 63:\n \t {\n \t alt36=4;\n \t }\n \t break;\n \t case 64:\n \t {\n \t alt36=5;\n \t }\n \t break;\n \t case 65:\n \t {\n \t alt36=6;\n \t }\n \t break;\n \t default:\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 36, 0, input);\n\n \t throw nvae;\n \t }\n\n \t switch (alt36) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3991:3: lv_operator_2_1= '=='\n \t {\n \t lv_operator_2_1=(Token)match(input,60,FOLLOW_60_in_ruleRelationalExpression8950); \n\n \t newLeafNode(lv_operator_2_1, grammarAccess.getRelationalExpressionAccess().getOperatorEqualsSignEqualsSignKeyword_1_1_0_0());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_1, null);\n \t \t \n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4003:8: lv_operator_2_2= '!='\n \t {\n \t lv_operator_2_2=(Token)match(input,61,FOLLOW_61_in_ruleRelationalExpression8979); \n\n \t newLeafNode(lv_operator_2_2, grammarAccess.getRelationalExpressionAccess().getOperatorExclamationMarkEqualsSignKeyword_1_1_0_1());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_2, null);\n \t \t \n\n \t }\n \t break;\n \t case 3 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4015:8: lv_operator_2_3= '>='\n \t {\n \t lv_operator_2_3=(Token)match(input,62,FOLLOW_62_in_ruleRelationalExpression9008); \n\n \t newLeafNode(lv_operator_2_3, grammarAccess.getRelationalExpressionAccess().getOperatorGreaterThanSignEqualsSignKeyword_1_1_0_2());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_3, null);\n \t \t \n\n \t }\n \t break;\n \t case 4 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4027:8: lv_operator_2_4= '<='\n \t {\n \t lv_operator_2_4=(Token)match(input,63,FOLLOW_63_in_ruleRelationalExpression9037); \n\n \t newLeafNode(lv_operator_2_4, grammarAccess.getRelationalExpressionAccess().getOperatorLessThanSignEqualsSignKeyword_1_1_0_3());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_4, null);\n \t \t \n\n \t }\n \t break;\n \t case 5 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4039:8: lv_operator_2_5= '>'\n \t {\n \t lv_operator_2_5=(Token)match(input,64,FOLLOW_64_in_ruleRelationalExpression9066); \n\n \t newLeafNode(lv_operator_2_5, grammarAccess.getRelationalExpressionAccess().getOperatorGreaterThanSignKeyword_1_1_0_4());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_5, null);\n \t \t \n\n \t }\n \t break;\n \t case 6 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4051:8: lv_operator_2_6= '<'\n \t {\n \t lv_operator_2_6=(Token)match(input,65,FOLLOW_65_in_ruleRelationalExpression9095); \n\n \t newLeafNode(lv_operator_2_6, grammarAccess.getRelationalExpressionAccess().getOperatorLessThanSignKeyword_1_1_0_5());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_6, null);\n \t \t \n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4066:2: ( (lv_right_3_0= ruleAddition ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4067:1: (lv_right_3_0= ruleAddition )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4067:1: (lv_right_3_0= ruleAddition )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4068:3: lv_right_3_0= ruleAddition\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getRelationalExpressionAccess().getRightAdditionParserRuleCall_1_2_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleAddition_in_ruleRelationalExpression9132);\n \t lv_right_3_0=ruleAddition();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"Addition\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop37;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void rule__AddExp__OpAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10339:1: ( ( ( rule__AddExp__OpAlternatives_1_1_0 ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10340:1: ( ( rule__AddExp__OpAlternatives_1_1_0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10340:1: ( ( rule__AddExp__OpAlternatives_1_1_0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10341:1: ( rule__AddExp__OpAlternatives_1_1_0 )\n {\n before(grammarAccess.getAddExpAccess().getOpAlternatives_1_1_0()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10342:1: ( rule__AddExp__OpAlternatives_1_1_0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10342:2: rule__AddExp__OpAlternatives_1_1_0\n {\n pushFollow(FOLLOW_rule__AddExp__OpAlternatives_1_1_0_in_rule__AddExp__OpAssignment_1_120798);\n rule__AddExp__OpAlternatives_1_1_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAddExpAccess().getOpAlternatives_1_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "Expr expr();", "LogicExpression getLeftExp();", "@Test\n\t\tpublic void testExpression() throws LexicalException, SyntaxException {\n\t\t\tString input = \"x + 2\";\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\tExpression e = parser.expression(); //call expression here instead of parse\n\t\t\tshow(e);\t\n\t\t\tassertEquals(ExpressionBinary.class, e.getClass());\n\t\t\tExpressionBinary b = (ExpressionBinary)e;\n\t\t\tassertEquals(ExpressionIdentifier.class, b.leftExpression.getClass());//\n\t\t\tExpressionIdentifier left = (ExpressionIdentifier)b.leftExpression;\n\t\t\tassertEquals(\"x\", left.name);\n\t\t\tassertEquals(ExpressionIntegerLiteral.class, b.rightExpression.getClass());\n\t\t\tExpressionIntegerLiteral right = (ExpressionIntegerLiteral)b.rightExpression;\n\t\t\tassertEquals(2, right.value);\n\t\t\tassertEquals(OP_PLUS, b.op);\n\t\t}", "NumericExpression createNumericExpression();", "@Override\n public BinaryFunc get() { return new AbsPlus(); }", "public void recursion(final String expression, int countOperation) {\n int numberOfOperations=0;\n String operationString=expression.replace(\" \",\"\");\n for (int i=0; i<operationString.length()-1; i++)\n {\n if(expression.substring(i,i+1).matches(\"\\\\+\")\n ||operationString.substring(i,i+1).matches(\"\\\\-\")\n ||operationString.substring(i,i+1).matches(\"\\\\*\")\n ||operationString.substring(i,i+1).matches(\"/\")\n ||operationString.substring(i,i+1).matches(\"\\\\^\")\n ||operationString.substring(i,i+1).matches(\"i\")\n ||operationString.substring(i,i+1).matches(\"a\")\n ||operationString.substring(i,i+1).matches(\"o\"))\n {\n numberOfOperations++;\n }\n }\n String result;\n int count=0;\n if (operationString.substring(0,1).equals(\"(\"))\n {\n int start=1;\n int end=0;\n count=1;\n while (count<operationString.length() && start!=end)\n {\n String temp=operationString.substring(count,count+1);\n if (temp.equals(\"(\"))\n {\n start++;\n }\n if (temp.equals(\")\"))\n {\n end++;\n }\n count++;\n }\n }\n if (count!=operationString.length() && !operationString.substring(0,1).equals(\"(\"))\n {\n //разбиваем выражения на подвыражения\n List<String> symbols=new ArrayList<>();\n for (int i=0; i<operationString.length()-1;)\n {\n String temp=operationString.substring(i,i+1);\n if (\"+-*/^\".contains(temp))\n {\n symbols.add(temp);\n i++;\n }\n if(temp.equals(\"s\") || temp.equals(\"t\") || temp.equals(\"c\"))\n {\n symbols.add(operationString.substring(i,i+3));\n i=i+3;\n }\n if (temp.matches(\"\\\\d\"))\n {\n int k=i+1;\n StringBuilder sb=new StringBuilder(temp);\n while (k<operationString.length()&&(operationString.substring(k,k+1).matches(\"\\\\d\")||operationString.substring(k,k+1).matches(\"\\\\.\")))\n {\n sb.append(operationString.substring(k,k+1));\n k++;\n }\n i=k;\n symbols.add(new String(sb));\n }\n if (temp.equals(\"(\"))\n {\n int start=1;\n int end=0;\n int k=i+1;\n while(k<operationString.length() && start!=end)\n {\n if (operationString.substring(k,k+1).equals(\"(\"))\n {\n start++;\n }\n if(operationString.substring(k,k+1).equals(\")\"))\n {\n end++;\n }\n k++;\n }\n PrintStream oldOut=System.out;\n String recTemp;\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n PrintStream ps=new PrintStream(baos);\n System.setOut(ps);\n recursion(operationString.substring(i,k),++countOperation);\n recTemp=baos.toString();\n System.setOut(oldOut);\n symbols.add(recTemp);\n i=k;\n }\n }\n\n for (int i=0; i<symbols.size(); i++)\n {\n if (symbols.get(i).startsWith(\"s\"))\n {\n symbols.set(i,\"\"+Math.sin(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n if (symbols.get(i).startsWith(\"t\"))\n {\n symbols.set(i,\"\"+Math.tan(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n if (symbols.get(i).startsWith(\"c\"))\n {\n symbols.set(i,\"\"+Math.cos(Double.parseDouble(symbols.remove(i+1))*Math.PI/180));\n }\n }\n for (int i=0; i<symbols.size();)\n {\n if (symbols.get(i).equals(\"^\"))\n {\n symbols.set(i-1, Math.pow(Double.parseDouble(symbols.get(i - 1)), Double.parseDouble(symbols.get(i + 1))) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n i++;\n }\n for (int i=0; i<symbols.size();)\n {\n if (symbols.get(i).equals(\"/\"))\n {\n symbols.set(i-1, Double.parseDouble(symbols.get(i - 1))/Double.parseDouble(symbols.get(i + 1)) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n if (symbols.get(i).equals(\"*\"))\n {\n symbols.set(i-1, Double.parseDouble(symbols.get(i - 1))*Double.parseDouble(symbols.get(i + 1)) + \"\");\n symbols.remove(i);\n symbols.remove(i);\n i--;\n }\n i++;\n }\n for (int i=0; i<symbols.size(); i++)\n {\n if (symbols.get(i).equals(\"-\"))\n {\n symbols.set(i,\"-\"+symbols.remove(i+1));\n }\n if (symbols.get(i).equals(\"+\"))\n {\n symbols.remove(i);\n i--;\n }\n }\n double answer=0;\n for (String s:symbols)\n {\n answer=answer+Double.parseDouble(s);\n }\n result=answer+\"\";\n countOperation--;\n }\n else\n {\n //отбрасываем начальные и конечные скобки\n operationString=operationString.substring(1,operationString.length()-1);\n PrintStream oldOut=System.out;\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n PrintStream ps=new PrintStream(baos);\n System.setOut(ps);\n recursion(operationString,++countOperation);\n result=baos.toString();\n System.setOut(oldOut);\n }\n if (countOperation==0)\n {\n System.out.println(result+\" \"+numberOfOperations);\n }\n else\n {\n System.out.println(result);\n }\n }" ]
[ "0.722545", "0.7197284", "0.6917047", "0.6663253", "0.66464436", "0.6468331", "0.63680005", "0.6266668", "0.6239872", "0.62296164", "0.6219779", "0.6202267", "0.6181771", "0.61606663", "0.61606663", "0.61606663", "0.6157912", "0.615285", "0.6150441", "0.612834", "0.6122622", "0.6106092", "0.60704035", "0.60695606", "0.6059799", "0.6051473", "0.6049331", "0.6048249", "0.60451895", "0.6019754", "0.6005251", "0.59896106", "0.5982403", "0.5957781", "0.59567356", "0.593946", "0.59225535", "0.5904012", "0.5887581", "0.58607125", "0.5851531", "0.5841563", "0.58284926", "0.57899934", "0.57787347", "0.5761884", "0.57597643", "0.57513064", "0.57423156", "0.5738591", "0.57304925", "0.57301736", "0.5729663", "0.57256794", "0.5716795", "0.5713233", "0.57062626", "0.5700067", "0.5695799", "0.5664112", "0.5661517", "0.56567585", "0.5656746", "0.5649409", "0.56479096", "0.56394774", "0.56347275", "0.56191516", "0.5614758", "0.5614647", "0.55942297", "0.55859554", "0.55821794", "0.55811334", "0.5574362", "0.55662584", "0.5562605", "0.55616397", "0.55613244", "0.5560457", "0.5557223", "0.5546762", "0.55451703", "0.55433947", "0.5510776", "0.54970264", "0.5487335", "0.54860866", "0.5464371", "0.5464113", "0.5441603", "0.5440882", "0.5439005", "0.5434238", "0.54274714", "0.5427242", "0.54185104", "0.5418065", "0.5413577", "0.5401801" ]
0.61845106
12
Contexts: Truc returns Autre Autre returns Autre Constraint: bob=Reel
protected void sequence_Autre(ISerializationContext context, Autre semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.AUTRE__BOB) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.AUTRE__BOB)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getAutreAccess().getBobReelParserRuleCall_3_0(), semanticObject.getBob()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constraint createConstraint();", "Constraint createConstraint();", "public interface ConstraintContext {\n Optional<TraversalConstraint> getConstraint();\n}", "public interface CatalogActionConstraint extends DataContract, HasProperties, HasSentence {\n\n // create,update,delete,evaluate\n //public String getName(); = Handler\n //void setName(String h);\n\n String getSeed();\n void setSeed(String s);\n\n String getDescription();\n\n\n}", "@Override\n AbstractConstraints<X> reconcile(X context, Meta<X> other, Conjunction<X> cs) {\n return cs;\n }", "@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();", "public FormalGenConstraint getConstraint() {\n return constraint;\n }", "public IRecepteur quiEstAuDessus();", "public Constraint getConstraintFirstRep() {\n\t\tif (getConstraint().isEmpty()) {\n\t\t\treturn addConstraint();\n\t\t}\n\t\treturn getConstraint().get(0); \n\t}", "public interface UserDefinedConstraints extends EObject {\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_SingeltonSystem(SystemTimer system1, SystemTimer system2);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_SingeltonCurrentSem(Semester sem2, Semester sem1);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_NoTwoEnrollmentsWithSameID(Enrollment en1, Enrollment en2);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_NoTwoEntriesWithSameID(GradeFormular gf);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_onlyOneRecordForModuleOfferAndExam(Enrollment en);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _XNC_onlyOneCMOPerExam(Enrollment en);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_OnlyOneRegPerEnrollment(Record rec2, Record rec1);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t * \n\t * @model\n\t * @generated\n\t */\n\tvoid _NC_NoCompetingBookings(Room room);\n\t// <-- [user code injected with eMoflon]\n\n\t// [user code injected with eMoflon] -->\n}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter table\", false, \"Pg`v\", \"select\");\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBCheckConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "private static void verifEnt() {\r\n\t\tif (tCour != ENT)\r\n\t\t\tUtilLex.messErr(\"expression entiere attendue\");\r\n\t}", "private boolean constraintChecker(Norm norm1, Norm norm2) {\n\t\tif (norm1.getActivationConstraint() == null || norm1.getDeactivationConstraint() == null ||\n\t\t\tnorm2.getActivationConstraint() == null || norm2.getDeactivationConstraint() == null) {\n\t\t\t\n\t\t\tnorm1.setActivationConstraint(null);\n\t\t\tnorm2.setActivationConstraint(null);\n\t\t\tnorm1.setDeactivationConstraint(null);\n\t\t\tnorm2.setDeactivationConstraint(null);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tConstraintType na1 = norm1.getActivationConstraint().getConstraintType();\n\t\tConstraintType nd1 = norm1.getDeactivationConstraint().getConstraintType();\n\t\t\n\t\tConstraintType na2 = norm2.getActivationConstraint().getConstraintType();\n\t\tConstraintType nd2 = norm2.getDeactivationConstraint().getConstraintType();\n\t\t\n\t\t//it is necessary only 3 tests\n\t\tif (!na1.equals(nd1) || !na2.equals(nd2) || !na1.equals(na2)) {\n\t\t\tnorm1.setActivationConstraint(null);\n\t\t\tnorm2.setActivationConstraint(null);\n\t\t\tnorm1.setDeactivationConstraint(null);\n\t\t\tnorm2.setDeactivationConstraint(null);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// If the activation conditions are actions\n\t\tif (norm1.getActivationConstraint().getConstraintType().equals(ConstraintType.ACTIONTYPE)\n\t\t\t\t&& norm1.getActivationConstraint().getConstraintType().equals(ConstraintType.ACTIONTYPE)) {\n\n\t\t\t//todo...o tratamento vai ser realizado no futuro, caso necessário\n\t\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//\n\t\t//at this moment the constrainttype are both DATETYPE, so it is not necessary more comparisons\n\t\t//\n\t\t\n\t\tDateTime d1Begin = ((ConstraintDate) norm1.getActivationConstraint()).getDate();\n\t\tDateTime d1End = ((ConstraintDate) norm1.getDeactivationConstraint()).getDate();\n\t\tDateTime d2Begin = ((ConstraintDate) norm2.getActivationConstraint()).getDate();\n\t\tDateTime d2End = ((ConstraintDate) norm2.getDeactivationConstraint()).getDate();\n\t\t\n\t\tboolean r = this.compareDateIntervals(d1Begin, d1End, d2Begin, d2End);\n\t\treturn r;\n\t}", "@Override\n\tpublic void effetCase() {\n\t\t\n\t}", "protected abstract void applyPrinciple();", "public void reactivateEqConstraints() {\n\t\t// NOP\n\t}", "ConjuntoTDA claves();", "public TConstraintElements getTConstraintAccess() {\n\t\treturn pTConstraint;\n\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.RolLocal getF_fk_rol_2_acma();", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"%KPzc}nCj\\\"i,>gZj u\");\n String[] stringArray0 = new String[1];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"\\\"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, (StringBuilder) null, nameSpec0);\n assertNull(stringBuilder0);\n }", "public Constraint addConstraint() {\n\t\tConstraint newType = new Constraint();\n\t\tgetConstraint().add(newType);\n\t\treturn newType; \n\t}", "@Override\n\tpublic Clause getConstraints() {\n\t\treturn null;\n\t}", "ConstraintModelFactory getConstraintModelFactory();", "private void testAclConstraints007() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints007\");\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.LEAF_NODE, DmtConstants.PRINCIPAL_2, Acl.GET );\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.INTERIOR_NODE, DmtConstants.PRINCIPAL, Acl.REPLACE );\n\t\t\ttbc.setPermissions(new PermissionInfo(DmtPrincipalPermission.class.getName(),DmtConstants.PRINCIPAL,\"*\"));\n\t\t\tsession = tbc.getDmtAdmin().getSession(DmtConstants.PRINCIPAL,TestExecPluginActivator.ROOT,DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.LEAF_NODE,new org.osgi.service.dmt.Acl(\"Get=*\"));\n\t\t\t\n\t\t\tDefaultTestBundleControl.pass(\"If a principal has Replace access to a node, the principal is permitted to change the ACL of all its child nodes\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.LEAF_NODE);\n\t\t\ttbc.cleanAcl(TestExecPluginActivator.INTERIOR_NODE);\n\t\t\t\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n StringBuilder stringBuilder1 = stringBuilder0.append('8');\n SQLUtil.addRequiredCondition(\"Unknown constraint type: \", stringBuilder1);\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder1.toString());\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder0.toString());\n }", "public interface IRecepteur {\n\t\n\t\n\t/**\n\t * Methode permettant de recevoir un porcelet\n\t * @param p le porcelet \n\t */\n\tpublic void recevoir(IPorcelet p);\n\t\n\t/**\n\t * Methode permettant d'acceder au porcelet en dessous\n\t * @return le porcelet en dessous : Null si c'est une case, un porcelet sinon\n\t */\n\tpublic IRecepteur quiEstEnDessous();\n\t\n\t/** \n\t * Methode qui retourne la case sur laquelle se trouve le porcelet\n\t * renvoie null si le recepteur est une case\n\t **/\n\tpublic ICase retourneLaCase() ;\n\t\n\t/**\n\t * Methode permettant d'acceder au porcelet au dessus\n\t * @return le porcelet au dessus : Null si il n'y a personne, un porcelet sinon\n\t */\n\tpublic IRecepteur quiEstAuDessus();\n\t\n\t/** \n\t * Predicat pour tester si le porcelet occupe la case\n\t **/\n\tpublic boolean estSurLaCase(ICase c) ;\n\t\n\t/**\n\t * Methode utilisee uniquement pour les porcelets\n\t * @return le joueur proprietaire du porcelet\n\t */\n\tpublic IJoueur quiEstMonMaitre();\n\n}", "public IRecepteur quiEstEnDessous();", "boolean isRollbackOnConstraintViolation();", "private void testAclConstraints001() {\n\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints001\");\n\t\t\t\n new org.osgi.service.dmt.Acl(\"Add=test&Exec=test &Get=*\");\n\t\t\t\n DefaultTestBundleControl.failException(\"\",IllegalArgumentException.class);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tDefaultTestBundleControl.pass(\"White space between tokens of a Acl is not allowed.\");\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failExpectedOtherException(IllegalArgumentException.class, e);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n System.setCurrentTimeMillis(0L);\n DBCatalog dBCatalog0 = new DBCatalog(\"^rU-C!&\");\n DBSchema dBSchema0 = new DBSchema(\"getFloat(String)\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\" Y*-X>Nz.q@~K^o8Z]v\", dBSchema0);\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"getFloat(String)\", true, defaultDBTable0, \"getFloat(String)\");\n defaultDBTable0.getReferrers();\n dBCheckConstraint0.setDoc(\"rename(r@f\");\n StringBuilder stringBuilder0 = new StringBuilder((CharSequence) \"getFloat(String)\");\n DefaultDBTable defaultDBTable1 = new DefaultDBTable(\"d_Nj^xUc,jo(V.cG^9\", dBSchema0);\n dBCheckConstraint0.setDoc(\"^d8LPB5bQv<N6\");\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"rename(r@f\";\n dBCheckConstraint0.setName(\" NULL\");\n stringArray0[1] = \"rename(r@f\";\n stringArray0[2] = \" Y*-X>Nz.q@~K^o8Z]v\";\n stringArray0[3] = \" NULL\";\n stringArray0[4] = \"^rU-C!&\";\n stringArray0[5] = \"org.apache.derby.iapi.sql.execute.ExecutionFactory\";\n stringArray0[6] = \"^rU-C!&\";\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable1, \" NULL\", true, stringArray0);\n String string0 = SQLUtil.constraintName(dBCheckConstraint0);\n assertEquals(\"CONSTRAINT \\\" NULL\\\" \", string0);\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0);\n assertEquals(\"\", stringBuilder0.toString());\n }", "TypeAssociation getConcerneTraitementObjectifTraitementObjectif();", "com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();", "public void addTaxManagerToPR(ApprovalRequest ar, Approvable lic) {\r\n\t\tLog.customer.debug(\"%s ::: addTaxManagerToPR - %s\", className, lic);\r\n\t\tProcureLineItemCollection plic = (ProcureLineItemCollection) lic;\r\n\r\n\t\tString TaxRole = \"Tax Manager\";\r\n\t\tString TaxReason = \"Tax Reason\";\r\n\t\tboolean flag1 = true;\r\n\t\tObject obj = Role.getRole(TaxRole);\r\n\t\t// plic.setFieldValue(\"ProjectID\",\"F\");\r\n\t\tLog.customer.debug(\r\n\t\t\t\t\"%s ::: isTaxManagerRequired - plic bfore create %s\",\r\n\t\t\t\tclassName, plic.toString());\r\n\t\tApprovalRequest approvalrequest1 = ApprovalRequest.create(plic,\r\n\t\t\t\t((ariba.user.core.Approver) (obj)), flag1, \"RuleReasons\",\r\n\t\t\t\tTaxReason);\r\n\t\tLog.customer.debug(\"%s ::: approvalrequest1 got activated- %s\",\r\n\t\t\t\tclassName);\r\n\r\n\t\tBaseVector basevector1 = plic.getApprovalRequests();\r\n\t\tLog.customer.debug(\"%s ::: basevector1 got activated- %s\", className);\r\n\r\n\t\tBaseVector basevector2 = approvalrequest1.getDependencies();\r\n\t\tLog.customer.debug(\"%s ::: basevector2 got activated- %s\", className);\r\n\r\n\t\tbasevector2.add(0, ar);\r\n\t\tLog.customer.debug(\"%s ::: ar added to basevector2 %s\", className);\r\n\r\n\t\tapprovalrequest1.setFieldValue(\"Dependencies\", basevector2);\r\n\t\tar.setState(2);\r\n\t\tLog.customer.debug(\"%s ::: ar.setState- %s\", className);\r\n\r\n\t\tar.updateLastModified();\r\n\t\tLog.customer.debug(\"%s ::: ar.updatelastmodified- %s\", className);\r\n\r\n\t\tbasevector1.removeAll(ar);\r\n\t\tLog.customer.debug(\"%s ::: basevecotr1 .removeall %s\", className);\r\n\r\n\t\tbasevector1.add(0, approvalrequest1);\r\n\t\tLog.customer.debug(\"%s ::: basevector1 .add- %s\", className);\r\n\r\n\t\tplic.setApprovalRequests(basevector1);\r\n\t\tLog.customer.debug(\"%s ::: ir .setApprovalRequests got activated- %s\",\r\n\t\t\t\tclassName);\r\n\r\n\t\tjava.util.List list = ListUtil.list();\r\n\t\tjava.util.Map map = MapUtil.map();\r\n\t\tboolean flag6 = approvalrequest1.activate(list, map);\r\n\r\n\t\tLog.customer.debug(\"%s ::: New TaxAR Activated - %s\", className);\r\n\t\tLog.customer.debug(\"%s ::: State (AFTER): %s\", className);\r\n\t\tLog.customer.debug(\"%s ::: Approved By: %s\", className);\r\n\r\n\t}", "public interface IHardConstraint {\n\t\n\tpublic boolean isConstraintViolated(List<Job> jobs, List<Resource> resources, Plan plan);\n\t\t\n}", "public abstract\n ImmutableUniqueMemberConstraint getUniqueMemberConstraint();", "Activite getActiviteCourante();", "public TreatExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public contrustor(){\r\n\t}", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"times\", false, (String[]) null);\n String string0 = SQLUtil.constraintName(dBUniqueConstraint0);\n assertEquals(\"CONSTRAINT times \", string0);\n }", "IRequirement or(IRequirement constraint);", "RegExConstraint createRegExConstraint();", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "OperationalizingSoftgoal createOperationalizingSoftgoal();", "@objid (\"db7f3c97-1871-4855-958d-3659b2211f8a\")\n protected Object getConstraint() {\n return this.constraint;\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n DBSchema dBSchema0 = new DBSchema((String) null);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable((String) null, dBSchema0);\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\" start/stop selectivity is : \", false, defaultDBTable0, (String[]) null, defaultDBTable0, (String[]) null);\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0, nameSpec0);\n SQLUtil.addOptionalCondition((String) null, stringBuilder1);\n assertEquals(\"CONSTRAINT \\\" start/stop selectivity is : \\\" or null\", stringBuilder1.toString());\n assertEquals(\"CONSTRAINT \\\" start/stop selectivity is : \\\" or null\", stringBuilder0.toString());\n }", "boolean precondition(Skill castSkill, Creature performer, Creature target) {\n/* 76 */ return false;\n/* */ }", "protected abstract void defineConstraints();", "public DDetRetContrArtEscenicsAttTO() { }", "private Expression getConstraint(Type type, Expression exp, Type etype)\n {\n return Validation.getConstraint(type, transform(exp), etype);\n }", "private Proof contraTwice(Proof ab, Proof nb) {\n Expression a = ((Implication) ab.lastExpr()).statement;\n Proof weakness = implLeftWeakness(a, nb); //|-(a->!b)\n return faxm9Convert(ab, weakness); //|- !a\n }", "public abstract void printConstraint();", "public boolean hasObjective(){ return this.hasParameter(1); }", "public double returnsConstraint()\n\t{\n\t\treturn _returnsConstraint;\n\t}", "public abstract ITacticDescriptor makeTactic(boolean restricted);", "void addConstraintEntity(IViewEntity entity);", "public interface Constraint extends TOSCAObject<Constraint> {\n\n\tpublic String name();\n\n\tpublic default Constraint.Type type() {\n\t\treturn Type.valueOf(Type.class, name());\n\t}\n\n\t/* this is a one entry map so here we pick the single \n\t */\n\tpublic default Object expression() {\n\t\treturn info().values().iterator().next();\n\t}\n\n\tpublic enum Type {\n\t\tequal,\n\t\tgreater_than,\n\t\tgreater_or_equal,\n\t\tless_than,\n\t\tless_or_equal,\n\t\tin_range,\n\t\tvalid_values,\n\t\tlength,\n\t\tmin_length,\n\t\tmax_length,\n\t\tpattern\n\t}\n}", "@Then(\"Assert the success of Access & exfiltrate data within the victim's security zone\")\npublic void assaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "@Override\n\tpublic void addConstraint(String constraint) {\n\n\t}", "@Test(timeout = 4000)\n public void test124() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"org.apache.derby.iapi.sql.execute.ExecutionContext\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.ukSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"UNIQUE (, , , )\", string0);\n }", "private void addConstraint(String tok) throws SyntaxError {\n assert(tok.startsWith(PREFIX_OP_STR));\n \n if (!tok.endsWith(\")\")) {\n throw new SyntaxError(String.format(\"Wrong format for the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT));\n }\n int pos = tok.indexOf('(');\n if (pos == -1) {\n throw new SyntaxError(String.format(\"Missing '(' in the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT)); \n }\n String op = tok.substring(1, pos);\n ConstraintType type = ConstraintType.CONSTRAINT_PARENT;\n if (op.equalsIgnoreCase(CONSTR_CONTAINS)) {\n type = ConstraintType.CONSTRAINT_CONTAINS;\n } else if (!op.equalsIgnoreCase(CONSTR_PARENT)) {\n throw new SyntaxError(String.format(\"Wrong constraint name '%s' in the element '%s'\", op, tok));\n }\n // Labels cannot contain commas\n String parts[] = tok.substring(pos + 1, tok.length() - 1).split(\",\");\n if (parts.length < 2) {\n throw new SyntaxError(String.format(\n \"There should be at least 2 elements between '(' and ')'\" + \n \" in the constraint '%s', expected format %s\",\n tok, CONSTR_FMT));\n }\n String headLabel = parts[0].trim();\n Integer headId = mLabel2Id.get(headLabel);\n if (null == headId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", headLabel, tok)); \n }\n\n ArrayList<ConstraintType> constr = mConstrType.get(headId);\n ArrayList<Integer> dependIds = mDependId.get(headId);\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(headId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"The parent in the constraint '%s' should be an annotation\", tok));\n }\n }\n \n for (int i = 1; i < parts.length; ++i) {\n String depLabel = parts[i].trim();\n Integer depId = mLabel2Id.get(depLabel);\n if (null == depId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", depLabel, tok)); \n }\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(depId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"A child (label '%s') in the constraint '%s' should be an annotation\", \n depLabel, tok));\n }\n } \n \n constr.add(type);\n dependIds.add(depId);\n\n /*\n * This is a potentially horrible linear-time complexity search\n * in an array. However, for a reasonable-size user query \n * these arrays are going to be tiny and, in practice, \n * such a linear search be as fast as or likely even faster than \n * a hash/tree map lookup.\n */\n if (!mEdges.get(depId).contains(headId))\n mEdges.get(depId).add(headId);\n if (!mEdges.get(headId).contains(depId))\n mEdges.get(headId).add(depId);\n\n }\n }", "@Override\n\tpublic IStatus validate(IValidationContext ctx) {\n\n\t\tEObject target = ctx.getTarget();\n\n\t\tif (query.check(target)) {\n\t\t\treturn ctx.createSuccessStatus();\n\t\t} else {\n\t\t\t// OCL constraints only support the target object as an extraction\n\t\t\t// variable and result locus, as OCL has no way to provide\n\t\t\t// additional extractions. Also, there is no way for the OCL\n\t\t\t// to access the context object\n\t\t\tfinal CustomTypeHandlersService service = OCLActivator.getDefault().getService(CustomTypeHandlersService.class);\n\n\t\t\treturn ctx.createFailureStatus(service.wrapObjectIfNeeded(target));\n\t\t}\n\t}", "private static void addReservationConstraint()\n {\n ReservationConstraints constraint = new ReservationConstraints(new Date(), new Date(), \"bogusCarType\");\n System.out.println(\"press any key to try to register quote : \" + constraint);\n Main.readLine();\n \n if(session.createQuote(constraint) != null)\n System.out.println(\"Quote registered\");\n }", "public abstract RequirerInstrumentation getRelationInjection();", "public void authorizeTransaction() {}", "ReferenceTreatment createReferenceTreatment();", "Affectation createAffectation();", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n DBSchema dBSchema0 = new DBSchema((String) null);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable((String) null, dBSchema0);\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\" start/stop selectivity is : \", false, defaultDBTable0, (String[]) null, defaultDBTable0, (String[]) null);\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }", "public void reabrirContrato() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se o contrato já estpa aberto\n System.err.println(\"O contrado desse hospede já encontra-se aberto\");\n\n } else {//caso o contrato encontre-se fechado\n hospedesCadastrados.get(i).getContrato().setSituacao(true);\n System.err.println(\"Contrato reaberto, agora voce pode reusufruir de nossos servicos!\");\n }\n }\n }\n }\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[2];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n StringBuilder stringBuilder0 = new StringBuilder(763);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBUniqueConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"@\";\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"drop table,\", false, defaultDBTable0, stringArray0, defaultDBTable0, (String[]) null);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, (StringBuilder) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n String string0 = SQLUtil.ownerDotComponent(dBUniqueConstraint0);\n assertEquals(\"null.null\", string0);\n }", "public CWE getRxa18_SubstanceTreatmentRefusalReason(int rep) { \r\n\t\tCWE retVal = this.getTypedField(18, rep);\r\n\t\treturn retVal;\r\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n String[] stringArray0 = new String[5];\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null, nameSpec0);\n assertNull(stringBuilder0);\n }", "public void actualiserAffichage();", "public AbstrJoueurModel retourneAbstrJoueurModel(){ return ajm;}", "public void completeTrustedRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {\n\t\t// subclasses may override\n\t}", "public LinearConstraint() {\n\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[9];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"Ron?<[u:{U\", false, stringArray0);\n // Undeclared exception!\n try { \n DBUtil.equivalent(dBUniqueConstraint0, (DBPrimaryKeyConstraint) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.DBUtil\", e);\n }\n }", "FeedbackConsequence getConsequence();", "public CWE getSubstanceTreatmentRefusalReason(int rep) { \r\n\t\tCWE retVal = this.getTypedField(18, rep);\r\n\t\treturn retVal;\r\n }", "public void verificarImovelControleConcorrencia(Imovel imovel) throws ControladorException {\r\n\r\n\t\tFiltroImovel filtroImovel = new FiltroImovel();\r\n\t\tfiltroImovel.adicionarParametro(new ParametroSimples(FiltroImovel.ID, imovel.getId()));\r\n\r\n\t\tCollection colecaoImovel = getControladorUtil().pesquisar(filtroImovel, Imovel.class.getName());\r\n\r\n\t\tif (colecaoImovel == null || colecaoImovel.isEmpty()) {\r\n\t\t\tsessionContext.setRollbackOnly();\r\n\t\t\tthrow new ControladorException(\"atencao.atualizacao.timestamp\");\r\n\t\t}\r\n\r\n\t\tImovel imovelAtualizado = (Imovel) colecaoImovel.iterator().next();\r\n\r\n\t\tif (imovelAtualizado.getUltimaAlteracao().after(imovel.getUltimaAlteracao())) {\r\n\t\t\tsessionContext.setRollbackOnly();\r\n\t\t\tthrow new ControladorException(\"atencao.atualizacao.timestamp\");\r\n\t\t}\r\n\r\n\t}", "void validateActivoCreate(Activo activo);", "private void processAlterTableDropConstraint(Table t,\n String cname) throws HsqlException {\n\n session.commit();\n\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.dropConstraint(cname);\n\n return;\n }", "ClaimSoftgoal createClaimSoftgoal();", "public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }", "public interface LookupConstraint {\n}", "public FirstPhaseConstraint(TypeReference A, Type F) {\n\t _A = A;\n\t _F = F;\n\t}", "public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t}", "public void addMSCAdminToPR(ApprovalRequest ar, Approvable lic) {\r\n\t\tLog.customer.debug(\"%s ::: addMSCAdminToPR - %s\", className, lic);\r\n\t\tProcureLineItemCollection plic = (ProcureLineItemCollection) lic;\r\n\t\tString TaxRole = \"MSC Administrator\";\r\n\t\tString TaxReason = \"Tax Reason\";\r\n\t\tboolean flag1 = true;\r\n\t\tObject obj = Role.getRole(TaxRole);\r\n\t\t// plic.setFieldValue(\"ProjectID\",\"F\");\r\n\t\tLog.customer.debug(\"%s ::: isMSCAdminRequired - plic bfore create %s\",\r\n\t\t\t\tclassName, plic.toString());\r\n\t\tApprovalRequest approvalrequest1 = ApprovalRequest.create(plic,\r\n\t\t\t\t((ariba.user.core.Approver) (obj)), flag1, \"RuleReasons\",\r\n\t\t\t\tTaxReason);\r\n\t\tLog.customer.debug(\"%s ::: approvalrequest1 got activated- %s\",\r\n\t\t\t\tclassName);\r\n\r\n\t\tBaseVector basevector1 = plic.getApprovalRequests();\r\n\t\tLog.customer.debug(\"%s ::: basevector1 got activated- %s\", className);\r\n\r\n\t\tBaseVector basevector2 = approvalrequest1.getDependencies();\r\n\t\tLog.customer.debug(\"%s ::: basevector2 got activated- %s\", className);\r\n\r\n\t\tbasevector2.add(0, ar);\r\n\t\tLog.customer.debug(\"%s ::: ar added to basevector2 %s\", className);\r\n\r\n\t\tapprovalrequest1.setFieldValue(\"Dependencies\", basevector2);\r\n\t\tar.setState(2);\r\n\t\tLog.customer.debug(\"%s ::: ar.setState- %s\", className);\r\n\r\n\t\tar.updateLastModified();\r\n\t\tLog.customer.debug(\"%s ::: ar.updatelastmodified- %s\", className);\r\n\r\n\t\tbasevector1.removeAll(ar);\r\n\t\tLog.customer.debug(\"%s ::: basevecotr1 .removeall %s\", className);\r\n\r\n\t\tbasevector1.add(0, approvalrequest1);\r\n\t\tLog.customer.debug(\"%s ::: basevector1 .add- %s\", className);\r\n\r\n\t\tplic.setApprovalRequests(basevector1);\r\n\t\tLog.customer.debug(\"%s ::: ir .setApprovalRequests got activated- %s\",\r\n\t\t\t\tclassName);\r\n\r\n\t\tjava.util.List list = ListUtil.list();\r\n\t\tjava.util.Map map = MapUtil.map();\r\n\t\tboolean flag6 = approvalrequest1.activate(list, map);\r\n\r\n\t\tLog.customer.debug(\"%s ::: New TaxAR Activated - %s\", className);\r\n\t\tLog.customer.debug(\"%s ::: State (AFTER): %s\", className);\r\n\t\tLog.customer.debug(\"%s ::: Approved By: %s\", className);\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n String[] stringArray0 = new String[5];\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBPrimaryKeyConstraint0, nameSpec0);\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }", "@Override\r\n\tpublic void satisfy() {\n\t\t\r\n\t}", "public java.util.List<Constraint> getConstraint() { \n\t\tif (myConstraint == null) {\n\t\t\tmyConstraint = new java.util.ArrayList<Constraint>();\n\t\t}\n\t\treturn myConstraint;\n\t}", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionCntext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"mX7CQGqPX\", true, stringArray0);\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "private void testAclConstraints002() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints002\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tString expectedRootAcl = \"Add=*&Get=*&Replace=*\";\n\t\t\tString rootAcl = session.getNodeAcl(\".\").toString();\n\t\t\tTestCase.assertEquals(\"This test asserts that if the root node ACL is not explicitly set, it should be set to Add=*&Get=*&Replace=*.\",expectedRootAcl,rootAcl);\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionCntext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null);\n assertNull(dBPrimaryKeyConstraint0.getDoc());\n }", "protected abstract void rollbackIndividualTrx();", "@Override\n\tpublic void atualizar(Produto entidade) {\n\n\t}" ]
[ "0.5524449", "0.5524449", "0.538898", "0.52419144", "0.51689655", "0.5164233", "0.51008636", "0.50807726", "0.5039541", "0.49431792", "0.49411932", "0.49399808", "0.49156445", "0.49021155", "0.48707446", "0.48695517", "0.48594803", "0.48563457", "0.48552337", "0.48537627", "0.4847403", "0.48338357", "0.48334378", "0.48093176", "0.48057908", "0.48021168", "0.47946644", "0.47913095", "0.47837695", "0.47780055", "0.47706568", "0.4770607", "0.47663054", "0.47659644", "0.4751988", "0.47505203", "0.4739611", "0.47369727", "0.47267914", "0.47230837", "0.4719756", "0.47085786", "0.47084686", "0.47074264", "0.47000808", "0.46989584", "0.46825057", "0.46791625", "0.4675554", "0.46692452", "0.4667366", "0.46523803", "0.4650585", "0.4649705", "0.46491092", "0.46483055", "0.46482164", "0.4647244", "0.46459118", "0.46453375", "0.46435753", "0.46408692", "0.46385416", "0.4635057", "0.46306327", "0.46302143", "0.46273828", "0.46258613", "0.4621816", "0.46211308", "0.46206084", "0.4619114", "0.46118984", "0.4611535", "0.4611434", "0.46073112", "0.46031752", "0.4601643", "0.46015272", "0.46012896", "0.45974168", "0.4596966", "0.45962596", "0.45946577", "0.45925525", "0.4588575", "0.4587339", "0.4577163", "0.45741934", "0.45718375", "0.45701876", "0.45667693", "0.45650265", "0.45637974", "0.45629466", "0.45602039", "0.45586157", "0.45568678", "0.45545062", "0.4551042" ]
0.4894163
14
Contexts: Model returns Model Constraint: variables+=Truc+
protected void sequence_Model(ISerializationContext context, Model semanticObject) { genericSequencer.createSequence(context, semanticObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addEnviroment(String clasname, String parvarn1, Integer parvarn2, Integer unit) throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n InstantiationException, IllegalAccessException,\n InvocationTargetException {\n\n Constraint c = converConstrain(clasname,parvarn1,parvarn2);\n AmbientC varsConst = new AmbientC(); //Campo que implementa la clase AmbienC para transformar los constraint\n varsConst.addAmbientCon(parvarn1, parvarn2,unit,c); //\n super.getVarsEnviromen().add(varsConst);\n\n\n }", "@Override\n\tpublic void addStore(int timeUnit) {\n if (getVarsEnviromen().size() > 0) {\n\t\t\tfor (AmbientC amb: getVarsEnviromen() ){\n\t\t\t\tif (amb.getUnitTime() == timeUnit){\n int nvar = super.nvarDef(amb);\n switch (nvar) {\n case 1:\n if (super.findVars(amb.getVarname1()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 2:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2())) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 3:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2()) && super.findVars(amb.getVarname3()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n default: break;\n }\n\t\t\t\t}\n\t\t\t}\n } else {\n System.out.println(\"Ambient- <AddStore> -No existen Elementos en el Ambiente \" );\n }\n\n\t}", "public ConstraintExt(ArrayList<String> var) {\n\t\tsuper(var);\n\t\tvalTuples = new HashSet<ArrayList<Object>>();\n\t}", "private Submodel fixUniqueVars()\n {\n Submodel model = new Submodel();\n model.setInvariant(true);\n\n _fixUniqueVars_Helper(model);\n \n return model;\n }", "public Constraint addConstraint() {\n\t\tConstraint newType = new Constraint();\n\t\tgetConstraint().add(newType);\n\t\treturn newType; \n\t}", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "void addConstraintEntity(IViewEntity entity);", "public abstract IDecisionVariable getVariable();", "private void addVertexVisitConstraint(){\n\n for (int vertex=0; vertex < vertexCount; vertex++){\n Integer[] pos = new Integer[variables.length];\n for (int position =0; position < positionCount; position++){\n pos[position] = variables[position][vertex];\n }\n addExactlyOne(pos);\n }\n }", "private void generateVariablesAndConstraints() {\n\t\tVariable norwegian=new Variable(generateDomain(), \"norwegian\");\n\t\tVariable english=new Variable(generateDomain(), \"english\");\n\t\tVariable dane=new Variable(generateDomain(), \"dane\");\n\t\tVariable german=new Variable(generateDomain(), \"german\");\n\t\tVariable swede=new Variable(generateDomain(), \"swede\");\n\t\t//colors: \"red\", \"green\", \"white\", \"yellow\", \"blue\"\n\t\tVariable red=new Variable(generateDomain(), \"red\");\n\t\tVariable green=new Variable(generateDomain(), \"green\");\n\t\tVariable white=new Variable(generateDomain(), \"white\");\n\t\tVariable yellow=new Variable(generateDomain(), \"yellow\");\n\t\tVariable blue=new Variable(generateDomain(), \"blue\");\n\t\t//tobaccos: \"light\", \"cigar\", \"pipe\", \"unfiltered\", \"menthol\"\n\t\tVariable light=new Variable(generateDomain(), \"light\");\n\t\tVariable cigar=new Variable(generateDomain(), \"cigar\");\n\t\tVariable pipe=new Variable(generateDomain(), \"pipe\");\n\t\tVariable unfiltered=new Variable(generateDomain(), \"unfiltered\");\n\t\tVariable menthol=new Variable(generateDomain(), \"menthol\");\n\t\t//drinks: \"tea\", \"milk\", \"water\", \"beer\", \"coffee\"\n\t\tVariable tea=new Variable(generateDomain(), \"tea\");\n\t\tVariable milk=new Variable(generateDomain(), \"milk\");\n\t\tVariable water=new Variable(generateDomain(), \"water\");\n\t\tVariable beer=new Variable(generateDomain(), \"beer\");\n\t\tVariable coffee=new Variable(generateDomain(), \"coffee\");\n\t\t//pets: \"fish\", \"cat\", \"bird\", \"dog\", \"horse\"\n\t\tVariable fish=new Variable(generateDomain(), \"fish\");\n\t\tVariable cat=new Variable(generateDomain(), \"cat\");\n\t\tVariable bird=new Variable(generateDomain(), \"bird\");\n\t\tVariable dog=new Variable(generateDomain(), \"dog\");\n\t\tVariable horse=new Variable(generateDomain(), \"horse\");\n\t\t\n\t\tvariables= new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tred, green, white, yellow, blue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlight, cigar, pipe, unfiltered, menthol,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttea, milk, water, beer, coffee,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfish, cat, bird, dog, horse));\n\t\t\n\t\tconstraints=new ArrayList<Constraint>();\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(red, green, white, yellow, blue))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(light, cigar, pipe, unfiltered, menthol))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(tea, milk, water, beer, coffee))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(fish, cat, bird, dog, horse))).toneq()));\n\t\tconstraints.add(new equnary(norwegian, 1)); //Norweg zamieszkuje pierwszy dom\n\t\tconstraints.add(new eq(english, red));//Anglik mieszka w czerwonym domu.\n\t\tconstraints.add(new lt(green, white));//Zielony dom znajduje się bezpośrednio po lewej stronie domu białego.\n\t\tconstraints.add(new eq(dane, tea));//Duńczyk pija herbatkę.\n\t\tconstraints.add(new nextto(light, cat));//Palacz papierosów light mieszka obok hodowcy kotów.\n\t\tconstraints.add(new eq(yellow, cigar));//Mieszkaniec żółtego domu pali cygara.\n\t\tconstraints.add(new eq(german, pipe));//Niemiec pali fajkę.\n\t\tconstraints.add(new equnary(milk, 3));//Mieszkaniec środkowego domu pija mleko.\n\t\tconstraints.add(new nextto(light, water));//Palacz papierosów light ma sąsiada, który pija wodę.\n\t\tconstraints.add(new eq(unfiltered, bird));//Palacz papierosów bez filtra hoduje ptaki.\n\t\tconstraints.add(new eq(swede, dog));//Szwed hoduje psy.\n\t\tconstraints.add(new nextto(norwegian, blue));//Norweg mieszka obok niebieskiego domu.\n\t\tconstraints.add(new nextto(horse, yellow));//Hodowca koni mieszka obok żółtego domu.\n\t\tconstraints.add(new eq(menthol, beer));//Palacz mentolowych pija piwo.\n\t\tconstraints.add(new eq(green, coffee));//W zielonym domu pija się kawę\n\t}", "private void addC1Constraints(GRBVar[][] xVars, GRBModel model) throws GRBException {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString constraintName = \"constraintC1_\" + i;\n\t\t\t// out_x(i) - in_x(i) = 0\n\t\t\tGRBLinExpr constraintLinExpr = new GRBLinExpr();\n\n\t\t\t// Expression += out_x(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Expression -= in_x(i)\n\t\t\tGRBSolverUtils.addInTerm(i, -1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Add constraint\n\t\t\tmodel.addConstr(constraintLinExpr, GRB.EQUAL, 0, constraintName);\n\t\t}\n\t}", "public static void model1() {\n try {\n IloCplex cplex = new IloCplex();\n \n //variables\n IloNumVar x = cplex.numVar(0, Double.MAX_VALUE, \"x\"); //x >= 0\n IloNumVar y = cplex.numVar(0, Double.MAX_VALUE, \"y\"); //y >= 0\n \n //expressions\n IloLinearNumExpr objective = cplex.linearNumExpr();\n objective.addTerm(0.12, x);\n objective.addTerm(0.15, y);\n \n //define objective\n cplex.addMinimize(objective);\n \n //define constraints\n cplex.addGe(cplex.sum(cplex.prod(60, x), cplex.prod(60, y)), 300);\n cplex.addGe(cplex.sum(cplex.prod(12, x), cplex.prod(6, y)), 36);\n cplex.addGe(cplex.sum(cplex.prod(10, x), cplex.prod(30, y)), 90);\n \n //solve\n if (cplex.solve()) {\n System.out.println(\"Obj = \" + cplex.getObjValue());\n System.out.println(\"Obj = \" + cplex.getValue(objective));\n System.out.println(\"x = \" + cplex.getValue(x));\n System.out.println(\"y = \" + cplex.getValue(y));\n } else {\n System.out.println(\"Solution not found.\");\n }\n } catch (IloException ex) {\n ex.printStackTrace();\n }\n }", "protected void addConstraints() throws IloException {\n// Constrain (2)\n for (int i = 0; i < m; i++) {\n IloLinearNumExpr expr_2 = model.linearNumExpr();\n for (int j = 0; j < n; j++) {\n expr_2.addTerm(x[i][j], 1);\n }\n model.addLe(expr_2, supply[i]);\n }\n\n // Constrain (3)\n for (int j = 0; j < n; j++) {\n IloLinearNumExpr expr_3 = model.linearNumExpr();\n for (int i = 0; i < m; i++) {\n expr_3.addTerm(x[i][j], 1);\n }\n model.addEq(expr_3, demands[j]);\n }\n }", "@Override\n\tpublic Data getDataModelVariables() {\n\t\treturn new Data();\n\t}", "public Set<Object> getVariables() {\n return new HashSet<>(constraints.keySet());\n }", "private void addVertexPositionConstraint(){\n for (int vertex=0; vertex < vertexCount; vertex++){\n addExactlyOne(variables[vertex]);\n }\n }", "public Potential addVariable(Node var) {\n \n return (Potential)(new CaseListOutMem());\n}", "@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();", "@Override\n\tpublic Context prepareModel(XDust dust, RenderChain chain, Context context,\n\t\t\tObject model) {\n\t\treturn new Context(context, context, this.getParameters());\n\t}", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "protected void sequence_VariableCalcule(ISerializationContext context, VariableCalcule semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getExpressionExpressionParserRuleCall_3_0(), semanticObject.getExpression());\n\t\tfeeder.finish();\n\t}", "@Override\n public LinearSequence getLinearVariables() {\n LinearSequence vars = new LinearSequence();\n\n vars.addAll(((ExtendedExpression) getA()).getLinearVariables());\n vars.addAll(((ExtendedExpression) getB()).getLinearVariables().negate());\n\n return vars;\n }", "@Override\n\tpublic void addConstraint(String constraint) {\n\n\t}", "<C, PM> VariableExp<C, PM> createVariableExp();", "ConstraintModelFactory getConstraintModelFactory();", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "Variables createVariables();", "public Potential addVariable(Node var) {\n Vector v;\n PTreeCredalSet pot;\n \n v = new Vector();\n v.addElement(var);\n pot = (PTreeCredalSet)addVariable(v);\n return pot;\n }", "public IAspectVariable<V> createNewVariable(PartTarget target);", "public void addNewVariable() {\r\n \t ArrayList<Object> tempVar = new ArrayList<Object>();\r\n \t tempVar.add(\"Integer\");\r\n \t tempVar.add(\"NewVariable\");\r\n \t tempVar.add(Boolean.FALSE);\r\n \t tempVar.add(new Integer(1));\r\n \t this.variableData.add(tempVar);\r\n \t this.fireTableDataChanged();\r\n }", "public void variableChanged(VariableAttribute var);", "@Override\n public void addStoreConstIni() {\n if (AmbientGen.getArrayutcc().size()>0) {\n synchronized (AmbientGen.getArrayutcc()) {\n\n for (Vars varis: AmbientGen.getArrayutcc() ){\n if (varis.iniCons == true) {\n Store.addConstra(varis.getConstraint());\n System.out.println(\" -> Constraint Cargado Al Store - Variable - \" );\n }\n }\n }\n }\n }", "public PrimitiveConstraint getConstraint() {\r\n return new XlteqC(var, value);\r\n }", "void addParametersToModel( Map<String, String> model, Integer nIdUser );", "private void addC2Constraints(double[] alpha, GRBVar[][] xVars, GRBVar[][] yVars, GRBModel model)\n\t\t\tthrows GRBException {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString constraintName = \"constraintC2_\" + i;\n\t\t\t// out_x(i) + out_y(i) - in_y(i) = alpha_i\n\t\t\tGRBLinExpr constraintLinExpr = new GRBLinExpr();\n\n\t\t\t// Expression += out_x(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Expression += out_y(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, yVars, constraintLinExpr);\n\n\t\t\t// Expression -= in_y(i)\n\t\t\tGRBSolverUtils.addInTerm(i, -1, mExplicitMDP, yVars, constraintLinExpr);\n\n\t\t\t// Add constraint\n\t\t\tmodel.addConstr(constraintLinExpr, GRB.EQUAL, alpha[i], constraintName);\n\t\t}\n\t}", "Variable getTargetVariable();", "void addConstraintRelation(IViewRelation relation);", "@Override\n public Constraint converConstrain(String classname, String parvarn1, String parvarn2, String parvarn3) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {\n IntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); IntVar varConverZ = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; varConverZ.id = parvarn3 ;\n Class<?> clasCon = Class.forName(classname);\n Constructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class, JaCoP.core.IntVar.class});\n Constraint c = (Constraint) constru2.newInstance(varConverX,varConverY, varConverZ);\n return c;\n }", "public void addRelations(T model);", "public void mo3743a(LinearSystem eVar) {\n boolean z;\n boolean z2;\n boolean z3;\n boolean z4;\n int i;\n int i2;\n boolean z5;\n int i3;\n int i4;\n SolverVariable hVar;\n boolean z6;\n SolverVariable hVar2;\n SolverVariable hVar3;\n boolean z7;\n SolverVariable hVar4;\n SolverVariable hVar5;\n ConstraintWidget fVar;\n boolean z8;\n LinearSystem eVar2;\n SolverVariable hVar6;\n ConstraintWidget fVar2;\n int i5;\n boolean z9;\n boolean z10;\n SolverVariable a = eVar.mo3927a(this.f1490s);\n SolverVariable a2 = eVar.mo3927a(this.f1492u);\n SolverVariable a3 = eVar.mo3927a(this.f1491t);\n SolverVariable a4 = eVar.mo3927a(this.f1493v);\n SolverVariable a5 = eVar.mo3927a(this.f1494w);\n ConstraintWidget fVar3 = this.f1429D;\n if (fVar3 != null) {\n z4 = fVar3 != null && fVar3.f1428C[0] == EnumC0282a.WRAP_CONTENT;\n ConstraintWidget fVar4 = this.f1429D;\n boolean z11 = fVar4 != null && fVar4.f1428C[1] == EnumC0282a.WRAP_CONTENT;\n if (mo3742a(0)) {\n ((ConstraintWidgetContainer) this.f1429D).mo3854a(this, 0);\n z9 = true;\n } else {\n z9 = mo3774I();\n }\n if (mo3742a(1)) {\n ((ConstraintWidgetContainer) this.f1429D).mo3854a(this, 1);\n z10 = true;\n } else {\n z10 = mo3775J();\n }\n if (z4 && this.f1470as != 8 && this.f1490s.f1416c == null && this.f1492u.f1416c == null) {\n eVar.mo3935a(eVar.mo3927a(this.f1429D.f1492u), a2, 0, 1);\n }\n if (z11 && this.f1470as != 8 && this.f1491t.f1416c == null && this.f1493v.f1416c == null && this.f1494w == null) {\n eVar.mo3935a(eVar.mo3927a(this.f1429D.f1493v), a4, 0, 1);\n }\n z3 = z11;\n z2 = z9;\n z = z10;\n } else {\n z4 = false;\n z3 = false;\n z2 = false;\n z = false;\n }\n int i6 = this.f1430E;\n int i7 = this.f1441P;\n if (i6 < i7) {\n i6 = i7;\n }\n int i8 = this.f1431F;\n int i9 = this.f1442Q;\n if (i8 < i9) {\n i8 = i9;\n }\n boolean z12 = this.f1428C[0] != EnumC0282a.MATCH_CONSTRAINT;\n boolean z13 = this.f1428C[1] != EnumC0282a.MATCH_CONSTRAINT;\n this.f1487p = this.f1433H;\n float f = this.f1432G;\n this.f1488q = f;\n int i10 = this.f1476e;\n int i11 = this.f1477f;\n if (f <= 0.0f || this.f1470as == 8) {\n hVar = a5;\n i4 = i10;\n i2 = i6;\n i = i8;\n i3 = i11;\n z5 = false;\n } else {\n hVar = a5;\n if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && i10 == 0) {\n i10 = 3;\n }\n if (this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i11 == 0) {\n i11 = 3;\n }\n if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i10 == 3 && i11 == 3) {\n mo3789a(z4, z3, z12, z13);\n } else if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && i10 == 3) {\n this.f1487p = 0;\n int i12 = (int) (this.f1488q * ((float) this.f1431F));\n if (this.f1428C[1] != EnumC0282a.MATCH_CONSTRAINT) {\n i2 = i12;\n i = i8;\n i3 = i11;\n i4 = 4;\n z5 = false;\n } else {\n i2 = i12;\n i4 = i10;\n i = i8;\n i3 = i11;\n z5 = true;\n }\n } else if (this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i11 == 3) {\n this.f1487p = 1;\n if (this.f1433H == -1) {\n this.f1488q = 1.0f / this.f1488q;\n }\n int i13 = (int) (this.f1488q * ((float) this.f1430E));\n if (this.f1428C[0] != EnumC0282a.MATCH_CONSTRAINT) {\n i = i13;\n i4 = i10;\n i2 = i6;\n i3 = 4;\n z5 = false;\n } else {\n i = i13;\n i4 = i10;\n i2 = i6;\n i3 = i11;\n z5 = true;\n }\n }\n i4 = i10;\n i2 = i6;\n i = i8;\n i3 = i11;\n z5 = true;\n }\n int[] iArr = this.f1478g;\n iArr[0] = i4;\n iArr[1] = i3;\n if (z5) {\n int i14 = this.f1487p;\n if (i14 != 0) {\n }\n z6 = true;\n boolean z14 = this.f1428C[0] != EnumC0282a.WRAP_CONTENT && (this instanceof ConstraintWidgetContainer);\n boolean z15 = !this.f1497z.mo3764j();\n if (this.f1451a == 2) {\n ConstraintWidget fVar5 = this.f1429D;\n SolverVariable a6 = fVar5 != null ? eVar.mo3927a(fVar5.f1492u) : null;\n ConstraintWidget fVar6 = this.f1429D;\n z7 = z3;\n hVar3 = hVar;\n hVar5 = a4;\n hVar2 = a3;\n hVar4 = a2;\n m1247a(eVar, z4, fVar6 != null ? eVar.mo3927a(fVar6.f1490s) : null, a6, this.f1428C[0], z14, this.f1490s, this.f1492u, this.f1434I, i2, this.f1441P, this.f1460ai[0], this.f1443S, z6, z2, i4, this.f1479h, this.f1480i, this.f1481j, z15);\n fVar = this;\n } else {\n hVar2 = a3;\n hVar4 = a2;\n z7 = z3;\n hVar3 = hVar;\n hVar5 = a4;\n fVar = this;\n }\n if (fVar.f1473b == 2) {\n boolean z16 = fVar.f1428C[1] == EnumC0282a.WRAP_CONTENT && (fVar instanceof ConstraintWidgetContainer);\n boolean z17 = z5 && ((i5 = fVar.f1487p) == 1 || i5 == -1);\n if (fVar.f1440O <= 0) {\n hVar6 = hVar2;\n eVar2 = eVar;\n } else if (fVar.f1494w.mo3751a().f1561i == 1) {\n eVar2 = eVar;\n fVar.f1494w.mo3751a().mo3877a(eVar2);\n hVar6 = hVar2;\n } else {\n eVar2 = eVar;\n hVar6 = hVar2;\n eVar2.mo3943c(hVar3, hVar6, mo3767B(), 6);\n if (fVar.f1494w.f1416c != null) {\n eVar2.mo3943c(hVar3, eVar2.mo3927a(fVar.f1494w.f1416c), 0, 6);\n z8 = false;\n ConstraintWidget fVar7 = fVar.f1429D;\n SolverVariable a7 = fVar7 == null ? eVar2.mo3927a(fVar7.f1493v) : null;\n ConstraintWidget fVar8 = fVar.f1429D;\n m1247a(eVar, z7, fVar8 == null ? eVar2.mo3927a(fVar8.f1491t) : null, a7, fVar.f1428C[1], z16, fVar.f1491t, fVar.f1493v, fVar.f1435J, i, fVar.f1442Q, fVar.f1460ai[1], fVar.f1444T, z17, z, i3, fVar.f1482k, fVar.f1483l, fVar.f1484m, z8);\n if (!z5) {\n fVar2 = this;\n if (fVar2.f1487p == 1) {\n eVar.mo3936a(hVar5, hVar6, hVar4, a, fVar2.f1488q, 6);\n } else {\n eVar.mo3936a(hVar4, a, hVar5, hVar6, fVar2.f1488q, 6);\n }\n } else {\n fVar2 = this;\n }\n if (!fVar2.f1497z.mo3764j()) {\n eVar.mo3928a(fVar2, fVar2.f1497z.mo3761g().mo3757c(), (float) Math.toRadians((double) (fVar2.f1461aj + 90.0f)), fVar2.f1497z.mo3759e());\n return;\n }\n return;\n }\n }\n z8 = z15;\n ConstraintWidget fVar72 = fVar.f1429D;\n if (fVar72 == null) {\n }\n ConstraintWidget fVar82 = fVar.f1429D;\n m1247a(eVar, z7, fVar82 == null ? eVar2.mo3927a(fVar82.f1491t) : null, a7, fVar.f1428C[1], z16, fVar.f1491t, fVar.f1493v, fVar.f1435J, i, fVar.f1442Q, fVar.f1460ai[1], fVar.f1444T, z17, z, i3, fVar.f1482k, fVar.f1483l, fVar.f1484m, z8);\n if (!z5) {\n }\n if (!fVar2.f1497z.mo3764j()) {\n }\n } else {\n return;\n }\n }\n z6 = false;\n if (this.f1428C[0] != EnumC0282a.WRAP_CONTENT) {\n }\n boolean z152 = !this.f1497z.mo3764j();\n if (this.f1451a == 2) {\n }\n if (fVar.f1473b == 2) {\n }\n }", "protected void establishTransformationModel() {\r\n\t \r\n\t\tTransformationModel transformModel ;\r\n\t\tArrayList<TransformationStack> modelTransformStacks ;\r\n\t\t\r\n\t\t\r\n\t\t// the variables needed for the profile\r\n\t\t// targetStruc = getTargetVector();\r\n\t\tsomData = soappTransformer.getSomData() ; \r\n\t\t// soappTransformer.setSomData( somApplication.getSomData() );\r\n\t\tsomApplication.setSomData(somData) ;\r\n\t\t\r\n\t\tsomData.getVariablesLabels() ;\r\n\t\t \r\n\t\t\r\n\t\t// from here we transfer...\r\n\t\tmodelTransformStacks = soappTransformer.getTransformationModel().getVariableTransformations();\r\n\t\ttransformModel = soappTransformer.getTransformationModel() ;\r\n\t\t \r\n\t\t\r\n\t\ttransformationModelImported = true;\r\n\t}", "public ModeloTablaVariables getModeloVariables() {\n\t\treturn modeloVariables;\n\t}", "Constraint createConstraint();", "Constraint createConstraint();", "private void createOriginalCSP (int[][] variables){\n\t\t\n\t\tnumberOfVariables = variables[0].length;\n\t\tchocoModel = new Model(\"OriginalCSP\");\n\t\tnumberOfProducts = variables.length;\n\t\tcreateNewVar(); // FIRST VAR is PRODUCT ID , varID = 0\n\t\t\n\t\tint varID =0;\n\t\t\n\t\tfor(int i=0;i<variables[0].length;i++){\n\t\t\tcreateNewVar(); // ADD FEATURE SET OF CAMERAS\n\t\t}\n\t\tallVarsAreCreated = true;\n\t\t\n\t\taddProductConstraints(variables);\n\t\t\n\t\t\n\t}", "public Linearmodel() {\n this(DSL.name(\"LinearModel\"), null);\n }", "public StaticVarOrder(Model model){\n\t lastIdx = model.getEnvironment().makeInt(0);\n\t }", "protected IDecisionVariable getVariable() {\n return variable;\n }", "com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();", "private void addConstraint(String tok) throws SyntaxError {\n assert(tok.startsWith(PREFIX_OP_STR));\n \n if (!tok.endsWith(\")\")) {\n throw new SyntaxError(String.format(\"Wrong format for the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT));\n }\n int pos = tok.indexOf('(');\n if (pos == -1) {\n throw new SyntaxError(String.format(\"Missing '(' in the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT)); \n }\n String op = tok.substring(1, pos);\n ConstraintType type = ConstraintType.CONSTRAINT_PARENT;\n if (op.equalsIgnoreCase(CONSTR_CONTAINS)) {\n type = ConstraintType.CONSTRAINT_CONTAINS;\n } else if (!op.equalsIgnoreCase(CONSTR_PARENT)) {\n throw new SyntaxError(String.format(\"Wrong constraint name '%s' in the element '%s'\", op, tok));\n }\n // Labels cannot contain commas\n String parts[] = tok.substring(pos + 1, tok.length() - 1).split(\",\");\n if (parts.length < 2) {\n throw new SyntaxError(String.format(\n \"There should be at least 2 elements between '(' and ')'\" + \n \" in the constraint '%s', expected format %s\",\n tok, CONSTR_FMT));\n }\n String headLabel = parts[0].trim();\n Integer headId = mLabel2Id.get(headLabel);\n if (null == headId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", headLabel, tok)); \n }\n\n ArrayList<ConstraintType> constr = mConstrType.get(headId);\n ArrayList<Integer> dependIds = mDependId.get(headId);\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(headId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"The parent in the constraint '%s' should be an annotation\", tok));\n }\n }\n \n for (int i = 1; i < parts.length; ++i) {\n String depLabel = parts[i].trim();\n Integer depId = mLabel2Id.get(depLabel);\n if (null == depId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", depLabel, tok)); \n }\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(depId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"A child (label '%s') in the constraint '%s' should be an annotation\", \n depLabel, tok));\n }\n } \n \n constr.add(type);\n dependIds.add(depId);\n\n /*\n * This is a potentially horrible linear-time complexity search\n * in an array. However, for a reasonable-size user query \n * these arrays are going to be tiny and, in practice, \n * such a linear search be as fast as or likely even faster than \n * a hash/tree map lookup.\n */\n if (!mEdges.get(depId).contains(headId))\n mEdges.get(depId).add(headId);\n if (!mEdges.get(headId).contains(depId))\n mEdges.get(headId).add(depId);\n\n }\n }", "public LinearConstraint() {\n\n }", "private IntArrayList _fixUniqueVars_Helper(Submodel model)\n {\n int ct = 0;\n IntArrayList depVars = new IntArrayList();\n\n ct += addUniqueVarsToModel(model, _fg.getEdges(), depVars);\n ct += addUniqueVarsToModel(model, _fg.getDirs(), depVars);\n ct += addUniqueVarsToModel(model, _fg.getSigns(), depVars);\n\n ct += addUniqueVarsToModel(model, _fg.getKos(), depVars);\n\n model.setNumDepVars(ct);\n \n return depVars;\n }", "private TopComponentContextSubModel getContextSubModel() {\n if (topComponentContextSubModel == null) {\n topComponentContextSubModel = new TopComponentContextSubModel();\n }\n return topComponentContextSubModel;\n }", "<C, PM> Variable<C, PM> createVariable();", "AttributeValues getAttributeValues(Constraint constraint, Object context, EAttribute attribute);", "public List<IntegerVariable> getObjectiveVariables() {\n return objectiveVariables;\n }", "public ArrayList<String> getNeedBindingVars(){\n\t\tArrayList<String> vars = new ArrayList<String>();\n\t\tfor(int i=0; i<terms.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tSourceAttribute sa = source.getAttr(i);\n\t\t\tString var = t.getVar();\n\t\t\tif(t.needsBinding(sa.needsBinding())){\n\t\t\t\tif(t instanceof FunctionTerm){\n\t\t\t\t\tvars.addAll(t.getFunction().getNeedBindingVars());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tvars.add(var);\n\t\t\t}\n\t\t}\n\t\treturn vars;\n\t}", "public Variable add(Variable v) throws IllegalArgumentException {\r\n\t\tif (!variables.contains(v)) {\r\n\t\t\tif (v.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tv.setIndex(variables.size());\r\n\t\t\tvariables.add(v);\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "public void apply(Component comp) {\n\t\tif (_vars != null && isEffective(comp)) {\n\t\t\tfinal Evaluator eval = getEvaluator();\n\t\t\tfor (Map.Entry<String, Object> me: _vars.entrySet()) {\n\t\t\t\tfinal String name = me.getKey();\n\t\t\t\tfinal Object value = me.getValue();\n\t\t\t\tcomp.getSpaceOwner().setAttribute(\n\t\t\t\t\tname, Utils.evaluateComposite(eval, comp, value), !_local);\n\t\t\t}\n\t\t}\n\t}", "public LinearConstraint putVariable(Object var, Double value) {\n constraints.put(var, value);\n return this;\n }", "public void addModelContentValues(T model, ContentValues values);", "protected Constraint add(Constraint c) throws IllegalArgumentException {\r\n\t\tif (!constraints.contains(c)) {\r\n\t\t\tif (c.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tc.setIndex(constraints.size());\r\n\t\t\tconstraints.add(c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}", "public void addConstraint(ContextConstraint node) {\n List<ContextConstraint> list = getConstraintList();\n list.addChild(node);\n }", "private void convert(AssignStatContext c, List<String> ssa) {\n\t\tString expr = getExpr(c.expr());\n\t\tString id = this.variableTrack.get(c.ID().getText());\n\t\tString newId = generateNewName(id);\n\t\tString constraint = \"(assert(= \" + newId + \" \" + expr + \"))\";\n\t\tssa.add(constraint);\n\t\t\n\t}", "public PotentialTree addVariable(Vector vars) {\n Vector aux;\n FiniteStates var1, var2;\n int i, j;\n boolean found;\n PTreeCredalSet pot;\n ProbabilityTree tree;\n \n aux = new Vector(); // New list of variables.\n for (i=0 ; i<variables.size() ; i++) {\n var1 = (FiniteStates)variables.elementAt(i);\n found = false;\n for (j=0 ; j<vars.size() ; j++) {\n var2 = (FiniteStates)vars.elementAt(j);\n if (var1 == var2) {\n found = true;\n break;\n }\n }\n if (!found)\n aux.addElement(var1);\n }\n pot = new PTreeCredalSet(aux); // The new tree.\n tree = values;\n for (i=0 ; i<vars.size() ; i++) {\n var1 = (FiniteStates)vars.elementAt(i);\n tree = tree.addVariable(var1);\n }\n pot.setTree(tree);\n return pot;\n }", "VarsDeclRule createVarsDeclRule();", "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}", "public void addVariable(Variable var1, Variable var2){\r\n \tvar1.addVariable(var2);\r\n }", "public boolean getVariableRequired() {\r\n return relaxed;\r\n }", "VariableExp createVariableExp();", "public void addVariables(IJobSetup setup) {\n\t\tsetup.addVariable(\"someFactor\", \"factor used to adjust something\", \"int\", \"2\");\r\n\t}", "public T caseVariables(Variables object)\n {\n return null;\n }", "public IExpressionValue getUserDefinedVariable(String key);", "public Tuple getModel();", "public ModelElement getConstraints() {\n\tmodelElement.clearConstraint();\n\tjava.util.Iterator iterator = getPnlDataSelector().getObjects().iterator();\n\ttry {\n\t\twhile (iterator.hasNext()) {\n\t\t\tObject eleo=iterator.next();\n\t\t\tConstraintDef constraintDef = null;\n\t\t\tif(eleo instanceof NlsString){\n\t\t\t\t// new constraint\n\t\t\t\tConstraintExpression expression = new ConstraintExpression();\n\t\t\t\texpression.setSyntax((NlsString)eleo);\n\t\t\t\tconstraintDef = (ConstraintDef)ElementFactory.createObject(ConstraintDef.class);\n\t\t\t\tconstraintDef.setBody(expression);\n\t\t\t}else{\n\t\t\t\t// existing constraint\n\t\t\t\tconstraintDef = (ConstraintDef)eleo;\n\t\t\t}\n\t\t\tmodelElement.addConstraint(constraintDef);\n\t\t}\n\t} catch(Throwable e) {\n\t\thandleException(e);\n\t}\n\treturn modelElement;\n}", "String getModelA();", "TypedModel getModel();", "ContextVariable createContextVariable();", "public VariableTableModel(OpenRocketDocument doc){\n \t\t\n\t\tCollections.addAll(types, FlightDataType.ALL_TYPES);\n \t\t\n\t\tfor (CustomExpression expression : doc.getCustomExpressions()){\n\t\t\ttypes.add(expression.getType());\n\t\t}\n \t}", "public boolean constraintsMightGetValidated(CSP csp, Variable var) {\n\t\tint v_value = (int) var.getValue();\n\t\tList<Constraint> constraints = csp.getConstraints(var);\n\t\tfor (Constraint con : constraints) {\n\t\t\tif (con.getRight() == null) {\n\t\t\t\tint c_value = (int) con.getValue();\n\t\t\t\tif (!yup(v_value, c_value, con.getType())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tVariable other_var = con.getRight();\n\t\t\t\tif (var.getName().equals(other_var.getName())) {\n\t\t\t\t\t// oops, picked the wrong one\n\t\t\t\t\tother_var = con.getLeft();\n\t\t\t\t}\n\t\t\t\t// if we are dealing with an uninitialized variable, that's great\n\t\t\t\tif (other_var.getValue() == null) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint other_value = (int) other_var.getValue();\n\t\t\t\t// assuming the other variable value remains static for the time being\n\t\t\t\tif (!yup(v_value, other_value, con.getType())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// nothing objectionable was found\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public PyramidSolitaireTextualView(PyramidSolitaireModel<?> model) {\n this.model = model;\n }", "public interface ConstraintContext {\n Optional<TraversalConstraint> getConstraint();\n}", "ModelData getModel();", "@Override\r\n public void addModel(String name, Object value) {\n if (value == null) return;\r\n super.addModel(name, value);\r\n }", "java.lang.String getModel();", "protected void addObjective() throws IloException {\n IloLinearNumExpr objective = model.linearNumExpr();\n\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; j++) {\n objective.addTerm(x[i][j], costs[i][j]);\n\n }\n }\n\n IloObjective Obj = model.addObjective(IloObjectiveSense.Minimize, objective);\n }", "public FormValidationScriptVisitor(List<FormAttribute> declaredAttributes) {\n declaredAttributes.forEach(attribute -> declaredVariables.put(attribute.getVariableName(), attribute.getDataType()));\n }", "TemplateModel getValue();", "@Override\r\n\tpublic void add(ShaderVar var) {\n\t\t\r\n\t}", "@Override\n\tpublic void visit(UserVariable arg0) {\n\t\t\n\t}", "public void knockBack(Entity var1, int var2, double var3, double var5)\n {}", "Aliasing getVariable();", "@Transient\n @JsonIgnore\n public String getAttributeWithVariableValues() {\n return insertVariableValues(attribute);\n }", "public void addVariable(VariableItem variableItem) {\n\t\t\n\t}", "public void addVariable(VariableItem variableItem) {\n\t\t\n\t}", "public java.util.List<Constraint> getConstraint() { \n\t\tif (myConstraint == null) {\n\t\t\tmyConstraint = new java.util.ArrayList<Constraint>();\n\t\t}\n\t\treturn myConstraint;\n\t}", "NCModel getModel();", "M getModel();", "private void addVertexNonEdgeConstraint(){\n for (int i=0; i < g.nonEdges.size(); i++){\n Edge edge = g.nonEdges.get(i);\n int vertex1 = edge.from;\n int vertex2 = edge.to;\n for (int pCount =0; pCount < positionCount-1; pCount++){\n ArrayList<Integer> values = new ArrayList<>();\n values.add((variables[vertex1][pCount] * -1));\n values.add((variables[vertex2][pCount+1] * -1));\n clauses.add(values);\n values = new ArrayList<>();\n values.add((variables[vertex1][pCount+1] * -1));\n values.add((variables[vertex2][pCount] * -1));\n clauses.add(values);\n }\n\n }\n }", "com.spirit.cartera.entity.LogCarteraDetalleIf addLogCarteraDetalle(com.spirit.cartera.entity.LogCarteraDetalleIf model) throws GenericBusinessException;" ]
[ "0.59651786", "0.5713674", "0.56181705", "0.53941166", "0.5319187", "0.5290303", "0.5281917", "0.52241707", "0.521845", "0.5159767", "0.5100572", "0.49971768", "0.49892348", "0.49697393", "0.49445093", "0.4942657", "0.4939486", "0.4931906", "0.49282965", "0.49221992", "0.49204284", "0.4905181", "0.48895904", "0.48829085", "0.48719576", "0.48498583", "0.48496687", "0.4836436", "0.48093483", "0.48092037", "0.479088", "0.478611", "0.47847158", "0.47720224", "0.47434416", "0.4739978", "0.4739146", "0.47381213", "0.47182474", "0.47154057", "0.47149938", "0.4712474", "0.47106856", "0.47106856", "0.47095174", "0.470048", "0.46861848", "0.46818838", "0.4675575", "0.4675462", "0.46723044", "0.46588504", "0.46580833", "0.46401733", "0.46361694", "0.46348134", "0.46276677", "0.46235803", "0.45978102", "0.45966804", "0.4588806", "0.45826373", "0.45698887", "0.4567827", "0.4566285", "0.45617062", "0.45613265", "0.45611334", "0.4556692", "0.45492613", "0.45222217", "0.45082158", "0.44994348", "0.44978648", "0.44977456", "0.44974357", "0.44948423", "0.4491849", "0.4491259", "0.44870237", "0.44866872", "0.44774765", "0.44676876", "0.44644815", "0.44531047", "0.44483942", "0.4437821", "0.44328934", "0.44321114", "0.44319507", "0.44318885", "0.44289356", "0.44288656", "0.44287756", "0.4428469", "0.4428469", "0.44252008", "0.44238743", "0.4417731", "0.44140875", "0.4410735" ]
0.0
-1
Contexts: Expression returns Div Addition returns Div Addition.Plus_1_0_0_0 returns Div Addition.Minus_1_0_1_0 returns Div Multiplication returns Div Multiplication.Multi_1_0_0_0 returns Div Multiplication.Div_1_0_1_0 returns Div PrimaryExpression returns Div Constraint: (left=Multiplication_Div_1_0_1_0 right=PrimaryExpression)
protected void sequence_Multiplication(ISerializationContext context, Div semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.DIV__LEFT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.DIV__LEFT)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.DIV__RIGHT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.DIV__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(), semanticObject.getLeft()); feeder.accept(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0(), semanticObject.getRight()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StatementParse mulDivTransform(StatementParse node) {\n // This function is called on _every_ multiply and divide node.\n StatementParse node1 = node.getChildren().get(0);\n StatementParse node2 = node.getChildren().get(1);\n if (!(node1 instanceof IntegerParse) || !(node2 instanceof IntegerParse)){\n return node;\n }\n int value1 = ((IntegerParse) node1).getValue();\n int value2 = ((IntegerParse) node2).getValue();\n int result;\n if (node.getName().equals(\"*\")){\n result = value1 * value2;\n } else{ // div node\n if (value2 == 0) return node;\n result = value1 / value2;\n }\n\n IntegerParse newNode = new IntegerParse(result);\n if (node.isNegative()) newNode.setNegative(true);\n return newNode;\n }", "public static BinaryExpression divide(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Test\n public void test_DivisionWithTwoVariables() {\n Operator add = new Operator(new Constant(10), new Variable(\"x\"), Operator.Operators.ADD);\n Operator min = new Operator(new Constant(12), new Variable(\"y\"), Operator.Operators.MINUS);\n Operator mul = new Operator(add, min, Operator.Operators.MUL);\n Operator add2 = new Operator(new Constant(5), new Variable(\"x\"), Operator.Operators.ADD);\n Operator div = new Operator(mul, add2, Operator.Operators.DIV);\n\n\t\t/* x = 3 y = 2 */\n Context c = new Context();\n c.assign(\"x\", 3);\n c.assign(\"y\", 2);\n\n assertThat(div.evaluate(c), is(16.25));\n }", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression divide(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public final EObject ruleAddSubExpr() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n EObject this_MultDivExpr_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalSafetyParser.g:7652:2: ( (this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )* ) )\n // InternalSafetyParser.g:7653:2: (this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )* )\n {\n // InternalSafetyParser.g:7653:2: (this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )* )\n // InternalSafetyParser.g:7654:3: this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )*\n {\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getAddSubExprAccess().getMultDivExprParserRuleCall_0());\n \t\t\n }\n pushFollow(FollowSets000.FOLLOW_86);\n this_MultDivExpr_0=ruleMultDivExpr();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent = this_MultDivExpr_0;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n // InternalSafetyParser.g:7662:3: ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )*\n loop100:\n do {\n int alt100=2;\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==PlusSign) ) {\n int LA100_2 = input.LA(2);\n\n if ( (synpred25_InternalSafetyParser()) ) {\n alt100=1;\n }\n\n\n }\n else if ( (LA100_0==HyphenMinus) ) {\n int LA100_3 = input.LA(2);\n\n if ( (synpred25_InternalSafetyParser()) ) {\n alt100=1;\n }\n\n\n }\n\n\n switch (alt100) {\n \tcase 1 :\n \t // InternalSafetyParser.g:7663:4: ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) )\n \t {\n \t // InternalSafetyParser.g:7663:4: ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) )\n \t // InternalSafetyParser.g:7664:5: ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) )\n \t {\n \t // InternalSafetyParser.g:7678:5: ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) )\n \t // InternalSafetyParser.g:7679:6: () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) )\n \t {\n \t // InternalSafetyParser.g:7679:6: ()\n \t // InternalSafetyParser.g:7680:7: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\tcurrent = forceCreateModelElementAndSet(\n \t \t\t\t\t\t\t\t\tgrammarAccess.getAddSubExprAccess().getBinaryExprLeftAction_1_0_0_0(),\n \t \t\t\t\t\t\t\t\tcurrent);\n \t \t\t\t\t\t\t\n \t }\n\n \t }\n\n \t // InternalSafetyParser.g:7686:6: ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) )\n \t // InternalSafetyParser.g:7687:7: ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) )\n \t {\n \t // InternalSafetyParser.g:7687:7: ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) )\n \t // InternalSafetyParser.g:7688:8: (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus )\n \t {\n \t // InternalSafetyParser.g:7688:8: (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus )\n \t int alt99=2;\n \t int LA99_0 = input.LA(1);\n\n \t if ( (LA99_0==PlusSign) ) {\n \t alt99=1;\n \t }\n \t else if ( (LA99_0==HyphenMinus) ) {\n \t alt99=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 99, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt99) {\n \t case 1 :\n \t // InternalSafetyParser.g:7689:9: lv_op_2_1= PlusSign\n \t {\n \t lv_op_2_1=(Token)match(input,PlusSign,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_1, grammarAccess.getAddSubExprAccess().getOpPlusSignKeyword_1_0_0_1_0_0());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getAddSubExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // InternalSafetyParser.g:7700:9: lv_op_2_2= HyphenMinus\n \t {\n \t lv_op_2_2=(Token)match(input,HyphenMinus,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_2, grammarAccess.getAddSubExprAccess().getOpHyphenMinusKeyword_1_0_0_1_0_1());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getAddSubExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // InternalSafetyParser.g:7715:4: ( (lv_right_3_0= ruleMultDivExpr ) )\n \t // InternalSafetyParser.g:7716:5: (lv_right_3_0= ruleMultDivExpr )\n \t {\n \t // InternalSafetyParser.g:7716:5: (lv_right_3_0= ruleMultDivExpr )\n \t // InternalSafetyParser.g:7717:6: lv_right_3_0= ruleMultDivExpr\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewCompositeNode(grammarAccess.getAddSubExprAccess().getRightMultDivExprParserRuleCall_1_1_0());\n \t \t\t\t\t\t\n \t }\n \t pushFollow(FollowSets000.FOLLOW_86);\n \t lv_right_3_0=ruleMultDivExpr();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getAddSubExprRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\tset(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"right\",\n \t \t\t\t\t\t\t\tlv_right_3_0,\n \t \t\t\t\t\t\t\t\"com.rockwellcollins.atc.agree.Agree.MultDivExpr\");\n \t \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop100;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Test\n\tpublic void divisionTest() {\n\t\tMathOperation division = new Division();\n\n\t\tassertEquals(0, division.operator(ZERO, FIVE).intValue());\n\t\tassertEquals(4, division.operator(TWENTY, FIVE).intValue());\n\t}", "public void enfoncerDiv() {\n\t\ttry {\n\t\t\tthis.op = new Div();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (ArithmeticException e) {\n\t\t\tSystem.out.println(\"Erreur : Division par zero !\");\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "BaseNumber divide(BaseNumber operand);", "public <V extends Number> FluentExp<V> div (SQLExpression<V> expr)\n {\n return new Div<V>(this, expr);\n }", "public static NumberP Division(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Division\n ); \t\n }", "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public Fraccion division() {\r\n Fraccion division = new Fraccion(operador1.getNumerador()*operador2.getDenominador() , operador1.getDenominador()*operador2.getNumerador());\r\n return simplify(division);\r\n }", "public void testORDINARY_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 10, \"fess\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}", "private void division()\n\t{\n\t\tFun = Function.DIVIDE; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "ExpressionCalculPrimary getExpr();", "@Test(priority=4)\n\n\tpublic void divisionTest() {\n\n\t\tandroidCalculator = new AndroidCalculator(driver);\n\n\t\tandroidCalculator.inputLeftAndRightFields(\"20\", \"10\");\n\t\tandroidCalculator.division();\n\n\t\tAssert.assertEquals(androidCalculator.verifyResult(), 20/10);\n\t}", "private ASTNode binaryDivisionRules(ASTNode left, ASTNode right) throws Exception {\n\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n TokenType varType = TokenType.VAR;\n TokenType numType = TokenType.NUMBER;\n TokenType divType = TokenType.DIV;\n\n Token tempToken;\n if (patternMatcher(leftType, rightType, varType, varType)){\n tempToken = new Token(numType, \"1\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else{\n tempToken = new Token(divType);\n return new BinaryOp(tempToken, left, right);\n }\n }", "@Override\n\tpublic float dividir(float op1, float op2) {\n\t\treturn op1 / op2;\n\t}", "public void testSUBORDINARY_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"SUBORDINARY_DIV\", 28, \"pall\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"SUBORDINARY_DIV\", expecting, actual);\n\t}", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public final EObject ruleMultDivExpr() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n Token lv_op_2_3=null;\n Token lv_op_2_4=null;\n EObject this_PowerExpr_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalSafetyParser.g:7752:2: ( (this_PowerExpr_0= rulePowerExpr ( ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) ) ( (lv_right_3_0= rulePowerExpr ) ) )* ) )\n // InternalSafetyParser.g:7753:2: (this_PowerExpr_0= rulePowerExpr ( ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) ) ( (lv_right_3_0= rulePowerExpr ) ) )* )\n {\n // InternalSafetyParser.g:7753:2: (this_PowerExpr_0= rulePowerExpr ( ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) ) ( (lv_right_3_0= rulePowerExpr ) ) )* )\n // InternalSafetyParser.g:7754:3: this_PowerExpr_0= rulePowerExpr ( ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) ) ( (lv_right_3_0= rulePowerExpr ) ) )*\n {\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getMultDivExprAccess().getPowerExprParserRuleCall_0());\n \t\t\n }\n pushFollow(FollowSets000.FOLLOW_87);\n this_PowerExpr_0=rulePowerExpr();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent = this_PowerExpr_0;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n // InternalSafetyParser.g:7762:3: ( ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) ) ( (lv_right_3_0= rulePowerExpr ) ) )*\n loop102:\n do {\n int alt102=2;\n switch ( input.LA(1) ) {\n case Asterisk:\n {\n int LA102_2 = input.LA(2);\n\n if ( (synpred26_InternalSafetyParser()) ) {\n alt102=1;\n }\n\n\n }\n break;\n case Solidus:\n {\n int LA102_3 = input.LA(2);\n\n if ( (synpred26_InternalSafetyParser()) ) {\n alt102=1;\n }\n\n\n }\n break;\n case Div:\n {\n int LA102_4 = input.LA(2);\n\n if ( (synpred26_InternalSafetyParser()) ) {\n alt102=1;\n }\n\n\n }\n break;\n case Mod:\n {\n int LA102_5 = input.LA(2);\n\n if ( (synpred26_InternalSafetyParser()) ) {\n alt102=1;\n }\n\n\n }\n break;\n\n }\n\n switch (alt102) {\n \tcase 1 :\n \t // InternalSafetyParser.g:7763:4: ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) ) ( (lv_right_3_0= rulePowerExpr ) )\n \t {\n \t // InternalSafetyParser.g:7763:4: ( ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) ) )\n \t // InternalSafetyParser.g:7764:5: ( ( () ( ( ( Asterisk | Solidus | Div | Mod ) ) ) ) )=> ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) )\n \t {\n \t // InternalSafetyParser.g:7782:5: ( () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) ) )\n \t // InternalSafetyParser.g:7783:6: () ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) )\n \t {\n \t // InternalSafetyParser.g:7783:6: ()\n \t // InternalSafetyParser.g:7784:7: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\tcurrent = forceCreateModelElementAndSet(\n \t \t\t\t\t\t\t\t\tgrammarAccess.getMultDivExprAccess().getBinaryExprLeftAction_1_0_0_0(),\n \t \t\t\t\t\t\t\t\tcurrent);\n \t \t\t\t\t\t\t\n \t }\n\n \t }\n\n \t // InternalSafetyParser.g:7790:6: ( ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) ) )\n \t // InternalSafetyParser.g:7791:7: ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) )\n \t {\n \t // InternalSafetyParser.g:7791:7: ( (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod ) )\n \t // InternalSafetyParser.g:7792:8: (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod )\n \t {\n \t // InternalSafetyParser.g:7792:8: (lv_op_2_1= Asterisk | lv_op_2_2= Solidus | lv_op_2_3= Div | lv_op_2_4= Mod )\n \t int alt101=4;\n \t switch ( input.LA(1) ) {\n \t case Asterisk:\n \t {\n \t alt101=1;\n \t }\n \t break;\n \t case Solidus:\n \t {\n \t alt101=2;\n \t }\n \t break;\n \t case Div:\n \t {\n \t alt101=3;\n \t }\n \t break;\n \t case Mod:\n \t {\n \t alt101=4;\n \t }\n \t break;\n \t default:\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 101, 0, input);\n\n \t throw nvae;\n \t }\n\n \t switch (alt101) {\n \t case 1 :\n \t // InternalSafetyParser.g:7793:9: lv_op_2_1= Asterisk\n \t {\n \t lv_op_2_1=(Token)match(input,Asterisk,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_1, grammarAccess.getMultDivExprAccess().getOpAsteriskKeyword_1_0_0_1_0_0());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getMultDivExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // InternalSafetyParser.g:7804:9: lv_op_2_2= Solidus\n \t {\n \t lv_op_2_2=(Token)match(input,Solidus,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_2, grammarAccess.getMultDivExprAccess().getOpSolidusKeyword_1_0_0_1_0_1());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getMultDivExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n \t case 3 :\n \t // InternalSafetyParser.g:7815:9: lv_op_2_3= Div\n \t {\n \t lv_op_2_3=(Token)match(input,Div,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_3, grammarAccess.getMultDivExprAccess().getOpDivKeyword_1_0_0_1_0_2());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getMultDivExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_3, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n \t case 4 :\n \t // InternalSafetyParser.g:7826:9: lv_op_2_4= Mod\n \t {\n \t lv_op_2_4=(Token)match(input,Mod,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_4, grammarAccess.getMultDivExprAccess().getOpModKeyword_1_0_0_1_0_3());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getMultDivExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_4, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // InternalSafetyParser.g:7841:4: ( (lv_right_3_0= rulePowerExpr ) )\n \t // InternalSafetyParser.g:7842:5: (lv_right_3_0= rulePowerExpr )\n \t {\n \t // InternalSafetyParser.g:7842:5: (lv_right_3_0= rulePowerExpr )\n \t // InternalSafetyParser.g:7843:6: lv_right_3_0= rulePowerExpr\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewCompositeNode(grammarAccess.getMultDivExprAccess().getRightPowerExprParserRuleCall_1_1_0());\n \t \t\t\t\t\t\n \t }\n \t pushFollow(FollowSets000.FOLLOW_87);\n \t lv_right_3_0=rulePowerExpr();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getMultDivExprRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\tset(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"right\",\n \t \t\t\t\t\t\t\tlv_right_3_0,\n \t \t\t\t\t\t\t\t\"com.rockwellcollins.atc.agree.Agree.PowerExpr\");\n \t \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop102;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "public double Dividir(double operador_1, double operador_2){\n return DivisionC(operador_1, operador_2);\n }", "public void completeMultDivExpr_Op(EObject model, Assignment assignment, ContentAssistContext context,\n\t\t\tICompletionProposalAcceptor acceptor) {\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t}", "@Override\n\tpublic Number operate(Number expr1) {\n\t\treturn null;\n\t}", "LogicExpression getLeftExp();", "public Integer perform (IExpression left, IExpression right);", "@Override\n\tpublic String visitSubexpr(SubexprContext ctx) {\n\t\t\n\t\tif(ctx.getChildCount()==1)\n\t\t{\n\t\t\treturn visitValue(ctx.value())\t;\t}\n\t\telse\n\t\t{\n\t\t\tString result = \"\";\n\t\t\tresult = \"temp\"+count.count++;\n\t\t\tif(ctx.getChild(1).getText().equals(\"*\"))\n\t\t\t{\n\t\t\t\n\t\t\t\n\t\t\tsb.append(\"MUL \"+visit(ctx.children.get(0))+\" \"+visitValue(ctx.value())+\" \"+ result+\"\\n\");\n\t\t\treturn result;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsb.append(\"DIV \"+visit(ctx.children.get(0))+ \" \"+visitValue(ctx.value())+\" \"+result+\"\\n\");\n\t\t\t\treturn \tresult;\n\t\t\t}\n\t\t}\n\t\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "public void testORDINARY_DIV2() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 11, \"pale\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "@Override\n public Expression differentiate(String var) {\n Expression firstLn = new Log(new Var(\"e\"), this.getEx2());\n Expression secondLn = new Log(new Var(\"e\"), this.getEx2());\n Expression denom = new Pow(secondLn, new Num(2));\n Expression div1 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression div2 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression mult1 = new Mult(div1, secondLn);\n Expression mult2 = new Mult(div2, firstLn);\n Expression numer = new Minus(mult1, mult2);\n Expression difEx = new Div(numer, denom);\n return difEx;\n \n \n \n /*Expression newExp1 = new Div(ex2.differentiate(var), ex2);\n Expression newExp2 = new Div(ex1.differentiate(var), ex1);\n return new Div(newExp1, newExp2).differentiate(var).differentiate(var);\n //return new Div(new Div(ex2.differentiate(var), ex2), new Div(ex1.differentiate(var), ex1));\n ///NEED TO TEST BETTER */\n\n }", "public <V extends Number> FluentExp<V> div (V value)\n {\n return new Div<V>(this, value);\n }", "public Divide(Expression a) {\n super(Expression.X_COMES_AFTER);\n this.a = a;\n }", "public void testORDINARY_DIV4() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 13, \"cross\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "@Override\n public Expression simplify() {\n Expression right = getExpRight().simplify();\n Expression left = getExpLeft().simplify();\n //check if you can simplify more\n Num zero = new Num(0), one = new Num(1);\n //check if the left expression equals to zero\n if (zero.isEqual(left)) {\n return zero;\n }\n //check if the right expression equals to zero\n if (zero.isEqual(right)) {\n return zero;\n }\n //check if the left expression equals to one\n if (one.isEqual(left)) {\n return right;\n }\n //check if the right expression equals to one\n if (one.isEqual(right)) {\n return left;\n }\n try {\n //check if the expression is a number\n double value = evaluate();\n return new Num(value);\n } catch (Exception e) {\n return new Mult(left, right);\n }\n }", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "public Divide(Expression a, Expression b) {\n super(Expression.X_IS_UNDEFINED);\n this.a = a;\n this.b = b;\n }", "@Override\n public double calcValue() throws IllegalArgumentException {\n // calcolo ricorsivo del risultato dell'operazione\n double l = leftChild.calcValue();\n double r = rightChild.calcValue();\n // effettivo calcolo del risultato\n return oper.getOperation().calcValue(l, r);\n }", "public Arginfo visit(DivExpression n, Arginfo argu) {\n\t \t Arginfo _ret=null;\n\t int num=labelctr++;\n\t System.out.println(\"BEGIN\\nNOOP\\n RETURN DIV \");\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t \n\t System.out.println(\"\\nEND\\n\");\n\t return _ret;\n }", "public void testVARIABLE_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"VARIABLE_DIV\", 103, \"gyronny\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"VARIABLE_DIV\", expecting, actual);\n\t}", "private void divOperands() {\n\t\tif (text_Operand3.getText().isEmpty()) {\n\t\t\ttext_Operand3.setText(\"5\");\n\t\t}\n\t\tif (text_Operand4.getText().isEmpty()) {\n\t\t\ttext_Operand4.setText(\"5\");\n\t\t}\n\n\t\t/*\n\t\t * It will pass the value to the bussiness logic so trhat the further logics can\n\t\t * be performed on them.\n\t\t */\n\n\t\tif (conversionIsRequired(comboBox1.getSelectionModel().getSelectedItem(),\n\t\t\t\tcomboBox2.getSelectionModel().getSelectedItem())) {\n\t\t\tdouble op1 = Double.parseDouble(text_Operand1.getText());\n\t\t\tdouble op1et = Double.parseDouble(text_Operand3.getText());\n\t\t\tperform.setOperand1(String.valueOf(op1 * theFactor));\n\t\t\tperform.setOperand3(String.valueOf(op1et * theFactor));\n\t\t}\n\t\tif (binaryOperandIssues()) // If there are issues with the operands, return\n\t\t\treturn; // without doing the computation\n\t\tdouble x = Double.parseDouble(text_Operand2.getText());\n\t\tif (x == 0f) {\n\t\t\tlabel_errResult.setText(\"Divide by zero is not allowed\");\n\t\t\ttext_Result.setText(\"\");\n\n\t\t} else {\n\t\t\tString theAnswer = perform.division(); // Call the business logic Division method\n\t\t\tlabel_errResult.setText(\"\"); // Reset any result error messages from before\n\t\t\tString theAnswer1 = perform.division1(); // Call the business logic Division method\n\t\t\tlabel_errResulterr.setText(\"\"); // Reset any result error messages from before\n\n\t\t\tif (theAnswer.length() > 0 || theAnswer1.length() > 0) { // Check the returned String to see if it is okay\n\t\t\t\ttext_Result.setText(theAnswer); // If okay, display it in the result field and\n\t\t\t\tlabel_Result.setText(\"Quotient\"); // change the title of the field to \"Divide\".\n\t\t\t\tlabel_Result.setLayoutX(70);\n\t\t\t\tlabel_Result.setLayoutY(345);\n\t\t\t\ttext_Resulterr.setText(theAnswer1); // If okay, display it in the result field and\n\t\t\t\t// change the title of the field to \"Divide\"\n\t\t\t\tcomboBoxRes.getSelectionModel().select(comboBox1.getSelectionModel().getSelectedItem() + \"/\"\n\t\t\t\t\t\t+ comboBox2.getSelectionModel().getSelectedItem());\n\t\t\t} else { // Some error occurred while doing the division.\n\t\t\t\ttext_Result.setText(\"\"); // Do not display a result if there is an error.\n\t\t\t\tlabel_Result.setText(\"Result\"); // Reset the result label if there is an error.\n\t\t\t\tlabel_errResult.setText(perform.getResultErrorMessage()); // Display the error message.\n\t\t\t\ttext_Resulterr.setText(\"\"); // Do not display a result if there is an error.\n\t\t\t\t// Reset the result label if there is an error.\n\t\t\t\tlabel_errResulterr.setText(perform.getResulterrErrorMessage()); // Display the error message.\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n public void visit(CalcExpr node) {\n }", "public int compute(ArrayList<variable> variables) {\n int l = left.compute(variables); // get value of left side\n int r = right.compute(variables); // get value of right side\n if (l == -999) { // if left side is an id\n l = getValue(variables, left); // get the value from the variables array list\n }\n if (r == -999) { // if right side is an id\n r = getValue(variables, right); // get the value from the variables array list\n }\n if (operator.getArithmeticOp().equals(\"*\")) {\n return (int) l * r;\n } else if (operator.getArithmeticOp().equals(\"/\")) {\n return (int) l / r;\n } else if (operator.getArithmeticOp().equals(\"+\")) {\n return (int) l + r;\n } else if (operator.getArithmeticOp().equals(\"-\")) {\n return (int) l - r;\n } else if (operator.getArithmeticOp().equals(\"%\")) {\n return (int) l % r;\n } else if (operator.getArithmeticOp().equals(\"\\\\\")) {\n return (int) r / l;\n } else {\n return -999;\n }\n }", "public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public final void mDIV() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.DIV;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:714:5: ( 'div' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:714:7: 'div'\n\t\t\t{\n\t\t\t\tthis.match(\"div\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public void divide(Object divValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, divValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() / getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() / getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }", "@Override\r\n\tpublic Expression simplify() {\n\t\tSystem.out.println(\"减法化简\");\r\n\t\tExpression newLeft = left.simplify();\r\n Expression newRight = right.simplify();\r\n ConstantExpression leftConst =null;\r\n ConstantExpression rightConst =null;\r\n NegateExpression rightNegate =null;\r\n try {\r\n \tleftConst =(ConstantExpression) newLeft;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightConst =(ConstantExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightNegate =(NegateExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\t\r\n\t\tif ( leftConst != null && rightConst != null )\r\n {\r\n // two constants; just evaluate it;\r\n return new ConstantExpression( leftConst.getValue()- rightConst.getValue());\r\n }\r\n else if ( leftConst != null && leftConst.getValue()== 0 )\r\n {\r\n // 0 - y; return -y;\r\n if ( rightNegate != null )\r\n {\r\n // y = -u (--u); return u;\r\n return rightNegate.child;\r\n }\r\n return new NegateExpression( newRight );\r\n }\r\n else if ( rightConst != null && rightConst.getValue()== 0 )\r\n {\r\n // x - 0; return x;\r\n return newLeft;\r\n }\r\n else if ( rightNegate != null )\r\n {\r\n // x - -y; return x + y;\r\n return new AddExpression( newLeft, rightNegate.child );\r\n }\r\n\t\tif(newLeft.toString().equals(newRight.toString())){\r\n\t\t\treturn new ConstantExpression(0);\r\n\t\t}\r\n // x - y; no simplification\r\n return new SubExpression( newLeft, newRight );\r\n\t}", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void testSUBORDINARY_DIV2() throws Exception {\n\t\tObject retval = execLexer(\"SUBORDINARY_DIV\", 29, \"pale\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"SUBORDINARY_DIV\", expecting, actual);\n\t}", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "public final EObject ruleNumericalMultiplyDivideExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalUnaryExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3144:28: ( (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3145:1: (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3145:1: (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3146:5: this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getNumericalUnaryExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumericalUnaryExpression_in_ruleNumericalMultiplyDivideExpression7167);\r\n this_NumericalUnaryExpression_0=ruleNumericalUnaryExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumericalUnaryExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:1: ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )*\r\n loop50:\r\n do {\r\n int alt50=2;\r\n int LA50_0 = input.LA(1);\r\n\r\n if ( (LA50_0==33||(LA50_0>=74 && LA50_0<=75)) ) {\r\n alt50=1;\r\n }\r\n\r\n\r\n switch (alt50) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:2: () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3155:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getNumericalMultiplyDivideExpressionAccess().getNumericalMultiplyDivideExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3160:2: ( (lv_operator_2_0= ruleMultiplicativeOperator ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3161:1: (lv_operator_2_0= ruleMultiplicativeOperator )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3161:1: (lv_operator_2_0= ruleMultiplicativeOperator )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3162:3: lv_operator_2_0= ruleMultiplicativeOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getOperatorMultiplicativeOperatorEnumRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicativeOperator_in_ruleNumericalMultiplyDivideExpression7197);\r\n \t lv_operator_2_0=ruleMultiplicativeOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalMultiplyDivideExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"MultiplicativeOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3178:2: ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3179:1: (lv_rightOperand_3_0= ruleNumericalUnaryExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3179:1: (lv_rightOperand_3_0= ruleNumericalUnaryExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3180:3: lv_rightOperand_3_0= ruleNumericalUnaryExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getRightOperandNumericalUnaryExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumericalUnaryExpression_in_ruleNumericalMultiplyDivideExpression7218);\r\n \t lv_rightOperand_3_0=ruleNumericalUnaryExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalMultiplyDivideExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"NumericalUnaryExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop50;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "@Override\n\tpublic int Calculate(int constant, Expression left, Expression right) {\n\t\treturn left.evaluate()-right.evaluate();\n\t}", "public int divide(int number1, int number2)\n\t\tthrows CalculatorOperationException;", "public void div(String operand, Integer value) throws Exception{\n Integer divisor = null;\n if (operand.equals(\"=\")){\n divisor = value;\n }else if (operand.equals(\" \")){\n divisor = dataMemory.getData(value);\n }else if (operand.equals(\"*\")){\n Integer newDirection = dataMemory.getData(value);\n divisor = dataMemory.getData(newDirection);\n }else{\n throw new IllegalArgumentException(\"No valid operand\");\n }\n\n Integer dividend = dataMemory.getData(0);\n Integer sum = 0;\n Integer quotient = 0;\n while (sum < dividend){\n sum += divisor;\n quotient++;\n }\n\n /*In case that the remainder isn't zero*/\n if (sum > dividend)\n quotient--;\n\n dataMemory.setData(0, quotient);\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public void testORDINARY_DIV3() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 12, \"bend\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "static Double executeDivition(List<Double> operands) {\n Double result = null;\n for (Double operand : operands) {\n if (Objects.isNull(result)) {\n result = operand;\n }\n else {\n result = result / operand;\n }\n }\n return result;\n }", "@Test(expected = ArithmeticException.class)\n\tpublic void divisionByZeroTest() {\n\t\tMathOperation division = new Division();\n\t\tdivision.operator(TWENTY, ZERO);\n\t}", "public final void rule__PredicateDivision__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4574:1: ( ( () ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4575:1: ( () )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4575:1: ( () )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4576:1: ()\n {\n before(grammarAccess.getPredicateDivisionAccess().getPredicateDivLeftAction_1_0()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4577:1: ()\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4579:1: \n {\n }\n\n after(grammarAccess.getPredicateDivisionAccess().getPredicateDivLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "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 }", "@Test\n @ExcludeIn(DERBY)\n public void math3() {\n // 1.0 + 2.0 * 3.0 - 4.0 / 5.0 + 6.0 % 3.0\n NumberTemplate<Double> one = Expressions.numberTemplate(Double.class, \"1.0\");\n NumberTemplate<Double> two = Expressions.numberTemplate(Double.class, \"2.0\");\n NumberTemplate<Double> three = Expressions.numberTemplate(Double.class, \"3.0\");\n NumberTemplate<Double> four = Expressions.numberTemplate(Double.class, \"4.0\");\n NumberTemplate<Double> five = Expressions.numberTemplate(Double.class, \"5.0\");\n NumberTemplate<Double> six = Expressions.numberTemplate(Double.class, \"6.0\");\n Double num = query().select(one.add(two.multiply(three)).subtract(four.divide(five)).add(six.mod(three))).fetchFirst();\n Assert.assertEquals(6.2, num, 0.001);\n }", "public Node term()\r\n\t{\r\n\t\tNode lhs = negaposi();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.TIMES\r\n\t\t\t\t||token == Lexer.Token.DIVIDE)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = negaposi(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.TIMES)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Mul(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.DIVIDE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Div(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "NumericExpression createNumericExpression();", "LogicExpression getExpr();", "@Test\n\tvoid divide() {\n\t\tfloat result = calculator.divide(12, 4);\n\t\tassertEquals(3,result);\n\t}", "protected void sequence_MathDivmulOperation(ISerializationContext context, MathDivmulOperation semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public void testVARIABLE_DIV2() throws Exception {\n\t\tObject retval = execLexer(\"VARIABLE_DIV\", 104, \"barry\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"VARIABLE_DIV\", expecting, actual);\n\t}", "LengthScalarDivide createLengthScalarDivide();", "public void testORDINARY_DIV5() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 14, \"saltire\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "public final void rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2972:1: ( ( '*' ) | ( '/' ) | ( 'div' ) | ( 'mod' ) )\n int alt18=4;\n switch ( input.LA(1) ) {\n case 30:\n {\n alt18=1;\n }\n break;\n case 31:\n {\n alt18=2;\n }\n break;\n case 32:\n {\n alt18=3;\n }\n break;\n case 33:\n {\n alt18=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 18, 0, input);\n\n throw nvae;\n }\n\n switch (alt18) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2973:1: ( '*' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2973:1: ( '*' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2974:1: '*'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAsteriskKeyword_1_1_0_0()); \n match(input,30,FOLLOW_30_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06420); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAsteriskKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2981:6: ( '/' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2981:6: ( '/' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2982:1: '/'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorSolidusKeyword_1_1_0_1()); \n match(input,31,FOLLOW_31_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06440); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorSolidusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n case 3 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2989:6: ( 'div' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2989:6: ( 'div' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2990:1: 'div'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorDivKeyword_1_1_0_2()); \n match(input,32,FOLLOW_32_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06460); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorDivKeyword_1_1_0_2()); \n\n }\n\n\n }\n break;\n case 4 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2997:6: ( 'mod' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2997:6: ( 'mod' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2998:1: 'mod'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorModKeyword_1_1_0_3()); \n match(input,33,FOLLOW_33_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06480); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorModKeyword_1_1_0_3()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private static int calculate(String expression) {\n if (expression == null || expression.isEmpty()) {\n return 0;\n }\n // 3 - Division from 0\n // Division from zero should not be possible. If a string \"5/0\" is passed, result should be -1\n if (expression.contains(\"/0\")) {\n return -1;\n }\n // 4 - Floating point numbers\n // As mentioned, floating point numbers should not be supported. If string contains not a whole number and not the allowed operations (+-x%) then it should also return -1.\n if (expression.contains(\".\") || !hasOnlyAllowedChars(expression, \"0123456789+-x/!\")) {\n return -1;\n }\n // calculate\n // find partial formulas: 5x3+2x7+1-5+4! -> [\"5x3\", \"2x7\", \"1\", \"5\", \"4!\"]\n String[] operands = findOperands(expression, \"+-\");\n // find operators: 5x3+2x7+1-5+4! -> [\"+\", \"+\", \"-\", \"+\"]\n String[] plusMinus = findOperators(expression, \"+-\");\n // calculates division, multiplication, factorial: 5x3, 2x7, 1, 5, 4!\n int result = findNumberDivMultiFactorial(operands[0]);\n for (int i = 1; i < operands.length; i++) {\n switch (plusMinus[i - 1]) {\n case \"+\":\n result = result + findNumberDivMultiFactorial(operands[i]);\n break;\n case \"-\":\n result = result - findNumberDivMultiFactorial(operands[i]);\n break;\n }\n }\n\n return result;\n }", "public void testCONTINUOUS_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"CONTINUOUS_DIV\", 98, \"chequy\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"CONTINUOUS_DIV\", expecting, actual);\n\t}", "@Test\n public void testParseDiv() {\n System.out.println(\"testParseDiv\");\n\n byte[] expected = {\n Instruction.LIT.getId(), 0, 1,\n Instruction.LIT.getId(), 0, 2,\n Instruction.DIV.getId(),\n Instruction.LV.getId(), 0, 0, 32,\n Instruction.DIV.getId()\n };\n\n TermParser p = TermParserTestSetup.getDivTermSetup();\n assertEquals(\"Parse\", true, p.parse());\n AssemblerCodeChecker.assertCodeEquals(\"Code \", expected, TermParserTestSetup.getByteCode());\n }", "private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }", "public void testORDINARY_DIV6() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 15, \"chevron\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "private void calculate () {\n try {\n char[] expression = expressionView.getText().toString().trim().toCharArray();\n String temp = expressionView.getText().toString().trim();\n for (int i = 0; i < expression.length; i++) {\n if (expression[i] == '\\u00D7')\n expression[i] = '*';\n if (expression[i] == '\\u00f7')\n expression[i] = '/';\n if (expression[i] == '√')\n expression[i] = '²';\n }\n if (expression.length > 0) {\n Balan balan = new Balan();\n double realResult = balan.valueMath(String.copyValueOf(expression));\n int naturalResult;\n String finalResult;\n if (realResult % 1 == 0) {\n naturalResult = (int) Math.round(realResult);\n finalResult = String.valueOf(naturalResult);\n } else\n finalResult = String.valueOf(realResult);\n String error = balan.getError();\n // check error\n if (error != null) {\n mIsError = true;\n resultView.setText(error);\n if (error == \"Error div 0\")\n resultView.setText(\"Math Error\");\n } else { // show result\n expressionView.setText(temp);\n resultView.setText(finalResult);\n }\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "@Override\n\tpublic int calculation(int a, int b) {\n\t\treturn b/a;\n\t}", "public final EObject ruleNumericalAddSubtractExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalMultiplyDivideExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3072:28: ( (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3073:1: (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3073:1: (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3074:5: this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getNumericalMultiplyDivideExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumericalMultiplyDivideExpression_in_ruleNumericalAddSubtractExpression7021);\r\n this_NumericalMultiplyDivideExpression_0=ruleNumericalMultiplyDivideExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumericalMultiplyDivideExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:1: ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )*\r\n loop49:\r\n do {\r\n int alt49=2;\r\n int LA49_0 = input.LA(1);\r\n\r\n if ( ((LA49_0>=72 && LA49_0<=73)) ) {\r\n alt49=1;\r\n }\r\n\r\n\r\n switch (alt49) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:2: () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3083:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getNumericalAddSubtractExpressionAccess().getNumericalAddSubtractExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3088:2: ( (lv_operator_2_0= ruleAdditiveOperator ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3089:1: (lv_operator_2_0= ruleAdditiveOperator )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3089:1: (lv_operator_2_0= ruleAdditiveOperator )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3090:3: lv_operator_2_0= ruleAdditiveOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getOperatorAdditiveOperatorEnumRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAdditiveOperator_in_ruleNumericalAddSubtractExpression7051);\r\n \t lv_operator_2_0=ruleAdditiveOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalAddSubtractExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"AdditiveOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3106:2: ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3107:1: (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3107:1: (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3108:3: lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getRightOperandNumericalMultiplyDivideExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumericalMultiplyDivideExpression_in_ruleNumericalAddSubtractExpression7072);\r\n \t lv_rightOperand_3_0=ruleNumericalMultiplyDivideExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalAddSubtractExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"NumericalMultiplyDivideExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop49;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public void testSUBORDINARY_DIV3() throws Exception {\n\t\tObject retval = execLexer(\"SUBORDINARY_DIV\", 30, \"bend\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"SUBORDINARY_DIV\", expecting, actual);\n\t}", "public static UnitP Division(UnitP first, UnitP second)\n {\n return OperationsPublic.PerformUnitOperation\n (\n first, second, Operations.Division,\n OperationsOther.GetOperationString(first, second, Operations.Division) \n );\n }", "public interface SOSLWithDivisionFilterExpressionTree extends ExpressionTree{\n public LiteralTree getDivisionField();\n}", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public final void rule__PredicateMultiplication__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4356:1: ( ( rulePredicateDivision ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4357:1: ( rulePredicateDivision )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4357:1: ( rulePredicateDivision )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4358:1: rulePredicateDivision\n {\n before(grammarAccess.getPredicateMultiplicationAccess().getPredicateDivisionParserRuleCall_0()); \n pushFollow(FOLLOW_rulePredicateDivision_in_rule__PredicateMultiplication__Group__0__Impl8566);\n rulePredicateDivision();\n\n state._fsp--;\n\n after(grammarAccess.getPredicateMultiplicationAccess().getPredicateDivisionParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public T div(T first, T second);", "private Expression divisionRelation(Expression s, Expression t) {\n return exists(var(\"z\"), equal(multi(s, var(\"z\")), t));\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public void testORDINARY_DIV10() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 19, \"colour\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}", "Expression getExp();", "private void equate()\n\t{\n\t\t\tif(Fun == Function.ADD)\n\t\t\t{\t\t\t\n\t\t\t\tresult = calc.sum ( );\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end ADD condition\n\t\t\t\n\t\t\telse if(Fun == Function.SUBTRACT)\n\t\t\t{\n\t\t\t\tresult = calc.subtract ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end SUBTRACT condition\n\t\t\t\n\t\t\telse if (Fun == Function.MULTIPLY)\n\t\t\t{\n\t\t\t\tresult = calc.multiply ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end MULTIPLY condition\n\t\t\t\n\t\t\telse if (Fun == Function.DIVIDE)\n\t\t\t{\n\t\t\t\tresult = calc.divide ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}\n\t\t\t\t\n\t}", "public void testVARIABLE_DIV4() throws Exception {\n\t\tObject retval = execLexer(\"VARIABLE_DIV\", 106, \"paly\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"VARIABLE_DIV\", expecting, actual);\n\t}", "public static BinaryExpression power(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public void divide(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.DIV));\n }\n }\n }\n }" ]
[ "0.65615976", "0.64758545", "0.64591306", "0.6283896", "0.62051445", "0.6174351", "0.6049292", "0.60179466", "0.5977571", "0.5913475", "0.5894271", "0.5826343", "0.5775716", "0.57466525", "0.56290096", "0.5605775", "0.5600845", "0.5585973", "0.5561191", "0.5553966", "0.5514915", "0.5513642", "0.5509711", "0.548484", "0.5482575", "0.5474392", "0.547084", "0.5462075", "0.5451861", "0.5424753", "0.54184574", "0.5393507", "0.539285", "0.5384435", "0.5383132", "0.53808296", "0.5370776", "0.53693515", "0.5352967", "0.534879", "0.53425884", "0.5328035", "0.5308883", "0.53071946", "0.530083", "0.528736", "0.52822995", "0.5280427", "0.5277172", "0.5277135", "0.5267791", "0.52586186", "0.5257443", "0.52540386", "0.52433103", "0.524002", "0.52354175", "0.52322537", "0.5227602", "0.521846", "0.52182865", "0.52168024", "0.52076566", "0.52027357", "0.51939064", "0.51875687", "0.51874536", "0.5179228", "0.5178599", "0.5178079", "0.51755714", "0.51749253", "0.51747686", "0.5168533", "0.5168146", "0.51679903", "0.51638687", "0.5159958", "0.51542634", "0.51456714", "0.5142898", "0.5138594", "0.51335835", "0.5129049", "0.5126649", "0.51235306", "0.51221377", "0.51204675", "0.51067317", "0.5104055", "0.5102709", "0.5100938", "0.5099089", "0.50839883", "0.5081806", "0.5080115", "0.5074546", "0.50713986", "0.5069192", "0.5064921" ]
0.5356431
38
Contexts: Expression returns Multi Addition returns Multi Addition.Plus_1_0_0_0 returns Multi Addition.Minus_1_0_1_0 returns Multi Multiplication returns Multi Multiplication.Multi_1_0_0_0 returns Multi Multiplication.Div_1_0_1_0 returns Multi PrimaryExpression returns Multi Constraint: (left=Multiplication_Multi_1_0_0_0 right=PrimaryExpression)
protected void sequence_Multiplication(ISerializationContext context, Multi semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.MULTI__LEFT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.MULTI__LEFT)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.MULTI__RIGHT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.MULTI__RIGHT)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0(), semanticObject.getLeft()); feeder.accept(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0(), semanticObject.getRight()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final void rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12396:1: ( ( ( ruleOpMulti ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12397:1: ( ( ruleOpMulti ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12397:1: ( ( ruleOpMulti ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12398:1: ( ruleOpMulti )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12399:1: ( ruleOpMulti )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12400:1: ruleOpMulti\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \n }\n pushFollow(FOLLOW_ruleOpMulti_in_rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_124876);\n ruleOpMulti();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final EObject ruleMultiplication() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_PrimaryExpression_0 = null;\n\n EObject lv_right_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4173:28: ( (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4174:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4174:1: (this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4175:5: this_PrimaryExpression_0= rulePrimaryExpression ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )*\n {\n \n newCompositeNode(grammarAccess.getMultiplicationAccess().getPrimaryExpressionParserRuleCall_0()); \n \n pushFollow(FOLLOW_rulePrimaryExpression_in_ruleMultiplication9397);\n this_PrimaryExpression_0=rulePrimaryExpression();\n\n state._fsp--;\n\n \n current = this_PrimaryExpression_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:1: ( ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) ) )*\n loop41:\n do {\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( ((LA41_0>=68 && LA41_0<=69)) ) {\n alt41=1;\n }\n\n\n switch (alt41) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:2: ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) ) ( (lv_right_5_0= rulePrimaryExpression ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:2: ( ( () otherlv_2= '*' ) | ( () otherlv_4= '/' ) )\n \t int alt40=2;\n \t int LA40_0 = input.LA(1);\n\n \t if ( (LA40_0==68) ) {\n \t alt40=1;\n \t }\n \t else if ( (LA40_0==69) ) {\n \t alt40=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 40, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt40) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:3: ( () otherlv_2= '*' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:3: ( () otherlv_2= '*' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:4: () otherlv_2= '*'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4183:4: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4184:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicationAccess().getMultiLeftAction_1_0_0_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_2=(Token)match(input,68,FOLLOW_68_in_ruleMultiplication9420); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getMultiplicationAccess().getAsteriskKeyword_1_0_0_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:6: ( () otherlv_4= '/' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:6: ( () otherlv_4= '/' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:7: () otherlv_4= '/'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4194:7: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4195:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_4=(Token)match(input,69,FOLLOW_69_in_ruleMultiplication9449); \n\n \t \tnewLeafNode(otherlv_4, grammarAccess.getMultiplicationAccess().getSolidusKeyword_1_0_1_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4204:3: ( (lv_right_5_0= rulePrimaryExpression ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4205:1: (lv_right_5_0= rulePrimaryExpression )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4205:1: (lv_right_5_0= rulePrimaryExpression )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4206:3: lv_right_5_0= rulePrimaryExpression\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0()); \n \t \t \n \t pushFollow(FOLLOW_rulePrimaryExpression_in_ruleMultiplication9472);\n \t lv_right_5_0=rulePrimaryExpression();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicationRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_5_0, \n \t \t\t\"PrimaryExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop41;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17641:1: ( ( ( ruleOpMulti ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17642:1: ( ( ruleOpMulti ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17642:1: ( ( ruleOpMulti ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17643:1: ( ruleOpMulti )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17644:1: ( ruleOpMulti )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17645:1: ruleOpMulti\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_ruleOpMulti_in_rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_135628);\r\n ruleOpMulti();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17664:1: ( ( ( ruleOpMulti ) ) )\r\n // InternalDroneScript.g:17665:2: ( ( ruleOpMulti ) )\r\n {\r\n // InternalDroneScript.g:17665:2: ( ( ruleOpMulti ) )\r\n // InternalDroneScript.g:17666:3: ( ruleOpMulti )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n // InternalDroneScript.g:17667:3: ( ruleOpMulti )\r\n // InternalDroneScript.g:17668:4: ruleOpMulti\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleOpMulti();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementOpMultiParserRuleCall_1_0_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final VecMathParser.multExpr_return multExpr() throws RecognitionException {\n VecMathParser.multExpr_return retval = new VecMathParser.multExpr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal11=null;\n Token char_literal12=null;\n VecMathParser.primary_return primary10 = null;\n\n VecMathParser.primary_return primary13 = null;\n\n\n Object char_literal11_tree=null;\n Object char_literal12_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:5: ( primary ( ( '*' | '.' ) primary )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:9: primary ( ( '*' | '.' ) primary )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_primary_in_multExpr145);\n primary10=primary();\n\n state._fsp--;\n\n adaptor.addChild(root_0, primary10.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:17: ( ( '*' | '.' ) primary )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=11 && LA5_0<=12)) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' ) primary\n \t {\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:18: ( '*' | '.' )\n \t int alt4=2;\n \t int LA4_0 = input.LA(1);\n\n \t if ( (LA4_0==11) ) {\n \t alt4=1;\n \t }\n \t else if ( (LA4_0==12) ) {\n \t alt4=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 4, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt4) {\n \t case 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:19: '*'\n \t {\n \t char_literal11=(Token)match(input,11,FOLLOW_11_in_multExpr149); \n \t char_literal11_tree = (Object)adaptor.create(char_literal11);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal11_tree, root_0);\n\n\n \t }\n \t break;\n \t case 2 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:18:24: '.'\n \t {\n \t char_literal12=(Token)match(input,12,FOLLOW_12_in_multExpr152); \n \t char_literal12_tree = (Object)adaptor.create(char_literal12);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal12_tree, root_0);\n\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_primary_in_multExpr156);\n \t primary13=primary();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, primary13.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Expression commutativeExp() {\r\n return this;\r\n }", "public final void additiveExpression() throws RecognitionException {\n int additiveExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"additiveExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(807, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 119) ) { return ; }\n // Java.g:808:5: ( multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )* )\n dbg.enterAlt(1);\n\n // Java.g:808:9: multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )*\n {\n dbg.location(808,9);\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4840);\n multiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(808,34);\n // Java.g:808:34: ( ( '+' | '-' ) multiplicativeExpression )*\n try { dbg.enterSubRule(140);\n\n loop140:\n do {\n int alt140=2;\n try { dbg.enterDecision(140);\n\n int LA140_0 = input.LA(1);\n\n if ( ((LA140_0>=105 && LA140_0<=106)) ) {\n alt140=1;\n }\n\n\n } finally {dbg.exitDecision(140);}\n\n switch (alt140) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:808:36: ( '+' | '-' ) multiplicativeExpression\n \t {\n \t dbg.location(808,36);\n \t if ( (input.LA(1)>=105 && input.LA(1)<=106) ) {\n \t input.consume();\n \t state.errorRecovery=false;state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t dbg.recognitionException(mse);\n \t throw mse;\n \t }\n\n \t dbg.location(808,48);\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4852);\n \t multiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop140;\n }\n } while (true);\n } finally {dbg.exitSubRule(140);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 119, additiveExpression_StartIndex); }\n }\n dbg.location(809, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"additiveExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final EObject ruleMultiplicativeExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n Token lv_op_2_3=null;\n EObject this_UnaryExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:729:28: ( (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:730:1: (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:730:1: (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:731:5: this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getUnaryExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleMultiplicativeExpression1682);\n this_UnaryExpression_0=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:1: ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )*\n loop12:\n do {\n int alt12=2;\n switch ( input.LA(1) ) {\n case 35:\n {\n int LA12_2 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n case 36:\n {\n int LA12_3 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n case 37:\n {\n int LA12_4 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n\n }\n\n switch (alt12) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:2: ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:2: ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:3: ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:6: ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:7: () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:756:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:761:2: ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:762:1: ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:762:1: ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:763:1: (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:763:1: (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' )\n \t int alt11=3;\n \t switch ( input.LA(1) ) {\n \t case 35:\n \t {\n \t alt11=1;\n \t }\n \t break;\n \t case 36:\n \t {\n \t alt11=2;\n \t }\n \t break;\n \t case 37:\n \t {\n \t alt11=3;\n \t }\n \t break;\n \t default:\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 11, 0, input);\n\n \t throw nvae;\n \t }\n\n \t switch (alt11) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:764:3: lv_op_2_1= '*'\n \t {\n \t lv_op_2_1=(Token)match(input,35,FOLLOW_35_in_ruleMultiplicativeExpression1768); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getMultiplicativeExpressionAccess().getOpAsteriskKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:776:8: lv_op_2_2= '/'\n \t {\n \t lv_op_2_2=(Token)match(input,36,FOLLOW_36_in_ruleMultiplicativeExpression1797); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getMultiplicativeExpressionAccess().getOpSolidusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 3 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:788:8: lv_op_2_3= '%'\n \t {\n \t lv_op_2_3=(Token)match(input,37,FOLLOW_37_in_ruleMultiplicativeExpression1826); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_3, grammarAccess.getMultiplicativeExpressionAccess().getOpPercentSignKeyword_1_0_0_1_0_2());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_3, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:803:4: ( (lv_right_3_0= ruleUnaryExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:804:1: (lv_right_3_0= ruleUnaryExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:804:1: (lv_right_3_0= ruleUnaryExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:805:3: lv_right_3_0= ruleUnaryExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightUnaryExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleUnaryExpression_in_ruleMultiplicativeExpression1865);\n \t lv_right_3_0=ruleUnaryExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"UnaryExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop12;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final CQLParser.multiplicativeExpression_return multiplicativeExpression() throws RecognitionException {\n CQLParser.multiplicativeExpression_return retval = new CQLParser.multiplicativeExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set100=null;\n CQLParser.powerExpression_return powerExpression99 = null;\n\n CQLParser.powerExpression_return powerExpression101 = null;\n\n\n Object set100_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:2: ( powerExpression ( ( MULT | DIV ) powerExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:4: powerExpression ( ( MULT | DIV ) powerExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1886);\n powerExpression99=powerExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, powerExpression99.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:20: ( ( MULT | DIV ) powerExpression )*\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=MULT && LA27_0<=DIV)) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:404:21: ( MULT | DIV ) powerExpression\n \t {\n \t set100=(Token)input.LT(1);\n \t set100=(Token)input.LT(1);\n \t if ( (input.LA(1)>=MULT && input.LA(1)<=DIV) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set100), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_powerExpression_in_multiplicativeExpression1896);\n \t powerExpression101=powerExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, powerExpression101.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop27;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public final void rule__XMultiplicativeExpression__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5117:1: ( ( ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5118:1: ( ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5118:1: ( ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5119:1: ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandAssignment_1_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5120:1: ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5120:2: rule__XMultiplicativeExpression__RightOperandAssignment_1_1\n {\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__RightOperandAssignment_1_1_in_rule__XMultiplicativeExpression__Group_1__1__Impl10539);\n rule__XMultiplicativeExpression__RightOperandAssignment_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandAssignment_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public final CQLParser.additiveExpression_return additiveExpression() throws RecognitionException {\n CQLParser.additiveExpression_return retval = new CQLParser.additiveExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set97=null;\n CQLParser.multiplicativeExpression_return multiplicativeExpression96 = null;\n\n CQLParser.multiplicativeExpression_return multiplicativeExpression98 = null;\n\n\n Object set97_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:2: ( multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:4: multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1862);\n multiplicativeExpression96=multiplicativeExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multiplicativeExpression96.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:29: ( ( PLUS | DIFF ) multiplicativeExpression )*\n loop26:\n do {\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( ((LA26_0>=PLUS && LA26_0<=DIFF)) ) {\n alt26=1;\n }\n\n\n switch (alt26) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:30: ( PLUS | DIFF ) multiplicativeExpression\n \t {\n \t set97=(Token)input.LT(1);\n \t set97=(Token)input.LT(1);\n \t if ( (input.LA(1)>=PLUS && input.LA(1)<=DIFF) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set97), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1872);\n \t multiplicativeExpression98=multiplicativeExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multiplicativeExpression98.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop26;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public final EObject ruleMultiplicativeExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumberExpression_0 = null;\r\n\r\n EObject lv_operator_2_1 = null;\r\n\r\n EObject lv_operator_2_2 = null;\r\n\r\n EObject lv_operator_2_3 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2889:28: ( (this_NumberExpression_0= ruleNumberExpression ( () ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) ) ( (lv_right_3_0= ruleNumberExpression ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2890:1: (this_NumberExpression_0= ruleNumberExpression ( () ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) ) ( (lv_right_3_0= ruleNumberExpression ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2890:1: (this_NumberExpression_0= ruleNumberExpression ( () ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) ) ( (lv_right_3_0= ruleNumberExpression ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2891:5: this_NumberExpression_0= ruleNumberExpression ( () ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) ) ( (lv_right_3_0= ruleNumberExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getNumberExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumberExpression_in_ruleMultiplicativeExpression6185);\r\n this_NumberExpression_0=ruleNumberExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumberExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2899:1: ( () ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) ) ( (lv_right_3_0= ruleNumberExpression ) ) )*\r\n loop40:\r\n do {\r\n int alt40=2;\r\n int LA40_0 = input.LA(1);\r\n\r\n if ( (LA40_0==46||(LA40_0>=66 && LA40_0<=67)) ) {\r\n alt40=1;\r\n }\r\n\r\n\r\n switch (alt40) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2899:2: () ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) ) ( (lv_right_3_0= ruleNumberExpression ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2899:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2900:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2905:2: ( ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2906:1: ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2906:1: ( (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2907:1: (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2907:1: (lv_operator_2_1= ruleMultiplicationOperator | lv_operator_2_2= ruleDivisionOperator | lv_operator_2_3= ruleModulusOperator )\r\n \t int alt39=3;\r\n \t switch ( input.LA(1) ) {\r\n \t case 46:\r\n \t {\r\n \t alt39=1;\r\n \t }\r\n \t break;\r\n \t case 66:\r\n \t {\r\n \t alt39=2;\r\n \t }\r\n \t break;\r\n \t case 67:\r\n \t {\r\n \t alt39=3;\r\n \t }\r\n \t break;\r\n \t default:\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 39, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n\r\n \t switch (alt39) {\r\n \t case 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2908:3: lv_operator_2_1= ruleMultiplicationOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getOperatorMultiplicationOperatorParserRuleCall_1_1_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicationOperator_in_ruleMultiplicativeExpression6217);\r\n \t lv_operator_2_1=ruleMultiplicationOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_1, \r\n \t \t\t\"MultiplicationOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2923:8: lv_operator_2_2= ruleDivisionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getOperatorDivisionOperatorParserRuleCall_1_1_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleDivisionOperator_in_ruleMultiplicativeExpression6236);\r\n \t lv_operator_2_2=ruleDivisionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_2, \r\n \t \t\t\"DivisionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 3 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2938:8: lv_operator_2_3= ruleModulusOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getOperatorModulusOperatorParserRuleCall_1_1_0_2()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleModulusOperator_in_ruleMultiplicativeExpression6255);\r\n \t lv_operator_2_3=ruleModulusOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_3, \r\n \t \t\t\"ModulusOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2956:2: ( (lv_right_3_0= ruleNumberExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2957:1: (lv_right_3_0= ruleNumberExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2957:1: (lv_right_3_0= ruleNumberExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2958:3: lv_right_3_0= ruleNumberExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightNumberExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumberExpression_in_ruleMultiplicativeExpression6279);\r\n \t lv_right_3_0=ruleNumberExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"NumberExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop40;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject ruleAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n EObject this_MultiplicativeExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:632:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:634:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1447);\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_MultiplicativeExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:1: ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==33) ) {\n int LA10_2 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n else if ( (LA10_0==34) ) {\n int LA10_3 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:3: ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:6: ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:656:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:661:2: ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t int alt9=2;\n \t int LA9_0 = input.LA(1);\n\n \t if ( (LA9_0==33) ) {\n \t alt9=1;\n \t }\n \t else if ( (LA9_0==34) ) {\n \t alt9=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 9, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt9) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:664:3: lv_op_2_1= '+'\n \t {\n \t lv_op_2_1=(Token)match(input,33,FOLLOW_33_in_ruleAdditiveExpression1519); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getAdditiveExpressionAccess().getOpPlusSignKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:676:8: lv_op_2_2= '-'\n \t {\n \t lv_op_2_2=(Token)match(input,34,FOLLOW_34_in_ruleAdditiveExpression1548); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getAdditiveExpressionAccess().getOpHyphenMinusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:691:4: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:693:3: lv_right_3_0= ruleMultiplicativeExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1587);\n \t lv_right_3_0=ruleMultiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"MultiplicativeExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void rule__XAdditiveExpression__RightOperandAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12381:1: ( ( ruleXMultiplicativeExpression ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12382:1: ( ruleXMultiplicativeExpression )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12382:1: ( ruleXMultiplicativeExpression )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12383:1: ruleXMultiplicativeExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXMultiplicativeExpression_in_rule__XAdditiveExpression__RightOperandAssignment_1_124841);\n ruleXMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final EObject ruleMultiplicativeExpressionPart() throws RecognitionException {\n EObject current = null;\n\n Enumerator lv_operator_0_0 = null;\n\n EObject lv_operand_1_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3904:6: ( ( ( (lv_operator_0_0= ruleMultiplicativeOperator ) ) ( (lv_operand_1_0= rulePowerExpression ) ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3905:1: ( ( (lv_operator_0_0= ruleMultiplicativeOperator ) ) ( (lv_operand_1_0= rulePowerExpression ) ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3905:1: ( ( (lv_operator_0_0= ruleMultiplicativeOperator ) ) ( (lv_operand_1_0= rulePowerExpression ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3905:2: ( (lv_operator_0_0= ruleMultiplicativeOperator ) ) ( (lv_operand_1_0= rulePowerExpression ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3905:2: ( (lv_operator_0_0= ruleMultiplicativeOperator ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3906:1: (lv_operator_0_0= ruleMultiplicativeOperator )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3906:1: (lv_operator_0_0= ruleMultiplicativeOperator )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3907:3: lv_operator_0_0= ruleMultiplicativeOperator\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getMultiplicativeExpressionPartAccess().getOperatorMultiplicativeOperatorEnumRuleCall_0_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleMultiplicativeOperator_in_ruleMultiplicativeExpressionPart6676);\n lv_operator_0_0=ruleMultiplicativeOperator();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getMultiplicativeExpressionPartRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"operator\",\n \t \t\tlv_operator_0_0, \n \t \t\t\"MultiplicativeOperator\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3929:2: ( (lv_operand_1_0= rulePowerExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3930:1: (lv_operand_1_0= rulePowerExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3930:1: (lv_operand_1_0= rulePowerExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3931:3: lv_operand_1_0= rulePowerExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getMultiplicativeExpressionPartAccess().getOperandPowerExpressionParserRuleCall_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_rulePowerExpression_in_ruleMultiplicativeExpressionPart6697);\n lv_operand_1_0=rulePowerExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getMultiplicativeExpressionPartRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"operand\",\n \t \t\tlv_operand_1_0, \n \t \t\t\"PowerExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public Mult(Expression left, Expression right) {\n super(left, right);\n }", "public final void rule__XAdditiveExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:4813:1: ( ( ruleXMultiplicativeExpression ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:4814:1: ( ruleXMultiplicativeExpression )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:4814:1: ( ruleXMultiplicativeExpression )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:4815:1: ruleXMultiplicativeExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \n }\n pushFollow(FOLLOW_ruleXMultiplicativeExpression_in_rule__XAdditiveExpression__Group__0__Impl9938);\n ruleXMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "BaseNumber multiply(BaseNumber operand);", "public final void rule__PredicateMultiplication__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4417:1: ( ( () ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4418:1: ( () )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4418:1: ( () )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4419:1: ()\n {\n before(grammarAccess.getPredicateMultiplicationAccess().getPredicateMulLeftAction_1_0()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4420:1: ()\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4422:1: \n {\n }\n\n after(grammarAccess.getPredicateMultiplicationAccess().getPredicateMulLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public final void rule__XMultiplicativeExpression__Group_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8322:1: ( ( ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8323:1: ( ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8323:1: ( ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8324:1: ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandAssignment_1_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8325:1: ( rule__XMultiplicativeExpression__RightOperandAssignment_1_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8325:2: rule__XMultiplicativeExpression__RightOperandAssignment_1_1\r\n {\r\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__RightOperandAssignment_1_1_in_rule__XMultiplicativeExpression__Group_1__1__Impl17227);\r\n rule__XMultiplicativeExpression__RightOperandAssignment_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandAssignment_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__AstExpressionMultiplicative__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18369:1: ( ( ( rule__AstExpressionMultiplicative__OperatorAssignment_1_1 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18370:1: ( ( rule__AstExpressionMultiplicative__OperatorAssignment_1_1 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18370:1: ( ( rule__AstExpressionMultiplicative__OperatorAssignment_1_1 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18371:1: ( rule__AstExpressionMultiplicative__OperatorAssignment_1_1 )\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAssignment_1_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18372:1: ( rule__AstExpressionMultiplicative__OperatorAssignment_1_1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18372:2: rule__AstExpressionMultiplicative__OperatorAssignment_1_1\n {\n pushFollow(FOLLOW_rule__AstExpressionMultiplicative__OperatorAssignment_1_1_in_rule__AstExpressionMultiplicative__Group_1__1__Impl36930);\n rule__AstExpressionMultiplicative__OperatorAssignment_1_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAssignment_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAdditiveExpression__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:7266:1: ( ( ruleXMultiplicativeExpression ) )\r\n // InternalDroneScript.g:7267:1: ( ruleXMultiplicativeExpression )\r\n {\r\n // InternalDroneScript.g:7267:1: ( ruleXMultiplicativeExpression )\r\n // InternalDroneScript.g:7268:2: ruleXMultiplicativeExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "Multiply createMultiply();", "public final EObject ruleAddition() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_Multiplication_0 = null;\n\n EObject lv_right_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4104:28: ( (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4106:5: this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n {\n \n newCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9227);\n this_Multiplication_0=ruleMultiplication();\n\n state._fsp--;\n\n \n current = this_Multiplication_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:1: ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n loop39:\n do {\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( ((LA39_0>=66 && LA39_0<=67)) ) {\n alt39=1;\n }\n\n\n switch (alt39) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) )\n \t int alt38=2;\n \t int LA38_0 = input.LA(1);\n\n \t if ( (LA38_0==66) ) {\n \t alt38=1;\n \t }\n \t else if ( (LA38_0==67) ) {\n \t alt38=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 38, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt38) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: () otherlv_2= '+'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4115:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_2=(Token)match(input,66,FOLLOW_66_in_ruleAddition9250); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: () otherlv_4= '-'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4126:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_4=(Token)match(input,67,FOLLOW_67_in_ruleAddition9279); \n\n \t \tnewLeafNode(otherlv_4, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4135:3: ( (lv_right_5_0= ruleMultiplication ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4137:3: lv_right_5_0= ruleMultiplication\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9302);\n \t lv_right_5_0=ruleMultiplication();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_5_0, \n \t \t\t\"Multiplication\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop39;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public final void ruleXMultiplicativeExpression() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:699:2: ( ( ( rule__XMultiplicativeExpression__Group__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:700:1: ( ( rule__XMultiplicativeExpression__Group__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:700:1: ( ( rule__XMultiplicativeExpression__Group__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:701:1: ( rule__XMultiplicativeExpression__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getGroup()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:702:1: ( rule__XMultiplicativeExpression__Group__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:702:2: rule__XMultiplicativeExpression__Group__0\n {\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__Group__0_in_ruleXMultiplicativeExpression1427);\n rule__XMultiplicativeExpression__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAdditiveExpression__RightOperandAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17649:1: ( ( ruleXMultiplicativeExpression ) )\r\n // InternalDroneScript.g:17650:2: ( ruleXMultiplicativeExpression )\r\n {\r\n // InternalDroneScript.g:17650:2: ( ruleXMultiplicativeExpression )\r\n // InternalDroneScript.g:17651:3: ruleXMultiplicativeExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__AstExpressionMultiplicative__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18338:1: ( ( () ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18339:1: ( () )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18339:1: ( () )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18340:1: ()\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getAstExpressionBinaryLeftAction_1_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18341:1: ()\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18343:1: \n {\n }\n\n after(grammarAccess.getAstExpressionMultiplicativeAccess().getAstExpressionBinaryLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAdditiveExpression__RightOperandAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17626:1: ( ( ruleXMultiplicativeExpression ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17627:1: ( ruleXMultiplicativeExpression )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17627:1: ( ruleXMultiplicativeExpression )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17628:1: ruleXMultiplicativeExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXMultiplicativeExpression_in_rule__XAdditiveExpression__RightOperandAssignment_1_135593);\r\n ruleXMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAdditiveExpressionAccess().getRightOperandXMultiplicativeExpressionParserRuleCall_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "public static BinaryExpression power(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final EObject ruleNumericalMultiplyDivideExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalUnaryExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3144:28: ( (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3145:1: (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3145:1: (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3146:5: this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getNumericalUnaryExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumericalUnaryExpression_in_ruleNumericalMultiplyDivideExpression7167);\r\n this_NumericalUnaryExpression_0=ruleNumericalUnaryExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumericalUnaryExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:1: ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )*\r\n loop50:\r\n do {\r\n int alt50=2;\r\n int LA50_0 = input.LA(1);\r\n\r\n if ( (LA50_0==33||(LA50_0>=74 && LA50_0<=75)) ) {\r\n alt50=1;\r\n }\r\n\r\n\r\n switch (alt50) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:2: () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3155:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getNumericalMultiplyDivideExpressionAccess().getNumericalMultiplyDivideExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3160:2: ( (lv_operator_2_0= ruleMultiplicativeOperator ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3161:1: (lv_operator_2_0= ruleMultiplicativeOperator )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3161:1: (lv_operator_2_0= ruleMultiplicativeOperator )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3162:3: lv_operator_2_0= ruleMultiplicativeOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getOperatorMultiplicativeOperatorEnumRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicativeOperator_in_ruleNumericalMultiplyDivideExpression7197);\r\n \t lv_operator_2_0=ruleMultiplicativeOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalMultiplyDivideExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"MultiplicativeOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3178:2: ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3179:1: (lv_rightOperand_3_0= ruleNumericalUnaryExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3179:1: (lv_rightOperand_3_0= ruleNumericalUnaryExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3180:3: lv_rightOperand_3_0= ruleNumericalUnaryExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getRightOperandNumericalUnaryExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumericalUnaryExpression_in_ruleNumericalMultiplyDivideExpression7218);\r\n \t lv_rightOperand_3_0=ruleNumericalUnaryExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalMultiplyDivideExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"NumericalUnaryExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop50;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final void rule__XAdditiveExpression__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8018:1: ( ( ruleXMultiplicativeExpression ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8019:1: ( ruleXMultiplicativeExpression )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8019:1: ( ruleXMultiplicativeExpression )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8020:1: ruleXMultiplicativeExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXMultiplicativeExpression_in_rule__XAdditiveExpression__Group__0__Impl16626);\r\n ruleXMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAdditiveExpressionAccess().getXMultiplicativeExpressionParserRuleCall_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__AstExpressionMultiplicative__OperatorAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25386:1: ( ( ( rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25387:1: ( ( rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25387:1: ( ( rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25388:1: ( rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0 )\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAlternatives_1_1_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25389:1: ( rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25389:2: rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0\n {\n pushFollow(FOLLOW_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0_in_rule__AstExpressionMultiplicative__OperatorAssignment_1_151005);\n rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAlternatives_1_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final EObject ruleAdditiveExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_MultiplicativeExpression_0 = null;\r\n\r\n EObject lv_operator_2_1 = null;\r\n\r\n EObject lv_operator_2_2 = null;\r\n\r\n EObject lv_right_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2799:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2800:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2800:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2801:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6015);\r\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_MultiplicativeExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:1: ( () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\r\n loop38:\r\n do {\r\n int alt38=2;\r\n int LA38_0 = input.LA(1);\r\n\r\n if ( ((LA38_0>=64 && LA38_0<=65)) ) {\r\n alt38=1;\r\n }\r\n\r\n\r\n switch (alt38) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:2: () ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2809:2: ()\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2810:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLeftAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2815:2: ( ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2816:1: ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2816:1: ( (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2817:1: (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2817:1: (lv_operator_2_1= ruleSubstractionOperator | lv_operator_2_2= ruleAdditionOperator )\r\n \t int alt37=2;\r\n \t int LA37_0 = input.LA(1);\r\n\r\n \t if ( (LA37_0==65) ) {\r\n \t alt37=1;\r\n \t }\r\n \t else if ( (LA37_0==64) ) {\r\n \t alt37=2;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 37, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n \t switch (alt37) {\r\n \t case 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2818:3: lv_operator_2_1= ruleSubstractionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOperatorSubstractionOperatorParserRuleCall_1_1_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleSubstractionOperator_in_ruleAdditiveExpression6047);\r\n \t lv_operator_2_1=ruleSubstractionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_1, \r\n \t \t\t\"SubstractionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2833:8: lv_operator_2_2= ruleAdditionOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOperatorAdditionOperatorParserRuleCall_1_1_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAdditionOperator_in_ruleAdditiveExpression6066);\r\n \t lv_operator_2_2=ruleAdditionOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_2, \r\n \t \t\t\"AdditionOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2851:2: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2852:1: (lv_right_3_0= ruleMultiplicativeExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2852:1: (lv_right_3_0= ruleMultiplicativeExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:2853:3: lv_right_3_0= ruleMultiplicativeExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6090);\r\n \t lv_right_3_0=ruleMultiplicativeExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"right\",\r\n \t \t\tlv_right_3_0, \r\n \t \t\t\"MultiplicativeExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop38;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject ruleAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n EObject this_MultiplicativeExpression_0 = null;\n\n EObject lv_rightParts_2_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3689:6: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+ )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3690:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+ )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3690:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+ )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3691:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( () ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+ )?\n {\n \n currentNode=createCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0(), currentNode); \n \n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression6312);\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\n _fsp--;\n\n \n current = this_MultiplicativeExpression_0; \n currentNode = currentNode.getParent();\n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3699:1: ( () ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+ )?\n int alt56=2;\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==61||LA56_0==70) ) {\n alt56=1;\n }\n switch (alt56) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3699:2: () ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3699:2: ()\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3700:5: \n {\n \n temp=factory.create(grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLeftOperandAction_1_0().getType().getClassifier());\n try {\n \tfactory.set(temp, \"leftOperand\", current, null /*ParserRule*/, currentNode);\n } catch(ValueConverterException vce) {\n \thandleValueConverterException(vce);\n }\n current = temp; \n temp = null;\n CompositeNode newNode = createCompositeNode(grammarAccess.getAdditiveExpressionAccess().getAdditiveExpressionLeftOperandAction_1_0(), currentNode.getParent());\n newNode.getChildren().add(currentNode);\n moveLookaheadInfo(currentNode, newNode);\n currentNode = newNode; \n associateNodeWithAstElement(currentNode, current); \n \n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3715:2: ( (lv_rightParts_2_0= ruleAdditiveExpressionPart ) )+\n int cnt55=0;\n loop55:\n do {\n int alt55=2;\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==61||LA55_0==70) ) {\n alt55=1;\n }\n\n\n switch (alt55) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3716:1: (lv_rightParts_2_0= ruleAdditiveExpressionPart )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3716:1: (lv_rightParts_2_0= ruleAdditiveExpressionPart )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3717:3: lv_rightParts_2_0= ruleAdditiveExpressionPart\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightPartsAdditiveExpressionPartParserRuleCall_1_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleAdditiveExpressionPart_in_ruleAdditiveExpression6342);\n \t lv_rightParts_2_0=ruleAdditiveExpressionPart();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getAdditiveExpressionRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"rightParts\",\n \t \t \t\tlv_rightParts_2_0, \n \t \t \t\t\"AdditiveExpressionPart\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt55 >= 1 ) break loop55;\n EarlyExitException eee =\n new EarlyExitException(55, input);\n throw eee;\n }\n cnt55++;\n } while (true);\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static double multi() {\n System.out.println(\"Enter multiplier\");\n double a = getNumber();\n System.out.println(\"Enter multiplicand\");\n double b = getNumber();\n\n return a * b;\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public final void rule__XMultiplicativeExpression__Group_1_0_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5210:1: ( ( ( rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5211:1: ( ( rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5211:1: ( ( rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5212:1: ( rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureAssignment_1_0_0_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5213:1: ( rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5213:2: rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1\n {\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1_in_rule__XMultiplicativeExpression__Group_1_0_0__1__Impl10720);\n rule__XMultiplicativeExpression__FeatureAssignment_1_0_0_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getFeatureAssignment_1_0_0_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final EObject ruleMultiplicationOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4829:28: ( ( () otherlv_1= '*' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4830:1: ( () otherlv_1= '*' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4830:1: ( () otherlv_1= '*' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4830:2: () otherlv_1= '*'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4830:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4831:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getMultiplicationOperatorAccess().getMultiplicationOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,46,FOLLOW_46_in_ruleMultiplicationOperator10841); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getMultiplicationOperatorAccess().getAsteriskKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "protected void sequence_Multiplication(ISerializationContext context, Div semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.DIV__LEFT) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.DIV__LEFT));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.DIV__RIGHT) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.DIV__RIGHT));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getMultiplicationAccess().getDivLeftAction_1_0_1_0(), semanticObject.getLeft());\n\t\tfeeder.accept(grammarAccess.getMultiplicationAccess().getRightPrimaryExpressionParserRuleCall_1_1_0(), semanticObject.getRight());\n\t\tfeeder.finish();\n\t}", "public void multiply() {\n\t\t\n\t}", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "public final void rule__XMultiplicativeExpression__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5089:1: ( ( ( rule__XMultiplicativeExpression__Group_1_0__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5090:1: ( ( rule__XMultiplicativeExpression__Group_1_0__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5090:1: ( ( rule__XMultiplicativeExpression__Group_1_0__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5091:1: ( rule__XMultiplicativeExpression__Group_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5092:1: ( rule__XMultiplicativeExpression__Group_1_0__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5092:2: rule__XMultiplicativeExpression__Group_1_0__0\n {\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__Group_1_0__0_in_rule__XMultiplicativeExpression__Group_1__0__Impl10482);\n rule__XMultiplicativeExpression__Group_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__MultExp__OpAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10370:1: ( ( ( rule__MultExp__OpAlternatives_1_1_0 ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10371:1: ( ( rule__MultExp__OpAlternatives_1_1_0 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10371:1: ( ( rule__MultExp__OpAlternatives_1_1_0 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10372:1: ( rule__MultExp__OpAlternatives_1_1_0 )\n {\n before(grammarAccess.getMultExpAccess().getOpAlternatives_1_1_0()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10373:1: ( rule__MultExp__OpAlternatives_1_1_0 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10373:2: rule__MultExp__OpAlternatives_1_1_0\n {\n pushFollow(FOLLOW_rule__MultExp__OpAlternatives_1_1_0_in_rule__MultExp__OpAssignment_1_120862);\n rule__MultExp__OpAlternatives_1_1_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getMultExpAccess().getOpAlternatives_1_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMultiplicativeExpression__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5056:1: ( ( ( rule__XMultiplicativeExpression__Group_1__0 )* ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5057:1: ( ( rule__XMultiplicativeExpression__Group_1__0 )* )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5057:1: ( ( rule__XMultiplicativeExpression__Group_1__0 )* )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5058:1: ( rule__XMultiplicativeExpression__Group_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5059:1: ( rule__XMultiplicativeExpression__Group_1__0 )*\n loop36:\n do {\n int alt36=2;\n switch ( input.LA(1) ) {\n case 25:\n {\n int LA36_2 = input.LA(2);\n\n if ( (synpred57_InternalInstances()) ) {\n alt36=1;\n }\n\n\n }\n break;\n case 26:\n {\n int LA36_3 = input.LA(2);\n\n if ( (synpred57_InternalInstances()) ) {\n alt36=1;\n }\n\n\n }\n break;\n case 27:\n {\n int LA36_4 = input.LA(2);\n\n if ( (synpred57_InternalInstances()) ) {\n alt36=1;\n }\n\n\n }\n break;\n case 28:\n {\n int LA36_5 = input.LA(2);\n\n if ( (synpred57_InternalInstances()) ) {\n alt36=1;\n }\n\n\n }\n break;\n\n }\n\n switch (alt36) {\n \tcase 1 :\n \t // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5059:2: rule__XMultiplicativeExpression__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XMultiplicativeExpression__Group_1__0_in_rule__XMultiplicativeExpression__Group__1__Impl10417);\n \t rule__XMultiplicativeExpression__Group_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop36;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMultiplicativeExpression__Group_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5149:1: ( ( ( rule__XMultiplicativeExpression__Group_1_0_0__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5150:1: ( ( rule__XMultiplicativeExpression__Group_1_0_0__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5150:1: ( ( rule__XMultiplicativeExpression__Group_1_0_0__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5151:1: ( rule__XMultiplicativeExpression__Group_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1_0_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5152:1: ( rule__XMultiplicativeExpression__Group_1_0_0__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5152:2: rule__XMultiplicativeExpression__Group_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__Group_1_0_0__0_in_rule__XMultiplicativeExpression__Group_1_0__0__Impl10600);\n rule__XMultiplicativeExpression__Group_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AddExp__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10355:1: ( ( ruleMultExp ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10356:1: ( ruleMultExp )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10356:1: ( ruleMultExp )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10357:1: ruleMultExp\n {\n before(grammarAccess.getAddExpAccess().getRightMultExpParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleMultExp_in_rule__AddExp__RightAssignment_1_220831);\n ruleMultExp();\n\n state._fsp--;\n\n after(grammarAccess.getAddExpAccess().getRightMultExpParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "abstract int multiplication(int num1, int num2);", "public final void rule__AstExpressionAdditive__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18122:1: ( ( ruleAstExpressionMultiplicative ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18123:1: ( ruleAstExpressionMultiplicative )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18123:1: ( ruleAstExpressionMultiplicative )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18124:1: ruleAstExpressionMultiplicative\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getAstExpressionMultiplicativeParserRuleCall_0()); \n pushFollow(FOLLOW_ruleAstExpressionMultiplicative_in_rule__AstExpressionAdditive__Group__0__Impl36443);\n ruleAstExpressionMultiplicative();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionAdditiveAccess().getAstExpressionMultiplicativeParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Object visitMultiplicativeExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if ((op.equals(\"/\")\n || op.equals(\"%\")) && ((Long) b).equals(new Long(0))) {\n System.err.println(\"division by zero in #if\");\n result = new Long(0);\n }\n if (op.equals(\"*\")) {\n result = (Long) a * (Long) b;\n }\n else if (op.equals(\"/\")) {\n result = (Long) a / (Long) b;\n }\n else if (op.equals(\"%\")) {\n result = (Long) a % (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "void visit(MultiplicationExpression expression);", "public final void ruleAstExpressionMultiplicative() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1699:2: ( ( ( rule__AstExpressionMultiplicative__Group__0 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1700:1: ( ( rule__AstExpressionMultiplicative__Group__0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1700:1: ( ( rule__AstExpressionMultiplicative__Group__0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1701:1: ( rule__AstExpressionMultiplicative__Group__0 )\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getGroup()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1702:1: ( rule__AstExpressionMultiplicative__Group__0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:1702:2: rule__AstExpressionMultiplicative__Group__0\n {\n pushFollow(FOLLOW_rule__AstExpressionMultiplicative__Group__0_in_ruleAstExpressionMultiplicative3576);\n rule__AstExpressionMultiplicative__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionMultiplicativeAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMultiplicativeExpression__Group_1_0_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5180:1: ( ( () ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5181:1: ( () )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5181:1: ( () )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5182:1: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5183:1: ()\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5185:1: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static NumberP Multiplication(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Multiplication\n ); \t\n }", "public static BinaryExpression multiply(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Multiply, expression0, expression1);\n }", "public final void rule__AstExpressionMultiplicative__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18397:1: ( ( ( rule__AstExpressionMultiplicative__RightAssignment_1_2 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18398:1: ( ( rule__AstExpressionMultiplicative__RightAssignment_1_2 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18398:1: ( ( rule__AstExpressionMultiplicative__RightAssignment_1_2 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18399:1: ( rule__AstExpressionMultiplicative__RightAssignment_1_2 )\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getRightAssignment_1_2()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18400:1: ( rule__AstExpressionMultiplicative__RightAssignment_1_2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18400:2: rule__AstExpressionMultiplicative__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__AstExpressionMultiplicative__RightAssignment_1_2_in_rule__AstExpressionMultiplicative__Group_1__2__Impl36987);\n rule__AstExpressionMultiplicative__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstExpressionMultiplicativeAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2972:1: ( ( '*' ) | ( '/' ) | ( 'div' ) | ( 'mod' ) )\n int alt18=4;\n switch ( input.LA(1) ) {\n case 30:\n {\n alt18=1;\n }\n break;\n case 31:\n {\n alt18=2;\n }\n break;\n case 32:\n {\n alt18=3;\n }\n break;\n case 33:\n {\n alt18=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 18, 0, input);\n\n throw nvae;\n }\n\n switch (alt18) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2973:1: ( '*' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2973:1: ( '*' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2974:1: '*'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAsteriskKeyword_1_1_0_0()); \n match(input,30,FOLLOW_30_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06420); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorAsteriskKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2981:6: ( '/' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2981:6: ( '/' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2982:1: '/'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorSolidusKeyword_1_1_0_1()); \n match(input,31,FOLLOW_31_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06440); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorSolidusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n case 3 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2989:6: ( 'div' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2989:6: ( 'div' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2990:1: 'div'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorDivKeyword_1_1_0_2()); \n match(input,32,FOLLOW_32_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06460); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorDivKeyword_1_1_0_2()); \n\n }\n\n\n }\n break;\n case 4 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2997:6: ( 'mod' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2997:6: ( 'mod' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2998:1: 'mod'\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorModKeyword_1_1_0_3()); \n match(input,33,FOLLOW_33_in_rule__AstExpressionMultiplicative__OperatorAlternatives_1_1_06480); \n after(grammarAccess.getAstExpressionMultiplicativeAccess().getOperatorModKeyword_1_1_0_3()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "Expression powerExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = unaryExpression();\r\n\t\tif (isKind(OP_POWER)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\treturn new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final expressionParser.mult_return mult() throws RecognitionException {\n expressionParser.mult_return retval = new expressionParser.mult_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal42=null;\n Token char_literal43=null;\n expressionParser.unary_return unary41 = null;\n\n expressionParser.unary_return unary44 = null;\n\n\n CommonTree char_literal42_tree=null;\n CommonTree char_literal43_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:3: ( unary ( ( '*' | '/' ) unary )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:5: unary ( ( '*' | '/' ) unary )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_unary_in_mult454);\n unary41=unary();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, unary41.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:11: ( ( '*' | '/' ) unary )*\n loop19:\n do {\n int alt19=2;\n int LA19_0 = input.LA(1);\n\n if ( ((LA19_0>=48 && LA19_0<=49)) ) {\n alt19=1;\n }\n\n\n switch (alt19) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' ) unary\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:12: ( '*' | '/' )\n \t int alt18=2;\n \t int LA18_0 = input.LA(1);\n\n \t if ( (LA18_0==48) ) {\n \t alt18=1;\n \t }\n \t else if ( (LA18_0==49) ) {\n \t alt18=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 18, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt18) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:13: '*'\n \t {\n \t char_literal42=(Token)match(input,48,FOLLOW_48_in_mult458); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal42_tree = (CommonTree)adaptor.create(char_literal42);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal42_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:84:20: '/'\n \t {\n \t char_literal43=(Token)match(input,49,FOLLOW_49_in_mult463); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal43_tree = (CommonTree)adaptor.create(char_literal43);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_unary_in_mult467);\n \t unary44=unary();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, unary44.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop19;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "public static BinaryExpression power(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public final void ruleOpMultiAssign() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:329:2: ( ( '+=' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:330:1: ( '+=' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:330:1: ( '+=' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:331:1: '+='\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpMultiAssignAccess().getPlusSignEqualsSignKeyword()); \n }\n match(input,12,FOLLOW_12_in_ruleOpMultiAssign642); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpMultiAssignAccess().getPlusSignEqualsSignKeyword()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__MultExp__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8500:1: ( ( ( rule__MultExp__OpAssignment_1_1 ) ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8501:1: ( ( rule__MultExp__OpAssignment_1_1 ) )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8501:1: ( ( rule__MultExp__OpAssignment_1_1 ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8502:1: ( rule__MultExp__OpAssignment_1_1 )\n {\n before(grammarAccess.getMultExpAccess().getOpAssignment_1_1()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8503:1: ( rule__MultExp__OpAssignment_1_1 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8503:2: rule__MultExp__OpAssignment_1_1\n {\n pushFollow(FOLLOW_rule__MultExp__OpAssignment_1_1_in_rule__MultExp__Group_1__1__Impl17064);\n rule__MultExp__OpAssignment_1_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getMultExpAccess().getOpAssignment_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void multiplicativeExpression() throws RecognitionException {\n int multiplicativeExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"multiplicativeExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(811, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 120) ) { return ; }\n // Java.g:812:5: ( unaryExpression ( ( '*' | '/' | '%' ) unaryExpression )* )\n dbg.enterAlt(1);\n\n // Java.g:812:9: unaryExpression ( ( '*' | '/' | '%' ) unaryExpression )*\n {\n dbg.location(812,9);\n pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression4874);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(812,25);\n // Java.g:812:25: ( ( '*' | '/' | '%' ) unaryExpression )*\n try { dbg.enterSubRule(141);\n\n loop141:\n do {\n int alt141=2;\n try { dbg.enterDecision(141);\n\n int LA141_0 = input.LA(1);\n\n if ( (LA141_0==30||(LA141_0>=107 && LA141_0<=108)) ) {\n alt141=1;\n }\n\n\n } finally {dbg.exitDecision(141);}\n\n switch (alt141) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:812:27: ( '*' | '/' | '%' ) unaryExpression\n \t {\n \t dbg.location(812,27);\n \t if ( input.LA(1)==30||(input.LA(1)>=107 && input.LA(1)<=108) ) {\n \t input.consume();\n \t state.errorRecovery=false;state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t dbg.recognitionException(mse);\n \t throw mse;\n \t }\n\n \t dbg.location(812,47);\n \t pushFollow(FOLLOW_unaryExpression_in_multiplicativeExpression4892);\n \t unaryExpression();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop141;\n }\n } while (true);\n } finally {dbg.exitSubRule(141);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 120, multiplicativeExpression_StartIndex); }\n }\n dbg.location(813, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"multiplicativeExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "@Test(priority=3)\n\n\tpublic void multiplicationTest() {\n\n\t\tandroidCalculator = new AndroidCalculator(driver);\n\n\t\tandroidCalculator.inputLeftAndRightFields(\"20\", \"10\");\n\t\tandroidCalculator.multiplication();;\n\n\t\tAssert.assertEquals(androidCalculator.verifyResult(), 20*10);\n\t}", "public final EObject ruleMult() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n EObject this_Primary_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:161:2: ( (this_Primary_0= rulePrimary ( () otherlv_2= '*' ( (lv_right_3_0= ruleMult ) ) )* ) )\n // InternalMyDsl.g:162:2: (this_Primary_0= rulePrimary ( () otherlv_2= '*' ( (lv_right_3_0= ruleMult ) ) )* )\n {\n // InternalMyDsl.g:162:2: (this_Primary_0= rulePrimary ( () otherlv_2= '*' ( (lv_right_3_0= ruleMult ) ) )* )\n // InternalMyDsl.g:163:3: this_Primary_0= rulePrimary ( () otherlv_2= '*' ( (lv_right_3_0= ruleMult ) ) )*\n {\n\n \t\t\tnewCompositeNode(grammarAccess.getMultAccess().getPrimaryParserRuleCall_0());\n \t\t\n pushFollow(FOLLOW_5);\n this_Primary_0=rulePrimary();\n\n state._fsp--;\n\n\n \t\t\tcurrent = this_Primary_0;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n // InternalMyDsl.g:171:3: ( () otherlv_2= '*' ( (lv_right_3_0= ruleMult ) ) )*\n loop2:\n do {\n int alt2=2;\n int LA2_0 = input.LA(1);\n\n if ( (LA2_0==12) ) {\n alt2=1;\n }\n\n\n switch (alt2) {\n \tcase 1 :\n \t // InternalMyDsl.g:172:4: () otherlv_2= '*' ( (lv_right_3_0= ruleMult ) )\n \t {\n \t // InternalMyDsl.g:172:4: ()\n \t // InternalMyDsl.g:173:5: \n \t {\n\n \t \t\t\t\t\tcurrent = forceCreateModelElementAndSet(\n \t \t\t\t\t\t\tgrammarAccess.getMultAccess().getMultLeftAction_1_0(),\n \t \t\t\t\t\t\tcurrent);\n \t \t\t\t\t\n\n \t }\n\n \t otherlv_2=(Token)match(input,12,FOLLOW_4); \n\n \t \t\t\t\tnewLeafNode(otherlv_2, grammarAccess.getMultAccess().getAsteriskKeyword_1_1());\n \t \t\t\t\n \t // InternalMyDsl.g:183:4: ( (lv_right_3_0= ruleMult ) )\n \t // InternalMyDsl.g:184:5: (lv_right_3_0= ruleMult )\n \t {\n \t // InternalMyDsl.g:184:5: (lv_right_3_0= ruleMult )\n \t // InternalMyDsl.g:185:6: lv_right_3_0= ruleMult\n \t {\n\n \t \t\t\t\t\t\tnewCompositeNode(grammarAccess.getMultAccess().getRightMultParserRuleCall_1_2_0());\n \t \t\t\t\t\t\n \t pushFollow(FOLLOW_5);\n \t lv_right_3_0=ruleMult();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getMultRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\tset(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"right\",\n \t \t\t\t\t\t\t\tlv_right_3_0,\n \t \t\t\t\t\t\t\t\"org.xtext.example.mydsl.MyDsl.Mult\");\n \t \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop2;\n }\n } while (true);\n\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 }", "private Proof mulLeftZero(Expression a) {\n Variable x = var(\"x\");\n Proof equalitySymConvert = equalitySymConvert(faxm8Gen(zero(), x));\n Proof faxm6gen = faxm6Gen(multi(zero(), x));\n Proof axm2convert = faxm2Convert(equalitySymConvert, faxm6gen);\n Proof axm2convertOnce = faxm2ConvertOnce(zero(), equalitySymConvert(axm2convert));\n return inductConclusion(x, a, faxm7Gen(zero()), axm2convertOnce);\n }", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "public final EObject ruleMultiplicativeExpression() throws RecognitionException {\n EObject current = null;\n\n EObject this_PowerExpression_0 = null;\n\n EObject lv_rightParts_2_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3832:6: ( (this_PowerExpression_0= rulePowerExpression ( () ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+ )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3833:1: (this_PowerExpression_0= rulePowerExpression ( () ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+ )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3833:1: (this_PowerExpression_0= rulePowerExpression ( () ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+ )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3834:5: this_PowerExpression_0= rulePowerExpression ( () ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+ )?\n {\n \n currentNode=createCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getPowerExpressionParserRuleCall_0(), currentNode); \n \n pushFollow(FOLLOW_rulePowerExpression_in_ruleMultiplicativeExpression6551);\n this_PowerExpression_0=rulePowerExpression();\n _fsp--;\n\n \n current = this_PowerExpression_0; \n currentNode = currentNode.getParent();\n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3842:1: ( () ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+ )?\n int alt58=2;\n int LA58_0 = input.LA(1);\n\n if ( ((LA58_0>=58 && LA58_0<=59)||(LA58_0>=71 && LA58_0<=72)) ) {\n alt58=1;\n }\n switch (alt58) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3842:2: () ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3842:2: ()\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3843:5: \n {\n \n temp=factory.create(grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLeftOperandAction_1_0().getType().getClassifier());\n try {\n \tfactory.set(temp, \"leftOperand\", current, null /*ParserRule*/, currentNode);\n } catch(ValueConverterException vce) {\n \thandleValueConverterException(vce);\n }\n current = temp; \n temp = null;\n CompositeNode newNode = createCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getMultiplicativeExpressionLeftOperandAction_1_0(), currentNode.getParent());\n newNode.getChildren().add(currentNode);\n moveLookaheadInfo(currentNode, newNode);\n currentNode = newNode; \n associateNodeWithAstElement(currentNode, current); \n \n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3858:2: ( (lv_rightParts_2_0= ruleMultiplicativeExpressionPart ) )+\n int cnt57=0;\n loop57:\n do {\n int alt57=2;\n int LA57_0 = input.LA(1);\n\n if ( ((LA57_0>=58 && LA57_0<=59)||(LA57_0>=71 && LA57_0<=72)) ) {\n alt57=1;\n }\n\n\n switch (alt57) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3859:1: (lv_rightParts_2_0= ruleMultiplicativeExpressionPart )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3859:1: (lv_rightParts_2_0= ruleMultiplicativeExpressionPart )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3860:3: lv_rightParts_2_0= ruleMultiplicativeExpressionPart\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightPartsMultiplicativeExpressionPartParserRuleCall_1_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleMultiplicativeExpressionPart_in_ruleMultiplicativeExpression6581);\n \t lv_rightParts_2_0=ruleMultiplicativeExpressionPart();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getMultiplicativeExpressionRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"rightParts\",\n \t \t \t\tlv_rightParts_2_0, \n \t \t \t\t\"MultiplicativeExpressionPart\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt57 >= 1 ) break loop57;\n EarlyExitException eee =\n new EarlyExitException(57, input);\n throw eee;\n }\n cnt57++;\n } while (true);\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void rule__XMultiplicativeExpression__Group_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8294:1: ( ( ( rule__XMultiplicativeExpression__Group_1_0__0 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8295:1: ( ( rule__XMultiplicativeExpression__Group_1_0__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8295:1: ( ( rule__XMultiplicativeExpression__Group_1_0__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8296:1: ( rule__XMultiplicativeExpression__Group_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8297:1: ( rule__XMultiplicativeExpression__Group_1_0__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8297:2: rule__XMultiplicativeExpression__Group_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMultiplicativeExpression__Group_1_0__0_in_rule__XMultiplicativeExpression__Group_1__0__Impl17170);\r\n rule__XMultiplicativeExpression__Group_1_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMultiplicativeExpressionAccess().getGroup_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__UpdateMultiplication__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7596:1: ( ( () ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7597:1: ( () )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7597:1: ( () )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7598:1: ()\n {\n before(grammarAccess.getUpdateMultiplicationAccess().getUpdateMulLeftAction_1_0()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7599:1: ()\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7601:1: \n {\n }\n\n after(grammarAccess.getUpdateMultiplicationAccess().getUpdateMulLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Mult(Expression left, double right) {\n super(left, right);\n }", "public StatementParse mulDivTransform(StatementParse node) {\n // This function is called on _every_ multiply and divide node.\n StatementParse node1 = node.getChildren().get(0);\n StatementParse node2 = node.getChildren().get(1);\n if (!(node1 instanceof IntegerParse) || !(node2 instanceof IntegerParse)){\n return node;\n }\n int value1 = ((IntegerParse) node1).getValue();\n int value2 = ((IntegerParse) node2).getValue();\n int result;\n if (node.getName().equals(\"*\")){\n result = value1 * value2;\n } else{ // div node\n if (value2 == 0) return node;\n result = value1 / value2;\n }\n\n IntegerParse newNode = new IntegerParse(result);\n if (node.isNegative()) newNode.setNegative(true);\n return newNode;\n }", "public int mult()\r\n\t{\r\n\t\tint a=10;\r\n\t\tint b=20;\r\n\t\tint c = a*b;\r\n\t\treturn(c);\r\n\t}", "public final void rule__XMultiplicativeExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5028:1: ( ( ruleXUnaryOperation ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5029:1: ( ruleXUnaryOperation )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5029:1: ( ruleXUnaryOperation )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5030:1: ruleXUnaryOperation\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getXUnaryOperationParserRuleCall_0()); \n }\n pushFollow(FOLLOW_ruleXUnaryOperation_in_rule__XMultiplicativeExpression__Group__0__Impl10361);\n ruleXUnaryOperation();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getXUnaryOperationParserRuleCall_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static BinaryExpression MultiplyChecked(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyChecked, expression0, expression1);\n }", "public final void rule__XMultiplicativeExpression__RightOperandAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12415:1: ( ( ruleXUnaryOperation ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12416:1: ( ruleXUnaryOperation )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12416:1: ( ruleXUnaryOperation )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12417:1: ruleXUnaryOperation\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandXUnaryOperationParserRuleCall_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXUnaryOperation_in_rule__XMultiplicativeExpression__RightOperandAssignment_1_124911);\n ruleXUnaryOperation();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMultiplicativeExpressionAccess().getRightOperandXUnaryOperationParserRuleCall_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PredicateMultiplication__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4478:1: ( ( ( rule__PredicateMultiplication__RightAssignment_1_2 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4479:1: ( ( rule__PredicateMultiplication__RightAssignment_1_2 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4479:1: ( ( rule__PredicateMultiplication__RightAssignment_1_2 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4480:1: ( rule__PredicateMultiplication__RightAssignment_1_2 )\n {\n before(grammarAccess.getPredicateMultiplicationAccess().getRightAssignment_1_2()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4481:1: ( rule__PredicateMultiplication__RightAssignment_1_2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4481:2: rule__PredicateMultiplication__RightAssignment_1_2\n {\n pushFollow(FOLLOW_rule__PredicateMultiplication__RightAssignment_1_2_in_rule__PredicateMultiplication__Group_1__2__Impl8807);\n rule__PredicateMultiplication__RightAssignment_1_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPredicateMultiplicationAccess().getRightAssignment_1_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Mult(Expression left, String right) {\n super(left, right);\n }", "public final void rule__AstExpressionMultiplicative__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18305:1: ( ( ( rule__AstExpressionMultiplicative__Group_1__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18306:1: ( ( rule__AstExpressionMultiplicative__Group_1__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18306:1: ( ( rule__AstExpressionMultiplicative__Group_1__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18307:1: ( rule__AstExpressionMultiplicative__Group_1__0 )*\n {\n before(grammarAccess.getAstExpressionMultiplicativeAccess().getGroup_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18308:1: ( rule__AstExpressionMultiplicative__Group_1__0 )*\n loop151:\n do {\n int alt151=2;\n int LA151_0 = input.LA(1);\n\n if ( ((LA151_0>=30 && LA151_0<=33)) ) {\n alt151=1;\n }\n\n\n switch (alt151) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:18308:2: rule__AstExpressionMultiplicative__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__AstExpressionMultiplicative__Group_1__0_in_rule__AstExpressionMultiplicative__Group__1__Impl36804);\n \t rule__AstExpressionMultiplicative__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop151;\n }\n } while (true);\n\n after(grammarAccess.getAstExpressionMultiplicativeAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstExpressionAdditive__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25371:1: ( ( ruleAstExpressionMultiplicative ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25372:1: ( ruleAstExpressionMultiplicative )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25372:1: ( ruleAstExpressionMultiplicative )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25373:1: ruleAstExpressionMultiplicative\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getRightAstExpressionMultiplicativeParserRuleCall_1_2_0()); \n pushFollow(FOLLOW_ruleAstExpressionMultiplicative_in_rule__AstExpressionAdditive__RightAssignment_1_250974);\n ruleAstExpressionMultiplicative();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionAdditiveAccess().getRightAstExpressionMultiplicativeParserRuleCall_1_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PredicateAddition__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4199:1: ( ( rulePredicateMultiplication ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4200:1: ( rulePredicateMultiplication )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4200:1: ( rulePredicateMultiplication )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:4201:1: rulePredicateMultiplication\n {\n before(grammarAccess.getPredicateAdditionAccess().getPredicateMultiplicationParserRuleCall_0()); \n pushFollow(FOLLOW_rulePredicateMultiplication_in_rule__PredicateAddition__Group__0__Impl8259);\n rulePredicateMultiplication();\n\n state._fsp--;\n\n after(grammarAccess.getPredicateAdditionAccess().getPredicateMultiplicationParserRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final EObject ruleNumericalAddSubtractExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalMultiplyDivideExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3072:28: ( (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3073:1: (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3073:1: (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3074:5: this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getNumericalMultiplyDivideExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumericalMultiplyDivideExpression_in_ruleNumericalAddSubtractExpression7021);\r\n this_NumericalMultiplyDivideExpression_0=ruleNumericalMultiplyDivideExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumericalMultiplyDivideExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:1: ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )*\r\n loop49:\r\n do {\r\n int alt49=2;\r\n int LA49_0 = input.LA(1);\r\n\r\n if ( ((LA49_0>=72 && LA49_0<=73)) ) {\r\n alt49=1;\r\n }\r\n\r\n\r\n switch (alt49) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:2: () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3083:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getNumericalAddSubtractExpressionAccess().getNumericalAddSubtractExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3088:2: ( (lv_operator_2_0= ruleAdditiveOperator ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3089:1: (lv_operator_2_0= ruleAdditiveOperator )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3089:1: (lv_operator_2_0= ruleAdditiveOperator )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3090:3: lv_operator_2_0= ruleAdditiveOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getOperatorAdditiveOperatorEnumRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAdditiveOperator_in_ruleNumericalAddSubtractExpression7051);\r\n \t lv_operator_2_0=ruleAdditiveOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalAddSubtractExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"AdditiveOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3106:2: ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3107:1: (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3107:1: (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3108:3: lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getRightOperandNumericalMultiplyDivideExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumericalMultiplyDivideExpression_in_ruleNumericalAddSubtractExpression7072);\r\n \t lv_rightOperand_3_0=ruleNumericalMultiplyDivideExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalAddSubtractExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"NumericalMultiplyDivideExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop49;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public final void rule__MultExp__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8469:1: ( ( () ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8470:1: ( () )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8470:1: ( () )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8471:1: ()\n {\n before(grammarAccess.getMultExpAccess().getMultExpLeftAction_1_0()); \n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8472:1: ()\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8474:1: \n {\n }\n\n after(grammarAccess.getMultExpAccess().getMultExpLeftAction_1_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static boolean MultiplicativeOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"MultiplicativeOperator\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, MULTIPLICATIVE_OPERATOR, \"<multiplicative operator>\");\n r = consumeToken(b, STAR_SIGN);\n if (!r) r = consumeToken(b, K_DIV);\n if (!r) r = consumeToken(b, K_IDIV);\n if (!r) r = consumeToken(b, K_MOD);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "private void mul() {\n\n\t}" ]
[ "0.6686326", "0.66108453", "0.65584224", "0.6557555", "0.6352979", "0.63328403", "0.6315334", "0.6208878", "0.61899656", "0.6176879", "0.61744183", "0.61709154", "0.61539423", "0.6138746", "0.6124602", "0.6078424", "0.6070433", "0.60676634", "0.60543317", "0.60543317", "0.60202", "0.6016295", "0.60106945", "0.6003848", "0.5956214", "0.5953719", "0.5933938", "0.59299", "0.59038556", "0.58990836", "0.5889358", "0.586393", "0.58598566", "0.5853782", "0.5818794", "0.5818457", "0.58016145", "0.57943624", "0.57818514", "0.57812417", "0.57630444", "0.5760157", "0.5750545", "0.574907", "0.5739555", "0.57317674", "0.57138324", "0.5697861", "0.5686572", "0.5683345", "0.56817186", "0.56734097", "0.56662995", "0.5664116", "0.5641302", "0.56395435", "0.563275", "0.5629084", "0.56152767", "0.56099254", "0.5600001", "0.55936104", "0.55728155", "0.55610776", "0.55597", "0.55512077", "0.554583", "0.5542817", "0.5539569", "0.55380994", "0.5528973", "0.5528862", "0.55234444", "0.5518864", "0.55185264", "0.5514059", "0.54999334", "0.5495677", "0.5488422", "0.54878557", "0.548009", "0.54778856", "0.54718304", "0.54699945", "0.5464465", "0.5458359", "0.54538953", "0.54524565", "0.54515386", "0.5446157", "0.54264325", "0.5425134", "0.54198307", "0.5406872", "0.54033643", "0.5400961", "0.539516", "0.5389484", "0.5385423", "0.5379689" ]
0.6283469
7
Contexts: Expression returns NumberLiteral Addition returns NumberLiteral Addition.Plus_1_0_0_0 returns NumberLiteral Addition.Minus_1_0_1_0 returns NumberLiteral Multiplication returns NumberLiteral Multiplication.Multi_1_0_0_0 returns NumberLiteral Multiplication.Div_1_0_1_0 returns NumberLiteral PrimaryExpression returns NumberLiteral Constraint: value=Reel
protected void sequence_PrimaryExpression(ISerializationContext context, NumberLiteral semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.NUMBER_LITERAL__VALUE) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.NUMBER_LITERAL__VALUE)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getPrimaryExpressionAccess().getValueReelParserRuleCall_1_1_0(), semanticObject.getValue()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "Expression relExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = addExpression();\r\n\t\twhile(isKind(OP_LT,OP_GT,OP_LE,OP_GE)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = addExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "PlusExpr (Expr l, Expr r) {\n leftOperand = l;\n rightOperand = r;\n }", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "NumericExpression createNumericExpression();", "LogicExpression getLeftExp();", "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public final Expr addExpr() throws RecognitionException {\n Expr result = null;\n\n int addExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\n {\n pushFollow(FOLLOW_mulExpr_in_addExpr547);\n lhs=mulExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:46: (op= ( '+' | '-' ) rhs= mulExpr )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0 >= 21 && LA8_0 <= 22)) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:124:48: op= ( '+' | '-' ) rhs= mulExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( (input.LA(1) >= 21 && input.LA(1) <= 22) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_mulExpr_in_addExpr565);\n \t rhs=mulExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"+\")) {\n \t result = new Add(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\n \t result = new Sub(result, rhs); \n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 11, addExpr_StartIndex); }\n\n }\n return result;\n }", "public final expressionParser.add_return add() throws RecognitionException {\n expressionParser.add_return retval = new expressionParser.add_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal38=null;\n Token char_literal39=null;\n expressionParser.mult_return mult37 = null;\n\n expressionParser.mult_return mult40 = null;\n\n\n CommonTree char_literal38_tree=null;\n CommonTree char_literal39_tree=null;\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:3: ( mult ( ( '+' | '-' ) mult )* )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:5: mult ( ( '+' | '-' ) mult )*\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_mult_in_add424);\n mult37=mult();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, mult37.getTree());\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:10: ( ( '+' | '-' ) mult )*\n loop17:\n do {\n int alt17=2;\n alt17 = dfa17.predict(input);\n switch (alt17) {\n \tcase 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' ) mult\n \t {\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:11: ( '+' | '-' )\n \t int alt16=2;\n \t int LA16_0 = input.LA(1);\n\n \t if ( (LA16_0==46) ) {\n \t alt16=1;\n \t }\n \t else if ( (LA16_0==47) ) {\n \t alt16=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 16, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt16) {\n \t case 1 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:12: '+'\n \t {\n \t char_literal38=(Token)match(input,46,FOLLOW_46_in_add428); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal38_tree = (CommonTree)adaptor.create(char_literal38);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal38_tree, root_0);\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:80:19: '-'\n \t {\n \t char_literal39=(Token)match(input,47,FOLLOW_47_in_add433); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t char_literal39_tree = (CommonTree)adaptor.create(char_literal39);\n \t root_0 = (CommonTree)adaptor.becomeRoot(char_literal39_tree, root_0);\n \t }\n\n \t }\n \t break;\n\n \t }\n\n \t pushFollow(FOLLOW_mult_in_add437);\n \t mult40=mult();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, mult40.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop17;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "ExpressionCalculPrimary getExpr();", "Expression getExp();", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "public final EObject ruleAddSubExpr() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n EObject this_MultDivExpr_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalSafetyParser.g:7652:2: ( (this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )* ) )\n // InternalSafetyParser.g:7653:2: (this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )* )\n {\n // InternalSafetyParser.g:7653:2: (this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )* )\n // InternalSafetyParser.g:7654:3: this_MultDivExpr_0= ruleMultDivExpr ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )*\n {\n if ( state.backtracking==0 ) {\n\n \t\t\tnewCompositeNode(grammarAccess.getAddSubExprAccess().getMultDivExprParserRuleCall_0());\n \t\t\n }\n pushFollow(FollowSets000.FOLLOW_86);\n this_MultDivExpr_0=ruleMultDivExpr();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tcurrent = this_MultDivExpr_0;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n }\n // InternalSafetyParser.g:7662:3: ( ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) ) )*\n loop100:\n do {\n int alt100=2;\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==PlusSign) ) {\n int LA100_2 = input.LA(2);\n\n if ( (synpred25_InternalSafetyParser()) ) {\n alt100=1;\n }\n\n\n }\n else if ( (LA100_0==HyphenMinus) ) {\n int LA100_3 = input.LA(2);\n\n if ( (synpred25_InternalSafetyParser()) ) {\n alt100=1;\n }\n\n\n }\n\n\n switch (alt100) {\n \tcase 1 :\n \t // InternalSafetyParser.g:7663:4: ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) ) ( (lv_right_3_0= ruleMultDivExpr ) )\n \t {\n \t // InternalSafetyParser.g:7663:4: ( ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) ) )\n \t // InternalSafetyParser.g:7664:5: ( ( () ( ( ( PlusSign | HyphenMinus ) ) ) ) )=> ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) )\n \t {\n \t // InternalSafetyParser.g:7678:5: ( () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) ) )\n \t // InternalSafetyParser.g:7679:6: () ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) )\n \t {\n \t // InternalSafetyParser.g:7679:6: ()\n \t // InternalSafetyParser.g:7680:7: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\tcurrent = forceCreateModelElementAndSet(\n \t \t\t\t\t\t\t\t\tgrammarAccess.getAddSubExprAccess().getBinaryExprLeftAction_1_0_0_0(),\n \t \t\t\t\t\t\t\t\tcurrent);\n \t \t\t\t\t\t\t\n \t }\n\n \t }\n\n \t // InternalSafetyParser.g:7686:6: ( ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) ) )\n \t // InternalSafetyParser.g:7687:7: ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) )\n \t {\n \t // InternalSafetyParser.g:7687:7: ( (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus ) )\n \t // InternalSafetyParser.g:7688:8: (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus )\n \t {\n \t // InternalSafetyParser.g:7688:8: (lv_op_2_1= PlusSign | lv_op_2_2= HyphenMinus )\n \t int alt99=2;\n \t int LA99_0 = input.LA(1);\n\n \t if ( (LA99_0==PlusSign) ) {\n \t alt99=1;\n \t }\n \t else if ( (LA99_0==HyphenMinus) ) {\n \t alt99=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 99, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt99) {\n \t case 1 :\n \t // InternalSafetyParser.g:7689:9: lv_op_2_1= PlusSign\n \t {\n \t lv_op_2_1=(Token)match(input,PlusSign,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_1, grammarAccess.getAddSubExprAccess().getOpPlusSignKeyword_1_0_0_1_0_0());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getAddSubExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // InternalSafetyParser.g:7700:9: lv_op_2_2= HyphenMinus\n \t {\n \t lv_op_2_2=(Token)match(input,HyphenMinus,FollowSets000.FOLLOW_21); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tnewLeafNode(lv_op_2_2, grammarAccess.getAddSubExprAccess().getOpHyphenMinusKeyword_1_0_0_1_0_1());\n \t \t\t\t\t\t\t\t\t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getAddSubExprRule());\n \t \t\t\t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\t\t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t\t\t\t\t\t\t\t\n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // InternalSafetyParser.g:7715:4: ( (lv_right_3_0= ruleMultDivExpr ) )\n \t // InternalSafetyParser.g:7716:5: (lv_right_3_0= ruleMultDivExpr )\n \t {\n \t // InternalSafetyParser.g:7716:5: (lv_right_3_0= ruleMultDivExpr )\n \t // InternalSafetyParser.g:7717:6: lv_right_3_0= ruleMultDivExpr\n \t {\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tnewCompositeNode(grammarAccess.getAddSubExprAccess().getRightMultDivExprParserRuleCall_1_1_0());\n \t \t\t\t\t\t\n \t }\n \t pushFollow(FollowSets000.FOLLOW_86);\n \t lv_right_3_0=ruleMultDivExpr();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getAddSubExprRule());\n \t \t\t\t\t\t\t}\n \t \t\t\t\t\t\tset(\n \t \t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\"right\",\n \t \t\t\t\t\t\t\tlv_right_3_0,\n \t \t\t\t\t\t\t\t\"com.rockwellcollins.atc.agree.Agree.MultDivExpr\");\n \t \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop100;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public final ASTOperatorParser.expr_return expr() throws RecognitionException {\n ASTOperatorParser.expr_return retval = new ASTOperatorParser.expr_return();\n retval.start = input.LT(1);\n int expr_StartIndex = input.index();\n\n Object root_0 = null;\n\n Token char_literal4 = null;\n Token char_literal5 = null;\n ParserRuleReturnScope mexpr3 = null;\n ParserRuleReturnScope mexpr6 = null;\n\n Object char_literal4_tree = null;\n Object char_literal5_tree = null;\n\n try {\n if (state.backtracking > 0 && alreadyParsedRule(input, 2)) {\n return retval;\n }\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:2: ( mexpr ( ( '+' ^| '-' ^) mexpr )* )\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:4: mexpr ( ( '+' ^| '-' ^) mexpr )*\n {\n root_0 = (Object) adaptor.nil();\n\n pushFollow(FOLLOW_mexpr_in_expr63);\n mexpr3 = mexpr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, mexpr3.getTree());\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:10: ( ( '+' ^| '-' ^) mexpr )*\n loop2: while (true) {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if (((LA2_0 >= 9 && LA2_0 <= 10))) {\n alt2 = 1;\n }\n\n switch (alt2) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:11: ( '+' ^| '-' ^) mexpr\n {\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:11: ( '+' ^| '-' ^)\n int alt1 = 2;\n int LA1_0 = input.LA(1);\n if ((LA1_0 == 9)) {\n alt1 = 1;\n } else if ((LA1_0 == 10)) {\n alt1 = 2;\n }\n\n else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 1, 0,\n input);\n throw nvae;\n }\n\n switch (alt1) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:12: '+' ^\n {\n char_literal4 = (Token) match(input, 9, FOLLOW_9_in_expr67);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n char_literal4_tree = (Object) adaptor.create(char_literal4);\n root_0 = (Object) adaptor.becomeRoot(\n char_literal4_tree,\n root_0);\n }\n\n }\n break;\n case 2:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:20:17: '-' ^\n {\n char_literal5 = (Token) match(input, 10, FOLLOW_10_in_expr70);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n char_literal5_tree = (Object) adaptor.create(char_literal5);\n root_0 = (Object) adaptor.becomeRoot(\n char_literal5_tree,\n root_0);\n }\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_mexpr_in_expr74);\n mexpr6 = mexpr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, mexpr6.getTree());\n\n }\n break;\n\n default:\n break loop2;\n }\n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if (state.backtracking == 0) {\n retval.tree = (Object) adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n retval.tree = (Object) adaptor.errorNode(\n input,\n retval.start,\n input.LT(-1),\n re);\n } finally {\n // do for sure before leaving\n if (state.backtracking > 0) {\n memoize(input, 2, expr_StartIndex);\n }\n\n }\n return retval;\n }", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\tpublic Expression simplify() {\n\t\tSystem.out.println(\"减法化简\");\r\n\t\tExpression newLeft = left.simplify();\r\n Expression newRight = right.simplify();\r\n ConstantExpression leftConst =null;\r\n ConstantExpression rightConst =null;\r\n NegateExpression rightNegate =null;\r\n try {\r\n \tleftConst =(ConstantExpression) newLeft;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightConst =(ConstantExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\ttry {\r\n\t\t\trightNegate =(NegateExpression) newRight;\r\n\t\t} catch (Exception e) {\t}\r\n\t\t\r\n\t\tif ( leftConst != null && rightConst != null )\r\n {\r\n // two constants; just evaluate it;\r\n return new ConstantExpression( leftConst.getValue()- rightConst.getValue());\r\n }\r\n else if ( leftConst != null && leftConst.getValue()== 0 )\r\n {\r\n // 0 - y; return -y;\r\n if ( rightNegate != null )\r\n {\r\n // y = -u (--u); return u;\r\n return rightNegate.child;\r\n }\r\n return new NegateExpression( newRight );\r\n }\r\n else if ( rightConst != null && rightConst.getValue()== 0 )\r\n {\r\n // x - 0; return x;\r\n return newLeft;\r\n }\r\n else if ( rightNegate != null )\r\n {\r\n // x - -y; return x + y;\r\n return new AddExpression( newLeft, rightNegate.child );\r\n }\r\n\t\tif(newLeft.toString().equals(newRight.toString())){\r\n\t\t\treturn new ConstantExpression(0);\r\n\t\t}\r\n // x - y; no simplification\r\n return new SubExpression( newLeft, newRight );\r\n\t}", "public final EObject ruleMultiplicativeExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n Token lv_op_2_3=null;\n EObject this_UnaryExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:729:28: ( (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:730:1: (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:730:1: (this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:731:5: this_UnaryExpression_0= ruleUnaryExpression ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getUnaryExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleMultiplicativeExpression1682);\n this_UnaryExpression_0=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:1: ( ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) ) )*\n loop12:\n do {\n int alt12=2;\n switch ( input.LA(1) ) {\n case 35:\n {\n int LA12_2 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n case 36:\n {\n int LA12_3 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n case 37:\n {\n int LA12_4 = input.LA(2);\n\n if ( (synpred8_InternalJavaJRExpression()) ) {\n alt12=1;\n }\n\n\n }\n break;\n\n }\n\n switch (alt12) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:2: ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) ) ( (lv_right_3_0= ruleUnaryExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:2: ( ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:739:3: ( ( () ( ( ( '*' | '/' | '%' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:6: ( () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:7: () ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:755:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:756:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:761:2: ( ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:762:1: ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:762:1: ( (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:763:1: (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:763:1: (lv_op_2_1= '*' | lv_op_2_2= '/' | lv_op_2_3= '%' )\n \t int alt11=3;\n \t switch ( input.LA(1) ) {\n \t case 35:\n \t {\n \t alt11=1;\n \t }\n \t break;\n \t case 36:\n \t {\n \t alt11=2;\n \t }\n \t break;\n \t case 37:\n \t {\n \t alt11=3;\n \t }\n \t break;\n \t default:\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 11, 0, input);\n\n \t throw nvae;\n \t }\n\n \t switch (alt11) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:764:3: lv_op_2_1= '*'\n \t {\n \t lv_op_2_1=(Token)match(input,35,FOLLOW_35_in_ruleMultiplicativeExpression1768); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getMultiplicativeExpressionAccess().getOpAsteriskKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:776:8: lv_op_2_2= '/'\n \t {\n \t lv_op_2_2=(Token)match(input,36,FOLLOW_36_in_ruleMultiplicativeExpression1797); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getMultiplicativeExpressionAccess().getOpSolidusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 3 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:788:8: lv_op_2_3= '%'\n \t {\n \t lv_op_2_3=(Token)match(input,37,FOLLOW_37_in_ruleMultiplicativeExpression1826); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_3, grammarAccess.getMultiplicativeExpressionAccess().getOpPercentSignKeyword_1_0_0_1_0_2());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_3, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:803:4: ( (lv_right_3_0= ruleUnaryExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:804:1: (lv_right_3_0= ruleUnaryExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:804:1: (lv_right_3_0= ruleUnaryExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:805:3: lv_right_3_0= ruleUnaryExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightUnaryExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleUnaryExpression_in_ruleMultiplicativeExpression1865);\n \t lv_right_3_0=ruleUnaryExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"UnaryExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop12;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public Dual evaluate() {\n\t\t/* The evaluated dual numbers. */\n\t\tDual lval, rval;\n\n\t\t/* Perform the right operation for each type. */\n\t\tswitch (type) {\n\t\tcase CONSTANT:\n\t\t\treturn number;\n\t\tcase ADDITION:\n\t\t\tlval = left.evaluate();\n\t\t\trval = right.evaluate();\n\n\t\t\treturn new Dual(lval.real + rval.real, lval.dual + rval.dual);\n\t\tcase SUBTRACTION:\n\t\t\tlval = left.evaluate();\n\t\t\trval = right.evaluate();\n\n\t\t\treturn new Dual(lval.real - rval.real, lval.dual - rval.dual);\n\t\tcase MULTIPLICATION:\n\t\t\tlval = left.evaluate();\n\t\t\trval = right.evaluate();\n\n\t\t{\n\t\t\tdouble lft = lval.dual * rval.real;\n\t\t\tdouble rght = lval.real * rval.dual;\n\n\t\t\treturn new Dual(lval.real * rval.real, lft + rght);\n\t\t}\n\t\tcase DIVISION:\n\t\t\tlval = left.evaluate();\n\t\t\trval = right.evaluate();\n\n\t\t{\n\t\t\tif (rval.real == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"ERROR: Attempted to divide by zero.\");\n\t\t\t}\n\n\t\t\tdouble lft = lval.dual * rval.real;\n\t\t\tdouble rght = lval.real * rval.dual;\n\n\t\t\tdouble val = (lft - rght) / (rval.real * rval.real);\n\n\t\t\treturn new Dual(lval.real / rval.real, val);\n\t\t}\n\t\tcase SIN:\n\t\t\tlval = left.evaluate();\n\n\t\t\treturn new Dual(Math.sin(lval.real), lval.dual * Math.cos(lval.real));\n\t\tcase COS:\n\t\t\tlval = left.evaluate();\n\n\t\t\treturn new Dual(Math.cos(lval.real), -lval.dual * Math.sin(lval.real));\n\t\tcase EXPONENTIAL:\n\t\t\tlval = left.evaluate();\n\n\t\t{\n\t\t\tdouble val = Math.exp(lval.real);\n\n\t\t\treturn new Dual(val, lval.dual * val);\n\t\t}\n\t\tcase LOGARITHM:\n\t\t\tlval = left.evaluate();\n\n\t\t\tif (lval.real <= 0) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"ERROR: Attempted to take non-positive log.\");\n\t\t\t}\n\n\t\t\treturn new Dual(Math.log(lval.real), lval.dual / lval.real);\n\t\tcase POWER:\n\t\t\t// @TODO Ben Culkin 3/27/2020 :RealPower\n\t\t\t// Make this no longer a special case; since it doesn't have to be one.\n\t\t\t//\n\t\t\t// 3/28/2020 - This is less of a special case, but I've not implemented the\n\t\t\t// bit for variable exponents.\n\t\t\tlval = left.evaluate();\n\t\t\trval = right.evaluate();\n\n\t\t\tif (lval.real == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"ERROR: Raising zero to a power.\");\n\t\t\t}\n\n\t\t\tif (rval.dual != 0.0) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"ERROR: Powers with a non-zero dual component not currently implemented\");\n\t\t\t} {\n\t\t\tdouble rl = Math.pow(lval.real, rval.real);\n\n\t\t\tdouble lft = Math.pow(lval.real, rval.real - 1);\n\n\t\t\treturn new Dual(rl, rval.real * lft * lval.dual);\n\t\t}\n\t\tcase ABSOLUTE:\n\t\t\tlval = left.evaluate();\n\n\t\t\treturn new Dual(Math.abs(lval.real), lval.dual * Math.signum(lval.real));\n\t\tdefault:\n\t\t\tString msg = \"ERROR: Unknown expression type %s\";\n\n\t\t\tthrow new IllegalArgumentException(String.format(msg, type));\n\t\t}\n\t}", "Expr expr();", "@Override\n\tpublic int evaluate(){\n\t\treturn term.evaluate() + exp.evaluate();\n\t}", "public final EObject ruleNumericalAddSubtractExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalMultiplyDivideExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3072:28: ( (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3073:1: (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3073:1: (this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3074:5: this_NumericalMultiplyDivideExpression_0= ruleNumericalMultiplyDivideExpression ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getNumericalMultiplyDivideExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumericalMultiplyDivideExpression_in_ruleNumericalAddSubtractExpression7021);\r\n this_NumericalMultiplyDivideExpression_0=ruleNumericalMultiplyDivideExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumericalMultiplyDivideExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:1: ( () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) ) )*\r\n loop49:\r\n do {\r\n int alt49=2;\r\n int LA49_0 = input.LA(1);\r\n\r\n if ( ((LA49_0>=72 && LA49_0<=73)) ) {\r\n alt49=1;\r\n }\r\n\r\n\r\n switch (alt49) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:2: () ( (lv_operator_2_0= ruleAdditiveOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3082:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3083:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getNumericalAddSubtractExpressionAccess().getNumericalAddSubtractExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3088:2: ( (lv_operator_2_0= ruleAdditiveOperator ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3089:1: (lv_operator_2_0= ruleAdditiveOperator )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3089:1: (lv_operator_2_0= ruleAdditiveOperator )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3090:3: lv_operator_2_0= ruleAdditiveOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getOperatorAdditiveOperatorEnumRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleAdditiveOperator_in_ruleNumericalAddSubtractExpression7051);\r\n \t lv_operator_2_0=ruleAdditiveOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalAddSubtractExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"AdditiveOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3106:2: ( (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3107:1: (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3107:1: (lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3108:3: lv_rightOperand_3_0= ruleNumericalMultiplyDivideExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalAddSubtractExpressionAccess().getRightOperandNumericalMultiplyDivideExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumericalMultiplyDivideExpression_in_ruleNumericalAddSubtractExpression7072);\r\n \t lv_rightOperand_3_0=ruleNumericalMultiplyDivideExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalAddSubtractExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"NumericalMultiplyDivideExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop49;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "private double processExpression() throws ParsingException {\n double result = processTerm();\n\n while (true) {\n if (tryCaptureChar('+')) {\n result += processTerm();\n } else if (tryCaptureChar('-')) {\n result -= processTerm();\n } else {\n break;\n }\n }\n return result;\n }", "Expression powerExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = unaryExpression();\r\n\t\tif (isKind(OP_POWER)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\treturn new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Override\n public Expression simplify() {\n Expression right = getExpRight().simplify();\n Expression left = getExpLeft().simplify();\n //check if you can simplify more\n Num zero = new Num(0), one = new Num(1);\n //check if the left expression equals to zero\n if (zero.isEqual(left)) {\n return zero;\n }\n //check if the right expression equals to zero\n if (zero.isEqual(right)) {\n return zero;\n }\n //check if the left expression equals to one\n if (one.isEqual(left)) {\n return right;\n }\n //check if the right expression equals to one\n if (one.isEqual(right)) {\n return left;\n }\n try {\n //check if the expression is a number\n double value = evaluate();\n return new Num(value);\n } catch (Exception e) {\n return new Mult(left, right);\n }\n }", "Unary expr(Expr e);", "public final EObject ruleUnaryExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n EObject this_UnaryExpression_1 = null;\n\n EObject this_UnaryExpression_3 = null;\n\n EObject this_UnaryExpressionNotPlusMinus_4 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:841:28: ( ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:1: ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:1: ( (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression ) | (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression ) | this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus )\n int alt13=3;\n switch ( input.LA(1) ) {\n case 33:\n {\n alt13=1;\n }\n break;\n case 34:\n {\n alt13=2;\n }\n break;\n case RULE_INT:\n case RULE_LONG:\n case RULE_FLOAT:\n case RULE_DOUBLE:\n case RULE_CHAR:\n case RULE_STRING:\n case RULE_ID:\n case 38:\n case 39:\n case 41:\n case 42:\n case 43:\n case 44:\n case 45:\n case 48:\n case 49:\n case 50:\n case 51:\n {\n alt13=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 13, 0, input);\n\n throw nvae;\n }\n\n switch (alt13) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:2: (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:2: (otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:842:4: otherlv_0= '+' this_UnaryExpression_1= ruleUnaryExpression\n {\n otherlv_0=(Token)match(input,33,FOLLOW_33_in_ruleUnaryExpression1951); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getUnaryExpressionAccess().getPlusSignKeyword_0_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionParserRuleCall_0_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpression1973);\n this_UnaryExpression_1=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_1; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:6: (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:6: (otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:856:8: otherlv_2= '-' this_UnaryExpression_3= ruleUnaryExpression\n {\n otherlv_2=(Token)match(input,34,FOLLOW_34_in_ruleUnaryExpression1992); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getUnaryExpressionAccess().getHyphenMinusKeyword_1_0());\n \n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionParserRuleCall_1_1()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpression_in_ruleUnaryExpression2014);\n this_UnaryExpression_3=ruleUnaryExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpression_3; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n\n\n }\n break;\n case 3 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:871:5: this_UnaryExpressionNotPlusMinus_4= ruleUnaryExpressionNotPlusMinus\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getUnaryExpressionAccess().getUnaryExpressionNotPlusMinusParserRuleCall_2()); \n \n }\n pushFollow(FOLLOW_ruleUnaryExpressionNotPlusMinus_in_ruleUnaryExpression2042);\n this_UnaryExpressionNotPlusMinus_4=ruleUnaryExpressionNotPlusMinus();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_UnaryExpressionNotPlusMinus_4; \n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static BinaryExpression power(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void rule__AddExp__OpAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1899:1: ( ( '+' ) | ( '-' ) )\n int alt14=2;\n int LA14_0 = input.LA(1);\n\n if ( (LA14_0==12) ) {\n alt14=1;\n }\n else if ( (LA14_0==13) ) {\n alt14=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n }\n switch (alt14) {\n case 1 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1901:1: '+'\n {\n before(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n match(input,12,FOLLOW_12_in_rule__AddExp__OpAlternatives_1_1_04042); \n after(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1909:1: '-'\n {\n before(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n match(input,13,FOLLOW_13_in_rule__AddExp__OpAlternatives_1_1_04062); \n after(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "@Override\n\tpublic Number operate(Number expr1) {\n\t\treturn null;\n\t}", "LogicExpression getRightExp();", "public final Expr relExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int relExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:133:5: (lhs= addExpr (op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:133:9: lhs= addExpr (op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr )*\r\n {\r\n pushFollow(FOLLOW_addExpr_in_relExpr727);\r\n lhs=addExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:133:46: (op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr )*\r\n loop11:\r\n do {\r\n int alt11=2;\r\n int LA11_0 = input.LA(1);\r\n\r\n if ( (LA11_0==19||(LA11_0 >= 28 && LA11_0 <= 32)) ) {\r\n alt11=1;\r\n }\r\n\r\n\r\n switch (alt11) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:133:48: op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( input.LA(1)==19||(input.LA(1) >= 28 && input.LA(1) <= 32) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_addExpr_in_relExpr751);\r\n \t rhs=addExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"<\")) {\r\n \t result = new LT(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"<=\")) {\r\n \t result = new LEq(result, rhs); \r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\">\")) {\r\n \t result = new GT(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\">=\")) {\r\n \t result = new GEq(result, rhs); \r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"==\")) {\r\n \t result = new Eq(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"!=\")) {\r\n \t result = new NEq(result, rhs);\r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop11;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 16, relExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "LogicExpression getExpr();", "private double parseExpression() {\n\t\tdouble value = parseTerm();\n\t\twhile (true) {\n\t\t\tif (token.getType().equals(Token.Type.PLUS)) { // addition\n\t\t\t\ttoken=lexer.getNextToken();\n\t\t\t\tvalue += parseTerm();\n\t\t\t} else if (token.getType().equals(Token.Type.MINUS)) { // subtraction\n\t\t\t\ttoken = lexer.getNextToken();\n\t\t\t\tvalue -= parseTerm();\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}", "public final EObject ruleAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_1=null;\n Token lv_op_2_2=null;\n EObject this_MultiplicativeExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:632:28: ( (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:633:1: (this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:634:5: this_MultiplicativeExpression_0= ruleMultiplicativeExpression ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1447);\n this_MultiplicativeExpression_0=ruleMultiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_MultiplicativeExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:1: ( ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) ) )*\n loop10:\n do {\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0==33) ) {\n int LA10_2 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n else if ( (LA10_0==34) ) {\n int LA10_3 = input.LA(2);\n\n if ( (synpred7_InternalJavaJRExpression()) ) {\n alt10=1;\n }\n\n\n }\n\n\n switch (alt10) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) ) ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:2: ( ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:642:3: ( ( () ( ( ( '+' | '-' ) ) ) ) )=> ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:6: ( () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: () ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:655:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:656:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:661:2: ( ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:662:1: ( (lv_op_2_1= '+' | lv_op_2_2= '-' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:663:1: (lv_op_2_1= '+' | lv_op_2_2= '-' )\n \t int alt9=2;\n \t int LA9_0 = input.LA(1);\n\n \t if ( (LA9_0==33) ) {\n \t alt9=1;\n \t }\n \t else if ( (LA9_0==34) ) {\n \t alt9=2;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return current;}\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 9, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt9) {\n \t case 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:664:3: lv_op_2_1= '+'\n \t {\n \t lv_op_2_1=(Token)match(input,33,FOLLOW_33_in_ruleAdditiveExpression1519); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_1, grammarAccess.getAdditiveExpressionAccess().getOpPlusSignKeyword_1_0_0_1_0_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_1, null);\n \t \t \n \t }\n\n \t }\n \t break;\n \t case 2 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:676:8: lv_op_2_2= '-'\n \t {\n \t lv_op_2_2=(Token)match(input,34,FOLLOW_34_in_ruleAdditiveExpression1548); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_2, grammarAccess.getAdditiveExpressionAccess().getOpHyphenMinusKeyword_1_0_0_1_0_1());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_2, null);\n \t \t \n \t }\n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:691:4: ( (lv_right_3_0= ruleMultiplicativeExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:692:1: (lv_right_3_0= ruleMultiplicativeExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:693:3: lv_right_3_0= ruleMultiplicativeExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleMultiplicativeExpression_in_ruleAdditiveExpression1587);\n \t lv_right_3_0=ruleMultiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"MultiplicativeExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop10;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final Expr relExpr() throws RecognitionException {\n Expr result = null;\n\n int relExpr_StartIndex = input.index();\n\n Token op=null;\n Expr lhs =null;\n\n Expr rhs =null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 12) ) { return result; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:136:5: (lhs= addExpr (op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr )* )\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:136:9: lhs= addExpr (op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr )*\n {\n pushFollow(FOLLOW_addExpr_in_relExpr600);\n lhs=addExpr();\n\n state._fsp--;\n if (state.failed) return result;\n\n if ( state.backtracking==0 ) { result =lhs; }\n\n // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:136:46: (op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr )*\n loop9:\n do {\n int alt9=2;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0==16||(LA9_0 >= 25 && LA9_0 <= 29)) ) {\n alt9=1;\n }\n\n\n switch (alt9) {\n \tcase 1 :\n \t // /home/jahn/workspace1/QLAndroid/src/org/uva/sea/ql/parser/antlr/QL.g:136:48: op= ( '<' | '<=' | '>' | '>=' | '==' | '!=' ) rhs= addExpr\n \t {\n \t op=(Token)input.LT(1);\n\n \t if ( input.LA(1)==16||(input.LA(1) >= 25 && input.LA(1) <= 29) ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return result;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_addExpr_in_relExpr624);\n \t rhs=addExpr();\n\n \t state._fsp--;\n \t if (state.failed) return result;\n\n \t if ( state.backtracking==0 ) { \n \t if ((op!=null?op.getText():null).equals(\"<\")) {\n \t result = new LT(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"<=\")) {\n \t result = new LEq(result, rhs); \n \t }\n \t if ((op!=null?op.getText():null).equals(\">\")) {\n \t result = new GT(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\">=\")) {\n \t result = new GEq(result, rhs); \n \t }\n \t if ((op!=null?op.getText():null).equals(\"==\")) {\n \t result = new Eq(result, rhs);\n \t }\n \t if ((op!=null?op.getText():null).equals(\"!=\")) {\n \t result = new NEq(result, rhs);\n \t }\n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop9;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n if ( state.backtracking>0 ) { memoize(input, 12, relExpr_StartIndex); }\n\n }\n return result;\n }", "public Node term()\r\n\t{\r\n\t\tNode lhs = negaposi();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.TIMES\r\n\t\t\t\t||token == Lexer.Token.DIVIDE)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = negaposi(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.TIMES)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Mul(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.DIVIDE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Div(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public static BinaryExpression power(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "double parseExpression() {\n double x = parseTerm();\n for (;;) {\n if (eat('+')) x += parseTerm(); // addition\n else if (eat('-')) x -= parseTerm(); // subtraction\n else return x;\n }\n }", "public final CQLParser.additiveExpression_return additiveExpression() throws RecognitionException {\n CQLParser.additiveExpression_return retval = new CQLParser.additiveExpression_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token set97=null;\n CQLParser.multiplicativeExpression_return multiplicativeExpression96 = null;\n\n CQLParser.multiplicativeExpression_return multiplicativeExpression98 = null;\n\n\n Object set97_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:2: ( multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )* )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:4: multiplicativeExpression ( ( PLUS | DIFF ) multiplicativeExpression )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1862);\n multiplicativeExpression96=multiplicativeExpression();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multiplicativeExpression96.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:29: ( ( PLUS | DIFF ) multiplicativeExpression )*\n loop26:\n do {\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( ((LA26_0>=PLUS && LA26_0<=DIFF)) ) {\n alt26=1;\n }\n\n\n switch (alt26) {\n \tcase 1 :\n \t // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:400:30: ( PLUS | DIFF ) multiplicativeExpression\n \t {\n \t set97=(Token)input.LT(1);\n \t set97=(Token)input.LT(1);\n \t if ( (input.LA(1)>=PLUS && input.LA(1)<=DIFF) ) {\n \t input.consume();\n \t root_0 = (Object)adaptor.becomeRoot((Object)adaptor.create(set97), root_0);\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression1872);\n \t multiplicativeExpression98=multiplicativeExpression();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multiplicativeExpression98.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop26;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public final VecMathParser.expr_return expr() throws RecognitionException {\n VecMathParser.expr_return retval = new VecMathParser.expr_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token char_literal8=null;\n VecMathParser.multExpr_return multExpr7 = null;\n\n VecMathParser.multExpr_return multExpr9 = null;\n\n\n Object char_literal8_tree=null;\n\n try {\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:5: ( multExpr ( '+' multExpr )* )\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:7: multExpr ( '+' multExpr )*\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_multExpr_in_expr117);\n multExpr7=multExpr();\n\n state._fsp--;\n\n adaptor.addChild(root_0, multExpr7.getTree());\n // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:16: ( '+' multExpr )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==10) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // /Users/parrt/research/book/TPDSL/Book/code/walking/tree-grammar/VecMath.g:15:17: '+' multExpr\n \t {\n \t char_literal8=(Token)match(input,10,FOLLOW_10_in_expr120); \n \t char_literal8_tree = (Object)adaptor.create(char_literal8);\n \t root_0 = (Object)adaptor.becomeRoot(char_literal8_tree, root_0);\n\n \t pushFollow(FOLLOW_multExpr_in_expr123);\n \t multExpr9=multExpr();\n\n \t state._fsp--;\n\n \t adaptor.addChild(root_0, multExpr9.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public AdditionOp(Expression left, Expression right, String id){\n super(left, \"+\", right, id);\n this.setType(ExpType.ADDITION);\n }", "@Override\n public Expression simplifyMore() {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n\n // x * x -> x^2\n if (left.toString().equals(right.toString())) {\n return new Pow(left, 2);\n }\n\n // ((2.0 * x) * (x * 3.0)) -> 6x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getLeft().toString())) {\n Expression exp = new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getRight()),\n new Mult(((Mult) left).getRight(), ((Mult) right).getLeft()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // 2x * 2x -> 4x^2\n if (left instanceof Mult && right instanceof Mult) {\n if (((Mult) left).getRight().toString().equals(((Mult) right).getRight().toString())) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Pow(((Mult) left).getRight(), 2)).simplify();\n }\n }\n\n // 2x * 2y -> 4xy\n if (left instanceof Mult && right instanceof Mult) {\n return new Mult(new Mult(((Mult) left).getLeft(), ((Mult) right).getLeft()).simplify(),\n new Mult(((Mult) left).getRight(), ((Mult) right).getRight())).simplify();\n }\n\n // sin(x) * cos(x) -> 0.5 * sin(2x)\n if (right instanceof Sin && left instanceof Cos) {\n Expression exp = new Mult(0.5, new Sin(new Mult(2, ((Sin) right).getExpression())));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // cos(x) * sin(x) -> 0.5 * sin(2x)\n if (right instanceof Cos && left instanceof Sin) {\n Expression exp = new Sin(new Mult(2, ((Cos) right).getExpression()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // log(x, y) * 2 -> 2 * log(x, y)\n if (left instanceof Sin || left instanceof Cos || left instanceof Log) {\n Expression exp = new Mult(right, left);\n exp.turnBonusOn();\n return exp.simplify();\n }\n\n // x^2 * x^3 -> x^5\n if (left instanceof Pow && right instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(((Pow) right).getLeft().toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(),\n new Plus(((Pow) left).getRight(), ((Pow) right).getRight()));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n // x^2 * x -> x^3\n if (left instanceof Pow) {\n if (((Pow) left).getLeft().toString().equals(right.toString())) {\n Expression exp = new Pow(((Pow) left).getLeft(), new Plus(((Pow) left).getRight(), 1));\n exp.turnBonusOn();\n return exp.simplify();\n }\n }\n\n return this;\n }", "public final EObject ruleRelationalExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_operator_2_1=null;\n Token lv_operator_2_2=null;\n Token lv_operator_2_3=null;\n Token lv_operator_2_4=null;\n Token lv_operator_2_5=null;\n Token lv_operator_2_6=null;\n EObject this_Addition_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3972:28: ( (this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3973:1: (this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3973:1: (this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3974:5: this_Addition_0= ruleAddition ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )*\n {\n \n newCompositeNode(grammarAccess.getRelationalExpressionAccess().getAdditionParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleAddition_in_ruleRelationalExpression8921);\n this_Addition_0=ruleAddition();\n\n state._fsp--;\n\n \n current = this_Addition_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3982:1: ( () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) ) )*\n loop37:\n do {\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( ((LA37_0>=60 && LA37_0<=65)) ) {\n alt37=1;\n }\n\n\n switch (alt37) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3982:2: () ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) ) ( (lv_right_3_0= ruleAddition ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3982:2: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3983:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getRelationalExpressionAccess().getBooleanOperationLeftAction_1_0(),\n \t current);\n \t \n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3988:2: ( ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3989:1: ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3989:1: ( (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3990:1: (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3990:1: (lv_operator_2_1= '==' | lv_operator_2_2= '!=' | lv_operator_2_3= '>=' | lv_operator_2_4= '<=' | lv_operator_2_5= '>' | lv_operator_2_6= '<' )\n \t int alt36=6;\n \t switch ( input.LA(1) ) {\n \t case 60:\n \t {\n \t alt36=1;\n \t }\n \t break;\n \t case 61:\n \t {\n \t alt36=2;\n \t }\n \t break;\n \t case 62:\n \t {\n \t alt36=3;\n \t }\n \t break;\n \t case 63:\n \t {\n \t alt36=4;\n \t }\n \t break;\n \t case 64:\n \t {\n \t alt36=5;\n \t }\n \t break;\n \t case 65:\n \t {\n \t alt36=6;\n \t }\n \t break;\n \t default:\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 36, 0, input);\n\n \t throw nvae;\n \t }\n\n \t switch (alt36) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3991:3: lv_operator_2_1= '=='\n \t {\n \t lv_operator_2_1=(Token)match(input,60,FOLLOW_60_in_ruleRelationalExpression8950); \n\n \t newLeafNode(lv_operator_2_1, grammarAccess.getRelationalExpressionAccess().getOperatorEqualsSignEqualsSignKeyword_1_1_0_0());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_1, null);\n \t \t \n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4003:8: lv_operator_2_2= '!='\n \t {\n \t lv_operator_2_2=(Token)match(input,61,FOLLOW_61_in_ruleRelationalExpression8979); \n\n \t newLeafNode(lv_operator_2_2, grammarAccess.getRelationalExpressionAccess().getOperatorExclamationMarkEqualsSignKeyword_1_1_0_1());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_2, null);\n \t \t \n\n \t }\n \t break;\n \t case 3 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4015:8: lv_operator_2_3= '>='\n \t {\n \t lv_operator_2_3=(Token)match(input,62,FOLLOW_62_in_ruleRelationalExpression9008); \n\n \t newLeafNode(lv_operator_2_3, grammarAccess.getRelationalExpressionAccess().getOperatorGreaterThanSignEqualsSignKeyword_1_1_0_2());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_3, null);\n \t \t \n\n \t }\n \t break;\n \t case 4 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4027:8: lv_operator_2_4= '<='\n \t {\n \t lv_operator_2_4=(Token)match(input,63,FOLLOW_63_in_ruleRelationalExpression9037); \n\n \t newLeafNode(lv_operator_2_4, grammarAccess.getRelationalExpressionAccess().getOperatorLessThanSignEqualsSignKeyword_1_1_0_3());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_4, null);\n \t \t \n\n \t }\n \t break;\n \t case 5 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4039:8: lv_operator_2_5= '>'\n \t {\n \t lv_operator_2_5=(Token)match(input,64,FOLLOW_64_in_ruleRelationalExpression9066); \n\n \t newLeafNode(lv_operator_2_5, grammarAccess.getRelationalExpressionAccess().getOperatorGreaterThanSignKeyword_1_1_0_4());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_5, null);\n \t \t \n\n \t }\n \t break;\n \t case 6 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4051:8: lv_operator_2_6= '<'\n \t {\n \t lv_operator_2_6=(Token)match(input,65,FOLLOW_65_in_ruleRelationalExpression9095); \n\n \t newLeafNode(lv_operator_2_6, grammarAccess.getRelationalExpressionAccess().getOperatorLessThanSignKeyword_1_1_0_5());\n \t \n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"operator\", lv_operator_2_6, null);\n \t \t \n\n \t }\n \t break;\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4066:2: ( (lv_right_3_0= ruleAddition ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4067:1: (lv_right_3_0= ruleAddition )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4067:1: (lv_right_3_0= ruleAddition )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4068:3: lv_right_3_0= ruleAddition\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getRelationalExpressionAccess().getRightAdditionParserRuleCall_1_2_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleAddition_in_ruleRelationalExpression9132);\n \t lv_right_3_0=ruleAddition();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getRelationalExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"Addition\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop37;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "protected IExpressionValue expression() throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t\r\n\t\t// temp table already created by upper caller\r\n\t\t\r\n\t\tIExpressionValue temp1 = term();\r\n\t\tIExpressionValue temp2 = null;\r\n\t\t\r\n\t\tFloat temp1Value = null;\r\n\t\tFloat temp2Value = null;\r\n\t\t// LOOK FOR +/- (OPTIONAL)\r\n\t\tswitch (look) {\r\n\t\tcase '+':\r\n\t\t\tmatch('+');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)) {\r\n\t\t\t\t// TODO cut the subtree if it is a known value...\r\n\t\t\t\ttemp1 = new AddOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tmatch('-');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)){\r\n\t\t\t\t// TODO cut the subtree if it is known value...\r\n\t\t\t\ttemp1 = new SubtractOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"Expression returned \" + temp1.getProbability());\r\n\t\treturn temp1;\r\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 }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void unaryExpression() throws RecognitionException {\n int unaryExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"unaryExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(815, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 121) ) { return ; }\n // Java.g:816:5: ( '+' unaryExpression | '-' unaryExpression | '++' unaryExpression | '--' unaryExpression | unaryExpressionNotPlusMinus )\n int alt142=5;\n try { dbg.enterDecision(142);\n\n switch ( input.LA(1) ) {\n case 105:\n {\n alt142=1;\n }\n break;\n case 106:\n {\n alt142=2;\n }\n break;\n case 109:\n {\n alt142=3;\n }\n break;\n case 110:\n {\n alt142=4;\n }\n break;\n case Identifier:\n case FloatingPointLiteral:\n case CharacterLiteral:\n case StringLiteral:\n case HexLiteral:\n case OctalLiteral:\n case DecimalLiteral:\n case 47:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n case 65:\n case 66:\n case 69:\n case 70:\n case 71:\n case 72:\n case 111:\n case 112:\n case 113:\n {\n alt142=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 142, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(142);}\n\n switch (alt142) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:816:9: '+' unaryExpression\n {\n dbg.location(816,9);\n match(input,105,FOLLOW_105_in_unaryExpression4918); if (state.failed) return ;\n dbg.location(816,13);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4920);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:817:9: '-' unaryExpression\n {\n dbg.location(817,9);\n match(input,106,FOLLOW_106_in_unaryExpression4930); if (state.failed) return ;\n dbg.location(817,13);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4932);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:818:9: '++' unaryExpression\n {\n dbg.location(818,9);\n match(input,109,FOLLOW_109_in_unaryExpression4942); if (state.failed) return ;\n dbg.location(818,14);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4944);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:819:9: '--' unaryExpression\n {\n dbg.location(819,9);\n match(input,110,FOLLOW_110_in_unaryExpression4954); if (state.failed) return ;\n dbg.location(819,14);\n pushFollow(FOLLOW_unaryExpression_in_unaryExpression4956);\n unaryExpression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:820:9: unaryExpressionNotPlusMinus\n {\n dbg.location(820,9);\n pushFollow(FOLLOW_unaryExpressionNotPlusMinus_in_unaryExpression4966);\n unaryExpressionNotPlusMinus();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 121, unaryExpression_StartIndex); }\n }\n dbg.location(821, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"unaryExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n public void visit(CalcExpr node) {\n }", "public static Temp evalExpression(CommonTree tree){\n\t\t// leaf node, int/float/id\n\n\t\tif (tree.getChildCount() == 0){\n\t\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t\tif (tree.getType() == LittleParser.INTLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREI\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse if(tree.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREF\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx\n\t\t\t\ttemp.setType(allTables.lookupType(temp.getValue().trim()));\n\t\t\t\ttemp.setName(tree.getText());\n\t\t\t\ttemperaryNum--;\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\t\t// Not a leaf node, evaluate children expressions\n\t\telse{\n\t\t\t// test for function call\n\t\t\tif (tree.getType() == LittleParser.FUNC_CALL){\n\t\t\t\t// add IR for evaluating the function and return temperary for return value\n\t\t\t\t// after it has been popped off the stack\n\t\t\t\treturn evalFunction(tree);\n\t\t\t}\n\t\t\t//\t\t\tif (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){\n\t\t\t//\t\t\t\tif ()\n\t\t\t//\t\t\t}\n\t\t\tTemp left = evalExpression((CommonTree) tree.getChild(0));\n\t\t\tTemp right = evalExpression((CommonTree) tree.getChild(1));\n\n\t\t\tTemp temp = new Temp(temperaryNum++,left.getType(), \"EXP\");\n\t\t\tif (tree.getText().contains(\"+\")){ // add\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t} //both parameters\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"-\")){ // subtract\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"*\")){ // multiply\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{ // divide\n\t\t\t\tif (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\n\t}", "@Override\n public Expression simplify() {\n try {\n return new Num(this.evaluate());\n } catch (Exception e) {\n if (getExpression1().simplify().toString().equals(getExpression2().simplify().toString())) {\n return new Num(0);\n }\n if (getExpression1().simplify().toString().equals(\"0.0\")) {\n return new Neg(getExpression2().simplify());\n }\n if (getExpression2().simplify().toString().equals(\"0.0\")) {\n return getExpression1().simplify();\n }\n return new Minus(getExpression1().simplify(), getExpression2().simplify());\n }\n }", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "private double evaluarExp4() throws Excepciones{\n double resultado;\n double resultadoParcial;\n double ex;\n int t;\n resultado = evaluarExp5();\n if(token.equals(\"^\")){\n obtieneToken();\n resultadoParcial = evaluarExp4();\n ex = resultado;\n if(resultadoParcial == 0.0) {\n resultado = 1.0;\n }else{\n for(t=(int)resultadoParcial-1; t > 0; t--){\n resultado = resultado * ex;\n }\n }\n }\n return resultado;\n}", "@Override\n public String evaluate(final String leftOperand, final String rightOperand)\n throws IllegalArgumentException\n {\n // error checking for null/empty\n if (leftOperand == null || rightOperand == null || leftOperand.equals(\"\")\n || rightOperand.equals(\"\"))\n {\n throw new IllegalArgumentException(Strings.UI.getStrings().getString(Strings.TWO_OPERANDS));\n }\n\n String noSpL = leftOperand.replaceAll(Strings.SPACE, \"\");\n String noSpR = rightOperand.replaceAll(Strings.SPACE, \"\");\n String distribute = SubtractionOperator.distribute(noSpR);\n String result = new AdditionOperator().evaluate(noSpL, distribute);\n\n return result;\n }", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "ExpOperand createExpOperand();", "private double evaluarExp2() throws Excepciones{\n char op;\n double resultado;\n double resultadoParcial;\n resultado = evaluarExp3();\n while((op = token.charAt(0)) == '+' || op == '-') {\n obtieneToken();\n resultadoParcial = evaluarExp3();\n switch(op) {\n case '-':\n resultado = resultado - resultadoParcial;\n break;\n case '+':\n resultado = resultado + resultadoParcial;\n break;\n } \n }\n return resultado;\n }", "BaseNumber add(BaseNumber operand);", "com.google.type.Expr getCelExpression();", "@Test\n public void testCalculateRPNCustom() throws Exception {\n String[] expression = {\"3\",\"4\",\"+\",\"8\",\"3\",\"-\",\"+\",\"10\",\"2\",\"/\", \"3\", \"+\", \"*\", \"15\",\"/\"};\n double result = solver.calculateRPNCustom(expression);\n\n assertThat(result, is(6.4));\n }", "Expression unaryExpressionNotPlusMinus() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tif (isKind(OP_EXCLAMATION)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first,op,e);\r\n\t\t} else \t{\r\n\t\t\treturn primary(); //errors will be reported by primary()\r\n\t\t}\r\n\t}", "public Multiplication(Expression l, Expression r) {\n\tleft = l;\n\tright = r;\n }", "@Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n Expression base = args.pollFirst().getTarget();\n Value<Expression> raised = args.peekFirst();\n if (raised != null && raised.isSource() && raised.getSource().getRule() == Calc.RAISED) {\n args.pollFirst(); // ^\n Expression exponent = args.pollFirst().getTarget();\n return new Exponent(base, exponent);\n } else {\n // a single term is not a factor\n return base;\n }\n }", "void visit(PlusExpression expression);", "public final void additiveExpression() throws RecognitionException {\n int additiveExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"additiveExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(807, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 119) ) { return ; }\n // Java.g:808:5: ( multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )* )\n dbg.enterAlt(1);\n\n // Java.g:808:9: multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )*\n {\n dbg.location(808,9);\n pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4840);\n multiplicativeExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(808,34);\n // Java.g:808:34: ( ( '+' | '-' ) multiplicativeExpression )*\n try { dbg.enterSubRule(140);\n\n loop140:\n do {\n int alt140=2;\n try { dbg.enterDecision(140);\n\n int LA140_0 = input.LA(1);\n\n if ( ((LA140_0>=105 && LA140_0<=106)) ) {\n alt140=1;\n }\n\n\n } finally {dbg.exitDecision(140);}\n\n switch (alt140) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:808:36: ( '+' | '-' ) multiplicativeExpression\n \t {\n \t dbg.location(808,36);\n \t if ( (input.LA(1)>=105 && input.LA(1)<=106) ) {\n \t input.consume();\n \t state.errorRecovery=false;state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t dbg.recognitionException(mse);\n \t throw mse;\n \t }\n\n \t dbg.location(808,48);\n \t pushFollow(FOLLOW_multiplicativeExpression_in_additiveExpression4852);\n \t multiplicativeExpression();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop140;\n }\n } while (true);\n } finally {dbg.exitSubRule(140);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 119, additiveExpression_StartIndex); }\n }\n dbg.location(809, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"additiveExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static BinaryExpression divide(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "Expression createExpression();", "Sum getMultiplier();", "public final void mEXPONENT() throws RecognitionException {\r\n try {\r\n if (this.input.LA(1) == 'E' || this.input.LA(1) == 'e') {\r\n this.input.consume();\r\n\r\n } else {\r\n final MismatchedSetException mse = new MismatchedSetException(null, this.input);\r\n this.recover(mse);\r\n throw mse;\r\n }\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:83:22: ( '+' | '-' )?\r\n int alt18 = 2;\r\n final int LA18_0 = this.input.LA(1);\r\n if (LA18_0 == '+' || LA18_0 == '-') {\r\n alt18 = 1;\r\n }\r\n switch (alt18) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:\r\n {\r\n if (this.input.LA(1) == '+' || this.input.LA(1) == '-') {\r\n this.input.consume();\r\n\r\n } else {\r\n final MismatchedSetException mse = new MismatchedSetException(null,\r\n this.input);\r\n this.recover(mse);\r\n throw mse;\r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:83:33: ( '0' .. '9'\r\n // )+\r\n int cnt19 = 0;\r\n loop19: do {\r\n int alt19 = 2;\r\n final int LA19_0 = this.input.LA(1);\r\n\r\n if (LA19_0 >= '0' && LA19_0 <= '9') {\r\n alt19 = 1;\r\n }\r\n\r\n switch (alt19) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:83:34: '0'\r\n // .. '9'\r\n {\r\n this.matchRange('0', '9');\r\n\r\n }\r\n break;\r\n\r\n default:\r\n if (cnt19 >= 1) {\r\n break loop19;\r\n }\r\n final EarlyExitException eee = new EarlyExitException(19, this.input);\r\n throw eee;\r\n }\r\n cnt19++;\r\n } while (true);\r\n\r\n } finally {\r\n }\r\n }", "@Override\n public Double evaluate() {\n return left.evaluate() + right.evaluate();\n }", "long addExpression(Expression expression);", "private int eval(ExpressionNodes root)\n\t {\n\t \tif (root.right == null && root.left == null) \n\t \t{\n\t \t\t\tint leaf = Integer.parseInt(root.data);\n\t \t\t\treturn leaf; \n\t \t}\n\t \t\n\t \t// if the node is an operator // \n\t \telse \n\t \t{\n\t \t\t\tint op1 = eval(root.left); \n\t \t\t\tint op2 = eval(root.right);\n\t \n\t \t\n\t\t\t \tString operator = root.data; // initialize operator string \n\t\t\t \tint n = 0; // initialize the integer that will be returned \n\t\t\t \t\n\t\t\t \t// switch case to conduct for the different operators \n\t\t\t \tswitch(operator) \n\t\t\t \t{\n\t\t\t\t case \"+\":\n\t\t\t\t \tn = op1 + op2; \n\t\t\t\t \tbreak;\n\t\t\t\t \t\n\t\t\t\t case \"-\":\n\t\t\t\t n = op1 - op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"*\":\n\t\t\t\t n = op1 * op2; \n\t\t\t\t break;\n\t\t\t\t \n\t\t\t\t case \"/\":\n\t\t\t\t n = op1 / op2; \n\t\t\t\t break;\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \treturn n; \n\t \t}\n\t\t\t\n\t }", "public final EObject ruleAddition() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_Multiplication_0 = null;\n\n EObject lv_right_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4104:28: ( (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4105:1: (this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )* )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4106:5: this_Multiplication_0= ruleMultiplication ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n {\n \n newCompositeNode(grammarAccess.getAdditionAccess().getMultiplicationParserRuleCall_0()); \n \n pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9227);\n this_Multiplication_0=ruleMultiplication();\n\n state._fsp--;\n\n \n current = this_Multiplication_0; \n afterParserOrEnumRuleCall();\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:1: ( ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) ) )*\n loop39:\n do {\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( ((LA39_0>=66 && LA39_0<=67)) ) {\n alt39=1;\n }\n\n\n switch (alt39) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) ) ( (lv_right_5_0= ruleMultiplication ) )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:2: ( ( () otherlv_2= '+' ) | ( () otherlv_4= '-' ) )\n \t int alt38=2;\n \t int LA38_0 = input.LA(1);\n\n \t if ( (LA38_0==66) ) {\n \t alt38=1;\n \t }\n \t else if ( (LA38_0==67) ) {\n \t alt38=2;\n \t }\n \t else {\n \t NoViableAltException nvae =\n \t new NoViableAltException(\"\", 38, 0, input);\n\n \t throw nvae;\n \t }\n \t switch (alt38) {\n \t case 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:3: ( () otherlv_2= '+' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: () otherlv_2= '+'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4114:4: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4115:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getPlusLeftAction_1_0_0_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_2=(Token)match(input,66,FOLLOW_66_in_ruleAddition9250); \n\n \t \tnewLeafNode(otherlv_2, grammarAccess.getAdditionAccess().getPlusSignKeyword_1_0_0_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n \t case 2 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:6: ( () otherlv_4= '-' )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: () otherlv_4= '-'\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4125:7: ()\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4126:5: \n \t {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getAdditionAccess().getMinusLeftAction_1_0_1_0(),\n \t current);\n \t \n\n \t }\n\n \t otherlv_4=(Token)match(input,67,FOLLOW_67_in_ruleAddition9279); \n\n \t \tnewLeafNode(otherlv_4, grammarAccess.getAdditionAccess().getHyphenMinusKeyword_1_0_1_1());\n \t \n\n \t }\n\n\n \t }\n \t break;\n\n \t }\n\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4135:3: ( (lv_right_5_0= ruleMultiplication ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4136:1: (lv_right_5_0= ruleMultiplication )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4137:3: lv_right_5_0= ruleMultiplication\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getAdditionAccess().getRightMultiplicationParserRuleCall_1_1_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleMultiplication_in_ruleAddition9302);\n \t lv_right_5_0=ruleMultiplication();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getAdditionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_5_0, \n \t \t\t\"Multiplication\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop39;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final void expr() throws RecognitionException {\n try {\n // SimpleCalc.g:37:6: ( term ( ( PLUS | MINUS ) term )* )\n // SimpleCalc.g:37:8: term ( ( PLUS | MINUS ) term )*\n {\n pushFollow(FOLLOW_term_in_expr64);\n term();\n\n state._fsp--;\n\n\n // SimpleCalc.g:37:13: ( ( PLUS | MINUS ) term )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0==MINUS||LA1_0==PLUS) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // SimpleCalc.g:37:15: ( PLUS | MINUS ) term\n \t {\n \t if ( input.LA(1)==MINUS||input.LA(1)==PLUS ) {\n \t input.consume();\n \t state.errorRecovery=false;\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t throw mse;\n \t }\n\n\n \t pushFollow(FOLLOW_term_in_expr79);\n \t term();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }", "public final EObject ruleNumericalMultiplyDivideExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalUnaryExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3144:28: ( (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3145:1: (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3145:1: (this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3146:5: this_NumericalUnaryExpression_0= ruleNumericalUnaryExpression ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getNumericalUnaryExpressionParserRuleCall_0()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleNumericalUnaryExpression_in_ruleNumericalMultiplyDivideExpression7167);\r\n this_NumericalUnaryExpression_0=ruleNumericalUnaryExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_NumericalUnaryExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:1: ( () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) ) )*\r\n loop50:\r\n do {\r\n int alt50=2;\r\n int LA50_0 = input.LA(1);\r\n\r\n if ( (LA50_0==33||(LA50_0>=74 && LA50_0<=75)) ) {\r\n alt50=1;\r\n }\r\n\r\n\r\n switch (alt50) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:2: () ( (lv_operator_2_0= ruleMultiplicativeOperator ) ) ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3154:2: ()\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3155:5: \r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t current = forceCreateModelElementAndSet(\r\n \t grammarAccess.getNumericalMultiplyDivideExpressionAccess().getNumericalMultiplyDivideExpressionLeftOperandAction_1_0(),\r\n \t current);\r\n \t \r\n \t }\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3160:2: ( (lv_operator_2_0= ruleMultiplicativeOperator ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3161:1: (lv_operator_2_0= ruleMultiplicativeOperator )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3161:1: (lv_operator_2_0= ruleMultiplicativeOperator )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3162:3: lv_operator_2_0= ruleMultiplicativeOperator\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getOperatorMultiplicativeOperatorEnumRuleCall_1_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleMultiplicativeOperator_in_ruleNumericalMultiplyDivideExpression7197);\r\n \t lv_operator_2_0=ruleMultiplicativeOperator();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalMultiplyDivideExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"operator\",\r\n \t \t\tlv_operator_2_0, \r\n \t \t\t\"MultiplicativeOperator\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3178:2: ( (lv_rightOperand_3_0= ruleNumericalUnaryExpression ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3179:1: (lv_rightOperand_3_0= ruleNumericalUnaryExpression )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3179:1: (lv_rightOperand_3_0= ruleNumericalUnaryExpression )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3180:3: lv_rightOperand_3_0= ruleNumericalUnaryExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getNumericalMultiplyDivideExpressionAccess().getRightOperandNumericalUnaryExpressionParserRuleCall_1_2_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumericalUnaryExpression_in_ruleNumericalMultiplyDivideExpression7218);\r\n \t lv_rightOperand_3_0=ruleNumericalUnaryExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getNumericalMultiplyDivideExpressionRule());\r\n \t \t }\r\n \t \t\tset(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"rightOperand\",\r\n \t \t\tlv_rightOperand_3_0, \r\n \t \t\t\"NumericalUnaryExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop50;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final JavaliParser.expr_return expr() throws RecognitionException {\n\t\tJavaliParser.expr_return retval = new JavaliParser.expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope leftExpr =null;\n\t\tParserRuleReturnScope op =null;\n\t\tParserRuleReturnScope rightExpr =null;\n\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_compOp=new RewriteRuleSubtreeStream(adaptor,\"rule compOp\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:2: (leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:4: leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1531);\n\t\t\tleftExpr=simpleExpr();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_simpleExpr.add(leftExpr.getTree());\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:428:3: ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\tint alt25=2;\n\t\t\tint LA25_0 = input.LA(1);\n\t\t\tif ( (LA25_0==70||LA25_0==73||LA25_0==77) ) {\n\t\t\t\talt25=1;\n\t\t\t}\n\t\t\telse if ( (LA25_0==66||(LA25_0 >= 78 && LA25_0 <= 79)||(LA25_0 >= 81 && LA25_0 <= 83)) ) {\n\t\t\t\talt25=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 25, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt25) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:429:4: \n\t\t\t\t\t{\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: leftExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 429:4: -> $leftExpr\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_leftExpr.nextTree());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:430:5: op= compOp rightExpr= simpleExpr\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_compOp_in_expr1552);\n\t\t\t\t\top=compOp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_compOp.add(op.getTree());\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1556);\n\t\t\t\t\trightExpr=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(rightExpr.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: compOp, leftExpr, rightExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval, rightExpr\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_rightExpr=new RewriteRuleSubtreeStream(adaptor,\"rule rightExpr\",rightExpr!=null?rightExpr.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 431:4: -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:431:7: ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BinaryOp, (op!=null?(op.start):null), \"BinaryOp\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_leftExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_compOp.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_rightExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public <V extends Number> FluentExp<V> plus (SQLExpression<V> expr)\n {\n return new Add<V>(this, expr);\n }", "@Override\n\tpublic int Calculate(int constant, Expression left, Expression right) {\n\t\treturn left.evaluate()-right.evaluate();\n\t}", "Expression unaryExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tif (isKind(OP_PLUS)) { //throw away the plus here\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first, op, e);\r\n\t\t}\r\n\t\telse if (isKind(OP_MINUS)){\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e = unaryExpression();\r\n\t\t\treturn new ExpressionUnary(first, op, e);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn unaryExpressionNotPlusMinus();\r\n\t\t}\r\n\t}", "BaseNumber multiply(BaseNumber operand);", "public static BinaryExpression divide(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public ExprTail expr_tail() {\n ExprTail et = null;\n if (lexer.token == Symbol.PLUS || lexer.token == Symbol.MINUS) {\n et = new ExprTail();\n et.setAddop(lexer.getStringValue().toCharArray()[0]);\n lexer.nextToken();\n if (factor(et)) {\n et.setExprTail(expr_tail());\n } else {\n error.signal(\"Factor expected after operation symbol\");\n }\n }\n return et;\n }", "private Expr unary() {\n if(match(BANG, MINUS)) { // If this thing can be accurately considered a unary...\n Token operator = previous();\n Expr right = unary();\n return new Expr.Unary(operator, right);\n }\n\n return call(); // Otherwise, pass it up the chain of precedence\n }", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }" ]
[ "0.62550616", "0.62171495", "0.6179422", "0.60796744", "0.5960977", "0.59474266", "0.5945962", "0.5915087", "0.5868547", "0.5865329", "0.5853258", "0.5829441", "0.5801317", "0.578953", "0.57716596", "0.5757143", "0.57304174", "0.5729863", "0.57279474", "0.5719333", "0.5708617", "0.5707711", "0.567657", "0.56643337", "0.5639535", "0.56327933", "0.56163144", "0.5614979", "0.5603439", "0.55973196", "0.5592485", "0.5576014", "0.5565984", "0.55543935", "0.55489874", "0.5534823", "0.5517531", "0.55108047", "0.54930615", "0.5492012", "0.54808754", "0.5480045", "0.5465673", "0.5447317", "0.5447317", "0.54395807", "0.5434301", "0.5424729", "0.540699", "0.53958434", "0.538884", "0.53805506", "0.5380298", "0.53677696", "0.5362833", "0.5356878", "0.5351778", "0.53467816", "0.5346664", "0.533374", "0.5329531", "0.5329531", "0.5329531", "0.5329531", "0.53229815", "0.53228575", "0.5322765", "0.53188515", "0.53130823", "0.53096324", "0.5297504", "0.52941823", "0.52887195", "0.52782273", "0.52775544", "0.52754706", "0.5261268", "0.52568305", "0.5250415", "0.52489656", "0.5245497", "0.52374923", "0.5236782", "0.52363557", "0.52346873", "0.52312154", "0.52294874", "0.5228077", "0.52277607", "0.5226603", "0.5224628", "0.5223226", "0.5215841", "0.520613", "0.51978785", "0.5195067", "0.5188916", "0.5183065", "0.5173082", "0.5163049", "0.5161183" ]
0.0
-1
Contexts: Expression returns VariableExpression Addition returns VariableExpression Addition.Plus_1_0_0_0 returns VariableExpression Addition.Minus_1_0_1_0 returns VariableExpression Multiplication returns VariableExpression Multiplication.Multi_1_0_0_0 returns VariableExpression Multiplication.Div_1_0_1_0 returns VariableExpression PrimaryExpression returns VariableExpression Constraint: value=[Variable|ID]
protected void sequence_PrimaryExpression(ISerializationContext context, VariableExpression semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_EXPRESSION__VALUE) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_EXPRESSION__VALUE)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getPrimaryExpressionAccess().getValueVariableIDTerminalRuleCall_2_1_0_1(), semanticObject.eGet(DslPackage.Literals.VARIABLE_EXPRESSION__VALUE, false)); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final CQLParser.variableDefinition_return variableDefinition() throws RecognitionException {\n CQLParser.variableDefinition_return retval = new CQLParser.variableDefinition_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token i=null;\n Token string_literal9=null;\n Token char_literal10=null;\n CQLParser.arithmeticExpression_return e = null;\n\n\n Object i_tree=null;\n Object string_literal9_tree=null;\n Object char_literal10_tree=null;\n RewriteRuleTokenStream stream_113=new RewriteRuleTokenStream(adaptor,\"token 113\");\n RewriteRuleTokenStream stream_110=new RewriteRuleTokenStream(adaptor,\"token 110\");\n RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,\"token ID\");\n RewriteRuleSubtreeStream stream_arithmeticExpression=new RewriteRuleSubtreeStream(adaptor,\"rule arithmeticExpression\");\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:205:2: (i= ID ':=' e= arithmeticExpression ';' -> ^( VAR $i $e) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:205:4: i= ID ':=' e= arithmeticExpression ';'\n {\n i=(Token)match(input,ID,FOLLOW_ID_in_variableDefinition427); \n stream_ID.add(i);\n\n string_literal9=(Token)match(input,113,FOLLOW_113_in_variableDefinition429); \n stream_113.add(string_literal9);\n\n pushFollow(FOLLOW_arithmeticExpression_in_variableDefinition433);\n e=arithmeticExpression();\n\n state._fsp--;\n\n stream_arithmeticExpression.add(e.getTree());\n char_literal10=(Token)match(input,110,FOLLOW_110_in_variableDefinition435); \n stream_110.add(char_literal10);\n\n\n\n // AST REWRITE\n // elements: i, e\n // token labels: i\n // rule labels: retval, e\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleTokenStream stream_i=new RewriteRuleTokenStream(adaptor,\"token i\",i);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,\"rule e\",e!=null?e.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 206:3: -> ^( VAR $i $e)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:206:6: ^( VAR $i $e)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VAR, \"VAR\"), root_1);\n\n adaptor.addChild(root_1, stream_i.nextNode());\n adaptor.addChild(root_1, stream_e.nextTree());\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 retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "VariableExp createVariableExp();", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "@Test\n public void test_DivisionWithTwoVariables() {\n Operator add = new Operator(new Constant(10), new Variable(\"x\"), Operator.Operators.ADD);\n Operator min = new Operator(new Constant(12), new Variable(\"y\"), Operator.Operators.MINUS);\n Operator mul = new Operator(add, min, Operator.Operators.MUL);\n Operator add2 = new Operator(new Constant(5), new Variable(\"x\"), Operator.Operators.ADD);\n Operator div = new Operator(mul, add2, Operator.Operators.DIV);\n\n\t\t/* x = 3 y = 2 */\n Context c = new Context();\n c.assign(\"x\", 3);\n c.assign(\"y\", 2);\n\n assertThat(div.evaluate(c), is(16.25));\n }", "protected void sequence_VariableCalcule(ISerializationContext context, VariableCalcule semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getExpressionExpressionParserRuleCall_3_0(), semanticObject.getExpression());\n\t\tfeeder.finish();\n\t}", "<C, PM> VariableExp<C, PM> createVariableExp();", "public Expression differentiate(String var) {\r\n // var might be a differentiate of other variable\r\n if (!this.toString().equalsIgnoreCase(var)) {\r\n return (Expression) new Num(0);\r\n }\r\n return (Expression) new Num(1);\r\n\r\n }", "public int getValue(ArrayList<variable> variables, arithmetic_ex e) {\n String id = e.getId(); // get id of arithmetic expression\n try {\n for (int i = 0; i < variables.size(); i++) {\n if ((variables.get(i).getId()).trim().equals(id)) // if variable id matches expression id\n return variables.get(i).getValue(); // return the value from the variable array list\n }\n throw new JuliaSyntaxException(\"compute\"); // hasn't returned a value yet, so throw an error\n } catch (JuliaSyntaxException jse) {\n\n }\n return -1;\n }", "@Override\n public Expression differentiate(String var) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Plus(new Mult(left.differentiate(var), right), new Mult(left, right.differentiate(var)));\n }", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "public static Temp evalExpression(CommonTree tree){\n\t\t// leaf node, int/float/id\n\n\t\tif (tree.getChildCount() == 0){\n\t\t\tTemp temp = new Temp(temperaryNum++,tree.getType(),tree.getText());\n\t\t\tif (tree.getType() == LittleParser.INTLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREI\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse if(tree.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\tircode.add(new ThreeOpCode(\"STOREF\",tree.getText(),temp.getName()));\n\t\t\t}\n\t\t\telse{ // look up the variable in the symbol table to set type, use var_name instead of $Tx and recycle $Tx\n\t\t\t\ttemp.setType(allTables.lookupType(temp.getValue().trim()));\n\t\t\t\ttemp.setName(tree.getText());\n\t\t\t\ttemperaryNum--;\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\t\t// Not a leaf node, evaluate children expressions\n\t\telse{\n\t\t\t// test for function call\n\t\t\tif (tree.getType() == LittleParser.FUNC_CALL){\n\t\t\t\t// add IR for evaluating the function and return temperary for return value\n\t\t\t\t// after it has been popped off the stack\n\t\t\t\treturn evalFunction(tree);\n\t\t\t}\n\t\t\t//\t\t\tif (tree.getChild(0).getChildCount() == 0 && tree.getChild(1).getChildCount() == 0){\n\t\t\t//\t\t\t\tif ()\n\t\t\t//\t\t\t}\n\t\t\tTemp left = evalExpression((CommonTree) tree.getChild(0));\n\t\t\tTemp right = evalExpression((CommonTree) tree.getChild(1));\n\n\t\t\tTemp temp = new Temp(temperaryNum++,left.getType(), \"EXP\");\n\t\t\tif (tree.getText().contains(\"+\")){ // add\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t} //both parameters\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"ADDI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"-\")){ // subtract\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tircode.add(new ThreeOpCode(\"SUBI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tree.getText().contains(\"*\")){ // multiply\n\t\t\t\tif (left.getType() == LittleParser.INTLITERAL && right.getType() == LittleParser.INTLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == LittleParser.FLOATLITERAL || right.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"MULTF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"MULR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"MULTI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"MULI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{ // divide\n\t\t\t\tif (right.getType() == LittleParser.INTLITERAL && left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (right.getType() == LittleParser.FLOATLITERAL || left.getType() == LittleParser.FLOATLITERAL){\n\t\t\t\t\t//System.out.println(\"DIVF \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t}\n\t\t\t\telse if (left.getType() == -1 && right.getType() == -1){\n\t\t\t\t\t//System.out.println(left.getName() + \": \" + left.getType() + \" \" + right.getName() + \": \" + right.getType());\n\t\t\t\t\t// need to lookup symbol in main and then global to find type\n\t\t\t\t\tint ltype = allTables.lookupType(left.name);\n\t\t\t\t\tint rtype = allTables.lookupType(right.name);\n\t\t\t\t\tif (ltype == LittleParser.INTLITERAL && rtype == LittleParser.INTLITERAL){\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVR\", left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//System.out.println(\"DIVI \" + left.getName() + \" \" + right.getName() + \" \"+temp.getName());\n\t\t\t\t\tircode.add(new ThreeOpCode(\"DIVI\",left.getName(),right.getName(),temp.getName()));\n\t\t\t\t\ttemp.setType(LittleParser.INTLITERAL);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn temp;\n\t\t}\n\n\t}", "public int compute(ArrayList<variable> variables) {\n int l = left.compute(variables); // get value of left side\n int r = right.compute(variables); // get value of right side\n if (l == -999) { // if left side is an id\n l = getValue(variables, left); // get the value from the variables array list\n }\n if (r == -999) { // if right side is an id\n r = getValue(variables, right); // get the value from the variables array list\n }\n if (operator.getArithmeticOp().equals(\"*\")) {\n return (int) l * r;\n } else if (operator.getArithmeticOp().equals(\"/\")) {\n return (int) l / r;\n } else if (operator.getArithmeticOp().equals(\"+\")) {\n return (int) l + r;\n } else if (operator.getArithmeticOp().equals(\"-\")) {\n return (int) l - r;\n } else if (operator.getArithmeticOp().equals(\"%\")) {\n return (int) l % r;\n } else if (operator.getArithmeticOp().equals(\"\\\\\")) {\n return (int) r / l;\n } else {\n return -999;\n }\n }", "NumericExpression createNumericExpression();", "SEIntegerVariable getOperand1();", "public IExpressionValue getUserDefinedVariable(String key);", "public Expression differentiate(String var) {\n Expression sin = new Sin(this.getExp());\n Expression diff = this.getExp().differentiate(var);\n diff = new Neg(diff);\n Expression e = new Mult(diff, sin);\n return e;\n }", "@Override\n public void visit(VariableEvalNode variableEvalNode) {\n }", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "Expression multExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = powerExpression();\r\n\t\twhile(isKind(OP_TIMES, OP_DIV, OP_MOD)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "@Override\n public void visitVariable(VariableExpression variableExpression) {\n distance += variableExpression.interpret(context);\n }", "Expression createExpression();", "public abstract IDecisionVariable getVariable();", "@Override\n public Integer visitAssign(CalculatorParser.AssignContext ctx) {\n String id = ctx.ID().getText(); // id is left-hand side of '='\n int value = visit(ctx.expr()); // compute value of expression on right\n memory.put(id, value); // store it in memory\n return value;\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "Expression getExpression(long id);", "@Override\n\tpublic void visit(MultiplyNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam cei doi fii\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tInteger i, j;\n\t\t/**\n\t\t * salvam si inmultim valorile rezulate in urma evaluarii celor 2 fii si\n\t\t * setam valoarea corespunzatoare in nodul curent\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\tInteger n = i * j;\n\n\t\tnode.setName(n.toString());\n\t}", "public static String differentiate(Parser.Expression exp, final String variable){\n return exp.accept(new Parser.Expression.Visitor<String>() {\n // This is the d(var)/dx case\n public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }\n // dc/dx case\n public String differentiate(Parser.Number num){\n String output = \"0\";\n return output;\n }\n // d(u+v)/dx case\n public String differentiate(Parser.Addition add){\n Expression leftExpr;\n Expression rightExpr;\n String outLeft;\n String outRight;\n leftExpr = add.left;\n rightExpr = add.right;\n outLeft = Differentiator.differentiate(leftExpr, variable);\n outRight = Differentiator.differentiate(rightExpr, variable);\n return \"(\" + outLeft + \" \" + \"+\" + \" \" + outRight+ \")\";\n }\n // d(u*v)/dx case\n public String differentiate(Parser.Multiplication mul){\n Expression leftExpr;\n Expression rightExpr;\n String outLeft;\n String outRight;\n leftExpr = mul.left;\n rightExpr = mul.right;\n String rightDiff = Differentiator.differentiate(rightExpr, variable);\n String leftDiff = Differentiator.differentiate(leftExpr, variable);\n outLeft = \"(\" + leftExpr.toString() + \" \" + \"*\" + \" \" + rightDiff + \")\";\n outRight = \"(\" + rightExpr.toString() + \" \" + \"*\" + \" \" + leftDiff + \")\";\n return \"(\" + outLeft + \" \" + \"+\" + \" \" + outRight + \")\";\n }\n \n });\n }", "SEIntegerVariable getOperand2();", "Expression getValue();", "Expression getValue();", "@Override\n\tpublic Number operate(Number expr1) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void visit(AdditionNode node) {\n\t\t/**\n\t\t * verificam intai sintaxa: in cazde eroare nu mergem mai departe in\n\t\t * evaluare\n\t\t */\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * verificare pentru assert failed\n\t\t */\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * evaluam fiii nodului\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\t\tInteger i, j;\n\t\t/**\n\t\t * Salvam valorile calculate in urma evaluarii copiilor in 2 variabile\n\t\t * Integer. Daca unul dintre fii este de tip Variable ii luam valoarea\n\t\t * din HashMap-ul din Evaluator. Altfel, valoarea e reprezentata de\n\t\t * numele nodului.\n\t\t */\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ti = Integer.parseInt(Evaluator.variables.get(node.getChild(1).getName()));\n\n\t\t} else {\n\t\t\ti = Integer.parseInt(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tj = Integer.parseInt(Evaluator.variables.get(node.getChild(0).getName()));\n\n\t\t} else {\n\t\t\tj = Integer.parseInt(node.getChild(0).getName());\n\t\t}\n\n\t\t/**\n\t\t * realizam suna celor doua valori si updatam numele nodului curent cu\n\t\t * valoarea calculata\n\t\t */\n\t\tInteger n = i + j;\n\n\t\tnode.setName(n.toString());\n\n\t}", "ExpOperand createExpOperand();", "long addExpression(Expression expression);", "@Override\n\tpublic double evaluate() {\n\t\tString var = myChildren.get(0).myChildren.get(0).toString(); //goes two levels down to get variable\n\t\tint start = (int) myChildren.get(0).myChildren.get(1).evaluate(); \n\t\tint end = (int) myChildren.get(0).myChildren.get(2).evaluate(); \n\t\tint increment = (int) myChildren.get(0).myChildren.get(3).evaluate(); \n\t\tdouble returnVal = 0;\n\t\tfor(int i = start; i < end; i += increment) {\n\t\t\tUserVariables.add(var, i);\n\t\t\tfor(Node child : myChildren) {\n\t\t\t\treturnVal = child.evaluate(); //repeatNode will contain a GroupNode, but GroupNodes know how to evaluate themselves\n\t\t\t}\n\t\t}\n\t\treturn returnVal;\n\t}", "Expr expr();", "Expression getExp();", "public final void ruleVariables() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:216:2: ( ( ( rule__Variables__Group__0 ) ) )\n // InternalMLRegression.g:217:2: ( ( rule__Variables__Group__0 ) )\n {\n // InternalMLRegression.g:217:2: ( ( rule__Variables__Group__0 ) )\n // InternalMLRegression.g:218:3: ( rule__Variables__Group__0 )\n {\n before(grammarAccess.getVariablesAccess().getGroup()); \n // InternalMLRegression.g:219:3: ( rule__Variables__Group__0 )\n // InternalMLRegression.g:219:4: rule__Variables__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Variables__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getVariablesAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final Expr addExpr() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken PLUS13=null;\n\t\tToken MINUS14=null;\n\t\tExpr e1 =null;\n\t\tExpr e2 =null;\n\n\n\t\t\t\tExpr it = null;\n\t\t\t\tBoolean bool = false;\n\t\t\t\tint line = -1;\n\t\t\t\tint offset = -1;\n\t\t\t\n\t\ttry {\n\t\t\t// ul.g:173:2: (e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )* )\n\t\t\t// ul.g:174:3: e1= multExpr ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr710);\n\t\t\te1=multExpr();\n\t\t\tstate._fsp--;\n\t\t\tif (state.failed) return e;\n\t\t\tif ( state.backtracking==0 ) {it = e1;}\n\t\t\t// ul.g:175:3: ( ( PLUS | MINUS ) e2= multExpr )*\n\t\t\tloop14:\n\t\t\twhile (true) {\n\t\t\t\tint alt14=2;\n\t\t\t\tint LA14_0 = input.LA(1);\n\t\t\t\tif ( (LA14_0==MINUS||LA14_0==PLUS) ) {\n\t\t\t\t\talt14=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt14) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS ) e2= multExpr\n\t\t\t\t\t{\n\t\t\t\t\t// ul.g:175:4: ( PLUS | MINUS )\n\t\t\t\t\tint alt13=2;\n\t\t\t\t\tint LA13_0 = input.LA(1);\n\t\t\t\t\tif ( (LA13_0==PLUS) ) {\n\t\t\t\t\t\talt13=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA13_0==MINUS) ) {\n\t\t\t\t\t\talt13=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 13, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt13) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// ul.g:175:5: PLUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPLUS13=(Token)match(input,PLUS,FOLLOW_PLUS_in_addExpr718); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (PLUS13!=null?PLUS13.getLine():0); offset = PLUS13.getCharPositionInLine();}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2 :\n\t\t\t\t\t\t\t// ul.g:175:70: MINUS\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMINUS14=(Token)match(input,MINUS,FOLLOW_MINUS_in_addExpr721); if (state.failed) return e;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {line = (MINUS14!=null?MINUS14.getLine():0); offset = MINUS14.getCharPositionInLine();}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {bool = true;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tpushFollow(FOLLOW_multExpr_in_addExpr730);\n\t\t\t\t\te2=multExpr();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {it = new AddExpr(it, e2, bool, line, offset);}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop14;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\te = it;\n\t\t\t\t}\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn e;\n\t}", "@Override\n public Expression differentiate(String var) {\n Expression firstLn = new Log(new Var(\"e\"), this.getEx2());\n Expression secondLn = new Log(new Var(\"e\"), this.getEx2());\n Expression denom = new Pow(secondLn, new Num(2));\n Expression div1 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression div2 = new Div(this.getEx2().differentiate(var), this.getEx2());\n Expression mult1 = new Mult(div1, secondLn);\n Expression mult2 = new Mult(div2, firstLn);\n Expression numer = new Minus(mult1, mult2);\n Expression difEx = new Div(numer, denom);\n return difEx;\n \n \n \n /*Expression newExp1 = new Div(ex2.differentiate(var), ex2);\n Expression newExp2 = new Div(ex1.differentiate(var), ex1);\n return new Div(newExp1, newExp2).differentiate(var).differentiate(var);\n //return new Div(new Div(ex2.differentiate(var), ex2), new Div(ex1.differentiate(var), ex1));\n ///NEED TO TEST BETTER */\n\n }", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "private void expression(){\n\t\twhile (in.token != Token.exit){\n\t\t\tdouble value = terms();\n\t\t\tif(in.buffer.variableDetected && initialization == true){\n\t\t\t\tvariables.put(in.buffer.variable, new BigDecimal(value));\n\t\t\t\tin.buffer.variableDetected = false;\n\t\t\t}\n\t\t\telse\n\t\t\t\tif(initialization && !in.buffer.empty)\n\t\t\t\t\tSystem.out.println(\"= \" + value);\n\t\t\tinitialization = true;\n\t\t\tin.getToken(); \t\t\t//This command flushes the end of input marker \";\" which allows for new expressions to be taken in.\n\t\t}\n\t}", "@Override\n public Component getDerivative(Variable var) {\n\n Factor lnBase = new Logarithm(NEP_NUMBER, new ParenthesizedExpression(new Term(new Constant(base))));\n\n BigDecimal lnBaseValue = lnBase.getValue();\n if (MathUtils.isIntegerValue(lnBaseValue)) {\n lnBase = new Constant(lnBaseValue);\n }\n\n return new Term(\n new ParenthesizedExpression(\n new Term(\n new Constant(\"1\"),\n DIVIDE,\n new Term(\n Factor.getFactor(argument),\n MULTIPLY,\n lnBase\n )\n )\n ),\n MULTIPLY,\n Term.getTerm(argument.getDerivative(var))\n );\n }", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "public interface ExpressionService {\n String ID = ExpressionService.class.getName();\n\n String DAYS_DESCRIPTION = \"[Number of days]\";\n\n String SYMBOL_DAYS = \"[days]\";\n\n String SYMBOL_WILDCARD = \"*\";\n\n String UID_EXPRESSION = \"[a-zA-Z]\\\\w{10}\";\n\n String INT_EXPRESSION = \"^(0|-?[1-9]\\\\d*)$\";\n\n // -------------------------------------------------------------------------\n // Expression CRUD operations\n // -------------------------------------------------------------------------\n\n /**\n * Adds a new Expression to the database.\n *\n * @param expression The Expression to add.\n * @return The generated identifier for this Expression.\n */\n long addExpression(Expression expression);\n\n /**\n * Updates an Expression.\n *\n * @param expression The Expression to update.\n */\n void updateExpression(Expression expression);\n\n /**\n * Deletes an Expression from the database.\n *\n * @param expression the expression.\n */\n void deleteExpression(Expression expression);\n\n /**\n * Get the Expression with the given identifier.\n *\n * @param id The identifier.\n * @return an Expression with the given identifier.\n */\n Expression getExpression(long id);\n\n /**\n * Gets all Expressions.\n *\n * @return A list with all Expressions.\n */\n List<Expression> getAllExpressions();\n\n // -------------------------------------------------------------------------\n // Indicator expression logic\n // -------------------------------------------------------------------------\n\n /**\n * Returns all dimensional item objects which are present in numerator and denominator of the\n * given indicators, as a map from id to object.\n *\n * @param indicators the collection of indicators.\n * @return a map from dimensional item id to object.\n */\n Map<DimensionalItemId, DimensionalItemObject> getIndicatorDimensionalItemMap(\n Collection<Indicator> indicators);\n\n /**\n * Returns all OrganisationUnitGroups in the numerator and denominator expressions in the given\n * Indicators. Returns an empty set if the given indicators are null or empty.\n *\n * @param indicators the set of indicators.\n * @return a Set of OrganisationUnitGroups.\n */\n List<OrganisationUnitGroup> getOrgUnitGroupCountGroups(Collection<Indicator> indicators);\n\n /**\n * Generates the calculated value for the given parameters based on the values in the given maps.\n *\n * @param indicator the indicator for which to calculate the value.\n * @param periods a List of periods for which to calculate the value.\n * @param itemMap map of dimensional item id to object in expression.\n * @param valueMap the map of data values.\n * @param orgUnitCountMap the map of organisation unit group member counts.\n * @return the calculated value as a double.\n */\n IndicatorValue getIndicatorValueObject(\n Indicator indicator,\n List<Period> periods,\n Map<DimensionalItemId, DimensionalItemObject> itemMap,\n Map<DimensionalItemObject, Object> valueMap,\n Map<String, Integer> orgUnitCountMap);\n\n /**\n * Substitutes any constants and org unit group member counts in the numerator and denominator on\n * all indicators in the given collection.\n *\n * @param indicators the set of indicators.\n */\n void substituteIndicatorExpressions(Collection<Indicator> indicators);\n\n // -------------------------------------------------------------------------\n // Get information about the expression\n // -------------------------------------------------------------------------\n\n /**\n * Tests whether the expression is valid.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return the ExpressionValidationOutcome of the validation.\n */\n ExpressionValidationOutcome expressionIsValid(String expression, ParseType parseType);\n\n /**\n * Creates an expression description containing the names of the DimensionalItemObjects from a\n * numeric valued expression.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return a description containing DimensionalItemObjects names.\n */\n String getExpressionDescription(String expression, ParseType parseType);\n\n /**\n * Creates an expression description containing the names of the DimensionalItemObjects from an\n * expression string, for an expression that will return the specified data type.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @param dataType the data type for the expression to return.\n * @return An description containing DimensionalItemObjects names.\n */\n String getExpressionDescription(String expression, ParseType parseType, DataType dataType);\n\n /**\n * Gets the item descriptions that need to be substituted in an expression to form the expression\n * description.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return A {@link Map} of item descriptions.\n */\n Map<String, String> getExpressionItemDescriptions(String expression, ParseType parseType);\n\n /**\n * Gets the item descriptions that need to be substituted in an expression to form the expression\n * description, for an expression that will return the specified data type.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @param dataType the data type for the expression to return.\n * @return A {@link Map} of item descriptions.\n */\n Map<String, String> getExpressionItemDescriptions(\n String expression, ParseType parseType, DataType dataType);\n\n /**\n * Gets information we need from an expression string.\n *\n * @param params the expression parameters.\n * @return the expression information.\n */\n ExpressionInfo getExpressionInfo(ExpressionParams params);\n\n /**\n * From expression info, create a \"base\" expression parameters object with certain metadata fields\n * supplied that are needed for later evaluation.\n *\n * <p>Before evaluation, the caller will need to add to this \"base\" object fields such as\n * expression, parseType, dataType, valueMap, etc.\n *\n * @param info the expression information.\n * @return the expression parameters with metadata pre-filled.\n */\n ExpressionParams getBaseExpressionParams(ExpressionInfo info);\n\n /**\n * Returns UIDs of Data Elements and associated Option Combos (if any) found in the Data Element\n * Operands an expression.\n *\n * <p>If the Data Element Operand consists of just a Data Element, or if the Option Combo is a\n * wildcard \"*\", returns just dataElementUID.\n *\n * <p>If an Option Combo is present, returns dataElementUID.optionComboUID.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return a Set of data element identifiers.\n */\n Set<String> getExpressionElementAndOptionComboIds(String expression, ParseType parseType);\n\n /**\n * Returns all data element ids found in the given expression string, including those found in\n * data element operands. Returns an empty set if the given expression is null.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return a Set of data elements ids included in the expression string.\n */\n Set<String> getExpressionDataElementIds(String expression, ParseType parseType);\n\n /**\n * Returns all CategoryOptionCombo uids in the given expression string that are used as a data\n * element operand categoryOptionCombo or attributeOptionCombo. Returns an empty set if the\n * expression is null.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return a Set of CategoryOptionCombo uids in the expression string.\n */\n Set<String> getExpressionOptionComboIds(String expression, ParseType parseType);\n\n /**\n * Returns all dimensional item object ids in the given expression.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return a Set of dimensional item object ids.\n */\n Set<DimensionalItemId> getExpressionDimensionalItemIds(String expression, ParseType parseType);\n\n /**\n * Returns set of all OrganisationUnitGroup UIDs in the given expression.\n *\n * @param expression the expression string.\n * @param parseType the type of expression to parse.\n * @return Map of UIDs to OrganisationUnitGroups in the expression string.\n */\n Set<String> getExpressionOrgUnitGroupIds(String expression, ParseType parseType);\n\n // -------------------------------------------------------------------------\n // Compute the value of the expression\n // -------------------------------------------------------------------------\n\n /**\n * Generates the calculated value for an expression.\n *\n * @param params the expression parameters.\n * @return the calculated value.\n */\n Object getExpressionValue(ExpressionParams params);\n\n // -------------------------------------------------------------------------\n // Gets a (possibly cached) constant map\n // -------------------------------------------------------------------------\n\n /**\n * Gets the (possibly cached) constant map.\n *\n * @return the constant map.\n */\n Map<String, Constant> getConstantMap();\n}", "public void addVariable(VariableItem variableItem) {\n\t\t\n\t}", "public void addVariable(VariableItem variableItem) {\n\t\t\n\t}", "public void storeEval(final String expression, final String variableName);", "@Override\n public LinearSequence getLinearVariables() {\n LinearSequence vars = new LinearSequence();\n\n vars.addAll(((ExtendedExpression) getA()).getLinearVariables());\n vars.addAll(((ExtendedExpression) getB()).getLinearVariables().negate());\n\n return vars;\n }", "DExpression getExpression();", "@Override\n\tpublic int evaluate(){\n\t\treturn term.evaluate() + exp.evaluate();\n\t}", "public VietaSubstitution(Expression zeroedExpression,String variableToRemove,String newVariable) throws IllegalSubstitutionException {\n\t\tif(!isStandard(zeroedExpression, variableToRemove))\n\t\t\tthrow new IllegalArgumentException(\"the expression is not a standard cubic equation using the form \"+variableToRemove+\"^2 + p*\"+variableToRemove+\" - q\");\n\t\t\n\t\treplacedVariable = variableToRemove;\n\t\tnewVariableName = newVariable;\n\t\toriginalExpression = zeroedExpression;\n\t\t\n\t\tMap<Fraction, List<Term>> factors = zeroedExpression.factor(variableToRemove);\n\t\tExpression p = new Expression(factors.get(Fraction.get(1)));\n\t\tExpression newDefinition = new Expression(\n\t\t\t\tnew Term(newVariableName) ).add(\n\t\t\t\t\t\tp.negate().divideBy( new Term(3, 1, newVariableName) )\n\t\t\t\t\t\t);\n\t\tdefinition = new Definition(replacedVariable, newDefinition);\n\t\tresultingExpression = originalExpression.substitute(definition);\n\t}", "@Override\n\tpublic double execute() {\n\t\tList<Variable> args = getArgs();\n\t\tVariable newVar = null;\n\t\tfor (int i = 0; i < args.size(); i += 2) {\n\t\t\tnewVar = new Variable(args.get(i).getKey(), args.get(i + 1).getValue());\n\t\t\tgetBackendController().setVariable(newVar);\n\t\t}\n\t\treturn newVar == null ? 0 : newVar.getValue();\n\t}", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "public final Expr addExpr() throws RecognitionException {\r\n Expr result = null;\r\n\r\n int addExpr_StartIndex = input.index();\r\n\r\n Token op=null;\r\n Expr lhs =null;\r\n\r\n Expr rhs =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return result; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:5: (lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )* )\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:9: lhs= mulExpr (op= ( '+' | '-' ) rhs= mulExpr )*\r\n {\r\n pushFollow(FOLLOW_mulExpr_in_addExpr674);\r\n lhs=mulExpr();\r\n\r\n state._fsp--;\r\n if (state.failed) return result;\r\n\r\n if ( state.backtracking==0 ) { result =lhs; }\r\n\r\n // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:46: (op= ( '+' | '-' ) rhs= mulExpr )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( ((LA10_0 >= 24 && LA10_0 <= 25)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // C:\\\\Users\\\\caytekin\\\\Documents\\\\GitHub\\\\sea-of-ql\\\\caytekin\\\\QLJava/src/org/uva/sea/ql/parser/antlr/QL.g:121:48: op= ( '+' | '-' ) rhs= mulExpr\r\n \t {\r\n \t op=(Token)input.LT(1);\r\n\r\n \t if ( (input.LA(1) >= 24 && input.LA(1) <= 25) ) {\r\n \t input.consume();\r\n \t state.errorRecovery=false;\r\n \t state.failed=false;\r\n \t }\r\n \t else {\r\n \t if (state.backtracking>0) {state.failed=true; return result;}\r\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\r\n \t throw mse;\r\n \t }\r\n\r\n\r\n \t pushFollow(FOLLOW_mulExpr_in_addExpr692);\r\n \t rhs=mulExpr();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return result;\r\n\r\n \t if ( state.backtracking==0 ) { \r\n \t if ((op!=null?op.getText():null).equals(\"+\")) {\r\n \t result = new Add(result, rhs);\r\n \t }\r\n \t if ((op!=null?op.getText():null).equals(\"-\")) {\r\n \t result = new Sub(result, rhs); \r\n \t }\r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 15, addExpr_StartIndex); }\r\n\r\n }\r\n return result;\r\n }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public VariableIF createVariable(VariableDecl decl);", "public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }", "Variable createVariable();", "Variable createVariable();", "protected IExpressionValue expression() throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t\r\n\t\t// temp table already created by upper caller\r\n\t\t\r\n\t\tIExpressionValue temp1 = term();\r\n\t\tIExpressionValue temp2 = null;\r\n\t\t\r\n\t\tFloat temp1Value = null;\r\n\t\tFloat temp2Value = null;\r\n\t\t// LOOK FOR +/- (OPTIONAL)\r\n\t\tswitch (look) {\r\n\t\tcase '+':\r\n\t\t\tmatch('+');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)) {\r\n\t\t\t\t// TODO cut the subtree if it is a known value...\r\n\t\t\t\ttemp1 = new AddOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tmatch('-');\r\n\t\t\ttemp2 = term();\r\n\t\t\ttry {\r\n\t\t\t\ttemp1Value = Float.parseFloat(temp1.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp1Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\ttemp2Value = Float.parseFloat(temp2.getValue());\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\ttemp2Value = Float.NaN;\r\n\t\t\t}\r\n\t\t\tif (!Float.isNaN(temp1Value) && !Float.isNaN(temp2Value)){\r\n\t\t\t\t// TODO cut the subtree if it is known value...\r\n\t\t\t\ttemp1 = new SubtractOperationProbabilityValue(\r\n\t\t\t\t\t\ttemp1.isFixedValue()?(new SimpleProbabilityValue(temp1Value)):temp1 ,\r\n\t\t\t\t\t\t\t\ttemp2.isFixedValue()?(new SimpleProbabilityValue(temp2Value)):temp2);\r\n\t\t\t}\t\t\t\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Debug.println(\"Expression returned \" + temp1.getProbability());\r\n\t\treturn temp1;\r\n\t}", "public Expression differentiate(String var) {\n return new Neg(new Mult(new Sin(super.getExpression()), super.getExpression().differentiate(var)));\n }", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "public interface ExpressionVisitor{\n\n void handel(BracketExpression bracketExpression);\n\n void handel(NaturalNumber naturalNumber);\n\n\n void handel(Sum sum);\n void handel(Difference difference);\n void handel(Product product);\n void handel(Quotient quotient);\n\n void handel(VariableExpression variableExpression);\n}", "public double evaluate() throws Exception {\r\n // this expression compare from variable\r\n throw new Exception(\"this expression contains a variable\");\r\n }", "@Override\n public Expression differentiate(String var) {\n return new Minus(getExpression1().differentiate(var), getExpression2().differentiate(var));\n }", "@Override\n\tpublic List<Component> caseExprBinary(ExprBinary expr) {\n\t\tint sizeInBits = assignTarget.getVariable().getType().getSizeInBits();\n\t\t// Get the Variables\n\t\tVar e1 = ((ExprVar) expr.getE1()).getUse().getVariable();\n\t\tVar e2 = ((ExprVar) expr.getE2()).getUse().getVariable();\n\t\tList<Var> inVars = new ArrayList<Var>();\n\t\tinVars.add(e1);\n\t\tinVars.add(e2);\n\t\t// Component component = null;\n\t\tif (expr.getOp() == OpBinary.BITAND) {\n\t\t\tcurrentComponent = new AndOp();\n\t\t} else if (expr.getOp() == OpBinary.BITOR) {\n\t\t\tcurrentComponent = new OrOp();\n\t\t} else if (expr.getOp() == OpBinary.BITXOR) {\n\t\t\tcurrentComponent = new XorOp();\n\t\t} else if (expr.getOp() == OpBinary.DIV) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.DIV_INT) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.EQ) {\n\t\t\tcurrentComponent = new EqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.GE) {\n\t\t\tcurrentComponent = new GreaterThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.GT) {\n\t\t\tcurrentComponent = new GreaterThanOp();\n\t\t} else if (expr.getOp() == OpBinary.LE) {\n\t\t\tcurrentComponent = new LessThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_AND) {\n\t\t\tcurrentComponent = new And(2);\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_OR) {\n\t\t\tcurrentComponent = new Or(2);\n\t\t} else if (expr.getOp() == OpBinary.LT) {\n\t\t\tcurrentComponent = new LessThanOp();\n\t\t} else if (expr.getOp() == OpBinary.MINUS) {\n\t\t\tcurrentComponent = new SubtractOp();\n\t\t} else if (expr.getOp() == OpBinary.MOD) {\n\t\t\tcurrentComponent = new ModuloOp();\n\t\t} else if (expr.getOp() == OpBinary.NE) {\n\t\t\tcurrentComponent = new NotEqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.PLUS) {\n\t\t\tcurrentComponent = new AddOp();\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_LEFT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new LeftShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_RIGHT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new RightShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.TIMES) {\n\t\t\tcurrentComponent = new MultiplyOp(expr.getType().getSizeInBits());\n\t\t}\n\t\t// currentComponent.setNonRemovable();\n\t\tPortUtil.mapInDataPorts(currentComponent, inVars, portDependency,\n\t\t\t\tportGroupDependency);\n\t\treturn null;\n\t}", "public AdditionOp(Expression left, Expression right, String id){\n super(left, \"+\", right, id);\n this.setType(ExpType.ADDITION);\n }", "boolean isVariable(Formula f);", "public abstract Expression generateExpression(GenerationContext context);", "public int executeOperation(){\n\t\tswitch (operation){\n\t\tcase 1: \n\t\t\treturn var1 + var2;\n\t\tcase 2: \n\t\t\treturn var1 - var2;\n\t\tcase 3: \n\t\t\treturn var1 * var2;\n\t\tcase 4: \n\t\t\treturn var1 / var2;\n\t\t default:\n\t\t\treturn 0;\n\t\t\n\t\t}\n\t}", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "public static RuntimeVariablesExpression runtimeVariables(Iterable<ParameterExpression> expressions) { throw Extensions.todo(); }", "@Override\r\n\tpublic double add() {\r\n\t\tdouble outcome = firstVariable + secondVariable;\r\n\t\treturn outcome;\r\n\t\r\n\t}", "public Variable add(Variable v) throws IllegalArgumentException {\r\n\t\tif (!variables.contains(v)) {\r\n\t\t\tif (v.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tv.setIndex(variables.size());\r\n\t\t\tvariables.add(v);\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "protected Evaluable parseFactor() throws ParsingException {\n if (_token == null) {\n throw makeException(\"Expecting something more at end of expression\");\n }\n\n Evaluable eval = null;\n\n if (_token.type == TokenType.String) {\n eval = new LiteralExpr(_token.text);\n next(false);\n } else if (_token.type == TokenType.Regex) {\n RegexToken t = (RegexToken) _token;\n\n try {\n Pattern pattern = Pattern.compile(_token.text, t.caseInsensitive ? Pattern.CASE_INSENSITIVE : 0);\n eval = new LiteralExpr(pattern);\n next(false);\n } catch (Exception e) {\n throw makeException(\"Bad regular expression (\" + e.getMessage() + \")\");\n }\n } else if (_token.type == TokenType.Number) {\n eval = new LiteralExpr(((NumberToken)_token).value);\n next(false);\n } else if (_token.type == TokenType.Operator && _token.text.equals(\"-\")) { // unary minus?\n next(true);\n\n if (_token != null && _token.type == TokenType.Number) {\n Number n = ((NumberToken)_token).value;\n\n eval = new LiteralExpr(n instanceof Long ? -n.longValue() : -n.doubleValue());\n\n next(false);\n } else {\n throw makeException(\"Bad negative number\");\n }\n } else if (_token.type == TokenType.Identifier) {\n String text = _token.text;\n next(false);\n\n if (_token == null || _token.type != TokenType.Delimiter || !_token.text.equals(\"(\")) {\n eval = \"null\".equals(text) ? new LiteralExpr(null) : new VariableExpr(text);\n } else if( \"PI\".equals(text) ) {\n eval = new LiteralExpr(Math.PI);\n next(false);\n } else {\n Function f = ControlFunctionRegistry.getFunction(text);\n Control c = ControlFunctionRegistry.getControl(text);\n if (f == null && c == null) {\n throw makeException(\"Unknown function or control named \" + text);\n }\n\n next(true); // swallow (\n\n List<Evaluable> args = parseExpressionList(\")\");\n\n if (c != null) {\n Evaluable[] argsA = makeArray(args);\n String errorMessage = c.checkArguments(argsA);\n if (errorMessage != null) {\n throw makeException(errorMessage);\n }\n eval = new ControlCallExpr(argsA, c);\n } else {\n eval = new FunctionCallExpr(makeArray(args), f);\n }\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true);\n\n eval = parseExpression();\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\")\")) {\n next(false);\n } else {\n throw makeException(\"Missing )\");\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) { // [ ... ] array\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n\n eval = new FunctionCallExpr(makeArray(args), new ArgsToArray());\n } else {\n throw makeException(\"Missing number, string, identifier, regex, or parenthesized expression\");\n }\n\n while (_token != null) {\n if (_token.type == TokenType.Operator && _token.text.equals(\".\")) {\n next(false); // swallow .\n\n if (_token == null || _token.type != TokenType.Identifier) {\n throw makeException(\"Missing function name\");\n }\n\n String identifier = _token.text;\n next(false);\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true); // swallow (\n\n Function f = ControlFunctionRegistry.getFunction(identifier);\n if (f == null) {\n throw makeException(\"Unknown function \" + identifier);\n }\n\n List<Evaluable> args = parseExpressionList(\")\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), f);\n } else {\n eval = new FieldAccessorExpr(eval, identifier);\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) {\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), ControlFunctionRegistry.getFunction(\"get\"));\n } else {\n break;\n }\n }\n\n return eval;\n }", "public String evaluate(String expression, String variable) {\n Lexer lex = new Lexer(expression);\n Parser parser = new Parser(lex);\n Expression exp;\n exp = parser.parse();\n String output = differentiate(exp, variable);\n return output;\n \n }", "double getActiveOperand();", "Node getVariable();", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a product\n return args.pollFirst().getTarget();\n } else {\n // assume x to be *x, because the product will start by 1*x\n Term<Multiplicative> factor = new Term<>(Multiplicative.MULT, args.removeFirst().getTarget());\n List<Term<Multiplicative>> arguments = new LinkedList<>();\n arguments.add(factor);\n args.stream()\n // next arguments are all Term<Multiplicative>\n .map(v -> (Term<Multiplicative>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Product(arguments);\n }\n }", "public void addVariable(VariableItem _variableItem) {\n\t\tvariableItem.add(_variableItem);\n\t}", "public void addVariable(VariableItem _variableItem) {\n\t\tvariableItem.add(_variableItem);\n\t}", "public void addVariable(VariableItem _variableItem) {\n\t\tvariableItem.add(_variableItem);\n\t}", "@Test\r\n public void deriveFromAndAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M&=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH&=9\", \"(long,km^2/h)\");\r\n }", "Multiply createMultiply();", "public IVariable getVariable(Integer id) {\n return null;\n }", "public PotentialTree addVariable(Vector vars) {\n Vector aux;\n FiniteStates var1, var2;\n int i, j;\n boolean found;\n PTreeCredalSet pot;\n ProbabilityTree tree;\n \n aux = new Vector(); // New list of variables.\n for (i=0 ; i<variables.size() ; i++) {\n var1 = (FiniteStates)variables.elementAt(i);\n found = false;\n for (j=0 ; j<vars.size() ; j++) {\n var2 = (FiniteStates)vars.elementAt(j);\n if (var1 == var2) {\n found = true;\n break;\n }\n }\n if (!found)\n aux.addElement(var1);\n }\n pot = new PTreeCredalSet(aux); // The new tree.\n tree = values;\n for (i=0 ; i<vars.size() ; i++) {\n var1 = (FiniteStates)vars.elementAt(i);\n tree = tree.addVariable(var1);\n }\n pot.setTree(tree);\n return pot;\n }", "public IntVar scalProd(final List<IntVar> variables, final List<Integer> coefficients) {\n final IntVar ret = model.newIntVar(Integer.MIN_VALUE, Integer.MAX_VALUE, \"\");\n model.addEquality(ret, LinearExpr.scalProd(variables.toArray(new IntVar[0]),\n coefficients.stream().mapToInt(Integer::intValue).toArray()));\n return ret;\n }", "@Override\n public void visit(CalcExpr node) {\n }", "private double parseExpression() {\n\t\tdouble value = parseTerm();\n\t\twhile (true) {\n\t\t\tif (token.getType().equals(Token.Type.PLUS)) { // addition\n\t\t\t\ttoken=lexer.getNextToken();\n\t\t\t\tvalue += parseTerm();\n\t\t\t} else if (token.getType().equals(Token.Type.MINUS)) { // subtraction\n\t\t\t\ttoken = lexer.getNextToken();\n\t\t\t\tvalue -= parseTerm();\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic vec3 plus(ShaderVar var) {\n\t\treturn null;\r\n\t}", "public Formula(Variable var) {\n\t\t// TODO: implement this.\n\t\t//throw new RuntimeException(\"not yet implemented.\");\n\t\tClause c;\n\t\tc=new Clause(PosLiteral.make(var));\t\n\t\tclauses=new NonEmptyImList<Clause>(c);\n\t}" ]
[ "0.6369945", "0.6226753", "0.60159206", "0.5974913", "0.59402543", "0.5856608", "0.5836962", "0.5821537", "0.5650302", "0.5636475", "0.55890507", "0.55627555", "0.5491208", "0.54595196", "0.54570776", "0.54381967", "0.5423781", "0.53717244", "0.53618824", "0.5339778", "0.53310174", "0.53262615", "0.530959", "0.52779675", "0.5277294", "0.5274997", "0.5272849", "0.52453995", "0.5220724", "0.5207799", "0.5207799", "0.5193266", "0.51856124", "0.5154545", "0.51526964", "0.51248074", "0.5118594", "0.5118224", "0.51059926", "0.50969696", "0.50846", "0.50819486", "0.50646496", "0.50617415", "0.5060528", "0.5059513", "0.5057998", "0.5057998", "0.5049618", "0.5047154", "0.5040683", "0.5030321", "0.5019423", "0.5011233", "0.5010948", "0.50082517", "0.50082517", "0.50082517", "0.50082517", "0.49972817", "0.4997173", "0.49966076", "0.4994513", "0.49933055", "0.49930605", "0.49930605", "0.49918187", "0.49883717", "0.49839976", "0.4966106", "0.49627858", "0.49582425", "0.49565262", "0.49500078", "0.49428317", "0.49314234", "0.4911873", "0.49103752", "0.49081615", "0.48943347", "0.48907912", "0.48903704", "0.48789644", "0.48700684", "0.48687226", "0.48613274", "0.48564214", "0.48517513", "0.4843249", "0.4843249", "0.4843249", "0.4841426", "0.48350626", "0.48339948", "0.48304766", "0.48225364", "0.48224363", "0.48163328", "0.48153558", "0.48140985" ]
0.5345623
19
Contexts: Truc returns VariableCalcule Variable returns VariableCalcule VariableCalcule returns VariableCalcule Constraint: (name=ID expression=Expression)
protected void sequence_VariableCalcule(ISerializationContext context, VariableCalcule semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getVariableCalculeAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName()); feeder.accept(grammarAccess.getVariableCalculeAccess().getExpressionExpressionParserRuleCall_3_0(), semanticObject.getExpression()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract IDecisionVariable getVariable();", "<C, PM> VariableExp<C, PM> createVariableExp();", "public IVariable getVariable(Integer id) {\n return null;\n }", "VariableExp createVariableExp();", "public void mo3743a(LinearSystem eVar) {\n boolean z;\n boolean z2;\n boolean z3;\n boolean z4;\n int i;\n int i2;\n boolean z5;\n int i3;\n int i4;\n SolverVariable hVar;\n boolean z6;\n SolverVariable hVar2;\n SolverVariable hVar3;\n boolean z7;\n SolverVariable hVar4;\n SolverVariable hVar5;\n ConstraintWidget fVar;\n boolean z8;\n LinearSystem eVar2;\n SolverVariable hVar6;\n ConstraintWidget fVar2;\n int i5;\n boolean z9;\n boolean z10;\n SolverVariable a = eVar.mo3927a(this.f1490s);\n SolverVariable a2 = eVar.mo3927a(this.f1492u);\n SolverVariable a3 = eVar.mo3927a(this.f1491t);\n SolverVariable a4 = eVar.mo3927a(this.f1493v);\n SolverVariable a5 = eVar.mo3927a(this.f1494w);\n ConstraintWidget fVar3 = this.f1429D;\n if (fVar3 != null) {\n z4 = fVar3 != null && fVar3.f1428C[0] == EnumC0282a.WRAP_CONTENT;\n ConstraintWidget fVar4 = this.f1429D;\n boolean z11 = fVar4 != null && fVar4.f1428C[1] == EnumC0282a.WRAP_CONTENT;\n if (mo3742a(0)) {\n ((ConstraintWidgetContainer) this.f1429D).mo3854a(this, 0);\n z9 = true;\n } else {\n z9 = mo3774I();\n }\n if (mo3742a(1)) {\n ((ConstraintWidgetContainer) this.f1429D).mo3854a(this, 1);\n z10 = true;\n } else {\n z10 = mo3775J();\n }\n if (z4 && this.f1470as != 8 && this.f1490s.f1416c == null && this.f1492u.f1416c == null) {\n eVar.mo3935a(eVar.mo3927a(this.f1429D.f1492u), a2, 0, 1);\n }\n if (z11 && this.f1470as != 8 && this.f1491t.f1416c == null && this.f1493v.f1416c == null && this.f1494w == null) {\n eVar.mo3935a(eVar.mo3927a(this.f1429D.f1493v), a4, 0, 1);\n }\n z3 = z11;\n z2 = z9;\n z = z10;\n } else {\n z4 = false;\n z3 = false;\n z2 = false;\n z = false;\n }\n int i6 = this.f1430E;\n int i7 = this.f1441P;\n if (i6 < i7) {\n i6 = i7;\n }\n int i8 = this.f1431F;\n int i9 = this.f1442Q;\n if (i8 < i9) {\n i8 = i9;\n }\n boolean z12 = this.f1428C[0] != EnumC0282a.MATCH_CONSTRAINT;\n boolean z13 = this.f1428C[1] != EnumC0282a.MATCH_CONSTRAINT;\n this.f1487p = this.f1433H;\n float f = this.f1432G;\n this.f1488q = f;\n int i10 = this.f1476e;\n int i11 = this.f1477f;\n if (f <= 0.0f || this.f1470as == 8) {\n hVar = a5;\n i4 = i10;\n i2 = i6;\n i = i8;\n i3 = i11;\n z5 = false;\n } else {\n hVar = a5;\n if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && i10 == 0) {\n i10 = 3;\n }\n if (this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i11 == 0) {\n i11 = 3;\n }\n if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i10 == 3 && i11 == 3) {\n mo3789a(z4, z3, z12, z13);\n } else if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && i10 == 3) {\n this.f1487p = 0;\n int i12 = (int) (this.f1488q * ((float) this.f1431F));\n if (this.f1428C[1] != EnumC0282a.MATCH_CONSTRAINT) {\n i2 = i12;\n i = i8;\n i3 = i11;\n i4 = 4;\n z5 = false;\n } else {\n i2 = i12;\n i4 = i10;\n i = i8;\n i3 = i11;\n z5 = true;\n }\n } else if (this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i11 == 3) {\n this.f1487p = 1;\n if (this.f1433H == -1) {\n this.f1488q = 1.0f / this.f1488q;\n }\n int i13 = (int) (this.f1488q * ((float) this.f1430E));\n if (this.f1428C[0] != EnumC0282a.MATCH_CONSTRAINT) {\n i = i13;\n i4 = i10;\n i2 = i6;\n i3 = 4;\n z5 = false;\n } else {\n i = i13;\n i4 = i10;\n i2 = i6;\n i3 = i11;\n z5 = true;\n }\n }\n i4 = i10;\n i2 = i6;\n i = i8;\n i3 = i11;\n z5 = true;\n }\n int[] iArr = this.f1478g;\n iArr[0] = i4;\n iArr[1] = i3;\n if (z5) {\n int i14 = this.f1487p;\n if (i14 != 0) {\n }\n z6 = true;\n boolean z14 = this.f1428C[0] != EnumC0282a.WRAP_CONTENT && (this instanceof ConstraintWidgetContainer);\n boolean z15 = !this.f1497z.mo3764j();\n if (this.f1451a == 2) {\n ConstraintWidget fVar5 = this.f1429D;\n SolverVariable a6 = fVar5 != null ? eVar.mo3927a(fVar5.f1492u) : null;\n ConstraintWidget fVar6 = this.f1429D;\n z7 = z3;\n hVar3 = hVar;\n hVar5 = a4;\n hVar2 = a3;\n hVar4 = a2;\n m1247a(eVar, z4, fVar6 != null ? eVar.mo3927a(fVar6.f1490s) : null, a6, this.f1428C[0], z14, this.f1490s, this.f1492u, this.f1434I, i2, this.f1441P, this.f1460ai[0], this.f1443S, z6, z2, i4, this.f1479h, this.f1480i, this.f1481j, z15);\n fVar = this;\n } else {\n hVar2 = a3;\n hVar4 = a2;\n z7 = z3;\n hVar3 = hVar;\n hVar5 = a4;\n fVar = this;\n }\n if (fVar.f1473b == 2) {\n boolean z16 = fVar.f1428C[1] == EnumC0282a.WRAP_CONTENT && (fVar instanceof ConstraintWidgetContainer);\n boolean z17 = z5 && ((i5 = fVar.f1487p) == 1 || i5 == -1);\n if (fVar.f1440O <= 0) {\n hVar6 = hVar2;\n eVar2 = eVar;\n } else if (fVar.f1494w.mo3751a().f1561i == 1) {\n eVar2 = eVar;\n fVar.f1494w.mo3751a().mo3877a(eVar2);\n hVar6 = hVar2;\n } else {\n eVar2 = eVar;\n hVar6 = hVar2;\n eVar2.mo3943c(hVar3, hVar6, mo3767B(), 6);\n if (fVar.f1494w.f1416c != null) {\n eVar2.mo3943c(hVar3, eVar2.mo3927a(fVar.f1494w.f1416c), 0, 6);\n z8 = false;\n ConstraintWidget fVar7 = fVar.f1429D;\n SolverVariable a7 = fVar7 == null ? eVar2.mo3927a(fVar7.f1493v) : null;\n ConstraintWidget fVar8 = fVar.f1429D;\n m1247a(eVar, z7, fVar8 == null ? eVar2.mo3927a(fVar8.f1491t) : null, a7, fVar.f1428C[1], z16, fVar.f1491t, fVar.f1493v, fVar.f1435J, i, fVar.f1442Q, fVar.f1460ai[1], fVar.f1444T, z17, z, i3, fVar.f1482k, fVar.f1483l, fVar.f1484m, z8);\n if (!z5) {\n fVar2 = this;\n if (fVar2.f1487p == 1) {\n eVar.mo3936a(hVar5, hVar6, hVar4, a, fVar2.f1488q, 6);\n } else {\n eVar.mo3936a(hVar4, a, hVar5, hVar6, fVar2.f1488q, 6);\n }\n } else {\n fVar2 = this;\n }\n if (!fVar2.f1497z.mo3764j()) {\n eVar.mo3928a(fVar2, fVar2.f1497z.mo3761g().mo3757c(), (float) Math.toRadians((double) (fVar2.f1461aj + 90.0f)), fVar2.f1497z.mo3759e());\n return;\n }\n return;\n }\n }\n z8 = z15;\n ConstraintWidget fVar72 = fVar.f1429D;\n if (fVar72 == null) {\n }\n ConstraintWidget fVar82 = fVar.f1429D;\n m1247a(eVar, z7, fVar82 == null ? eVar2.mo3927a(fVar82.f1491t) : null, a7, fVar.f1428C[1], z16, fVar.f1491t, fVar.f1493v, fVar.f1435J, i, fVar.f1442Q, fVar.f1460ai[1], fVar.f1444T, z17, z, i3, fVar.f1482k, fVar.f1483l, fVar.f1484m, z8);\n if (!z5) {\n }\n if (!fVar2.f1497z.mo3764j()) {\n }\n } else {\n return;\n }\n }\n z6 = false;\n if (this.f1428C[0] != EnumC0282a.WRAP_CONTENT) {\n }\n boolean z152 = !this.f1497z.mo3764j();\n if (this.f1451a == 2) {\n }\n if (fVar.f1473b == 2) {\n }\n }", "public IExpressionValue getUserDefinedVariable(String key);", "public interface VariableIF extends VariableSimpleIF {\r\n public java.lang.String getFullName();\r\n public java.lang.String getFullNameEscaped();\r\n public java.lang.String getShortName();\r\n public void getNameAndDimensions(java.util.Formatter result, boolean useFullName, boolean strict);\r\n\r\n public boolean isUnlimited();\r\n public boolean isUnsigned();\r\n public ucar.ma2.DataType getDataType();\r\n public int getRank();\r\n public boolean isScalar();\r\n public long getSize();\r\n public int getElementSize();\r\n public int[] getShape();\r\n\r\n public java.util.List<Dimension> getDimensions();\r\n public ucar.nc2.Dimension getDimension(int index);\r\n public int findDimensionIndex(java.lang.String dimName);\r\n\r\n public java.util.List<Attribute> getAttributes();\r\n public ucar.nc2.Attribute findAttribute(java.lang.String attName);\r\n public ucar.nc2.Attribute findAttributeIgnoreCase(java.lang.String attName);\r\n\r\n public ucar.nc2.Group getParentGroup();\r\n public ucar.nc2.Variable section(java.util.List<Range> ranges) throws ucar.ma2.InvalidRangeException;\r\n public Section getShapeAsSection();\r\n public java.util.List<Range> getRanges();\r\n\r\n public ucar.ma2.Array read(int[] origin, int[] shape) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(java.lang.String rangeSpec) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(ucar.ma2.Section section) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read() throws java.io.IOException;\r\n\r\n public boolean isCoordinateVariable();\r\n public boolean isMemberOfStructure();\r\n public boolean isVariableLength();\r\n public boolean isMetadata();\r\n public ucar.nc2.Structure getParentStructure();\r\n\r\n public String getDescription();\r\n public String getUnitsString();\r\n\r\n // use only if isMemberOfStructure\r\n public java.util.List<Dimension> getDimensionsAll();\r\n\r\n // use only if isScalar()\r\n public byte readScalarByte() throws java.io.IOException;\r\n public short readScalarShort() throws java.io.IOException;\r\n public int readScalarInt() throws java.io.IOException;\r\n public long readScalarLong() throws java.io.IOException;\r\n public float readScalarFloat() throws java.io.IOException;\r\n public double readScalarDouble() throws java.io.IOException;\r\n public java.lang.String readScalarString() throws java.io.IOException;\r\n\r\n // debug\r\n public java.lang.String toStringDebug();\r\n}", "public static void model1() {\n try {\n IloCplex cplex = new IloCplex();\n \n //variables\n IloNumVar x = cplex.numVar(0, Double.MAX_VALUE, \"x\"); //x >= 0\n IloNumVar y = cplex.numVar(0, Double.MAX_VALUE, \"y\"); //y >= 0\n \n //expressions\n IloLinearNumExpr objective = cplex.linearNumExpr();\n objective.addTerm(0.12, x);\n objective.addTerm(0.15, y);\n \n //define objective\n cplex.addMinimize(objective);\n \n //define constraints\n cplex.addGe(cplex.sum(cplex.prod(60, x), cplex.prod(60, y)), 300);\n cplex.addGe(cplex.sum(cplex.prod(12, x), cplex.prod(6, y)), 36);\n cplex.addGe(cplex.sum(cplex.prod(10, x), cplex.prod(30, y)), 90);\n \n //solve\n if (cplex.solve()) {\n System.out.println(\"Obj = \" + cplex.getObjValue());\n System.out.println(\"Obj = \" + cplex.getValue(objective));\n System.out.println(\"x = \" + cplex.getValue(x));\n System.out.println(\"y = \" + cplex.getValue(y));\n } else {\n System.out.println(\"Solution not found.\");\n }\n } catch (IloException ex) {\n ex.printStackTrace();\n }\n }", "public VariableIF createVariable(VariableDecl decl);", "public int getValue(ArrayList<variable> variables, arithmetic_ex e) {\n String id = e.getId(); // get id of arithmetic expression\n try {\n for (int i = 0; i < variables.size(); i++) {\n if ((variables.get(i).getId()).trim().equals(id)) // if variable id matches expression id\n return variables.get(i).getValue(); // return the value from the variable array list\n }\n throw new JuliaSyntaxException(\"compute\"); // hasn't returned a value yet, so throw an error\n } catch (JuliaSyntaxException jse) {\n\n }\n return -1;\n }", "<C, PM> Variable<C, PM> createVariable();", "Variable getTargetVariable();", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "Variable createVariable();", "Variable createVariable();", "Aliasing getVariable();", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public Value getValue() {\n if (!dirty && !expressionUsesTime) {\n return cachedValue;\n }\n try {\n // System.out.print(\"/// {\" + number + \"} calculate \" + element.getTagName() + \"#\" + element.getAttributeNS(null, \"id\")\n // + \".\" + attributeLocalName + \" = \" + expression + \": \");\n // System.out.println(\"Executing XPath: \" + expression);\n // dumpDocument(element.getOwnerDocument(), 0);\n\n // System.out.println(\"[\" + st + \"] \" + expression);\n // long t1 = java.util.Calendar.getInstance().getTime().getTime();\n // for (int i = 0; i < 100; i++) {\n // xpath.execute(constraintEngine.xpathContext, element, prefixResolver);\n // }\n // long t2 = System.currentTimeMillis();\n st++;\n //constraintEngine.xpathContext = new XPathContext(constraintEngine);\n \n \n //xpath = new XPath(expression, prefixResolver);\n //System.out.println(\"Constraint.getValue() width context: \" + constraintEngine.xpathContext);\n //constraintEngine.xpathContext.reset(); // xgx\n XObject xo = xpath.execute(constraintEngine.xpathContext, element, prefixResolver);\n st--;\n // long t3 = System.currentTimeMillis();\n // if (st == 0) {\n // System.out.println(\"evaluation: \" + (t2 - t1) / 100.0);\n // }\n Value v = Value.createValue(/*constraintEngine,*/ xo);\n Value newValue;\n if (type == Value.TYPE_UNKNOWN) {\n newValue = v;\n } else {\n newValue = v.convertTo(type, element);\n }\n if (!newValue.equals(cachedValue)) {\n // System.out.println(newValue);\n cachedValue = newValue;\n // propagate changes\n // System.out.println(\"== propagating:\");\n // System.out.println(\"== getting constraints that depend on \" + element.getNodeName() + \"/@\" + attributeNamespaceURI + \":\" + attributeLocalName);\n propagateChanges(\n constraintEngine.getReverseDependencies(element,\n attributeNamespaceURI, \n attributeLocalName));\n propagateChanges(\n constraintEngine.getReverseDependencies(element,\n null, \n null));\n propagateChanges(\n constraintEngine.getReverseBboxDependencies(element));\n } else {\n // System.out.println(\"unnecessary\");\n }\n // System.out.println(\"Result: \" + cachedValue);\n dirty = false;\n return cachedValue;\n } catch (javax.xml.transform.TransformerException te) {\n constraintEngine.stopTimer();\n throw new ConstraintException(\"Error evaluating XPath expression: \"\n + te.getMessageAndLocation(), te);\n }\n }", "protected void sequence_PrimaryExpression(ISerializationContext context, VariableExpression semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_EXPRESSION__VALUE) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_EXPRESSION__VALUE));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getPrimaryExpressionAccess().getValueVariableIDTerminalRuleCall_2_1_0_1(), semanticObject.eGet(DslPackage.Literals.VARIABLE_EXPRESSION__VALUE, false));\n\t\tfeeder.finish();\n\t}", "public final CQLParser.variableDefinition_return variableDefinition() throws RecognitionException {\n CQLParser.variableDefinition_return retval = new CQLParser.variableDefinition_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token i=null;\n Token string_literal9=null;\n Token char_literal10=null;\n CQLParser.arithmeticExpression_return e = null;\n\n\n Object i_tree=null;\n Object string_literal9_tree=null;\n Object char_literal10_tree=null;\n RewriteRuleTokenStream stream_113=new RewriteRuleTokenStream(adaptor,\"token 113\");\n RewriteRuleTokenStream stream_110=new RewriteRuleTokenStream(adaptor,\"token 110\");\n RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,\"token ID\");\n RewriteRuleSubtreeStream stream_arithmeticExpression=new RewriteRuleSubtreeStream(adaptor,\"rule arithmeticExpression\");\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:205:2: (i= ID ':=' e= arithmeticExpression ';' -> ^( VAR $i $e) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:205:4: i= ID ':=' e= arithmeticExpression ';'\n {\n i=(Token)match(input,ID,FOLLOW_ID_in_variableDefinition427); \n stream_ID.add(i);\n\n string_literal9=(Token)match(input,113,FOLLOW_113_in_variableDefinition429); \n stream_113.add(string_literal9);\n\n pushFollow(FOLLOW_arithmeticExpression_in_variableDefinition433);\n e=arithmeticExpression();\n\n state._fsp--;\n\n stream_arithmeticExpression.add(e.getTree());\n char_literal10=(Token)match(input,110,FOLLOW_110_in_variableDefinition435); \n stream_110.add(char_literal10);\n\n\n\n // AST REWRITE\n // elements: i, e\n // token labels: i\n // rule labels: retval, e\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleTokenStream stream_i=new RewriteRuleTokenStream(adaptor,\"token i\",i);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,\"rule e\",e!=null?e.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 206:3: -> ^( VAR $i $e)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:206:6: ^( VAR $i $e)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VAR, \"VAR\"), root_1);\n\n adaptor.addChild(root_1, stream_i.nextNode());\n adaptor.addChild(root_1, stream_e.nextTree());\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 retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "@Override\n public Constraint converConstrain(String classname, String parvarn1, String parvarn2, String parvarn3) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {\n IntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); IntVar varConverZ = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; varConverZ.id = parvarn3 ;\n Class<?> clasCon = Class.forName(classname);\n Constructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class, JaCoP.core.IntVar.class});\n Constraint c = (Constraint) constru2.newInstance(varConverX,varConverY, varConverZ);\n return c;\n }", "@Override\n\tpublic void addStore(int timeUnit) {\n if (getVarsEnviromen().size() > 0) {\n\t\t\tfor (AmbientC amb: getVarsEnviromen() ){\n\t\t\t\tif (amb.getUnitTime() == timeUnit){\n int nvar = super.nvarDef(amb);\n switch (nvar) {\n case 1:\n if (super.findVars(amb.getVarname1()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 2:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2())) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 3:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2()) && super.findVars(amb.getVarname3()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n default: break;\n }\n\t\t\t\t}\n\t\t\t}\n } else {\n System.out.println(\"Ambient- <AddStore> -No existen Elementos en el Ambiente \" );\n }\n\n\t}", "protected IDecisionVariable getVariable() {\n return variable;\n }", "DynamicVariable createDynamicVariable();", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "@Override\n public LinearSequence getLinearVariables() {\n LinearSequence vars = new LinearSequence();\n\n vars.addAll(((ExtendedExpression) getA()).getLinearVariables());\n vars.addAll(((ExtendedExpression) getB()).getLinearVariables().negate());\n\n return vars;\n }", "public IVariable getVariable(int index) {\n return null;\n }", "public PrimitiveConstraint getConstraint() {\r\n return new XlteqC(var, value);\r\n }", "public BigDecimal obtenerValorExpresion(DetalleReporteadorVariable detalleVariable, Date fechaDesde, Date fechaHasta, int idSucursal, Map<Integer, BigDecimal> mapaValorVariables)\r\n/* 202: */ throws AS2Exception, IllegalArgumentException, ArithmeticException\r\n/* 203: */ {\r\n/* 204:219 */ Integer key = Integer.valueOf(detalleVariable.getId());\r\n/* 205:220 */ String expresion = detalleVariable.getExpresion();\r\n/* 206: */ \r\n/* 207:222 */ BigDecimal valorSaldoCuenta = BigDecimal.ZERO;\r\n/* 208:224 */ if (mapaValorVariables == null) {\r\n/* 209:225 */ mapaValorVariables = new HashMap();\r\n/* 210: */ }\r\n/* 211:229 */ if (mapaValorVariables.containsKey(key)) {\r\n/* 212:230 */ return (BigDecimal)mapaValorVariables.get(key);\r\n/* 213: */ }\r\n/* 214:232 */ if ((detalleVariable.isIndicadorFormula()) && ((expresion == null) || (expresion.trim().isEmpty()))) {\r\n/* 215:233 */ return BigDecimal.ZERO;\r\n/* 216: */ }\r\n/* 217:237 */ if (!detalleVariable.isIndicadorFormula())\r\n/* 218: */ {\r\n/* 219:239 */ List<CuentaContable> listaCuentas = new ArrayList();\r\n/* 220:240 */ if (detalleVariable.getCuentaContable() != null)\r\n/* 221: */ {\r\n/* 222:241 */ if (detalleVariable.getCuentaContable().isIndicadorMovimiento())\r\n/* 223: */ {\r\n/* 224:242 */ listaCuentas.add(detalleVariable.getCuentaContable());\r\n/* 225: */ }\r\n/* 226: */ else\r\n/* 227: */ {\r\n/* 228:245 */ Map<String, String> filters = new HashMap();\r\n/* 229:246 */ filters.put(\"codigo\", detalleVariable.getCuentaContable().getCodigo() + \"%\");\r\n/* 230:247 */ filters.put(\"indicadorMovimiento\", \"true\");\r\n/* 231:248 */ filters.put(\"idOrganizacion\", \"\" + detalleVariable.getIdOrganizacion());\r\n/* 232:249 */ listaCuentas = this.servicioCuentaContable.obtenerListaCombo(\"codigo\", true, filters);\r\n/* 233: */ }\r\n/* 234:252 */ List<Object[]> saldos = this.servicioCuentaContable.obtenerValores(fechaDesde, fechaHasta, detalleVariable.getIdOrganizacion(), listaCuentas, detalleVariable\r\n/* 235:253 */ .getValoresCalculo(), detalleVariable.getTipoCalculo(), false, idSucursal, null, null);\r\n/* 236:255 */ for (Object[] objects : saldos) {\r\n/* 237:256 */ if (objects[1] != null) {\r\n/* 238:257 */ valorSaldoCuenta = valorSaldoCuenta.add((BigDecimal)objects[1]);\r\n/* 239: */ }\r\n/* 240: */ }\r\n/* 241:261 */ valorSaldoCuenta = valorSaldoCuenta.setScale(2, RoundingMode.HALF_UP);\r\n/* 242: */ \r\n/* 243:263 */ mapaValorVariables.put(key, valorSaldoCuenta);\r\n/* 244: */ }\r\n/* 245:265 */ return valorSaldoCuenta;\r\n/* 246: */ }\r\n/* 247:269 */ Map<String, Double> mapaVariables = new HashMap();\r\n/* 248:270 */ Set<String> setVariables = new HashSet();\r\n/* 249:271 */ for (DetalleReporteadorVariable detalleRelacionado : detalleVariable.getListaDetalleVariablesExpresion())\r\n/* 250: */ {\r\n/* 251:272 */ BigDecimal valorVariableRelacionada = (BigDecimal)mapaValorVariables.get(Integer.valueOf(detalleRelacionado.getId()));\r\n/* 252:273 */ if (valorVariableRelacionada == null) {\r\n/* 253:274 */ valorVariableRelacionada = obtenerValorExpresion(detalleRelacionado, fechaDesde, fechaHasta, idSucursal, mapaValorVariables);\r\n/* 254: */ }\r\n/* 255:276 */ mapaVariables.put(detalleRelacionado.getCodigo(), Double.valueOf(valorVariableRelacionada.doubleValue()));\r\n/* 256:277 */ setVariables.add(detalleRelacionado.getCodigo());\r\n/* 257: */ }\r\n/* 258:280 */ Expression expresionBuild = new ExpressionBuilder(expresion).variables(setVariables).build();\r\n/* 259:281 */ expresionBuild.setVariables(mapaVariables);\r\n/* 260:282 */ valorSaldoCuenta = new BigDecimal(expresionBuild.evaluate()).setScale(2, RoundingMode.HALF_UP);\r\n/* 261:283 */ mapaValorVariables.put(key, valorSaldoCuenta);\r\n/* 262:284 */ return valorSaldoCuenta;\r\n/* 263: */ }", "VariableDeclarationWithInitCS getResultVariable();", "public interface ILits {\n\n public static int UNDEFINED = -1;\n\n public abstract void init(int nvar);\n\n /**\n * Translates a Dimacs literal into an internal representation literal.\n * \n * @param x\n * the Dimacs literal (a non null integer).\n * @return the literal in the internal representation.\n */\n public abstract int getFromPool(int x);\n\n /**\n * Returns true iff the variable is used in the set of constraints.\n * \n * @param x\n * @return true iff the variable belongs to the formula.\n */\n boolean belongsToPool(int x);\n\n public abstract void resetPool();\n\n public abstract void ensurePool(int howmany);\n\n public abstract void unassign(int lit);\n\n public abstract void satisfies(int lit);\n\n public abstract boolean isSatisfied(int lit);\n\n public abstract boolean isFalsified(int lit);\n\n public abstract boolean isUnassigned(int lit);\n\n /**\n * @param lit\n * @return true iff the truth value of that literal is due to a unit\n * propagation or a decision.\n */\n public abstract boolean isImplied(int lit);\n\n /**\n * to obtain the max id of the variable\n * \n * @return the maximum number of variables in the formula\n */\n public abstract int nVars();\n\n /**\n * to obtain the real number of variables appearing in the formula\n * \n * @return the number of variables used in the pool\n */\n int realnVars();\n\n public abstract int not(int lit);\n\n public abstract void reset(int lit);\n\n public abstract int getLevel(int lit);\n\n public abstract void setLevel(int lit, int l);\n\n public abstract Constr getReason(int lit);\n\n public abstract void setReason(int lit, Constr r);\n\n public abstract IVec<Undoable> undos(int lit);\n\n public abstract void attach(int lit, Propagatable c);\n\n /**\n * @param lit\n * a literal\n * @return the list of all the constraints that watch the negation of lit\n */\n public abstract IVec<Propagatable> attaches(int lit);\n\n public abstract String valueToString(int lit);\n}", "public Double getVariable(Object var) {\n Double val = constraints.get(var);\n if (val == null)\n return 0.0;\n else\n return val;\n }", "public Expression differentiate(String var) {\r\n // var might be a differentiate of other variable\r\n if (!this.toString().equalsIgnoreCase(var)) {\r\n return (Expression) new Num(0);\r\n }\r\n return (Expression) new Num(1);\r\n\r\n }", "private VariableField getVariableField(final int categoryCode,\n final String ind1,\n final String ind2,\n final String code,\n final CorrelationValues correlations,\n final String description, final Validation validation) {\n\n final VariableField variableField = new VariableField();\n if (!isFixedField(code)) {\n variableField.setHeadingTypeCode(Integer.toString(correlations.getValue(1)));\n variableField.setItemTypeCode(Integer.toString(correlations.getValue(2)));\n variableField.setFunctionCode(Integer.toString(correlations.getValue(3)));\n variableField.setCategoryCode(categoryCode);\n variableField.setCode(code);\n variableField.setInd1(ind1);\n variableField.setInd2(ind2);\n variableField.setDescription(description);\n\n variableField.setSubfields(\n stream(validation.getMarcValidSubfieldStringCode().split(\"\"))\n .collect(toList()));\n variableField.setDefaultSubfieldCode(String.valueOf(validation.getMarcTagDefaultSubfieldCode()));\n\n }\n return variableField;\n }", "SEIntegerVariable getOperand1();", "private void m1247a(LinearSystem eVar, boolean z, SolverVariable hVar, SolverVariable hVar2, EnumC0282a aVar, boolean z2, ConstraintAnchor eVar2, ConstraintAnchor eVar3, int i, int i2, int i3, int i4, float f, boolean z3, boolean z4, int i5, int i6, int i7, float f2, boolean z5) {\n SolverVariable hVar3;\n boolean z6;\n int i8;\n int i9;\n SolverVariable hVar4;\n SolverVariable hVar5;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n SolverVariable hVar6;\n boolean z7;\n int i15;\n SolverVariable hVar7;\n boolean z8;\n boolean z9;\n SolverVariable hVar8;\n SolverVariable hVar9;\n int i16;\n int i17;\n boolean z10;\n int i18;\n boolean z11;\n int i19;\n int i20;\n int i21;\n int i22;\n int i23;\n boolean z12;\n int i24;\n int i25;\n SolverVariable hVar10;\n SolverVariable hVar11;\n int i26;\n SolverVariable a = eVar.mo3927a(eVar2);\n SolverVariable a2 = eVar.mo3927a(eVar3);\n SolverVariable a3 = eVar.mo3927a(eVar2.mo3761g());\n SolverVariable a4 = eVar.mo3927a(eVar3.mo3761g());\n if (eVar.f1585c && eVar2.mo3751a().f1561i == 1 && eVar3.mo3751a().f1561i == 1) {\n if (LinearSystem.m1445a() != null) {\n LinearSystem.m1445a().f1621s++;\n }\n eVar2.mo3751a().mo3877a(eVar);\n eVar3.mo3751a().mo3877a(eVar);\n if (!z4 && z) {\n eVar.mo3935a(hVar2, a2, 0, 6);\n return;\n }\n return;\n }\n if (LinearSystem.m1445a() != null) {\n hVar3 = a4;\n LinearSystem.m1445a().f1600B++;\n } else {\n hVar3 = a4;\n }\n boolean j = eVar2.mo3764j();\n boolean j2 = eVar3.mo3764j();\n boolean j3 = this.f1497z.mo3764j();\n int i27 = j ? 1 : 0;\n if (j2) {\n i27++;\n }\n if (j3) {\n i27++;\n }\n int i28 = z3 ? 3 : i5;\n switch (aVar) {\n case FIXED:\n z6 = false;\n break;\n case WRAP_CONTENT:\n z6 = false;\n break;\n case MATCH_PARENT:\n z6 = false;\n break;\n case MATCH_CONSTRAINT:\n if (i28 != 4) {\n z6 = true;\n break;\n } else {\n z6 = false;\n break;\n }\n default:\n z6 = false;\n break;\n }\n if (this.f1470as == 8) {\n i8 = 0;\n z6 = false;\n } else {\n i8 = i2;\n }\n if (z5) {\n if (!j && !j2 && !j3) {\n eVar.mo3933a(a, i);\n } else if (j && !j2) {\n eVar.mo3943c(a, a3, eVar2.mo3759e(), 6);\n }\n }\n if (!z6) {\n if (z2) {\n eVar.mo3943c(a2, a, 0, 3);\n if (i3 > 0) {\n i26 = 6;\n eVar.mo3935a(a2, a, i3, 6);\n } else {\n i26 = 6;\n }\n if (i4 < Integer.MAX_VALUE) {\n eVar.mo3940b(a2, a, i4, i26);\n }\n } else {\n eVar.mo3943c(a2, a, i8, 6);\n }\n i11 = i6;\n i9 = i28;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i7;\n } else {\n if (i6 == -2) {\n i20 = i7;\n i21 = i8;\n } else {\n i21 = i6;\n i20 = i7;\n }\n if (i20 == -2) {\n i20 = i8;\n }\n if (i21 > 0) {\n i22 = 6;\n eVar.mo3935a(a2, a, i21, 6);\n i8 = Math.max(i8, i21);\n } else {\n i22 = 6;\n }\n if (i20 > 0) {\n eVar.mo3940b(a2, a, i20, i22);\n i8 = Math.min(i8, i20);\n i23 = 1;\n } else {\n i23 = 1;\n }\n if (i28 == i23) {\n if (z) {\n eVar.mo3943c(a2, a, i8, 6);\n i9 = i28;\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n } else if (z4) {\n eVar.mo3943c(a2, a, i8, 4);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n } else {\n eVar.mo3943c(a2, a, i8, 1);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n } else if (i28 == 2) {\n if (eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.TOP || eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.BOTTOM) {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.TOP));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.BOTTOM));\n } else {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.LEFT));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.RIGHT));\n }\n i11 = i21;\n i24 = i8;\n hVar5 = a3;\n i12 = i20;\n i9 = i28;\n i10 = i27;\n hVar4 = hVar3;\n eVar.mo3929a(eVar.mo3942c().mo3906a(a2, a, hVar11, hVar10, f2));\n z12 = false;\n if (z12 || i10 == 2 || z3) {\n z6 = z12;\n } else {\n int max = Math.max(i11, i24);\n if (i12 > 0) {\n max = Math.min(i12, max);\n i25 = 6;\n } else {\n i25 = 6;\n }\n eVar.mo3943c(a2, a, max, i25);\n z6 = false;\n }\n } else {\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n z12 = z6;\n if (z12) {\n }\n z6 = z12;\n }\n if (z5 && !z4) {\n if (j || j2 || j3) {\n if (!j || j2) {\n if (!j && j2) {\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), 6);\n if (z) {\n eVar.mo3935a(a, hVar, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (!j || !j2) {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n if (z6) {\n if (z && i3 == 0) {\n eVar.mo3935a(a2, a, 0, 6);\n }\n if (i9 == 0) {\n if (i12 > 0 || i11 > 0) {\n i19 = 4;\n z11 = true;\n } else {\n i19 = 6;\n z11 = false;\n }\n hVar7 = hVar5;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i19);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i19);\n z8 = i12 > 0 || i11 > 0;\n z7 = z11;\n i15 = 5;\n } else {\n hVar7 = hVar5;\n if (i9 == 1) {\n z8 = true;\n i15 = 6;\n z7 = true;\n } else if (i9 == 3) {\n if (!z3) {\n if (this.f1487p != -1 && i12 <= 0) {\n i18 = 6;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n }\n }\n i18 = 4;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n } else {\n z8 = false;\n i15 = 5;\n z7 = false;\n }\n }\n } else {\n hVar7 = hVar5;\n z8 = true;\n i15 = 5;\n z7 = false;\n }\n if (z8) {\n hVar9 = hVar4;\n hVar8 = hVar7;\n hVar6 = a2;\n eVar.mo3934a(a, hVar7, eVar2.mo3759e(), f, hVar4, a2, eVar3.mo3759e(), i15);\n boolean z13 = eVar2.f1416c.f1414a instanceof Barrier;\n boolean z14 = eVar3.f1416c.f1414a instanceof Barrier;\n if (z13 && !z14) {\n z9 = z;\n z10 = true;\n i17 = 5;\n i16 = 6;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n } else if (!z13 && z14) {\n z10 = z;\n i17 = 6;\n i16 = 5;\n z9 = true;\n if (z7) {\n i17 = 6;\n i16 = 6;\n }\n if ((!z6 && z9) || z7) {\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n }\n if ((!z6 && z10) || z7) {\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n }\n if (z) {\n i14 = 0;\n i13 = 6;\n eVar.mo3935a(a, hVar, 0, 6);\n } else {\n i14 = 0;\n i13 = 6;\n }\n }\n } else {\n hVar8 = hVar7;\n hVar9 = hVar4;\n hVar6 = a2;\n }\n z10 = z;\n z9 = z10;\n i17 = 5;\n i16 = 5;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n if (z) {\n eVar.mo3935a(hVar2, hVar6, i14, i13);\n }\n } else if (i10 < 2 && z) {\n eVar.mo3935a(a, hVar, 0, 6);\n eVar.mo3935a(hVar2, a2, 0, 6);\n }\n }", "public Variable getVariable(String name);", "boolean isVariable(Formula f);", "private void convert(AssignStatContext c, List<String> ssa) {\n\t\tString expr = getExpr(c.expr());\n\t\tString id = this.variableTrack.get(c.ID().getText());\n\t\tString newId = generateNewName(id);\n\t\tString constraint = \"(assert(= \" + newId + \" \" + expr + \"))\";\n\t\tssa.add(constraint);\n\t\t\n\t}", "public interface Constraint extends TOSCAObject<Constraint> {\n\n\tpublic String name();\n\n\tpublic default Constraint.Type type() {\n\t\treturn Type.valueOf(Type.class, name());\n\t}\n\n\t/* this is a one entry map so here we pick the single \n\t */\n\tpublic default Object expression() {\n\t\treturn info().values().iterator().next();\n\t}\n\n\tpublic enum Type {\n\t\tequal,\n\t\tgreater_than,\n\t\tgreater_or_equal,\n\t\tless_than,\n\t\tless_or_equal,\n\t\tin_range,\n\t\tvalid_values,\n\t\tlength,\n\t\tmin_length,\n\t\tmax_length,\n\t\tpattern\n\t}\n}", "public Double visitVariable(simpleCalcParser.VariableContext ctx){\n\t\tString varname = ctx.x.getText();\n\t\tDouble d = env.get(varname);\n\t\tif (d==null){\n\t\t\tSystem.err.println(\"Variable \" + varname + \" is not defined. \\n\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t \treturn d;\n \t}", "public VariableTransformationRule(Pattern originalPattern, TransformationOperation transformationOperation) {\n\t\tthis.originalPattern = originalPattern;\n\t\tthis.transformationOperation = transformationOperation;\n\t}", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "Variables createVariables();", "public IAspectVariable<V> createNewVariable(PartTarget target);", "Expression getExpression(long id);", "public static ExpressionType construire(Element elemType) {\n ExpressionType expr = null;\n Element classeElem = (Element) elemType\n .getElementsByTagName(\"expression-class\").item(0);\n String classe = classeElem.getChildNodes().item(0).getNodeValue();\n Element motCleElem = (Element) elemType.getElementsByTagName(\"keyword\")\n .item(0);\n String motCleNom = motCleElem.getChildNodes().item(0).getNodeValue();\n ConstraintOperator keyWord = ConstraintOperator\n .shortcut(StringEscapeUtils.unescapeXml(motCleNom));\n if (classe.equals(ConfigExpressionType.class.getSimpleName())) {\n expr = new ConfigExpressionType(null, keyWord);\n } else if (classe.equals(MarginExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"margin\")\n .item(0);\n Double pourcent = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n double pourcentage = 0.0;\n if (pourcent != null)\n pourcentage = pourcent.doubleValue();\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n expr = new MarginExpressionType(null, keyWord, pourcentage, unite);\n } else if (classe.equals(ReductionExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n double pourcentage = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n expr = new ReductionExpressionType(null, keyWord, pourcentage);\n } else {\n // on récupère la valeur\n Element valElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n String valeurS = valElem.getChildNodes().item(0).getNodeValue();\n CharacterValueType type = getTypeSimple(valeurS);\n Object valeur = valeurS;\n if (type.equals(CharacterValueType.INT))\n valeur = Integer.valueOf(valeurS);\n else if (type.equals(CharacterValueType.REAL))\n valeur = Double.valueOf(valeurS);\n else if (type.equals(CharacterValueType.BOOLEAN))\n valeur = Boolean.valueOf(valeurS);\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n if (classe.equals(ThreshExpressionType.class.getSimpleName()))\n expr = new ThreshExpressionType(null, keyWord, valeur, unite);\n else\n expr = new ControlExpressionType(null, keyWord, valeur, unite);\n }\n return expr;\n }", "@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }", "@Override\n public Object visitVarSingleDeclarationAST(MiParser.VarSingleDeclarationASTContext ctx) {\n int tipo =(int) visit(ctx.typeDenoter());\n tabla.insertar(ctx.IDENT().getSymbol(),tipo,ctx);\n return null;\n }", "@Override\n public Integer visitAssign(CalculatorParser.AssignContext ctx) {\n String id = ctx.ID().getText(); // id is left-hand side of '='\n int value = visit(ctx.expr()); // compute value of expression on right\n memory.put(id, value); // store it in memory\n return value;\n }", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "Node getVariable();", "public Rule idExpr()\n \t{\n \t\treturn firstOf(idExprReq(), id());\n \t}", "public static VariableSelector<IntVar> lexico_var_selector() {\n return new InputOrder<>();\n }", "@Override\n public VariableNonRequirement computeVariableNonRequirement(IQTree child) {\n return VariableNonRequirement.of(substitution.getDomain());\n }", "public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException {\n boolean hasPropertyAgnosticType = false;\n EventType[] types = validationContext.getStreamTypeService().getEventTypes();\n for (int i = 0; i < validationContext.getStreamTypeService().getEventTypes().length; i++) {\n if (types[i] instanceof EventTypeSPI) {\n hasPropertyAgnosticType |= ((EventTypeSPI) types[i]).getMetadata().isPropertyAgnostic();\n }\n }\n\n if (!hasPropertyAgnosticType) {\n // the variable name should not overlap with a property name\n try {\n validationContext.getStreamTypeService().resolveByPropertyName(variableName, false);\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (DuplicatePropertyException e) {\n throw new ExprValidationException(\"The variable by name '\" + variableName + \"' is ambigous to a property of the same name\");\n } catch (PropertyNotFoundException e) {\n // expected\n }\n }\n\n VariableMetaData variableMetadata = validationContext.getVariableService().getVariableMetaData(variableName);\n if (variableMetadata == null) {\n throw new ExprValidationException(\"Failed to find variable by name '\" + variableName + \"'\");\n }\n isPrimitive = variableMetadata.getEventType() == null;\n variableType = variableMetadata.getType();\n if (optSubPropName != null) {\n if (variableMetadata.getEventType() == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n eventTypeGetter = ((EventTypeSPI) variableMetadata.getEventType()).getGetterSPI(optSubPropName);\n if (eventTypeGetter == null) {\n throw new ExprValidationException(\"Property '\" + optSubPropName + \"' is not valid for variable '\" + variableName + \"'\");\n }\n variableType = variableMetadata.getEventType().getPropertyType(optSubPropName);\n }\n\n readersPerCp = validationContext.getVariableService().getReadersPerCP(variableName);\n if (variableMetadata.getContextPartitionName() == null) {\n readerNonCP = readersPerCp.get(EPStatementStartMethod.DEFAULT_AGENT_INSTANCE_ID);\n }\n variableType = JavaClassHelper.getBoxedType(variableType);\n return null;\n }", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "SEIntegerVariable getOperand2();", "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}", "IntVar selectVariable(IntVar[] v) {\r\n\r\n if (v.length != 0) {\r\n int index = 0;\r\n int smallestDomain = Integer.MAX_VALUE;\r\n for(int i = 0; i< v.length-1; i++){\r\n if(v[i].domain.getSize()<smallestDomain){\r\n index = i;\r\n smallestDomain = v[i].domain.getSize();\r\n }\r\n\r\n }\r\n if(v[index].min() == v[index].max()){\r\n\r\n searchVariables = new IntVar[v.length-1];\r\n for (int i = 0; i < v.length-1; i++) {\r\n if(i<index){\r\n searchVariables[i] = v[i];\r\n }\r\n else searchVariables[i] = v[i+1];\r\n\r\n }\r\n }\r\n else{\r\n searchVariables = new IntVar[v.length];\r\n for(int i = 0; i < v.length; i++){\r\n searchVariables[i] = v[i];\r\n }\r\n }\r\n return v[index];\r\n\r\n }\r\n else {\r\n System.err.println(\"Zero length list of variables for labeling\");\r\n return new IntVar(store);\r\n }\r\n }", "public T caseVariableDefinition(VariableDefinition object) {\r\n\t\treturn null;\r\n\t}", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "private void instantiateVarsSingle(IntVar var, int coeff, int constant, Propagator prop) throws ContradictionException {\n var.instantiateTo(zpz.getSmallestGreaterEqThan(var.getLB(), zpz.div(constant, coeff)), prop);\n }", "@Test\r\n public void deriveFromOrAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M|=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH|=9\", \"(long,km^2/h)\");\r\n }", "VarsDeclRule createVarsDeclRule();", "R visitFreeVariable(Formula f, String name);", "@Override\n public void addEnviroment(String clasname, String parvarn1, Integer parvarn2, Integer unit) throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n InstantiationException, IllegalAccessException,\n InvocationTargetException {\n\n Constraint c = converConstrain(clasname,parvarn1,parvarn2);\n AmbientC varsConst = new AmbientC(); //Campo que implementa la clase AmbienC para transformar los constraint\n varsConst.addAmbientCon(parvarn1, parvarn2,unit,c); //\n super.getVarsEnviromen().add(varsConst);\n\n\n }", "ExpressionCalculPrimary getExpr();", "private static void makeReadOnlyOperation(int trans_id, int var_id) {\n\n Transaction txn = transactions.get(trans_id);\n txn.readVariableReadOnly(var_id);\n // may be redundant\n addVariableToReadOnlyMap(trans_id, var_id);\n\n }", "@Override\n\tpublic Expr visit(VarExpr e) {\n\t\treturn e;\n\t}", "@Override\n public void visit(VariableEvalNode variableEvalNode) {\n }", "public T caseVariableCondition(VariableCondition object)\n {\n return null;\n }", "private Object eval(Fact expr) {\n if (expr.getBool() != null) {\n if (\"true\".equals(expr.getBool())) {\n return true;\n } else {\n return false;\n }\n } else if (expr.getString() != null) {\n return expr.getString();\n } else if (expr.getIdent() != null) {\n if (RESULT_TYPE_VARIABLE.equals(resultType)) {\n return expr.getIdent();\n }\n return scope.getVariable(expr.getIdent());\n } else if (expr.getExpr() != null) {\n return eval(expr.getExpr(), resultType);\n } else if (expr.getLocator() != null) {\n return evalLocator(expr.getLocator());\n } else {\n return expr.getNumber();\n }\n }", "@Override public Integer visitDeclaracion(lenguajesParser.DeclaracionContext ctx) {\n if(ctx.IGUAL() == null){\n //System.out.println(\"Entre cuando no existe valor\");\n memoria.put(ctx.ID().getText(),0);\n }else{\n //System.out.println(\"Entre cuando si existe valor\");\n memoria.put(ctx.ID().getText(), visit(ctx.expr()));\n }\n return null;\n }", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "@Override\n public Boolean visitVariableAttribution(FormScriptGrammarParser.VariableAttributionContext ctx) {\n if (!declaredVariables.containsKey(ctx.VARIABLE().getText())) {\n // this is validated in UI/controlled by flow in the UI so should never happen, but it remains here just in case\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \": variable \" + ctx.VARIABLE().getText() + \" wasn't declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n DataType dataType = declaredVariables.get(ctx.VARIABLE().getText());\n boolean correctType = dataType.lexerValue().equals(ctx.value().start.getType());\n /*will verify if the attribution is actually semantically valid, e.g if\n the variable was defined as an INTEGER, it can't be assigned a DATE*/\n if (!correctType) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid attribution type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be assigned the value \" + ctx.value().getText());\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n //verify if operators are valid in the context of the datatype\n String operator = ctx.COMPARISON_OPERATORS().getText();\n if (operator.equals(\"<\") || operator.equals(\">\")) {\n if (dataType.equals(DataType.BOOLEAN) || dataType.equals(DataType.DATE) || dataType.equals(DataType.FILE)) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid comparison type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be compared with operator '\" + operator + \"'\");\n }\n }\n return true;\n }", "public Formula(Variable var) {\n\t\t// TODO: implement this.\n\t\t//throw new RuntimeException(\"not yet implemented.\");\n\t\tClause c;\n\t\tc=new Clause(PosLiteral.make(var));\t\n\t\tclauses=new NonEmptyImList<Clause>(c);\n\t}", "@Override\n\tpublic Constraint converConstrain(String classname, String parvarn1, String parvarn2) throws ClassNotFoundException,\n\t\t\tSecurityException, NoSuchMethodException, IllegalArgumentException,\n\t\t\tInstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException {\n\n\t\tIntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; \n\t\tClass<?> clasCon = Class.forName(classname);\n\t\tConstructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class});\n\t\tConstraint c = (Constraint) constru2.newInstance(varConverX,varConverY);\n\t\treturn c;\n\t}", "public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }", "ExprRule createExprRule();", "public VietaSubstitution(Expression zeroedExpression,String variableToRemove,String newVariable) throws IllegalSubstitutionException {\n\t\tif(!isStandard(zeroedExpression, variableToRemove))\n\t\t\tthrow new IllegalArgumentException(\"the expression is not a standard cubic equation using the form \"+variableToRemove+\"^2 + p*\"+variableToRemove+\" - q\");\n\t\t\n\t\treplacedVariable = variableToRemove;\n\t\tnewVariableName = newVariable;\n\t\toriginalExpression = zeroedExpression;\n\t\t\n\t\tMap<Fraction, List<Term>> factors = zeroedExpression.factor(variableToRemove);\n\t\tExpression p = new Expression(factors.get(Fraction.get(1)));\n\t\tExpression newDefinition = new Expression(\n\t\t\t\tnew Term(newVariableName) ).add(\n\t\t\t\t\t\tp.negate().divideBy( new Term(3, 1, newVariableName) )\n\t\t\t\t\t\t);\n\t\tdefinition = new Definition(replacedVariable, newDefinition);\n\t\tresultingExpression = originalExpression.substitute(definition);\n\t}", "public T caseVariables(Variables object)\n {\n return null;\n }", "public T caseExpresionVar(ExpresionVar object)\n {\n return null;\n }", "Expression getValue();", "Expression getValue();", "public Rule idExprReq()\n \t{\n \t\treturn firstOf(field(), call());\n \t}", "public String isVar(Exp e) {\n if (e instanceof EId) {\n return ((EId) e).id_;\n } else\n throw new TypeException(\"Expected variable but found: \" + e);\n }", "@org.junit.Test\n public void constrCompelemConstrmod3() {\n final XQuery query = new XQuery(\n \"declare construction strip; (element elem {xs:decimal((//decimal[1]))}) cast as xs:integer\",\n ctx);\n try {\n query.context(node(file(\"docs/atomicns.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"FORG0001\")\n );\n }", "AliasVariable createAliasVariable();", "private SWRLVariable initalizeVariable(String name, SWRLVariable var1) {\n\n if (literalVocabulary.containsKey(name)) {\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n } else {\n char variable = this.generateVariable();\n literalVocabulary.put(name, String.valueOf(variable));\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + variable));\n }\n\n return var1;\n }", "public String getVariable();", "public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private QuantifiedVariableCore transform(QuantifiedVariableCore qv)\n {\n if (qv instanceof QuantifiedVariableCore.IdentifierTypeQuantifiedVar)\n return qv;\n QuantifiedVariableCore.IdentifierSetQuantifiedVar qv0 =\n (QuantifiedVariableCore.IdentifierSetQuantifiedVar)qv;\n return new QuantifiedVariableCore.IdentifierSetQuantifiedVar(qv0.ident,\n transform(qv0.exp));\n }", "public interface IOptimizableFuncExpr {\n public AbstractFunctionCallExpression getFuncExpr();\n\n public int getNumLogicalVars();\n\n public int getNumConstantVals();\n\n public LogicalVariable getLogicalVar(int index);\n\n public void setLogicalExpr(int index, ILogicalExpression logExpr);\n\n public ILogicalExpression getLogicalExpr(int index);\n\n public void setFieldName(int index, List<String> fieldName);\n\n public List<String> getFieldName(int index);\n\n public void setFieldType(int index, IAType fieldName);\n\n public IAType getFieldType(int index);\n\n public void setOptimizableSubTree(int index, OptimizableOperatorSubTree subTree);\n\n public OptimizableOperatorSubTree getOperatorSubTree(int index);\n\n public IAlgebricksConstantValue getConstantVal(int index);\n\n public int findLogicalVar(LogicalVariable var);\n\n public int findFieldName(List<String> fieldName);\n\n public void substituteVar(LogicalVariable original, LogicalVariable substitution);\n\n public void setPartialField(boolean partialField);\n\n public boolean containsPartialField();\n\n public void setSourceVar(int index, LogicalVariable var);\n\n public LogicalVariable getSourceVar(int index);\n}", "private void addC1Constraints(GRBVar[][] xVars, GRBModel model) throws GRBException {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString constraintName = \"constraintC1_\" + i;\n\t\t\t// out_x(i) - in_x(i) = 0\n\t\t\tGRBLinExpr constraintLinExpr = new GRBLinExpr();\n\n\t\t\t// Expression += out_x(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Expression -= in_x(i)\n\t\t\tGRBSolverUtils.addInTerm(i, -1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Add constraint\n\t\t\tmodel.addConstr(constraintLinExpr, GRB.EQUAL, 0, constraintName);\n\t\t}\n\t}", "String getTargetVariablePart();", "DExpression getExpression();", "private void createOriginalCSP (int[][] variables){\n\t\t\n\t\tnumberOfVariables = variables[0].length;\n\t\tchocoModel = new Model(\"OriginalCSP\");\n\t\tnumberOfProducts = variables.length;\n\t\tcreateNewVar(); // FIRST VAR is PRODUCT ID , varID = 0\n\t\t\n\t\tint varID =0;\n\t\t\n\t\tfor(int i=0;i<variables[0].length;i++){\n\t\t\tcreateNewVar(); // ADD FEATURE SET OF CAMERAS\n\t\t}\n\t\tallVarsAreCreated = true;\n\t\t\n\t\taddProductConstraints(variables);\n\t\t\n\t\t\n\t}" ]
[ "0.6073627", "0.60272473", "0.5947747", "0.5846106", "0.56373984", "0.5633362", "0.5526446", "0.55256164", "0.5505749", "0.5487442", "0.5473027", "0.5424785", "0.5422622", "0.5379949", "0.5379949", "0.53393626", "0.5329222", "0.53090835", "0.5297226", "0.52675956", "0.5261129", "0.52392364", "0.5226985", "0.5225215", "0.52100044", "0.5209648", "0.52050996", "0.51922625", "0.5188666", "0.5175634", "0.5159613", "0.5157529", "0.5153325", "0.513416", "0.5127757", "0.5119926", "0.51100624", "0.50982165", "0.50904673", "0.5080152", "0.50709563", "0.5049391", "0.5044706", "0.5044244", "0.5018686", "0.501523", "0.5009707", "0.5003518", "0.5002516", "0.4974991", "0.4963088", "0.49552435", "0.4943371", "0.493106", "0.49263495", "0.49189132", "0.49097568", "0.49097568", "0.49097568", "0.49013603", "0.48987603", "0.48906335", "0.487509", "0.48702154", "0.4869631", "0.48674485", "0.48671353", "0.48589078", "0.48583332", "0.4848597", "0.48476523", "0.48434266", "0.48431826", "0.48430884", "0.4831312", "0.4822699", "0.48143733", "0.48109525", "0.4802097", "0.47890094", "0.47853917", "0.47808895", "0.47718808", "0.47695145", "0.47589105", "0.47555742", "0.47555742", "0.47515613", "0.4749867", "0.47462565", "0.47445956", "0.47420818", "0.47390708", "0.47363123", "0.47318083", "0.47283545", "0.47168437", "0.47128958", "0.47098204", "0.47096843" ]
0.65903395
0
Contexts: Truc returns VariableDirect Variable returns VariableDirect VariableDirect returns VariableDirect Constraint: (name=ID alpha=Reel beta=Reel)
protected void sequence_VariableDirect(ISerializationContext context, VariableDirect semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__NAME)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__ALPHA) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__ALPHA)); if (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__BETA) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_DIRECT__BETA)); } SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); feeder.accept(grammarAccess.getVariableDirectAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName()); feeder.accept(grammarAccess.getVariableDirectAccess().getAlphaReelParserRuleCall_5_0(), semanticObject.getAlpha()); feeder.accept(grammarAccess.getVariableDirectAccess().getBetaReelParserRuleCall_8_0(), semanticObject.getBeta()); feeder.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract IDecisionVariable getVariable();", "<C, PM> VariableExp<C, PM> createVariableExp();", "VariableExp createVariableExp();", "Aliasing getVariable();", "<C, PM> Variable<C, PM> createVariable();", "public void mo3743a(LinearSystem eVar) {\n boolean z;\n boolean z2;\n boolean z3;\n boolean z4;\n int i;\n int i2;\n boolean z5;\n int i3;\n int i4;\n SolverVariable hVar;\n boolean z6;\n SolverVariable hVar2;\n SolverVariable hVar3;\n boolean z7;\n SolverVariable hVar4;\n SolverVariable hVar5;\n ConstraintWidget fVar;\n boolean z8;\n LinearSystem eVar2;\n SolverVariable hVar6;\n ConstraintWidget fVar2;\n int i5;\n boolean z9;\n boolean z10;\n SolverVariable a = eVar.mo3927a(this.f1490s);\n SolverVariable a2 = eVar.mo3927a(this.f1492u);\n SolverVariable a3 = eVar.mo3927a(this.f1491t);\n SolverVariable a4 = eVar.mo3927a(this.f1493v);\n SolverVariable a5 = eVar.mo3927a(this.f1494w);\n ConstraintWidget fVar3 = this.f1429D;\n if (fVar3 != null) {\n z4 = fVar3 != null && fVar3.f1428C[0] == EnumC0282a.WRAP_CONTENT;\n ConstraintWidget fVar4 = this.f1429D;\n boolean z11 = fVar4 != null && fVar4.f1428C[1] == EnumC0282a.WRAP_CONTENT;\n if (mo3742a(0)) {\n ((ConstraintWidgetContainer) this.f1429D).mo3854a(this, 0);\n z9 = true;\n } else {\n z9 = mo3774I();\n }\n if (mo3742a(1)) {\n ((ConstraintWidgetContainer) this.f1429D).mo3854a(this, 1);\n z10 = true;\n } else {\n z10 = mo3775J();\n }\n if (z4 && this.f1470as != 8 && this.f1490s.f1416c == null && this.f1492u.f1416c == null) {\n eVar.mo3935a(eVar.mo3927a(this.f1429D.f1492u), a2, 0, 1);\n }\n if (z11 && this.f1470as != 8 && this.f1491t.f1416c == null && this.f1493v.f1416c == null && this.f1494w == null) {\n eVar.mo3935a(eVar.mo3927a(this.f1429D.f1493v), a4, 0, 1);\n }\n z3 = z11;\n z2 = z9;\n z = z10;\n } else {\n z4 = false;\n z3 = false;\n z2 = false;\n z = false;\n }\n int i6 = this.f1430E;\n int i7 = this.f1441P;\n if (i6 < i7) {\n i6 = i7;\n }\n int i8 = this.f1431F;\n int i9 = this.f1442Q;\n if (i8 < i9) {\n i8 = i9;\n }\n boolean z12 = this.f1428C[0] != EnumC0282a.MATCH_CONSTRAINT;\n boolean z13 = this.f1428C[1] != EnumC0282a.MATCH_CONSTRAINT;\n this.f1487p = this.f1433H;\n float f = this.f1432G;\n this.f1488q = f;\n int i10 = this.f1476e;\n int i11 = this.f1477f;\n if (f <= 0.0f || this.f1470as == 8) {\n hVar = a5;\n i4 = i10;\n i2 = i6;\n i = i8;\n i3 = i11;\n z5 = false;\n } else {\n hVar = a5;\n if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && i10 == 0) {\n i10 = 3;\n }\n if (this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i11 == 0) {\n i11 = 3;\n }\n if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i10 == 3 && i11 == 3) {\n mo3789a(z4, z3, z12, z13);\n } else if (this.f1428C[0] == EnumC0282a.MATCH_CONSTRAINT && i10 == 3) {\n this.f1487p = 0;\n int i12 = (int) (this.f1488q * ((float) this.f1431F));\n if (this.f1428C[1] != EnumC0282a.MATCH_CONSTRAINT) {\n i2 = i12;\n i = i8;\n i3 = i11;\n i4 = 4;\n z5 = false;\n } else {\n i2 = i12;\n i4 = i10;\n i = i8;\n i3 = i11;\n z5 = true;\n }\n } else if (this.f1428C[1] == EnumC0282a.MATCH_CONSTRAINT && i11 == 3) {\n this.f1487p = 1;\n if (this.f1433H == -1) {\n this.f1488q = 1.0f / this.f1488q;\n }\n int i13 = (int) (this.f1488q * ((float) this.f1430E));\n if (this.f1428C[0] != EnumC0282a.MATCH_CONSTRAINT) {\n i = i13;\n i4 = i10;\n i2 = i6;\n i3 = 4;\n z5 = false;\n } else {\n i = i13;\n i4 = i10;\n i2 = i6;\n i3 = i11;\n z5 = true;\n }\n }\n i4 = i10;\n i2 = i6;\n i = i8;\n i3 = i11;\n z5 = true;\n }\n int[] iArr = this.f1478g;\n iArr[0] = i4;\n iArr[1] = i3;\n if (z5) {\n int i14 = this.f1487p;\n if (i14 != 0) {\n }\n z6 = true;\n boolean z14 = this.f1428C[0] != EnumC0282a.WRAP_CONTENT && (this instanceof ConstraintWidgetContainer);\n boolean z15 = !this.f1497z.mo3764j();\n if (this.f1451a == 2) {\n ConstraintWidget fVar5 = this.f1429D;\n SolverVariable a6 = fVar5 != null ? eVar.mo3927a(fVar5.f1492u) : null;\n ConstraintWidget fVar6 = this.f1429D;\n z7 = z3;\n hVar3 = hVar;\n hVar5 = a4;\n hVar2 = a3;\n hVar4 = a2;\n m1247a(eVar, z4, fVar6 != null ? eVar.mo3927a(fVar6.f1490s) : null, a6, this.f1428C[0], z14, this.f1490s, this.f1492u, this.f1434I, i2, this.f1441P, this.f1460ai[0], this.f1443S, z6, z2, i4, this.f1479h, this.f1480i, this.f1481j, z15);\n fVar = this;\n } else {\n hVar2 = a3;\n hVar4 = a2;\n z7 = z3;\n hVar3 = hVar;\n hVar5 = a4;\n fVar = this;\n }\n if (fVar.f1473b == 2) {\n boolean z16 = fVar.f1428C[1] == EnumC0282a.WRAP_CONTENT && (fVar instanceof ConstraintWidgetContainer);\n boolean z17 = z5 && ((i5 = fVar.f1487p) == 1 || i5 == -1);\n if (fVar.f1440O <= 0) {\n hVar6 = hVar2;\n eVar2 = eVar;\n } else if (fVar.f1494w.mo3751a().f1561i == 1) {\n eVar2 = eVar;\n fVar.f1494w.mo3751a().mo3877a(eVar2);\n hVar6 = hVar2;\n } else {\n eVar2 = eVar;\n hVar6 = hVar2;\n eVar2.mo3943c(hVar3, hVar6, mo3767B(), 6);\n if (fVar.f1494w.f1416c != null) {\n eVar2.mo3943c(hVar3, eVar2.mo3927a(fVar.f1494w.f1416c), 0, 6);\n z8 = false;\n ConstraintWidget fVar7 = fVar.f1429D;\n SolverVariable a7 = fVar7 == null ? eVar2.mo3927a(fVar7.f1493v) : null;\n ConstraintWidget fVar8 = fVar.f1429D;\n m1247a(eVar, z7, fVar8 == null ? eVar2.mo3927a(fVar8.f1491t) : null, a7, fVar.f1428C[1], z16, fVar.f1491t, fVar.f1493v, fVar.f1435J, i, fVar.f1442Q, fVar.f1460ai[1], fVar.f1444T, z17, z, i3, fVar.f1482k, fVar.f1483l, fVar.f1484m, z8);\n if (!z5) {\n fVar2 = this;\n if (fVar2.f1487p == 1) {\n eVar.mo3936a(hVar5, hVar6, hVar4, a, fVar2.f1488q, 6);\n } else {\n eVar.mo3936a(hVar4, a, hVar5, hVar6, fVar2.f1488q, 6);\n }\n } else {\n fVar2 = this;\n }\n if (!fVar2.f1497z.mo3764j()) {\n eVar.mo3928a(fVar2, fVar2.f1497z.mo3761g().mo3757c(), (float) Math.toRadians((double) (fVar2.f1461aj + 90.0f)), fVar2.f1497z.mo3759e());\n return;\n }\n return;\n }\n }\n z8 = z15;\n ConstraintWidget fVar72 = fVar.f1429D;\n if (fVar72 == null) {\n }\n ConstraintWidget fVar82 = fVar.f1429D;\n m1247a(eVar, z7, fVar82 == null ? eVar2.mo3927a(fVar82.f1491t) : null, a7, fVar.f1428C[1], z16, fVar.f1491t, fVar.f1493v, fVar.f1435J, i, fVar.f1442Q, fVar.f1460ai[1], fVar.f1444T, z17, z, i3, fVar.f1482k, fVar.f1483l, fVar.f1484m, z8);\n if (!z5) {\n }\n if (!fVar2.f1497z.mo3764j()) {\n }\n } else {\n return;\n }\n }\n z6 = false;\n if (this.f1428C[0] != EnumC0282a.WRAP_CONTENT) {\n }\n boolean z152 = !this.f1497z.mo3764j();\n if (this.f1451a == 2) {\n }\n if (fVar.f1473b == 2) {\n }\n }", "Variable getTargetVariable();", "public interface ILits {\n\n public static int UNDEFINED = -1;\n\n public abstract void init(int nvar);\n\n /**\n * Translates a Dimacs literal into an internal representation literal.\n * \n * @param x\n * the Dimacs literal (a non null integer).\n * @return the literal in the internal representation.\n */\n public abstract int getFromPool(int x);\n\n /**\n * Returns true iff the variable is used in the set of constraints.\n * \n * @param x\n * @return true iff the variable belongs to the formula.\n */\n boolean belongsToPool(int x);\n\n public abstract void resetPool();\n\n public abstract void ensurePool(int howmany);\n\n public abstract void unassign(int lit);\n\n public abstract void satisfies(int lit);\n\n public abstract boolean isSatisfied(int lit);\n\n public abstract boolean isFalsified(int lit);\n\n public abstract boolean isUnassigned(int lit);\n\n /**\n * @param lit\n * @return true iff the truth value of that literal is due to a unit\n * propagation or a decision.\n */\n public abstract boolean isImplied(int lit);\n\n /**\n * to obtain the max id of the variable\n * \n * @return the maximum number of variables in the formula\n */\n public abstract int nVars();\n\n /**\n * to obtain the real number of variables appearing in the formula\n * \n * @return the number of variables used in the pool\n */\n int realnVars();\n\n public abstract int not(int lit);\n\n public abstract void reset(int lit);\n\n public abstract int getLevel(int lit);\n\n public abstract void setLevel(int lit, int l);\n\n public abstract Constr getReason(int lit);\n\n public abstract void setReason(int lit, Constr r);\n\n public abstract IVec<Undoable> undos(int lit);\n\n public abstract void attach(int lit, Propagatable c);\n\n /**\n * @param lit\n * a literal\n * @return the list of all the constraints that watch the negation of lit\n */\n public abstract IVec<Propagatable> attaches(int lit);\n\n public abstract String valueToString(int lit);\n}", "private void m1247a(LinearSystem eVar, boolean z, SolverVariable hVar, SolverVariable hVar2, EnumC0282a aVar, boolean z2, ConstraintAnchor eVar2, ConstraintAnchor eVar3, int i, int i2, int i3, int i4, float f, boolean z3, boolean z4, int i5, int i6, int i7, float f2, boolean z5) {\n SolverVariable hVar3;\n boolean z6;\n int i8;\n int i9;\n SolverVariable hVar4;\n SolverVariable hVar5;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n SolverVariable hVar6;\n boolean z7;\n int i15;\n SolverVariable hVar7;\n boolean z8;\n boolean z9;\n SolverVariable hVar8;\n SolverVariable hVar9;\n int i16;\n int i17;\n boolean z10;\n int i18;\n boolean z11;\n int i19;\n int i20;\n int i21;\n int i22;\n int i23;\n boolean z12;\n int i24;\n int i25;\n SolverVariable hVar10;\n SolverVariable hVar11;\n int i26;\n SolverVariable a = eVar.mo3927a(eVar2);\n SolverVariable a2 = eVar.mo3927a(eVar3);\n SolverVariable a3 = eVar.mo3927a(eVar2.mo3761g());\n SolverVariable a4 = eVar.mo3927a(eVar3.mo3761g());\n if (eVar.f1585c && eVar2.mo3751a().f1561i == 1 && eVar3.mo3751a().f1561i == 1) {\n if (LinearSystem.m1445a() != null) {\n LinearSystem.m1445a().f1621s++;\n }\n eVar2.mo3751a().mo3877a(eVar);\n eVar3.mo3751a().mo3877a(eVar);\n if (!z4 && z) {\n eVar.mo3935a(hVar2, a2, 0, 6);\n return;\n }\n return;\n }\n if (LinearSystem.m1445a() != null) {\n hVar3 = a4;\n LinearSystem.m1445a().f1600B++;\n } else {\n hVar3 = a4;\n }\n boolean j = eVar2.mo3764j();\n boolean j2 = eVar3.mo3764j();\n boolean j3 = this.f1497z.mo3764j();\n int i27 = j ? 1 : 0;\n if (j2) {\n i27++;\n }\n if (j3) {\n i27++;\n }\n int i28 = z3 ? 3 : i5;\n switch (aVar) {\n case FIXED:\n z6 = false;\n break;\n case WRAP_CONTENT:\n z6 = false;\n break;\n case MATCH_PARENT:\n z6 = false;\n break;\n case MATCH_CONSTRAINT:\n if (i28 != 4) {\n z6 = true;\n break;\n } else {\n z6 = false;\n break;\n }\n default:\n z6 = false;\n break;\n }\n if (this.f1470as == 8) {\n i8 = 0;\n z6 = false;\n } else {\n i8 = i2;\n }\n if (z5) {\n if (!j && !j2 && !j3) {\n eVar.mo3933a(a, i);\n } else if (j && !j2) {\n eVar.mo3943c(a, a3, eVar2.mo3759e(), 6);\n }\n }\n if (!z6) {\n if (z2) {\n eVar.mo3943c(a2, a, 0, 3);\n if (i3 > 0) {\n i26 = 6;\n eVar.mo3935a(a2, a, i3, 6);\n } else {\n i26 = 6;\n }\n if (i4 < Integer.MAX_VALUE) {\n eVar.mo3940b(a2, a, i4, i26);\n }\n } else {\n eVar.mo3943c(a2, a, i8, 6);\n }\n i11 = i6;\n i9 = i28;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i7;\n } else {\n if (i6 == -2) {\n i20 = i7;\n i21 = i8;\n } else {\n i21 = i6;\n i20 = i7;\n }\n if (i20 == -2) {\n i20 = i8;\n }\n if (i21 > 0) {\n i22 = 6;\n eVar.mo3935a(a2, a, i21, 6);\n i8 = Math.max(i8, i21);\n } else {\n i22 = 6;\n }\n if (i20 > 0) {\n eVar.mo3940b(a2, a, i20, i22);\n i8 = Math.min(i8, i20);\n i23 = 1;\n } else {\n i23 = 1;\n }\n if (i28 == i23) {\n if (z) {\n eVar.mo3943c(a2, a, i8, 6);\n i9 = i28;\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n } else if (z4) {\n eVar.mo3943c(a2, a, i8, 4);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n } else {\n eVar.mo3943c(a2, a, i8, 1);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n } else if (i28 == 2) {\n if (eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.TOP || eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.BOTTOM) {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.TOP));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.BOTTOM));\n } else {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.LEFT));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.RIGHT));\n }\n i11 = i21;\n i24 = i8;\n hVar5 = a3;\n i12 = i20;\n i9 = i28;\n i10 = i27;\n hVar4 = hVar3;\n eVar.mo3929a(eVar.mo3942c().mo3906a(a2, a, hVar11, hVar10, f2));\n z12 = false;\n if (z12 || i10 == 2 || z3) {\n z6 = z12;\n } else {\n int max = Math.max(i11, i24);\n if (i12 > 0) {\n max = Math.min(i12, max);\n i25 = 6;\n } else {\n i25 = 6;\n }\n eVar.mo3943c(a2, a, max, i25);\n z6 = false;\n }\n } else {\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n z12 = z6;\n if (z12) {\n }\n z6 = z12;\n }\n if (z5 && !z4) {\n if (j || j2 || j3) {\n if (!j || j2) {\n if (!j && j2) {\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), 6);\n if (z) {\n eVar.mo3935a(a, hVar, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (!j || !j2) {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n if (z6) {\n if (z && i3 == 0) {\n eVar.mo3935a(a2, a, 0, 6);\n }\n if (i9 == 0) {\n if (i12 > 0 || i11 > 0) {\n i19 = 4;\n z11 = true;\n } else {\n i19 = 6;\n z11 = false;\n }\n hVar7 = hVar5;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i19);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i19);\n z8 = i12 > 0 || i11 > 0;\n z7 = z11;\n i15 = 5;\n } else {\n hVar7 = hVar5;\n if (i9 == 1) {\n z8 = true;\n i15 = 6;\n z7 = true;\n } else if (i9 == 3) {\n if (!z3) {\n if (this.f1487p != -1 && i12 <= 0) {\n i18 = 6;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n }\n }\n i18 = 4;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n } else {\n z8 = false;\n i15 = 5;\n z7 = false;\n }\n }\n } else {\n hVar7 = hVar5;\n z8 = true;\n i15 = 5;\n z7 = false;\n }\n if (z8) {\n hVar9 = hVar4;\n hVar8 = hVar7;\n hVar6 = a2;\n eVar.mo3934a(a, hVar7, eVar2.mo3759e(), f, hVar4, a2, eVar3.mo3759e(), i15);\n boolean z13 = eVar2.f1416c.f1414a instanceof Barrier;\n boolean z14 = eVar3.f1416c.f1414a instanceof Barrier;\n if (z13 && !z14) {\n z9 = z;\n z10 = true;\n i17 = 5;\n i16 = 6;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n } else if (!z13 && z14) {\n z10 = z;\n i17 = 6;\n i16 = 5;\n z9 = true;\n if (z7) {\n i17 = 6;\n i16 = 6;\n }\n if ((!z6 && z9) || z7) {\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n }\n if ((!z6 && z10) || z7) {\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n }\n if (z) {\n i14 = 0;\n i13 = 6;\n eVar.mo3935a(a, hVar, 0, 6);\n } else {\n i14 = 0;\n i13 = 6;\n }\n }\n } else {\n hVar8 = hVar7;\n hVar9 = hVar4;\n hVar6 = a2;\n }\n z10 = z;\n z9 = z10;\n i17 = 5;\n i16 = 5;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n if (z) {\n eVar.mo3935a(hVar2, hVar6, i14, i13);\n }\n } else if (i10 < 2 && z) {\n eVar.mo3935a(a, hVar, 0, 6);\n eVar.mo3935a(hVar2, a2, 0, 6);\n }\n }", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "public IVariable getVariable(Integer id) {\n return null;\n }", "public VariableCoefficientTuple suggestBranchingVariable (TwoIntegerTuple childRectCounts ) {\r\n \r\n VariableCoefficientTuple result= new VariableCoefficientTuple(null, ZERO) ;\r\n \r\n //first get the best lp rects\r\n List<Rectangle> rectanglesToConsiderForBranchingVarCalculation = this.getRectanglesToConsiderForBranchingVarCalculation( );\r\n \r\n //collect 0 direction refcounts into this map\r\n Map<String, Integer> zeroVar_RefCountMap = new HashMap<String, Integer> () ;\r\n //and one diirection refconts into this map\r\n Map<String, Integer> oneVar_RefCountMap = new HashMap<String, Integer> () ;\r\n \r\n List<VariableCoefficientTuple> variablesUsedForBranchingInThisRectangle =null;\r\n for (Rectangle rect: rectanglesToConsiderForBranchingVarCalculation){\r\n variablesUsedForBranchingInThisRectangle = getVariablesUsedForBranchingInThisRectangle (rect);\r\n if (variablesUsedForBranchingInThisRectangle.size()>ZERO) {\r\n this.updateVariableRefCounts(zeroVar_RefCountMap, oneVar_RefCountMap, variablesUsedForBranchingInThisRectangle) ;\r\n }else {\r\n System.err.print(\"trying to branch a node which should have been marked infeasible\" );\r\n exit(ONE);\r\n }\r\n }\r\n \r\n \r\n //now find the highest refcount var, no matter its direction\r\n int highZeroFreq = zeroVar_RefCountMap.isEmpty()?ZERO:Collections.max( zeroVar_RefCountMap.values());\r\n int highOneFreq = oneVar_RefCountMap.isEmpty()? ZERO: Collections.max(oneVar_RefCountMap.values()) ;\r\n \r\n //we need to find the selected var's refcount on the other side\r\n int selectedVarRefCountOnOtherSide = ZERO;\r\n \r\n int totalRects = getNumberOfRects(this.myInfeasibleRectanglesList) ;\r\n \r\n if (highZeroFreq>highOneFreq) {\r\n result.varName=getHighestFreqVar (zeroVar_RefCountMap,highZeroFreq ) ;\r\n result.coeff=highZeroFreq;\r\n selectedVarRefCountOnOtherSide= oneVar_RefCountMap.get( result.varName)==null? ZERO : oneVar_RefCountMap.get( result.varName);\r\n //this is how many rects will survive on either side\r\n childRectCounts.zeroSideCount = totalRects - selectedVarRefCountOnOtherSide;\r\n childRectCounts.oneSideCount=totalRects -highZeroFreq ;\r\n \r\n } else {\r\n result.varName=getHighestFreqVar (oneVar_RefCountMap,highOneFreq ) ;\r\n result.coeff=highOneFreq;\r\n selectedVarRefCountOnOtherSide= zeroVar_RefCountMap.get( result.varName)==null? ZERO : zeroVar_RefCountMap.get( result.varName);\r\n \r\n childRectCounts.zeroSideCount = totalRects - highOneFreq;\r\n childRectCounts.oneSideCount=totalRects - selectedVarRefCountOnOtherSide;\r\n }\r\n \r\n return result;\r\n }", "protected IDecisionVariable getVariable() {\n return variable;\n }", "@Override\n public LinearSequence getLinearVariables() {\n LinearSequence vars = new LinearSequence();\n\n vars.addAll(((ExtendedExpression) getA()).getLinearVariables());\n vars.addAll(((ExtendedExpression) getB()).getLinearVariables().negate());\n\n return vars;\n }", "@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }", "private void generateVariablesAndConstraints() {\n\t\tVariable norwegian=new Variable(generateDomain(), \"norwegian\");\n\t\tVariable english=new Variable(generateDomain(), \"english\");\n\t\tVariable dane=new Variable(generateDomain(), \"dane\");\n\t\tVariable german=new Variable(generateDomain(), \"german\");\n\t\tVariable swede=new Variable(generateDomain(), \"swede\");\n\t\t//colors: \"red\", \"green\", \"white\", \"yellow\", \"blue\"\n\t\tVariable red=new Variable(generateDomain(), \"red\");\n\t\tVariable green=new Variable(generateDomain(), \"green\");\n\t\tVariable white=new Variable(generateDomain(), \"white\");\n\t\tVariable yellow=new Variable(generateDomain(), \"yellow\");\n\t\tVariable blue=new Variable(generateDomain(), \"blue\");\n\t\t//tobaccos: \"light\", \"cigar\", \"pipe\", \"unfiltered\", \"menthol\"\n\t\tVariable light=new Variable(generateDomain(), \"light\");\n\t\tVariable cigar=new Variable(generateDomain(), \"cigar\");\n\t\tVariable pipe=new Variable(generateDomain(), \"pipe\");\n\t\tVariable unfiltered=new Variable(generateDomain(), \"unfiltered\");\n\t\tVariable menthol=new Variable(generateDomain(), \"menthol\");\n\t\t//drinks: \"tea\", \"milk\", \"water\", \"beer\", \"coffee\"\n\t\tVariable tea=new Variable(generateDomain(), \"tea\");\n\t\tVariable milk=new Variable(generateDomain(), \"milk\");\n\t\tVariable water=new Variable(generateDomain(), \"water\");\n\t\tVariable beer=new Variable(generateDomain(), \"beer\");\n\t\tVariable coffee=new Variable(generateDomain(), \"coffee\");\n\t\t//pets: \"fish\", \"cat\", \"bird\", \"dog\", \"horse\"\n\t\tVariable fish=new Variable(generateDomain(), \"fish\");\n\t\tVariable cat=new Variable(generateDomain(), \"cat\");\n\t\tVariable bird=new Variable(generateDomain(), \"bird\");\n\t\tVariable dog=new Variable(generateDomain(), \"dog\");\n\t\tVariable horse=new Variable(generateDomain(), \"horse\");\n\t\t\n\t\tvariables= new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tred, green, white, yellow, blue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlight, cigar, pipe, unfiltered, menthol,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttea, milk, water, beer, coffee,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfish, cat, bird, dog, horse));\n\t\t\n\t\tconstraints=new ArrayList<Constraint>();\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(norwegian, english, dane, german, swede))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(red, green, white, yellow, blue))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(light, cigar, pipe, unfiltered, menthol))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(tea, milk, water, beer, coffee))).toneq()));\n\t\tconstraints.addAll((new allDifferent(new ArrayList<Variable>(Arrays.asList(fish, cat, bird, dog, horse))).toneq()));\n\t\tconstraints.add(new equnary(norwegian, 1)); //Norweg zamieszkuje pierwszy dom\n\t\tconstraints.add(new eq(english, red));//Anglik mieszka w czerwonym domu.\n\t\tconstraints.add(new lt(green, white));//Zielony dom znajduje się bezpośrednio po lewej stronie domu białego.\n\t\tconstraints.add(new eq(dane, tea));//Duńczyk pija herbatkę.\n\t\tconstraints.add(new nextto(light, cat));//Palacz papierosów light mieszka obok hodowcy kotów.\n\t\tconstraints.add(new eq(yellow, cigar));//Mieszkaniec żółtego domu pali cygara.\n\t\tconstraints.add(new eq(german, pipe));//Niemiec pali fajkę.\n\t\tconstraints.add(new equnary(milk, 3));//Mieszkaniec środkowego domu pija mleko.\n\t\tconstraints.add(new nextto(light, water));//Palacz papierosów light ma sąsiada, który pija wodę.\n\t\tconstraints.add(new eq(unfiltered, bird));//Palacz papierosów bez filtra hoduje ptaki.\n\t\tconstraints.add(new eq(swede, dog));//Szwed hoduje psy.\n\t\tconstraints.add(new nextto(norwegian, blue));//Norweg mieszka obok niebieskiego domu.\n\t\tconstraints.add(new nextto(horse, yellow));//Hodowca koni mieszka obok żółtego domu.\n\t\tconstraints.add(new eq(menthol, beer));//Palacz mentolowych pija piwo.\n\t\tconstraints.add(new eq(green, coffee));//W zielonym domu pija się kawę\n\t}", "public VariableIF createVariable(VariableDecl decl);", "@Test\n\tpublic void test() {\n\t\tRandomVariableDefinition RV_DEF_X = new RandomVariableDefinition(\"DEF_X\", Arrays.asList(\"x0\", \"x1\", \"x2\"));\n\t\tRandomVariableDefinition RV_DEF_Y = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"y0\", \"y1\"));\n\t\tRandomVariableDefinition RV_DEF_Z = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"z0\", \"z1\"));\n\n\t\t///////////////////////////////////\n\t\t// define the local probability models\n\t\tLocalProbabilityModel X = new LocalProbabilityModel(\"X\");\n\t\tLocalProbabilityModel Y = new LocalProbabilityModel(\"Y\");\n\t\tLocalProbabilityModel Z = new LocalProbabilityModel(\"Z\");\n\t\tLocalProbabilityModel X1 = new LocalProbabilityModel(\"X1\");\n\t\tLocalProbabilityModel X2 = new LocalProbabilityModel(\"X2\");\n\t\tLocalProbabilityModel X3 = new LocalProbabilityModel(\"X3\");\n\t\tLocalProbabilityModel X7 = new LocalProbabilityModel(\"X7\");\n\t\t\n\t\t////////////////////////////////\n\t\t// specify target variable type, and dependencies\n\t\t\n\t\t// two a-priori variables - target only, no dependencies\n\t\tX.setTargetAndDependencies(RV_DEF_X, null);\n\t\tY.setTargetAndDependencies(RV_DEF_Y, null);\n\t\t\n\t\t// a LPM conditionally dependent on two variables\n\t\tZ.setTargetAndDependencies(RV_DEF_Z, Arrays.asList(X, Y));\n\n\t\t// a LPM conditionally dependent on several variables of the same type\n\t\tX3.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X1, X2));\n\n\t\t// a LPM conditionally dependent on itself (i.e. a state variable)\n\t\tX7.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X7));\n\n\t\n\t\t// the first has no dependencies just values\n\t\tX.setValue(\"x0\", 0.6);\n\t\tX.setValue(\"x1\", 0.1);\n\t\tX.setValue(\"x2\", 0.1);\n\n\t\t// the second has dependencies\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\n\t\t// the third has a recurrent dependency\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\t\n\t\t\n\t\t\n\t\t/* NOTE - should we enforce that a conditional probability should always be 'set' with requirement that the conditioning variables should all be identified ? */\n\t\t// this would be Z.setValue(\n\t//\tZ.setValue(Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")),\n\t//\t\t\tArrays.asList(\n\t//\t\t\t\t\t\"z0\", 0.5,\n\t//\t\t\t\t\t\"z1\", 0.3,\n\t//\t\t\t\t\t\"z2\", 0.7));\n\n\n\n\t\tString s = Z.toString();\n\t\tSystem.out.println(\"==============\\n\" + s);\n\n\t\tSystem.out.println(\"done\");\n\n\n\t}", "private void addVertexVisitConstraint(){\n\n for (int vertex=0; vertex < vertexCount; vertex++){\n Integer[] pos = new Integer[variables.length];\n for (int position =0; position < positionCount; position++){\n pos[position] = variables[position][vertex];\n }\n addExactlyOne(pos);\n }\n }", "R visitFreeVariable(Formula f, String name);", "@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "private void addC2Constraints(double[] alpha, GRBVar[][] xVars, GRBVar[][] yVars, GRBModel model)\n\t\t\tthrows GRBException {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString constraintName = \"constraintC2_\" + i;\n\t\t\t// out_x(i) + out_y(i) - in_y(i) = alpha_i\n\t\t\tGRBLinExpr constraintLinExpr = new GRBLinExpr();\n\n\t\t\t// Expression += out_x(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Expression += out_y(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, yVars, constraintLinExpr);\n\n\t\t\t// Expression -= in_y(i)\n\t\t\tGRBSolverUtils.addInTerm(i, -1, mExplicitMDP, yVars, constraintLinExpr);\n\n\t\t\t// Add constraint\n\t\t\tmodel.addConstr(constraintLinExpr, GRB.EQUAL, alpha[i], constraintName);\n\t\t}\n\t}", "Variable createVariable();", "Variable createVariable();", "public interface VariableIF extends VariableSimpleIF {\r\n public java.lang.String getFullName();\r\n public java.lang.String getFullNameEscaped();\r\n public java.lang.String getShortName();\r\n public void getNameAndDimensions(java.util.Formatter result, boolean useFullName, boolean strict);\r\n\r\n public boolean isUnlimited();\r\n public boolean isUnsigned();\r\n public ucar.ma2.DataType getDataType();\r\n public int getRank();\r\n public boolean isScalar();\r\n public long getSize();\r\n public int getElementSize();\r\n public int[] getShape();\r\n\r\n public java.util.List<Dimension> getDimensions();\r\n public ucar.nc2.Dimension getDimension(int index);\r\n public int findDimensionIndex(java.lang.String dimName);\r\n\r\n public java.util.List<Attribute> getAttributes();\r\n public ucar.nc2.Attribute findAttribute(java.lang.String attName);\r\n public ucar.nc2.Attribute findAttributeIgnoreCase(java.lang.String attName);\r\n\r\n public ucar.nc2.Group getParentGroup();\r\n public ucar.nc2.Variable section(java.util.List<Range> ranges) throws ucar.ma2.InvalidRangeException;\r\n public Section getShapeAsSection();\r\n public java.util.List<Range> getRanges();\r\n\r\n public ucar.ma2.Array read(int[] origin, int[] shape) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(java.lang.String rangeSpec) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(ucar.ma2.Section section) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read() throws java.io.IOException;\r\n\r\n public boolean isCoordinateVariable();\r\n public boolean isMemberOfStructure();\r\n public boolean isVariableLength();\r\n public boolean isMetadata();\r\n public ucar.nc2.Structure getParentStructure();\r\n\r\n public String getDescription();\r\n public String getUnitsString();\r\n\r\n // use only if isMemberOfStructure\r\n public java.util.List<Dimension> getDimensionsAll();\r\n\r\n // use only if isScalar()\r\n public byte readScalarByte() throws java.io.IOException;\r\n public short readScalarShort() throws java.io.IOException;\r\n public int readScalarInt() throws java.io.IOException;\r\n public long readScalarLong() throws java.io.IOException;\r\n public float readScalarFloat() throws java.io.IOException;\r\n public double readScalarDouble() throws java.io.IOException;\r\n public java.lang.String readScalarString() throws java.io.IOException;\r\n\r\n // debug\r\n public java.lang.String toStringDebug();\r\n}", "boolean isVariable(Formula f);", "private void addC1Constraints(GRBVar[][] xVars, GRBModel model) throws GRBException {\n\t\tint n = mExplicitMDP.getNumStates();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString constraintName = \"constraintC1_\" + i;\n\t\t\t// out_x(i) - in_x(i) = 0\n\t\t\tGRBLinExpr constraintLinExpr = new GRBLinExpr();\n\n\t\t\t// Expression += out_x(i)\n\t\t\tGRBSolverUtils.addOutTerm(i, 1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Expression -= in_x(i)\n\t\t\tGRBSolverUtils.addInTerm(i, -1, mExplicitMDP, xVars, constraintLinExpr);\n\n\t\t\t// Add constraint\n\t\t\tmodel.addConstr(constraintLinExpr, GRB.EQUAL, 0, constraintName);\n\t\t}\n\t}", "public static void model1() {\n try {\n IloCplex cplex = new IloCplex();\n \n //variables\n IloNumVar x = cplex.numVar(0, Double.MAX_VALUE, \"x\"); //x >= 0\n IloNumVar y = cplex.numVar(0, Double.MAX_VALUE, \"y\"); //y >= 0\n \n //expressions\n IloLinearNumExpr objective = cplex.linearNumExpr();\n objective.addTerm(0.12, x);\n objective.addTerm(0.15, y);\n \n //define objective\n cplex.addMinimize(objective);\n \n //define constraints\n cplex.addGe(cplex.sum(cplex.prod(60, x), cplex.prod(60, y)), 300);\n cplex.addGe(cplex.sum(cplex.prod(12, x), cplex.prod(6, y)), 36);\n cplex.addGe(cplex.sum(cplex.prod(10, x), cplex.prod(30, y)), 90);\n \n //solve\n if (cplex.solve()) {\n System.out.println(\"Obj = \" + cplex.getObjValue());\n System.out.println(\"Obj = \" + cplex.getValue(objective));\n System.out.println(\"x = \" + cplex.getValue(x));\n System.out.println(\"y = \" + cplex.getValue(y));\n } else {\n System.out.println(\"Solution not found.\");\n }\n } catch (IloException ex) {\n ex.printStackTrace();\n }\n }", "VarsDeclRule createVarsDeclRule();", "DynamicVariable createDynamicVariable();", "@Override\n public Constraint converConstrain(String classname, String parvarn1, String parvarn2, String parvarn3) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {\n IntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); IntVar varConverZ = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; varConverZ.id = parvarn3 ;\n Class<?> clasCon = Class.forName(classname);\n Constructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class, JaCoP.core.IntVar.class});\n Constraint c = (Constraint) constru2.newInstance(varConverX,varConverY, varConverZ);\n return c;\n }", "Variables createVariables();", "public boolean getVariableRequired() {\r\n return relaxed;\r\n }", "public void variableChanged(VariableAttribute var);", "@Override\n protected void doAlgorithmA1() {\n int xP = 0;\n int yP = 0;\n\n\n //Taking the variable out of the list that are in the bounds\n //Testing that the bound has variables\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n xP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX().getPosition();\n }\n int xU = 0;\n int xL = 0;\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n yP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY().getPosition();\n }\n int yU = 0;\n int yL = 0;\n int cright = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCright();\n int cleft = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCleft();\n\n\n\n for (Variable variable : csp.getVars()) {\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n if (variable.getPosition() == xP) {\n xU = variable.getUpperDomainBound();\n xL = variable.getLowerDomainBound();\n }\n }\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n if (variable.getPosition() == yP) {\n yU = variable.getUpperDomainBound();\n yL = variable.getLowerDomainBound();\n }\n }\n }\n\n boolean first = false;\n boolean second = false;\n\n //Testing if the bound is true, false or inconclusive\n\n if (xL + cleft >= yU + cright) {\n first = true;\n }\n if (xU + cleft < yL + cright) {\n second = true;\n }\n\n //are first and second not equal is the bound not inconclusive\n if (first != second) {\n if (first) { //a true Simple Bound was found\n //checks if it was the last constraint in a csp\n //If so the csp is true\n //else check the next constraint and do this method again\n if (csp.getSimpleConstraints().size() - 1 == cIndex) {\n System.out.println(\"P is satisfiable\");\n System.out.println(System.nanoTime()-startTime);\n return;\n } else {\n bIndex = 0;\n cIndex++;\n unit=false;\n doAlgorithmA1();\n }\n } else if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) { //a false Simple Bound was found\n //\n bIndex = 0;\n cIndex = 0;\n if (isInconclusive) {\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n doAlgorithmA2();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n } else {//an inconclusive Simple Bound was found\n //checks if the bound wasn't already inconclusive\n if(!isInconclusive){\n unit=true;\n unitSB = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex);\n }else {\n unit=false;\n }\n isInconclusive = true;\n\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) {\n cIndex = 0;\n bIndex = 0;\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n }\n }", "int realnVars();", "IntVar selectVariable(IntVar[] v) {\r\n\r\n if (v.length != 0) {\r\n int index = 0;\r\n int smallestDomain = Integer.MAX_VALUE;\r\n for(int i = 0; i< v.length-1; i++){\r\n if(v[i].domain.getSize()<smallestDomain){\r\n index = i;\r\n smallestDomain = v[i].domain.getSize();\r\n }\r\n\r\n }\r\n if(v[index].min() == v[index].max()){\r\n\r\n searchVariables = new IntVar[v.length-1];\r\n for (int i = 0; i < v.length-1; i++) {\r\n if(i<index){\r\n searchVariables[i] = v[i];\r\n }\r\n else searchVariables[i] = v[i+1];\r\n\r\n }\r\n }\r\n else{\r\n searchVariables = new IntVar[v.length];\r\n for(int i = 0; i < v.length; i++){\r\n searchVariables[i] = v[i];\r\n }\r\n }\r\n return v[index];\r\n\r\n }\r\n else {\r\n System.err.println(\"Zero length list of variables for labeling\");\r\n return new IntVar(store);\r\n }\r\n }", "protected void sequence_VariableCalcule(ISerializationContext context, VariableCalcule semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DslPackage.Literals.VARIABLE_CALCULE__EXPRESSION));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getVariableCalculeAccess().getExpressionExpressionParserRuleCall_3_0(), semanticObject.getExpression());\n\t\tfeeder.finish();\n\t}", "public IAspectVariable<V> createNewVariable(PartTarget target);", "public Variable getVariable(String name);", "public Element getPredicateVariable();", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "ParameterRefinement createParameterRefinement();", "private static <V extends Variable<A>, A extends Value> boolean INFER(SharedDomainVariableSet<V, A> variableSet, V variable) {\n\t\tList<Constraint<V>> constraints = variableSet.getConstraintsByVariable(variable);\n\t\t\n\t\tfor (Constraint<V> constraint : constraints) {\n\t\t\t// get all the variables that need to be set for this constraint\n\t\t\tQueue<V> variablesToSet = new LinkedList<>();\n\t\t\tfor (V v : constraint.getVariables()) {\n\t\t\t\tif (!v.isSet()) {\n\t\t\t\t\tvariablesToSet.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// try and find some combination of the unset variables to make the constraint valid\n\t\t\tif (!FIND_COMBINATION(variableSet, variablesToSet, constraint)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Override\n public VariableNonRequirement computeVariableNonRequirement(IQTree child) {\n return VariableNonRequirement.of(substitution.getDomain());\n }", "public ConstraintExt(ArrayList<String> var) {\n\t\tsuper(var);\n\t\tvalTuples = new HashSet<ArrayList<Object>>();\n\t}", "AliasVariable createAliasVariable();", "public PrimitiveConstraint getConstraint() {\r\n return new XlteqC(var, value);\r\n }", "public void testLPState()\n \t{\n \t\tsolver.buildLPState();\n \t\tassertTrue(solver.hasLPState());\n \t\t\n \t\tfinal int nLPVars = solver.getNumberOfLPVariables();\n \t\tassertTrue(nLPVars >= 0);\n \t\t\n \t\tfinal double[] objective = solver.getObjectiveFunction();\n \t\tassertEquals(nLPVars, objective.length);\n \t\t\n \t\tint nVarsUsed = 0;\n \t\t\n \t\tfor (VariableBase var : model.getVariables())\n \t\t{\n \t\t\tSVariable svar = solver.getSolverVariable(var);\n \t\t\tassertSame(svar, solver.createVariable(var));\n \t\t\t\n \t\t\tDiscrete mvar = svar.getModelObject();\n \t\t\tassertSame(var, mvar);\n \t\t\tassertSame(solver, svar.getParentGraph());\n \t\t\t\n \t\t\t// Test do-nothing methods\n \t\t\tsvar.resetEdgeMessages(0);\n \t\t\tsvar.updateEdge(0);\n \t\t\tsvar.moveMessages(null, 0, 1);\n \t\t\tassertNull(svar.getInputMsg(0));\n \t\t\tassertNull(svar.getOutputMsg(0));\n \t\t\tassertNull(svar.createMessages(null));\n \t\t\tassertNull(svar.resetInputMessage(null));\n \t\t\t\n \t\t\tint lpVar = svar.getLPVarIndex();\n \t\t\tint nValidAssignments = svar.getNumberOfValidAssignments();\n \t\t\t\n \t\t\tif (var.hasFixedValue())\n \t\t\t{\n \t\t\t\t// Currently the converse is not true because model variables\n \t\t\t\t// do not currently check to see if there is only one non-zero input weight.\n \t\t\t\tassertTrue(svar.hasFixedValue());\n \t\t\t}\n \t\t\tif (svar.hasFixedValue())\n \t\t\t{\n \t\t\t\tassertFalse(svar.hasLPVariable());\n \t\t\t}\n \t\t\tif (svar.hasLPVariable())\n \t\t\t{\n \t\t\t\tassertTrue(lpVar >= 0);\n \t\t\t\tassertTrue(nValidAssignments > 1);\n \t\t\t\t++nVarsUsed;\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tassertEquals(-1, lpVar);\n \t\t\t\tassertTrue(nValidAssignments <= 1);\n \t\t\t}\n \t\t\t\n \t\t\tdouble[] weights = mvar.getInput();\n \t\t\tdouble totalWeight = 0.0;\n \t\t\tfor (double w : weights)\n \t\t\t{\n \t\t\t\ttotalWeight += w;\n \t\t\t}\n \t\t\t\n \t\t\tfor (int i = 0, end = svar.getModelObject().getDomain().size(); i < end; ++i)\n \t\t\t{\n \t\t\t\tdouble w = mvar.getInput()[i];\n \t\t\t\tint lpVarForValue = svar.domainIndexToLPVar(i);\n \t\t\t\tint i2 = svar.lpVarToDomainIndex(lpVarForValue);\n \t\t\t\tif (lpVarForValue >= 0)\n \t\t\t\t{\n \t\t\t\t\tassertEquals(i, i2);\n\t\t\t\t\tassertEquals(Math.log(w), objective[lpVarForValue], 1e-6);\n \t\t\t\t}\n \t\t\t\tif (!svar.hasLPVariable() || mvar.getInput()[i] == 0.0)\n \t\t\t\t{\n \t\t\t\t\tassertEquals(-1, lpVarForValue);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor (Factor factor : model.getFactors())\n \t\t{\n \t\t\tSTableFactor sfactor = solver.getSolverFactor(factor);\n \t\t\tassertSame(sfactor, solver.createFactor(factor));\n \t\t\tassertSame(factor, sfactor.getModelObject());\n \t\t\tassertSame(solver, sfactor.getParentGraph());\n \t\t\t\n \t\t\t// Test do nothing methods\n \t\t\tsfactor.createMessages();\n \t\t\tsfactor.updateEdge(0);\n \t\t\tsfactor.resetEdgeMessages(0);\n \t\t\tsfactor.moveMessages(null, 0 , 1);\n \t\t\tassertNull(sfactor.getInputMsg(0));\n \t\t\tassertNull(sfactor.getOutputMsg(0));\n \t\t}\n \t\t\n \t\tfinal List<IntegerEquation> constraints = solver.getConstraints();\n \t\tassertNotNull(constraints);\n \n \t\tint nConstraints = solver.getNumberOfConstraints();\n \t\tint nVarConstraints = solver.getNumberOfVariableConstraints();\n \t\tint nMarginalConstraints = solver.getNumberOfMarginalConstraints();\n \t\tassertEquals(nConstraints, constraints.size());\n \t\tassertEquals(nConstraints, nVarConstraints + nMarginalConstraints);\n \t\tassertEquals(nVarsUsed, nVarConstraints);\n \t\t\n \t\t{\n \t\t\tMatlabConstraintTermIterator termIter = solver.getMatlabSparseConstraints();\n \t\t\tList<Integer> constraintTerms = new ArrayList<Integer>(termIter.size() * 3);\n \t\t\t\n \t\t\tIterator<IntegerEquation> constraintIter = constraints.iterator();\n \t\t\tfor (int row = 1; constraintIter.hasNext(); ++ row)\n \t\t\t{\n \t\t\t\tIntegerEquation constraint = constraintIter.next();\n \t\t\t\t\n \t\t\t\tint nExpectedTerms = -1;\n \t\t\t\tint lpVar = -1;\n \t\t\t\t\n \t\t\t\tif (row <= nVarConstraints)\n \t\t\t\t{\n \t\t\t\t\tLPVariableConstraint varConstraint = constraint.asVariableConstraint();\n \t\t\t\t\tassertNotNull(varConstraint);\n \t\t\t\t\tassertNull(constraint.asFactorConstraint());\n \t\t\t\t\t\n \t\t\t\t\tSVariable svar = varConstraint.getSolverVariable();\n \t\t\t\t\tassertTrue(svar.hasLPVariable());\n \t\t\t\t\t\n \t\t\t\t\tassertEquals(1, varConstraint.getRHS());\n \t\t\t\t\tnExpectedTerms = svar.getNumberOfValidAssignments();\n \t\t\t\t\t\n \t\t\t\t\tlpVar = svar.getLPVarIndex();\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tLPFactorMarginalConstraint factorConstraint = constraint.asFactorConstraint();\n \t\t\t\t\tassertNotNull(factorConstraint);\n \t\t\t\t\tassertNull(constraint.asVariableConstraint());\n \t\t\t\t\t\n \t\t\t\t\tSTableFactor sfactor = factorConstraint.getSolverFactor();\n \t\t\t\t\tlpVar = sfactor.getLPVarIndex();\n \t\t\t\t\t\n \t\t\t\t\tassertEquals(0, factorConstraint.getRHS());\n \t\t\t\t\tnExpectedTerms = sfactor.getNumberOfValidAssignments();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tint[] lpvars = constraint.getVariables();\n \t\t\t\tassertEquals(constraint.size(), lpvars.length);\n \t\t\t\tassertEquals(0, constraint.getCoefficient(-1));\n \t\t\t\tassertEquals(0, constraint.getCoefficient(lpVar + nExpectedTerms));\n \t\t\t\tassertFalse(constraint.hasCoefficient(-1));\n \t\t\t\t\n \t\t\t\tassertTrue(lpVar >= 0);\n \n \t\t\t\tIntegerEquation.TermIterator constraintTermIter = constraint.getTerms();\n \t\t\t\tfor (int i = 0; constraintTermIter.advance(); ++i)\n \t\t\t\t{\n \t\t\t\t\tassertEquals(lpvars[i], constraintTermIter.getVariable());\n \t\t\t\t\tassertEquals(constraintTermIter.getCoefficient(), constraint.getCoefficient(lpvars[i]));\n \t\t\t\t\tassertTrue(constraint.hasCoefficient(lpvars[i]));\n \t\t\t\t\tconstraintTerms.add(row);\n \t\t\t\t\tconstraintTerms.add(constraintTermIter.getVariable());\n \t\t\t\t\tconstraintTerms.add(constraintTermIter.getCoefficient());\n \t\t\t\t}\n \t\t\t\tassertFalse(constraintTermIter.advance());\n \t\t\t}\n \t\t\t\n \t\t\tfor (int i = 0; termIter.advance(); i += 3)\n \t\t\t{\n \t\t\t\tassertEquals((int)constraintTerms.get(i), termIter.getRow());\n \t\t\t\tassertEquals(constraintTerms.get(i+1) + 1, termIter.getVariable());\n \t\t\t\tassertEquals((int)constraintTerms.get(i+2), termIter.getCoefficient());\n \t\t\t}\n \t\t\tassertFalse(termIter.advance());\n \t\t}\n \t\t\n \t\t\n \t\tif (expectedConstraints != null)\n \t\t{\n \t\t\tIterator<IntegerEquation> constraintIter = constraints.iterator();\n \t\t\tassertEquals(expectedConstraints.length, solver.getNumberOfConstraints());\n \t\t\tfor (int i = 0, end = expectedConstraints.length; i < end; ++i)\n \t\t\t{\n \t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n \t\t\t\tIntegerEquation constraint = constraintIter.next();\n \t\t\t\tconstraint.print(new PrintStream(out));\n \t\t\t\tString actual = out.toString().trim();\n \n \t\t\t\tString expected = expectedConstraints[i].trim();\n \n \t\t\t\tif (!expected.equals(actual))\n \t\t\t\t{\n \t\t\t\t\tSystem.out.format(\"Constraint %d mismatch:\\n\", i);\n \t\t\t\t\tSystem.out.format(\"Expected: %s\\n\", expected);\n \t\t\t\t\tSystem.out.format(\" Actual: %s\\n\", actual);\n \t\t\t\t}\n \t\t\t\tassertEquals(expected, actual);\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Test setting solution. A real solution will only use ones and zeros,\n \t\t// but we will use random values to make sure they are assigned correctly.\n \t\tdouble[] solution = new double[nLPVars];\n \t\tRandom rand = new Random();\n \t\tfor (int i = solution.length; --i>=0;)\n \t\t{\n \t\t\tsolution[i] = rand.nextDouble();\n \t\t}\n \t\tsolver.setSolution(solution);\n \t\tfor (VariableBase var : model.getVariables())\n \t\t{\n \t\t\tSVariable svar = solver.getSolverVariable(var);\n \t\t\tdouble[] belief = svar.getBelief();\n \t\t\tif (svar.hasFixedValue())\n \t\t\t{\n \t\t\t\tint vali = svar.getValueIndex();\n \t\t\t\tfor (int i = belief.length; --i>=0;)\n \t\t\t\t{\n \t\t\t\t\tif (i == vali)\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(1.0, belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(0.0, belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tfor (int i = svar.getModelObject().getDomain().size(); --i>=0;)\n \t\t\t\t{\n \t\t\t\t\tint lpVar = svar.domainIndexToLPVar(i);\n \t\t\t\t\tif (lpVar < 0)\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(0, belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tassertEquals(solution[lpVar], belief[i], 1e-6);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\tsolver.clearLPState();\n \t\tassertInitialState();\n \t}", "public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}", "public Potential addVariable(Node var) {\n Vector v;\n PTreeCredalSet pot;\n \n v = new Vector();\n v.addElement(var);\n pot = (PTreeCredalSet)addVariable(v);\n return pot;\n }", "private SWRLVariable initalizeVariable(String name, SWRLVariable var1) {\n\n if (literalVocabulary.containsKey(name)) {\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n } else {\n char variable = this.generateVariable();\n literalVocabulary.put(name, String.valueOf(variable));\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + variable));\n }\n\n return var1;\n }", "@Override\n public void addEnviroment(String clasname, String parvarn1, Integer parvarn2, Integer unit) throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n InstantiationException, IllegalAccessException,\n InvocationTargetException {\n\n Constraint c = converConstrain(clasname,parvarn1,parvarn2);\n AmbientC varsConst = new AmbientC(); //Campo que implementa la clase AmbienC para transformar los constraint\n varsConst.addAmbientCon(parvarn1, parvarn2,unit,c); //\n super.getVarsEnviromen().add(varsConst);\n\n\n }", "String getTargetVariablePart();", "public interface DmxCorrelationVariable extends DNavigableMember\n{\n}", "public boolean label(IntVar[] vars) {\r\n\r\n\r\n //System.out.println(\"ct \" + vars.length);\r\n count++;\r\n if (trace) {\r\n for (int i = 0; i < vars.length; i++)\r\n System.out.print (vars[i] + \" \");\r\n System.out.println ();\r\n }\r\n\r\n ChoicePoint choice = null;\r\n boolean consistent;\r\n\r\n // Instead of imposing constraint just restrict bounds\r\n // -1 since costValue is the cost of last solution\r\n if (costVariable != null) {\r\n try {\r\n if (costVariable.min() <= costValue - 1)\r\n costVariable.domain.in(store.level, costVariable, costVariable.min(), costValue - 1);\r\n else\r\n return false;\r\n } catch (FailException f) {\r\n return false;\r\n }\r\n }\r\n\r\n consistent = store.consistency();\r\n\r\n if (!consistent) {\r\n // Failed leaf of the search tree\r\n return false;\r\n } else { // consistent\r\n\r\n if (vars.length == 0) {\r\n // solution found; no more variables to label\r\n\r\n // update cost if minimization\r\n if (costVariable != null)\r\n costValue = costVariable.min();\r\n\r\n reportSolution();\r\n\r\n return costVariable == null; // true is satisfiability search and false if minimization\r\n }\r\n\r\n choice = new ChoicePoint(vars);\r\n\r\n levelUp();\r\n\r\n store.impose(choice.getConstraint());\r\n\r\n // choice point imposed.\r\n\r\n consistent = label(choice.getSearchVariables());\r\n\r\n if (consistent) {\r\n levelDown();\r\n return true;\r\n } else {\r\n\r\n restoreLevel();\r\n store.impose(new Not(choice.getConstraint()));\r\n\r\n\r\n\r\n // negated choice point imposed.\r\n\r\n consistent = label(vars);\r\n\r\n levelDown();\r\n\r\n if (consistent) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n }", "public abstract void assign(ParameterVector pv) throws SolverException;", "public IExpressionValue getUserDefinedVariable(String key);", "public Variable(String name) {\n this.name = name;\n checkRep();\n }", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "Constraint createConstraint();", "Constraint createConstraint();", "private void createOriginalCSP (int[][] variables){\n\t\t\n\t\tnumberOfVariables = variables[0].length;\n\t\tchocoModel = new Model(\"OriginalCSP\");\n\t\tnumberOfProducts = variables.length;\n\t\tcreateNewVar(); // FIRST VAR is PRODUCT ID , varID = 0\n\t\t\n\t\tint varID =0;\n\t\t\n\t\tfor(int i=0;i<variables[0].length;i++){\n\t\t\tcreateNewVar(); // ADD FEATURE SET OF CAMERAS\n\t\t}\n\t\tallVarsAreCreated = true;\n\t\t\n\t\taddProductConstraints(variables);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic Constraint converConstrain(String classname, String parvarn1, String parvarn2) throws ClassNotFoundException,\n\t\t\tSecurityException, NoSuchMethodException, IllegalArgumentException,\n\t\t\tInstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException {\n\n\t\tIntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; \n\t\tClass<?> clasCon = Class.forName(classname);\n\t\tConstructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class});\n\t\tConstraint c = (Constraint) constru2.newInstance(varConverX,varConverY);\n\t\treturn c;\n\t}", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "public PotentialTree addVariable(Vector vars) {\n Vector aux;\n FiniteStates var1, var2;\n int i, j;\n boolean found;\n PTreeCredalSet pot;\n ProbabilityTree tree;\n \n aux = new Vector(); // New list of variables.\n for (i=0 ; i<variables.size() ; i++) {\n var1 = (FiniteStates)variables.elementAt(i);\n found = false;\n for (j=0 ; j<vars.size() ; j++) {\n var2 = (FiniteStates)vars.elementAt(j);\n if (var1 == var2) {\n found = true;\n break;\n }\n }\n if (!found)\n aux.addElement(var1);\n }\n pot = new PTreeCredalSet(aux); // The new tree.\n tree = values;\n for (i=0 ; i<vars.size() ; i++) {\n var1 = (FiniteStates)vars.elementAt(i);\n tree = tree.addVariable(var1);\n }\n pot.setTree(tree);\n return pot;\n }", "public StatisticVariable getStatisticVariable();", "public boolean LocalImprovementCAN (TableVar Variables, TableDat Examples) {\r\n\r\n Individual solucion = new IndCAN(Variables.getNVars());\r\n QualityMeasures res, new_res;\r\n int best, initialvalue, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n \r\n // Store the pos of the best guy\r\n best = poblac.getBestGuy();\r\n \r\n // Copy the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n solucion.setCromElem(i, this.poblac.getCromElem(best,i));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n res = solucion.getMedidas();\r\n control = 0;\r\n\r\n while (improvement) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n if (Variables.getType(i)=='e') {\r\n // Discrete Variable\r\n if (solucion.getCromElem(i)==(Variables.getMax(i)+1)){\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n } else {\r\n initialvalue = solucion.getCromElem(i);\r\n solucion.setCromElem(i, (int)Variables.getMax(i)+1);\t// Mark Doesn't take part\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; \r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n } else {\r\n evalua[i]=-1;\r\n }\r\n // Restore initial values\r\n solucion.setCromElem(i, initialvalue);\r\n }\r\n } else {\r\n // Continuous variable\r\n if (solucion.getCromElem(i)==(Variables.getNLabelVar(i))){\r\n // If variable does not take part\r\n evalua[i] = -1;\r\n } else {\r\n initialvalue = solucion.getCromElem(i);\r\n solucion.setCromElem(i, (int)Variables.getNLabelVar(i));\t// Mark does not take part\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; \r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n } else {\r\n evalua[i]=-1;\r\n }\r\n // Restore initial values\r\n solucion.setCromElem(i, initialvalue);\r\n }\r\n }\r\n }\r\n \r\n if (improvement) {\r\n // Sorts in ascendent order to minimise\r\n // \"evalua\" contents the support of each modification; seeking for the better\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n if (Variables.getType(cambio)=='e')\r\n solucion.setCromElem(cambio, (int)Variables.getMax(cambio)+1);\r\n else\r\n solucion.setCromElem(cambio, (int)Variables.getNLabelVar(cambio));\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n \r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n \r\n }\r\n } // End while\r\n\r\n for(int i=0; i<Variables.getNVars(); i++){\r\n if(solucion.getCromElem(i)==Variables.getNLabelVar(i))\r\n control++;\r\n }\r\n\r\n // Store the new rule if it was improved\r\n if ((retValue==true)&&(control!=Variables.getNVars())){\r\n\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n poblac.setCromElem(best, i, solucion.getCromElem(i));\r\n\r\n // Mark the rule as not evaluated\r\n poblac.setIndivEvaluated(best,false);\r\n }\r\n \r\n return retValue;\r\n\r\n }", "public Variable(final int id, final float coeff, final boolean basic, final boolean flag) {\n this.id = id;\n c = coeff;\n isBasic = basic;\n isSlack = flag && basic;\n isSurplus = flag && !basic;\n isArtificial = basic && !flag;\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}", "protected void doDeduction() {\n\n boolean narrowed= false;\n\n unit=false;\n isInconclusive=false;\n\n int newXL;\n int newYU;\n\n Variable x = null;\n Variable y = null;\n\n for(Variable var : csp.getVars()){\n if(var.getPosition() == unitSB.getX().getPosition()){\n x = var;\n } else if(var.getPosition() == unitSB.getY().getPosition()){\n y = var;\n }\n }\n\n int xU = x.getUpperDomainBound();\n int yL = y.getLowerDomainBound();\n\n newXL = yL + unitSB.getCright();\n newYU = xU - unitSB.getCright();\n\n if(newXL>x.getLowerDomainBound()){\n Variable newX = new Variable(newXL, xU);\n newX.setPosition(x.getPosition());\n changeVariable(newX);\n narrowed= true;\n }\n if (newYU< y.getUpperDomainBound()){\n Variable newY = new Variable(yL, newYU);\n newY.setPosition(y.getPosition());\n changeVariable(newY);\n narrowed =true;\n }\n\n if(narrowed){\n doAlgorithmA1();\n }else {\n doAlgorithmA3();\n }\n\n }", "private void applyConstraints(android.support.constraint.solver.LinearSystem r31, boolean r32, android.support.constraint.solver.SolverVariable r33, android.support.constraint.solver.SolverVariable r34, android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour r35, boolean r36, android.support.constraint.solver.widgets.ConstraintAnchor r37, android.support.constraint.solver.widgets.ConstraintAnchor r38, int r39, int r40, int r41, int r42, float r43, boolean r44, boolean r45, int r46, int r47, int r48, float r49, boolean r50) {\n /*\n r30 = this;\n r0 = r30;\n r10 = r31;\n r11 = r33;\n r12 = r34;\n r13 = r37;\n r14 = r38;\n r1 = r41;\n r2 = r42;\n r9 = r10.createObjectVariable(r13);\n r8 = r10.createObjectVariable(r14);\n r6 = r37.getTarget();\n r7 = r10.createObjectVariable(r6);\n r6 = r38.getTarget();\n r6 = r10.createObjectVariable(r6);\n r14 = r10.graphOptimizer;\n r15 = 1;\n if (r14 == 0) goto L_0x0066;\n L_0x002e:\n r14 = r37.getResolutionNode();\n r14 = r14.state;\n r13 = 1;\n if (r14 != r13) goto L_0x0066;\n L_0x0037:\n r14 = r38.getResolutionNode();\n r14 = r14.state;\n if (r14 != r13) goto L_0x0066;\n L_0x003f:\n r1 = android.support.constraint.solver.LinearSystem.getMetrics();\n if (r1 == 0) goto L_0x004e;\n L_0x0045:\n r1 = android.support.constraint.solver.LinearSystem.getMetrics();\n r2 = r1.resolvedWidgets;\n r2 = r2 + r15;\n r1.resolvedWidgets = r2;\n L_0x004e:\n r1 = r37.getResolutionNode();\n r1.addResolvedValue(r10);\n r1 = r38.getResolutionNode();\n r1.addResolvedValue(r10);\n if (r45 != 0) goto L_0x0065;\n L_0x005e:\n if (r32 == 0) goto L_0x0065;\n L_0x0060:\n r1 = 0;\n r2 = 6;\n r10.addGreaterThan(r12, r8, r1, r2);\n L_0x0065:\n return;\n L_0x0066:\n r13 = android.support.constraint.solver.LinearSystem.getMetrics();\n if (r13 == 0) goto L_0x0075;\n L_0x006c:\n r13 = android.support.constraint.solver.LinearSystem.getMetrics();\n r11 = r13.nonresolvedWidgets;\n r11 = r11 + r15;\n r13.nonresolvedWidgets = r11;\n L_0x0075:\n r11 = r37.isConnected();\n r12 = r38.isConnected();\n r13 = r0.mCenter;\n r13 = r13.isConnected();\n if (r11 == 0) goto L_0x0087;\n L_0x0085:\n r14 = 1;\n goto L_0x0088;\n L_0x0087:\n r14 = 0;\n L_0x0088:\n if (r12 == 0) goto L_0x008c;\n L_0x008a:\n r14 = r14 + 1;\n L_0x008c:\n if (r13 == 0) goto L_0x0090;\n L_0x008e:\n r14 = r14 + 1;\n L_0x0090:\n r21 = r6;\n if (r44 == 0) goto L_0x0096;\n L_0x0094:\n r6 = 3;\n goto L_0x0098;\n L_0x0096:\n r6 = r46;\n L_0x0098:\n r15 = android.support.constraint.solver.widgets.ConstraintWidget.AnonymousClass1.$SwitchMap$android$support$constraint$solver$widgets$ConstraintWidget$DimensionBehaviour;\n r16 = r35.ordinal();\n r15 = r15[r16];\n r3 = 4;\n switch(r15) {\n case 1: goto L_0x00a4;\n case 2: goto L_0x00a4;\n case 3: goto L_0x00a4;\n case 4: goto L_0x00a6;\n default: goto L_0x00a4;\n };\n L_0x00a4:\n r15 = 0;\n goto L_0x00aa;\n L_0x00a6:\n if (r6 != r3) goto L_0x00a9;\n L_0x00a8:\n goto L_0x00a4;\n L_0x00a9:\n r15 = 1;\n L_0x00aa:\n r3 = r0.mVisibility;\n r22 = r14;\n r14 = 8;\n if (r3 != r14) goto L_0x00b5;\n L_0x00b2:\n r3 = 0;\n r15 = 0;\n goto L_0x00b7;\n L_0x00b5:\n r3 = r40;\n L_0x00b7:\n if (r50 == 0) goto L_0x00d4;\n L_0x00b9:\n if (r11 != 0) goto L_0x00c5;\n L_0x00bb:\n if (r12 != 0) goto L_0x00c5;\n L_0x00bd:\n if (r13 != 0) goto L_0x00c5;\n L_0x00bf:\n r14 = r39;\n r10.addEquality(r9, r14);\n goto L_0x00d4;\n L_0x00c5:\n if (r11 == 0) goto L_0x00d4;\n L_0x00c7:\n if (r12 != 0) goto L_0x00d4;\n L_0x00c9:\n r14 = r37.getMargin();\n r23 = r13;\n r13 = 6;\n r10.addEquality(r9, r7, r14, r13);\n goto L_0x00d7;\n L_0x00d4:\n r23 = r13;\n r13 = 6;\n L_0x00d7:\n if (r15 != 0) goto L_0x0100;\n L_0x00d9:\n if (r36 == 0) goto L_0x00f1;\n L_0x00db:\n r13 = 3;\n r14 = 0;\n r10.addEquality(r8, r9, r14, r13);\n if (r1 <= 0) goto L_0x00e7;\n L_0x00e2:\n r13 = 6;\n r10.addGreaterThan(r8, r9, r1, r13);\n goto L_0x00e8;\n L_0x00e7:\n r13 = 6;\n L_0x00e8:\n r3 = 2147483647; // 0x7fffffff float:NaN double:1.060997895E-314;\n if (r2 >= r3) goto L_0x00f4;\n L_0x00ed:\n r10.addLowerThan(r8, r9, r2, r13);\n goto L_0x00f4;\n L_0x00f1:\n r10.addEquality(r8, r9, r3, r13);\n L_0x00f4:\n r27 = r47;\n r14 = r48;\n r24 = r7;\n L_0x00fa:\n r2 = r22;\n L_0x00fc:\n r16 = 4;\n goto L_0x01cc;\n L_0x0100:\n r2 = -2;\n r14 = r47;\n if (r14 != r2) goto L_0x0109;\n L_0x0105:\n r14 = r48;\n r13 = r3;\n goto L_0x010c;\n L_0x0109:\n r13 = r14;\n r14 = r48;\n L_0x010c:\n if (r14 != r2) goto L_0x010f;\n L_0x010e:\n r14 = r3;\n L_0x010f:\n if (r13 <= 0) goto L_0x011a;\n L_0x0111:\n r2 = 6;\n r10.addGreaterThan(r8, r9, r13, r2);\n r3 = java.lang.Math.max(r3, r13);\n goto L_0x011b;\n L_0x011a:\n r2 = 6;\n L_0x011b:\n if (r14 <= 0) goto L_0x0124;\n L_0x011d:\n r10.addLowerThan(r8, r9, r14, r2);\n r3 = java.lang.Math.min(r3, r14);\n L_0x0124:\n r2 = 1;\n if (r6 != r2) goto L_0x013c;\n L_0x0127:\n if (r32 == 0) goto L_0x012f;\n L_0x0129:\n r2 = 6;\n r10.addEquality(r8, r9, r3, r2);\n goto L_0x01a2;\n L_0x012f:\n if (r45 == 0) goto L_0x0137;\n L_0x0131:\n r2 = 4;\n r10.addEquality(r8, r9, r3, r2);\n goto L_0x01a2;\n L_0x0137:\n r2 = 1;\n r10.addEquality(r8, r9, r3, r2);\n goto L_0x01a2;\n L_0x013c:\n r2 = 2;\n if (r6 != r2) goto L_0x01a2;\n L_0x013f:\n r2 = r37.getType();\n r24 = r7;\n r7 = android.support.constraint.solver.widgets.ConstraintAnchor.Type.TOP;\n if (r2 == r7) goto L_0x0171;\n L_0x0149:\n r2 = r37.getType();\n r7 = android.support.constraint.solver.widgets.ConstraintAnchor.Type.BOTTOM;\n if (r2 != r7) goto L_0x0152;\n L_0x0151:\n goto L_0x0171;\n L_0x0152:\n r2 = r0.mParent;\n r7 = android.support.constraint.solver.widgets.ConstraintAnchor.Type.LEFT;\n r2 = r2.getAnchor(r7);\n r2 = r10.createObjectVariable(r2);\n r7 = r0.mParent;\n r25 = r2;\n r2 = android.support.constraint.solver.widgets.ConstraintAnchor.Type.RIGHT;\n r2 = r7.getAnchor(r2);\n r2 = r10.createObjectVariable(r2);\n r18 = r2;\n r19 = r25;\n goto L_0x018f;\n L_0x0171:\n r2 = r0.mParent;\n r7 = android.support.constraint.solver.widgets.ConstraintAnchor.Type.TOP;\n r2 = r2.getAnchor(r7);\n r2 = r10.createObjectVariable(r2);\n r7 = r0.mParent;\n r26 = r2;\n r2 = android.support.constraint.solver.widgets.ConstraintAnchor.Type.BOTTOM;\n r2 = r7.getAnchor(r2);\n r2 = r10.createObjectVariable(r2);\n r18 = r2;\n r19 = r26;\n L_0x018f:\n r15 = r31.createRow();\n r16 = r8;\n r17 = r9;\n r20 = r49;\n r2 = r15.createRowDimensionRatio(r16, r17, r18, r19, r20);\n r10.addConstraint(r2);\n r15 = 0;\n goto L_0x01a4;\n L_0x01a2:\n r24 = r7;\n L_0x01a4:\n if (r15 == 0) goto L_0x01c8;\n L_0x01a6:\n r2 = r22;\n r7 = 2;\n if (r2 == r7) goto L_0x01c4;\n L_0x01ab:\n r16 = 4;\n if (r44 != 0) goto L_0x01c1;\n L_0x01af:\n r3 = java.lang.Math.max(r13, r3);\n if (r14 <= 0) goto L_0x01b9;\n L_0x01b5:\n r3 = java.lang.Math.min(r14, r3);\n L_0x01b9:\n r27 = r13;\n r13 = 6;\n r10.addEquality(r8, r9, r3, r13);\n r15 = 0;\n goto L_0x01cc;\n L_0x01c1:\n r27 = r13;\n goto L_0x01cc;\n L_0x01c4:\n r27 = r13;\n goto L_0x00fc;\n L_0x01c8:\n r27 = r13;\n goto L_0x00fa;\n L_0x01cc:\n if (r50 == 0) goto L_0x0313;\n L_0x01ce:\n if (r45 == 0) goto L_0x01db;\n L_0x01d0:\n r0 = r8;\n r5 = r9;\n r1 = 0;\n r3 = 6;\n r4 = r34;\n r6 = 2;\n r11 = r33;\n goto L_0x031c;\n L_0x01db:\n r13 = 5;\n if (r11 != 0) goto L_0x01f2;\n L_0x01de:\n if (r12 != 0) goto L_0x01f2;\n L_0x01e0:\n if (r23 != 0) goto L_0x01f2;\n L_0x01e2:\n if (r32 == 0) goto L_0x01eb;\n L_0x01e4:\n r2 = 0;\n r5 = r34;\n r10.addGreaterThan(r5, r8, r2, r13);\n goto L_0x01ed;\n L_0x01eb:\n r5 = r34;\n L_0x01ed:\n r0 = r8;\n L_0x01ee:\n r1 = 0;\n r3 = 6;\n goto L_0x030b;\n L_0x01f2:\n r2 = 0;\n r5 = r34;\n if (r11 == 0) goto L_0x01ff;\n L_0x01f7:\n if (r12 != 0) goto L_0x01ff;\n L_0x01f9:\n if (r32 == 0) goto L_0x01ed;\n L_0x01fb:\n r10.addGreaterThan(r5, r8, r2, r13);\n goto L_0x01ed;\n L_0x01ff:\n if (r11 != 0) goto L_0x0216;\n L_0x0201:\n if (r12 == 0) goto L_0x0216;\n L_0x0203:\n r1 = r38.getMargin();\n r1 = -r1;\n r4 = r21;\n r3 = 6;\n r10.addEquality(r8, r4, r1, r3);\n if (r32 == 0) goto L_0x01ed;\n L_0x0210:\n r3 = r33;\n r10.addGreaterThan(r9, r3, r2, r13);\n goto L_0x01ed;\n L_0x0216:\n r4 = r21;\n r3 = r33;\n if (r11 == 0) goto L_0x01ed;\n L_0x021c:\n if (r12 == 0) goto L_0x01ed;\n L_0x021e:\n if (r15 == 0) goto L_0x027f;\n L_0x0220:\n if (r32 == 0) goto L_0x0228;\n L_0x0222:\n if (r1 != 0) goto L_0x0228;\n L_0x0224:\n r1 = 6;\n r10.addGreaterThan(r8, r9, r2, r1);\n L_0x0228:\n if (r6 != 0) goto L_0x0252;\n L_0x022a:\n if (r14 > 0) goto L_0x0232;\n L_0x022c:\n if (r27 <= 0) goto L_0x022f;\n L_0x022e:\n goto L_0x0232;\n L_0x022f:\n r1 = 6;\n r2 = 0;\n goto L_0x0234;\n L_0x0232:\n r1 = 4;\n r2 = 1;\n L_0x0234:\n r6 = r37.getMargin();\n r11 = r24;\n r10.addEquality(r9, r11, r6, r1);\n r6 = r38.getMargin();\n r6 = -r6;\n r10.addEquality(r8, r4, r6, r1);\n if (r14 > 0) goto L_0x024c;\n L_0x0247:\n if (r27 <= 0) goto L_0x024a;\n L_0x0249:\n goto L_0x024c;\n L_0x024a:\n r1 = 0;\n goto L_0x024d;\n L_0x024c:\n r1 = 1;\n L_0x024d:\n r16 = r2;\n r12 = 1;\n r14 = 5;\n goto L_0x0286;\n L_0x0252:\n r11 = r24;\n r12 = 1;\n if (r6 != r12) goto L_0x025c;\n L_0x0257:\n r1 = 1;\n r14 = 6;\n L_0x0259:\n r16 = 1;\n goto L_0x0286;\n L_0x025c:\n r1 = 3;\n if (r6 != r1) goto L_0x027d;\n L_0x025f:\n if (r44 != 0) goto L_0x026a;\n L_0x0261:\n r1 = r0.mResolvedDimensionRatioSide;\n r2 = -1;\n if (r1 == r2) goto L_0x026a;\n L_0x0266:\n if (r14 > 0) goto L_0x026a;\n L_0x0268:\n r1 = 6;\n goto L_0x026b;\n L_0x026a:\n r1 = 4;\n L_0x026b:\n r2 = r37.getMargin();\n r10.addEquality(r9, r11, r2, r1);\n r2 = r38.getMargin();\n r2 = -r2;\n r10.addEquality(r8, r4, r2, r1);\n r1 = 1;\n r14 = 5;\n goto L_0x0259;\n L_0x027d:\n r1 = 0;\n goto L_0x0283;\n L_0x027f:\n r11 = r24;\n r12 = 1;\n r1 = 1;\n L_0x0283:\n r14 = 5;\n r16 = 0;\n L_0x0286:\n if (r1 == 0) goto L_0x02cf;\n L_0x0288:\n r6 = r37.getMargin();\n r17 = r38.getMargin();\n r1 = r31;\n r2 = r9;\n r7 = r3;\n r3 = r11;\n r18 = r4;\n r4 = r6;\n r6 = r5;\n r5 = r43;\n r12 = r6;\n r28 = r18;\n r6 = r28;\n r13 = r11;\n r11 = r7;\n r7 = r8;\n r0 = r8;\n r8 = r17;\n r12 = r9;\n r9 = r14;\n r1.addCentering(r2, r3, r4, r5, r6, r7, r8, r9);\n r1 = r37;\n r2 = 1;\n r3 = r1.mTarget;\n r3 = r3.mOwner;\n r3 = r3 instanceof android.support.constraint.solver.widgets.Barrier;\n r4 = r38;\n r5 = r4.mTarget;\n r5 = r5.mOwner;\n r5 = r5 instanceof android.support.constraint.solver.widgets.Barrier;\n if (r3 == 0) goto L_0x02c5;\n L_0x02be:\n if (r5 != 0) goto L_0x02c5;\n L_0x02c0:\n r2 = r32;\n r3 = 1;\n r5 = 6;\n goto L_0x02dd;\n L_0x02c5:\n if (r3 != 0) goto L_0x02d9;\n L_0x02c7:\n if (r5 == 0) goto L_0x02d9;\n L_0x02c9:\n r3 = r32;\n r5 = 5;\n r29 = 6;\n goto L_0x02df;\n L_0x02cf:\n r28 = r4;\n r0 = r8;\n r12 = r9;\n r13 = r11;\n r1 = r37;\n r4 = r38;\n r11 = r3;\n L_0x02d9:\n r2 = r32;\n r3 = r2;\n r5 = 5;\n L_0x02dd:\n r29 = 5;\n L_0x02df:\n if (r16 == 0) goto L_0x02e4;\n L_0x02e1:\n r5 = 6;\n r6 = 6;\n goto L_0x02e7;\n L_0x02e4:\n r6 = r5;\n r5 = r29;\n L_0x02e7:\n if (r15 != 0) goto L_0x02eb;\n L_0x02e9:\n if (r2 != 0) goto L_0x02ed;\n L_0x02eb:\n if (r16 == 0) goto L_0x02f4;\n L_0x02ed:\n r1 = r37.getMargin();\n r10.addGreaterThan(r12, r13, r1, r5);\n L_0x02f4:\n if (r15 != 0) goto L_0x02f8;\n L_0x02f6:\n if (r3 != 0) goto L_0x02fa;\n L_0x02f8:\n if (r16 == 0) goto L_0x0304;\n L_0x02fa:\n r1 = r38.getMargin();\n r1 = -r1;\n r2 = r28;\n r10.addLowerThan(r0, r2, r1, r6);\n L_0x0304:\n if (r32 == 0) goto L_0x01ee;\n L_0x0306:\n r1 = 0;\n r3 = 6;\n r10.addGreaterThan(r12, r11, r1, r3);\n L_0x030b:\n if (r32 == 0) goto L_0x0312;\n L_0x030d:\n r4 = r34;\n r10.addGreaterThan(r4, r0, r1, r3);\n L_0x0312:\n return;\n L_0x0313:\n r0 = r8;\n r5 = r9;\n r1 = 0;\n r3 = 6;\n r4 = r34;\n r11 = r33;\n r6 = 2;\n L_0x031c:\n if (r2 >= r6) goto L_0x0326;\n L_0x031e:\n if (r32 == 0) goto L_0x0326;\n L_0x0320:\n r10.addGreaterThan(r5, r11, r1, r3);\n r10.addGreaterThan(r4, r0, r1, r3);\n L_0x0326:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.solver.widgets.ConstraintWidget.applyConstraints(android.support.constraint.solver.LinearSystem, boolean, android.support.constraint.solver.SolverVariable, android.support.constraint.solver.SolverVariable, android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour, boolean, android.support.constraint.solver.widgets.ConstraintAnchor, android.support.constraint.solver.widgets.ConstraintAnchor, int, int, int, int, float, boolean, boolean, int, int, int, float, boolean):void\");\n }", "VarAssignment createVarAssignment();", "R visitBoundVariable(Formula f, int deBruijnIdx);", "public void leerVariable(String nombre, Dato variable);", "@Override\n public CodeFragment visitVarDecStat(AlangParser.VarDecStatContext ctx) {\n String name = ctx.ID().getText();\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n\n String reg = this.generateNewRegister(true);\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n\n int arity = ctx.index_to_global_array().size();\n v.setArity(arity);\n if (arity > 0) {\n v.setGlobalArray();\n }\n\n for (int i = 0; i < arity; i++) {\n v.addLevel(Integer.valueOf(ctx.index_to_global_array(i).INT().getText()));\n }\n\n this.globals.put(name, v);\n\n return new CodeFragment(\"\");\n }", "public ProbNet parametricLearning() \n throws NormalizeNullVectorException{\n int[][] cases = caseDatabase.getCases ();\n TablePotential absoluteFrequencies;\n \n for (ProbNode node : probNet.getProbNodes()) {\n if(!node.getPotentials ().isEmpty ())\n {\n probNet.removePotential (node.getPotentials ().get (0));\n }\n absoluteFrequencies = calculateAbsoluteFrequencies(probNet, cases, node);\n for (int j = 0; j < absoluteFrequencies.getTableSize(); j++)\n absoluteFrequencies.values[j] += alpha;\n probNet.addPotential (DiscretePotentialOperations.normalize(absoluteFrequencies));\n }\n \n return probNet;\n }", "public boolean LocalImprovementDNF (TableVar Variables, TableDat Examples) {\r\n IndDNF solucion = new IndDNF(Variables.getNVars(), Variables);\r\n QualityMeasures res, new_res;\r\n int mejor, cambio;\r\n int[] indices = new int[Variables.getNVars()];\r\n float[] evalua = new float[Variables.getNVars()];\r\n boolean improvement = true;\r\n boolean retValue = false;\r\n int control;\r\n\r\n // Store the pos of the best guy in \"mejor\"\r\n mejor = poblac.getBestGuy();\r\n\r\n // Copy in \"solucion\" the rule to improve\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n solucion.setCromElemGene(i, j, poblac.getCromElemGene(mejor,i,j));\r\n\r\n // Evaluate de rule and get the measures\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++; // Increment the number of trials\r\n res = solucion.getMedidas();\r\n\r\n control = 1;\r\n\r\n while ((improvement)&&(control<Variables.getNVars())) {\r\n improvement = false; // By now, there is no improvement\r\n for (int i=0; i<Variables.getNVars(); i++) {\r\n indices[i]=i;\r\n // It does not matter if the variable is discrete or continuous\r\n if (solucion.getCromElemGene(i,Variables.getNLabelVar(i))==0)\r\n // If variable does not actually takes part in the rule\r\n evalua[i] = -1;\r\n else {\r\n // The initial value is not stored cause we know the value is 1\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i),0);\r\n solucion.evalInd(this, Variables, Examples, false);\r\n Trials++;\r\n new_res = solucion.getMedidas();\r\n\r\n if ((new_res.getCnf() >= res.getCnf())&&(new_res.getSup() >= res.getSup())) {\r\n evalua[i] = new_res.getSup();\r\n improvement = true;\r\n }\r\n else\r\n evalua[i]=-1;\r\n // Restore initial values of \"solucion\"\r\n solucion.setCromElemGene(i, Variables.getNLabelVar(i), 1);\r\n }\r\n }\r\n\r\n if (improvement) {\r\n Utils.OrCrecIndex (evalua,0,Variables.getNVars()-1,indices);\r\n cambio = indices[Variables.getNVars()-1];\r\n for (int j=0; j<=Variables.getNLabelVar(cambio); j++)\r\n solucion.setCromElemGene(cambio, j, 0);\r\n\r\n res.setSup(evalua[Variables.getNVars()-1]);\r\n // Important: take into account not to eliminate all the variables of the rule\r\n\r\n // If there is improvement, set return value to true\r\n retValue = true;\r\n control++;\r\n\r\n }\r\n } // End while \"improvement\"\r\n\r\n // Store the new rule if it was improved\r\n if (retValue==true){\r\n for (int i=0; i<Variables.getNVars(); i++)\r\n for (int j=0; j<=Variables.getNLabelVar(i); j++)\r\n poblac.setCromElemGene(mejor, i, j, solucion.getCromElemGene(i,j));\r\n poblac.setIndivEvaluated(mejor,false);\r\n }\r\n\r\n return retValue;\r\n\r\n }", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "VariableRef createVariableRef();", "Node getVariable();", "public IVariable getVariable(int index) {\n return null;\n }", "private void instantiateVarsSingle(IntVar var, int coeff, int constant, Propagator prop) throws ContradictionException {\n var.instantiateTo(zpz.getSmallestGreaterEqThan(var.getLB(), zpz.div(constant, coeff)), prop);\n }", "public Variable[] getParameters();", "public final EObject ruleVariables() throws RecognitionException {\n EObject current = null;\n\n EObject lv_predictives_0_0 = null;\n\n EObject lv_targets_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMLRegression.g:464:2: ( ( ( (lv_predictives_0_0= rulePredictiveVars ) ) ( (lv_targets_1_0= ruleTargetVars ) ) ) )\n // InternalMLRegression.g:465:2: ( ( (lv_predictives_0_0= rulePredictiveVars ) ) ( (lv_targets_1_0= ruleTargetVars ) ) )\n {\n // InternalMLRegression.g:465:2: ( ( (lv_predictives_0_0= rulePredictiveVars ) ) ( (lv_targets_1_0= ruleTargetVars ) ) )\n // InternalMLRegression.g:466:3: ( (lv_predictives_0_0= rulePredictiveVars ) ) ( (lv_targets_1_0= ruleTargetVars ) )\n {\n // InternalMLRegression.g:466:3: ( (lv_predictives_0_0= rulePredictiveVars ) )\n // InternalMLRegression.g:467:4: (lv_predictives_0_0= rulePredictiveVars )\n {\n // InternalMLRegression.g:467:4: (lv_predictives_0_0= rulePredictiveVars )\n // InternalMLRegression.g:468:5: lv_predictives_0_0= rulePredictiveVars\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getVariablesAccess().getPredictivesPredictiveVarsParserRuleCall_0_0());\n \t\t\t\t\n pushFollow(FOLLOW_13);\n lv_predictives_0_0=rulePredictiveVars();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getVariablesRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"predictives\",\n \t\t\t\t\t\tlv_predictives_0_0,\n \t\t\t\t\t\t\"m2.idm.project.MLRegression.PredictiveVars\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n // InternalMLRegression.g:485:3: ( (lv_targets_1_0= ruleTargetVars ) )\n // InternalMLRegression.g:486:4: (lv_targets_1_0= ruleTargetVars )\n {\n // InternalMLRegression.g:486:4: (lv_targets_1_0= ruleTargetVars )\n // InternalMLRegression.g:487:5: lv_targets_1_0= ruleTargetVars\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getVariablesAccess().getTargetsTargetVarsParserRuleCall_1_0());\n \t\t\t\t\n pushFollow(FOLLOW_2);\n lv_targets_1_0=ruleTargetVars();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getVariablesRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"targets\",\n \t\t\t\t\t\tlv_targets_1_0,\n \t\t\t\t\t\t\"m2.idm.project.MLRegression.TargetVars\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\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 }", "VarReference createVarReference();", "public StructuredQName getVariableQName();", "public Object caseVariabilityElement(VariabilityElement object) {\n\t\treturn null;\n\t}", "public boolean hasObjective(){ return this.hasParameter(1); }", "public void mo1327d(ac acVar) {\n }", "@Override\n public Boolean visitVariableAttribution(FormScriptGrammarParser.VariableAttributionContext ctx) {\n if (!declaredVariables.containsKey(ctx.VARIABLE().getText())) {\n // this is validated in UI/controlled by flow in the UI so should never happen, but it remains here just in case\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \": variable \" + ctx.VARIABLE().getText() + \" wasn't declared!\");\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n DataType dataType = declaredVariables.get(ctx.VARIABLE().getText());\n boolean correctType = dataType.lexerValue().equals(ctx.value().start.getType());\n /*will verify if the attribution is actually semantically valid, e.g if\n the variable was defined as an INTEGER, it can't be assigned a DATE*/\n if (!correctType) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid attribution type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be assigned the value \" + ctx.value().getText());\n// return false; //if we wanted to return the NOTOK/false result recursively, this would be here instead of the throw\n }\n //verify if operators are valid in the context of the datatype\n String operator = ctx.COMPARISON_OPERATORS().getText();\n if (operator.equals(\"<\") || operator.equals(\">\")) {\n if (dataType.equals(DataType.BOOLEAN) || dataType.equals(DataType.DATE) || dataType.equals(DataType.FILE)) {\n throw new IllegalArgumentException(\"Semantic error at line: \" + ctx.getStart().getLine() + \":\" + ctx.getStart().getCharPositionInLine()\n + \": Invalid comparison type!\" + \" variable \" + ctx.VARIABLE().getText() + \" can't be compared with operator '\" + operator + \"'\");\n }\n }\n return true;\n }", "public abstract int getBindingVariable();", "VariableDeclarationWithInitCS getResultVariable();", "public final void ruleVariable() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:166:2: ( ( ( rule__Variable__Alternatives ) ) )\n // InternalBrowser.g:167:2: ( ( rule__Variable__Alternatives ) )\n {\n // InternalBrowser.g:167:2: ( ( rule__Variable__Alternatives ) )\n // InternalBrowser.g:168:3: ( rule__Variable__Alternatives )\n {\n before(grammarAccess.getVariableAccess().getAlternatives()); \n // InternalBrowser.g:169:3: ( rule__Variable__Alternatives )\n // InternalBrowser.g:169:4: rule__Variable__Alternatives\n {\n pushFollow(FOLLOW_2);\n rule__Variable__Alternatives();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getVariableAccess().getAlternatives()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public List<IntegerVariable> getObjectiveVariables() {\n return objectiveVariables;\n }", "void mo54413a(int i, C20254v vVar);", "private Submodel fixUniqueVars()\n {\n Submodel model = new Submodel();\n model.setInvariant(true);\n\n _fixUniqueVars_Helper(model);\n \n return model;\n }" ]
[ "0.627156", "0.5902311", "0.5790709", "0.5771318", "0.5588081", "0.5566375", "0.5558901", "0.55344856", "0.55295634", "0.5499593", "0.549774", "0.54710734", "0.54465586", "0.53784317", "0.53441864", "0.53165895", "0.52982116", "0.5271787", "0.52688307", "0.52678084", "0.5259354", "0.52554214", "0.52498406", "0.52428603", "0.52428603", "0.52258193", "0.52102846", "0.51813334", "0.51543486", "0.5141859", "0.5125842", "0.5121102", "0.51121277", "0.5111157", "0.5109867", "0.5100382", "0.5097072", "0.50806135", "0.5077652", "0.5074976", "0.5061654", "0.5040915", "0.50157917", "0.50123024", "0.4963387", "0.4959323", "0.4952", "0.49500114", "0.49467742", "0.49390927", "0.49388558", "0.49267438", "0.49057996", "0.4900663", "0.49003032", "0.4897404", "0.48951432", "0.48932847", "0.48792943", "0.48774412", "0.4873931", "0.48729363", "0.4871651", "0.48589724", "0.48589724", "0.48493356", "0.4845666", "0.4843471", "0.4840808", "0.48384494", "0.48369294", "0.48306257", "0.48250064", "0.48234558", "0.482221", "0.48216787", "0.48189268", "0.48167652", "0.4811976", "0.48069575", "0.479375", "0.47900942", "0.47888723", "0.47727263", "0.47724128", "0.47646284", "0.47640556", "0.4755638", "0.47527948", "0.47481084", "0.47457072", "0.47339934", "0.47263622", "0.47243798", "0.47109434", "0.470752", "0.47025326", "0.47012216", "0.4701192", "0.46979344" ]
0.49874833
44
Create a FileStoreOutputStream from a string URL.
public FileStoreInputStream(String string) throws MalformedURLException { this( new URL( string ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FileStoreInputStream(URL url)\n\t\t{\n\t\tif (null == url)\n\t\t\t{\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"Null url\"\n\t\t\t\t);\n\t\t\t}\n\t\tthis.url = url ;\n\t\t}", "OutputStream createStream(String location);", "public static File saveURLtoFile(URL url) throws URISyntaxException, IOException {\n\n /* The URL is validated */\n url.toURI();\n\n ReadableByteChannel rbc = Channels.newChannel(url.openStream());\n FileOutputStream fos = new FileOutputStream(SAVED_FILE_PATH);\n fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);\n fos.close();\n\n logger.info(\"URL's content retrieved and save at \" + SAVED_FILE_PATH);\n return new File(SAVED_FILE_PATH);\n }", "public File getFile(String url){\n String filename=String.valueOf(url.hashCode());\n //Another possible solution (thanks to grantland)\n //String filename = URLEncoder.encode(url);\n File f = new File(cacheDir, filename);\n return f;\n \n }", "protected InputStream _optimizedStreamFromURL(URL url)\n/* */ throws IOException\n/* */ {\n/* 1529 */ if (\"file\".equals(url.getProtocol()))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1536 */ String host = url.getHost();\n/* 1537 */ if ((host == null) || (host.length() == 0))\n/* */ {\n/* 1539 */ String path = url.getPath();\n/* 1540 */ if (path.indexOf('%') < 0) {\n/* 1541 */ return new FileInputStream(url.getPath());\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1547 */ return url.openStream();\n/* */ }", "public interface OutputStreamFactory {\n\n /**\n * Create an output stream for file location.\n * String that represents file location should be relative path, '/' is a delimiter.\n *\n * @param location sting that contains relative file location\n *\n * @return new stream instance\n */\n OutputStream createStream(String location);\n}", "URL getStreamURL() throws IOException;", "public OutputStream writeFile( String filename, FileType type );", "URL toURL() throws IOException;", "public static File saveURLtoFile(String encodedURL) throws IOException, URISyntaxException {\n\n URL theURL = createURL(encodedURL);\n\n return saveURLtoFile(theURL);\n }", "public InputStream readStreamFromString(String url) throws IOException {\n\t\tInputStream in;\n\t\tif (url.matches(\"https?://.*\")) {\n\t\t\tURL u = new URL(url);\n\t\t\tURLConnection urlConnection = u.openConnection();\n\t\t\tin = urlConnection.getInputStream();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tin = findStreamInClasspathOrFileSystem(url);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\ttry {\n\t\t\t\t\t// Maybe this happens to be some other format of URL?\n\t\t\t\t\tURL u = new URL(url);\n\t\t\t\t\tURLConnection uc = u.openConnection();\n\t\t\t\t\tin = uc.getInputStream();\n\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t// Don't make the original exception a cause, since it is\n\t\t\t\t\t// almost certainly bogus\n\t\t\t\t\tthrow new IOException(\"Unable to resolve \\\"\" + url + \"\\\" as either \" + \"class path, filename or URL\"); // ,\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// e2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// buffer this stream\n\t\tin = new BufferedInputStream(in);\n\n\t\t// gzip it if necessary\n\t\tif (url.endsWith(\".gz\"))\n\t\t\tin = new GZIPInputStream(in);\n\t\treturn in;\n\t}", "public static FileObject getOrCreateFolder(URL url) throws IOException {\n try {\n FileObject result = URLMapper.findFileObject(url);\n if (result != null) {\n return result;\n }\n File f = Utilities.toFile(url.toURI());\n\n result = FileUtil.createFolder(f);\n return result;\n } catch (URISyntaxException ex) {\n throw new IOException(ex);\n }\n }", "public InputStream getStream(URL url) throws IOException {\n return engine.getStream(url);\n }", "public static File toClassPathFile(URL classPathURL) throws IOException {\n String urlPath = classPathURL.getFile();\n\n urlPath = URLDecoder.decode(urlPath, \"UTF-8\");\n if (urlPath.startsWith(\"file:\")) {\n urlPath = urlPath.substring(5);\n }\n\n if (urlPath.indexOf('!') > 0) {\n urlPath = urlPath.substring(0, urlPath.indexOf('!'));\n }\n\n return new File(urlPath);\n }", "@Override\n public URI createUri(String url) {\n try {\n this.uri = new URI(url);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n return uri;\n }", "Object create(URL url) throws IOException, SAXException, ParserConfigurationException;", "public OutputStream openOutputStream(String path) throws SystemException;", "public SSLEepGet(I2PAppContext ctx, OutputStream outputStream, String url) {\n this(ctx, outputStream, url, null);\n }", "public InputStream openHttp2Stream(URL url) throws IOException {\r\n return openHttpEntity(url).getContent();\r\n }", "protected void getJar(String urlString, File destination) throws BuildException {\n InputStream input = null;\n OutputStream output = null;\n try {\n URL url = new URL(urlString);\n input = new BufferedInputStream(url.openStream());\n output = new BufferedOutputStream(new FileOutputStream(destination));\n byte buffer[] = new byte[1024];\n int readCount;\n while ((readCount = input.read(buffer, 0, buffer.length)) != -1) {\n output.write(buffer, 0, readCount);\n }\n } catch (IOException e) {\n throw new BuildException(\"error getJar \\\"\" + urlString + \"\\\" into \\\"\" + destination.getName() + \"\\\"\", e);\n } finally {\n if (input != null) {try {input.close();} catch (IOException e) {}};\n input = null;\n if (output != null) {try {output.close();} catch (IOException e) {}};\n output = null;\n }\n }", "public static InputStream openStream(String url){\n\t\ttry {\n\t\t\tFile f = new File(context.getCacheDir(), hashURL(url));\n\t\t\tInputStream stream= new BufferedInputStream(new FileInputStream(f));\n\t\t\tLog.i(\"FILEBANK\",\"Cache hit on \"+hashURL(url));\n\t\t\treturn stream;\n\t\t} catch (FileNotFoundException ex){\n\t\t\tsaveFile(url);\n\t\t\treturn openStream(url);\n\t\t}\n\t}", "@Override\n public OutputStream openOutputFile(String pathname) throws IOException {\n return new FileOutputStream(pathname);\n }", "private File createDownloadLocalFile(String downloadFileUrl)\n {\n File dir = null;\n File ret = null;\n\n try {\n if (downloadFileUrl != null && !TextUtils.isEmpty(downloadFileUrl)) {\n int lastIndex = downloadFileUrl.lastIndexOf(\"/\");\n if (lastIndex > -1) {\n String downloadFileName = newFilename;\n File downloadDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n String downloadDirectoryPath =\n downloadDirectory.getPath()\n + File.separator\n + Constants.APP_NAME;\n\n dir = new File(downloadDirectoryPath);\n if(!dir.exists()){\n dir.mkdirs();\n }\n\n ret = new File(downloadDirectoryPath + \"/\" + downloadFileName);\n\n if (!ret.exists()) {\n ret.createNewFile();\n }\n }\n }\n }catch(IOException ex)\n {\n //Log.e(\"Download Manager\", ex.getMessage(), ex);\n }finally {\n return ret;\n }\n }", "private DataHandler createDataHandler(URL url) throws MalformedURLException {\n return new DataHandler(url);\n }", "synchronized static void saveFile(String url){\n\t\tint count=1,size=0;\n\t\tbyte buffer[] = new byte[0x100];\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(new File(context.getCacheDir(), hashURL(url)));\n\t\t\tInputStream input = new BufferedInputStream(new URL(url).openStream());\n\t\t\tLog.i(\"FILEBANK\",\"Saveing \"+hashURL(url));\n\t\t\twhile(true){\n\t\t\t\tcount=input.read(buffer);\n\t\t\t\tif(count<0)break;\n\t\t\t\tfos.write(buffer,0,count);\n\t\t\t\tsize+=count;\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tfos.close();\n\t\t\tLog.i(\"FILEBANK\",\"Saved \"+hashURL(url)+\" \"+size+\" bytes.\");\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLog.e(\"FILEBANK\", \"Error saving file to cache\", ex);\n\t\t} catch (MalformedURLException ex) {\n\t\t\tLog.e(\"FILEBANK\",\"Invalid url: \"+url, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLog.e(\"FILEBANK\",\"Error reading image\", ex);\n\t\t} catch (IndexOutOfBoundsException ex) {\n\t\t\tLog.e(\"FILEBANK\", \"(count, size) = \"+count+\",\"+size, ex);\n\t\t}\n\t}", "public File downloadFile(String remoteFilePath, String pathToStore) throws IOException, NoInternetConnectionException, NoDataReceivedException\n {\n File outFile = new File(pathToStore);\n InputStream in = getRemoteFileStream(remoteFilePath);\n if (in != null)\n {\n FileWriter out = new FileWriter(outFile);\n out.write(convertStreamToString(in));\n }\n return outFile;\n }", "public void getObject(String url) throws UrlCacheException {\n\n\t\tHost host = new Host(url);\n\n\t\tboolean fileExists = checkCatalogForFile(url);\n\n\t\tbeginDownloadStream(host.getHostName(), host.getPort(), host.getConcatPath(), host.getFileName(), fileExists);\n\t}", "@Override\n public OutputStream openInternalOutputFile(String pathname) throws IOException {\n return new FileOutputStream(pathname);\n }", "public OutputStream getOutputStream(UMOImmutableEndpoint endpoint, UMOMessage message)\n throws UMOException\n {\n String address = endpoint.getEndpointURI().getAddress();\n String writeToDirectory = message.getStringProperty(\n FileConnector.PROPERTY_WRITE_TO_DIRECTORY, null);\n if (writeToDirectory == null)\n {\n writeToDirectory = connector.getWriteToDirectory();\n }\n if (writeToDirectory != null)\n {\n address = connector.getFilenameParser().getFilename(message, writeToDirectory);\n }\n\n String filename;\n String outPattern = message.getStringProperty(FileConnector.PROPERTY_OUTPUT_PATTERN, null);\n if (outPattern == null)\n {\n outPattern = connector.getOutputPattern();\n }\n try\n {\n if (outPattern != null)\n {\n filename = generateFilename(message, outPattern);\n }\n else\n {\n filename = message.getStringProperty(FileConnector.PROPERTY_FILENAME, null);\n if (filename == null)\n {\n filename = generateFilename(message, null);\n }\n }\n\n if (filename == null)\n {\n throw new IOException(\"Filename is null\");\n }\n File file = FileUtils.createFile(address + \"/\" + filename);\n if (logger.isInfoEnabled())\n {\n logger.info(\"Writing file to: \" + file.getAbsolutePath());\n }\n\n return new FileOutputStream(file, MapUtils.getBooleanValue(endpoint.getProperties(),\n \"outputAppend\", connector.isOutputAppend()));\n }\n catch (IOException e)\n {\n throw new DispatchException(new Message(Messages.STREAMING_FAILED_NO_STREAM), message,\n endpoint, e);\n }\n }", "public JsonParser createParser(URL url)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 782 */ IOContext ctxt = _createContext(url, true);\n/* 783 */ InputStream in = _optimizedStreamFromURL(url);\n/* 784 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "public void storeTestContent(String url) throws Exception {\n log.debug3(\"storeTestContent() url: \" + url);\n InputStream input = null;\n CIProperties props = null;\n // issue table of content\n if (url.endsWith(\"8601\") && url.contains(\"download\")) { \n // pdf\n input = new StringInputStream(\"\");\n props = getPdfProperties();\n } else if (url.endsWith(\"8110\")) {\n // abs - for metadata/\n input = new StringInputStream(abstractMetadata);\n props = getHtmlProperties();\n } else {\n \t// default blank html\n input = new StringInputStream(\"<html></html>\");\n props = getHtmlProperties();\n }\n UrlData ud = new UrlData(input, props, url);\n UrlCacher uc = au.makeUrlCacher(ud);\n uc.storeContent();\n }", "OutputStream getOutputStream() throws FileSystemException;", "@NotNull OutputStream openOutputStream() throws IOException;", "public FilenameURL( URL url, String identifier )\n {\n // grab a handle to the message logger:\n logger = SoundSystemConfig.getLogger();\n\n filename = identifier;\n this.url = url;\n }", "public LogFileInner withUrl(String url) {\n this.url = url;\n return this;\n }", "public void setFileUrl(String fileUrl);", "@Streaming\n @GET\n Call<ResponseBody> downloadFileWithDynamicUrlSync(@Url String fileUrl);", "@Override\n public FileSystem newFileSystem(URI uri, Map<String, ?> env) throws IOException {\n return getFS(delegate.newFileSystem(uri, env));\n\n }", "public static StreamedContent getStreamedContent(String url) {\n\t\tif (StringUtils.isBlank(url)) {\n\t\t\treturn null;\n\t\t}\n\t\tInputStream inputStream = null;\n\t\ttry {\n\t\t\tinputStream = new URL(url).openStream();\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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 (inputStream == null) {\n\t\t\treturn null;\n\t\t}\n\t\tStreamedContent streamedContent = new DefaultStreamedContent(inputStream, \"image/png\");\n\t\treturn streamedContent;\n\t}", "public File String_to_File(String img_url) {\n\n try {\n File rootSdDirectory = Environment.getExternalStorageDirectory();\n\n casted_image = new File(rootSdDirectory, \"attachment.jpg\");\n if (casted_image.exists()) {\n casted_image.delete();\n }\n casted_image.createNewFile();\n\n FileOutputStream fos = new FileOutputStream(casted_image);\n\n URL url = new URL(img_url);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setDoOutput(true);\n connection.connect();\n InputStream in = connection.getInputStream();\n\n byte[] buffer = new byte[1024];\n int size = 0;\n while ((size = in.read(buffer)) > 0) {\n fos.write(buffer, 0, size);\n }\n fos.close();\n return casted_image;\n\n } catch (Exception e) {\n\n System.out.print(e);\n // e.printStackTrace();\n\n }\n return casted_image;\n }", "public interface FileDownloader {\n boolean setInputSteam(String sourceUrl);\n void downloadFileFromStream();\n String getFileName();\n\n}", "public WritingFont(URL url) throws IOException {\n\t\tthis();\n\t\tif (url == null)\n\t\t\tthrow new NullPointerException();\n\n\t\tInputStream in = null;\n\t\ttry {\n\t\t\tin = url.openStream();\n\t\t\tpopulate(in, url.toString());\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\tin.close();\n\t\t\t}\n\t\t}\n\t}", "public static void downloadUrl(URL url, String localFilename) throws IOException {\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n URLConnection urlConnection = url.openConnection();\n\n is = urlConnection.getInputStream();\n fos = new FileOutputStream(localFilename);\n\n byte[] buffer = new byte[4096];\n int len;\n\n while ((len = is.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n } finally {\n try {\n if (is != null) {\n is.close();\n }\n } finally {\n if (fos != null) {\n fos.close();\n }\n }\n }\n }", "void saveFrom(String key, InputStream stream);", "public abstract InputStream openStream(String str);", "public StorageOutputStream(OutputStream o) throws Exception {\r\n\tout = o;\r\n}", "public ItemFactory(final String url) {\n this.url = url;\n }", "public void saveToStream(OutputStream stream, Model model);", "public FileCacheImageOutputStream(OutputStream stream, File cacheDir) throws IOException {\n if (stream == null) {\n throw new IllegalArgumentException(\"stream == null!\");\n }\n if ((cacheDir != null) && !(cacheDir.isDirectory())) {\n throw new IllegalArgumentException(\"Not a directory!\");\n }\n this.stream = stream;\n if (cacheDir == null)\n this.cacheFile = Files.createTempFile(\"imageio\", \".tmp\").toFile();\n else\n this.cacheFile = Files.createTempFile(cacheDir.toPath(), \"imageio\", \".tmp\").toFile();\n this.cache = new RandomAccessFile(cacheFile, \"rw\");\n\n this.closeAction = StreamCloser.createCloseAction(this);\n StreamCloser.addToQueue(closeAction);\n }", "boolean download(\n String remoteFileName, OutputStream destination);", "public static InputStream inputStreamFromString(String location) throws IOException {\n switch (getStringLocationType(location)) {\n case LOCATION_URL:\n return new URL(location).openStream();\n\n case LOCATION_FILE:\n default:\n return new FileInputStream(location);\n }\n }", "String writeStreamToStore(InputStream in, long actualSize, Mailbox mbox) throws IOException, ServiceException;", "public static String getFileFromUrl(final String url) {\n\t\treturn url.substring(url.lastIndexOf('/') + 1);\n\t}", "private InputStream downloadStream(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\t\treturn stream;\n\t}", "InputStream readStreamFromStore(String locator, Mailbox mbox) throws IOException;", "public SaveStore(String filename) {\r\n this.filename = filename;\r\n }", "void getFile(String path, OutputStream stream) throws NotFoundException, IOException;", "private InputStream downloadUrl(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\n\t\treturn stream;\n\t}", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error with creating URL \", e);\n }\n return url;\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error with creating URL \", e);\n }\n return url;\n }", "public static void httpDownload(String url, FileOutputStream file) throws Exception {\r\n \t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\tHttpResponse response = client.execute(new HttpGet(url));\r\n \t\tif(response.getStatusLine().getStatusCode() < 400){\r\n \t\t\tBufferedOutputStream writer = null;\r\n \t\t\tBufferedInputStream reader = null;\r\n \t\t\ttry {\r\n \t\t\t\twriter = new BufferedOutputStream(file);\r\n \t\t\t\treader = new BufferedInputStream(response.getEntity().getContent());\r\n \r\n \t\t\t\tbyte[] buffer = new byte[BUF_SIZE];\r\n \t\t\t\tint bytesRead = reader.read(buffer);\r\n \r\n \t\t\t\twhile (bytesRead > 0) {\r\n \t\t\t\t\twriter.write(buffer, 0, bytesRead);\r\n \t\t\t\t\tbytesRead = reader.read(buffer);\r\n \t\t\t\t}\r\n \t\t\t} finally {\r\n \t\t\t\tif (writer != null) {\r\n \t\t\t\t\twriter.close();\r\n \t\t\t\t}\r\n \t\t\t\tif (reader != null) {\r\n \t\t\t\t\treader.close();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "static String download(String fileURL, String destinationDirectory, String downloadedFileName) throws IOException {\n URL url = new URL(fileURL);\r\n InputStream is = url.openStream();\r\n // Stream to the destionation file\r\n FileOutputStream fos;\r\n if (destinationDirectory == null) {// save to working folder\r\n fos = new FileOutputStream(downloadedFileName);\r\n } else {\r\n fos = new FileOutputStream(destinationDirectory + \"/\" + downloadedFileName);\r\n }\r\n // Read bytes from URL to the local file\r\n byte[] buffer = new byte[4096];\r\n int bytesRead = 0;\r\n\r\n System.out.print(\"Downloading \" + downloadedFileName);\r\n while ((bytesRead = is.read(buffer)) != -1) {\r\n System.out.print(\".\"); // Progress bar :)\r\n fos.write(buffer, 0, bytesRead);\r\n }\r\n System.out.println(\"done!\");\r\n\r\n // Close destination stream\r\n fos.close();\r\n // Close URL stream\r\n is.close();\r\n return downloadedFileName;\r\n }", "public OutputStream openOutputStream() throws IOException {\n return new FileOutputStream(this);\n }", "public static URL createURL(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n }\n catch (MalformedURLException m) {\n Log.e(LOG_TAG,\"Error creating URL\",m);\n }\n return url;\n }", "public void outputEntityContent(String url, OutputStream output) throws ClientProtocolException, IOException {\n try (InputStream inputStream = getEntityContent(url)) {\n if (inputStream == null) {\n return;\n }\n int length;\n byte[] buffer = new byte[2048];\n while ((length = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, length);\n }\n }\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Problem building the URL \", e);\n }\n return url;\n }", "private static URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }", "private String downloadFile(String url) throws Exception {\n StringBuilder builder = new StringBuilder();\n \n URL u = new URL(url);\n URLConnection conn = u.openConnection();\n BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n String line;\n while ((line = rd.readLine()) != null) {\n builder.append(line);\n }\n \n return builder.toString();\n }", "public MsxReader ( URL url ) {\r\n\t\tsuper();\r\n\r\n\t\taddURL(url);\r\n\t}", "public boolean downloadAndSaveBinaryFile(String theUrl, String saveAsFileName){\n \t\t //Log.i(\"ZZ\", \"AppDelegate:downloadAndSaveBinaryFile: \" + URL); \n\t \ttry {\n\t\t \n\t \tURL u = new URL(theUrl);\n\t URLConnection uc = u.openConnection();\n\t String contentType = uc.getContentType();\n\t int contentLength = uc.getContentLength();\n\t if (contentType.startsWith(\"text/\") || contentLength == -1) {\n\t return false; // not binary\n\t }\n\t InputStream raw = uc.getInputStream();\n\t InputStream in = new BufferedInputStream(raw);\n\t byte[] data = new byte[contentLength];\n\t int bytesRead = 0;\n\t int offset = 0;\n\t while (offset < contentLength) {\n\t bytesRead = in.read(data, offset, data.length - offset);\n\t if (bytesRead == -1)\n\t break;\n\t offset += bytesRead;\n\t }\n\t in.close();\n\t \t\t\t \t\n\t \t\t\t \n\t if (offset != contentLength) {\n\t\t return false; //problem reading stream?\n\t }\n\t \n\n\t //save file\n\t\t\t\t\tFileOutputStream fos = super.openFileOutput(saveAsFileName, MODE_WORLD_READABLE);\n\t\t\t\t\tfos.write(data);\n\t\t\t\t\tfos.flush();\n\t\t\t\t\tfos.close();\n\t \n\t return true;\n\t }catch (Exception je){\n\t\t\t Log.i(\"ZZ\", \"AppDelegate:downloadAndSaveBinaryFile: ERROR - 2: \" + je.getMessage()); \n\t \t return false;\n\t\t } \n\t }", "public HTMLFile (URL url) {\n this.inFile = null;\n inURL = url;\n inName = url.toString();\n commonConstruction();\n }", "public static byte[] getURL(String string_url) {\n ByteArrayOutputStream bais = new ByteArrayOutputStream();\n InputStream is = null;\n try {\n URL url = new URL(string_url);\n is = url.openStream();\n byte[] byteChunk = new byte[4096];\n int n;\n \n while ( (n = is.read(byteChunk)) > 0 ) {\n bais.write(byteChunk, 0, n);\n }\n \n is.close();\n }\n catch (IOException e) {\n }\n \n return bais.toByteArray();\n }", "private static String downloadUrl(String downloadUrl) throws IOException {\n URL url = new URL(downloadUrl);\n\n HttpURLConnection httpURLConnection= (HttpURLConnection) url.openConnection();\n httpURLConnection.connect();\n\n InputStream urlInputStream = httpURLConnection.getInputStream();\n BufferedReader museumDataReader = new BufferedReader(new InputStreamReader(urlInputStream));\n\n StringBuilder museumDataBuilder = new StringBuilder();\n String line = \"\";\n \n while( (line = museumDataReader.readLine()) != null ) {\n museumDataBuilder.append(line);\n }\n\n String museumData = museumDataBuilder.toString();\n museumDataReader.close();\n\n return museumData;\n }", "public static UrlTrack createTrack(URI uri) throws IOException {\r\n try {\r\n AudioInputStream stream = AudioSystem.getAudioInputStream(new File(uri));\r\n AudioFormat f = stream.getFormat();\r\n double seconds = stream.getFrameLength() / f.getFrameRate();\r\n return new UrlTrack(uri, 0, seconds, f);\r\n } catch (UnsupportedAudioFileException e) {\r\n throw new IOException(e.getMessage());\r\n }\r\n }", "public ExternalStorageFileOutputStream(String name) throws FileNotFoundException {\n this(name != null ? new ExternalStorageFile(name).getInternalFile() : null, false);\n }", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public OutputStream getOutputStream(URI uri) throws IOException\n {\n return this.standardResolver.getOutputStream(uri);\n }", "public static URL toUrl(String url) {\r\n URL result;\r\n try {\r\n result = new URL(url);\r\n } catch (MalformedURLException e) {\r\n LogManager.getLogger(Configuration.class).info(\"Turning \" + url + \" into URL : \" + e.getMessage());\r\n result = null;\r\n }\r\n return result;\r\n }", "public void saveURL(URLValue url)\n\t{\n\t\tthis.accessor.getPrimaryIndex().put(new URLEntity(url.getKey(), url.getURL(), url.getUpdatingPeriod()));\n\t}", "private File downloadJSON(String urlString) throws IOException {\r\n\t\tString filename = \"\";\r\n\t\t\r\n\t\t//We choose to name the files as word_opensearch and word_wikipage, referring to the two File objects representing the JSONs we downloaded.\r\n\t\tif(urlString.contains(\"search\")) {\r\n\t\t\tfilename = \"JSON/\" + this.word + \"_opensearch.json\";\r\n\t\t} else {\r\n\t\t\tfilename = \"JSON/\" + this.word + \"_wikipage.json\";\r\n\t\t}\r\n\t\t\r\n\t\t//Constructing the File toReturn with the appropriate filename as checked above.\r\n\t\tFile toReturn = new File(filename);\r\n\t\t\r\n\t\t//This line deals with errors you recieve when dealing with how to fill whitespace when represented as a URL\r\n\t\tString messageText = URLEncoder.encode(this.word, \"UTF-8\");\r\n\t\t\r\n\t\t//Constructing the URL object from our long URL and converted text in message data\r\n\t\tURL website = new URL(urlString + messageText);\r\n\t\t\r\n\t\t//Write the bytes recieved from wikipedia's response to us opening a datastream\r\n\t\tReadableByteChannel rbc = Channels.newChannel(website.openStream());\r\n\t\tFileOutputStream fos;\r\n\t\ttry {\r\n\t\t\tfos = new FileOutputStream(toReturn);\r\n\t\t\tfos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);\r\n\t\t\tfos.close();\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}\r\n\t\t\r\n\t\treturn toReturn;\r\n\t}", "private URL createUrl(String stringUrl) {\n URL url = null;\n try {\n url = new URL(stringUrl);\n } catch (MalformedURLException exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }", "public static java.io.File tryGet(String url) {\n\n java.io.File file = new java.io.File(url);\n if(file.exists() && !file.isDirectory()) {\n\n return file;\n }\n\n return null;\n }", "@SuppressLint(\"NewApi\")\n\t\tpublic S<T> download(String url){\n\t\t \n\t\t// declare the dialog as a member field of your activity\n\t\t\t String fileName = url.substring( url.lastIndexOf('/')+1, url.length() );\n\n\t\t\t \n\t\t \n\t\t //if(!service){\n\t\t\t // instantiate it within the onCreate method\n\t\t\t mProgressDialog = new ProgressDialog(activity);\n\t\t\t mProgressDialog.setMessage(\"Downloading ...\");\n\t\t\t mProgressDialog.setIndeterminate(true);\n\t\t\t mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t mProgressDialog.setCancelable(true);\n\t\t\t \n\t\t\t mProgressDialog.show(); \n\t\t\t Intent intent = new Intent(activity, DownloadService.class);\n\t\t\t intent.putExtra(\"url\", url);\n\t\t\t intent.putExtra(\"filename\", fileName);\n\t\t\t intent.putExtra(\"receiver\", new DownloadReceiver(new Handler()));\n\t\t\t activity.startService(intent);\n\t\t\t \n\t\t return this;\n\t }", "private static URL stringToUrl(String stringUrl) throws MalformedURLException{\r\n\t\treturn new URL(stringUrl);\r\n\t}", "public static OdbStorage createWithSpecificLocation(\n final NodeDeserializer nodeDeserializer, final File mvstoreFile) {\n return new OdbStorage(Optional.ofNullable(mvstoreFile), Optional.ofNullable(nodeDeserializer));\n }", "public static URL str2url( String strUrl )\r\n {\r\n try\r\n {\r\n URL url = new URL( strUrl );\r\n return url;\r\n }\r\n catch( MalformedURLException e )\r\n {\r\n Log.e( TAG, \"\", e );\r\n throw new IllegalArgumentException( \"str2url\", e );\r\n } \r\n }", "public static URL toURL(String filename) throws MalformedURLException {\n try {\n return new URL(filename);\n }\n catch (Exception e) {\n return new File(filename).toURI().toURL();\n }\n\t}", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n }", "public static synchronized Result makeOutputFile(URI absoluteURI) throws XPathException {\n File newFile = new File(absoluteURI);\n try {\n if (!newFile.exists()) {\n File directory = newFile.getParentFile();\n if (directory != null && !directory.exists()) {\n directory.mkdirs();\n }\n newFile.createNewFile();\n }\n return new StreamResult(newFile);\n } catch (IOException err) {\n throw new XPathException(\"Failed to create output file \" + absoluteURI, err);\n }\n }", "private static URL createURL(String urlString) {\n\n // Create an empty url\n URL url = null;\n\n try {\n // Try to make a url from urlString param\n url = new URL(urlString);\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error creating URL: \" + e);\n }\n\n //Return the new url\n return url;\n }", "public static InputStream getStream(Context context, String urlStr) throws IOException {\n InputStream stream = null;\n\n if (urlStr.startsWith(\"assets://\")) {\n stream = context.getAssets().open(urlStr.replaceFirst(\"assets://\", \"\"));\n } else {\n URL url = new URL(urlStr);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setConnectTimeout(15000);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = connection.getInputStream();\n }\n }\n\n return stream;\n }", "protected InputStream getURLInputStream() throws Exception\n\t {\n\n\t URL url = new URL(file, fFilename);\n\t InputStream fin = url.openStream();\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "public static OutputArchive fromOutputStream(OutputStream stream) throws IOException {\n if (stream instanceof ObjectOutput) {\n return new OutputArchive((ObjectOutput) stream);\n } else {\n return new OutputArchive(new ObjectOutputStream(stream));\n }\n }", "public StreamHandler createStreamHandler (OutputStream outStream) {\r\n\t\t\t\t\t\r\n\t\tStreamHandler streamHandler = null;\r\n\r\n\t\ttry {\r\n\t\t\t\t \t\r\n\t\t\tstreamHandler = new StreamHandler(outStream, new SimpleFormatter());\r\n\t\t\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t \r\n\t\t\treturn streamHandler;\r\n\t}", "public FilenameURL( String filename )\n {\n // grab a handle to the message logger:\n logger = SoundSystemConfig.getLogger();\n\n this.filename = filename;\n url = null;\n }", "public interface DownLoadService {\n\n @Streaming\n @GET\n Observable<ResponseBody> downloadFilm(@Url String url);\n\n}", "private static URL toFileURL(URL resource) throws IOException {\n\t\t// Don't bother copying file urls\n\t\t//\n\t\tif (resource.getProtocol()\n\t\t\t.equalsIgnoreCase(\"file\"))\n\t\t\treturn resource;\n\n\t\t//\n\t\t// Need to make a copy to a temp file\n\t\t//\n\n\t\tFile f = File.createTempFile(\"resource\", \".jar\");\n\t\tFiles.createDirectories(f.getParentFile()\n\t\t\t.toPath());\n\t\ttry (InputStream in = resource.openStream(); OutputStream out = Files.newOutputStream(f.toPath())) {\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tfor (int size; (size = in.read(buffer, 0, buffer.length)) > 0;) {\n\t\t\t\tout.write(buffer, 0, size);\n\t\t\t}\n\t\t}\n\t\tf.deleteOnExit();\n\t\treturn f.toURI()\n\t\t\t.toURL();\n\t}", "protected MovieRepository(String url) {\n URL = url;\n }", "public static URL toURL(String url) throws MalformedURLException,\r\n\t\t\tUnsupportedEncodingException {\r\n\t\tURL retURL = null;\r\n\t\ttry {\r\n\t\t\tretURL = new URL(url);\r\n\t\t} catch (Exception exception) {\r\n\t\t\tFile file = new File(url);\r\n\t\t\tretURL = file.toURI().toURL();\r\n\t\t}\r\n\t\tString vmFileEncoding = System.getProperty(\"file.encoding\");\r\n\t\tretURL = new URL(URLDecoder.decode(retURL.toString(), vmFileEncoding));\r\n\t\treturn retURL;\r\n\t}", "protected abstract OutputStream getStream() throws IOException;" ]
[ "0.61936766", "0.6032098", "0.5610371", "0.5338178", "0.52348167", "0.49924803", "0.4901065", "0.48722172", "0.4852348", "0.48385412", "0.4805746", "0.4779303", "0.469623", "0.46904436", "0.46864766", "0.46196803", "0.45682335", "0.45653313", "0.45424986", "0.45410314", "0.45335752", "0.4527343", "0.45258766", "0.45176357", "0.4516851", "0.45029005", "0.44900286", "0.4469806", "0.44501355", "0.44488084", "0.4408092", "0.44053036", "0.43758866", "0.43662205", "0.43610737", "0.43332604", "0.43290854", "0.43275538", "0.43259412", "0.42999735", "0.42948836", "0.42905104", "0.42833528", "0.4282254", "0.42818704", "0.4274294", "0.42645025", "0.42638248", "0.4258664", "0.42584464", "0.4252993", "0.42257583", "0.42043504", "0.41918042", "0.41765696", "0.41517788", "0.41488233", "0.4148821", "0.41458517", "0.41458517", "0.41444546", "0.41401637", "0.41353953", "0.41230422", "0.41056484", "0.40976697", "0.40959525", "0.40950257", "0.40944767", "0.40938798", "0.40912637", "0.40898693", "0.40758348", "0.40736037", "0.40697852", "0.40672785", "0.40654683", "0.40651464", "0.40560862", "0.40522626", "0.40495405", "0.40479404", "0.4035636", "0.4034981", "0.40347996", "0.40287974", "0.40247717", "0.4020212", "0.40196723", "0.40143013", "0.4009862", "0.40085614", "0.40046448", "0.40029252", "0.39867106", "0.39766648", "0.39707348", "0.39688227", "0.39684123", "0.3967764" ]
0.5681811
2
Create a FileStoreInputStream from a URL.
public FileStoreInputStream(URL url) { if (null == url) { throw new IllegalArgumentException( "Null url" ); } this.url = url ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FileStoreInputStream(String string)\n\t\tthrows MalformedURLException\n\t\t{\n\t\tthis(\n\t\t\tnew URL(\n\t\t\t\tstring\n\t\t\t\t)\n\t\t\t);\n\t\t}", "protected InputStream _optimizedStreamFromURL(URL url)\n/* */ throws IOException\n/* */ {\n/* 1529 */ if (\"file\".equals(url.getProtocol()))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1536 */ String host = url.getHost();\n/* 1537 */ if ((host == null) || (host.length() == 0))\n/* */ {\n/* 1539 */ String path = url.getPath();\n/* 1540 */ if (path.indexOf('%') < 0) {\n/* 1541 */ return new FileInputStream(url.getPath());\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1547 */ return url.openStream();\n/* */ }", "public InputStream readStreamFromString(String url) throws IOException {\n\t\tInputStream in;\n\t\tif (url.matches(\"https?://.*\")) {\n\t\t\tURL u = new URL(url);\n\t\t\tURLConnection urlConnection = u.openConnection();\n\t\t\tin = urlConnection.getInputStream();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tin = findStreamInClasspathOrFileSystem(url);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\ttry {\n\t\t\t\t\t// Maybe this happens to be some other format of URL?\n\t\t\t\t\tURL u = new URL(url);\n\t\t\t\t\tURLConnection uc = u.openConnection();\n\t\t\t\t\tin = uc.getInputStream();\n\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t// Don't make the original exception a cause, since it is\n\t\t\t\t\t// almost certainly bogus\n\t\t\t\t\tthrow new IOException(\"Unable to resolve \\\"\" + url + \"\\\" as either \" + \"class path, filename or URL\"); // ,\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// e2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// buffer this stream\n\t\tin = new BufferedInputStream(in);\n\n\t\t// gzip it if necessary\n\t\tif (url.endsWith(\".gz\"))\n\t\t\tin = new GZIPInputStream(in);\n\t\treturn in;\n\t}", "protected InputStream getURLInputStream() throws Exception\n\t {\n\n\t URL url = new URL(file, fFilename);\n\t InputStream fin = url.openStream();\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "public InputStream getStream(URL url) throws IOException {\n return engine.getStream(url);\n }", "public InputStream openHttp2Stream(URL url) throws IOException {\r\n return openHttpEntity(url).getContent();\r\n }", "public static InputStream openStream(String url){\n\t\ttry {\n\t\t\tFile f = new File(context.getCacheDir(), hashURL(url));\n\t\t\tInputStream stream= new BufferedInputStream(new FileInputStream(f));\n\t\t\tLog.i(\"FILEBANK\",\"Cache hit on \"+hashURL(url));\n\t\t\treturn stream;\n\t\t} catch (FileNotFoundException ex){\n\t\t\tsaveFile(url);\n\t\t\treturn openStream(url);\n\t\t}\n\t}", "public InputStream getInputStream(String sourceUrl)\n {\n try\n {\n return super.getInputStream(sourceUrl);\n } \n catch (ConfigException ce)\n { \n int idx = sourceUrl.indexOf(StoreRef.URI_FILLER); \n if (idx != -1)\n {\n // assume this is a repository location\n int idx2 = sourceUrl.indexOf(\"/\", idx+3);\n \n String store = sourceUrl.substring(0, idx2);\n String path = sourceUrl.substring(idx2);\n \n StoreRef storeRef = tenantService.getName(new StoreRef(store)); \n NodeRef rootNode = null;\n \n try \n {\n rootNode = nodeService.getRootNode(storeRef);\n } \n catch (InvalidStoreRefException e)\n {\n throw ce;\n }\n \n List<NodeRef> nodeRefs = searchService.selectNodes(rootNode, path, null, namespaceService, false);\n \n if (nodeRefs.size() == 0)\n {\n // if none found, then simply skip\n return null;\n }\n else if (nodeRefs.size() > 1)\n {\n // unexpected\n throw new ConfigException(\"Found duplicate config sources in the repository \" + sourceUrl);\n }\n\n NodeRef nodeRef = nodeRefs.get(0);\n \n ContentReader cr = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);\n \n return cr.getContentInputStream(); \n } \n else\n {\n // not a repository url\n throw ce;\n }\n }\n }", "public static InputStream inputStreamFromString(String location) throws IOException {\n switch (getStringLocationType(location)) {\n case LOCATION_URL:\n return new URL(location).openStream();\n\n case LOCATION_FILE:\n default:\n return new FileInputStream(location);\n }\n }", "private InputStream findStreamInClasspathOrFileSystem(String url) throws IOException {\n\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(url);\n\t\t// if not found in the CLASSPATH, load from the file system\n\t\tif (is == null)\n\t\t\tis = new FileInputStream(url);\n\t\treturn is;\n\t}", "InputStream getInputStream() throws FileSystemException;", "public MsxReader ( URL url ) {\r\n\t\tsuper();\r\n\r\n\t\taddURL(url);\r\n\t}", "public ConnectionAwareInputStream sftpFileInputStream(URI uri) {\n log.info(\"Getting InputStream for '{}'\", uri);\n String absolutePath = uri.toString();\n\n return retryAction(() ->\n doInConnection(connection -> {\n try {\n ChannelSftp channel = connection.getChannel();\n InputStream inputStream = channel.get(absolutePath);\n return new ConnectionAwareInputStream(connection, absolutePath, inputStream);\n } catch (SftpException e) {\n log.error(\"Cannot open sftp InputStream for \" + absolutePath, e);\n throw new ConnectFilePulseException(e);\n }\n }));\n }", "public InputSource makeInputSource(String path) throws IOException {\n return new InputSource(makeUrl(path).toString());\n}", "public static InputStream getInputStream(Path path, SourceType sourceType) throws IOException {\n try {\n return getCompressInputStream(getFileSystemBySourceType(sourceType).open(path), path);\n } catch (IOException e) {\n // To manual fix a issue that FileSystem is closed exceptionally. Here we renew a FileSystem object to make\n // sure all go through such issues.\n if(e.getMessage() != null) {\n if(e.getMessage().toLowerCase().indexOf(\"filesystem closed\") >= 0) {\n if(sourceType == SourceType.HDFS) {\n return HDFSUtils.renewFS().open(path);\n }\n }\n }\n throw e;\n }\n }", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public static InputStream getInputStream(String pageURL) throws IOException{\n InputStream is = null;\n URL url = new URL(pageURL);\n URLConnection conn = url.openConnection();\n conn.setUseCaches(false);\n conn.addRequestProperty(\"User-agent\", Common.USER_AGENT);\n is = conn.getInputStream();\n return is;\n }", "@NotNull InputStream openInputStream() throws IOException;", "public InputStream inputStream(final String uri, final Map<String, String> creds) throws Exception {\n\t\ttry {\n\t\t\tClient c = getHttpClient();\n\t\t\tWebResource r = c.resource(url + \"/file\");\n\t\t\tcom.sun.jersey.api.client.WebResource.Builder b = r.header(HTTP_HEADER_KEY, key).header(HTTP_HEADER_URI, uri).accept(MediaType.APPLICATION_OCTET_STREAM);\n\t\t\tif (allowRedirects) b.header(HTTP_HEADER_REDIRECT, \"yes\");\n\t\t\taddMapAsHttpHeader(b, creds);\n\t\t\treturn b.get(InputStream.class);\n\t\t} catch (UniformInterfaceException e) {\n\t\t\tthrow new Exception(e.getMessage() + \" (\" + e.getResponse().getEntity(String.class) + \")\");\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t}\n\t}", "public static InputStream getStream(Context context, String urlStr) throws IOException {\n InputStream stream = null;\n\n if (urlStr.startsWith(\"assets://\")) {\n stream = context.getAssets().open(urlStr.replaceFirst(\"assets://\", \"\"));\n } else {\n URL url = new URL(urlStr);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setConnectTimeout(15000);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = connection.getInputStream();\n }\n }\n\n return stream;\n }", "InputStream openStream() throws IOException;", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "static InputStream openStreamFromURL(String path) {\n\t\tClassLoader cl = PropertiesUtil.class.getClassLoader();\n\t\tURL url = cl.getResource(path);\n\t\tif (url != null) {\n\t\t\ttry {\n\t\t\t\tInputStream stream = url.openStream();\n\t\t\t\treturn stream;\n\t\t\t} catch (IOException ioex) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public File getFile(String url){\n String filename=String.valueOf(url.hashCode());\n //Another possible solution (thanks to grantland)\n //String filename = URLEncoder.encode(url);\n File f = new File(cacheDir, filename);\n return f;\n \n }", "public static InputStream openInputStreamGZ(ResourceLocator locator) throws IOException {\n\n InputStream inputStream = null;\n\n if (isDataURL(locator.getPath())) {\n String dataURL = locator.getPath();\n int commaIndex = dataURL.indexOf(',');\n if (commaIndex < 0) {\n throw new Error(\"dataURL missing commas\");\n }\n // TODO -- check optional media type - only text/plain supported\n String contents = URLDecoder.decode(dataURL.substring(commaIndex + 1), StandardCharsets.UTF_8);\n return new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8));\n } else if (HttpUtils.isRemoteURL(locator.getPath())) {\n URL url = HttpUtils.createURL(locator.getPath());\n inputStream = HttpUtils.getInstance().openConnectionStream(url);\n } else {\n String path = locator.getPath();\n if (path.startsWith(\"file://\")) {\n path = path.substring(7);\n }\n File file = new File(path);\n inputStream = new FileInputStream(file);\n }\n\n if (locator.getPath().endsWith(\"gz\")) {\n return new GZIPInputStream(inputStream);\n } else {\n return inputStream;\n }\n }", "InputStream readStreamFromStore(String locator, Mailbox mbox) throws IOException;", "URL getStreamURL() throws IOException;", "public static InputStream createInputStream(String filename) throws FileReadingException {\n File file = new File(filename);\n if (!file.exists()) {\n throw new FileReadingException(\"File Not Found: \" + filename + \"\\n\");\n }\n if (!file.isFile()) {\n throw new FileReadingException(filename + \" is not a file.\\n\");\n }\n if (!file.canRead()) {\n throw new FileReadingException(\"Reading file \" + filename + \" is not permitted.\\n\");\n }\n\n try {\n return new FileInputStream(file);\n } catch (FileNotFoundException e) {\n throw new FileReadingException(\"File Not Found: \" + filename + \"\\n\");\n }\n }", "public static FileInputStream getMavenRessourcesInputStream(Object object, String filename)\r\n {\r\n\treturn FilesURLs.getRessourcesFileInputStream(object, MAVEN_RESSOURCES, filename);\r\n }", "public InputStream openInputStream(String path) throws SystemException;", "protected abstract InputStream getFile(final String path);", "public InputStream openStream(String str) {\n try {\n return new FileInputStream(str);\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "public void read(final URL url) throws IOException, DataFormatException {\r\n\r\n final URLConnection connection = url.openConnection();\r\n final int fileSize = connection.getContentLength();\r\n\r\n if (fileSize < 0) {\r\n throw new FileNotFoundException(url.getFile());\r\n }\r\n\r\n final String mimeType = connection.getContentType();\r\n decoder = SoundRegistry.getSoundProvider(mimeType);\r\n\r\n if (decoder == null) {\r\n throw new DataFormatException(\"Unsupported format\");\r\n }\r\n\r\n decoder.read(url.openStream());\r\n }", "public synchronized InputStream getInputStream(String hash) throws IOException {\n\t\tif (null == hash) {\n\t\t\treturn null;\n\t\t}\n\t\t// RkLog.i(\"getInputStream\",\n\t\t// \"target file exist-->\"+getFile(hash).exists());\n\n\t\tInputStream is = new FileInputStream(getFile(hash));\n\n\t\treturn is;\n\t}", "public InputStream newInputStream(int index) throws IOException {\n\t\t\tsynchronized (DiskLruCache.this) {\n\t\t\t\tif (entry.currentEditor != this) {\n\t\t\t\t\tthrow new IllegalStateException();\n\t\t\t\t}\n\t\t\t\tif (!entry.readable) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn new FileInputStream(entry.getCleanFile(index));\n\t\t\t}\n\t\t}", "public ECFileCacheInputStream(FileCacheKey cacheKey, Map<Long, Integer> chunkPosAndSize, RedisAccessBase redisAccess,\n List<Integer> redisIds, InputStream stream) {\n this.key = cacheKey.getUuid();\n this.fileSize = (int) cacheKey.getFileSize();\n this.chunkPosAndSize = chunkPosAndSize;\n this.redisAccess = redisAccess;\n this.redisIds = redisIds;\n this.endChunkStream = stream;\n }", "private void loadFromURL(String url) throws IOException {\n URL destination = new URL(url);\r\n URLConnection conn = destination.openConnection();\r\n Reader r = new InputStreamReader(conn.getInputStream());\r\n load(r);\r\n }", "public java.io.Reader getReader (URL url) throws java.io.IOException;", "public Reader openHttp2Reader(URL url) throws IOException {\r\n return new InputStreamReader(openHttpEntity(url).getContent());\r\n }", "public GridFSInputFile createFile(InputStream in, String filename,\n\t boolean closeStreamOnPersist) {\n\treturn new GridFSInputFile(this, in, filename, closeStreamOnPersist);\n }", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "public InputStream getInputStream(long position);", "public static StreamedContent getStreamedContent(String url) {\n\t\tif (StringUtils.isBlank(url)) {\n\t\t\treturn null;\n\t\t}\n\t\tInputStream inputStream = null;\n\t\ttry {\n\t\t\tinputStream = new URL(url).openStream();\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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 (inputStream == null) {\n\t\t\treturn null;\n\t\t}\n\t\tStreamedContent streamedContent = new DefaultStreamedContent(inputStream, \"image/png\");\n\t\treturn streamedContent;\n\t}", "public HttpRequest(URL url) throws IOException {\r\n this(url.openConnection());\r\n }", "public static InputStream toInputStream(final String input) {\n return toInputStream(input, Charset.defaultCharset());\n }", "public void getObject(String url) throws UrlCacheException {\n\n\t\tHost host = new Host(url);\n\n\t\tboolean fileExists = checkCatalogForFile(url);\n\n\t\tbeginDownloadStream(host.getHostName(), host.getPort(), host.getConcatPath(), host.getFileName(), fileExists);\n\t}", "@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }", "public static FileObject getOrCreateFolder(URL url) throws IOException {\n try {\n FileObject result = URLMapper.findFileObject(url);\n if (result != null) {\n return result;\n }\n File f = Utilities.toFile(url.toURI());\n\n result = FileUtil.createFolder(f);\n return result;\n } catch (URISyntaxException ex) {\n throw new IOException(ex);\n }\n }", "public abstract InputStream openStream(String str);", "public interface InputStreamProvider {\n\n InputStream open() throws IOException;\n\n String getPath();\n}", "public ItemFactory(final String url) {\n this.url = url;\n }", "@Override\n public InputStream read()\n throws EFapsException\n {\n StoreResourceInputStream in = null;\n try {\n final FileObject file = this.manager.resolveFile(this.storeFileName + VFSStoreResource.EXTENSION_NORMAL);\n if (!file.isReadable()) {\n VFSStoreResource.LOG.error(\"file for \" + this.storeFileName + \" not readable\");\n throw new EFapsException(VFSStoreResource.class, \"#####file not readable\");\n }\n in = new VFSStoreResourceInputStream(this, file);\n } catch (final FileSystemException e) {\n VFSStoreResource.LOG.error(\"read of \" + this.storeFileName + \" failed\", e);\n throw new EFapsException(VFSStoreResource.class, \"read.Throwable\", e);\n } catch (final IOException e) {\n VFSStoreResource.LOG.error(\"read of \" + this.storeFileName + \" failed\", e);\n throw new EFapsException(VFSStoreResource.class, \"read.Throwable\", e);\n }\n return in;\n }", "public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }", "private InputStream downloadStream(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\t\treturn stream;\n\t}", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "private InputStream getInputStream (SvnClient client, SVNUrl url, String revision, String pegRevision) throws SVNClientException {\n InputStream in = null;\n try {\n in = client.getContent(url, SvnUtils.toSvnRevision(revision), SvnUtils.toSvnRevision(pegRevision));\n } catch (SVNClientException e) {\n if (SvnClientExceptionHandler.isFileNotFoundInRevision(e.getMessage()) ||\n SvnClientExceptionHandler.isPathNotFound(e.getMessage())) {\n in = new ByteArrayInputStream(new byte[]{});\n } else {\n throw e;\n }\n }\n return in;\n }", "public JsonParser createParser(URL url)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 782 */ IOContext ctxt = _createContext(url, true);\n/* 783 */ InputStream in = _optimizedStreamFromURL(url);\n/* 784 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "private static InputStream retrieveStream(String url) {\r\n\t\tDefaultHttpClient client = new DefaultHttpClient();\r\n\t\tHttpGet getRequest = new HttpGet(url);\r\n\t\t\r\n\t\ttry{\r\n\t\t\tHttpResponse getResponse = client.execute(getRequest);\r\n\t\t\tfinal int statusCode = getResponse.getStatusLine().getStatusCode();\r\n\t\t\tSystem.out.println(statusCode);\r\n\t\t\t\r\n\t\t\tif(statusCode != HttpStatus.SC_OK){\r\n\t\t\t\t//Log.w(getClass().getSimpleName(),\r\n\t\t\t\t\t\t//\"Error \" + statusCode + \" for URL \" + url);\r\n\t\t\t\tSystem.out.println(statusCode);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tHttpEntity getResponseEntity = getResponse.getEntity();\r\n\t\t\treturn getResponseEntity.getContent();\r\n\t\t}\r\n\t\t\r\n\t\tcatch(IOException e){\r\n\t\t\tgetRequest.abort();\r\n\t\t\t//Log.w(getClass().getSimpleName(),\"Error for URL \" + url, e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public InputStream getInputStream(Path path) throws IOException {\n Objects.requireNonNull(path);\n\n FileSystem fs = hdfsConfig.getFileSystem();\n if (fs.isFile(path)) {\n return fs.open(path);\n } else if(fs.isDirectory(path)) {\n FileStatus[] files = fs.listStatus(path);\n List<InputStream> paths = Arrays.stream(files)\n .map(f -> {\n try {\n return fs.open(f.getPath());\n } catch (IOException e) {\n LOGGER.log(Level.SEVERE, \"Cannot read file \" + f.getPath().toString(), e);\n return null;\n }\n })\n .filter(f -> f != null)\n .collect(Collectors.toList());\n return new SequenceInputStream(Collections.enumeration(paths));\n } else {\n throw new IllegalArgumentException(\"Given path \" + path.toString()\n + \" is neither file nor directory\");\n }\n }", "public InputStream getInputStream() throws IOException {\r\n if (!connected)\r\n connect();\r\n\r\n return zipFile.getInputStream(zipEntry);\r\n }", "private static InputStream getInputStream(final String filename) throws IOException, FileNotFoundException {\r\n final ResourcePatternResolver applicationContext = new ClassPathXmlApplicationContext(new String[] {});\r\n final Resource[] resource = applicationContext.getResources(\"classpath*:\" + filename);\r\n if (resource.length == 0) {\r\n throw new FileNotFoundException(\"Unable to find file '\" + filename + \"' in classpath.\");\r\n }\r\n return resource[0].getInputStream();\r\n }", "void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}", "public static InputStream openFileInputStream(final String fileName) throws IOException {\n\n return FileSystem.getInstance(fileName).openFileInputStream(fileName);\n }", "public DefaultDocumentSource(URL url) throws IOException\n {\n super(url);\n con = createConnection(url);\n is = null;\n }", "public InputStream get(Bitstream bitstream) throws IOException {\n try {\n return new FileInputStream(getFile(bitstream));\n } catch (Exception e) {\n log.error(\"get(\" + bitstream.getInternalId() + \")\", e);\n throw new IOException(e);\n }\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n // BEGIN_INCLUDE(get_inputstream)\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(100000 /* milliseconds */);\n conn.setConnectTimeout(150000 /* milliseconds */);\n// conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Start the query\n conn.connect();\n InputStream stream = conn.getInputStream();\n bitmap = BitmapFactory.decodeStream(stream);\n return stream;\n\n\n // END_INCLUDE(get_inputstream)\n }", "void loadFromInputStream(InputStream inputStream) throws IOException;", "public InputStream getInputStream() throws IOException {\n return new FileInputStream(_file);\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\n\t\treturn stream;\n\t}", "protected abstract InputStream getStream(String resource);", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n }", "public static InputStream download(FileSystem fs, String remotePath) throws IOException {\n return fs.open(new Path(remotePath));\n }", "Object create(URL url) throws IOException, SAXException, ParserConfigurationException;", "protected InputStream openFileStream(ResourceType type, String path) {\n // Create full path\n String fullPath = type.makePath(path);\n\n // Check overrided\n if (!ResourceOverrides.isResourceOverrided(fullPath)) {\n // =null: failed to load resource pack file\n this.handleLoad(true, false);\n if (this.archive != null) {\n try {\n InputStream stream = this.archive.openFileStream(fullPath);\n if (stream == null) {\n stream = this.archive.openFileStream(fullPath.toLowerCase(Locale.ENGLISH));\n }\n if (stream != null) {\n return stream;\n }\n } catch (IOException ex) {\n }\n }\n\n // Fallback: try the underlying resource pack (usually Vanilla)\n if (this.baseResourcePack != null) {\n InputStream stream = this.baseResourcePack.openFileStream(type, path);\n if (stream != null) {\n return stream;\n }\n }\n\n // Fallback: ask provider (if available)\n if (this.currProvider != null) {\n try {\n return this.currProvider.openResource(type, path);\n } catch (IOException ex) {\n }\n }\n }\n\n // Fallback: load from BKCommonLib built-in resources\n // This handles many block models such as signs\n InputStream bkc_stream = Common.class.getResourceAsStream(type.makeBKCPath(path));\n if (bkc_stream != null) {\n return bkc_stream;\n }\n\n // FAILED\n return null;\n }", "public synchronized InputStream getApplicationInputStream(String appName) {\n try {\n File appFile = appFile(appName, appName + OAR);\n if (!appFile.exists()) {\n appFile = appFile(appName, appName + JAR);\n }\n return new FileInputStream(appFile.exists() ? appFile : appFile(appName, APP_XML));\n } catch (FileNotFoundException e) {\n throw new ApplicationException(\"Application \" + appName + \" not found\");\n }\n }", "public static InputStream asInputStream(DataFile df) {\n return new DFInputStream(df);\n }", "public static java.io.File tryGet(String url) {\n\n java.io.File file = new java.io.File(url);\n if(file.exists() && !file.isDirectory()) {\n\n return file;\n }\n\n return null;\n }", "public InputStream getInputStream() throws IOException;", "public InputStream getInputStream() throws IOException;", "public static <T> T load(URL location) throws IOException {\n return builder().location(location).build().load();\n }", "public final SMBInputStream asInputStream()\n\t\tthrows SMBException {\n\n\t\t// Check if the file is a directory\n\n\t\tif ( isDirectory())\n\t\t\tthrow new SMBException(SMBStatus.DOSInvalidFunc, SMBStatus.ErrDos);\n\n\t\t// Create the input stream\n\n\t\treturn new SMBInputStream(this);\n\t}", "public InputStream getInputStream();", "public InputStream getInputStream();", "public PersistReader(final PersistenceLocation location) {\r\n\t\tthis.fileInput = location.createInputStream();\r\n\t\tthis.in = new ReadXML(this.fileInput);\r\n\t}", "public InputStream openInputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }", "private static BufferedReader newReader(URL url) throws IOException {\n return newReader(url.openConnection().getInputStream());\n }", "public Parser(URL url) {\n \t\t\ttry {\n \t\t\t\tload(url.openStream());\n \t\t\t} catch (Exception e) {\n \t\t\t\t// continue ... actual parsing will report errors\n \t\t\t}\n \t\t}", "public interface ExternalizableInputStream {\n\n /**\n * Get a URI that is specific to the current session, and may be used in any context internal or external. The URI must not\n * be stored and must not be shared between clients. For a wider range of URIs the caller should use the URIProvider class\n * directly and not this interface.\n * @return a URI intended for any network context.\n */\n @NotNull URI getURI();\n\n}", "private InputStream downloadUrl(String urlString) throws IOException {\n\t URL url = new URL(urlString);\n\t HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t conn.setReadTimeout(10000 /* milliseconds */);\n\t conn.setConnectTimeout(15000 /* milliseconds */);\n\t conn.setRequestMethod(\"GET\");\n\t conn.setDoInput(true);\n\t // Starts the query\n\t conn.connect();\n\t return conn.getInputStream();\n\t}", "public InputStream readFile( String fileName, FileType type );", "protected InputStream loadFile(String zipPath) throws Exception {\n\t\treturn Files.newInputStream(Paths.get(zipPath));\n\t}", "public static FileInputStream getMavenTestRessourcesFileInputStream(\r\n\t Object object, String filename)\r\n {\r\n\treturn FilesURLs.getRessourcesFileInputStream(object,\r\n\t\tMAVEN_TEST_RESSOURCES, filename);\r\n }", "public OnDemandInputStream(File file) {\n super();\n\n this.file = file;\n }", "static Reader createReaderFromStream(Path path, FSDataInputStream fsdis, long size,\n CacheConfig cacheConf, Configuration conf) throws IOException {\n FSDataInputStreamWrapper wrapper = new FSDataInputStreamWrapper(fsdis);\n return pickReaderVersion(path, wrapper, size, cacheConf, null, conf);\n }", "public InputStream getEntityContent(String url) throws ClientProtocolException, IOException {\n HttpGet getMethod = new HttpGet(url);\n HttpResponse response = httpClient.execute(getMethod);\n HttpEntity entity = response.getEntity();\n return entity == null ? null : entity.getContent();\n }", "InputStream getInputStream() {\r\n\r\n\t\tif (inputStream != null) {\r\n\t\t\treturn inputStream;\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\treturn new FileInputStream(path);\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\tthrow new RuntimeException(\"Configuration file could not be loaded from \" + getPath());\r\n\t\t\t} // catch\r\n\t\t} // else\r\n\t}" ]
[ "0.67389846", "0.6485616", "0.63381875", "0.61841565", "0.60747784", "0.59731174", "0.5845492", "0.5782054", "0.5664547", "0.54625666", "0.545451", "0.53708", "0.5321529", "0.52271014", "0.520839", "0.5146172", "0.5135265", "0.51305205", "0.5122883", "0.5082446", "0.5081343", "0.50600284", "0.50521564", "0.5043249", "0.50406265", "0.50336176", "0.49887788", "0.49624678", "0.4949417", "0.49167967", "0.49155718", "0.4914277", "0.49049255", "0.48853686", "0.48550624", "0.48545602", "0.4852175", "0.48392683", "0.48383003", "0.48325998", "0.48243558", "0.48174337", "0.48174337", "0.48174337", "0.48157522", "0.4815698", "0.48146275", "0.48011366", "0.4773034", "0.4748328", "0.47094473", "0.47071376", "0.47038677", "0.46969566", "0.46928436", "0.46872663", "0.46814066", "0.46743873", "0.46743873", "0.4656526", "0.46443135", "0.46397737", "0.46216568", "0.4619374", "0.4618369", "0.46005732", "0.4596586", "0.45894343", "0.45786482", "0.45672628", "0.4556571", "0.4508249", "0.45059195", "0.44984853", "0.4494064", "0.44796464", "0.44755432", "0.4473188", "0.4462837", "0.44592068", "0.4454414", "0.4447844", "0.4447844", "0.44452915", "0.44437388", "0.4441976", "0.4441976", "0.44389462", "0.44319016", "0.44125164", "0.44122452", "0.4404197", "0.44007993", "0.43946567", "0.4386689", "0.43737322", "0.4371449", "0.43671653", "0.43589172", "0.43563488" ]
0.8001872
0
Check if there are overlapped bookings
public boolean checkDuplicates() { List<Booking> dupbookings = new ArrayList<>(); try { dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime); } catch (Exception e) { //facesMessage("No other bookings found for the day and time"); } return dupbookings.size() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean areOverlapping() {\n return areOverlapping;\n }", "private boolean detectOverlapping(Exemplar ex){\n Exemplar cur = m_Exemplars;\n while(cur != null){\n if(ex.overlaps(cur)){\n\treturn true;\n }\n cur = cur.next;\n }\n return false;\n }", "protected boolean isOverlapping(ArrayList<Rectangle> first, ArrayList<Rectangle> second) {\n\t\tfor (Rectangle f : first) {\n\t\t\tfor (Rectangle s : second) {\n\t\t\t\tif (f.overlaps(s)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void checkOverlaps() {\r\n final ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);\r\n final int count = getOutlineNumber();\r\n boolean firstpass = true;\r\n do {\r\n for (int cc = 0; cc < count; cc++) {\r\n final Outline outline = getOutline(cc);\r\n int vertexCount = outline.getVertexCount();\r\n for(int i=0; i < outline.getVertexCount(); i++) {\r\n final Vertex currentVertex = outline.getVertex(i);\r\n if ( !currentVertex.isOnCurve()) {\r\n final Vertex nextV = outline.getVertex((i+1)%vertexCount);\r\n final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);\r\n final Vertex overlap;\r\n\r\n // check for overlap even if already set for subdivision\r\n // ensuring both triangular overlaps get divided\r\n // for pref. only check in first pass\r\n // second pass to clear the overlaps array(reduces precision errors)\r\n if( firstpass ) {\r\n overlap = checkTriOverlaps0(prevV, currentVertex, nextV);\r\n } else {\r\n overlap = null;\r\n }\r\n if( overlaps.contains(currentVertex) || overlap != null ) {\r\n overlaps.remove(currentVertex);\r\n\r\n subdivideTriangle(outline, prevV, currentVertex, nextV, i);\r\n i+=3;\r\n vertexCount+=2;\r\n addedVerticeCount+=2;\r\n\r\n if(overlap != null && !overlap.isOnCurve()) {\r\n if(!overlaps.contains(overlap)) {\r\n overlaps.add(overlap);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n firstpass = false;\r\n } while( !overlaps.isEmpty() );\r\n }", "private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }", "boolean overlap(Reservation other);", "public abstract boolean overlap(Catcher catcher, FallingObject object);", "private boolean overlaps(ThingTimeTriple a, ThingTimeTriple b)\r\n/* 227: */ {\r\n/* 228:189 */ return (a.from < b.to) && (a.to > b.from);\r\n/* 229: */ }", "private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }", "private boolean doesBoatOverlap(int startIndexX, int startIndexY, int endIndexX, int endIndexY) {\n boolean overlap = false;\n int startX = Math.min(startIndexX, endIndexX);\n int endX = Math.max(startIndexX, endIndexX);\n int startY = Math.min(startIndexY, endIndexY);\n int endY = Math.max(startIndexY, endIndexY);\n \n for (int i = startX; i <= endX; i++) {\n for (int j = startY; j <= endY; j++) {\n overlap = (grid[i][j].getHasBoat()) ? true : overlap;\n if (overlap) { return overlap; } //returns at first instance of boatOverlapping\n }\n }\n return overlap;\n }", "boolean isPartiallyOverlapped(int[] x, int[] y) {\n return y[0] <= x[1]; //정렬이 이미 되어 있어서 simplify 할 수 있음\n }", "private boolean isTimeOverlap(Item t) {\n\t\treturn t.getEndDate().equals(event.getEndDate());\n\t}", "public boolean validateOverlap(ObservableList<Appointment> test){\n LocalDateTime A = startLDT;\n LocalDateTime Z = endLDT;\n\n for(Appointment appt : test){\n if(appt.getId() == selectedRow.getId()){\n continue;\n }\n LocalDateTime S = LocalDateTime.parse(appt.getStart(), formatter);\n LocalDateTime E = LocalDateTime.parse(appt.getEnd(), formatter);\n //case 1 - when the start is in the window\n if((A.isAfter(S) || A.isEqual(S)) && A.isBefore(E)){\n return false;\n }\n //case 2 - when the end is in the window\n if(Z.isAfter(S) && (Z.isBefore(E) || Z.isEqual(E))){\n return false;\n }\n //case 3 - when the start and end are outside of the window\n if(((A.isBefore(S) || A.isEqual(S)) && (Z.isAfter(E) || Z.isEqual(E)))){\n return false;\n }\n }\n return true;\n }", "static boolean doTheseOverlap(RBox b1, RBox b2){\n\t\t\n\t\tif(contains(b1,b2))\n\t\t\treturn true;\n\t\t\n\t\tif(contains(b2,b1))\n\t\t\treturn true;\n\t\t\n\t\tboolean xOverlap=false ;\n\t\tboolean yOverlap=false ;\n\t\t\n\t\tif(b1.xmax==b2.xmin && b2.xmax > b1.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif(b2.xmax==b1.xmin && b1.xmax > b2.xmax)\n\t\t\treturn false;\n\t\t\n\t\tif((b1.xmin<=b2.xmin&&b1.xmax>=b2.xmax)||(b2.xmin<=b1.xmin&&b2.xmax>=b1.xmax))\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\tif(b1.xmin >= b2.xmin && b1.xmin <= b2.xmax)\n\t\t\txOverlap=true;\n\t\t\n\t\tif(!xOverlap)\n\t\t if(b1.xmax >= b2.xmin && b1.xmax <= b2.xmax)\n\t\t \txOverlap = true;\n\t\t else{//System.out.println(\"X overlap\");\n\t\t \treturn false;}\n\t\t\n\t\t\n\t\tif((b1.ymin<=b2.ymin&&b1.ymax>=b2.ymax)||(b2.ymin<=b1.ymin&&b2.ymax>=b1.ymax))\n\t\t yOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\tif(b1.ymin>=b2.ymin && b1.ymin<=b2.ymax)\n\t\t\tyOverlap=true;\n\t\t\n\t\tif(!yOverlap)\n\t\t\tif(b1.ymax>=b2.ymin && b1.ymax<=b2.ymax)\n\t\t\t\tyOverlap=true;\n\t\t\telse{\n\t\t\t\t//System.out.println(\"Y overlap\");\n\t\t\t\treturn false;}\n\t\t\n\t\tif(xOverlap&&yOverlap)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "boolean bookingListIsNotFull(Book book);", "private static boolean areOverlapping( int a[], int sz, int pos, int len )\n {\n \tfor( int i=0; i<sz; i++ ){\n \t if( areOverlapping( a[i], pos, len ) ){\n \t\treturn true;\n \t }\n \t}\n \treturn false;\n }", "private boolean isOverlapped(BpmnShape s1, BpmnShape s2){\n\t\t\n\t\ttry{\n\t\t\t//Two tasks\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Task)\n\t\t\t\treturn this.overlappingTasks(s1,s2);\n\t\t\t\n\t\t\t//Two Events\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Event) {\n\t\t\t\treturn this.overlappingEvents(s1,s2);\n\t\t\t}\n\t\t\t\n\t\t\t//Two Gateways\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingGateways(s1,s2);\n\t\t\t\n\t\t\t//One Task and one Event\n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingTaskAndEvent(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndEvent(s2, s1);\n\t\t\t\n\t\t\t//One Task and one Gateway \n\t\t\tif (s1.getBpmnElement() instanceof Task && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingTaskAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Task )\n\t\t\t\treturn this.overlappingTaskAndGateway(s2, s1);\t\t\n\t\t\t\n\t\t\t//One Event and one Gateway\n\t\t\tif (s1.getBpmnElement() instanceof Event && s2.getBpmnElement() instanceof Gateway)\n\t\t\t\treturn this.overlappingEventAndGateway(s1,s2);\n\t\t\t\n\t\t\tif (s1.getBpmnElement() instanceof Gateway && s2.getBpmnElement() instanceof Event)\n\t\t\t\treturn this.overlappingEventAndGateway(s2, s1);\n\t\t}catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\treturn false;\n\t}", "public boolean willOverlap() {\n/* 208 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private boolean hasOverlap(int[] i1, int[] i2)\n {\n // Special case of consecutive STEP-BY-STEP intervals\n if(i1[0] <= i2[0] && i2[0] <= i1[1])\n return true;\n if(i2[0] <= i1[0] && i1[0] <= i2[1])\n return true;\n return false;\n }", "public boolean isOverlapping(Filter f);", "private boolean overlappingEvents(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isOverlapped(ArrayList<Schedule> schedules,\n DateTime startTime, DateTime endTime){\n for (int i = 0; i < schedules.size(); i++) {\n Schedule curSchedule = schedules.get(i);\n if (curSchedule == null)\n continue;\n if (!(startTime.isAfter(curSchedule.getEndTime().minusMinutes(1)) ||\n endTime.isBefore(curSchedule.getStartTime().plusMinutes(1))))\n return true;\n }\n return false;\n }", "private boolean isClashing() {\n\t\tArrayList<Item> events = getEvents();\n\t\tfor (Item t : events) {\n\t\t\tif (isTimeOverlap(t)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean adjoinsEclusive(Rectangle rectangle) {\n int startX = Math.max(start.getX(), rectangle.start.getX());\n int startY = Math.max(start.getY(), rectangle.start.getY());\n\n int endX = Math.min(end.getX(), rectangle.end.getX());\n int endY = Math.min(end.getY(), rectangle.end.getY());\n\n return startX < endX && startY < endY;\n }", "private boolean overlaps(Point2D p0, Point2D p1)\n {\n return Math.abs(p0.getX() - p1.getX()) < 0.001 && Math.abs(p0.getY() - p1.getY()) < 0.001;\n }", "static boolean isAABBOverlapping(final Entity a, final Entity b) {\n return !(a.right() <= b.left()\n || b.right() <= a.left()\n || a.bottom() <= b.top()\n || b.bottom() <= a.top());\n }", "boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }", "private boolean overlapsWithBreak(TimeSpan timeSpan)\n\t{\n\t\tif(timeSpan.getStartTime().toLocalTime().isAfter(getBreakTime().getStartTime()) && timeSpan.getStartTime().toLocalTime().isBefore(getBreakTime().getEndTime())) {\n\t\t\treturn true;\n\t\t}\n\t\tif(timeSpan.getEndTime().toLocalTime().isAfter(getBreakTime().getStartTime()) && timeSpan.getEndTime().toLocalTime().isBefore(getBreakTime().getEndTime())) {\n\t\t\treturn true;\n\t\t}\n\t\tif(timeSpan.getStartTime().toLocalTime().isBefore(getBreakTime().getStartTime()) && timeSpan.getEndTime().toLocalTime().isAfter(getBreakTime().getEndTime())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean overlap(Event e)\n\t{\n\t\tTimeInterval compare = e.getTI();\n\t\tif ((compare.st.getHour() <= this.st.getHour()) && (this.st.getHour() <= compare.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if ((this.st.getHour() <= compare.st.getHour()) && (compare.st.getHour() <= this.et.getHour()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean CheckOverlap(int Customer_ID, LocalDate date, LocalTime start, LocalTime end, int Appointment_ID) {\n\n ObservableList<Appointment> AList = DBAppointments.GetAllAppointment();\n ObservableList<Appointment> FList = AList.filtered(A -> {\n if (A.getAppointment_ID() != Appointment_ID /*&& A.getCustomerid() == Customer_ID*/) {\n return true;\n\n }\n return false;\n });\n\n LocalDateTime ps = LocalDateTime.of(date, start);\n LocalDateTime pe = LocalDateTime.of(date, end);\n for (Appointment a : FList) {\n LocalDateTime as = LocalDateTime.of(a.getDate(), a.getStartTime());\n LocalDateTime ae = LocalDateTime.of(a.getDate(), a.getEndTime());\n\n if ((as.isAfter(ps) || as.isEqual(ps)) && as.isBefore(pe)) {\n return true;\n }\n if (ae.isAfter(ps) && (ae.isBefore(pe) || ae.isEqual(pe))) {\n return true;\n }\n if ((as.isBefore(ps) || as.isEqual(ps)) && (ae.isAfter(pe) || ae.isEqual(pe))) {\n return true;\n }\n }\n\n return false;\n }", "public boolean adjoins(Rectangle rectangle) {\n int startX = Math.max(start.getX(), rectangle.start.getX());\n int startY = Math.max(start.getY(), rectangle.start.getY());\n\n int endX = Math.min(end.getX(), rectangle.end.getX());\n int endY = Math.min(end.getY(), rectangle.end.getY());\n\n return startX <= endX && startY <= endY;\n }", "public boolean book(int start, int end) {\n for (Integer[] slot : slots)\n {\n if((start < slot[0] && end < slot[0]) || start > slot[1] && end > slot[1]){\n continue;\n }\n else{\n return false;\n }\n }\n slots.add(new Integer[]{start,end});\n return true;\n }", "public boolean overlaps(CompositeKey s) {\n\t if (this.key2 == 0 && s.getKey2() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\tif (this.key2 == 0) {\n\t\t\treturn (this.key1 < s.getKey2());\n\t\t}\n\t\tif (s.getKey2() == 0) {\n\t\t\treturn !(this.key2 <= s.getKey1());\n\t\t}\n\treturn !(this.key2 <= s.getKey1() || this.key1 >= s.getKey2());\n}", "public boolean isOverlapping(int appointmentId, String start, String end) throws Exception {\n\n //A Fetcher object for getting the appointments from the database. I discovered an error where the Fetcher and\n //DateAndTime class call each other back and forth in a never-ending loop if I declare them outside the methods\n //ie as global variables.\n Fetcher fetcher = new Fetcher();\n //A list of appointments that have been fetched from the database. Used for extracting start/end times\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n fetcher.fetchAppointments(appointments);\n\n //Convert the provided start/end strings to LocalDateTime variables\n LocalDateTime startTime = LocalDateTime.parse(start, dateTimeFormatter);\n LocalDateTime endTime = LocalDateTime.parse(end, dateTimeFormatter);\n\n //Loop through the entire appointments list and set each start/end time to a LocalDateTime variable to be\n //compared.\n for(int i = 0; i < appointments.size(); i++){\n\n //If the appointment ID matches an existing ID in the database, continue to the next iteration.\n if(appointments.get(i).getAppointmentId() == appointmentId){\n continue;\n }\n\n //Create LocalDateTimes from start/end strings from the current appointment.\n LocalDateTime appointmentStart = LocalDateTime.parse(appointments.get(i).getStart(), dateTimeFormatter);\n LocalDateTime appointmentEnd = LocalDateTime.parse(appointments.get(i).getEnd(), dateTimeFormatter);\n\n //If the start time is greater than or equal to an existing appointment start time AND the end time is less\n //than that appointment's end time, the appointments overlap and return true.\n if(startTime.equals(appointmentStart) || (startTime.isAfter(appointmentStart) && startTime.isBefore(appointmentEnd)) ) {\n return true;\n }\n\n //If the end time is equal to an existing appointment end OR the end time is after an existing appointment\n //start time AND before the existing appointment end time, they overlap and return true.\n if(endTime.equals(appointmentEnd) || (endTime.isAfter(appointmentStart) && endTime.isBefore(appointmentEnd))){\n return true;\n }\n }\n\n //If none of the conditions apply, the appointments do not overlap and return false.\n return false;\n\n\n }", "public boolean checkOverlappingTimes(LocalDateTime startA, LocalDateTime endA,\n LocalDateTime startB, LocalDateTime endB){\n return (endB == null || startA == null || !startA.isAfter(endB))\n && (endA == null || startB == null || !endA.isBefore(startB));\n }", "private static boolean doBoundingBoxesIntersect(Rectangle a, Rectangle b) {\r\n\t return a.getMinX() <= b.getMaxX() \r\n\t && a.getMaxX() >= b.getMinX() \r\n\t && a.getMinY() <= b.getMaxY()\r\n\t && a.getMaxY() >= b.getMinY();\r\n\t}", "public static boolean appointmentOverlap(Timestamp startTimestamp, Timestamp endTimestamp) {\n updateAppointmentList();\n ObservableList<Appointment> appointmentList = AppointmentList.getAppointmentList();\n for (Appointment appointment: appointmentList) {\n Timestamp existingStartTimestamp = appointment.getStartTimestamp();\n Timestamp existingEndTimestamp = appointment.getEndTimestamp();\n // Check various scenarios for where overlap would occur and return true if any occur\n if (startTimestamp.after(existingStartTimestamp) && startTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (endTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.before(existingStartTimestamp) && endTimestamp.after(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.equals(existingStartTimestamp)) {\n return true;\n }\n if (endTimestamp.equals(existingEndTimestamp)) {\n return true;\n }\n }\n // If none of the above scenarios occur, return false\n return false;\n }", "public boolean checkDoubleBooking(LocalDateTime start, LocalDateTime end, ArrayList<String> eventIds){\n for (String id: eventIds){\n if (checkOverlappingTimes(getEvent(id).getStartTime(), getEvent(id).getEndTime(),\n start, end)){\n return false;\n }}\n return true;\n }", "private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }", "private boolean overlappingTaskAndEvent(BpmnShape s1, BpmnShape s2) {\n\t\t\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth && firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void findOverlap() {\n\n int[] A = new int[] {1,3,5,7,10};\n int[] B = new int[] {-2,2,5,6,7,11};\n\n List<Integer> overlap = new ArrayList<Integer>();\n overlap.add(5);\n overlap.add(7);\n\n Assert.assertEquals(overlap,Computation.findOverlap(A,B));\n\n }", "@Test\r\n public void testGetOverlappingTimeCells() {\r\n assertEquals(9, cellToInsert.getOverlappingTimeCells(listToCompare).size());\r\n }", "private boolean compareBookings(Iterable<Booking> bookings,\n\t\t\tBookingRequest booking) {\n\t\tfor (Booking book : bookings) {\n\t\t\tif (book.getPerformer().equals(booking.getPerformer())\n\t\t\t\t\t&& book.getVenueName().equals(booking.getVenueName())\n\t\t\t\t\t&& booking.getOpen().equals(book.getOpen())\n\t\t\t\t\t&& booking.getClose().equals(book.getClose())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "static boolean rectanglesOverlap(Rectangle r1, Rectangle r2){\n List<int[]> pointsOfInterest = new ArrayList<int[]>();\n for (int[] i : r1.getPoints())\n for (int[] j : r2.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r2.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n\n // Check if any points in rectangle 2 fall in 1\n //List<int[]> pointsOfInterest = new ArrayList<int[]>();\n pointsOfInterest.clear();\n for (int[] i : r2.getPoints())\n for (int[] j : r1.getPoints())\n if (i[0] >= j[0] && i[1] >= j[1])\n pointsOfInterest.add(i); \n\n if (!pointsOfInterest.isEmpty())\n for (int[] i : pointsOfInterest)\n for (int[] j : r1.getPoints())\n if (i[0] <= j[0] && i[1] <= j[1])\n return true;\n \n return false;\n }", "private boolean checkGap() { //Checks if any gap due to previously deleted resv\n\t\tif (numOfReservation == 0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn !(rList.get(rList.size()-1).getResvNo() == numOfReservation);\n\t}", "@Test\n\tpublic void testCheckConflictOverlappingTimes() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC226\", \"Discrete Math\", \"001\", 3, \"sesmith5\", 12, \"MW\", 1445, 1545);\n\t\ttry {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"MW 2:45PM-3:45PM\", a2.getMeetingString());\n\t\t }\n\t}", "private boolean takeoutOverlaps(\r\n\t\t\tint root_frame_idx,\r\n\t\t\tint group_right_offset_idx,\r\n\t\t\tString [] segments_strs) {\r\n\r\n\t\tfor(int i = root_frame_idx; i < (root_frame_idx+group_right_offset_idx); i++) {\r\n\t\t\tfor(int j = 0; j < segments_strs.length; j ++) {\r\n\t\t\t\tString test_segment = segments_strs[j];\r\n\t\t\t\tSkeletonNode test_node = skeletonWrappers[i].getFromHash(test_segment);\r\n\r\n\t\t\t\t/**If node exist for this frame group within the skeleton\r\n\t\t\t\t * wrappers, remove it so that it does not appear in this\r\n\t\t\t\t * location for other frame groups with lower position in\r\n\t\t\t\t * the sorted list of frame groups**/\r\n\t\t\t\tif(test_node != null) {\r\n\t\t\t\t\tskeletonWrappers[i].remopveFromHash(test_segment);\r\n\t\t\t\t\tif(test_node.isFirstLevel()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**If this node doesn't exit then it must already\r\n\t\t\t\t * belong to some other frame group with higher\r\n\t\t\t\t * significance. So filter this frame group out.**/\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public boolean ifOverlap(Block b) {\n\t\tint thisR1 = this.getTopLeft().getRow();\n\t\tint thisR2 = this.getBotRight().getRow();\n\t\tint thisC1 = this.getTopLeft().getCol();\n\t\tint thisC2 = this.getBotRight().getCol();\n\t\tint R1 = b.getTopLeft().getRow();\n\t\tint R2 = b.getBotRight().getRow();\n\t\tint C1 = b.getTopLeft().getCol();\n\t\tint C2 = b.getBotRight().getCol();\n\t\tint maxR1 = Math.max(thisR1, R1);\n\t\tint minR2 = Math.min(thisR2, R2);\n\t\tint maxC1 = Math.max(thisC1, C1);\n\t\tint minC2 = Math.min(thisC2, C2);\n\n\t\treturn minR2 >= maxR1 && minC2 >= maxC1;\n\t}", "public boolean checkDoubleBooking(String eventId, ArrayList<String> eventIds){\n LocalDateTime start = eventIdToStartTime(eventId);\n LocalDateTime end = eventIdToEndTime(eventId);\n for (String id: eventIds){\n if (checkOverlappingTimes(getEvent(id).getStartTime(), getEvent(id).getEndTime(),\n start, end)){\n return false;\n }}\n return true;\n\n }", "private boolean checkNonOverlapping(Set<Integer> mintermSet, Set<Integer> dontCareSet) {\n\t\treturn Collections.disjoint(mintermSet, dontCareSet);\n\t}", "@Test(expected = ValidationException.class)\n\tpublic void testFailedBooking_OverlappedBookings1() throws ParseException {\n\t\t// Preparing booking data\n\t\tBooking booking = getExpectedBookingEntity();\n\t\t\n\t\tcom.paypal.bfs.test.bookingserv.service.model.Booking bookingServiceLayer \n\t\t = getServiceLayerBooking();\n\n\t\tMockito.when(bookingRepository.save(Mockito.any())).thenReturn(booking);\n\t\t\n\t\tbookingClient.createBooking(bookingServiceLayer);\n\t\t\n\t\tMockito.when(bookingRepository.findExistingBookings(booking.getFirstName(), \n\t\t\t\tbooking.getLastName(), booking.getDateOfBirth(), \n\t\t\t\tbooking.getAddress().getZipCode())).thenReturn(Arrays.asList(booking));\n\t\tMockito.when(messageUtil.getLocalizedMessage(Mockito.anyString())).thenReturn(\"Test message\");\n\t\t\n\t\t//Try to persist same booking again\n\t\tbookingServiceLayer.setCheckIn(bookingServiceLayer.getCheckIn()+2);\n\t\tbookingClient.createBooking(bookingServiceLayer);\n\t\t\n\t}", "public boolean doOverlapNew(VIntWritable[] e1, VIntWritable[] e2){\n\t\tSet<VIntWritable> intersection = new HashSet<>(Arrays.asList(e1));\t\t\t\t\n\t\tintersection.retainAll(Arrays.asList(e2));\t\t\n\t\t\n\t\t//System.out.println(\"overlap? \"+ (intersection.isEmpty() ? false : true));\n\t\treturn intersection.isEmpty() ? false : true;\n\t\t\n\t\t//SOLUTION 2: slower O(nlogn) but needs less space\n//\t\tArrays.sort(e1); //O(nlogn)\n//\t\tfor (VIntWritable tmp : e2) { //O(m)\n//\t\t\tif (Arrays.binarySearch(e1, tmp) == -1) //O(logm)\n//\t\t\t\treturn false;\n//\t\t}\n//\t\treturn true;\n\t\t\n\t\t\n\t\t\t\n\t}", "private boolean checkOverlap(int row, int col, int length){\n \tif(!inBounds(row,col)){\n \t\treturn false;\n \t}\n \tfor(int i = row; i < row + length; i++ ){\n\t\t\tfor(int j = col; j < col + length; j++){\n\t\t\t\tif(grid[i][col] == 1 || row + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t\tif(grid[row][j] == 1 || col + length >= 10)\n\t\t\t\t\treturn false;\n\t\t\t}\n \t\t\n \t}\n \treturn true;\n }", "@Test(expected = ValidationException.class)\n\tpublic void testFailedBooking_OverlappedBookings2() throws ParseException {\n\t\t// Preparing booking data\n\t\tBooking booking = getExpectedBookingEntity();\n\t\t\n\t\tcom.paypal.bfs.test.bookingserv.service.model.Booking bookingServiceLayer \n\t\t = getServiceLayerBooking();\n\n\t\tMockito.when(bookingRepository.save(Mockito.any())).thenReturn(booking);\n\t\t\n\t\tbookingClient.createBooking(bookingServiceLayer);\n\t\t\n\t\tMockito.when(bookingRepository.findExistingBookings(booking.getFirstName(), \n\t\t\t\tbooking.getLastName(), booking.getDateOfBirth(), \n\t\t\t\tbooking.getAddress().getZipCode())).thenReturn(Arrays.asList(booking));\n\t\tMockito.when(messageUtil.getLocalizedMessage(Mockito.anyString())).thenReturn(\"Test message\");\n\t\t//Try to persist same booking again\n\t\tbookingServiceLayer.setCheckOut(bookingServiceLayer.getCheckOut()-2);\n\t\tbookingClient.createBooking(bookingServiceLayer);\n\t\t\n\t}", "public boolean overlaps(int i, int j) {\n int start1 = start(i);\n int end1 = end(i);\n int start2 = start(j);\n int end2 = end(j);\n\n return (start1 <= start2 && end1 >= start2)\n ||\n (start1 <= end2 && end1 >= end2);\n }", "public boolean overlapsWith (Stick other)\r\n {\r\n return Math.max(getStart(), other.getStart()) < Math.min(\r\n getStop(),\r\n other.getStop());\r\n }", "protected boolean checkForDedOverlaps(final Collection<IndexedDiskElementDescriptor> sortedDescriptors)\r\n {\r\n final ElapsedTimer timer = new ElapsedTimer();\r\n boolean isOk = true;\r\n long expectedNextPos = 0;\r\n for (final IndexedDiskElementDescriptor ded : sortedDescriptors) {\r\n if (expectedNextPos > ded.pos)\r\n {\r\n log.error(\"{0}: Corrupt file: overlapping deds {1}\", logCacheName, ded);\r\n isOk = false;\r\n break;\r\n }\r\n expectedNextPos = ded.pos + IndexedDisk.HEADER_SIZE_BYTES + ded.len;\r\n }\r\n log.debug(\"{0}: Check for DED overlaps took {1} ms.\", () -> logCacheName,\r\n timer::getElapsedTime);\r\n\r\n return isOk;\r\n }", "public boolean overlaps(Triangle2D t) {\n\t\treturn true;\n\t}", "public static boolean areInstantsOverlapping(Instant externalStart, Instant externalEnd, Instant calendarStart,\n\t\t\tInstant calendarEnd) {\n\n\t\tif ((externalStart.isAfter(calendarStart) || externalStart.equals(calendarStart))\n\t\t\t\t&& (externalStart.isBefore(calendarEnd))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((externalEnd.isAfter(calendarStart))\n\t\t\t\t&& (externalEnd.isBefore(calendarEnd) || externalEnd.equals(calendarStart))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((externalStart.isBefore(calendarStart) || externalStart.equals(calendarStart))\n\t\t\t\t&& (externalEnd.isAfter(calendarEnd) || externalEnd.equals(calendarEnd))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasDestRange();", "public static boolean adjoinsExclusive(Collection<Rectangle> rectangles) {\n List<Rectangle> rectanglesList = new ArrayList<Rectangle>(rectangles);\n while (!rectanglesList.isEmpty()) {\n Rectangle rectangle = rectanglesList.remove(0);\n for (Rectangle others : rectanglesList) {\n if (rectangle.adjoinsEclusive(others)) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean overlappingEventAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX();\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean hasOverlap(Cluster cluster1, Cluster cluster2) {\n return (cluster1.startTime < cluster2.endTime &&\n cluster2.startTime < cluster1.endTime);\n }", "protected boolean isColliding() {\n\t\treturn phxService.isColliding(this);\n\t}", "protected boolean isfull() {\n return this.numSeats == this.bookedSeats;\n }", "boolean checkIfValidToCreate(int start, int end) {\n return myMarkerTree.processOverlappingWith(start, end, region->{\n int rStart = region.getStartOffset();\n int rEnd = region.getEndOffset();\n if (rStart < start) {\n if (region.isValid() && start < rEnd && rEnd < end) {\n return false;\n }\n }\n else if (rStart == start) {\n if (rEnd == end) {\n return false;\n }\n }\n else {\n if (rStart > end) {\n return true;\n }\n if (region.isValid() && rStart < end && end < rEnd) {\n return false;\n }\n }\n return true;\n });\n }", "@Override\r\n\tpublic boolean overlapCheck(String email) {\n\t\treturn select(\"email\", email).size()==0;\r\n\t}", "@Override\r\n\tpublic boolean canControlPointOverlap(int index) {\n\t\tswitch (getPointCount()) {\r\n\t\tcase TWO:\r\n\t\t\treturn false;\r\n\t\tcase THREE:\r\n\t\t\treturn index == 1;\r\n\t\tcase FOUR:\r\n\t\t\treturn index == 1 || index == 2;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean book1(int start, int end) {\n \n Integer prevSlotX = slots1.floorKey(start);\n if (prevSlotX!=null && slots1.get(prevSlotX) > start )\n return false;\n \n Integer nextSlotX = slots1.ceilingKey(start);\n if (nextSlotX!=null && nextSlotX < end) return false;\n \n slots1.put(start, end);\n return true;\n }", "default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }", "@Test\n \tpublic void testOverlapsWith()\n \t{\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)));\n \t\t\n \t\t// 1. [1,2] [2,4] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)));\n \t\t\n \t\t// 2. [1,3] [2,5] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)));\n \t\t\n \t\t// 3. [1,5] [0,6] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 0, 6, 0, 0)));\n \t\t\n \t\t// 4. [2,4] [1,2] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)));\n \t\t\n \t\t// 5. [2,5] [1,3] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)));\n \t}", "@Test\r\n public void testGetOverlappingType() {\r\n //Tests oerlapping type\r\n assertEquals(31, cellToInsert.getOverlappingType(listToCompare.get(0)));\r\n assertEquals(33, cellToInsert.getOverlappingType(listToCompare.get(1)));\r\n assertEquals(32, cellToInsert.getOverlappingType(listToCompare.get(2)));\r\n assertEquals(21, cellToInsert.getOverlappingType(listToCompare.get(3)));\r\n assertEquals(23, cellToInsert.getOverlappingType(listToCompare.get(4)));\r\n assertEquals(22, cellToInsert.getOverlappingType(listToCompare.get(5)));\r\n assertEquals(11, cellToInsert.getOverlappingType(listToCompare.get(6)));\r\n assertEquals(13, cellToInsert.getOverlappingType(listToCompare.get(7)));\r\n assertEquals(12, cellToInsert.getOverlappingType(listToCompare.get(8)));\r\n }", "private boolean overlaps(Exemplar ex) {\n\n if(ex.isEmpty() || isEmpty())\n\treturn false;\n\n for (int i = 0; i < numAttributes(); i++){\n\t \n\tif(i == classIndex()){\n\t continue;\n\t}\n\tif (attribute(i).isNumeric() && \n\t (ex.m_MaxBorder[i] < m_MinBorder[i] || ex.m_MinBorder[i] > m_MaxBorder[i])){\n\t return false;\n\t}\n\tif (attribute(i).isNominal()) {\n\t boolean in = false;\n\t for (int j = 0; j < attribute(i).numValues() + 1; j++){\n\t if(m_Range[i][j] && ex.m_Range[i][j]){\n\t in = true;\n\t break;\n\t }\n\t }\n\t if(!in) return false;\n\t}\n }\n return true;\n }", "public static void test() {\n int[] start = {1, 2, 9, 5, 5};\n int[] end = {4, 5, 12, 9, 12};\n \n MaxOverlapInterval p = new MaxOverlapInterval();\n p.findMaxOverlaps(start, end);\n }", "public boolean overlapsBlock ( ) {\r\n\t\tif (current_block >= getBlockCount())\r\n\t\t\treturn true;\r\n\r\n\t\tif (circum_area == null)\r\n\t\t\treturn true;\r\n\r\n\t\tCoor start_coor = new Coor((double)ra_start[(int)current_block], -6.0);\r\n\t\tCoor end_coor = new Coor((double)ra_end[(int)current_block], 90.0);\r\n\t\tif (circum_area.overlapsArea(start_coor, end_coor))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}", "boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "public int checkCollisions() {\r\n\t\tArrayList<Comet> comets = Comet.getCometList();\r\n\r\n\t\tfor (int i = 0; i < comets.size(); i++) {\r\n\t\t\tComet tempComet = comets.get(i);\r\n\r\n\t\t\tif (getBounds().intersects(tempComet.getBounds())) {\r\n\t\t\t\tComet.removeComet(tempComet);\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn col;\r\n\t}", "private ArrayList<int[]> getOverlapping(ArrayList<int[]> list, int start, int end) {\n ArrayList<int[]> result=new ArrayList<int[]>();\n for (int[] seg:list) {\n if (!(start>seg[1] || end<seg[0])) result.add(seg);\n }\n return result;\n }", "public boolean isAvailable(Event event){\n\t\tfor(Event e : events){\n\t\t\tif(e.timeOverlap(event))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private static final boolean overlapFast(final double[][] candidate, final double[] candidateBB,\n\t\t\tfinal PackedPoly placedPoly) {\n\n\t\t// 1. test bounding boxes\n\t\tif (!MathUtil.intersect_boundBoxes(candidateBB, placedPoly.bb)) {\n\t\t\treturn false;\n\t\t}\n\t\t// 2. test the centroid against candidate poly\n\t\t/*\n\t\t * NOTE this isn't completely robust (a robust method would test every point of\n\t\t * placed poly against candidate) but will catch almost all occurrences (so is\n\t\t * worth the speed-up overall).\n\t\t */\n\t\tif (MathUtil.inside(placedPoly.centroid, candidate)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// 3. test edge intersections\n\t\tfor (int i = 0; i < candidate.length; i++) {\n\t\t\tfor (int j = 0; j < placedPoly.inpts.length; j++) {\n\t\t\t\tif (MathUtil.intersectionFast(candidate[i], candidate[(i + 1) % candidate.length], placedPoly.inpts[j],\n\t\t\t\t\t\tplacedPoly.inpts[(j + 1) % placedPoly.inpts.length])) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}", "private boolean checkConnection(int x1, int x2) {\n\t\treturn (xStartValue <= x1 && xEndValue >= x1) || (xStartValue <= x2 && xEndValue >= x2) ||\n\t\t\t\t(x1 <= xStartValue && x2 >= xStartValue) || (x1 <= xEndValue && x2 >= xEndValue);\n\t\t\n\t}", "public boolean intersects(BoundingBox other) {\r\n\t\treturn !(other.left > getRight()\r\n\t\t\t || other.getRight() < left\r\n\t\t\t || other.top > getBottom()\r\n\t\t\t || other.getBottom() < top);\r\n\t}", "private boolean checkCollisions()\n {\n for (int i = 1; i < numFigs; i++)\n if (figures[0].collidedWith(figures[i]))\n return true;\n return false;\n }", "@Test\r\n public void testReflexivityOverlappingTimePeriods(){\n DateTime startAvailability1 = new DateTime(2021, 7, 9, 10, 30);\r\n DateTime endAvailability1 = new DateTime(2021, 7, 9, 11, 30);\r\n DateTime startAvailability2 = new DateTime(2021, 7, 9, 11, 0);\r\n DateTime endAvailability2 = new DateTime(2021, 7, 9, 12, 0);\r\n Availability availability1 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability1, endAvailability1);\r\n Availability availability2 = new Availability(new HashSet<>(Arrays.asList(\"online\", \"in-person\")), startAvailability2, endAvailability2);\r\n assertTrue(availability1.overlapsWithTimePeriod(availability2));\r\n assertTrue(availability2.overlapsWithTimePeriod(availability1));\r\n }", "@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "public boolean doOverlap(Cell a, Cell b) {\n\t\tfloat dx = a.position.x - b.position.x;\n\t\tfloat dy = a.position.y - b.position.y;\n\t\tfloat cellSizeF = (float) cellSize;\n\t\t//cellSizeF = cellSizeF - .2f;\n\t\t//app.println(\"cellSizeF: \" + cellSizeF);\n\n\t\t// simple box check\n\t\tif (app.abs(dx) < cellSizeF && app.abs(dy) < cellSizeF) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean overlapCells(Point2D p, JmtCell cell) {\r\n \t\tMap attributes;\r\n \r\n \t\t// Creates a rectangle representing the new cell bounds and position\r\n \t\tDimension cellsize = cell.getSize(graph);\r\n \t\tRectangle r = new Rectangle2D.Double(p.getX(), p.getY(), cellsize.getWidth(), cellsize.getHeight()).getBounds();\r\n \r\n \t\t// Gets all cells that can overlap with given one\r\n \t\tObject[] cells = graph.getDescendants(graph.getRoots(r));\r\n \t\tfor (Object cell2 : cells) {\r\n \t\t\t// Gets the i-th cell\r\n \t\t\tObject c = cell2;\r\n \t\t\tif (c instanceof JmtCell) {\r\n \t\t\t\tif (!c.equals(cell)) {\r\n \t\t\t\t\t// Retrives the i-th cell attributes\r\n \t\t\t\t\tattributes = ((JmtCell) c).getAttributes();\r\n \t\t\t\t\t// Is there an intersection ?\r\n \t\t\t\t\tif (GraphConstants.getBounds(attributes).intersects(r)) {\r\n \t\t\t\t\t\t// Yes\r\n \t\t\t\t\t\treturn true;\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\treturn false;\r\n \t}", "public void checkEntityOverlap(){\n for(Entity entity:entityList){\n if(entity.getEntityType().equals(\"Sandwich\")) {\n if (player.getPlayerCoordinates() == entity.getEntityCoordinates()) {\n player.eatSandwich();\n entityList.remove(entity);\n }\n }\n }\n }", "private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {\n \t\tint end= offset2 + length2;\n \t\tint thisEnd= offset1 + length1;\n \n \t\tif (length2 > 0) {\n \t\t\tif (length1 > 0)\n \t\t\t\treturn offset1 < end && offset2 < thisEnd;\n \t\t\treturn offset2 <= offset1 && offset1 < end;\n \t\t}\n \n \t\tif (length1 > 0)\n \t\t\treturn offset1 <= offset2 && offset2 < thisEnd;\n \t\treturn offset1 == offset2;\n \t}", "public boolean bookable() {\n for (Flight flight : itinerary) {\n if (flight.getNumSeats() <= 0) {\n return false;\n }\n }\n return true;\n }", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "private boolean overlappingTaskAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean overlaps(Shape2D s)\r\n {\r\n if (isPhasing)\r\n return false;\r\n \r\n return super.overlaps(s);\r\n }", "private static int compareGoListOverlap(HashMap<String, Double> un_GoMap, HashMap<String, Double> wn_GoMap) {\n\t\tint overlap = 0; \n\t\t/* iterate over significant GO Terms in weighted Network, count those found also in unweighted network*/ \n\t\tfor(String GO: wn_GoMap.keySet()) {\n\t\t\tif(un_GoMap.containsKey(GO)) {\n\t\t\t\toverlap += 1;\n\t\t\t}\n\t\t}\n\t\treturn overlap;\n\t}", "public boolean checkOverlap(LocalTime thisTimeFrom, LocalTime thisTimeTo,\n LocalTime thatTimeFrom, LocalTime thatTimeTo ) {\n\n return compareTimeRangeInclusiveStart(thisTimeFrom, thatTimeFrom, thatTimeTo) ||\n compareTimeRangeInclusiveEnd(thisTimeTo, thatTimeFrom, thatTimeTo) ||\n compareTimeRangeInclusiveStart(thatTimeFrom, thisTimeFrom, thisTimeTo) ||\n compareTimeRangeInclusiveEnd(thatTimeTo, thisTimeFrom, thisTimeTo);\n }", "public boolean overlapsWith()\r\n\t{\r\n\t\tboolean alive = false;\r\n\t\tfor (Platforms platform : platforms)\r\n\t\t{\r\n\t\t\tif (getAvatar().getX() == platform.getX() && getAvatar().getY() == platform.getY())\r\n\t\t\t{\r\n\t\t\t\talive = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn alive;\r\n\t}", "private boolean overlappingGateways(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\tdouble firstApothem = (s1.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble secondApothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstApothem > secondX - secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.691533", "0.68857306", "0.6830058", "0.68064404", "0.67701507", "0.6754552", "0.66793764", "0.65738684", "0.6513445", "0.6484523", "0.6473673", "0.64414746", "0.6400749", "0.6392184", "0.6367319", "0.628237", "0.6269097", "0.62520087", "0.6248136", "0.6233547", "0.6205754", "0.62041557", "0.6125624", "0.6117511", "0.6110201", "0.6071451", "0.6045896", "0.6028922", "0.6021213", "0.6012285", "0.59834063", "0.5978789", "0.59779346", "0.59478116", "0.5931457", "0.59271795", "0.59111035", "0.5901119", "0.58955604", "0.58951277", "0.58944696", "0.5871466", "0.5866565", "0.5858576", "0.58278984", "0.58113575", "0.5801457", "0.57643473", "0.5758834", "0.57518035", "0.5747874", "0.5743361", "0.5733395", "0.5729743", "0.5721818", "0.5698367", "0.5696702", "0.5693886", "0.56821746", "0.56783664", "0.56783605", "0.5672745", "0.5650246", "0.56420577", "0.5637616", "0.5629339", "0.5613265", "0.56009966", "0.55845755", "0.55606717", "0.5552665", "0.5548682", "0.55415666", "0.5538076", "0.55336183", "0.5529475", "0.5518602", "0.550816", "0.5503835", "0.55030894", "0.5499975", "0.5477734", "0.5466392", "0.5461405", "0.5447173", "0.54426175", "0.5439639", "0.5417172", "0.54064524", "0.53993434", "0.5395678", "0.5388946", "0.5387127", "0.5382733", "0.5376906", "0.53768694", "0.53741616", "0.53703064", "0.53660923", "0.5358224" ]
0.6280778
16
using LocalTime only for today
public boolean checkTimeInPast() throws ParseException { LocalTime ltnow = LocalTime.now(); if(b_startTime != null && checkDateIsToday()){ LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime(); return ltstart.isBefore(ltnow); }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LocalDateTime localTimeDateNow() {\n return TimeService.localTimeDateNow();\n }", "public static LocalDateTime hawaiiLocalTimeDateNow() {\n return TimeService.hawaiiLocalTimeDateNow();\n }", "public static LocalTime localTimeNow() {\n return TimeService.localTimeNow();\n }", "default LocalDateTime getLocalTime(int year, int month, int day) {\n return getLocalTime(year, month, day, 0, 0, 0);\n }", "public static LocalDateTime now(){\n return LocalDateTime.now();\n }", "default LocalDateTime getLocalTime(int year, int month, int day, int hour, int minute) {\n return getLocalTime(year, month, day, hour, minute, 0);\n }", "public static final DateUtil localToday()\n {\n return today(TimeZone.getDefault());\n }", "private LocalDateTime nowLocalDateTime() {\n\t\tInstant instantNow = Instant.ofEpochMilli( System.currentTimeMillis() );\n\t\tLocalDateTime nowLocalDateTime = instantNow.atOffset(ZoneOffset.UTC).toLocalDateTime();\n\t\treturn nowLocalDateTime;\n\t}", "private DateTime goodLocalTimeUse() {\n LocalTime lt = new LocalTime(8, 0, 0, 0);\n return new DateTime().toDateTime(DateTimeZone.forID(\"America/New_York\"))\n .withTime(lt)\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "public static LocalTime hawaiiLocalTimeNow() {\n return TimeService.hawaiiLocalTimeNow();\n }", "private DateTime goodLocalDateTimeUse() {\n LocalDateTime ldt = new LocalDateTime(2020, 6, 2, 8, 0, 0, 0);\n return new DateTime(ldt.getYear(), ldt.getMonthOfYear(), ldt.getDayOfYear(), ldt.getHourOfDay(),\n ldt.getMinuteOfHour(), ldt.getSecondOfMinute(), ldt.getMillisOfSecond(),\n DateTimeZone.forID(\"America/New_York\"))\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n\n }", "@ExecFunction(name = \"localtime\", argTypes = {}, returnType = \"DATETIME\")\n public static Expression localTime() {\n return DateTimeLiteral.fromJavaDateType(LocalDateTime.now(DateUtils.getTimeZone()));\n }", "default LocalDateTime getLocalTime(int hour, int minute) {\n return getLocalTime(2017, 1, 31, hour, minute);\n }", "LocalTime getTime();", "public LocalDateTime getCurrentTime() {\n return clock.instant().atZone(ZoneId.systemDefault()).toLocalDateTime();\n }", "public static LocalDateTime TAIDateTimeNow() {\n return TimeService.TAIDateTimeNow();\n }", "private DateTime goodLocalTimeUse2() {\n LocalTime lt = new LocalTime(8, 0, 0, 0);\n return new DateTime().toDateTime(DateTimeZone.getDefault())\n .withTime(lt)\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "default LocalDateTime getLocalTime(int year, int month, int day, int hour, int minute, int second) {\n return LocalDateTime.parse(new StringBuilder()\n .append(year).append('-').append(preZero(month)).append('-').append(preZero(day))\n .append('T')\n .append(preZero(hour)).append(':').append(preZero(minute)).append(':').append(preZero(second))\n .toString());\n }", "public static LocalDateTime UTCDateTimeNow() {\n return TimeService.UTCDateTimeNow();\n }", "public static LocalTime TAITimeNow() {\n return TimeService.TAITimeNow();\n }", "private DateTime goodLocalDateTimeUse2() {\n LocalDateTime ldt = new LocalDateTime(2020, 6, 2, 8, 0, 0, 0);\n return new DateTime(ldt.getYear(), ldt.getMonthOfYear(), ldt.getDayOfYear(), ldt.getHourOfDay(),\n ldt.getMinuteOfHour(), ldt.getSecondOfMinute(), ldt.getMillisOfSecond(),\n DateTimeZone.getDefault())\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n\n }", "public static LocalTime UTCTimeNow() {\n return TimeService.UTCTimeNow();\n }", "public static Date currentDate() {\n Date currentDate = new Date();\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n format.setTimeZone(TimeZone.getTimeZone(\"gmt\"));\n String strTime = format.format(currentDate);\n\n SimpleDateFormat formatLocal = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n currentDate = formatLocal.parse(strTime);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return currentDate;\n }", "private Date getCurrentDateTime() {\n return Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant());\n }", "private void setToday() {\r\n\t\tmTime = new Date().getTime();\r\n\t}", "private LocalTime getLocalTime(Calendar calendar) {\n return LocalTime.of(calendar.get(Calendar.HOUR_OF_DAY),\n calendar.get(Calendar.MINUTE), calendar.get(Calendar.SECOND),\n calendar.get(Calendar.MILLISECOND));\n }", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "public static void specificDateTime() {\n LocalDate date = LocalDate.of(1996, Month.JUNE, 07);\n LocalDate date2 = LocalDate.of(1996, 06, 07);\n System.out.println(\"Specific localDate: \" + date + \", \" + date2);\n\n LocalTime time = LocalTime.of(12, 05);\n // Can specify seconds and nano seconds\n LocalTime time2 = LocalTime.of(12, 05, 10, 10);\n System.out.println(\"Specific localTime: \" + time + \", \" + time2);\n\n // Can create localDateTime with all values or by combining a localDate and\n // localTime\n LocalDateTime dateTime = LocalDateTime.of(date, time);\n LocalDateTime dateTime2 = LocalDateTime.of(1996, Month.JUNE, 07, 12, 05, 10, 10);\n System.out.println(\"Specific localDateTime: \" + dateTime + \", \" + dateTime2);\n\n // Can create zonedDateTime with localDateTime and zoneID\n ZonedDateTime zonedDateTime = ZonedDateTime.of(dateTime, TimeZone.getDefault().toZoneId());\n // Can create with localDate, localTime and zoneID\n ZonedDateTime zonedDateTime2 = ZonedDateTime.of(date, time, TimeZone.getDefault().toZoneId());\n // Can with with all values specified, however no constructor for enum month and\n // must specify seconds and nano-seconds\n ZoneId zone = ZoneId.of(\"US/Eastern\");\n ZoneId defaultZone = TimeZone.getDefault().toZoneId();\n ZonedDateTime zonedDateTime3 = ZonedDateTime.of(1996, 06, 07, 12, 05, 10, 10, defaultZone);\n System.out.println();\n System.out.println(\"Specific Zoned DateTime:\");\n System.out.println(zonedDateTime);\n System.out.println(zonedDateTime2);\n System.out.println(zonedDateTime3);\n }", "public static String getToday() {\n return getToday(\"yyyy-MM-dd HH:mm:ss\");\n }", "@Override // java.time.chrono.Chronology\n public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) {\n return super.localDateTime(temporal);\n }", "public static void main(String[] args) {\n\t\tLocalDate localDate = LocalDate.now();\r\n\t\tSystem.out.println(\"Local Date : \" + localDate); // toString()\r\n\t\t\r\n\t\tLocalTime localTime = LocalTime.now();\r\n\t\tSystem.out.println(\"Local Time : \" + localTime);\r\n\t\t\r\n\t\t\r\n\t\tLocalDateTime localDateTime = LocalDateTime.now();\r\n\t\tSystem.out.println(\"Local Date Time : \" + localDateTime);\r\n\t}", "public void m1() {\n\t\tLocalDate dateInIndia = LocalDate.now();\r\n\t\tSystem.out.println(\"Date in India \" +dateInIndia);\r\n\r\n\t\t// Current Date and Time\r\n\t\t\t\tLocalTime timeInIndia = LocalTime.now();\r\n\t\t\t\tSystem.out.println(\"Time in India \" +timeInIndia);\r\n\t\t\r\n\t\t\r\n\t\tZoneId PSTZone = ZoneId.of(\"America/Los_Angeles\");\r\n\t\tLocalDate dateInUS = LocalDate.now(PSTZone);\r\n\t\tSystem.out.println(\"Date in US \" +dateInUS);\r\n\t\t\r\n\t\tLocalTime timeInUS = LocalTime.now(PSTZone);\r\n\t\tSystem.out.println(\"Time in US \" +timeInUS);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void setcurrent_time() {\n\t\tthis.current_time = LocalTime.now();\n\t}", "public static void playgroundForTime(){\n\t\tLocalDate localDate = LocalDate.of(2013, 4, 25);\r\n\t\tSystem.out.println(localDate.now().isBefore(localDate));\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n LocalDateTime currentTime = LocalDateTime.now();\n System.out.println(\"Current DateTime: \" + currentTime);\n\n LocalDate date1 = currentTime.toLocalDate();\n System.out.println(\"date : \" + date1);\n\n Month month = currentTime.getMonth();\n int day = currentTime.getDayOfMonth();\n int seconds = currentTime.getSecond();\n int nano = currentTime.getNano();\n\n System.out.println(\"Month: \" + month + \" day: \" + day + \" seconds: \" + seconds + \" nano: \" + nano);\n\n LocalDateTime date2 = currentTime.withDayOfMonth(10).withYear(2012);\n System.out.println(\"date2: \" + date2);\n\n //12 december 2014\n LocalDate date3 = LocalDate.of(2014, Month.DECEMBER, 12);\n System.out.println(\"date3: \" + date3);\n\n //22 hour 15 minutes\n LocalTime date4 = LocalTime.of(22, 15);\n System.out.println(\"date4: \" + date4);\n \n //parse a string\n LocalTime date5 = LocalTime.parse(\"20:15:30\");\n System.out.println(\"date5: \" + date5);\n\n System.out.println(\"\");\n // Get the current date and time\n ZonedDateTime zonedDateTime = ZonedDateTime.parse(\"2007-12-03T10:15:30+05:30[Asia/Karachi]\");\n System.out.println(\"date1: \" + zonedDateTime);\n\n ZoneId id = ZoneId.of(\"Europe/Paris\");\n System.out.println(\"ZoneId: \" + id);\n\n ZoneId currentZone = ZoneId.systemDefault();\n System.out.println(\"CurrentZone: \" + currentZone);\n System.out.println(\"\");\n \n //Get the current date\n LocalDate today = LocalDate.now();\n System.out.println(\"Current date: \" + today);\n\n //add 1 week to the current date\n LocalDate nextWeek = today.plus(1, ChronoUnit.WEEKS);\n System.out.println(\"Next week: \" + nextWeek);\n\n //add 1 month to the current date\n LocalDate nextMonth = today.plus(1, ChronoUnit.MONTHS);\n System.out.println(\"Next month: \" + nextMonth);\n\n //add 1 year to the current date\n LocalDate nextYear = today.plus(1, ChronoUnit.YEARS);\n System.out.println(\"Next year: \" + nextYear);\n\n //add 10 years to the current date\n LocalDate nextDecade = today.plus(1, ChronoUnit.DECADES);\n System.out.println(\"Date after ten year: \" + nextDecade);\n System.out.println(\"\");\n// \n// With Java 8, two specialized classes are introduced to deal with the time differences.\n//\n//Period - It deals with date based amount of time.\n//\n//Duration - It deals with time based amount of time.\n //Get the current date working with Periods\n LocalDate datePeriod = LocalDate.now();\n System.out.println(\"Current date: \" + datePeriod);\n\n //add 1 month to the current date\n LocalDate datePeriod2 = datePeriod.plus(1, ChronoUnit.MONTHS);\n System.out.println(\"Next month: \" + datePeriod2);\n\n Period period = Period.between(datePeriod2, datePeriod);\n System.out.println(\"Period: \" + period);\n\n //work with durations\n LocalTime time1 = LocalTime.now();\n Duration twoHours = Duration.ofHours(2);\n\n LocalTime time2 = time1.plus(twoHours);\n Duration duration = Duration.between(time1, time2);\n\n System.out.println(\"Duration: \" + duration);\n\n// TemporalAdjuster is used to perform the date mathematics.\n// For example, get the \"Second Saturday of the Month\" or \"Next Tuesday\".\n// Let us see them in action.\n// \n System.out.println(\"\");\n//Get the current date\n LocalDate dateArithmatic = LocalDate.now();\n System.out.println(\"Current date: \" + dateArithmatic);\n\n //get the next tuesday\n LocalDate nextTuesday = dateArithmatic.with(TemporalAdjusters.next(DayOfWeek.TUESDAY));\n System.out.println(\"Next Tuesday on : \" + nextTuesday);\n\n //get the second saturday of next month\n LocalDate firstInYear = LocalDate.of(dateArithmatic.getYear(), dateArithmatic.getMonth(), 1);\n LocalDate secondSaturday = firstInYear.with(TemporalAdjusters.nextOrSame(DayOfWeek.SATURDAY))\n .with(TemporalAdjusters.next(DayOfWeek.SATURDAY));\n System.out.println(\"Second Saturday on : \" + secondSaturday);\n\n //Sql date time\n java.util.Date javaDate = new java.util.Date();\n long javaTime = javaDate.getTime();\n System.out.println(\"\\n\\nThe Java Date is: \" + javaDate.toString());\n\n java.sql.Date sqlDate = new java.sql.Date(javaTime);\n System.out.println(\"The SQL DATE is: \" + sqlDate.toString());\n\n java.sql.Time sqlTime = new java.sql.Time(javaTime);\n System.out.println(\"The SQL TIME is: \" + sqlTime.toString());\n\n java.sql.Timestamp sqlTimestamp = new java.sql.Timestamp(javaTime);\n System.out.println(\"The SQL TIMESTAMP is: \" + sqlTimestamp.toString());\n }", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "private Date localTimeToDate(String time) {\n return new Date(Timestamp.valueOf(time.replace(\"T\", \" \").concat(\":00\")).getTime());\n }", "private Date getCurrentDate() {\n return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());\n }", "public static LocalDateTime getUtcNow() {\n return getNow().toLocalDateTime();\n }", "private String getTodayDate(){\n // get current Date and Time for product_info table\n Date date = Calendar.getInstance().getTime();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:MM\", Locale.getDefault());\n return dateFormat.format(date);\n }", "public static void currentDateTime() {\n // Just the date\n LocalDate date = LocalDate.now();\n System.out.println(\"LocalDate now: \" + date);\n\n // Just the time\n LocalTime time = LocalTime.now();\n System.out.println(\"LocalTime now: \" + time);\n\n // Date and time\n LocalDateTime dateTime = LocalDateTime.now();\n System.out.println(\"LocalDateTime now: \" + dateTime);\n\n // Date, time and time zone! Fancy\n ZonedDateTime zonedDateTime = ZonedDateTime.now();\n System.out.println(\"ZonedDateTime now: \" + zonedDateTime);\n System.out.println();\n }", "public LocalDateTime getStartDate();", "public java.util.Date getDate(){\n return localDate;\n }", "public LocalDateTime getLocalDateTime() {\n return this.datetime;\n }", "private DateTime goodLocalDateUse() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n LocalTime now = LocalTime.now();\n return new DateTime(ld.getYear(), ld.getMonthOfYear(), ld.getDayOfYear(), now.getHourOfDay(),\n now.getMinuteOfHour(), now.getSecondOfMinute(), now.getMillisOfSecond(),\n DateTimeZone.forID(\"America/New_York\"))\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "public java.time.LocalDateTime convertToCurrentZone(java.time.LocalDateTime time_input){\r\n java.time.LocalDateTime newDateTime = time_input.atZone(ZoneId.of(\"GMT\")).withZoneSameInstant(getTimeZone().toZoneId()).toLocalDateTime();\r\n return newDateTime;\r\n }", "public interface Clock {\n public LocalDateTime getCurrentTimestamp();\n}", "public abstract boolean useDaylightTime();", "public abstract boolean useDaylightTime();", "public String getCurrentTime() {\r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm:ss\"); //https://www.javatpoint.com/java-get-current-date\r\n LocalDateTime now = LocalDateTime.now();\r\n return dtf.format(now);\r\n }", "public String generateLocalDateTime() {\n LocalDateTime localDateTime = LocalDateTime.now();\n DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"yyyyMMddHHmmss\");\n String formatLocalDateTime = localDateTime.format(dateTimeFormatter);\n return formatLocalDateTime;\n }", "public static String getCurrentDate() {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"); \n LocalDateTime now = LocalDateTime.now(); \n return dtf.format(now);\n }", "protected Date getCurrentDateAndTime() {\n\t\tDate date = new Date();\n\t\tDate updatedDate = new Date((date.getTime() + (1000 * 60 * 60 * 24)));//(1000 * 60 * 60 * 24)=24 hrs. **** 120060 = 2 mins\n\t\treturn updatedDate;\n\t}", "public void now() {\n localDate = LocalDate.now();\n localDateTime = LocalDateTime.now();\n javaUtilDate = new Date();\n auditEntry = \"NOW\";\n instant = Instant.now();\n }", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "private static String getFormattedCurrentDateAndTime(){\n StringBuilder dateAndTime = new StringBuilder();\n LocalDateTime now = LocalDateTime.now();\n\n String hour = Integer.toString(now.getHour());\n String minute = Integer.toString(now.getMinute());\n\n if (hour.length() == 1){\n hour = \"0\" + hour;\n }\n if (minute.length() == 1){\n minute = \"0\" + minute;\n }\n\n //Creates \"XX/XX/XX @ XX:XX\" format (24 hours)\n dateAndTime.append(now.getMonthValue()).append(\"/\").\n append(now.getDayOfMonth()).append(\"/\").\n append(now.getYear()).append(\" @ \").\n append(hour).append(\":\").\n append(minute);\n\n return dateAndTime.toString();\n }", "@ExecFunction(name = \"now\", argTypes = {}, returnType = \"DATETIME\")\n public static Expression now() {\n return DateTimeLiteral.fromJavaDateType(LocalDateTime.now(DateUtils.getTimeZone()));\n }", "public Timestamp getToday()\n\t{\n\t\treturn m_today;\n\t}", "public LocalDateTime getConfirmTime() {\n return confirmTime;\n }", "public LocalDateTime getDateTime() {\n return null;\n }", "public String gmt_to_local_timezone(String local) {\n\n\t\ttry {\n\t\t\n\t\t\tif ( local == null ) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tdate = new Date();\n\t\t\t\n\t\t\tint getTimezoneoffset = date.getTimezoneOffset() * 60 * 1000;\n\t\t\t\n\t\t\t\n\t\t\tlong currenttime = date.getTime();\n\t\t\t\n\t\t\tlong offset = currenttime + getTimezoneoffset;\n\t\t\t\n\t\t\tdateFormatYMDHMS = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\t//\tdateObj = dateFormatYMDHMS.parse(local);\n\t\t\tdateObj = parseDate(local,false);\n\t\t\n\t\t\tlong msgPostTime = dateObj.getTime();\n\t\t\t\n\t\t\tlong actualTime = offset - msgPostTime;\n\t\t\tlong diffMinutes = actualTime / (60 * 1000);\n\t\t\t\n\t\t\t\n\t\t\tcurrentTime = Calendar.getInstance();\n\t\t\tString postedTime = gmtToLocal(local);\n\t\t\t//dateObj = dateFormatYMDHMS.parse(postedTime);\n\t\t\tdateObj = parseDate(postedTime,false);\n\t\t\t\n\t\t\tif (diffMinutes <= 59) {\n\t\t\t\t\n\t\t\t\tStringBuilder postTime = new StringBuilder(Integer\n\t\t\t\t\t\t.toString((int) diffMinutes));\n\t\t\t\n\t\t\t\tif (diffMinutes < 1) {\n\t\t\t\n\t\t\t\t\tpostTime = new StringBuilder(\" \"+resource.getString(R.string.justNow));\n\t\t\t\t\treturn postTime.toString();\n\t\t\t\t} else if (diffMinutes < 2) {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.min));\n\t\t\t\t} else {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.mins));\n\t\t\t\t}\n\n\t\t\t\treturn postTime.toString();\n\n\t\t\t} else if (diffMinutes >= 60 && diffMinutes <= 1439) {\n\n\t\t\t\tint hour = (int) diffMinutes / 60;\n\n\t\t\t\tStringBuilder postTime = new StringBuilder(Integer\n\t\t\t\t\t\t.toString(hour));\n\n\t\t\t\tif (hour < 2) {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.hour));\n\t\t\t\t} else {\n\t\t\t\t\tpostTime.append(\" \"+resource.getString(R.string.hours));\n\t\t\t\t}\n\n\t\t\t\treturn postTime.toString();\n\n\t\t\t} else if (diffMinutes >= 1440 && diffMinutes <= 2880) {\n\t\t\t\treturn resource.getString(R.string.yesterday);\n\t\t\t} else if (diffMinutes < (7 * 24 * 60)) {\n\n\t\t\t\tint days = (int) diffMinutes / 60 / 24;\n\t\t\t\treturn days + \" \"+resource.getString(R.string.days);\n\n\t\t\t\t// SimpleDateFormat dateFormat = new\n\t\t\t\t// SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n\t\t\t\t// return dateFormat.format(dateObj);\n\t\t\t} else if (diffMinutes < (2 * 7 * 24 * 60)) {\n\t\t\t\treturn resource.getString(R.string.lastWeek);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint months=(currentTime.get(Calendar.YEAR)-(dateObj.getYear()+1900))*12\n\t\t\t\t\t\t +(currentTime.get(Calendar.MONTH)-dateObj.getMonth());\n\t\t\t\tif((currentTime.get(Calendar.DATE)<dateObj.getDate())||\n\t\t\t\t ((currentTime.get(Calendar.HOUR_OF_DAY)<dateObj.getHours())&&\n\t\t\t\t (currentTime.get(Calendar.DATE)==dateObj.getDate())))\n\t\t\t\t\tmonths--;\n\t\t\t\t\n\t\t\t\tif(months<1)\n\t\t\t\t{\n\t\t\t\t\tint weeks=( int ) diffMinutes/ 60 / 24 / 7; \n\t\t\t\t\treturn weeks + \" \"+resource.getString(R.string.weeks);\n\t\t\t\t}\n\t\t\t\telse if(months<2)\n\t\t\t\t{\n\t\t\t\t\treturn resource.getString(R.string.lastMonth);\n\t\t\t\t}\n\t\t\t\telse if(months<12)\n\t\t\t\t{\n\t\t\t\t\treturn months+\" \"+resource.getString(R.string.months);\n\t\t\t\t}\n\t\t\t\telse if(months<24)\n\t\t\t\t{\n\t\t\t\t\treturn resource.getString(R.string.lastYear);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn months/12+\" \"+resource.getString(R.string.years);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t//Logs.show(e);\n\t\t} finally {\n\t\t\tdate = null;\n\t\t}\n\t\treturn \"\";\n\n\t}", "public static Date getDateNowSingl(){\n\t\tconfigDefaultsTimeZoneAndLocale();\r\n\t\t\r\n\t\t// o time millis é sempre GMT 0, a transformação fica por conta do Date\r\n\t\treturn new Date(System.currentTimeMillis()+getPropDefaultForAll(TIME_CORRECTION));\r\n\t}", "private Date getSamoaNow() {\n\t\t// Get the current datetime in UTC\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(new Date());\n\t\t\n\t\t// Get the datetime minus 11 hours (Samoa is UTC-11)\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, -11);\n\t\t\n\t\treturn calendar.getTime();\n\t}", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "public void setClockTime(LocalTime localTime) {\r\n // Update the Time Plot (clock hands)\r\n DefaultValueDataset hourData = (DefaultValueDataset) getDatasets()[SOLAR_HOUR_SERIES];\r\n\r\n final double DEG_PER_HOUR_12 = 360 / 12.0;\r\n double hour = localTime.get(ChronoField.MINUTE_OF_DAY) / 60.0;\r\n double hourDegrees = (hour % 12.0) * DEG_PER_HOUR_12;\r\n hourData.setValue(hourDegrees);\r\n }", "public void twelveHour() {\n\n //Date format 12 hour\n DateFormat twelveHour = new SimpleDateFormat(\"hh:mm aa\", Locale.ENGLISH);\n\n setTimeZone();\n\n Calendar s = Calendar.getInstance(sydney);\n twelveHour.setTimeZone(sydney);\n\n String timeS = twelveHour.format(s.getTime());\n sydneyTime = findViewById(R.id.sydneytime);\n sydneyTime.setText(timeS);\n\n Calendar t = Calendar.getInstance(tokyo);\n twelveHour.setTimeZone(tokyo);\n\n String timeT = twelveHour.format(t.getTime());\n tokyoTime = findViewById(R.id.tokyotime);\n tokyoTime.setText(timeT);\n\n Calendar a = Calendar.getInstance(auckland);\n twelveHour.setTimeZone(auckland);\n\n String timeA = twelveHour.format(a.getTime());\n aucklandTime = findViewById(R.id.aucklandtime);\n aucklandTime.setText(timeA);\n\n Calendar d = Calendar.getInstance(dubai);\n twelveHour.setTimeZone(dubai);\n\n String timeD = twelveHour.format(d.getTime());\n dubaiTime = findViewById(R.id.dubaitime);\n dubaiTime.setText(timeD);\n\n Calendar n = Calendar.getInstance(newyork);\n twelveHour.setTimeZone(newyork);\n\n String timeN = twelveHour.format(n.getTime());\n newyorkTime = findViewById(R.id.newyorktime);\n newyorkTime.setText(timeN);\n }", "public static void main(String[] args) {\n\n LocalDate now = LocalDate.now();\n\n System.out.println(now);\n\n LocalDate tomorrow = now.plus(Period.ofDays(1));\n\n System.out.println(tomorrow);\n\n tomorrow = now.plusDays(1);\n\n tomorrow = now.plus(1, ChronoUnit.DAYS);\n\n System.out.println(tomorrow);\n tomorrow = now.plus(1, ChronoUnit.MONTHS);\n\n System.out.println(tomorrow);\n\n System.out.println(now.getDayOfWeek());\n System.out.println(tomorrow);\n\n System.out.println(now.isAfter(tomorrow));\n System.out.println(now.isBefore(tomorrow));\n\n //LocalTime\n LocalTime currentTime = LocalTime.now();\n LocalTime nextHour = currentTime.plus(Duration.ofHours(1));\n\n nextHour = currentTime.plus(1, ChronoUnit.HOURS); // вернет новый локалтиме ДЛЯ + И -\n\n System.out.println(nextHour);\n\n nextHour = currentTime.plusHours(1);\n System.out.println(nextHour);\n\n // LocalDateTime\n LocalDateTime today = LocalDateTime.now();\n LocalDateTime todayParsed = LocalDateTime.parse(\"2021-03-02T12:26:24\");\n\n System.out.println(today);\n System.out.println(todayParsed);\n\n System.out.println(todayParsed.get(ChronoField.DAY_OF_YEAR));\n }", "@ExecFunction(name = \"curtime\", argTypes = {}, returnType = \"DATETIME\")\n public static Expression curTime() {\n return DateTimeLiteral.fromJavaDateType(LocalDateTime.now(DateUtils.getTimeZone()));\n }", "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}", "public void twentyFourHour() {\n\n //Date format 24 hour\n DateFormat twelveHour = new SimpleDateFormat(\"HH:mm\", Locale.ENGLISH);\n\n setTimeZone();\n\n Calendar s = Calendar.getInstance(sydney);\n twelveHour.setTimeZone(sydney);\n\n String timeS = twelveHour.format(s.getTime());\n sydneyTime = findViewById(R.id.sydneytime);\n sydneyTime.setText(timeS);\n\n Calendar t = Calendar.getInstance(tokyo);\n twelveHour.setTimeZone(tokyo);\n\n String timeT = twelveHour.format(t.getTime());\n tokyoTime = findViewById(R.id.tokyotime);\n tokyoTime.setText(timeT);\n\n Calendar a = Calendar.getInstance(auckland);\n twelveHour.setTimeZone(auckland);\n\n String timeA = twelveHour.format(a.getTime());\n aucklandTime = findViewById(R.id.aucklandtime);\n aucklandTime.setText(timeA);\n\n Calendar d = Calendar.getInstance(dubai);\n twelveHour.setTimeZone(dubai);\n\n String timeD = twelveHour.format(d.getTime());\n dubaiTime = findViewById(R.id.dubaitime);\n dubaiTime.setText(timeD);\n\n Calendar n = Calendar.getInstance(newyork);\n twelveHour.setTimeZone(newyork);\n\n String timeN = twelveHour.format(n.getTime());\n newyorkTime = findViewById(R.id.newyorktime);\n newyorkTime.setText(timeN);\n }", "public static void main(String[] args) {\n LocalDate date = LocalDate.of(1986, 02, 12);\n LocalTime time = LocalTime.of(12, 30);\n LocalDateTime localDateTime = LocalDateTime.of(date, time);\n System.out.println(localDateTime);\n\n// Exercise 16\n String customizedDate = localDateTime.format(DateTimeFormatter.ofPattern(\"YYYY-MM-dd\"));\n System.out.println(customizedDate);\n LocalDate getDate = LocalDate.parse(customizedDate);\n System.out.println(getDate);\n String customizedTime = localDateTime.format(DateTimeFormatter.ofPattern(\"HH:mm\"));\n System.out.println(customizedTime);\n LocalTime getTime = LocalTime.parse(customizedTime);\n System.out.println(getTime);\n }", "public static Date getLocalUTCTime(){\r\n\t\tfinal Calendar cal=Calendar.getInstance();\r\n\t\tfinal int zoneOffset=cal.get(Calendar.ZONE_OFFSET);\r\n\t\tfinal int dstOffset=cal.get(Calendar.DST_OFFSET);\r\n\t\tcal.add(Calendar.MILLISECOND, -(zoneOffset+dstOffset));\r\n\t\treturn cal.getTime();\r\n\t}", "public static String getNowDateTime(Locale locale) {\r\n\t\tDate date = new Date();\r\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\r\n\t\tString localDateTime = dateFormat.format(date);\r\n\t\tlog.debug(\"get now date time (locale:\" + locale.toString() + \") : \" + localDateTime);\r\n\t\treturn localDateTime;\r\n\t}", "public void setDateTime(java.util.Calendar param) {\n this.localDateTime = param;\n }", "private DateTime goodLocalDateUse2() {\n LocalDate ld = new LocalDate(2020, 6, 2);\n LocalTime now = LocalTime.now();\n return new DateTime(ld.getYear(), ld.getMonthOfYear(), ld.getDayOfYear(), now.getHourOfDay(),\n now.getMinuteOfHour(), now.getSecondOfMinute(), now.getMillisOfSecond(),\n DateTimeZone.getDefault())\n .toDateTime(DateTimeZone.forID(\"America/Los_Angeles\"));\n }", "DateTime nowUtc();", "public static LocalTime randomMorning() {\n int randomInt = (int)(6.0 * Math.random()) + 7;\n return LocalTime.of(randomInt, 0);\n }", "@TargetApi(Build.VERSION_CODES.O)\n public LocalDate getTodayDate() {\n LocalDate date;\n date = LocalDate.now();\n return date;\n }", "public Date getCurrentDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n Date currentDate = cal.getTime();\n return currentDate;\n }", "default void onCustomStartTimeChanged(LocalTime startTime) {}", "private LocalDateTime normalizeDate(LocalDateTime until) {\n final Duration diff = Duration.between(LocalDateTime.now(), until);\n final LocalDateTime databaseTime = lockStorage.getCurrentDatabaseTime();\n return databaseTime.plus(diff);\n }", "public LocalTime setBusinessHoursToLocalHours(int hr){\n LocalDateTime now = LocalDateTime.now();\n LocalDateTime ldt = LocalDateTime.of(now.getYear(), now.getMonthValue(), now.getDayOfMonth(), hr, 0);\n return ZonedDateTime.\n of(ldt, ZoneId.of(\"America/New_York\"))\n .toOffsetDateTime()\n .atZoneSameInstant(ZoneId.systemDefault())\n .toLocalDateTime().toLocalTime();\n }", "public static LocalTime getLocalTime(String prompt)\n {\n LocalTime time;\n while(true)\n {\n try\n {\n System.out.print(prompt + \" \");\n time = DateUtility.convertTime((in.nextLine()));\n break;\n }\n catch(Exception e)\n {\n System.out.println(\"Not a valid Time\");\n }\n }\n return time; \n }", "public void setCreatedTime(LocalDateTime value) {\n set(5, value);\n }", "public ZonedDateTime convertToSystemZonedDateTime(LocalDateTime ldt){\n return ZonedDateTime.of(ldt, ZoneId.systemDefault());\n }", "public LocalDateTime getDateTime() {\n return dateTime;\n }", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "long getInhabitedTime();", "private static String getTodaysDate() {\n\n LocalDateStringConverter dateToStringConverter = new LocalDateStringConverter();\n return dateToStringConverter.toString(LocalDate.now());\n }", "public java.util.Calendar getDateTime() {\n return localDateTime;\n }", "public LocalDateTime convertToLocal(ZonedDateTime time){\n ZoneId localZoneID = ZoneId.systemDefault();\n ZonedDateTime localTime = time.withZoneSameInstant(localZoneID);\n return localTime.toLocalDateTime();\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tLocalDateTime Idt = LocalDateTime.now();\n\t\t\n\t\tSystem.out.println(Idt); //2021-03-19T23:06:48.913604300\n\t\tSystem.out.println(Idt.toString());//2021-03-19T23:06:48.913604300\n\t\t\n\t\tString time = Idt.toString();\n\t\t\n\t\tSystem.out.println(time.startsWith(\"2021\")); //true\n\t\t\n\t\t\n\t\t\n\t}", "public static Date todayStart() {\n return dayStart(new Date());\n }", "public final long getLocalTimeStamp()\n {\n return getTimeStamp( TimeZone.getDefault());\n }", "public LocalDateTime getDatetime() {\n return this.datetime;\n }", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public static String now() {\n // TODO: move this method to DateUtils\n return fromCalendar(GregorianCalendar.getInstance());\n }", "public static Date getNowUtilDate()\n {\n return new Date();\n }", "public static Date now()\r\n\t{\r\n\t\treturn new Date(System.currentTimeMillis());\r\n\t}", "public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }" ]
[ "0.7408427", "0.7270291", "0.7228027", "0.7160577", "0.7104065", "0.70161957", "0.69366306", "0.6892428", "0.68859494", "0.6868337", "0.6774383", "0.6752939", "0.6735667", "0.6672795", "0.66090596", "0.6599243", "0.65241086", "0.64686835", "0.6423749", "0.6423061", "0.6385063", "0.63495755", "0.631701", "0.62542766", "0.62369555", "0.62299776", "0.6218039", "0.62178254", "0.6118719", "0.6111709", "0.61010635", "0.6093915", "0.6075469", "0.6064356", "0.603988", "0.6026173", "0.6001129", "0.5973102", "0.59706044", "0.5934026", "0.58959067", "0.5866169", "0.5858608", "0.5852484", "0.5852141", "0.5852108", "0.5825742", "0.58251977", "0.58251977", "0.5823127", "0.5822411", "0.58212113", "0.58163506", "0.5796316", "0.57814425", "0.5771216", "0.57650983", "0.5752479", "0.5713811", "0.5712102", "0.56939244", "0.5675752", "0.56657076", "0.5650012", "0.5633925", "0.56299454", "0.5629737", "0.56256956", "0.56245685", "0.5621509", "0.56166345", "0.56104934", "0.56102383", "0.56059164", "0.5603625", "0.55946463", "0.55895734", "0.5581698", "0.55797184", "0.5574214", "0.5568954", "0.5567348", "0.55650944", "0.555755", "0.5555532", "0.55429274", "0.55272084", "0.55272084", "0.5526807", "0.55131155", "0.55041367", "0.5502312", "0.5499378", "0.5498979", "0.5492016", "0.5489795", "0.5489295", "0.5478315", "0.5475863", "0.5469271", "0.5468392" ]
0.0
-1
Input speed test speed here & test positions here
@Test void testDefault() { final int SPEED = 5; final int X = 1; final int Y = 1; //positions to test against (correct conditions: X=x,Y=y) final int x = 1; final int y = 1; //Assigns Vehicle position x, y Vehicle vehicle = new Vehicle(X,Y,5); System.out.print("Vehicle speed is: "); System.out.println(vehicle.speed); //Testing vehicle positions and speed assertEquals(SPEED, vehicle.speed); assertEquals(x, vehicle.x); assertEquals(y, vehicle.y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void SpeedControlTest() {\n\n /**\n * Setting up mock\n * */\n Gdx.input = mock(Input.class);\n Course course = mock(Course.class);\n when(course.getLeftBoundary()).thenReturn(0);\n when(course.getRightBoundary()).thenReturn(1080);\n\n\n /**\n * tests cases for when increasing speed\n * creating player to test on and setting test case stats\n * */\n\n player.setStats(5, 11, 3, 3);\n\n float start = player.getCurrentSpeed();\n when(Gdx.input.isKeyPressed(Input.Keys.W)).thenReturn(true);\n player.GetInput(course);\n float finish = player.getCurrentSpeed();\n\n assertTrue(finish > start);\n\n /**\n * resetting stat\n * */\n player.setCurrentSpeed(2);\n\n /**\n * test cases for when decreasing speed\n * */\n when(Gdx.input.isKeyPressed(Input.Keys.S)).thenReturn(true);\n player.GetInput(course);\n\n assertTrue(2 > player.getCurrentSpeed());\n\n }", "private void TestSerialInput() {\r\n int now = GetMills(), nby = now - PrioSeriTime;\r\n SerialPortSwapper myPort = surrealPort;\r\n if (myPort == null) return; // otherwise test for input, fwd to listener..\r\n PrioSeriTime = now;\r\n if (SpeakEasy) if (nby > 222) // should be every ms, but seems not..\r\n System.out.println(FormatMillis(\" (LATE TSI) +\", nby)\r\n + FormatMillis(\" @ \", now));\r\n if (CountingPulses > 0) { // once each second, ask for current count..\r\n PCtime = PCtime + nby; // count actual elapsed time\r\n if (PCtime >= CountingPulses) { // always logs..\r\n Send3bytes(REPORT_PULSECOUNT, 0, 0); // pin + is ignored\r\n PCtime = PCtime - CountingPulses;\r\n }\r\n } //~if\r\n try {\r\n nby = surrealPort.getInputBufferBytesCount();\r\n if (nby <= 0) return;\r\n if (OneSerEvt == null) // ProcInp only looks at type, so keep this one..\r\n OneSerEvt = new SerialPortEvent(\r\n CommPortNo, SerialPort.MASK_RXCHAR, nby);\r\n ProcessInput(OneSerEvt);\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n }", "private void checkInputList(float elapsedTime){\n if(nextInput < inputList.size()){\n GameInput i = inputList.get(nextInput);\n if(i.getFrameNum() <= parent.parent.getFrameNum()){\n //System.out.print(\"EXECUTING INPUT for \");\n Vector2 vel = getBody().getLinearVelocity();\n float angularVelocity = getBody().getAngularVelocity();\n int keycode = i.getKeycode();\n nextInput++;\n if(i.getType() == GameInput.InputType.KEYPRESSED){\n if(keycode == Input.Keys.W && vel.dst2(vel) <= MAX_VELOCITY) forwardPressed = true;\n if(keycode == Input.Keys.S && vel.dst2(vel) <= MAX_VELOCITY) backwardPressed = true;\n if(keycode == Input.Keys.Q && angularVelocity <= MAX_ANGULAR_VELOCITY) rotateRightPressed = true;\n if(keycode == Input.Keys.E && angularVelocity <= MAX_ANGULAR_VELOCITY) rotateLeftPressed = true;\n if(keycode == Input.Keys.SHIFT_LEFT && getBoostTime() < 0)boostPressed = true;\n }else if(i.getType() == GameInput.InputType.KEYRELEASED){\n if(keycode == Input.Keys.W && vel.dst2(vel) <= MAX_VELOCITY) forwardPressed = false;\n if(keycode == Input.Keys.S && vel.dst2(vel) <= MAX_VELOCITY) backwardPressed = false;\n if(keycode == Input.Keys.Q && angularVelocity <= MAX_ANGULAR_VELOCITY) rotateRightPressed = false;\n if(keycode == Input.Keys.E && angularVelocity <= MAX_ANGULAR_VELOCITY) rotateLeftPressed = false;\n if(keycode == Input.Keys.SHIFT_LEFT)boostPressed = false;\n }\n\n //this.setPosition(i.getLoc().x, i.getLoc().y); //set position\n this.getBody().setTransform(i.getLoc(), i.getAngle());\n this.getBody().setLinearVelocity(i.getLinearVelocity()); //set linear velocity\n this.getBody().setAngularVelocity(i.getAngularVelocity()); //set angular velocity\n this.setCurrentState(i.getState());\n\n }\n // System.out.println(\"frame check: \" + i.getFrameNum() + \" vs \" + parent.parent.getFrameNum());\n }\n\n }", "public static void benchmarkMenu() {\n List<Position> places = new ArrayList<Position>();\n places.add(new Position(-10.99845000, 49.39349500));\n places.add(new Position(-11.18493167, 49.49496333));\n boolean quit = false;\n do {\n System.out.println(\"==================================================\");\n System.out.println(\"Benchmarks\");\n System.out.println(\"==================================================\");\n System.out.println();\n System.out.println(\"Please Make a selection:\");\n System.out.println(\"[1] Weighted A-Star\");\n System.out.println(\"[2] A-Star with limited OpenList\");\n System.out.println(\"[3] TSP Methodes\");\n System.out.println(\"[4] Genetic TSP Generations\");\n System.out.println(\"[0] exit\");\n\n System.out.print(\"Selection: \");\n int menu = scan.nextInt();\n switch (menu) {\n case 1:\n System.out.print(\"Start W: \");\n double wStart = scan.nextDouble();\n System.out.print(\"End W: \");\n double wEnd = scan.nextDouble();\n System.out.print(\"Steps: \");\n double wStep = scan.nextDouble();\n compareAStarW(places, wStart, wEnd, wStep);\n break;\n case 2:\n System.out.print(\"Start Limit: \");\n int lStart = scan.nextInt();\n System.out.print(\"End Limit: \");\n int lEnd = scan.nextInt();\n System.out.print(\"Steps: \");\n int lStep = scan.nextInt();\n compareAStarLimitedOpen(places, lStart, lEnd, lStep);\n break;\n case 3:\n System.out.print(\"Number of Points: \");\n int points = scan.nextInt();\n compareTSP(points);\n break;\n case 4:\n System.out.print(\"Number of Points: \");\n int gpoints = scan.nextInt();\n System.out.print(\"Start Generations: \");\n int gStart = scan.nextInt();\n System.out.print(\"End Generations: \");\n int gEnd = scan.nextInt();\n System.out.print(\"Steps: \");\n int gStep = scan.nextInt();\n compareGeneticGens(gpoints, gStart, gEnd, gStep);\n break;\n case 0:\n quit = true;\n break;\n default:\n System.out.println(\"Invalid Entry!\");\n }\n }\n while (!quit);\n }", "public void performance() {\n\t\tPositionVo s = currentPerformed.getFirst();\n\t\t@SuppressWarnings(\"unused\")\n\t\tPositionVo e = currentPerformed.getLast();\n//\t\tint timeCost = (int) (e.getTime() - s.getTime());\n//\t\tint span = (int) Math.abs(e.getHead().getX() - s.getHead().getX());\n\t\t// TODO according to the moving rate decide how many nodes fill the gap\n\n\t\tint size = currentPerformed.size();\n\n\t\tfor (int i = 1; i < size * 4 - 4; i += 4) {\n\t\t\tPositionVo s1 = currentPerformed.get(i - 1);\n\t\t\tPositionVo s2 = currentPerformed.get(i);\n\n\t\t\tPoint[] delta_Head = sim_dda(s1.getHead(), s2.getHead(), 4);\n\t\t\tPoint[] delta_left_hand = sim_dda(s1.getLeftHand(), s2.getRightHand(), 4);\n\t\t\tPoint[] delta_right_hand = sim_dda(s1.getRightHand(), s2.getRightHand(), 4);\n\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\tcurrentPerformed.add(i + j, new PositionVo(delta_Head[j], delta_left_hand[j], delta_right_hand[j]));\n\t\t}\n\n\t\tnCount = currentPerformed.size();\n\t\tcursor = 0;\n\n\t\t/* (*)absolute point = initial point - current point */\n\t\treferX -= s.getHead().getX();\n\t\treferY += s.getHead().getY();\n\t\tcurrReferX = referX;\n\t\tcurrReferY = referY;\n\n\t\t/* update gui */\n\t\tmanager.proceBar.setMinimum(0);\n\t\tmanager.proceBar.setMaximum(nCount);\n\t\t/* end */\n\n\t\tstartTimer((int) (ANIMATE_FPS * speedRate));\n\t}", "private static boolean KawigiEdit_RunTest(\n int testNum, String[] p0, int p1, boolean hasAnswer, String[] p2) {\n System.out.print(\"Test \" + testNum + \": [\" + \"{\");\n for (int i = 0; p0.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(\"\\\"\" + p0[i] + \"\\\"\");\n }\n System.out.print(\"}\" + \",\" + p1);\n System.out.println(\"]\");\n Centipede obj;\n String[] answer;\n obj = new Centipede();\n long startTime = System.currentTimeMillis();\n answer = obj.simulate(p0, p1);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; p2.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(\"\\\"\" + p2[i] + \"\\\"\");\n }\n System.out.println(\"}\");\n }\n System.out.println(\"Your answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; answer.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(\"\\\"\" + answer[i] + \"\\\"\");\n }\n System.out.println(\"}\");\n if (hasAnswer) {\n if (answer.length != p2.length) {\n res = false;\n } else {\n for (int i = 0; answer.length > i; ++i) {\n if (!answer[i].equals(p2[i])) {\n res = false;\n }\n }\n }\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "private void simulateUpdate(int input) {\n gameState += input * 1.25;\n gameState %= 20;\n }", "public void verifySpeeds() {\n double maxStartSpeed = 0.0;\n double[] startSpeeds = new double[segments.size() + 1];\n startSpeeds[segments.size()] = 0.0;\n for (int i = segments.size() - 1; i >= 0; i--) {\n PathSegment segment = segments.get(i);\n maxStartSpeed += Math\n .sqrt(maxStartSpeed * maxStartSpeed + 2 * maxAccel * segment.getLength());\n startSpeeds[i] = segment.getStartState().vel();\n if (startSpeeds[i] > maxStartSpeed) {\n startSpeeds[i] = maxStartSpeed;\n }\n maxStartSpeed = startSpeeds[i];\n }\n for (int i = 0; i < segments.size(); i++) {\n PathSegment segment = segments.get(i);\n double endSpeed = startSpeeds[i + 1];\n MotionState startState = (i > 0) ? segments.get(i - 1).getEndState() : new MotionState(0, 0, 0, 0);\n startState = new MotionState(0, 0, startState.vel(), startState.vel());\n segment.createMotionProfiler(startState, endSpeed);\n }\n }", "@Override\n\tpublic void testPeriodic() {\n\t\tint testNum = 1;\t\t//which test code will run\n\t\tswitch(testNum) {\n\t\t\tcase(0):\n\t\t\t\tgearBoxTest();\n\t\t\t\tbreak;\n\t\t\tcase(1):\t\t\t//left start\n\t\t\t\tswitch (gameData.substring(0,1)) {\n\t\t\t\t\tcase \"L\":\n\t\t\t\t\t\t//Move forward\n\t\t\t\t\t\tmoveDistance(1.524,0);\n\t\t\t\t\t\t//Turn to 90(left) degrees and move\n\t\t\t\t\t\tmoveDistance(2.413,90);\n\t\t\t\t\t\t//Turn to 0 Degrees\n\t\t\t\t\t\tmoveDistance(1.778, 0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"R\":\n\t\t\t\t\t\tmoveDistance(1.63, 0);\t\t\t//move forward 1.63 m\n\t\t\t\t\t\tmoveDistance(0.91, 315);\t\t\t//move at a 315 degree for 1.63 m\n\t\t\t\t\t\tmoveDistance(0.76, 0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase(2):\t\t\t//middle start\n\t\t\t\tswitch (gameData.substring(0,1)) {\n\t\t\t\t\tcase \"L\":\n\t\t\t\t\t\t//Move forward\n\t\t\t\t\t\tmoveDistance(1.524,0);\n\t\t\t\t\t\t//Turn to 90(left) degrees and move\n\t\t\t\t\t\tmoveDistance(2.413,90);\n\t\t\t\t\t\t//Turn to 0 Degrees\n\t\t\t\t\t\tmoveDistance(1.778, 0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"R\":\n\t\t\t\t\t\tmoveDistance(1.63, 0);\t\t\t//move forward 1.63 m\n\t\t\t\t\t\tmoveDistance(0.91, 315);\t\t\t//move at a 315 degree for 1.63 m\n\t\t\t\t\t\tmoveDistance(0.76, 0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase(3):\t\t\t//right start\n\t\t\t\tswitch (gameData.substring(0,1)) {\n\t\t\t\t\tcase \"L\":\n\t\t\t\t\t\tmoveDistance(4.3, 0);\t\t//move forward 4.3 m\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"R\":\n\t\t\t\t\t\tmoveDistance(4.3, 0);\t\t//move forward 4.3 m\n\t\t\t\t\t\tmoveDistance(0.78, 90);\t\t\t//rotate towards switch and move .78 m towards it\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tmotorRF.set(0);\n\t\tmotorRB.set(0);\n\t\tmotorLF.set(0);\n\t\tmotorLB.set(0);\n\t}", "public void run() {\n\t\tString result;\n\t\tthis.running = true;\n\t\tdouble position[] = new double[3];\n\t\tdouble measures[] = new double[360];\n\n\t\twhile (running) {\n\t\t\ttry {\n\t\t\t\tPipedInputStream pipeIn = new PipedInputStream();\n\t\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(pipeIn));\n\t\t\t\tPrintWriter output = new PrintWriter(new PipedOutputStream(pipeIn), true);\n\t\t\t\trobot.setOutput(output);\n\n\t\t\t\t//ases where a variable value is never used after its assignment, i.e.:\n\t\t\t\tSystem.out.println(\"intelligence running\");\n\n\t\t\t\trobot.sendCommand(\"R1.GETPOS\");\n\t\t\t\tresult = input.readLine();\n\t\t\t\tparsePosition(result, position);\n\t\t\t\trecords.clear();\n\t\t\t\trobot.sendCommand(\"L1.SCAN\");\n\t\t\t\tresult = input.readLine();\n\t\t\t\tif (result.substring(0, 4).equalsIgnoreCase(\"SCAN\")) {\n\t\t\t\t\tparseMeasures(result, measures);\n\t\t\t\t}\n\t\t\t\trobot.sendCommand(\"S1.SCAN\");\n\t\t\t\tresult = input.readLine();\n\t\t\t\tif (result.substring(0, 4).equalsIgnoreCase(\"SCAN\")) {\n\t\t\t\t\tparseMeasures(result, measures);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif (result.substring(0, 4).equalsIgnoreCase(\"SCAN\")) {\n\t\t\t\t\t\t//addCommandToRobot(result,measures);\n\t\t\t\t\t\t//parseMeasures(result, measures);\n\t\t\t\t\t\tif (!addCommand()) //If it doesn't add any command go forward\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trobot.sendCommand(\"P1.MOVEFW 15\");\n\t\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.err.println(\"E! :(\");\n\t\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\t}\n\t\t\t\tmap.drawLaserScan(position, measures);\n\n\t\t\t\tpipeIn.close();\n\t\t\t\tinput.close();\n\t\t\t\toutput.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.err.println(\"IOE! :(\");\n\t\t\t\tSystem.err.println(\"execution stopped\");\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n setSpeed(MAX_SPEED, MAX_SPEED);\n while (step(TIME_STEP) != 16) {\n String name = \"\";\n if (behaviourList.get(2).takeControl()){\n name = \"inFrontOfWall\";\n behaviourList.get(2).action();\n } else if (behaviourList.get(1).takeControl()){\n name = \"isBallanceBall\";\n behaviourList.get(1).action();\n } else if (behaviourList.get(0).takeControl()){\n name = \"searchBall\";\n behaviourList.get(0).action();\n }\n printDistanceInfo(name);\n }\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 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}", "public void testPositionNumerically() {\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n double epsilon = 0.000000000001;\n integrateVelocity(racetrack, 0, endtime, n, epsilon);\n }", "public void start(){\n tuningParams = new HashMap<>();\n running = true;\n int valsListIndex = 0;\n Gamepad gamepad1 = FTCUtilities.getOpMode().gamepad1;\n Switch upSwitch = new Switch();\n Switch downSwitch = new Switch();\n\n\n for(String name: params.keySet()){\n tuningParams.put(name,0.0);\n }\n\n while (running){\n for(String name : paramNames){\n String output = \"\";\n\n output += name;\n output += \": \";\n output += Double.toString(tuningParams.get(name));\n if(paramNames.get(valsListIndex).equals(name)){\n output += \"<---\"; // Indicator so that we know which value we're editing\n }\n\n FTCUtilities.addLine(output);\n }\n\n if(gamepad1.dpad_up) {\n if (upSwitch.flip()) {\n if (valsListIndex >= 1) {\n valsListIndex -= 1;\n } else {\n valsListIndex = paramNames.size() - 1; //wrap to top\n }\n }\n } else if(gamepad1.dpad_down){\n if (downSwitch.flip()) {\n if (valsListIndex < paramNames.size() - 1) {\n valsListIndex += 1;\n } else {\n valsListIndex = 0; // wrap around to 0\n }\n }\n } else {\n String currentValKey = paramNames.get(valsListIndex);\n double currentValDouble = tuningParams.get(currentValKey);\n currentValDouble += gamepad1.right_trigger * params.get(currentValKey);\n currentValDouble -= gamepad1.left_trigger * params.get(currentValKey);\n tuningParams.put(currentValKey, currentValDouble);\n }\n FTCUtilities.updateOpLogger();\n\n if (gamepad1.x) {\n stop();\n }\n }\n }", "public boolean checkSystem() {\n print(\"Testing ELEVATOR.--------------------------------------------------\");\n final double kCurrentThres = 0.5;\n if(getPosition() < 0){\n zeroPosition();\n }\n spx.set(ControlMode.PercentOutput, -0.1);\n srx.set(ControlMode.PercentOutput, -0.1);\n Timer.delay(0.2);\n srx.set(ControlMode.PercentOutput, 0.0);\n spx.set(ControlMode.PercentOutput, 0.0);\n Timer.delay(0.1);\n; srx.setNeutralMode(NeutralMode.Coast);\n spx.setNeutralMode(NeutralMode.Coast);\n\n double testSpeed = .75;\n double testDownSpeed = -0.05;\n double testUpTime = 1;\n\n\n if(getPosition() < 0){\n zeroPosition();\n }\n // test climber srx\n final double SRXintialEncoderPos = Math.abs(getPosition());\n srx.set(ControlMode.PercentOutput, testSpeed);\n Timer.delay(testUpTime);\n srx.set(ControlMode.PercentOutput, 0.0);\n final double currentSRX = RobotContainer.PDP.getCurrent(Constants.ELEVATOR_SRX_PDP);\n final double positionSRX = getPosition();\n //srx.set(ControlMode.PercentOutput, testDownSpeed);\n //Timer.delay(0.1);\n \n Timer.delay(2.0);\n\n if(getPosition() < 0){\n zeroPosition();\n }\n\n // Test climber spx\n final double SPXintialEncoderPos = Math.abs(getPosition());\n spx.set(ControlMode.PercentOutput, testSpeed);\n Timer.delay(testUpTime);\n final double currentSPX = RobotContainer.PDP.getCurrent(Constants.ELEVATOR_SPX_PDP);\n final double positionSPX = getPosition();\n spx.set(ControlMode.PercentOutput, testDownSpeed);\n Timer.delay(0.1);\n spx.set(ControlMode.PercentOutput, 0.0);\n\n Timer.delay(1.0);\n //Reset Motors\n spx.follow(srx); \n srx.setNeutralMode(NeutralMode.Brake);\n spx.setNeutralMode(NeutralMode.Brake);\n\n print(\"ELEVATOR SRX CURRENT: \" + currentSRX + \" SPX CURRENT: \" + currentSPX);\n print(\"ELEVATOR SRX ENCODER INIT POS: \" + SRXintialEncoderPos + \" END POS: \" + positionSRX);\n print(\"ELEVATOR SPX ENCODER INIT POS: \" + SRXintialEncoderPos + \" END POS: \" + positionSPX);\n\n boolean failure = false;\n\n print(\"!%!%#$!%@ - WRITE A TEST FOR THE ELEVATOR LIMIT SWITCHES!!!!!!!!!\");\n\n if (currentSRX < kCurrentThres) {\n failure = true;\n print(\"!!!!!!!!!!!!!!!!! ELEVATOR SRX Current Low !!!!!!!!!!!!!!!!!\");\n }\n\n if (currentSPX < kCurrentThres) {\n failure = true;\n print(\"!!!!!!!!!!!!!!!! ELEVATOR SPX Current Low !!!!!!!!!!!!!!!!!!!\");\n }\n\n if (!Util.allCloseTo(Arrays.asList(currentSRX, currentSPX), currentSRX, 5.0)) {\n failure = true;\n print(\"!!!!!!!!!!!!!!!! ELEVATOR Currents Different !!!!!!!!!!!!!!!!!\");\n }\n\n if (Math.abs(positionSRX - SRXintialEncoderPos) <= 0){\n failure = true;\n print(\"!!!!!!!!!!!! ELEVATOR Encoder didn't change position SRX !!!!!!!!!!!!!\");\n }\n\n if (Math.abs(positionSPX - SPXintialEncoderPos) <= 0){\n failure = true;\n print(\"!!!!!!!!!!!! ELEVATOR Encoder didn't change position SPX !!!!!!!!!!!!!\");\n }\n\n return failure;\n }", "@Override\npublic int run(int speed) {\n\t\n\treturn getSpeed();\n}", "public static void main(String[] args) {\n\t\tint size = 600_000_000;\n\t\tint[] mas = new int[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tmas[i] = i;\n\t\t}\n\n\t\t// positive test\n\t\tint target = size - 1;\n\n\t\tlong start = System.currentTimeMillis();\n\t\tlinearSearchTestPositive(mas, target, target);\n\t\tlong end = System.currentTimeMillis();\n\t\tSystem.out.println(end - start);\n\n\n\t\tlong start1 = System.currentTimeMillis();\n\t\tbinarySearchTestPositive(mas, target, target);\n\t\tlong end1 = System.currentTimeMillis();\n\t\tSystem.out.println(end1 - start1);\n\t}", "public static void main(String[] args) throws Exception {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint n = scn.nextInt();\r\n\t\tint k = scn.nextInt();\r\n\t\tint map[][] = new int[n][n];\r\n\t\tfor(int i=0; i<k; i++) {\r\n\t\t\tint h = scn.nextInt();\r\n\t\t\tint w = scn.nextInt();\r\n\t\t\tmap[h-1][w-1] = 1;\r\n\t\t}\r\n\t\t\r\n\t\tint r = scn.nextInt();\r\n\t\tint t[] = new int[r];\r\n\t\tString d[] = new String[r];\r\n\t\tfor(int i=0; i<r; i++) {\r\n\t\t\tt[i] = scn.nextInt();\r\n\t\t\tString str = scn.next();\r\n\t\t\tstr.replace(\" \", \"\");\r\n\t\t\td[i] = str;\t\r\n\t\t}\r\n\t\tplay(map, t, d, r, n);\r\n\t\tSystem.out.println(playTime);\t\r\n\t}", "public void run() {\n // solve();\n faster();\n }", "private static boolean KawigiEdit_RunTest(\n int testNum, int p0, int p1, boolean hasAnswer, int[] p2) {\n System.out.print(\"Test \" + testNum + \": [\" + p0 + \",\" + p1);\n System.out.println(\"]\");\n RearrangeAndIncrement obj;\n int[] answer;\n obj = new RearrangeAndIncrement();\n long startTime = System.currentTimeMillis();\n answer = obj.change(p0, p1);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; p2.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(p2[i]);\n }\n System.out.println(\"}\");\n }\n System.out.println(\"Your answer:\");\n System.out.print(\"\\t\" + \"{\");\n for (int i = 0; answer.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(answer[i]);\n }\n System.out.println(\"}\");\n if (hasAnswer) {\n if (answer.length != p2.length) {\n res = false;\n } else {\n for (int i = 0; answer.length > i; ++i) {\n if (answer[i] != p2[i]) {\n res = false;\n }\n }\n }\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "public synchronized void start() {\n // For max accuracy, reset oldTime to really reflect how much\n // time will have passed since we wanted to start the updating\n oldTime = System.nanoTime();\n updateGameDataAtSlowRate();\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}", "private void runTrajectory(Point startPoint, java.util.ArrayList<Point> trajectory) {\n\n // Loop through the points and orientations previously defined.\n for (int i = 0; i < trajectory.size(); i++) {\n\n if (!m_fastMode) {\n // Do an honest job\n Kinematics k = m_robot.getCurrentKinematics();\n Point beg;\n if (i == 0)\n beg = k.getPosition(); // current position\n else\n beg = trajectory.get(i-1);\n Point end = trajectory.get(i); // next position\n\n // The bot does not like to move between close points\n if (pointDistance(beg, end) < samplingRate/2.0)\n continue;\n\n Quaternion orientation = orientationAlongSegment(beg, end);\n\n Result result = moveTo(beg, orientation);\n if (!result.hasSucceeded()) {\n // If anything fails we cancel all execution.\n logger.error(\"Motion failed.\");\n break;\n }\n result = moveTo(end, orientation);\n if (!result.hasSucceeded()) {\n // If anything fails we cancel all execution.\n logger.error(\"Motion failed.\");\n break;\n }\n }\n else {\n // Bypass all the bot logic, and quickly move along the points\n // while measuring the sound there.\n Point beg;\n if (i == 0)\n beg = startPoint;\n else\n beg = trajectory.get(i-1);\n Point end = trajectory.get(i);\n\n // Since we won't use an actual bot that will slowly\n // takes samples along the way, fake it by creating\n // some sample points.\n double spacing = 0.1; // In meters. This needs tuning.\n double dx = end.getX() - beg.getX();\n double dy = end.getY() - beg.getY();\n double dz = end.getZ() - beg.getZ();\n double len = Math.sqrt(dx*dx + dy*dy + dz*dz);\n int num = (int)Math.round(len/spacing) + 1;\n\n for (int pt = 0; pt <= num; pt++) {\n double t = (double)pt/(double)num;\n Point P = new Point(beg.getX() + t*dx,\n beg.getY() + t*dy,\n beg.getZ() + t*dz);\n genSound(P);\n try {\n // Sleep a little so that ROS can keep up\n Thread.sleep(100);\n }\n catch (InterruptedException e) {\n }\n }\n\n }\n }\n }", "public void faster()\n {\n if(speed < 9){\n speed += 1;\n }\n }", "void realTimeProcess(){\n //For red list\n if(redList.get(redList.size()-1).getYPos() < redList.get(redList.size()-2).getYPos() && !steppedOnceRed && redGreenLine){\n realTimeIncreaseRed = true;\n }\n else if(redList.get(redList.size()-1).getYPos() > redList.get(redList.size()-2).getYPos() && realTimeIncreaseRed && !steppedOnceRed && redGreenLine){\n stepCount++;\n stepTimeStamp.add(System.nanoTime());\n updateStepCoordiantes();\n steppedOnceRed =true;\n System.out.println(\"STEP: \" + redList.get(redList.size()-1).getYPos());\n realTimeIncreaseRed = false;\n }\n //for blue list\n if(blueList.get(blueList.size()-1).getYPos() < blueList.get(blueList.size()-2).getYPos() && !steppedOnceBlue && blueGreenLine){\n realTimeIncreaseBlue = true;\n }\n else if(blueList.get(blueList.size()-1).getYPos() > blueList.get(blueList.size()-2).getYPos() && realTimeIncreaseBlue && !steppedOnceBlue && blueGreenLine){\n stepCount++;\n stepTimeStamp.add(System.nanoTime());\n updateStepCoordiantes();\n steppedOnceBlue = true;\n System.out.println(\"STEP: \" + blueList.get(blueList.size()-1).getYPos());\n realTimeIncreaseBlue = false;\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n stepText.setText(USER_NAME + \"'s step length: \" + String.format(\"%.3f\", STEP_LENGTH) + \"m\" + \"\\n\" + \"Number of Steps: \" + stepCount +\"\\n\" + \"Coordinates: \" +\"\\n\" + String.format(\"%.8f\", displayLat) + \", \" + String.format(\"%.8f\",dispalyLon));\n }\n });\n Log.i(\"NUMBER OF STEPS\", Double.toString(totalNumSteps));\n if(stepCount >= totalNumSteps){\n processScanCoordinates(blueFootTimeStamp, \"blue\");\n processScanCoordinates(redFootTimeStamp, \"red\");\n processScanCoordinates(magTimeStamps, \"mag\");\n processScanCoordinates(gyroTimeStamp, \"gyro\");\n processScanCoordinates(accelTimeStamp, \"accel\");\n postProcessData();\n\n }\n }", "public void AI()\r\n\t{\r\n\t\tRandom random = new Random();\r\n\t\tspeed = random.nextInt(2) + 1;\r\n\t\tif (canMove)\r\n\t\t{\r\n\t\t\tif (randomAxis == 1)\r\n\t\t\t{\r\n\t\t\t\tif (xDestination < this.x)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.x -= this.speed;\r\n\t\t\t\t\tthis.hitBox.addX(-(this.speed));\r\n\t\t\t\t\tdirection = KeysDefiner.LEFT;\r\n\t\t\t\t}\r\n\t\t\t\telse if (xDestination > this.x)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.x += this.speed;\r\n\t\t\t\t\tthis.hitBox.addX(this.speed);\r\n\t\t\t\t\tdirection = KeysDefiner.RIGHT;\r\n\t\t\t\t}\r\n\t\t\t\telse if (xDestination == this.x)\r\n\t\t\t\t\trandomAxis = 2;\r\n\t\t\t}\r\n\t\t\telse if (randomAxis == 2)\r\n\t\t\t{\r\n\t\t\t\tif (yDestination < this.y)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.y -= this.speed;\r\n\t\t\t\t\tthis.hitBox.addY(-(this.speed));\r\n\t\t\t\t\tdirection = KeysDefiner.UP;\r\n\t\t\t\t}\r\n\t\t\t\telse if (yDestination > this.y)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.y += this.speed;\r\n\t\t\t\t\tthis.hitBox.addY(this.speed);\r\n\t\t\t\t\tdirection = KeysDefiner.DOWN;\r\n\t\t\t\t}\r\n\t\t\t\telse if (yDestination == this.y)\r\n\t\t\t\t\trandomAxis = 1;\r\n\t\t\t}\r\n\t\t\tif (yDestination == this.y && xDestination == this.x)\r\n\t\t\t{\r\n\t\t\t\tif (spotsNumber == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\txDestination = random.nextInt(SCREEN_W / 2) * 2;\r\n\t\t\t\t\tyDestination = random.nextInt(SCREEN_H / 2) * 2;\r\n\t\t\t\t\tspotsNumber++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (spotsNumber == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\txDestination = -(SCREEN_W / 21);\r\n\t\t\t\t\tyDestination = -(SCREEN_H / 12);\r\n\t\t\t\t\tspotsNumber++;\r\n\t\t\t\t}\r\n\t\t\t\telse lastDestinationReached = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void runOpMode() throws InterruptedException {\n initialize();\n\n waitForStart();\n\n /* drivetrain.Strafe(1F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(1F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(1F, 10, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(1F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(1F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(1F, 20, Direction.LEFT); */\n\n sleep(6000);\n\n drivetrain.Strafe(.5F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 10, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 30, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 30, Direction.LEFT);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 1.1f, this);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 1.3f, this);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 1.5f, this);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 2f, this);\n\n\n /*drivetrain.Strafe(.75F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.75F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.75F, 10, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.75F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.75F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.75F, 20, Direction.LEFT);\n sleep(6000);\n\n drivetrain.Strafe(.5F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 10, Direction.RIGHT);\n sleep(2000);\n\n\n drivetrain.Strafe(.5F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.LEFT);\n sleep(2000); */\n\n drivetrain.StopAll();\n\n\n\n }", "private static void work() {\n\n\t\tboolean posChanged = true;\n\t\tList<Point> points;\n\t\tLinkedList<Point> doubleCheck;\n\t\tList<Point> pointsVisited = new LinkedList<Point>();\n\t\tunsafe = new LinkedList<Point>();\n\t\twhile (posChanged) {\n\n\t\t\tSystem.out.println(curentField.getCoords());\n\t\t\tif (curentField.isTele()) {\n\t\t\t\tSystem.out.println(\"Beam me up scoty\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (curentField.isPit()) {\n\t\t\t\tSystem.out.println(\"OOOH nooo its hoooot!!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (curentField.isWumpus()) {\n\t\t\t\tSystem.out.println(\"Oh what a nice giant snail!\");\n\t\t\t\tSystem.out.println(\"Oh you can speak?\");\n\t\t\t\tSystem.out.println(\"Wait...What are you doing?\");\n\t\t\t\tSystem.out.println(\"Nooo help me, i am geting eaten alive!!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tposChanged = false;\n\n\t\t\tbase.updateBase(curentField);\n\t\t\tpointsVisited.add(pos);\n\n\t\t\tpoints = new LinkedList<Point>();\n\t\t\tif (pos.getX() > 1) {\n\t\t\t\tpoints.add(new Point(pos.getX() - 1, pos.getY()));\n\t\t\t}\n\n\t\t\tif (pos.getX() < dimension) {\n\t\t\t\tpoints.add(new Point(pos.getX() + 1, pos.getY()));\n\n\t\t\t}\n\n\t\t\tif (pos.getY() > 1) {\n\t\t\t\tpoints.add(new Point(pos.getX(), pos.getY() - 1));\n\n\t\t\t}\n\t\t\tif (pos.getY() < dimension) {\n\t\t\t\tpoints.add(new Point(pos.getX(), pos.getY() + 1));\n\t\t\t}\n\n\t\t\tCollections.sort(points);\n\t\t\tfor (Point p : points) {\n\n\t\t\t\tif (base.isTeleporter(p)) {\n\t\t\t\t\tpos = p;\n\t\t\t\t\tcurentField = map.get(pos);\n\t\t\t\t\tposChanged = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tfor (Point p : points) {\n\t\t\t\tif (base.isSafe(p) && (!pointsVisited.contains(p))\n\t\t\t\t\t\t&& (!safe.contains(p))) {\n\t\t\t\t\tsafe.add(p);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor (Point p : points) {\n\t\t\t\tif (!base.isDead(p) && (!pointsVisited.contains(p))\n\t\t\t\t\t\t&& (!safe.contains(p))) {\n\t\t\t\t\tunsafe.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (safe.size() > 0) {\n\t\t\t\tCollections.sort(safe);\n\t\t\t\twhile ((!posChanged) && (!safe.isEmpty())) {\n\t\t\t\t\tPoint p = safe.pollFirst();\n\t\t\t\t\tif (!pointsVisited.contains(p)) {\n\t\t\t\t\t\tposChanged = true;\n\t\t\t\t\t\tpos = p;\n\t\t\t\t\t\tcurentField = map.get(pos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!unsafe.isEmpty() && !posChanged) {\n\t\t\t\tdoubleCheck = new LinkedList<Point>();\n\t\t\t\tfor (Point p : unsafe) {\n\t\t\t\t\tif (base.isSafe(p) && (!pointsVisited.contains(p))\n\t\t\t\t\t\t\t&& (!safe.contains(p))) {\n\t\t\t\t\t\tsafe.add(p);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (!safe.isEmpty()) {\n\t\t\t\t\tCollections.sort(safe);\n\t\t\t\t\tposChanged = true;\n\t\t\t\t\tpos = safe.pollFirst();\n\t\t\t\t\tcurentField = map.get(pos);\n\t\t\t\t}\n\t\t\t\tif (!posChanged) {\n\t\t\t\t\tfor (Point p : unsafe) {\n\t\t\t\t\t\tif (!base.isDead(p) && (!pointsVisited.contains(p))\n\t\t\t\t\t\t\t\t&& (!safe.contains(p))) {\n\t\t\t\t\t\t\tdoubleCheck.add(p);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunsafe = new LinkedList<Point>(doubleCheck);\n\t\t\t\tCollections.sort(unsafe);\n\t\t\t\twhile ((!posChanged) && (!unsafe.isEmpty())) {\n\t\t\t\t\tPoint p = unsafe.pollFirst();\n\t\t\t\t\tif (!pointsVisited.contains(p)) {\n\t\t\t\t\t\tposChanged = true;\n\t\t\t\t\t\tpos = p;\n\t\t\t\t\t\tcurentField = map.get(pos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(unsafe);\n\t\t\t}\n\n\t\t}\n\n\t}", "public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}", "@Override\n public void runOpMode() throws InterruptedException {\n robot = new OptimizedRobot(gamepad1, gamepad2, telemetry, hardwareMap);\n\n // Grab our controller 1 using robot.getController1()\n\n controller1 = robot.getController1();\n\n // Grab our our encoders using robot.getEncoder() there are TWO of them\n // Use xEncoder and yEncoder for the names!\n\n xEncoder = robot.getEncoder(\"XEncoder\");\n yEncoder = robot.getEncoder(\"YEncoder\");\n\n // Reverse the direction of our left encoder using encoder.setDirection()\n\n xEncoder.setDirection(Encoder.Direction.REVERSE);\n\n\n // Waiting for the play button to be pressed\n waitForStart();\n\n robot.log(\"Instructions\", \"Your job is the move the robot \"+DISTANCE_TO_TRAVEL+\" forward and right for each trial!\");\n\n for(int i = 0; i < NUM_SAMPLES; i++) {\n robot.addLog(\"Prompt\", \"Trial #\"+(i+1)+\" of \"+NUM_SAMPLES);\n robot.addLog(\"Prompt\", \"Set up your robot on its start position and press A to start the tuning!\");\n robot.pushLog();\n\n while(!controller1.getBool(OptimizedController.Key.A)) {\n }\n\n prevX = xEncoder.getCurrentPosition();\n prevY = yEncoder.getCurrentPosition();\n\n robot.addLog(\"Running\", \"Drag your robot forward \"+DISTANCE_TO_TRAVEL+\" inches and \"+DISTANCE_TO_TRAVEL+\" inches to the right!\");\n robot.addLog(\"Running\", \"Try to keep the robot straight the entire time--try using a line on the floor for reference.\");\n robot.addLog(\"Instructions\", \"Press B when you have finished moving the robot!\");\n robot.pushLog();\n\n while(!controller1.getBool(OptimizedController.Key.B)) {\n estimatedX = xEncoder.getCurrentPosition() - prevX;\n estimatedY = yEncoder.getCurrentPosition() - prevY;\n }\n\n xTraveled[i] = estimatedX;\n yTraveled[i] = estimatedY;\n }\n\n\n double xCoefficient = 0;\n double yCoefficient = 0;\n\n for(int num : xTraveled) {\n xCoefficient += (TICKS_PER_REV * (DISTANCE_TO_TRAVEL / (2 * Math.PI * ODOMETRY_WHEEL_RADIUS))) / num;\n }\n\n for(int num : yTraveled) {\n yCoefficient += (TICKS_PER_REV * (DISTANCE_TO_TRAVEL / (2 * Math.PI * ODOMETRY_WHEEL_RADIUS))) / num;\n }\n\n xCoefficient /= NUM_SAMPLES;\n yCoefficient /= NUM_SAMPLES;\n\n robot.addLog(\"xEncoder Coefficient = \", Math.abs(xCoefficient));\n robot.addLog(\"yEncoder Coefficient = \", Math.abs(yCoefficient));\n robot.pushLog();\n\n while(opModeIsActive()) {\n }\n }", "public void getInput() {\n\t\t\n\t\txMove = 0;\n\t\tyMove = 0;\n\t\tpenetrating = false;\n\t\t\n\t\t\n\t\tif(handler.getKeyManager().up) {\n\t\t\tyMove -= speed;\n\t\t}\n\t\tif(handler.getKeyManager().down) {\n\t\t\tyMove += speed;\n\t\t}\n\n\t\tif(handler.getKeyManager().left) {\n\t\t\txMove -= speed;\n\t\t}\n\t\tif(handler.getKeyManager().right) {\n\t\t\txMove += speed;\n\t\t}\n\t\t\n\t\tisMoving = (xMove != 0 || yMove != 0);\n\t\t\n\t\tmouseX = handler.getMouseManager().getMouseX();\n\t\tmouseY = handler.getMouseManager().getMouseY();\n\t\tisShooting = handler.getMouseManager().isPressingLeft();\n\t\t\n\t\tisReloading = handler.getKeyManager().r;\n\t}", "@Override\r\n public int run() {\n if (robot.rightDrive.isBusy() && robot.leftDrive.isBusy()) {\r\n robot.leftDrive.setPower(leftSpeed);\r\n robot.rightDrive.setPower(rightSpeed);\r\n\r\n /*telemetry.addData(\"MoveByEncoder To\", \"Left: (%2f), Right (%2f)\",\r\n leftTarget, rightTarget);\r\n telemetry.addData(\"MoveByEncoder At\", \"Left: (%2f), Right (%2f)\",\r\n robot.leftDrive.getCurrentPosition(), robot.rightDrive.getCurrentPosition());\r\n telemetry.update();*/\r\n\r\n telemetry.addData(\"Left Pos\", robot.leftDrive.getCurrentPosition());\r\n telemetry.addData(\"Right Pos\", robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n\r\n return 0;\r\n\r\n }\r\n\r\n return nextPos;\r\n }", "private void getInput(){\n\n if (tankNumber == 1) {\n if (handler.getTankControl1().up1) {\n this.moveForwards();\n }\n if (handler.getTankControl1().down1) {\n this.moveBackwards();\n }\n if (handler.getTankControl1().left1) {\n this.rotateLeft();\n }\n if (handler.getTankControl1().right1) {\n this.rotateRight();\n }\n if (handler.getTankControl1().enter){\n this.checkAttacks();\n }\n// if (handler.getTankControl1().checkEntities)\n// {\n// handler.getWorld().getEntityManager().printContents();\n// }\n }\n\n if (tankNumber == 2){\n if (handler.getTankControl1().up2) {\n this.moveForwards();\n }\n if (handler.getTankControl1().down2) {\n this.moveBackwards();\n }\n if (handler.getTankControl1().left2) {\n this.rotateLeft();\n }\n if (handler.getTankControl1().right2) {\n this.rotateRight();\n }\n if (handler.getTankControl1().space){\n this.checkAttacks();\n }\n }\n\n }", "public void testMovToPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.moveToPos(5));\n assertTrue(test1.getValue().inRange(5));\n assertFalse(test1.moveToPos(-5));\n assertFalse(test1.getValue().inRange(-5));\n assertFalse(test1.moveToPos(50));\n assertFalse(test1.getValue().inRange(50));\n }", "protected abstract void askTest(int currentLap);", "private void testGrab()\n {\n if(gamepad1.y) {\n //move to position where it touches block ----might have to change angle based on trial----\n //Drastic angles at the moment for testing\n servoLeft.setPosition(0.5);\n //servoRight.setPosition(0.5);\n }\n }", "@Override\r\n\tpublic void speed() {\n\t}", "@Test\n public void testProcess() { // not using mock\n System.out.println(\"process\");\n\n GameData gameData = new GameData();\n gameData.getKeys().setKey(GameKeys.UP, true);\n gameData.setDelta(1);\n gameData.setDisplayWidth(800);\n gameData.setDisplayHeight(600);\n\n World world = new World();\n PlayerPlugin playerPlugin = new PlayerPlugin();\n playerPlugin.start(gameData, world);\n\n Entity player = world.getEntities(Player.class).get(0);\n PositionPart pos = player.getPart(PositionPart.class);\n\n float startX = pos.getX();\n float startY = pos.getY();\n\n PlayerControlSystem instance = new PlayerControlSystem();\n instance.process(gameData, world);\n\n float endX = pos.getX();\n float endY = pos.getY();\n\n assertEquals((int) startX, (int) endX);\n assertNotEquals((int) startY, (int) endY);\n }", "public void process()\n {\n // Get current time\n\t\tdouble t = readClock() * clockSpeed;\n\t\tdouble dTime = t - computeClock;\n\t\tdouble dtMax = 1/50.0f;\n\t\n\t\t// Set current time on display\n\t\tcomputeClock = t;\n\t\t\n\n // Only process if time has elapsed\n if (dTime <= 0)\n return;\n\n\n\t\t// ---------------\n\t\n\t\t// Compute accelerations, then integrate (using Critter methods)\n\t\n\t // This part advances the simulation forward by dTime seconds, but\n\t // using steps that are no larger than dtMax (this means it takes\n\t // more than one step when dTime > dtMax -- the number of steps\n\t // you need is stored in numSteps).\n\t\n\t // *** placeholder value\n\t int numSteps = (int) Math.floor(dTime / dtMax);\n\t \n\t // compute a new 'goal' point for the mainbug to attract toward - every 7 seconds\n\t if ((computeClock) - (goalPickClock) > 7)\n\t {\n\t \t// pick a new random goal point\n\t \tgoal = new Point3d(rgen.nextDouble()*16-8, rgen.nextDouble()*16-8, 0);\n\t \tgoalPickClock = computeClock;\n \t\n\t \ttarget = (int)rgen.nextDouble()*(critters.size()-2);\n\t \twhile (critters.get(target) == predator || critters.get(target) == mainBug)\n\t \t\ttarget = (int)(rgen.nextDouble()*(critters.size()-1));\n\t }\n\t \n\t // Here is the rough structure of what you'll need\n\t //\n\t\t// numSteps = how many steps to take for stable integration\n\t // do numSteps times\n\t // - reset acceleration\n\t // - compute acceleration (adding up accelerations from attractions,\n\t // repulsions, drag, ...)\n\t // - integrate (by dTime/numSteps)\n\t // end\n\t //\n\t // ...\n\t for (int i = 0; i < numSteps; i++)\n\t {\n\t \tfor (int k = 0; k < critters.size(); k++)\n\t \t{\n\t \t\tCritter tmp = critters.get(k);\n\t \t\ttmp.accelReset();\n\t \t\ttmp.accelDrag(0.6); // dampening\n\t \t\t\n\n\t \t\t\n\t \t\tif (tmp == mainBug)// big bug follows randomized 'goal' point (food? water? shelter? )\n\t \t\t{\n\t \t\t\ttmp.accelAttract(goal, 0.1, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.3, -2);\n\t \t\t\ttmp.accelAttract(origin, 0.25, 1);\t \t\t\t // attraction toward center of scene\n\t \t\t}\n\t \t\telse if (tmp == predator )\n\t \t\t{\n \t\t\t\t\ttmp.accelAttract(critters.get(target).getLocation(), rgen.nextDouble()*0.4, 2);\t \t\t\t\t\t\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t// baby bugs follow big bug and are repelled from other baby bugs and predator!\n\t \t\t\ttmp.accelAttract(mainBug.getLocation(), rgen.nextDouble()*0.3, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.45, -3);\n\t \t\t\tfor (int m = 0; m < critters.size(); m++)\n\t \t\t\t{\n\t \t\t\t\tif (critters.get(m) != mainBug && critters.get(m) != tmp)\n\t \t\t\t\t\ttmp.accelAttract(critters.get(m).getLocation(), -rgen.nextDouble()*0.5, -1);\t \t\t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t\n\t\t \t// repulsion away from obstacles\n\t\t \tfor (int j = 0; j < obstacles.size(); j++)\n\t\t \t{\n\t\t \t\ttmp.accelAttract(obstacles.get(j).getLocation(), -0.5, -2);\n\t\t \t}\n\t\t \t\n\t\t \ttmp.integrate(dTime/numSteps);\n\t \t}\n\t }\n\t\n\t // Keyframe motion for each critter\n\t for (int i = 0; i < critters.size(); i++)\n\t {\n\t \tcritters.get(i).keyframe(critters.get(i).dist);\n\t }\n }", "public static void checkSpeed(int testSize) {\r\n\t\tSystem.out.println(\"Beginning checkSpeed indexOf test of size \" + testSize);\r\n\t\t\r\n\t\t// keep track of starting time before constructing\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\t\r\n\t\t// fill up the list with even numbers\r\n\t\tint dot = testSize / 10;\r\n\t\tSortedIntList list = new SortedIntList(false, testSize);\r\n\t\tSystem.out.print(\" Building list of the first \" + testSize + \" multiples of 2: \");\r\n\t\tboolean addTooSlow = false;\r\n\t\tfor (int i = 0; i < testSize; i++) {\r\n\t\t\tlist.add(2 * i);\r\n\t\t\tif (i % dot == 0) {\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t}\r\n\t\t\tif (!addTooSlow && System.currentTimeMillis() >= start + testSize / 20) {\r\n\t\t\t\tSystem.out.print(\" (add is too slow) \");\r\n\t\t\t\taddTooSlow = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tdouble elapsed = (System.currentTimeMillis() - start)/1000.0;\r\n\t\t// System.out.println(\" construction took \" + elapsed + \" seconds\");\r\n\t\t\r\n\t\t// keep track of starting time before indexOf tests\r\n\t\tSystem.out.print(\" Checking indexOf each element: \");\r\n\t\tstart = System.currentTimeMillis();\r\n\t\tdot = testSize / 10;\r\n\t\tfor (int i = 0; i < testSize; i++) {\r\n\t\t\tfor (int j = 0; j < 100; j++) {\r\n\t\t\t\tint actualIndex = list.indexOf(2 * i);\r\n\t\t\t\tif (actualIndex != i) {\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"\\n\\nindexOf \" + 2 * i + \" should have returned: \" +\r\n\t\t\t\t\ti + \",\\n but your method actually returned: \" +\r\n\t\t\t\t\tactualIndex + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (System.currentTimeMillis() >= start + testSize / 5) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\"\\n\\nindexOf appears to be running too slowly.\\n\");\r\n\t\t\t}\r\n\t\t\tif (i % dot == 0) {\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble elapsed2 = (System.currentTimeMillis() - start)/1000.0;\r\n\t\tif (addTooSlow) {\r\n\t\t\tSystem.out.println();\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\"\\n\\nYour add method appears to have run too slowly. (runtime: \" + elapsed + \" seconds)\\n\");\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n Passed! (runtime: \" + elapsed2 + \" seconds)\\n\");\r\n\t}", "private void testSolution(String input, String output) {\n runs++;\n\n // Load the problem & solution\n ProblemSpec problemSpec = Solution.loadProblem(input);\n Solution solution = new Solution(problemSpec);\n\n // Solve and time the solution\n long startTime = System.currentTimeMillis();\n List<State> states = solution.solve();\n long endTime = System.currentTimeMillis();\n durations.put(input, endTime - startTime);\n\n // Output the solution\n Solution.writeSolution(Formatter.format(states), output);\n\n problemSpec = Solution.loadProblem(input, output);\n if (solutionPasses(problemSpec)) {\n passes++;\n }\n\n successes++;\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 static void searchTest() {\n\t\t//linear tests\n\t\tStopWatch1 timer;\n\t\tint[] array = generateArray(5000000,1,5000000);\n\t\tSystem.out.printf(\"%15s%10s%10s%10s%10s%10s%n\",\"Size\",\"Sort Type\",\"Pre-sort\",\"Value\",\"Index\",\"Time\");\n\t\tfor(int i = 0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Linear\",\"Random\",temp);\n\t\t\ttimer.start();\n\t\t\tint result = Search.linearSearch(array, temp);\n\t\t\ttimer.stop();\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t\t\n\t\t}\n\t\tSort.mergeSort(array);\n\t\tfor(int i = 0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Linear\",\"Sorted\",temp);\n\t\t\tint result = Search.linearSearch(array, temp);\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t}\n\t\tfor(int i =0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Binary\",\"Sorted\",temp);\n\t\t\tint result = Search.binarySearch(array, temp);\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t}\n\t}", "void run() throws Exception {\n is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\n out.flush();\n tr(System.currentTimeMillis() - s + \"ms\");\n }", "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 }", "private static void runNeedleSimulation() {\n\t\tint iterations = numbersOfIterations(new Scanner(System.in));\n\t\tint hits = needleSimulation(iterations);\n\t\tdouble pi = piCalculation(iterations, hits);\n\t\tSystem.out.println(pi);\n\t\t\n\t\t\n\t}", "private void run() {\n\n //if no time has elapsed, do not do anything\n if (Harness.getTime().equals(lastRunTime)) {\n return;\n }\n\n //double deltaV, deltaX;\n double newSpeed;\n double newPosition;\n double targetSpeed = 0;\n double currentSpeed = 0;\n double acceleration = 0;\n\n switch (driveOrderedState.speed()) {\n case STOP:\n targetSpeed = 0.0;\n break;\n case LEVEL:\n targetSpeed = LevelingSpeed;\n break;\n case SLOW:\n targetSpeed = SlowSpeed;\n break;\n case FAST:\n targetSpeed = FastSpeed;\n break;\n default:\n throw new RuntimeException(\"Unknown speed\");\n }\n /*\n * JDR Bug fix to make the speed stop in the case where the command is\n * Direction=STOP but speed is something other than STOP.\n */\n if (driveOrderedState.direction() == Direction.STOP) {\n targetSpeed = 0.0;\n }\n if (driveOrderedState.direction() == Direction.DOWN) {\n targetSpeed *= -1;\n }\n\n currentSpeed = driveSpeedState.speed();\n if (driveSpeedState.direction() == Direction.DOWN) {\n currentSpeed *= -1;\n }\n\n if (Math.abs(targetSpeed) > Math.abs(currentSpeed)) {\n //need to accelerate\n acceleration = Acceleration;\n } else if (Math.abs(targetSpeed) < Math.abs(currentSpeed)) {\n //need to decelerate\n acceleration = -1 * Deceleration;\n } else {\n acceleration = 0;\n }\n if (currentSpeed < 0) {\n //reverse everything for negative motion (going down)\n acceleration *= -1;\n }\n\n //get the time offset in seconds since the last update\n double timeOffset = SimTime.subtract(Harness.getTime(), lastRunTime).getFracSeconds();\n //remember this time as the last update\n lastRunTime = Harness.getTime();\n\n //now update speed\n //deltav = at\n newSpeed = currentSpeed + (acceleration * timeOffset);\n\n //deltax= vt+ 1/2 at^2\n newPosition = carPositionState.position() +\n (currentSpeed * timeOffset) + \n (0.5 * acceleration * timeOffset * timeOffset);\n if ((currentSpeed < targetSpeed &&\n newSpeed > targetSpeed) ||\n (currentSpeed > targetSpeed &&\n newSpeed < targetSpeed)) {\n //if deltaV causes us to exceed the target speed, set the speed to the target speed\n driveSpeedState.setSpeed(Math.abs(targetSpeed));\n } else {\n driveSpeedState.setSpeed(Math.abs(newSpeed));\n }\n //determine the direction\n if (driveSpeedState.speed() == 0) {\n driveSpeedState.setDirection(Direction.STOP);\n } else if (targetSpeed > 0) {\n driveSpeedState.setDirection(Direction.UP);\n } else if (targetSpeed < 0) {\n driveSpeedState.setDirection(Direction.DOWN);\n }\n carPositionState.set(newPosition);\n\n physicalConnection.sendOnce(carPositionState);\n physicalConnection.sendOnce(driveSpeedState);\n\n log(\" Ordered State=\", driveOrderedState,\n \" Speed State=\", driveSpeedState,\n \" Car Position=\", carPositionState.position(), \" meters\");\n }", "public void intake(double up_speed, double down_speed) //上面&下面的intake\n {\n intake_up.set(ControlMode.PercentOutput, up_speed);\n intake_down.set(ControlMode.PercentOutput, down_speed);\n }", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "public static void input1()\n {\n n = 500;\n /*System.out.println(\"Enter the distance threshold(epsilon)\");\n Scanner di_th1 = new Scanner(System.in);\n distance_thres = di_th1.nextDouble();*/\n distance_thres = 1;\n /*System.out.println(\"Enter the minPts\");\n Scanner m_pt = new Scanner(System.in);\n minPts = m_pt.nextInt();*/\n minPts = 10;\n /*System.out.println(\"Enter the size_threshold\");\n Scanner s_th = new Scanner(System.in);\n size_threshold = s_th.nextInt();*/\n size_threshold = 10;\n /*System.out.println(\"Enter the duration_threshold\");\n Scanner du_th = new Scanner(System.in);\n duration_threshold = du_th.nextDouble();*/\n duration_threshold = 50;\n /*System.out.println(\"Enter the Buddy radius threshold\");\n Scanner bud_rad = new Scanner(System.in);\n buddy_radius = bud_rad.nextDouble();*/\n buddy_radius = 0.2;\n }", "private void handleInput(){\n if(\"W\".charCodeAt(0) in this.keypressed) {\n this.player1SpeedY = this.playerSpeed * -1;\n } else if (\"S\".charCodeAt(0) in this.keypressed){\n this.player1SpeedY = this.playerSpeed;\n } else {\n this.player1SpeedY = 0;\n }\n // player 2 (on the right) uses 'I' to move up and 'K' to move down\n if(\"I\".charCodeAt(0) in this.keypressed) {\n this.player2SpeedY = this.playerSpeed * -1;\n } else if (\"K\".charCodeAt(0) in this.keypressed){\n this.player2SpeedY = this.playerSpeed;\n } else {\n this.player2SpeedY = 0;\n }\n }", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "@Override\n public boolean detect() {\n \t slowDown();\n final MoveResult move = CurrentData.CALCULATED.tetromino.move;\n\t\t\t\t\t\tif (move.hasMove()) {\n final Tetromino moveTetromino = move.tetromino;\n final int y = QQRobot.findTetromino(moveTetromino, 3 + missingTetromino * 2);\n if (y == -1) {\n missingTetromino++;\n if (missingTetromino == 3) {\n // System.out.println(\"没找到块\" + nr + \"!\" + CurrentData.CALCULATED.tetromino.move + \", \"\n // + CurrentData.CALCULATED.tetromino + \", \"\n // + CurrentData.CALCULATED.tetromino.move.tetromino);\n // QQDebug.save(QQRobot.getScreen(), \"qqtetris_\" + nr);\n // nr++;\n throw new NoTetrominoFoundException(\"没找到块!\");\n // CurrentData.CALCULATED.tetromino.move.doMove();\n }\n } else {\n \t final int fallen = y - moveTetromino.y;\n if (fallen > 0) {\n // System.out.println(\"掉落:\" + fallen);\n moveTetromino.y = y;\n } \t \n \t if (move.clever) {\n \t \t if (firstScan) {\n \t \t firstScan = false;\n \t \t } else if (fallen > 0) {\n\t\t\t move.doMove(); \t \t \t \n \t \t }\n \t } else {\n\t\t move.doMove();\n \t }\n }\n }\n if (move.hasMove()) {\n return false;\n } else {\n // QQDebug.printBoard(CurrentData.CALCULATED.board);\n return true;\n }\n }", "@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\r\n\tpublic void showSpeed() {\n\t\tSystem.out.println(\"i can run at 100km/h\");\r\n\t}", "float speedForVector(float x, float y) {\n return distanceToXY(pos.x+x,pos.y+y);\n }", "void OnSpeedChanges(float speed);", "private void doPoint()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\tubisenseData.setPosition(new Point3D(\tx1/100,\n\t\t\t\t\t\t\t\t\t\t\t\ty1/100,\n\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\n\t\twhile (elapsedTime < toolDuration && !this.terminate)\n\t\t{\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tthis.notifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\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 }", "@Override\n public void loop() {\n\n if (gamepad1.a && pow >= .01){\n pow -= .01;\n }\n\n if (gamepad1.b && pow <= .99){\n pow += .01;\n }\n robot.shooter.setPower(pow);\n\n telemetry.addData(\"Current Shooter Speed: \", pow);\n telemetry.update();\n\n //The following code should be for a normal drivetrain.\n\n robot.drive360(gamepad1.left_stick_x, -gamepad1.left_stick_y, gamepad1.right_stick_x);\n\n if (gamepad1.dpad_down && pow2 >= .01){\n pow2 -= .01;\n }\n\n if (gamepad1.dpad_up && pow2 <= .99){\n pow2 += .01;\n }\n\n //End normal drivetrain, the rest of this code is for varying the intake speed.\n\n if (gamepad1.right_bumper){\n robot.intake.setPower(pow2);\n }\n else if (gamepad1.left_bumper) {\n robot.intake.setPower(pow2 * -1);\n }\n else {\n robot.intake.setPower(0);\n }\n\n telemetry.addData(\"Current Intake Speed: \", pow2);\n telemetry.update();\n\n }", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n sleep(3000);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n //sh.pivotStop.setPosition(.55);\n sh.hitRing();\n sleep(500);\n //sh.pivotDown();\n sh.hitRing();\n sleep(500);\n sh.withdraw();\n sh.lift.setPower(0);\n sh.lift.setPower(0);\n wobble.wobbleUp();\n sh.pivotStop.setPosition(1);\n loop.end();\n\n\n }", "@Override\n public boolean perform(Video video)\n {\n int expectedHpos = (video.copper.word1 & 0b11111110)>>>1;\n int expectedVpos = (video.copper.word1 & 0b11111111_00000000)>>>8;\n expectedVpos &= ( (video.copper.word2 & 0b1111111_00000000) >>>8);\n expectedHpos &= ( (video.copper.word2 & 0b1111110) >>>1);\n if ( ( video.copper.word2 & 1<<15) == 0 && ! video.blitter.blitterDone )\n {\n // wait for blitter done\n return false;\n }\n return video.vpos >= expectedVpos && video.hpos >= expectedHpos;\n }", "@Override\n public boolean perform(Video video)\n {\n int expectedHpos = (video.copper.word1 & 0b11111110)>>>1;\n int expectedVpos = (video.copper.word1 & 0b11111111_00000000)>>>8;\n expectedVpos &= ( (video.copper.word2 & 0b1111111_00000000) >>>8);\n expectedHpos &= ( (video.copper.word2 & 0b1111110) >>>1);\n if ( ( video.copper.word2 & 1<<15) == 0 && ! video.blitter.blitterDone)\n {\n // wait for blitter done\n return false;\n }\n if ( video.vpos >= expectedVpos && video.hpos >= expectedHpos ) {\n video.copper.pc += 4;\n return true;\n }\n return false;\n }", "public void run() {\n\t\t\t\tfor(int each=0; each<this.inputString.length(); each++) {\r\n\t\t\t\t\tCharacter currentInput = this.inputString.charAt(each);\r\n\t\t\t\t\t//Test input char\r\n\t\t\t\t\tif(!currentInput.equals('0') && !currentInput.equals('1') ) {\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input\");\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Make the transition\r\n\t\t\t\t\tthis.currentState = this.delta.calculate(this.currentState.getToken()+currentInput);\r\n\t\t\t\t\tthis.currentlyRead += currentInput;\r\n\t\t\t\t\tSystem.out.println(\"Remainder for : \" + Integer.parseInt(this.currentlyRead ,2)\r\n\t\t\t\t\t\t\t\t\t\t+ \" -> \"+Integer.parseInt(this.gamma.getOuput(currentState),2));\r\n\t\t\t\t}\r\n\r\n\t}", "public void loop(){\n\n test1.setPower(1);\n test1.setTargetPosition(150);\n\n\n }", "@Test\n void execute_testingLotsOfBoundaryValues () {\n ihd2.initialize(sensor);\n ihd1.initialize(sensor);\n iad.initialize(ihd1, ihd2);\n\n\n// here i create array with data that i send in to test\n int testData[] = {0, -23, 45, 290, 50, -123, 200, 199, 201, -200, 5, 1, -1, 29};\n\n // in this test the output is two booleans, the output might change for each loop, so i must create an array of arrays that i\n // store the expected results in. so here for example when value zero which is the first value in the testData array is sent\n // to the for loop, once it passed the system and analyze has given it two booleans,\n // it will be compared to the test0 array in the array of arrays called expectedResults.\n boolean test0[] = {false, false};\n boolean test1[] = {false, false};\n boolean test2[] = {true, true};\n boolean test3[] = {true, true};\n boolean test4[] = {true, true};\n boolean test5[] = {false, false};\n boolean test6[] = {true, true};\n boolean test7[] = {true, true};\n boolean test8[] = {true, true};\n boolean test9[] = {false, false};\n boolean test10[] = {false, false};\n boolean test11[] = {false, false};\n boolean test12[] = {false, false};\n boolean test13[] = {true, true};\n\n\n boolean[] expectedResult[] = {test0,test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13};\n\n\n\n\n\n // after initialize inputs are set to zero, here inputs is changed with array content at index t\n for (int t = 0; t < testData.length; t++) {\n sensor.safetyOutput = testData[t];\n sensor.originalOutput = testData[t];\n\n // then i must run both ihd so that the safety and original output is transferred to read1 and read2 which is used in\n // iad execute that does the analyze\n ihd1.execute();\n ihd2.execute();\n\n // then i run the execute which analyze the data\n iad.execute();\n\n\n\n // then i take the result and store it in an array.\n boolean[] booleansProducedByAnalyzeMethod = iad.getData();\n// here i store the expectedResultvalue on position t in the testet array\n boolean testet[] = expectedResult[t];\n// and last but not the least i compare both arrays and print out result.\n\n if (Arrays.equals(testet, booleansProducedByAnalyzeMethod))\n System.out.println(\"Pass boundaryvaluestest\"+ t);\n else\n System.out.println(\"Fail boundaryvaluestest\"+ t);\n\n\n }\n }", "@Test\n public void testSlowScroll() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }", "public static void main(String[] args) {\n FastReader sc = new FastReader(System.in);\n int r = sc.nextInt();\n int c = sc.nextInt();\n int i, j;\n int[][] a = new int[r][c];\n for (i = 0; i < r; i++) {\n for (j = 0; j < c; j++) {\n a[i][j] = sc.nextInt();\n }\n }\n int ans = 0;\n int[] dx = { 1, -1, 0, 0 };\n int[] dy = { 0, 0, 1, -1 };\n String[] dir = {\"D\",\"U\",\"R\",\"L\"};\n for (i = 0; i < r; i++) {\n for (j = 0; j < c; j++) {\n if (a[i][j] == 0) {\n // cell can be used to place light\n for (int k = 0; k < 4; k++) {\n int x = dx[k] + i;\n int y = dy[k] + j;\n if (isValid(x, y, r, c) && actorPresent(a,i,j,r,c,dir[k])) {\n ans++;\n }\n\n }\n }\n }\n }\n System.out.println(ans);\n }", "public static void main(String[] args) {\n\t\tFastScanner fs = new FastScanner(System.in);\r\n\t\tint n = fs.nextInt();\r\n\t\tint[] stepsCount = calc(n);\r\n\t\tint[] steps = calcAndPrint(stepsCount);\r\n\t\tSystem.out.println(stepsCount[n]);\r\n\t\tfor (int i = 0; i <= stepsCount[n]; i++) {\r\n\t\t\tSystem.out.print(steps[i] + \" \");\r\n\t\t}\r\n\t}", "public static synchronized void main(String[] args) \r\n {\r\n \t//Create base station controller\r\n \tcontroller = new BaseStationController(); \r\n \r\n \r\n //Creates a timer to simulate moving user position \r\n \r\n int delay = 750; //milliseconds\r\n \t \r\n ActionListener taskPerformer = new ActionListener() \r\n {\r\n \tboolean moveRight = true;\r\n \tint stepSize = 25;\r\n \t\r\n \t@Override\r\n \tpublic void actionPerformed(ActionEvent e) \r\n \t{ \t\r\n \t\tPoint2D.Double newLocation = null;\r\n \t\tUser temp = controller.getUser(\"ABCDEFGH12345678\");\r\n \t\t\r\n \t\tif(temp != null)\r\n \t\t{\r\n \t\t\tdouble LocX = temp.getLocation().getX();\r\n \t\t\r\n\t \t\tdouble LocY = temp.getLocation().getY();\r\n\t \t\t\r\n\t \t\t//Move user\r\n\t \t\tif(moveRight && LocX < 400)\r\n\t \t\t{\r\n\t \t\t\tnewLocation = new Point2D.Double(LocX += stepSize, LocY);\r\n\t \t\t}\r\n\t \t\telse if(moveRight && LocX >= 400)\r\n\t \t\t{\r\n\t \t\t\tmoveRight = false;\r\n\t \t\t\tnewLocation = new Point2D.Double(LocX -= stepSize, LocY);\r\n\t \t\t}\r\n\t \t\telse if(!moveRight && LocX > 50)\r\n\t \t\t{\r\n\t \t\t\tnewLocation = new Point2D.Double(LocX -= stepSize, LocY);\r\n\t \t\t}\r\n\t \t\telse if(!moveRight && LocX <= 50)\r\n\t \t\t{\r\n\t \t\t\tmoveRight = true;\r\n\t \t\t\tnewLocation = new Point2D.Double(LocX += stepSize, LocY);\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\tString [] parameters = new String [] {\"location\"};\r\n\t \t\tObject [] values = new Object [] {newLocation};\r\n\t \t\t\r\n\t \t\tcontroller.modifyObject(temp, parameters, values);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\t//System.err.println(\"User ABCDEFGH12345678 is null!\");\r\n \t\t}\r\n \t}\t\r\n };\r\n \r\n new Timer(delay, taskPerformer).start(); \r\n }", "public static void move()\n\t{\n\t\tswitch(step)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 1;\n\t\t\tbreak;\n\t\t\t// 1. Right wheels forward\n\t\t\tcase 1:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, .5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 3;\n\t\t\tbreak;\n\t\t\t// 2. Right wheels back\n\t\t\tcase 3:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, -.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 4;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 5;\n\t\t\tbreak;\n\t\t\t// 3. Left wheels forward\n\t\t\tcase 5:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 6;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 7;\n\t\t\tbreak;\n\t\t\t// 4. Left wheels back\n\t\t\tcase 7:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(-.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 8;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 9;\n\t\t\tbreak;\n\t\t\t// 5. Intake pick up\n\t\t\tcase 9:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tshoot(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 10;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 11;\n\t\t\tbreak;\n\t\t\t// 6. Intake shoot\n\t\t\tcase 11:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tpickUp(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 12;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t// Stop and reset everything\n\t\t\tcase 12:\n\t\t\t\tsetSpeed(0, 0);\n\t\t\t\tpickUp(0);\n\t\t\t\tshoot(0);\n\t\t\t\ttimer.reset();\n\t\t\tbreak;\n\t\t}\n\t}", "private static boolean KawigiEdit_RunTest(\n int testNum, int p0, int p1, boolean hasAnswer, long p2) {\n System.out.print(\"Test \" + testNum + \": [\" + p0 + \",\" + p1);\n System.out.println(\"]\");\n RectangularGrid obj;\n long answer;\n obj = new RectangularGrid();\n long startTime = System.currentTimeMillis();\n answer = obj.countRectangles(p0, p1);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.println(\"\\t\" + p2);\n }\n System.out.println(\"Your answer:\");\n System.out.println(\"\\t\" + answer);\n if (hasAnswer) {\n res = answer == p2;\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "private static boolean KawigiEdit_RunTest(int testNum, int p0, int[] p1, int[] p2, boolean hasAnswer, int[] p3) {\n\t\tSystem.out.print(\"Test \" + testNum + \": [\" + p0 + \",\" + \"{\");\n\t\tfor (int i = 0; p1.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(p1[i]);\n\t\t}\n\t\tSystem.out.print(\"}\" + \",\" + \"{\");\n\t\tfor (int i = 0; p2.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(p2[i]);\n\t\t}\n\t\tSystem.out.print(\"}\");\n\t\tSystem.out.println(\"]\");\n\t\tSRM808_Div2_L1_IOIGuaranteedPlace obj;\n\t\tint[] answer;\n\t\tobj = new SRM808_Div2_L1_IOIGuaranteedPlace();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tanswer = obj.solve(p0, p1, p2);\n\t\tlong endTime = System.currentTimeMillis();\n\t\tboolean res;\n\t\tres = true;\n\t\tSystem.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n\t\tif (hasAnswer) {\n\t\t\tSystem.out.println(\"Desired answer:\");\n\t\t\tSystem.out.print(\"\\t\" + \"{\");\n\t\t\tfor (int i = 0; p3.length > i; ++i) {\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tSystem.out.print(\",\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(p3[i]);\n\t\t\t}\n\t\t\tSystem.out.println(\"}\");\n\t\t}\n\t\tSystem.out.println(\"Your answer:\");\n\t\tSystem.out.print(\"\\t\" + \"{\");\n\t\tfor (int i = 0; answer.length > i; ++i) {\n\t\t\tif (i > 0) {\n\t\t\t\tSystem.out.print(\",\");\n\t\t\t}\n\t\t\tSystem.out.print(answer[i]);\n\t\t}\n\t\tSystem.out.println(\"}\");\n\t\tif (hasAnswer) {\n\t\t\tif (answer.length != p3.length) {\n\t\t\t\tres = false;\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; answer.length > i; ++i) {\n\t\t\t\t\tif (answer[i] != p3[i]) {\n\t\t\t\t\t\tres = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!res) {\n\t\t\tSystem.out.println(\"DOESN'T MATCH!!!!\");\n\t\t} else if ((endTime - startTime) / 1000.0 >= 2) {\n\t\t\tSystem.out.println(\"FAIL the timeout\");\n\t\t\tres = false;\n\t\t} else if (hasAnswer) {\n\t\t\tSystem.out.println(\"Match :-)\");\n\t\t} else {\n\t\t\tSystem.out.println(\"OK, but is it right?\");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\treturn res;\n\t}", "void speedUp(int a);", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tline = br.readLine().split(\" \");\n\t\tr = Integer.parseInt(line[0]);\n\t\tc = Integer.parseInt(line[1]);\n\t\tn = Integer.parseInt(line[2]);\n\t\tmap = new char[r][c];\n\t\ttimer = new int[r][c];\n\t\t//0 sec: bomb setup\n\t\tfor(int i=0;i<r;i++){\n\t\t\tString rc = br.readLine().trim();\n\t\t\tmap[i] = rc.toCharArray();\n\t\t\tfor(int j=0;j<c;j++){\n\t\t\t\tif(map[i][j] == 'O'){\n\t\t\t\t\ttimer[i][j] = 3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//1 sec ~ : active tictok\n\t\ttiktok(1,1);\n\t}", "double find_min_takeoff_v_old_algorithm_aux (double min_lift, double max_drag, double speed, double speed_step, double pitch_init, double pitch_step) {\n double pitch = pitch_init;\n double pitch_limit = aoa_max*0.7;\n {\n trace(\"speed_step: \" + speed_step + \" pitch_step: \" + pitch_step);\n for (; speed < v_max; speed += speed_step) {\n velocity = speed;\n // if the startimg pitch guess when at this point was too high, \n // drag will be too big at this point; then reduce pitch\n while (pitch > aoa_min/2) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag)\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n else \n break; // while (pitch > aoa_min/2)\n } \n \n trace(\"for() speed: \" + speed + \" pitch: \" + pitch);\n for (;pitch < pitch_limit; pitch += pitch_step) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag) {\n // stop increasing pitch, won't work. need more speed\n trace(\"too much drag. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n break; // for (pitch...)\n }\n if (foil_lift() >= min_lift) {\n if (speed_step > 0.25) {\n trace(\"request reiterate. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift() + \" speed_step: \" + speed_step);\n return Math.max(0, velocity - speed_step); // request to reiterate\n } else {\n // done!\n make_min_takeoff_speed_info(min_lift, max_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + min_takeoff_speed_info);\n return -1;\n }\n } \n }\n // need to start from lowest pitch?\n if (pitch >= pitch_limit) pitch = pitch_init;\n }\n }\n return -2; // can not find solution\n }", "public boolean execute() {\n\t\t\t\t\n\t\tif( numberOfEncoders == 1) {\n\t\t\tif (Math.abs(rightDistanceTraveled - distance) <= error || Math.abs(leftDistanceTraveled - distance) <= error) {\n\t\t\t\tthis.reset();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse if( numberOfEncoders == 2) {\n\t\t\tif (Math.abs(leftDistanceTraveled - distance) <= error && Math.abs(rightDistanceTraveled - distance) <= error ) {\n\t\t\t\tthis.reset();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n//\t\t\tif(Math.abs(prevErrorLeft - leftDistanceTraveled) <= 3 && Math.abs(prevErrorRight - rightDistanceTraveled) <= 3 && stallStartTime == 0) {\n//\t\t\t\tstallStartTime = System.currentTimeMillis();\n//\t\t\t} else {\n//\t\t\t\tstallStartTime = 0;\n//\t\t\t}\n\t\t}\n//\t\tSystem.out.println(stallStartTime + \" \" + Math.abs(prevErrorLeft - leftDistanceTraveled));\n//\t\tif(stallStartTime + timeout > System.currentTimeMillis()) {\n//\t\t\tthis.reset();\n//\t\t\treturn true;\n//\t\t}\n\t\t\n\t\tif(Math.abs(leftDistanceTraveled - distance) > error) {\n\t\t\tleftDistanceTraveled = SensorInputControl.getInstance().getEncoder(SensorType.DRIVE_TRAIN_LEFT_ENCODER).getDistance();\n\t\t\tleftDriveOutput = leftDistanceControlLoop.getPID(distance, leftDistanceTraveled);\n\t\t\t\n\t\t\tif(leftDriveOutput > 0) {\n\t\t\t\tleftDriveOutput = (leftDriveOutput < AutoDriveForward.MIN_SPEED ? AutoDriveForward.MIN_SPEED : leftDriveOutput);\n\t\t\t} else if(leftDriveOutput < 0) {\n\t\t\t\tleftDriveOutput = (leftDriveOutput > -AutoDriveForward.MIN_SPEED ? -AutoDriveForward.MIN_SPEED : leftDriveOutput);\n\t\t\t}\n\t\t} else {\n\t\t\tleftDistanceControlLoop.reset();\n\t\t\tleftDriveOutput = 0;\n\t\t}\n\t\t\n\t\tif(Math.abs(rightDistanceTraveled - distance) > error) {\n\t\t\trightDistanceTraveled = -SensorInputControl.getInstance().getEncoder(SensorType.DRIVE_TRAIN_RIGHT_ENCODER).getDistance();\n\t\t\trightDriveOutput = rightDistanceControlLoop.getPID(distance, rightDistanceTraveled);\n\t\t\t\n\t\t\tif(rightDriveOutput > 0) {\n\t\t\t\trightDriveOutput = (rightDriveOutput < AutoDriveForward.MIN_SPEED ? AutoDriveForward.MIN_SPEED : rightDriveOutput);\n\t\t\t} else if (rightDriveOutput < 0) {\n\t\t\t\trightDriveOutput = (rightDriveOutput > -AutoDriveForward.MIN_SPEED ? -AutoDriveForward.MIN_SPEED : rightDriveOutput);\n\t\t\t}\n\t\t} else {\n\t\t\trightDistanceControlLoop.reset();\n\t\t\trightDriveOutput = 0;\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"AutoDriveFwd::[left speed, right speed] \" + leftDriveOutput + \", \" + rightDriveOutput);\n\t\t\n\t\tDrivetrainControl.getInstance().setLeftDriveSpeed(-leftDriveOutput);\n\t\tDrivetrainControl.getInstance().setRightDriveSpeed(-rightDriveOutput);\n\t\t\n\t\tprevErrorLeft = leftDistanceTraveled - distance;\n\t\tprevErrorRight = rightDistanceTraveled - distance;\n\n\t\t\n\t\treturn false;\n\t\t\n\t}", "@Override\n public String part2(List<String> input) {\n ArrayList<Integer> hit = new ArrayList<>();\n int listLen = input.size();\n\n //how long is the string\n int strLen = input.get(0).length();\n\n //Char init\n\n // checking each column... ...\n // vertical y\n\n // first is down, second is right\n int[][] movement = {{1, 1}, {1, 3}, {1, 5}, {1, 7}, {2, 1}};\n\n //each item in movement\n for (int i = 0; i < movement.length; i++) {\n hit.add(0);\n // moving the sled\n for (int y = 0; y < listLen; y++) {\n int xCor = 0;\n int yCor = 0;\n if (y != 0) {\n yCor = movement[i][0] * y;\n xCor = movement[i][1] * y;\n }\n\n // in case of out of bounds x\n if (xCor >= strLen) {\n xCor = xCor % strLen;\n }\n char location;\n //in case of out of bounds y\n if (yCor < listLen) {\n location = input.get(yCor).charAt(xCor);\n if (location == '#') {\n hit.set(i,hit.get(i) + 1);\n }\n }\n\n\n }\n }\n\n //First tried int because.. well too big for int so long worked better\n long result = 1;\n for (int i = 0; i < hit.size(); i++) {\n result = result * hit.get(i);\n }\n\n return \"\" + result;\n }", "public void update(){\n\t\ttime += System.currentTimeMillis() - lastTime;\n\t\tlastTime = System.currentTimeMillis();\n\t\t\n\t\t/*fin quando il tempo Ŕ maggiore della velocita incrementa gli indici*/\n\t\tif(time > velocity){\n\t\t\tindex++;\n\t\t\ttime = 0;\n\t\t\tif(index >= animation_frame.length)\n\t\t\t\t{\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t}\n\t}", "public void run() throws Exception\n {\n //Create an object \"observer of the keyboard\" and we start it.\n KeyboardObserver keyboardObserver = new KeyboardObserver();\n keyboardObserver.start();\n\n //We put out the initial value of the variable \"game over\" FALSE\n isGameOver = false;\n //create the first figure from the top in the middle: x - width half, y - 0.\n figure = FigureFactory.createRandomFigure(field.getWidth() / 2, 0);\n\n //until the game is over\n while (!isGameOver)\n {\n //\"Observer\" contains events keystrokes?\n if (keyboardObserver.hasKeyEvents())\n {\n //get the first event from the queue\n KeyEvent event = keyboardObserver.getEventFromTop();\n //If the same character 'q' - out of the game.\n if (event.getKeyChar() == 'q') return;\n //If the \"left arrow\" - move the figure to the left\n if (event.getKeyCode() == KeyEvent.VK_LEFT)\n figure.left();\n //If the \"right arrow\" - move the figure to the right\n else if (event.getKeyCode() == KeyEvent.VK_RIGHT)\n figure.right();\n //If the key code is 12 (\"number 5 on the additional keyboard.\") - Turn figure\n else if (event.getKeyCode() == 12)\n figure.rotate();\n //If the \"gap\" - figure drops down to max\n else if (event.getKeyCode() == KeyEvent.VK_SPACE)\n figure.downMaximum();\n }\n\n step(); //move next step\n field.print(); //print condition \"field\"\n Thread.sleep(300); //pause 300 ml\n }\n\n //write message \"Game Over\"\n System.out.println(\"Game Over\");\n }", "private static boolean KawigiEdit_RunTest(int testNum, int[] p0, boolean hasAnswer, int p1) {\n System.out.print(\"Test \" + testNum + \": [\" + \"{\");\n for (int i = 0; p0.length > i; ++i) {\n if (i > 0) {\n System.out.print(\",\");\n }\n System.out.print(p0[i]);\n }\n System.out.print(\"}\");\n System.out.println(\"]\");\n EllysAndXor obj;\n int answer;\n obj = new EllysAndXor();\n long startTime = System.currentTimeMillis();\n answer = obj.getMax(p0);\n long endTime = System.currentTimeMillis();\n boolean res;\n res = true;\n System.out.println(\"Time: \" + (endTime - startTime) / 1000.0 + \" seconds\");\n if (hasAnswer) {\n System.out.println(\"Desired answer:\");\n System.out.println(\"\\t\" + p1);\n }\n System.out.println(\"Your answer:\");\n System.out.println(\"\\t\" + answer);\n if (hasAnswer) {\n res = answer == p1;\n }\n if (!res) {\n System.out.println(\"DOESN'T MATCH!!!!\");\n } else if ((endTime - startTime) / 1000.0 >= 2) {\n System.out.println(\"FAIL the timeout\");\n res = false;\n } else if (hasAnswer) {\n System.out.println(\"Match :-)\");\n } else {\n System.out.println(\"OK, but is it right?\");\n }\n System.out.println(\"\");\n return res;\n }", "public static void main(String[] args) {\n long startTime = System.nanoTime();\n Board b = new Board();\n b.board = InitialPositions.kiwiPeteBoard; // perft test\n\n int p2 = 0;\n int p3 = 0;\n int p4 = 0;\n int p5 = 0;\n\n List<Move> p1Moves = b.validMoves();\n int p1 = p1Moves.size();\n for (Move m : p1Moves){\n b.makeMove(m);\n List<Move> p2Moves = b.validMoves();\n p2 += p2Moves.size();\n for (Move n : p2Moves){\n b.makeMove(n);\n List<Move> p3Moves = b.validMoves();\n for (Move m3 : p3Moves){\n b.makeMove(m3);\n List<Move> moves4 = b.validMoves();\n p4 += moves4.size();\n for (Move m4 : moves4){\n b.makeMove(m4);\n p5 += b.validMoves().size();\n b.undoMove(m4);\n }\n b.undoMove(m3);\n }\n p3 += p3Moves.size();\n b.undoMove(n);\n }\n b.undoMove(m);\n }\n System.out.println();\n System.out.println(p1);\n System.out.println(p2);\n System.out.println(p3);\n System.out.println(p4);\n System.out.println(p5); // 193690690\n System.out.println(\"Time taken: \"+(System.nanoTime()-startTime)); // with int castles : 35003485400\n }", "public Indexer() {\n motor = new CANSparkMax(RobotMap.INDEX_MOTOR, MotorType.kBrushless);\n motorPid = motor.getPIDController();\n motorEnc = motor.getEncoder();\n\n motorEnc.setVelocityConversionFactor(1);\n motorEnc.setPositionConversionFactor(1);\n\n motorEnc.setPosition(0);\n\n motorPid.setIZone(200);\n motorPid.setOutputRange(-1, 1);\n\n motorPid.setP(Constants.INDEXER_P);\n motorPid.setI(Constants.INDEXER_I);\n motorPid.setD(Constants.INDEXER_D);\n motorPid.setFF(Constants.INDEXER_FF);\n\n motorPid.setSmartMotionMaxAccel(10000, 0);\n motorPid.setSmartMotionAccelStrategy(AccelStrategy.kTrapezoidal, 0);\n motorPid.setSmartMotionMaxVelocity(MAX_VEL, 0);\n // motorPid.setSmartMotionMinOutputVelocity(100, 0);\n motorPid.setSmartMotionAllowedClosedLoopError(0.5, 0);\n\n motor.setIdleMode(IdleMode.kBrake);\n\n input1 = new DigitalInput(RobotMap.LIMIT_PORT_1);\n input2 = new DigitalInput(RobotMap.LIMIT_PORT_2);\n input3 = new DigitalInput(RobotMap.LIMIT_PORT_3);\n input5 = new DigitalInput(RobotMap.LIMIT_PORT_5);\n inputDecrement = new DigitalInput(RobotMap.LIMIT_PORT_DECREMENT);\n\n var tab = Shuffleboard.getTab(\"Indexer\");\n tab.addNumber(\"Motor Speed\", motorEnc::getVelocity);\n // tab.addNumber(\"Position\", motorEnc::getPosition);\n tab.addNumber(\"Num Balls\", () -> numBalls);\n tab.addBoolean(\"Beam Break 1\", input1::get);\n tab.addBoolean(\"Beam Break 2\", input2::get);\n tab.addBoolean(\"Beam Break 3\", input3::get);\n // tab.addBoolean(\"Beam Break 4\", input4::get);\n tab.addBoolean(\"Beam Break 5\", input5::get);\n\n var matchTab = Shuffleboard.getTab(\"Match\");\n matchTab.addNumber(\"Num Balls\", this::getNumBalls);\n matchTab.addBoolean(\"5 Balls\", () -> getNumBalls() >= 5);\n\n new Thread(() -> {\n boolean wasRead = false;\n while (true) {\n if (inputDecrement.get() && !wasRead) {\n wasRead = true;\n } else if (!inputDecrement.get() && wasRead) {\n decrementBall();\n wasRead = false;\n }\n try {\n Thread.sleep(5);\n } catch (InterruptedException e) {\n }\n }\n }).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 Scanner sc =new Scanner(System.in);\r\n \r\n System.out.println(\"Enter number of testcases\");\r\n \r\n int n=sc.nextInt();\r\n for(int i=0;i<6;i++){\r\n System.out.println(\"Initialize the \" + (i+1) + \" lift position.\");\r\n arr[i]=sc.nextInt();\r\n }\r\n \r\n while(n!=0){\r\n System.out.println(\"Enter your floor number\");\r\n int req=sc.nextInt(); \r\n nearestLift(req);\r\n n--;\r\n }\r\n }", "@Override\r\n public void runOpMode() {\n robot.init(hardwareMap);\r\n\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n telemetry.update();\r\n\r\n //Wait for the Pressing of the Start Button\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n\r\n motorSpeed[0] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[0];\r\n motorSpeed[1] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[1];\r\n motorSpeed[2] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[2];\r\n motorSpeed[3] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[3];\r\n\r\n robot.drive1.setPower(motorSpeed[0]);\r\n robot.drive1.setPower(motorSpeed[1]);\r\n robot.drive1.setPower(motorSpeed[2]);\r\n robot.drive1.setPower(motorSpeed[3]);\r\n\r\n telemetry.addData(\"Drive 1 Speed\", motorSpeed[0]);\r\n telemetry.addData(\"Drive 2 Speed\", motorSpeed[1]);\r\n telemetry.addData(\"Drive 3 Speed\", motorSpeed[2]);\r\n telemetry.addData(\"Drive 4 Speed\", motorSpeed[3]);\r\n telemetry.update();\r\n\r\n }\r\n }", "public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse if(x-curX>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX+GameSystem.GRID_SIZE;\n\t\t\txGridNearest++;\n\t\t}\n\t\telse if(curY-y>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY-GameSystem.GRID_SIZE;\n\t\t\tyGridNearest--;\n\t\t}\n\t\t//sets the last completely arrived location grid\n\t\tif(y-yTemp>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp+GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY++;\n\t\t}\n\t\telse if(xTemp-x>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp-GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX--;\n\t\t}\n\t\telse if(x-xTemp>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp+GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX++;\n\t\t}\n\t\telse if(yTemp-y>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp-GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY--;\n\t\t}\n\t\t//only updates nextX and nextY when the move buttons are being pressed down\n\t\t/*\n\t\tif(movable){\n\t\t\tif(direction.equals(\"right\")){\n\t\t\t\t\tnextX=lastX+1;\n\t\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"left\")){\n\t\t\t\tnextX=lastX-1;\n\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"up\")){\n\t\t\t\tnextY=lastY-1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t\telse if(direction.equals(\"down\")){\n\t\t\t\tnextY=lastY+1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t}", "@Override\n public void onMove(int angle, int strength) {\n TextView text_view_angle = (TextView) findViewById(R.id.angle);\n text_view_angle.setText( \"Angle: \"+Integer.toString(angle) );\n\n TextView text_view_strength = (TextView) findViewById(R.id.strength);\n text_view_strength.setText( \"Strength: \"+Integer.toString(strength) );\n\n // don't process the input unless we've somewhere to send it\n if (hostname != null) {\n if (strength != 0) {\n if (zeroed_timer!= null) {\n zeroed_timer.cancel();\n zeroed_timer = null;\n }\n new SendPacket().execute(angle,strength);\n } else {\n if (zeroed_timer == null) {\n // start time\n zeroed_timer_start = System.currentTimeMillis();\n // actually initialise the timer\n zeroed_timer = new Timer();\n zeroed_timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n new SendPacket().execute(0, 0);\n // if the current time is passed the timeout threshold\n if (zeroed_timer_start + zeroed_timer_timout < System.currentTimeMillis()) {\n // stop the timer\n System.out.println(\"Zeroing timer stopped\");\n zeroed_timer.cancel();\n zeroed_timer = null;\n }\n }\n }, 0, 50);\n }\n }\n\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.println(\"For which power would you like to calculate the formula? (type whole, positive number)\");\r\n\t\tint power = in.nextInt()+1;\r\n\t\t\r\n\t\tlong startTime = System.nanoTime();\r\n\t\t\r\n\t\tBigDecimal[][] init = matrix.createNullMatrix(power);\r\n\t\t\r\n\t\tinit = matrix.findCoefficients(init);\r\n\t\t\r\n\t\tBigDecimal[] vec = matrix.findPartialSums(init);\r\n\t\t\r\n\t\tBigDecimal[][] inverse = matrix.findInverse(init);\r\n\t\t\r\n\t\tBigDecimal[] vec1 = matrix.multiplyMatrices(inverse, vec);\r\n\t\tSystem.out.println();\r\n\t\tmatrix.readVector(vec1);\r\n\t\t\r\n\t\tlong endTime = System.nanoTime();\r\n\t\t\r\n\t\tin.close();\r\n\t\t\r\n\t\tSystem.out.println( (float)((float)(endTime-startTime)/1000000000) + \" seconds to finish\");\r\n\t}", "public void scanFrame() {\n\n //Scanner inaktiv, så scanTimeren kan blive angivet i millisekunder.\n if (scannerInactive) {\n scanTimer = millis();\n }\n\n //Scanner bliver sat til aktiv, når timeren har nået den værdi angivet i timeBetweenScan.\n if (!scannerInactive) {\n /*\n if (scanTimer % timeBetweenScan > timeBetweenScan-100 && millis() > 10000) {\n scanTimer = timeBetweenScan-99;\n scannerInactive = false;*/\n \n //Minx og maxX biver sat alt efter hvilken zone der skal scannes, baseret på et timeslot.\n minX = scanAreaW/4*time.getCurrentTimeSlotInt()+scanAreaX+1;\n maxX = scanAreaW/4*(time.getCurrentTimeSlotInt()+1)+scanAreaX-2;\n\n //Checker først om scanneren har ikke overskredet både X og Y-grænsen.\n //En pille blev\n if (y >= maxY && x >= maxX) {\n //Ingen piller blev i scanningsloopet.\n //Her resettes scannerens X og Y til standard, og vi sender en OSC-besked til enheden, at der ingen piller er.\n x = minX;\n y = minY;\n \n timeslotBools[time.getCurrentTimeSlotInt()] = true;\n\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(false);\n oscP5.send(msg, unitAddress);\n\n } else { //Ingen af koordinaterne har ramt deres max.\n\n if (y >= maxY) {\n //Hvis Y-koordinaten har ramt kanten af boksen, resetter vi dens værdi, og begynde på næste række, X.\n x += 5;\n y = minY;\n } else {\n //Ingen af checks'ne var succesfulde, så det antages at ingen maks-grænse er noget, og den næste Y-koordinat kan læses.\n y += 5;\n }\n\n }\n \n //Pixels'ne indenfor scannings-regionen bliver tjekket imod pillerne i XML-filen.\n loadPixels();\n println(\"currentscan @frame: \" + x + \" \" + y + \" : currentcolor: \" + pixels[y*width+x]);\n for (int i = 0; i < xmlHandler.children.length-1; ++i) {\n xmlHandler.load(i+1);\n if(pixels[y*width+x] > xmlHandler.outputMinRange && pixels[y*width+x] < xmlHandler.outputMaxRange) {\n //Pille er blevet genkendet.\n //uielement.informationDialog(\"pille ramt: \" + pillTimeSlot(x));\n timeslotBools[time.getCurrentTimeSlotInt()] = false;\n x = minX;\n y = minY;\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(true);\n oscP5.send(msg, unitAddress);\n }\n }\n\n //Tegner en boks om den pixel der bliver scannet.\n rectMode(RADIUS);\n noFill();\n stroke(scannerColor);\n rect(x, y, 10, 10);\n \n }\n\n }", "public void run() {\n\t\tint time=0;\n\t\twhile(true)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tswitch (this.direct) {\n\t\t\tcase 0:\n\t\t\t\t\n\t\t\t\t//设置for循环是为了不出现幽灵坦克\n\t\t\t\t//使得坦克有足够长的时间走动,能看得清楚\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{ \n\t\t\t\t\t//判断是否到达边界\n\t\t\t\t\tif(y>0 && !this.isTouchEnemyTank() && !this.isTouchJinshuWall &&!this.isTouchTuWall){\n\t\t\t\t\t\ty-=speed;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{\n\t\t\t\t\tif(x<MyRules.panelX-35 && !this.isTouchEnemyTank() && !this.isTouchJinshuWall &&!this.isTouchTuWall)\n\t\t\t\t\t{\n\t\t\t\t\t\tx+=speed;\n\t\t\t\t\t}\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(y<MyRules.panelY-35 && !this.isTouchEnemyTank()&& !this.isTouchJinshuWall &&!this.isTouchTuWall)\n\t\t\t\t\t{\n\t\t\t\t\t\ty+=speed;\n\t\t\t\t\t}try {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(x>0 && !this.isTouchEnemyTank()&& !this.isTouchJinshuWall &&!this.isTouchTuWall){\n\t\t\t\t\t\tx-=speed;\n\t\t\t\t\t}try {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\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\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t//走动之后应该产生一个新方向\n\t\t\tthis.direct=(int)(Math.random()*4);\n\t\t\t\n\t\t\t\n\t\t\ttime++;\n\t\t\tif(time%2==0)\n\t\t\t{\n\t\t\t\t//判断敌人坦克是否需要添加子弹\n\t\t\t\tif(this.state)\n\t\t\t\t{\n\t\t\t\t\tBullet enBullet=new Bullet();\n\t\t\t\t\t//每个坦克每次可以发射炮弹的数目\n\t\t\t\t\tif(enbu.size()<5)\n\t\t\t\t\t{\n\t\t\t\t\t\tenBullet.setDirect(direct);\n\t\t\t\t\t\tswitch (enBullet.direct) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()+9);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()-6);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()+31);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()+8);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()+8);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()+31);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tenBullet.setX(this.getX()-6);\n\t\t\t\t\t\t\t\tenBullet.setY(this.getY()+9);\n\t\t\t\t\t\t\t\tenbu.add(enBullet);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t Thread thread=new Thread(enBullet);\n\t\t\t\t\t\t\t thread.start();\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}//if(time%2==0)\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//判断坦克是否死亡\n\t\t\tif(this.state==false)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}//whlie\n\t}", "public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\tString data = \"\\r\\n\" + \n\t\t\t\t\"3\\r\\n\" + \n\t\t\t\t\"5 2\\r\\n\" + \n\t\t\t\t\"13 32\\r\\n\" + \n\t\t\t\t\"100 1000\";\n\t\t\n\t\tScanner sc = new Scanner(data);\n\t\t\n\t\tint T = sc.nextInt();\n\t\tfor(int test_case = 1; test_case<=T; ++test_case) {\n\t\t\tint minji = sc.nextInt();\n\t\t\tint treasure = sc.nextInt();\n\t\t\tint answer = 0;\n\t\t\t\n\t\t\tint start = (minji<=treasure)? minji : treasure;\n\t\t\tint target = (minji>treasure)? minji : treasure;\n\t\t\t\n\t\t\tint line = 1;\n\t\t\tint left = 1;\n\t\t\tint right =1;\n\t\t\t\n\t\t\tint startLine = 0;\n\t\t\tint targetLine = 0;\n\t\t\t\n\t\t\twhile(startLine == 0 || targetLine == 0) {\n\t\t\t\tif(left <= start && right>= start) \n\t\t\t\t\tstartLine = line;\n\t\t\t\t\n\t\t\t\tif(left <= target && right>= target) {\n\t\t\t\t\ttargetLine = line;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tleft += line;\n\t\t\t\tright += (line + 1);\n\t\t\t\t\n\t\t\t\t++line;\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(startLine + \" \" + targetLine);\n\t\t\t\n\t\t\tleft = start;\n\t\t\tright = start;\n\t\t\tline = startLine;\n\t\t\t\n\t\t\twhile(answer == 0) {\n\t\t\t\tif(targetLine == line) {\n\t\t\t\t\tif(left<=target && right>=target) {\n\t\t\t\t\t\tanswer = targetLine - startLine;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tanswer = targetLine - startLine + Math.min(Math.abs(target - left),Math.abs(right - target));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//System.out.println(left);\n\t\t\t\t\n\t\t\t\tleft += line;\n\t\t\t\tright += (line + 1);\n\t\t\t\t\n\t\t\t\t++line;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + answer);\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\tlong startTime, stopTime;\n\t\t\n\t\tstartTime = System.nanoTime();\n\t\tPathFinder.solveMaze(\"tinyMaze.txt\", \"tinyMazeOutput.txt\");\n\t\tstopTime = System.nanoTime();\n\t\t\n\t\tSystem.out.println(\"Run-time for tinyMaze.txt: \" + (stopTime - startTime)/(Math.pow(10.0, 9)) + \" seconds\");\n\t\t\n\t\tstartTime = System.nanoTime();\n\t\t// test on 100X100 maze -- largest size that needs to fit within the time constraint\n\t\tPathFinder.solveMaze(\"randomMaze.txt\", \"randomMazeOutput.txt\");\n\t\tstopTime = System.nanoTime();\n\t\t\n\t\tSystem.out.println(\"Run-time for randomMaze.txt: \" + (stopTime - startTime)/(Math.pow(10.0, 9)) + \" seconds\");\n\t}", "public static void main(String[] args) {\n\t\tlong start = System.currentTimeMillis();\r\n\t\t Scanner sc = new Scanner(System.in);\r\n\t int length = sc.nextInt();\r\n\t \r\n\t int[] n = new int[length];\r\n\t \r\n\t for (int i = 0; i < n.length ; ++i) n[i] = sc.nextInt();\r\n\t sc.close();\t \r\n\t Arrays.sort(n);\r\n\t \r\n\t for (int i = 0; i < n.length ; ++i) System.out.println(n[i]);\r\n\t long end = System.currentTimeMillis();\r\n\t System.out.println((end-start)/1000.0);\r\n\t}" ]
[ "0.623438", "0.5739764", "0.57135236", "0.57075405", "0.5594994", "0.5588398", "0.5559139", "0.5521992", "0.55120534", "0.5508176", "0.5498974", "0.5494748", "0.54833776", "0.54821306", "0.5481296", "0.54577553", "0.5447165", "0.5438831", "0.5435558", "0.5416559", "0.5399942", "0.53860015", "0.5377637", "0.5375311", "0.53689873", "0.5361481", "0.53597003", "0.53411776", "0.5331764", "0.5325508", "0.5321359", "0.5320115", "0.52969074", "0.52935684", "0.5276456", "0.524675", "0.5244937", "0.52236354", "0.5220447", "0.521041", "0.52090156", "0.51997393", "0.5197865", "0.5195387", "0.51938915", "0.5193253", "0.518668", "0.5184417", "0.5178989", "0.51737523", "0.51716965", "0.5169227", "0.515594", "0.515594", "0.515594", "0.515594", "0.515594", "0.515594", "0.51550287", "0.5150967", "0.5149756", "0.5145445", "0.51168025", "0.51148707", "0.5100671", "0.5093056", "0.5088605", "0.5082695", "0.5081026", "0.50790584", "0.5076228", "0.5074", "0.50680995", "0.50676405", "0.5067285", "0.50668305", "0.50614727", "0.5060288", "0.505866", "0.5047116", "0.5035538", "0.50349605", "0.5033533", "0.50281525", "0.5027632", "0.5026941", "0.5025483", "0.5024964", "0.5023019", "0.50202966", "0.5017137", "0.5011616", "0.5011145", "0.5008867", "0.5008405", "0.5003215", "0.49980515", "0.49951777", "0.4994354", "0.4976713", "0.4975206" ]
0.0
-1
public int animationPeriod = 10; public Point pos;
public void setDest(Point dest){ System.out.println("hit"); this.dest = dest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void animStart() {\n }", "public abstract void animation(double seconds);", "public void onAnimationStart(Animation animation) {\n\r\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "public void onAnimationRepeat(Animation animation) {\n\r\n }", "protected abstract void animate(int anim);", "public void updateAnimation() {\n\t\tif (anim < 1000) {\n\t\t\tanim++;\n\t\t} else anim = 0;\n\t}", "protected abstract float getFrameTimeNormalAnimation();", "@Override\n public void onAnimationStart(Animation animation) {\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "void onAnimationStart();", "public void onAnimationStart(Animation animation) {\n }", "@Override\n public void animate() {\n }", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n public void onAnimationRepeat(Animation animation) {\n\n }", "@Override\n public void onAnimationRepeat(Animation animation) {\n\n }", "void startAnimation();", "public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t}", "@Override\n public void onAnimationStart(Animation arg0) {\n \n }", "@Override\r\n\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t\t}", "@Override\n public void onAnimationRepeat(Animation animation) {\n }", "@Override\n public void onAnimationRepeat(Animation animation) {\n }", "@Override\n public void onAnimationRepeat(Animation animation) {\n }", "@Override\n public void onAnimationRepeat(Animation animation) {\n }", "private void createAnimation () {\n // KeyFrame frame = new KeyFrame(Duration.millis(MILLISECOND_DELAY), e -> myManager.step());\n // myAnimation = new Timeline();\n // myAnimation.setCycleCount(Timeline.INDEFINITE);\n // myAnimation.getKeyFrames().add(frame);\n }", "@Override\n public void onAnimationStart(Animation animation) {\n }", "@Override\n public void onAnimationRepeat(Animation arg0) {\n \n }", "@Override\n\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\n\t\t}", "@Override\r\n public void onAnimationStart(Animator arg0)// 动画开始\r\n {\n\r\n }", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "@Override\n protected void animStop() {\n }", "@Override\n\tpublic void onAnimationStart(Animation animation) {\n\n\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public abstract void animationStarted();", "@Override\n public void onAnimationStart(Animation animation) {\n\n }", "public void setAnimation()\n {\n if(speed<0)\n {\n if(animationCount % 4 == 0)\n animateLeft();\n }\n else\n {\n if(animationCount % 4 == 0)\n animateRight();\n }\n }", "@Override\n\tpublic void onAnimationRepeat(Animation arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onAnimationRepeat(Animation arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\n\t\t}", "@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\r\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\r\n\t\t\t\t}", "@Override public void onAnimationStart(Animator arg0) {\n\n }", "public void animate()\n\t{\n\t\tanimation.read();\n\t}", "@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void onAnimationStart(Animator animation) {\n }", "public void onAnimationRepeat(Animation animation) {\n }", "@Override public void onAnimationRepeat(Animator arg0) {\n\n }", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\tpublic void onAnimationRepeat(Animation arg0) {\n\t\t\t\n\t\t}", "public void update(){\n\t\ttime += System.currentTimeMillis() - lastTime;\n\t\tlastTime = System.currentTimeMillis();\n\t\t\n\t\t/*fin quando il tempo Ŕ maggiore della velocita incrementa gli indici*/\n\t\tif(time > velocity){\n\t\t\tindex++;\n\t\t\ttime = 0;\n\t\t\tif(index >= animation_frame.length)\n\t\t\t\t{\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t}\n\t}", "Animation getAnimation() {\n return currAnimation;\n }", "@Override\n\tpublic void onAnimationRepeat(Animation animation) {\n\n\t}", "public void mo5969f() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n duration.addListener(new C1298Va(this));\n }", "@Override\n public void onAnimationRepeat(Animation animation) {\n\n }", "@Override\n public void onAnimationRepeat(Animation animation) {\n\n }", "public abstract void nextAnimationStep();", "private void setAnimation(View viewToAnimate, int position) {\n if (position > lastPosition) {\n ScaleAnimation anim = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n anim.setDuration(new Random().nextInt(501));//to make duration random number between [0,501)\n viewToAnimate.startAnimation(anim);\n lastPosition = position;\n }\n }", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void draw() {\n\t\tfloat delta = Gdx.graphics.getDeltaTime();\n\t\ti+= delta;\n\t\timage.setRegion(animation.getKeyFrame(i, true));\n\t\t//this.getSpriteBatch().draw(animation.getKeyFrame(i, true), 0, 0);\n\t\t\n\t\tGdx.app.log(\"tag\", \"delta = \" + i);\n\t\t\n\t\tsuper.draw();\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationRepeat(Animator animation) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t}", "@Override\n public void onAnimationRepeat(Animator animation) {\n }", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t}", "@Override\n\t\tpublic void onAnimationRepeat(Animator animation) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onAnimationRepeat(Animator animation) {\n\t\t\t\n\t\t}", "@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\t\t\t\t\r\n\t\t\t}", "public float getPosX(){return px;}", "public float getFrameRate() { return 1000f/_interval; }", "@Override\n\t\t\t\t\tpublic void onAnimationRepeat(Animator animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t public void onAnimationStart(Animation animation) {\n\t \n\t }" ]
[ "0.68177575", "0.67574763", "0.6734666", "0.66131854", "0.66131854", "0.66131854", "0.66131854", "0.65890336", "0.6521835", "0.6518669", "0.64988476", "0.6495067", "0.646484", "0.646484", "0.64554864", "0.6454146", "0.6452995", "0.64140195", "0.63847363", "0.63847363", "0.6376977", "0.6376977", "0.6376745", "0.63604087", "0.6356178", "0.6356178", "0.6356178", "0.63416153", "0.63285625", "0.63285625", "0.63284534", "0.63284534", "0.63284534", "0.63284534", "0.63119584", "0.63057953", "0.63042283", "0.6287294", "0.62801373", "0.627629", "0.627629", "0.62750757", "0.62750757", "0.6274257", "0.6269202", "0.62585115", "0.62438655", "0.62387097", "0.6231885", "0.6219405", "0.6219405", "0.6196575", "0.6196575", "0.6181751", "0.6181362", "0.6181362", "0.6181362", "0.61540645", "0.6153318", "0.6153318", "0.6152741", "0.6149226", "0.6133828", "0.6133828", "0.6133828", "0.6133828", "0.6132254", "0.6132254", "0.61296296", "0.6125948", "0.6123183", "0.6121828", "0.6114818", "0.61130834", "0.6111733", "0.6107151", "0.6100505", "0.609615", "0.6077595", "0.6076367", "0.60725886", "0.60725886", "0.602404", "0.6017217", "0.6016022", "0.6011928", "0.60097885", "0.6004461", "0.59995073", "0.5998176", "0.5998176", "0.5998176", "0.5998176", "0.5988521", "0.59857553", "0.59857553", "0.5985441", "0.59840137", "0.59831864", "0.59801435", "0.59722346" ]
0.0
-1
private String password; private int timeout;
public Jedis getResource() { if (jedisPool == null) { synchronized (this) { if (jedisPool == null){ jedisPool = new JedisPool(jedisPoolConfig, host, port); } } } return jedisPool.getResource(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLoginTimeout(){\n \treturn loginTimeout;\n }", "public String getPassword()\n {\n return _password;\n }", "public String getPassword(){\n return this.password;\n }", "public String getPassword() {return password;}", "public void setPassword(String password)\n {\n _password = password;\n }", "public int getPassword(){\n return password;\r\n }", "public String getPassword() { \n return this.password; \n }", "public String getPassword(){\n return password;\n\t}", "public String getPassword();", "public String getPassword();", "public String getPassword(){\n \treturn password;\n }", "public String getPassword() {\n\treturn password;\n}", "public void setPassword(String pass);", "public long GetTimeout() { return timeout; }", "public int getLoginTimeout() {\n\treturn iLoginTimeout;\n }", "public String getPassword()\n {\n return _password;\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "@Override\n public String getPassword() {\n return password;\n }", "public String getReceptionist_password(){ return receptionist_password;}", "public String getPassword(){\n return mPassword;\n }", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);", "public void set_pass(String password)\n {\n pass=password;\n }", "public String getPassword()\n {\n return this.password;\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public java.lang.String getPassword();", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword() {\r\n return this.password;\r\n }", "public long getTimeout() { return timeout; }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword(){\r\n\t\treturn password;\r\n\t}", "public String getPassword(){\n\t\treturn this.password;\n\t}", "@Override\npublic String getPassword() {\n\treturn null;\n}", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public int getConnectionTimeout();", "void setPassword(String ps) {\n this.password = ps;\n }", "public void setPassword(String password){\r\n this.password = password;\r\n }", "@Override\n public String getPassword() {\n return password;\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "public String getPassword() {\n return this.password;\n }", "@Test\r\n public void testSetPassword() {\r\n\r\n }", "public int getPassword() {\n return password;\n }", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "@Override\n\tpublic void setPassword(String password) {\n\n\t}", "public void setPassword(String password) {\n\tthis.password = password;\n}", "public String getPassword() {\n return password;\r\n }", "@Override\n public String getPassword() {\n return this.password;\n }", "String getUserPassword();", "public int getPassword(){\n\t\treturn password;\n\t}", "public int getLoginTimeout() throws SQLException\n {\n return 0;\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }" ]
[ "0.6799983", "0.6793249", "0.67077005", "0.66773736", "0.65911996", "0.65908635", "0.6590349", "0.6580804", "0.641753", "0.641753", "0.6411141", "0.636341", "0.6339812", "0.63376683", "0.6328567", "0.6316913", "0.6245355", "0.6236252", "0.62302047", "0.622365", "0.6211938", "0.6211938", "0.6211938", "0.6208699", "0.62085336", "0.61833733", "0.61775744", "0.61775744", "0.61691463", "0.61538327", "0.60942763", "0.6087963", "0.6081584", "0.6081584", "0.6079643", "0.6078863", "0.60758007", "0.60751736", "0.60751736", "0.60676765", "0.6063066", "0.6058684", "0.60569674", "0.60542005", "0.60500175", "0.60500175", "0.60500175", "0.60500175", "0.60500175", "0.60498255", "0.6048557", "0.60370666", "0.60370666", "0.60370666", "0.60370666", "0.60370666", "0.60370666", "0.60370666", "0.60370666", "0.60370666", "0.60323256", "0.60173726", "0.59968865", "0.5981911", "0.5979587", "0.5978368", "0.59747964", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.5968591", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276", "0.59578276" ]
0.0
-1
Gets the value of the comuneNascitaCod property.
public int getComuneNascitaCod() { return comuneNascitaCod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setComuneNascitaCod(int value) {\r\n this.comuneNascitaCod = value;\r\n }", "public String getCODIGO() {\r\n return CODIGO;\r\n }", "public int getComuneResidenzaCod() {\r\n return comuneResidenzaCod;\r\n }", "public String getCodigo() {\n\t\treturn codigo;\n\t}", "public String getNpCod() {\n return (String)getAttributeInternal(NPCOD);\n }", "public int getCodPessoa() {\r\n\t\treturn this.codPessoa;\r\n\t}", "public String getCodigo() {\n return codigo;\n }", "public String getCodigo() {\n return codigo;\n }", "public java.lang.String getCodigo() {\n return codigo;\n }", "public String getCodice() {\n\t\treturn codice;\n\t}", "public Short getCodigo() {\n\t\treturn codigo;\n\t}", "public String getCodigo() {\n\t\treturn this.codigo;\n\t}", "public Integer getCodigo() {\n\t\treturn codigo;\n\t}", "public String getCUSU_CODIGO(){\n\t\treturn this.myCusu_codigo;\n\t}", "public String getCodigoValor() {\n\t\treturn codigoValor;\n\t}", "public java.lang.Integer getCodigo() {\r\n return codigo;\r\n }", "public Integer getCodigo() {\n return codigo;\n }", "public java.lang.String getCodiceEnte() {\r\n return codiceEnte;\r\n }", "public int getCodigo() {\n\t\treturn codigo;\n\t}", "public String getCodaComponent() {\n return codaComponent;\n }", "@AutoEscape\n\tpublic String getCodProvincia();", "public Long getCodigo() {\n return codigo;\n }", "public void setComuneResidenzaCod(int value) {\r\n this.comuneResidenzaCod = value;\r\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "@AutoEscape\n\tpublic String getCodDistrito();", "public int getComienza() {\n\t\treturn comienza;\n\t}", "public int getCodigo() {\r\n return Codigo;\r\n }", "public java.lang.Integer getCodMunicipioProductor() {\n\t\treturn codMunicipioProductor;\n\t}", "public java.lang.String getCodigo_pcom();", "public String getvCodtupa() {\n return vCodtupa;\n }", "public int getCodigoSelecionado() {\n return codigoSelecionado;\n }", "String getCodiceFiscale();", "public String getNacionalidade() {\n return nacionalidade;\n }", "public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n codigo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public abstract java.lang.String getCod_tecnico();", "public String getInventoryCod() {\n return (String)getAttributeInternal(INVENTORYCOD);\n }", "public String getCodiceFiscale() {\n return codiceFiscale;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCodigoBytes() {\n java.lang.Object ref = codigo_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n codigo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n codigo_ = s;\n return s;\n }\n }", "public int getCodigoAluno() {\r\n\t\treturn codigoAluno;\r\n\t}", "public BigDecimal getnCodregpen() {\n return nCodregpen;\n }", "public com.google.protobuf.ByteString\n getCodigoBytes() {\n java.lang.Object ref = codigo_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n codigo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getcodigoIdentificador() {\r\n\t\treturn codigoIdentificador;\r\n\t}", "public String getCodigoPosse() {\n return codigoPosse;\n }", "public int pedeCodigo() {\n int codigo = this.telaFuncionario.pedeCodigo();\n return codigo;\n }", "public java.lang.String getCodiceUfficio() {\r\n return codiceUfficio;\r\n }", "public String getvCodtmon() {\n return vCodtmon;\n }", "public String getCodigoEmpresa() {\n return this.codigoEmpresa;\n }", "public String getNacionalidad(){\n\t\treturn nacionalidad;\n\t}", "public String getCUSU_NOMBRES(){\n\t\treturn this.myCusu_nombres;\n\t}", "public java.lang.String getNrContrato() {\n return nrContrato;\n }", "public java.lang.String getProformaNo () {\n\t\treturn proformaNo;\n\t}", "public Integer getCodigo() { return this.codigo; }", "public String getCidade() {\n\t\treturn cidade;\n\t}", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "@AutoEscape\n\tpublic String getCodDepartamento();", "public String getCnicNo() {\n return (String)getAttributeInternal(CNICNO);\n }", "public String getCodPlanEstudio() {\n\t\treturn CodPlanEstudio;\n\t}", "public String getnAsignatura() {\r\n return nAsignatura;\r\n }", "public String getCodFactura() {\r\n return codFactura;\r\n }", "public String getInscricaoPossuidor() {\n return inscricaoPossuidor;\n }", "public String getCodename() {\n return codename;\n }", "public Integer getCodTienda();", "@Accessor(qualifier = \"code\", type = Accessor.Type.GETTER)\n\tpublic String getCode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CODE);\n\t}", "public String getCode() {\n return (String) get(\"code\");\n }", "public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }", "public java.lang.String getCodeemetteur() {\r\n\t\treturn codeemetteur;\r\n\t}", "public int getCaixa() {\n\t\treturn caixa;\n\t}", "public int getCaixa() {\n\t\treturn caixa;\n\t}", "public String getAcronimoUnidadContratacion() {\r\n return acronimoUnidadContratacion;\r\n }", "public void setCodigo( String codigo ) {\n this.codigo = codigo;\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public String getCompCode() {\n return compCode;\n }", "public String getComentario () {\n return comentario;\n }", "public String getCordno() {\n return cordno;\n }", "public String getCode()\n {\n return fCode;\n }", "public void setCodigo(String codigo) {\n this.codigo = codigo;\n }", "public String getCode() {\n return this.code;\n }", "public int getDatossolicitudBftipoDeConvenio() {\n return datossolicitudBftipoDeConvenio;\n }", "public String getCodReportador() {\n return codReportador;\n }", "public abstract java.lang.String getCod_dpto();", "public String getCoderegion() {\n return (String) getAttributeInternal(CODEREGION);\n }", "public java.lang.String getIdiomaBusqueda()\n {\n return this.idiomaBusqueda;\n }", "public String getCodProd() {\n return this.codProd;\n }", "public String getComentario( )\n\t{\n\t\treturn comentario;\n\t}", "public NomenclaturalCode getCode() {\n return code;\n }", "public int getEnJeu(){\n\t\treturn MusiqueFiducial.enJeu;\n\t}", "public String getCode() {\n return _code;\n }", "public String getNatAquiferCd() {\n\t\treturn natAquiferCd;\n\t}", "public String getCuenta() {\n\t\treturn cuenta;\n\t}", "public int getCodigo_producto() {\n return codigo_producto;\n }", "public String getCod_catedratico() {\n return cod_catedratico;\n }", "public String getCodigoExpediente() {\r\n return codigoExpediente;\r\n }", "int leerCodigoIngreso(){\n\t\treturn Integer.parseInt(cboCodigoIngreso.getSelectedItem().toString());\n\t}", "@JsonFormat(shape = JsonFormat.Shape.STRING)\n public Integer getCode() {\n return code;\n }", "public java.lang.String getCodedestinataire() {\r\n\t\treturn codedestinataire;\r\n\t}" ]
[ "0.7958071", "0.71986854", "0.71330607", "0.7105495", "0.7073863", "0.7059439", "0.6990698", "0.6990698", "0.6978674", "0.69772804", "0.6926205", "0.6917958", "0.69130784", "0.68642026", "0.68540525", "0.67650694", "0.6742541", "0.67372847", "0.6728821", "0.67035186", "0.66967887", "0.66188836", "0.6595422", "0.6533476", "0.6533476", "0.6533476", "0.6533476", "0.6528247", "0.65274465", "0.65024143", "0.64795166", "0.6471033", "0.64675325", "0.64370126", "0.6420189", "0.639194", "0.6369953", "0.6368786", "0.6368625", "0.6352019", "0.63145494", "0.63104117", "0.6277032", "0.62666446", "0.62594956", "0.6235317", "0.6231207", "0.6229122", "0.62015206", "0.6190046", "0.61654276", "0.6159302", "0.6115188", "0.61126584", "0.61124134", "0.61102515", "0.6108563", "0.6104168", "0.6102207", "0.607814", "0.6074571", "0.6073154", "0.60701716", "0.60519505", "0.604364", "0.60256994", "0.6015686", "0.6006438", "0.5973912", "0.59710795", "0.59586155", "0.59586155", "0.5948389", "0.5948378", "0.59384364", "0.59384364", "0.59352523", "0.59352183", "0.5935216", "0.59346193", "0.5929001", "0.5923414", "0.5921539", "0.5914312", "0.5910987", "0.5905734", "0.58969665", "0.58938843", "0.58838016", "0.5879941", "0.58786905", "0.58748835", "0.5872534", "0.58660215", "0.585685", "0.5848697", "0.58429563", "0.5841656", "0.5838933", "0.5838416" ]
0.87147945
0
Sets the value of the comuneNascitaCod property.
public void setComuneNascitaCod(int value) { this.comuneNascitaCod = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getComuneNascitaCod() {\r\n return comuneNascitaCod;\r\n }", "public void setComuneResidenzaCod(int value) {\r\n this.comuneResidenzaCod = value;\r\n }", "public void setCodigo( String codigo ) {\n this.codigo = codigo;\n }", "public void setCodigo(String codigo) {\n this.codigo = codigo;\n }", "public void setCodigo(int codigo) {\n this.codigo = codigo;\n }", "public void setCodigo(java.lang.String codigo) {\n this.codigo = codigo;\n }", "public void setNpCod(String value) {\n setAttributeInternal(NPCOD, value);\n }", "public void setCodigo(java.lang.Integer codigo) {\r\n this.codigo = codigo;\r\n }", "public void setCodigo(int Codigo)\r\n {\r\n try\r\n {\r\n this.Codigo = Codigo;\r\n }catch(NumberFormatException e)\r\n {\r\n JOptionPane.showMessageDialog(null, e.toString());\r\n }\r\n \r\n \r\n }", "public void setCodice(String codice) {\n\t\tthis.codice = codice;\n\t}", "public void setCodiceEnte(java.lang.String codiceEnte) {\r\n this.codiceEnte = codiceEnte;\r\n }", "public void setCodigo(int pCodigo){\n this.codigo = pCodigo;\n }", "public void setCodigo(Integer codigo) { this.codigo = codigo; }", "public void setNomeCodifica(String nomeCodifica){\n\t\tsetTipoCodifica(new TipoCodifica(nomeCodifica));\n\t}", "public void setCodigoEmpresa(String codigoEmpresa) {\n this.codigoEmpresa = codigoEmpresa;\n }", "public void setCUSU_CODIGO(String inCusu_codigo){\n\t\tthis.myCusu_codigo = inCusu_codigo;\n\t}", "public void pedirCantidadProducto(String codBarra){\n this.productoSeleccionado = codBarra;\n }", "public void setCodTienda(Integer codTienda);", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "public void setCodigo_venda(int pCodigoVenda){\n this.codigoVenda = pCodigoVenda;\n }", "public void setCodigoPosse(String codigoPosse) {\n this.codigoPosse = codigoPosse;\n }", "public void setCodProvincia(String codProvincia);", "void setCodiceFiscale(String codiceFiscale);", "public void setCodaComponent(String codaComponent) {\n this.codaComponent = codaComponent;\n }", "public void setCodDistrito(String codDistrito);", "public void setCodiceFiscale(String codiceFiscale) {\n this.codiceFiscale = codiceFiscale;\n }", "public Builder setCodigo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n codigo_ = value;\n onChanged();\n return this;\n }", "public void setvCodtupa(String vCodtupa) {\n this.vCodtupa = vCodtupa;\n }", "public void setCodigo_pcom(java.lang.String newCodigo_pcom);", "public void setCode(Integer code) {\n this.code = code;\n }", "public void setCodMunicipioProductor(java.lang.Integer codMunicipioProductor) {\n\t\tthis.codMunicipioProductor = codMunicipioProductor;\n\t}", "public void setInventoryCod(String value) {\n setAttributeInternal(INVENTORYCOD, value);\n }", "public void setCode(String cod){\n\t\tcodeService = cod;\n\t}", "public void setCode(Code code) {\n this.Code = code;\n }", "public void setDataNascimento(Calendar dataNascimento) {\r\n\t\tthis.dataNascimento = dataNascimento;\r\n\t}", "public DialogoAggiungiFissiConto(int codConto) {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n\n /* regola le variabili di istanza coi parametri */\n this.setCodConto(codConto);\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void setCodigometodoacrescimovalor( String codigometodoacrescimovalor ) {\n this.codigometodoacrescimovalor = codigometodoacrescimovalor;\n }", "public void setDatossolicitudBftipoDeConvenio(int value) {\n this.datossolicitudBftipoDeConvenio = value;\n }", "public void setCodDepartamento(String codDepartamento);", "public void setCod_admin(int cod_admin) {\r\n this.cod_admin = cod_admin;\r\n }", "Aluno(String dataNascimento) {\n this.dataNascimento = dataNascimento;\n }", "public abstract void setCntCod(int cntCod);", "public void setNOficina (Integer pNOficina)\r\n {\r\n this.nOficina=pNOficina;\r\n }", "public void setBrSjedistaZaDjecu(int value) {\r\n this.brSjedistaZaDjecu = value;\r\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void setCodiceUfficio(java.lang.String codiceUfficio) {\r\n this.codiceUfficio = codiceUfficio;\r\n }", "public void setCodigo_produto(int pCodigoProduto){\n this.codigoProduto = pCodigoProduto;\n }", "public final void setSiguiente(final Celda siguienteN) {\r\n siguiente = siguienteN;\r\n\r\n }", "public void setCedula(int value) {\n this.cedula = value;\n }", "public void setCode(Long code) {\n this.code = code;\n }", "public void setCode(Long code) {\n this.code = code;\n }", "public void setCodPlanEstudio(String codPlanEstudio) {\n\t\tCodPlanEstudio = codPlanEstudio;\n\t}", "public void setCedula(Integer cedula) {this.cedula = cedula;}", "public abstract void setCod_dpto(java.lang.String newCod_dpto);", "public String getCODIGO() {\r\n return CODIGO;\r\n }", "public void setNumeroInicial(int numeroInicial)\r\n/* 185: */ {\r\n/* 186:198 */ this.numeroInicial = numeroInicial;\r\n/* 187: */ }", "@AutoEscape\n\tpublic String getCodProvincia();", "public void setCoderegion(String value) {\n setAttributeInternal(CODEREGION, value);\n }", "public void setTipoCodifica(Class<? extends Codifica> tipoCodificaClass) {\n\t\tsetTipoCodifica(new TipoCodifica(tipoCodificaClass));\n\t}", "public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }", "public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }", "public void setCode(String code) {\r\n this.code = code == null ? null : code.trim();\r\n }", "public int getComuneResidenzaCod() {\r\n return comuneResidenzaCod;\r\n }", "public void setCode(String code) {\n\t\tthis.code = code == null ? null : code.trim();\n\t}", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "public void setCode(String code) {\n this.code = code == null ? null : code.trim();\n }", "void setCode(Integer aCode);", "public int getCodPessoa() {\r\n\t\treturn this.codPessoa;\r\n\t}", "public void setCode (String code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setDatossolicitudBfclasificacionConvenio(int value) {\n this.datossolicitudBfclasificacionConvenio = value;\n }", "protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}", "public String getCodigo() {\n\t\treturn codigo;\n\t}", "public String getCodice() {\n\t\treturn codice;\n\t}", "public void setvCodtmon(String vCodtmon) {\n this.vCodtmon = vCodtmon;\n }", "public void setCode(String code) {\n\t\tCode = code;\n\t}", "public String getCodigo() {\n return codigo;\n }", "public String getCodigo() {\n return codigo;\n }", "public void setCode(String code)\n {\n this.code = code;\n }", "public void setCodTipoErroCIP(String codTipoErroCIP) {\n this.codTipoErroCIP = codTipoErroCIP;\n }", "public void setCodename(String codename) {\n this.codename = codename == null ? null : codename.trim();\n }", "public void setCROSG_CODIGO(String inCrosg_codigo){\n\t\tthis.myCrosg_codigo = inCrosg_codigo;\n\t}", "public void setCode(String code){\n\t\tthis.code = code;\n\t}", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(String code) {\n this.code = code;\n }", "public void setCode(BizCodeEnum code) {\n this.code = code;\n }", "public void setCodProd(IProduto codigo);", "public void setCuentaContableCierre(CuentaContable cuentaContableCierre)\r\n/* 103: */ {\r\n/* 104:119 */ this.cuentaContableCierre = cuentaContableCierre;\r\n/* 105: */ }", "public void setNumCopertiCena(int quanti) {\n campoCena.setValore(quanti);\n this.syncNumCopertiTotali(); \n }" ]
[ "0.7230718", "0.71972156", "0.6976314", "0.6960555", "0.6902705", "0.6861401", "0.6825983", "0.6651834", "0.659947", "0.6564182", "0.65087193", "0.6428171", "0.6423458", "0.638973", "0.63578105", "0.6264925", "0.6259037", "0.6147585", "0.6130907", "0.612417", "0.6118186", "0.60812795", "0.6060852", "0.6052352", "0.6024389", "0.6012911", "0.6007506", "0.58798677", "0.586121", "0.58340335", "0.5809032", "0.5807243", "0.5795698", "0.578072", "0.5775911", "0.5773953", "0.57591856", "0.57543373", "0.57538056", "0.57321525", "0.57272637", "0.57211703", "0.5712583", "0.57049143", "0.569255", "0.569255", "0.56585807", "0.56567293", "0.56371623", "0.562347", "0.56146455", "0.56146455", "0.5609797", "0.55747145", "0.55664116", "0.5561457", "0.5557483", "0.55423754", "0.5538428", "0.5534068", "0.5524736", "0.5524736", "0.5524736", "0.55236554", "0.5509367", "0.5505728", "0.5505728", "0.5505728", "0.5505728", "0.5505728", "0.5505728", "0.5505728", "0.5505728", "0.5505728", "0.54843056", "0.5473392", "0.54713494", "0.5471108", "0.5470263", "0.54685116", "0.54636806", "0.545824", "0.5447635", "0.54408365", "0.54408365", "0.5439052", "0.543814", "0.5434987", "0.54295856", "0.5427929", "0.54263955", "0.54263955", "0.54263955", "0.54263955", "0.54263955", "0.54263955", "0.5424418", "0.5423965", "0.5419785", "0.54163104" ]
0.8750192
0
Gets the value of the comuneResidenzaCod property.
public int getComuneResidenzaCod() { return comuneResidenzaCod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setComuneResidenzaCod(int value) {\r\n this.comuneResidenzaCod = value;\r\n }", "public int getComuneNascitaCod() {\r\n return comuneNascitaCod;\r\n }", "public String getCodigoValor() {\n\t\treturn codigoValor;\n\t}", "public String getCodigo() {\n\t\treturn codigo;\n\t}", "public Integer getCodigo() {\n\t\treturn codigo;\n\t}", "public java.lang.String getCodigo() {\n return codigo;\n }", "public String getCodigo() {\n return codigo;\n }", "public String getCodigo() {\n return codigo;\n }", "public java.lang.Integer getCodigo() {\r\n return codigo;\r\n }", "public Integer getCodigo() {\n return codigo;\n }", "public int getCodPessoa() {\r\n\t\treturn this.codPessoa;\r\n\t}", "public String getCodice() {\n\t\treturn codice;\n\t}", "public String getCODIGO() {\r\n return CODIGO;\r\n }", "public Long getCodigo() {\n return codigo;\n }", "public Short getCodigo() {\n\t\treturn codigo;\n\t}", "public int getCodigo() {\n\t\treturn codigo;\n\t}", "public String getCodigo() {\n\t\treturn this.codigo;\n\t}", "public int getComienza() {\n\t\treturn comienza;\n\t}", "public int getCodigo() {\r\n return Codigo;\r\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "String getCodiceFiscale();", "public String getRecapitoCode() {\n\t\treturn this.recapitoCode;\n\t}", "public java.lang.String getCodigo_pcom();", "public String getCodiceFiscale() {\n return codiceFiscale;\n }", "public int getCodigoSelecionado() {\n return codigoSelecionado;\n }", "public java.lang.Integer getCodMunicipioProductor() {\n\t\treturn codMunicipioProductor;\n\t}", "public int getCodigo_producto() {\n return codigo_producto;\n }", "public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n codigo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getCodPlanEstudio() {\n\t\treturn CodPlanEstudio;\n\t}", "@java.lang.Override\n public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n codigo_ = s;\n return s;\n }\n }", "public java.lang.String getCodiceUfficio() {\r\n return codiceUfficio;\r\n }", "public Integer getCodigo() { return this.codigo; }", "public abstract java.lang.String getCod_tecnico();", "public java.lang.String getCodiceEnte() {\r\n return codiceEnte;\r\n }", "@AutoEscape\n\tpublic String getCodDistrito();", "public void setCodigometodoacrescimovalor( String codigometodoacrescimovalor ) {\n this.codigometodoacrescimovalor = codigometodoacrescimovalor;\n }", "public String getCodigoPosse() {\n return codigoPosse;\n }", "public com.google.protobuf.ByteString\n getCodigoBytes() {\n java.lang.Object ref = codigo_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n codigo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCROFM_CODIGO(){\n\t\treturn this.myCrofm_codigo;\n\t}", "public String getvCodtmon() {\n return vCodtmon;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCodigoBytes() {\n java.lang.Object ref = codigo_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n codigo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private int getQuanteComande(int codRMP) {\n /* variabili e costanti locali di lavoro */\n int totComande = 0;\n Number numero;\n Modulo modRMO = RMOModulo.get();\n Modulo modRTO = RTOModulo.get();\n Filtro filtro;\n\n try { // prova ad eseguire il codice\n filtro = FiltroFactory.crea(modRMO.getCampo(RMO.CAMPO_RIGA_MENU_PIATTO), codRMP);\n numero = modRTO.query().contaRecords(filtro);\n totComande = Libreria.getInt(numero);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return totComande;\n }", "public int obtenerDatos() {\n codigo =Integer.parseInt(modelo.getValueAt(fila,0).toString());\n return codigo;\n }", "public int pedeCodigo() {\n int codigo = this.telaFuncionario.pedeCodigo();\n return codigo;\n }", "public String getCodigoDeBarras() {\n\t\treturn producto.getCodigoDeBarras();\n\t}", "public String getInventoryCod() {\n return (String)getAttributeInternal(INVENTORYCOD);\n }", "public String getCodReportador() {\n return codReportador;\n }", "public abstract java.lang.String getCod_dpto();", "public String getCod_catedratico() {\n return cod_catedratico;\n }", "public String getCROSG_CODIGO(){\n\t\treturn this.myCrosg_codigo;\n\t}", "public String getCodigoEmpresa() {\n return this.codigoEmpresa;\n }", "public int getSecuenciaPregunta() {\n return secuenciaPregunta;\n }", "@AutoEscape\n\tpublic String getCodProvincia();", "public String getCoderegion() {\n return (String) getAttributeInternal(CODEREGION);\n }", "public java.lang.String getCodedestinataire() {\r\n\t\treturn codedestinataire;\r\n\t}", "public String getInscricaoPossuidor() {\n return inscricaoPossuidor;\n }", "public String getCodFactura() {\r\n return codFactura;\r\n }", "public void setComuneNascitaCod(int value) {\r\n this.comuneNascitaCod = value;\r\n }", "public java.lang.String getNrContrato() {\n return nrContrato;\n }", "public Integer getCodeid() {\n return codeid;\n }", "public int getcodigoIdentificador() {\r\n\t\treturn codigoIdentificador;\r\n\t}", "public int getCodiceID() \r\n\t\t{\r\n\t\t\treturn CodiceID;\r\n\t\t}", "public String getvCodtupa() {\n return vCodtupa;\n }", "public int getDatossolicitudBftipoDeConvenio() {\n return datossolicitudBftipoDeConvenio;\n }", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "public int getCodigoAluno() {\r\n\t\treturn codigoAluno;\r\n\t}", "public String getComentario () {\n return comentario;\n }", "public int getEgresosPorCompras(){\n return this.egresosPorCompras;\n }", "public String getRagione_sociale() {\r\n return ragione_sociale;\r\n }", "public Integer getCodError() {\r\n\t\treturn codError;\r\n\t}", "public Response getProduto_e_sua_receita(Integer codigo) {\n\t\tProduto resultado = ((ProdutoDao) getDao()).buscarProduto_e_sua_receita(codigo);\n\t\tif (resultado != null) {\n\t\t\t// pega os componentes da receita do produto retornado.\n\t\t\tList<ItemReceita> componentes = new ArrayList<>();\n\t\t\tfor (ItemReceita item : resultado.getReceita().getComponentes()) {\n\t\t\t\tcomponentes.add(new ItemReceita(item.getComponente(), item.getQtdUtilizada()));\n\t\t\t}\n\t\t\t// pega a receita do produto retornado.\n\t\t\tReceita receitaEmJava = new Receita(resultado.getReceita().getCodigo(),\n\t\t\t\t\tresultado.getReceita().getRendimento(), resultado.getReceita().getTempoPreparo(), componentes);\n\t\t\t// Instancia um novo produto com os dados do produto retornado do BD.\n\t\t\tProduto produtoEmJava = new Produto(resultado.getCodigo(), resultado.getDescricao(),\n\t\t\t\t\tresultado.getCategoria(), resultado.getSimbolo(), resultado.getPreco(), receitaEmJava);\n\t\t\t// converte o novo produto para uma string em JSON.\n\t\t\tString produtoEmJson = converterParaJSON(produtoEmJava);\n\t\t\t// retorna um response com o produto em JSON.\n\t\t\tsetResposta(mensagemSucesso(produtoEmJson));\n\t\t} else {\n\t\t\t// retorna um response informando que o Id informado não possui cadastro.\n\t\t\tsetResposta(mensagemNaoEncontrado());\n\t\t}\n\t\treturn getResposta();\n\t}", "public String getCUSU_CODIGO(){\n\t\treturn this.myCusu_codigo;\n\t}", "public java.lang.String getCodigo(){\n return localCodigo;\n }", "public BigDecimal getnCodregpen() {\n return nCodregpen;\n }", "public String getCodProd() {\n return this.codProd;\n }", "public String getCodigoExpediente() {\r\n return codigoExpediente;\r\n }", "public String getComentario( )\n\t{\n\t\treturn comentario;\n\t}", "public int obtenerSiguienteNumeroOrden() {\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return controlOC.obtenerSiguienteNumeroOrden();\n }", "public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }", "public int getCaixa() {\n\t\treturn controlador.getCaixa();\n\t}", "public java.lang.Integer getCodMunicipioEspectaculo() {\n\t\treturn codMunicipioEspectaculo;\n\t}", "@Accessor(qualifier = \"code\", type = Accessor.Type.GETTER)\n\tpublic String getCode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CODE);\n\t}", "int leerCodigoIngreso(){\n\t\treturn Integer.parseInt(cboCodigoIngreso.getSelectedItem().toString());\n\t}", "public String getCode()\n {\n return fCode;\n }", "public Integer getCboEspecialidad() {\n return cboEspecialidad;\n }", "public Integer getSeccion() {\r\n return seccion;\r\n }", "public Integer getCodTienda();", "public String getIntermidiateCode(){\r\n\t\treturn iCode;\r\n\t}", "public int getCaixa() {\n\t\treturn caixa;\n\t}", "public int getCaixa() {\n\t\treturn caixa;\n\t}", "public int getValeurCourante() {\n\t\treturn this.valC;\n\t}", "public java.lang.String getProformaNo () {\n\t\treturn proformaNo;\n\t}", "public String getCodaComponent() {\n return codaComponent;\n }", "public Long getCode() {\n return code;\n }", "public Long getCode() {\n return code;\n }", "public int getConto() {\n return (Integer)this.getCampo(nomeConto).getValore();\n }", "@Override\n\tpublic long getCodTecnico() {\n\t\treturn model.getCodTecnico();\n\t}" ]
[ "0.7688767", "0.7296735", "0.72181684", "0.71500933", "0.7142443", "0.70840317", "0.7037704", "0.7037704", "0.7026623", "0.70124763", "0.7009353", "0.6985583", "0.6946196", "0.6935743", "0.6933454", "0.69301933", "0.6912838", "0.68559647", "0.68099433", "0.67950624", "0.67950624", "0.67950624", "0.67950624", "0.6681104", "0.66783005", "0.6631615", "0.66074264", "0.65789485", "0.6553273", "0.6532907", "0.6513555", "0.64277196", "0.64219826", "0.6412017", "0.6406727", "0.6400185", "0.63784295", "0.636413", "0.6355929", "0.6343629", "0.62909305", "0.628275", "0.6278962", "0.627597", "0.62412065", "0.62374794", "0.6229789", "0.62280196", "0.61973387", "0.61911625", "0.618831", "0.6177125", "0.61766326", "0.6173439", "0.6173186", "0.6160137", "0.6154762", "0.6125261", "0.6115962", "0.6098995", "0.60914814", "0.60787296", "0.6068973", "0.6068281", "0.605506", "0.6053473", "0.60494554", "0.60414845", "0.6040989", "0.60328996", "0.6006825", "0.6005135", "0.59882736", "0.59869176", "0.5983865", "0.59756047", "0.596509", "0.5948145", "0.5942089", "0.59367603", "0.5935087", "0.59304696", "0.59238154", "0.59210485", "0.5920148", "0.59181917", "0.591793", "0.5907617", "0.59069157", "0.58974636", "0.5895658", "0.5887294", "0.5887294", "0.5872965", "0.58706325", "0.5867601", "0.5856618", "0.5856618", "0.5852572", "0.5842695" ]
0.8670539
0
Sets the value of the comuneResidenzaCod property.
public void setComuneResidenzaCod(int value) { this.comuneResidenzaCod = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getComuneResidenzaCod() {\r\n return comuneResidenzaCod;\r\n }", "public void setComuneNascitaCod(int value) {\r\n this.comuneNascitaCod = value;\r\n }", "public void setCodigometodoacrescimovalor( String codigometodoacrescimovalor ) {\n this.codigometodoacrescimovalor = codigometodoacrescimovalor;\n }", "public void setCodigo(int codigo) {\n this.codigo = codigo;\n }", "public void setCodigo(String codigo) {\n this.codigo = codigo;\n }", "public void setCodigo( String codigo ) {\n this.codigo = codigo;\n }", "public void setCodigo(java.lang.Integer codigo) {\r\n this.codigo = codigo;\r\n }", "public void setCodigo(java.lang.String codigo) {\n this.codigo = codigo;\n }", "public void setCodice(String codice) {\n\t\tthis.codice = codice;\n\t}", "public void setCodigo(Integer codigo) { this.codigo = codigo; }", "public void setCodigo(int pCodigo){\n this.codigo = pCodigo;\n }", "public void setCodigo(int Codigo)\r\n {\r\n try\r\n {\r\n this.Codigo = Codigo;\r\n }catch(NumberFormatException e)\r\n {\r\n JOptionPane.showMessageDialog(null, e.toString());\r\n }\r\n \r\n \r\n }", "public void setCodigoEmpresa(String codigoEmpresa) {\n this.codigoEmpresa = codigoEmpresa;\n }", "public void setCodiceFiscale(String codiceFiscale) {\n this.codiceFiscale = codiceFiscale;\n }", "void setCodiceFiscale(String codiceFiscale);", "public DialogoAggiungiFissiConto(int codConto) {\n /* rimanda al costruttore della superclasse */\n super();\n\n try { // prova ad eseguire il codice\n\n /* regola le variabili di istanza coi parametri */\n this.setCodConto(codConto);\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void setCodigo_venda(int pCodigoVenda){\n this.codigoVenda = pCodigoVenda;\n }", "public void setCodigoPosse(String codigoPosse) {\n this.codigoPosse = codigoPosse;\n }", "public int getComuneNascitaCod() {\r\n return comuneNascitaCod;\r\n }", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "public void setCodigoDeBarras(String codigoDeBarras) {\n\t\tproducto.setCodigoDeBarras(codigoDeBarras);\n\t}", "public void setCodPlanEstudio(String codPlanEstudio) {\n\t\tCodPlanEstudio = codPlanEstudio;\n\t}", "public void setCodDistrito(String codDistrito);", "public void pedirCantidadProducto(String codBarra){\n this.productoSeleccionado = codBarra;\n }", "public void setRecapitoCode(String recapitoCode) {\n\t\tthis.recapitoCode = recapitoCode;\n\t}", "public void setCodMunicipioProductor(java.lang.Integer codMunicipioProductor) {\n\t\tthis.codMunicipioProductor = codMunicipioProductor;\n\t}", "public String getCodigoValor() {\n\t\treturn codigoValor;\n\t}", "public void setCodTienda(Integer codTienda);", "public void setCodTipoErroCIP(String codTipoErroCIP) {\n this.codTipoErroCIP = codTipoErroCIP;\n }", "public void setCodProvincia(String codProvincia);", "public Response getProduto_e_sua_receita(Integer codigo) {\n\t\tProduto resultado = ((ProdutoDao) getDao()).buscarProduto_e_sua_receita(codigo);\n\t\tif (resultado != null) {\n\t\t\t// pega os componentes da receita do produto retornado.\n\t\t\tList<ItemReceita> componentes = new ArrayList<>();\n\t\t\tfor (ItemReceita item : resultado.getReceita().getComponentes()) {\n\t\t\t\tcomponentes.add(new ItemReceita(item.getComponente(), item.getQtdUtilizada()));\n\t\t\t}\n\t\t\t// pega a receita do produto retornado.\n\t\t\tReceita receitaEmJava = new Receita(resultado.getReceita().getCodigo(),\n\t\t\t\t\tresultado.getReceita().getRendimento(), resultado.getReceita().getTempoPreparo(), componentes);\n\t\t\t// Instancia um novo produto com os dados do produto retornado do BD.\n\t\t\tProduto produtoEmJava = new Produto(resultado.getCodigo(), resultado.getDescricao(),\n\t\t\t\t\tresultado.getCategoria(), resultado.getSimbolo(), resultado.getPreco(), receitaEmJava);\n\t\t\t// converte o novo produto para uma string em JSON.\n\t\t\tString produtoEmJson = converterParaJSON(produtoEmJava);\n\t\t\t// retorna um response com o produto em JSON.\n\t\t\tsetResposta(mensagemSucesso(produtoEmJson));\n\t\t} else {\n\t\t\t// retorna um response informando que o Id informado não possui cadastro.\n\t\t\tsetResposta(mensagemNaoEncontrado());\n\t\t}\n\t\treturn getResposta();\n\t}", "public void setCodigo_pcom(java.lang.String newCodigo_pcom);", "public void setCodigo_produto(int pCodigoProduto){\n this.codigoProduto = pCodigoProduto;\n }", "public void setCodiceEnte(java.lang.String codiceEnte) {\r\n this.codiceEnte = codiceEnte;\r\n }", "public void setIDEMPRESA(Integer idempresa) {\n\t\tthis.IDEMPRESA = idempresa;\n\t}", "public Sesion(String codigoCliente) {\n cliente = new Cliente(codigoCliente);\n estado = Estado.inicioBot;\n accion = Accion.registrar;\n valor = ValorAIngresar.nombre;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }", "public Integer getCodigo() {\n\t\treturn codigo;\n\t}", "public Integer getCodigo() {\n return codigo;\n }", "public String getCodigo() {\n\t\treturn codigo;\n\t}", "public void setCodiceID(int codiceID) \r\n\t\t{\r\n\t\t\tCodiceID = codiceID;\r\n\t\t}", "public String getCodice() {\n\t\treturn codice;\n\t}", "public void setCodCli(ICliente codigo);", "public String getCodigo() {\n return codigo;\n }", "public String getCodigo() {\n return codigo;\n }", "public Long getCodigo() {\n return codigo;\n }", "public void setCodiceUfficio(java.lang.String codiceUfficio) {\r\n this.codiceUfficio = codiceUfficio;\r\n }", "public void setDatossolicitudBftipoDeConvenio(int value) {\n this.datossolicitudBftipoDeConvenio = value;\n }", "public abstract void setCod_dpto(java.lang.String newCod_dpto);", "public void setCode(String cod){\n\t\tcodeService = cod;\n\t}", "public int getCodPessoa() {\r\n\t\treturn this.codPessoa;\r\n\t}", "public void setCodProd(IProduto codigo);", "public void setRespuesta(int Respuesta) {\n iRespuesta = Respuesta;\n }", "public int getCodigo() {\r\n return Codigo;\r\n }", "public void setDatossolicitudBfmarcaPreaprobado(int value) {\n this.datossolicitudBfmarcaPreaprobado = value;\n }", "@Override\n\tpublic void setCodTecnico(long codTecnico) {\n\t\tmodel.setCodTecnico(codTecnico);\n\t}", "public void setNomeCodifica(String nomeCodifica){\n\t\tsetTipoCodifica(new TipoCodifica(nomeCodifica));\n\t}", "public Short getCodigo() {\n\t\treturn codigo;\n\t}", "public void setvCodtmon(String vCodtmon) {\n this.vCodtmon = vCodtmon;\n }", "public void setCROSG_CODIGO(String inCrosg_codigo){\n\t\tthis.myCrosg_codigo = inCrosg_codigo;\n\t}", "public int getCodigo() {\n\t\treturn codigo;\n\t}", "public void setDatossolicitudBfcodigoEjecutivo(int value) {\n this.datossolicitudBfcodigoEjecutivo = value;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public int getCodigo() {\n return codigo;\n }", "public String getCODIGO() {\r\n return CODIGO;\r\n }", "public java.lang.Integer getCodigo() {\r\n return codigo;\r\n }", "public void setComentario (String val) {\n this.comentario = val;\n }", "public void setBrSjedistaZaDjecu(int value) {\r\n this.brSjedistaZaDjecu = value;\r\n }", "public void setCROFM_CODIGO(String inCrofm_codigo){\n\t\tthis.myCrofm_codigo = inCrofm_codigo;\n\t}", "public void setCoderegion(String value) {\n setAttributeInternal(CODEREGION, value);\n }", "public String getCodiceFiscale() {\n return codiceFiscale;\n }", "public void setCodDepartamento(String codDepartamento);", "public Builder setCodigo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n codigo_ = value;\n onChanged();\n return this;\n }", "public void setCode(Integer code) {\n this.code = code;\n }", "public int getCodigoSelecionado() {\n return codigoSelecionado;\n }", "public void setInventoryCod(String value) {\n setAttributeInternal(INVENTORYCOD, value);\n }", "public void setTipoCodifica(Class<? extends Codifica> tipoCodificaClass) {\n\t\tsetTipoCodifica(new TipoCodifica(tipoCodificaClass));\n\t}", "public void setDatossolicitudBfclasificacionConvenio(int value) {\n this.datossolicitudBfclasificacionConvenio = value;\n }", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "public String getCodigo() {\n\t\treturn this.codigo;\n\t}", "public java.lang.Integer getCodMunicipioProductor() {\n\t\treturn codMunicipioProductor;\n\t}", "public java.lang.String getCodigo() {\n return codigo;\n }", "public void setCode(Code code) {\n this.Code = code;\n }", "public void setIdempresa(String idempresa) {\n\t\tthis.idempresa = idempresa;\n\t}", "public void setIdempresa(String idempresa) {\n\t\tthis.idempresa = idempresa;\n\t}", "public void setIdempresa(String idempresa) {\n\t\tthis.idempresa = idempresa;\n\t}", "public void setAutorizacionAutoimpresorSRI(AutorizacionAutoimpresorSRI autorizacionAutoimpresorSRI)\r\n/* 125: */ {\r\n/* 126:150 */ this.autorizacionAutoimpresorSRI = autorizacionAutoimpresorSRI;\r\n/* 127: */ }", "public void setCodigoGrupoRiesgoBuro(java.lang.String codigoGrupoRiesgoBuro) {\r\n this.codigoGrupoRiesgoBuro = codigoGrupoRiesgoBuro;\r\n }", "public void setCodMunicipioEspectaculo(java.lang.Integer codMunicipioEspectaculo) {\n\t\tthis.codMunicipioEspectaculo = codMunicipioEspectaculo;\n\t}", "public void setCuentaContableCierre(CuentaContable cuentaContableCierre)\r\n/* 103: */ {\r\n/* 104:119 */ this.cuentaContableCierre = cuentaContableCierre;\r\n/* 105: */ }", "public String getCodPlanEstudio() {\n\t\treturn CodPlanEstudio;\n\t}", "String getCodiceFiscale();", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }", "public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }", "public abstract void setCntCod(int cntCod);", "public Integer getCodigo() { return this.codigo; }", "public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}", "public abstract void setCod_actividad(java.lang.Long newCod_actividad);" ]
[ "0.73316604", "0.6965982", "0.68542504", "0.6752486", "0.6728736", "0.67131674", "0.66132367", "0.65624535", "0.64989537", "0.6415536", "0.6393405", "0.63375676", "0.6319941", "0.6211199", "0.6182046", "0.6179518", "0.61506736", "0.60595965", "0.6045265", "0.6040019", "0.5973043", "0.5945767", "0.5926759", "0.58974326", "0.5895669", "0.58743346", "0.5847158", "0.5841545", "0.5818332", "0.5812293", "0.58110684", "0.5798017", "0.57880485", "0.5777359", "0.57629883", "0.5744389", "0.5744043", "0.57356095", "0.57141995", "0.57131845", "0.57117766", "0.5703432", "0.5701596", "0.5701596", "0.56858146", "0.56687886", "0.5636308", "0.56202567", "0.56079936", "0.56043607", "0.5598479", "0.5595212", "0.5575684", "0.55585355", "0.5556049", "0.55510634", "0.5546857", "0.553776", "0.5530748", "0.55299926", "0.55201524", "0.5516579", "0.5516579", "0.5516579", "0.5516579", "0.5515659", "0.54910725", "0.54848844", "0.54808503", "0.5464035", "0.5457661", "0.5443525", "0.5443465", "0.5435981", "0.5434968", "0.5432022", "0.542268", "0.54113895", "0.54111284", "0.5404071", "0.5391015", "0.5385318", "0.5379524", "0.53681016", "0.5362849", "0.5362849", "0.5362849", "0.5348007", "0.5339803", "0.531864", "0.53151387", "0.53055143", "0.5296826", "0.529283", "0.5292623", "0.52899843", "0.5289725", "0.52880406", "0.5283127", "0.52822846" ]
0.84995353
0
Gets the value of the idAnagrafeLocale property.
public int getIdAnagrafeLocale() { return idAnagrafeLocale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdAnagrafeLocale(int value) {\r\n this.idAnagrafeLocale = value;\r\n }", "public int getLocaleId() {\r\n\t\treturn localeId;\r\n\t}", "protected Locale getArchLocale()\n\t{\n\t\tLocale locale = null;\n\t\ttry {\n\t\t\tfinal ContextoSesion sessionContext = ContextoLocator.getInstance().getContextoSesion();\n\t\t\tObject value, o = sessionContext.getCtxValue(ConstantesSesion.ARCH_LOCALE);\n\t\t\tif (o instanceof IDato) {\n\t\t\t\tvalue = ((IDato) o).getValor();\n\t\t\t} else {\n\t\t\t\tvalue = o;\n\t\t\t}\n\t\t\tif (value instanceof Locale) {\n\t\t\t\tlocale = (Locale) value;\n\t\t\t} else if (value instanceof String) {\n\t\t\t\tlocale = StringUtils.parseLocaleString((String)value);\n\t\t\t}\n\t\t} catch (PersistenciaException e) {\t}\n\t\treturn locale;\n\t}", "public String getAbsenid() {\n return absenid;\n }", "@ZAttr(id=345)\n public String getLocaleAsString() {\n return getAttr(Provisioning.A_zimbraLocale, null);\n }", "public String locale() {\n return this.locale;\n }", "String getLangId();", "ULocale getLocale() {\n\t\treturn locale;\n\t}", "public String getLocale() {\n return this.locale;\n }", "public ULocale getLocale() {\r\n return this.locale;\r\n }", "public Integer getIdAluguel() {\n\t\treturn idAluguel;\n\t}", "public String getAlto() {\r\n return alto;\r\n }", "public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }", "public String getLocale() {\n return (String)getAttributeInternal(LOCALE);\n }", "public String getAisle() {\n return this.aisle;\n }", "public String getLocale ( ) {\n\t\treturn extract ( handle -> getLocale ( ) );\n\t}", "public int getAlto() {\n\t\treturn alto;\n\t}", "java.lang.String getLocale();", "public String getIDAdulto() {\n return IDAdulto;\n }", "public String getId_Pelanggan(){\r\n \r\n return id_pelanggan;\r\n }", "public Locale getLocale() { return this.locale; }", "public int getAlFormat()\n {\n return alFormat;\n }", "public static Locale getArabicLocale() {\n return new Locale(\"ar\");\n }", "public Locale getLocale () {\n return _locale;\n }", "public String getnAsignatura() {\r\n return nAsignatura;\r\n }", "public java.lang.String getLanguageLocaleKey() {\n return languageLocaleKey;\n }", "public java.lang.CharSequence getKullaniciAdi() {\n return kullanici_adi;\n }", "public abstract java.lang.Long getAcma_id();", "public Locale getLocale()\n/* */ {\n/* 487 */ return getULocale().toLocale();\n/* */ }", "public java.lang.CharSequence getKullaniciAdi() {\n return kullanici_adi;\n }", "public int getAlcance() {\n return alcance;\n }", "public Long getIdActividadArtefacto() {\n return this.idActividadArtefacto;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\r\n return locale;\r\n }", "public Locale getLocale()\n {\n return locale;\n }", "public int getIdAmigo() {\n\t\treturn idAmigo;\n\t}", "public Integer getLanguageId() {\r\n return languageId;\r\n }", "public Integer getAid() {\n return aid;\n }", "public String getaId() {\n return aId;\n }", "public Locale getLocale () {\n\t\treturn locale;\n\t}", "public Locale getLocale() {\n return locale;\n }", "public java.lang.String getIdFiche(){\r\n return this.idFiche;\r\n }", "public Short getAmenitiyId() {\r\n return amenitiyId;\r\n }", "public Locale getLocale() {\n\t\t\n\t\treturn locale;\n\t}", "public int getIden() {\n return iden;\n }", "public String getAsignatura() {\n return (sAsignatura);\n }", "public String getIDFA() {\n return this.IDFA;\n }", "public java.lang.String getIdioma() {\n return idioma;\n }", "public AVT getLang()\n {\n return m_lang_avt;\n }", "public Locale getLocale() {\n return getULocale().toLocale();\n }", "public java.util.Locale getLocale() {\n MenuContainer parent = MenuComponent.this.getParent();\n if (parent instanceof Component)\n return ((Component)parent).getLocale();\n else\n return java.util.Locale.getDefault();\n }", "public int getAid() {\n return aid_;\n }", "public String getLanguageId() {\r\n\t\treturn this.languageId;\r\n\t}", "public int getKapitelValue() {\n\t\tint absvalue = 0;\n\t\tMatcher m = kapitelPattern.matcher(getId());\n\t\tif (m.find()) {\n\t\t\ttry {\n\t\t\t\t int whole = Integer.parseInt(m.group(1));\n\t\t\t\t int radix = Integer.parseInt(m.group(2));\n\t\t\t\t absvalue = whole * 1000 + radix;\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tLogger.getLogger(this.getClass())\n\t\t\t\t\t.error(\"Kapitelnummer der Gefaehrdung ist kein Float.\", e);\n\t\t\t}\n\t\t}\n\t\treturn absvalue;\n\t\n\t}", "public static int getAisId() {\n return aisId;\n }", "public int getAid() {\n\t\treturn aid;\n\t}", "public void cambiarIdioma(String lenguaje){\n\n Locale idioma=new Locale(lenguaje);\n Locale.setDefault(idioma);\n\n\n\n Configuration configuraciontelefono=getResources().getConfiguration();\n configuraciontelefono.locale=idioma;\n getBaseContext().getResources().updateConfiguration(configuraciontelefono,getBaseContext().getResources().getDisplayMetrics());\n }", "public int getAantalCalimiteiten()\n\t{\n\t\treturn _AantalCalimiteiten;\n\t}", "int getI18();", "public java.lang.String getRegularizacionAnualDeduccion() {\r\n return regularizacionAnualDeduccion;\r\n }", "public int getAId() {\n return aId_;\n }", "public Long getIdMarca() {\n return idMarca;\n }", "public static Locale getLocale() {\n return localeInfo.get();\n }", "public String getIdAeroporto()\n {\n return this.idAeroporto;\n }", "public int getAantalFouten() {\n return aantalFouten;\n }", "public String getPrimaryLanguage(){\n return sharedPreferences.getString(PRIMARY_LANGUAGE, \"LANG_NOT_FOUND\");\n }", "public Locale getLocale() {\n\t\treturn null;\n\t}", "public Integer getaId() {\n return aId;\n }", "public Number getAlto()\n {\n return (Number)getAttributeInternal(ALTO);\n }", "public java.lang.String getAlertaId() {\n\t\treturn _pnaAlerta.getAlertaId();\n\t}", "public int getAid() {\n return instance.getAid();\n }", "public Locale getLocale() {\n return this.response.getLocale();\n }", "public int getAngulo(){\n\t\treturn this.angulo_final;\n\t}", "public java.lang.String getADINFD() {\n return ADINFD;\n }", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "io.dstore.values.IntegerValue getValueLanguageId();", "public Integer getIdNotaFiscal() {\n return idNotaFiscal;\n }", "public int getAno() {\n\t\t\treturn ano;\n\t\t}", "public Locale mo126a() {\n return this.f48s;\n }", "public java.lang.String getIdiomaBusqueda()\n {\n return this.idiomaBusqueda;\n }", "public Integer getaId() {\r\n return aId;\r\n }", "public AdrenalineLevel getAdrenaline() {\n return adrenaline;\n }", "public Locale getLocale() {\n if (this.locale == null) {\n return Locale.getDefault();\n }\n return this.locale;\n }", "public Locale getLocale() {\r\n return Locale.getDefault();\r\n }", "String getLocalization();", "public String getUserLocale() {\n return sessionData.getUserLocale();\n }", "@ApiModelProperty(value = \"The locale of the contained data\")\n public String getLocale() {\n return locale;\n }", "public double getFinancialAid() {\r\n return financialAid;\r\n }", "public Locale getLocaleL() {\n\t\treturn panelVirtualKeyboard.getLocaleL();\n\t}", "public int getCodigoAluno() {\r\n\t\treturn codigoAluno;\r\n\t}", "public int getAId() {\n return instance.getAId();\n }", "public String getErjiguanlianzd() {\n return erjiguanlianzd;\n }", "java.lang.String getAoisId();", "public int getComuneNascitaCod() {\r\n return comuneNascitaCod;\r\n }", "public String getNumeroAbonado() {\n return numAbonadoTextField.getText();\n }", "public String getAsignar() {\r\n return asignar;\r\n }", "public int getAantalVerwerkt() {\n return aantalVerwerkt;\n }", "public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;" ]
[ "0.7329212", "0.6262762", "0.6101448", "0.58681935", "0.5730011", "0.5729889", "0.5724988", "0.56381965", "0.5624488", "0.5565634", "0.55179447", "0.54902667", "0.5489398", "0.5489398", "0.5485543", "0.54616964", "0.54596657", "0.54386246", "0.5418944", "0.5414521", "0.5404599", "0.5376759", "0.5376455", "0.5372141", "0.53622234", "0.5349129", "0.53462785", "0.5346207", "0.5340023", "0.5331892", "0.53150946", "0.531342", "0.5311658", "0.5311658", "0.5311658", "0.53035724", "0.52966434", "0.5293775", "0.52845097", "0.5281943", "0.5272954", "0.52722496", "0.5264953", "0.5258174", "0.5254272", "0.52431023", "0.523837", "0.523779", "0.5234343", "0.52219826", "0.5215174", "0.5211371", "0.52026355", "0.5193842", "0.5189613", "0.5188776", "0.5172064", "0.5169664", "0.5165328", "0.51614666", "0.5157407", "0.5153478", "0.51415527", "0.5137329", "0.512241", "0.51079094", "0.51064134", "0.50869685", "0.5086025", "0.50811774", "0.50803316", "0.5077825", "0.5051326", "0.5048852", "0.50450957", "0.5044878", "0.504447", "0.50345826", "0.50316155", "0.502411", "0.50228345", "0.5015742", "0.50147057", "0.50124", "0.50049967", "0.5002736", "0.5002554", "0.49888307", "0.49817598", "0.49812368", "0.4977942", "0.4975975", "0.49695817", "0.4967191", "0.49639753", "0.4954093", "0.49537224", "0.49529892", "0.4950561", "0.49496856" ]
0.89337176
0
Sets the value of the idAnagrafeLocale property.
public void setIdAnagrafeLocale(int value) { this.idAnagrafeLocale = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getIdAnagrafeLocale() {\r\n return idAnagrafeLocale;\r\n }", "public void cambiarIdioma(String lenguaje){\n\n Locale idioma=new Locale(lenguaje);\n Locale.setDefault(idioma);\n\n\n\n Configuration configuraciontelefono=getResources().getConfiguration();\n configuraciontelefono.locale=idioma;\n getBaseContext().getResources().updateConfiguration(configuraciontelefono,getBaseContext().getResources().getDisplayMetrics());\n }", "public void setIdade(int idade) {\r\n\t\t// QUALIFICADOR = THIS\r\n\t\tthis.idade = idade;\r\n\t}", "public void setIdAmigo(int idAmigo) {\n\t\tthis.idAmigo = idAmigo;\n\t}", "public void setId_anneeScolaire(int id_anneeScolaire) {this.id_anneeScolaire = id_anneeScolaire;}", "public void mudarIdioma() {\n\t\tString localeStr = facesUtil.getParam(\"locale\");\n\n\t\tif (localeStr.length() == 2) {\n\t\t\tlocale = new Locale(localeStr);\n\n\t\t} else {\n\t\t\tlocale = new Locale(localeStr.substring(0, 2), localeStr.substring(3));\n\t\t}\n\n\t\tfacesUtil.setLocale(locale);\n\t\tLog.setLogger(ConfigBean.class, facesUtil.getMessage(\"MGL064\", new String[] { localeStr }), Level.INFO);\n\t}", "public abstract void setAcma_id(java.lang.Long newAcma_id);", "public void setIdade(int idade) {\n\t\tthis.idade = idade;\n\t}", "private void setAid(int value) {\n \n aid_ = value;\n }", "public void setLocale(Locale locale) {\n fLocale = locale;\n }", "public void setLocaleId(int aLocaleId) {\r\n\t\tlocaleId = aLocaleId;\r\n\t}", "private void setAId(int value) {\n \n aId_ = value;\n }", "public void setIdAeroporto(String idAeroporto)\n {\n this.idAeroporto = idAeroporto;\n }", "public static void setAisId (int zAisId) {\n aisId = zAisId;\n }", "public void setAmenitiyId(Short amenitiyId) {\r\n this.amenitiyId = amenitiyId;\r\n }", "public void setIdMarca(Long idMarca) {\n this.idMarca = idMarca;\n }", "public void setDia(int dia){\n if(dia > 31 || dia < 0){\n System.out.println(\"Dia inválido\");\n }else {\n this.dia = dia;\n }\n }", "@Override\n\tpublic void setManualId(java.lang.String manualId, java.util.Locale locale) {\n\t\t_scienceApp.setManualId(manualId, locale);\n\t}", "@ZAttr(id=345)\n public void setLocale(String zimbraLocale) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraLocale, zimbraLocale);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public void setId_pelanggan(String Id_Pelanggan){\r\n \r\n this.id_pelanggan = Id_Pelanggan;\r\n }", "public void setAlto(int alto) {\n\t\tthis.alto = alto;\n\t}", "public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;", "public void setFECHAFORMALIZ(int value) {\n this.fechaformaliz = value;\n }", "public void setAid(Integer aid) {\n this.aid = aid;\n }", "@Override\n public void setLocale(Locale arg0) {\n\n }", "public void setKullaniciAdi(java.lang.CharSequence value) {\n this.kullanici_adi = value;\n }", "public void setIdioma(java.lang.String idioma) {\n this.idioma = idioma;\n }", "public LocaleAieon( Locale locale )\r\n\t{\r\n\t\tsuper( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public void setIdacesso(int pIdacesso){\n this.idacesso = pIdacesso;\n }", "@Override\n\tpublic void setLocale(Locale loc) {\n\t}", "public void setaId(Integer aId) {\n this.aId = aId;\n }", "public void setIdfilial(int idfilial){\r\n this.idfilial = idfilial;\r\n }", "public final void setLocale( Locale locale )\n {\n }", "public void setaId(Integer aId) {\r\n this.aId = aId;\r\n }", "public void setAsignaturaAsig (Asignatura val) {\n this.asignaturaAsig = val;\n }", "public void setLocale(Locale locale)\n throws SAXException\n {\n if (\"en\".equals(locale.getLanguage()))\n {\n return;\n }\n throw new SAXException (\"AElfred2 only supports English locales.\");\n }", "private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}", "public void setAnio(int anio)\r\n {\r\n this._anio = anio;\r\n this._has_anio = true;\r\n }", "public void setIdRichiesta(int idRichiesta) {\n this.idRichiesta = idRichiesta;\n }", "public void setIden(int iden) {\n this.iden = iden;\n }", "public void setAlto(Number value)\n {\n setAttributeInternal(ALTO, value);\n }", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "public void setIdventa( Integer idventa ) {\n this.idventa = idventa ;\n }", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }", "public void setAlto(String alto) {\r\n this.alto = alto;\r\n }", "public Almacen(int id, String marca, String modelo, int stock, int proveedor,\n\t\t\tString fecha, int albaran) {\n\t\tthis.id = id;\n\t\tthis.marca = marca;\n\t\tthis.modelo = modelo;\n\t\tthis.fecha = fecha;\n\t\tthis.idProveedor = proveedor;\n\t\tthis.albaran = albaran;\n\t\tthis.stock = stock;\n\t}", "@Override\n\tpublic void setManualId(java.lang.String manualId, java.util.Locale locale,\n\t\tjava.util.Locale defaultLocale) {\n\t\t_scienceApp.setManualId(manualId, locale, defaultLocale);\n\t}", "public void setAno( int ano ){\n this.ano = ano;\n }", "private void setLocale(String lang) {\n Locale myLocale = new Locale(lang);\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration conf = res.getConfiguration();\n conf.setLocale(myLocale);\n res.updateConfiguration(conf, dm);\n Intent refresh = new Intent(this, MainActivity.class);\n startActivity(refresh);\n finish();\n }", "public void setLocale(Locale locale) {\n\n\t}", "public LocaleAieon( String name ) \r\n\t{\r\n\t\tsuper( name, S_LOCALE );\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public void setLocale(Locale locale)\n {\n this.locale = locale;\n }", "public void setAngulo(int ang){\n\t\tthis.angulo_final = ang;\n\t}", "public void setIdActividadArtefacto(Long idActividadArtefacto) {\n this.idActividadArtefacto = idActividadArtefacto;\n }", "public void setIdVenta(String idVenta) {\n this.idVenta = idVenta;\n }", "@Override\n\tpublic void setId(int id) {\n\t\t_keHoachKiemDemNuoc.setId(id);\n\t}", "public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }", "protected void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(Locale locale) {\n this.locale = locale;\n }", "public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }", "public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }", "public void setaId(String aId) {\n this.aId = aId == null ? null : aId.trim();\n }", "LanguageEnum(int id, String isoCode) {\n this.id = id;\n this.isoCode = isoCode;\n }", "public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}", "public tr.com.siparis.sistemi.kafka.model.Kullanici.Builder setKullaniciAdi(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.kullanici_adi = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public void setIdNaturaleza(BigDecimal idNaturaleza) {\r\n this.idNaturaleza = idNaturaleza;\r\n }", "public void setIdAutenticacao(String idAutenticacao) {\n\t\tthis.idAutenticacao = idAutenticacao;\n\t}", "public void setIdMensagemDDA(Long idMensagemDDA) {\n this.idMensagemDDA = idMensagemDDA;\n }", "public void setLocale (Locale locale) {\n _locale = locale;\n _cache.clear();\n _global = getBundle(_globalName);\n }", "@Override\n\tpublic void setAtoresDoFilme(int idFilme, Iterator<IPessoa> atores) throws SQLException {\n\t\tIFilme filme = this.buscarFilmePorId(idFilme);\n\t\tif(filme!=null)\n\t\t\tfilme.setAtores(atores);\n\t}", "public void anularCaja(Integer idCaja) {\n DB_Caja.cambiarEstadoCaja(idCaja, 2);\n }", "public void setIdAutenticacao(int idAutenticacao) {\n\t\tthis.idAutenticacao = idAutenticacao;\n\t}", "public void setIdAlumno(int value) {\n this.idAlumno = value;\n }", "@Override\n public void setLocale(Locale arg0) {\n //\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Ignore.Locale\"));} //$NON-NLS-1$\n }", "public void setIdDetalle_Ventaf(int idDetalle_Ventaf) {\n this.idDetalle_Ventaf = idDetalle_Ventaf;\n }", "public void setIdcliente(java.lang.String idcliente) {\n this.idcliente = idcliente;\n }", "public void setIdMensagem(String idMensagem) \r\n\t{\r\n\t\tthis.idMensagem = idMensagem;\r\n\t}", "public void setLocale(Locale loc) {\n this.response.setLocale(loc);\n }", "public void setId(String anId) {\n _theId = anId;\n }", "public void setAltoContenido(int alto) {\n\t\tthis.altoContenido = alto;\n\t}", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }", "public void setPreferredLocale(Locale locale);", "public void setAnnee(int annee) {\n this.annee = annee;\n }", "public void setId_ciudad(String id_ciudad) {\n this.id_ciudad = id_ciudad;\n }", "public void setFilial(int filial);", "void setAa(gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa aa);", "public void mo38280a(Locale locale) {\n this.f27040c = locale;\n }", "public LocaleAieon() \r\n\t{\r\n\t\tthis( Locale.getDefault() );\r\n\t}", "public void setLocale(String locale)\n\t\t{\n\t\t this.setLocaleLocked(locale);\n\t\t}", "@ZAttr(id=345)\n public Map<String,Object> setLocale(String zimbraLocale, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraLocale, zimbraLocale);\n return attrs;\n }", "@Override\n\tpublic void setIdNguoiTao(int idNguoiTao) {\n\t\t_keHoachKiemDemNuoc.setIdNguoiTao(idNguoiTao);\n\t}", "public void setLocale(Locale locale) {\n/* 462 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 463 */ this.locale = locale;\n/* 464 */ setStandardTickUnits(createStandardDateTickUnits(this.timeZone, this.locale));\n/* */ \n/* 466 */ fireChangeEvent();\n/* */ }", "public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}", "public void setORM_Markamarca1(orm.Marka value) {\r\n\t\tthis.markamarca1 = value;\r\n\t}", "public void setIdCandidatura(int idCandidatura){\n if (idCandidatura < 0 ) {\n throw new IdInvalidoException(\"Id da Candidatura é inválido!\");\n }\n this.idCandidatura = idCandidatura;\n }", "public void setAsignatura(String Asignatura) {\n sAsignatura = Asignatura;\n }", "public void setAreteDessin(AreteDessin a){\n\tformeDessin = a;}" ]
[ "0.71352655", "0.56947815", "0.56169325", "0.5561467", "0.5532501", "0.549044", "0.54665774", "0.54598796", "0.5436412", "0.53533626", "0.53439915", "0.5306521", "0.5301503", "0.5288172", "0.52697104", "0.5227067", "0.5182795", "0.5175077", "0.51565135", "0.5144567", "0.5141262", "0.51303804", "0.5119351", "0.5101037", "0.5083028", "0.5076618", "0.50706905", "0.50583833", "0.50434995", "0.50284076", "0.5019034", "0.50123173", "0.49878553", "0.49855757", "0.49728245", "0.49652457", "0.4947859", "0.4947644", "0.4943357", "0.49428055", "0.49401823", "0.49219838", "0.4919367", "0.4909113", "0.48953187", "0.48931438", "0.4880758", "0.48748592", "0.48736838", "0.48724002", "0.48657042", "0.48508748", "0.4849891", "0.48457253", "0.48426607", "0.48423445", "0.4821409", "0.48060328", "0.47848287", "0.47676024", "0.47676024", "0.4766741", "0.4762628", "0.4759853", "0.47443286", "0.47261482", "0.4721412", "0.47178376", "0.47159895", "0.4706036", "0.46833882", "0.4664179", "0.46633008", "0.46590725", "0.46574038", "0.46389782", "0.46369103", "0.46318012", "0.46075642", "0.46039924", "0.46034318", "0.45959786", "0.4595913", "0.4595913", "0.45939863", "0.45936954", "0.45907885", "0.45846912", "0.45793584", "0.45699158", "0.45607182", "0.45556793", "0.4554615", "0.4541271", "0.4533207", "0.45299417", "0.45181823", "0.45175117", "0.4515712", "0.45150337" ]
0.8366264
0
Retrieve all tomes from the config file, instantiate them as a new tome with all of their values from the config file
public void instantiateTomes(){ for (String tomeKey : this.getConfig().getConfigurationSection("tomes").getKeys(false)){ if (this.getConfig().getBoolean("tomes." + tomeKey + ".enabled") == false){ continue; } ArrayList<IQuest> questsToAddToTome = new ArrayList<IQuest>(); for (String questKey : this.getConfig().getConfigurationSection("tomes." + tomeKey + ".quests").getKeys(false)){ for (IQuest quest : quests){ if (questKey.equalsIgnoreCase(quest.getQuestName())){ questsToAddToTome.add(quest); } } } //Fetch rewards of each tome ConfigurationSection itemsSection = Tomes.getInstance().getConfig().getConfigurationSection("tomes." + tomeKey + ".rewards.items"); ConfigurationSection weightsSection = Tomes.getInstance().getConfig().getConfigurationSection("tomes." + tomeKey + ".rewards.weights"); ArrayList<ItemStack> rewardsArray = new ArrayList<ItemStack>(); if (itemsSection != null) { for (String key : itemsSection.getKeys(false)) { ItemStack item = itemsSection.getItemStack(key); for (int i = 0; i < Integer.parseInt(weightsSection.getString(key)); i++) { rewardsArray.add(item); } } } ConfigurationSection tomeConfig = this.getConfig().getConfigurationSection("tomes." + tomeKey); tomes.add(new Tome( tomeKey, tomeConfig.getString("displayName"), tomeConfig.getInt("numberOfQuests"), tomeConfig.getInt("cost"), questsToAddToTome, rewardsArray )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void init() {\r\n\t\tList<Configuracao> configs = servico.listarTodos();\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tentidade = configs.get(0);\t// deve haver apenas um registro\r\n\t\t} else {\r\n\t\t\tcreateConfiguracao();\r\n\t\t}\r\n\t\t\r\n carregarTemas();\r\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "private void setTEMiosFromConfig(){\n\t\t\n\t\t//model I/O options\n\t\tTEM.runcht.califilein = config.califilein; //switch to read-in calibrated parameters from Jcalinput.txt\t\t\t\n\t\tTEM.runcht.califile = config.califile;\n\t\t\n\t\tTEM.runcht.usecalirestart = config.ccdfilein; //switch to read-in Env. driver for equilibrim-run from calirestart.nc \n\t\tTEM.runcht.outcalirestart = false; //only valid if 'usecalirestart' above is set to false\n\t\tTEM.runcht.ccdfile = config.ccdfile;\n\t\t\n\t\tTEM.runcht.outmodes.OSITER = config.OSITE;\n\t\tTEM.runcht.outmodes.ODAY = config.OSDLY;\n\t\tTEM.runcht.outmodes.OMONTH = config.OSMLY;\n\t\tTEM.runcht.outmodes.OYEAR = config.OSYLY;\n\t\tTEM.runcht.outmodes.OREGNER = config.OREGN;\t\t\t\t\t\n\t\n\t\t//plotters when NO output file\n\t\tTEM.runcht.GUIgraphic = config.OGRAPH;\n\t\tif (TEM.runcht.GUIgraphic) {\n\n\t\t\tbvplotter =new BioVariablePlotter();\t\t\t\n\t\t\tpvplotter =new PhyVariablePlotter();\n\t\t\t\n\t\t\tTEM.runcht.plotting.setPlotter(bvplotter);\n\t\t\tTEM.runcht.plotting.setPlotter2(pvplotter);\n\t\t\t\n\t\t\tif (config.OBGRAPH) {\n\t\t\t\tBioVariablePlotter.f.setVisible(true);\n\t\t\t} else {\n\t\t\t\tBioVariablePlotter.f.setVisible(false);\n\t\t\t}\n\t\t\tif (config.OPGRAPH) {\n\t\t\t\tPhyVariablePlotter.f.setVisible(true);\n\t\t\t} else {\n\t\t\t\tPhyVariablePlotter.f.setVisible(false);\n\t\t\t}\n\t\t}\n\n\t}", "public void parse(){\n\t\tFile file = new File(fileLocation);\n\n\t\tlong seed = ConfigurationData.DEFAULT_SEED;\n\t\tString outputDest = ConfigurationData.DEFAULT_OUTPUT_DESTINATION;\n\t\tLong tickLength = ConfigurationData.DEFAULT_TICK_LENGTH;\n\t\tint port = ConfigurationData.DEFAULT_PORT;\n\n\t\ttry {\n\n\t\t\tScanner sc = new Scanner(file);\n\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString[] tok = sc.next().split(\"=\");\n\t\t\t\tswitch(tok[0]){\n\t\t\t\tcase \"seed\":\n\t\t\t\t\tseed = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outputDestination\":\n\t\t\t\t\toutputDest = tok[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tickLength\":\n\t\t\t\t\ttickLength = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"port\":\n\t\t\t\t\tport = Integer.parseInt(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsc.close();\n\n\t\t\tconfigurationData = new ConfigurationData(seed, outputDest, tickLength, port);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(fileLocation, \"UTF-8\");\n\t\t\t\twriter.println(\"seed=\"+seed);\n\t\t\t\twriter.println(\"outputDestination=\"+outputDest);\n\t\t\t\twriter.println(\"tickLength=\"+tickLength);\n\t\t\t\twriter.println(\"port=\"+port);\n\t\t\t\twriter.close();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tconfigurationData = ConfigurationData.makeDefault();\n\t\t\tSystem.out.println(\"Default file created\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tpublic static CfgSingletonfactory getpropertiesfromFile() {\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "private Machine readConfig() {\n try {\n String firstLine = _config.next();\n if (firstLine.contains(\"*\") || firstLine.contains(\"(\")\n || firstLine.contains(\")\") || firstLine.contains(\" \")) {\n throw error(\"incompatible characters in alphabet\");\n }\n\n _alphabet = new Alphabet(firstLine);\n if (!_config.hasNextInt()) {\n throw new EnigmaException(\"Should be number of rotors\");\n }\n\n int numRotors = _config.nextInt();\n if (!_config.hasNextInt()) {\n throw new EnigmaException(\"Should be number of pawls\");\n }\n\n int numPawls = _config.nextInt();\n\n _name = _config.next().toUpperCase();\n while (_config.hasNext()) {\n notches = _config.next();\n mRotors.add(readRotor());\n }\n return new Machine(_alphabet, numRotors, numPawls, mRotors);\n\n } catch (NoSuchElementException excp) {\n throw error(\"configuration file truncated\");\n }\n }", "private static void initConfig() {\n /*\n * Human IO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Joysticks\n */\n {\n addToConstants(\"joysticks.left\", 0);\n addToConstants(\"joysticks.right\", 1);\n addToConstants(\"joysticks.operator\", 2);\n }\n\n /*\n * Buttons and axis\n */\n {\n }\n }\n }\n\n /*\n * RobotIO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Kicker\n */\n addToConstantsA(\"kicker.encoder.distPerPulse\", 360.0 / 1024.0);\n }\n }\n\n /*\n * Chassis\n */\n {\n /*\n * Constants\n */\n {\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Kicker\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"kicker.kick.normal\", 1.75);\n addToConstants(\"kicker.kick.timeout\", 0.75);\n\n addToConstants(\"kicker.shaken.voltage\", -0.3316);\n addToConstants(\"kicker.shaken.tolerance\", 3.0);\n\n addToConstants(\"kicker.zero.voltage\", 0.8);\n addToConstants(\"kicker.zero.duration\", 0.75);\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Gripper\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"gripper.collection.voltage\", 0.82);\n addToConstants(\"gripper.ejection.voltage\", -0.45);\n }\n }\n }", "private void read() {\n // Read the properties from the project\n EditableProperties sharedProps = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties privateProps = antProjectHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n final ProjectConfiguration cfgs[] = configHelper.getConfigurations().toArray(new ProjectConfiguration[0]);\n final ProjectConfiguration confs[] = new ProjectConfiguration[cfgs.length];\n System.arraycopy(cfgs, 0, confs, 0, cfgs.length);\n setConfigurations(confs);\n // Initialize the property map with objects\n properties.put(J2ME_PROJECT_NAME, new PropertyInfo(new PropertyDescriptor(J2ME_PROJECT_NAME, true, DefaultPropertyParsers.STRING_PARSER), ProjectUtils.getInformation(project).getDisplayName()));\n for (PropertyDescriptor pd:PROPERTY_DESCRIPTORS) {\n EditableProperties ep = pd.isShared() ? sharedProps : privateProps;\n String raw = ep.getProperty( pd.getName());\n properties.put( pd.getName(), new PropertyInfo( pd, raw == null ? pd.getDefaultValue() : raw));\n for (int j=0; j<devConfigs.length; j++) {\n final PropertyDescriptor clone = pd.clone(CONFIG_PREFIX + devConfigs[j].getDisplayName() + '.' + pd.getName());\n raw = ep.getProperty(clone.getName());\n if (raw != null) {\n properties.put(clone.getName(), new PropertyInfo(clone, raw));\n }\n }\n }\n }", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "@PostConstruct\n public void loaddata() throws IOException {\n File file = ResourceUtils.getFile(configProvider.getFilePath());\n Reader in = new FileReader(file.getPath());\n Iterable<CSVRecord> records = CSVFormat.RFC4180.withHeader(\n \"locationid\", \"Applicant\", \"FacilityType\", \"cnn\", \"LocationDescription\", \"Address\", \"blocklot\", \"block\", \"lot\",\n \"permit\", \"Status\", \"FoodItems\", \"X\", \"Y\", \"Latitude\", \"Longitude\", \"Schedule\",\n \"dayshours\", \"NOISent\", \"Approved\", \"Received\", \"PriorPermit\", \"ExpirationDate\",\n \"Location\", \"Fire Prevention Districts\", \"Police Districts\",\n \"Supervisor Districts\", \"Zip Codes\", \"Neighborhoods (old)\"\n ).parse(in);\n\n Iterator<CSVRecord> iterator = records.iterator();\n iterator.next();\n // use our own ids because of how atomic integers work, we can't have a 0 for an id, so can't rely on outside sources.\n int i = 0;\n while (iterator.hasNext()) {\n CSVRecord record = iterator.next();\n FoodTruck truck = new FoodTruck(Float.parseFloat(record.get(\"Latitude\")), Float.parseFloat(record.get(\"Longitude\")),\n record.get(\"Address\"), record.get(\"FoodItems\"), ++i);\n //add food truck to datastore\n truckDataStore.addTruck(truck.getId(), truck);\n\n final Rectangle rect = new Rectangle(truck.getLat(), truck.getLon(),\n truck.getLat(), truck.getLon());\n //add food truck location + id to location data store.\n locationDataStore.getSpatialIndex().add(rect, truck.getId());\n }\n }", "private void initFromFile(Configuration config) throws FileNotFoundException {\n String file = config.getString(OrderFile_Type_Property_Name);\n List<List<String>> contents = FileUtils.readCsv(file);\n int index;\n for (List<String> rowContent : contents) {\n index = 0;\n String accountId = rowContent.get(index++);\n String orderId = rowContent.get(index++);\n String exchange = rowContent.get(index++);\n String stockId = rowContent.get(index++);\n String tradingDay = rowContent.get(index++);\n\n\n if (this.date == 0) {\n // 2019-11-13 00:00:00\n this.date = TimeUtils.formatTradeDate(tradingDay);\n } else if (TimeUtils.formatTradeDate(tradingDay) != date) {\n throw new InitializationException(MessageFormat.format(\"Two different trading days are sent to system, {0} and {1}.\", String.valueOf(this.date), String.valueOf(TimeUtils.formatTradeDate(tradingDay))));\n }\n\n String side = rowContent.get(index++);\n String type = rowContent.get(index++);\n double price = Double.valueOf(rowContent.get(index++));\n String algo = rowContent.get(index++);\n String startTime = rowContent.get(index++);\n String endTime = rowContent.get(index++);\n int qty = Integer.valueOf(rowContent.get(index++));\n double pov = Double.valueOf(rowContent.get(index));\n\n Order order = new Order(orderId, accountId, stockId, startTime, endTime, algo, type, price, pov, side, qty, exchange);\n this.cache.put(orderId, order);\n }\n }", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\tXMLUtils xml = new XMLUtils();\r\n\t\t\t\tConfigBean cfg = xml.getconfigXML();\r\n\t\t\t\tFile f = new File(cfg.getFilepath());\r\n\t\t\t\tFile fs[];\r\n\t\t\t\tif (f.exists() && f.isFile()) {\r\n\t\t\t\t\tfs = f.getParentFile().listFiles();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfs = f.listFiles();\r\n\t\t\t\t}\r\n\t\t\t\tif (fs != null) {\r\n\t\t\t\t\tfor (File of : fs) {\r\n\t\t\t\t\t\tif(MainFrame.getInstance().getManual().isSelected()){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (of.isFile()) {\r\n\t\t\t\t\t\t\tMainFrame.getInstance().getProcess().start(of);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public Config(Properties props) {\n entries = (Properties)props.clone();\n }", "Config(InfoHandler info){\n \n this.info = info;\n \n config_list = new ArrayList<>();\n \n File test = new File(config_path);\n \n if(test.exists()){ //plik istnieje\n \n info.mode=1; //wlaczenie trybu dla obslugi pliku konfiguracyjnego\n \n \n //tutaj pobieranie informacji z pliku konfiguracyjnego\n //do ciała funkcji\n \n config_file = new DictReader(config_path,info);\n \n //tutaj dodajemy funkcjonalnosci\n \n config_list.add(config_file.szukaj(\"%imie\"));\n config_list.add(config_file.szukaj(\"%dict_path\"));\n \n config = get_config();\n \n info.mode=0;\n \n is_alive = true;\n }\n else{\n config = new ArrayList<>();\n config_file = new DictReader(config_path,info);\n first_start = 1;\n }\n }", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "private static void initSettings(TransferITModel model) {\n if (settingsfile.exists()) {\n try {\n ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream(settingsfile));\n Object[] readObjects = new Object[6];\n for (int x = 0; x < readObjects.length; x++) {\n readObjects[x] = objectInputStream.readUnshared();\n if (readObjects[x] == null) {\n return;\n }\n }\n model.putAll((Properties) readObjects[0]);\n\n model.setHostHistory((HashSet<String>) readObjects[1]);\n\n model.setUsernameHistory((HashMap<String, String>) readObjects[2]);\n\n model.setPasswordHistory((HashMap<String, String>) readObjects[3]);\n\n model.setUsers((HashMap<String, String>) readObjects[4]);\n\n model.setUserRights((HashMap<String, Boolean>) readObjects[5]);\n\n\n\n } catch (IOException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n model.addUser(\"anon\", \"anon\", false);\n }\n }", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "private void procesarConfiguracion() {\n try {\n\n\n IXMLParser parser = XMLParserFactory.createDefaultXMLParser();\n IXMLReader reader = StdXMLReader.fileReader(Servidor.path_config);\n parser.setReader(reader);\n IXMLElement xml = (IXMLElement) parser.parse();\n Enumeration e = xml.enumerateChildren();\n\n Vector v, c;\n IXMLElement proc, caso;\n\n\n while (e.hasMoreElements()) {\n proc = (IXMLElement) e.nextElement();\n v = proc.getChildren();\n int n = 0;\n LinkedList<Caso> list = new LinkedList<>();\n while (n < v.size()) {\n caso = (IXMLElement) v.get(n);\n\n Caso ca = new Caso(((IXMLElement) caso.getChildrenNamed(\"solucion\").get(0)).getContent(), ((IXMLElement) caso.getChildrenNamed(\"normal\").get(0)).getContent(), ((IXMLElement) caso.getChildrenNamed(\"error\").get(0)).getContent());\n list.add(ca);\n n++;\n\n }\n config.put(proc.getName(), list);\n }\n\n\n\n\n\n } catch (XMLException | IOException | ClassNotFoundException | InstantiationException | IllegalAccessException ex) {\n Servidor.logger.severe(ex.toString());\n }\n\n\n }", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "private void configInit() {\r\n\t\tconfig = pluginInstance.getConfiguration();\r\n\t\tif (!new File(pluginInstance.getDataFolder().getPath() + File.separator + \"config.yml\")\r\n\t\t\t\t.exists()) {\r\n\t\t\tconfig.setProperty(\"reset-deathloc\", true);\r\n\t\t\tconfig.setProperty(\"use-iConomy\", true);\r\n\t\t\tconfig.setProperty(\"creation-price\", 10.0D);\r\n\t\t\tconfig.setProperty(\"deathtp-price\", 50.0D);\r\n\t\t\tconfig.setProperty(\"allow-tp\", true);\r\n\t\t\tconfig.setProperty(\"maxTombStone\", 0);\r\n\t\t\tconfig.setProperty(\"TombKeyword\", \"[Tomb]\");\r\n\t\t\tconfig.setProperty(\"use-tombAsSpawnPoint\", true);\r\n\t\t\tconfig.setProperty(\"cooldownTp\", 5.0D);\r\n\t\t\tconfig.setProperty(\"reset-respawn\", false);\r\n\t\t\tconfig.setProperty(\"maxDeaths\", 0);\r\n\t\t\tconfig.save();\r\n\t\t\tworkerLog.info(\"Config created\");\r\n\t\t}\r\n\t\tconfig.load();\r\n\t}", "private void loadSettings() {\n\t\ttry {\n\t\t\tFile file = new File(SETTINGS_CONF);\n\t\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(file));\n\t\t\tObject[] o = (Object[]) in.readObject();\n\n\t\t\tJob[] jobs = (Job[]) o[0];\n\t\t\tfileOne.setText((String) o[1]);\n\t\t\tsettings.getRarPath().setText((String) o[2]);\n\t\t\tsettings.getBasePath().setText((String) o[3]);\n\t\t\ttrackers.getList().setItems((String[]) o[4]);\n\n\t\t\tTreeItem root = tree.getItem(0);\n\n\t\t\tfor (Job job : jobs) {\n\t\t\t\tif (job != null) {\n\t\t\t\t\t// job.printAll();\n\t\t\t\t\tTreeItem item = new TreeItem(root, SWT.NATIVE);\n\t\t\t\t\t\n\t\t\t\t\titem.setText(job.getName());\n\t\t\t\t\titem.setData(job);\n\t\t\t\t\titem.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (job.isEnabled() ? GEAR_ICON : GEAR_DISABLED_ICON)));\n\t\t\t\t\t\n\t\t\t\t\tif(!(job.getPrefix() == null || job.getPrefix().isEmpty())) {\n\t\t\t\t\t\tTreeItem i = new TreeItem(item, SWT.NATIVE);\n\t\t\t\t\t\ti.setText(job.getPrefix());\n\t\t\t\t\t\ti.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (UNDERSCORE_ICON)));\n\t\t\t\t\t}\n\t\t\t\t\tif(!(job.getPassword() == null || job.getPassword().isEmpty())) {\n\t\t\t\t\t\tTreeItem i = new TreeItem(item, SWT.NATIVE);\n\t\t\t\t\t\ti.setText(\"[with password]\");\n\t\t\t\t\t\ti.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (PASSWORD_ICON)));\n\t\t\t\t\t}\n\t\t\t\t\tif(!(job.getFileTwo() == null || job.getFileTwo().isEmpty())) {\n\t\t\t\t\t\tTreeItem i = new TreeItem(item, SWT.NATIVE);\n\t\t\t\t\t\ti.setText(job.getFileTwo());\t\t\t\t\t\n\t\t\t\t\t\ti.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (FILE_ICON)));\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\tTreeItem iprefix = new TreeItem(item, SWT.NATIVE);\n\t\t\t\t\tTreeItem ipassword = new TreeItem(item, SWT.NATIVE);\n\t\t\t\t\tTreeItem ifileTwo = new TreeItem(item, SWT.NATIVE);\n\t\t\t\t\tiprefix.setText(job.getPrefix() == null || job.getPrefix().isEmpty() ? \"[no prefix]\" : job.getPrefix());\n\t\t\t\t\tipassword.setText(job.getPassword() == null || job.getPassword().isEmpty() ? \"[no password]\" : \"[with password]\");\n\t\t\t\t\t\n\t\t\t\t\tipassword.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (PASSWORD_ICON)));\n\t\t\t\t\tiprefix.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (FILE_ICON)));\n\t\t\t\t\tifileTwo.setImage(new Image (getShell().getDisplay(), Start.class.getResourceAsStream (FILE_ICON)));\n\t\t\t\t\t\n\t\t\t\t\t// ifileOne.setText(job.getFileOne() == null ||\n\t\t\t\t\t// job.getFileOne().isEmpty() ? \"[no file]\" :\n\t\t\t\t\t// job.getFileOne());\n\t\t\t\t\tifileTwo.setText(job.getFileTwo() == null || job.getFileTwo().isEmpty() ? \"[no file]\" : job.getFileTwo());\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "private void initUserSetting() {\n\n List<String> instantly = new ArrayList<String>();\n instantly.add(PostActivityPlugin.ID);\n instantly.add(ActivityCommentPlugin.ID);\n instantly.add(ActivityMentionPlugin.ID);\n instantly.add(LikePlugin.ID);\n instantly.add(RequestJoinSpacePlugin.ID);\n instantly.add(SpaceInvitationPlugin.ID);\n instantly.add(RelationshipReceivedRequestPlugin.ID);\n instantly.add(PostActivitySpaceStreamPlugin.ID);\n \n List<String> daily = new ArrayList<String>();\n daily.add(PostActivityPlugin.ID);\n daily.add(ActivityCommentPlugin.ID);\n daily.add(ActivityMentionPlugin.ID);\n daily.add(LikePlugin.ID);\n daily.add(RequestJoinSpacePlugin.ID);\n daily.add(SpaceInvitationPlugin.ID);\n daily.add(RelationshipReceivedRequestPlugin.ID);\n daily.add(PostActivitySpaceStreamPlugin.ID);\n daily.add(NewUserPlugin.ID);\n \n List<String> weekly = new ArrayList<String>();\n weekly.add(PostActivityPlugin.ID);\n weekly.add(ActivityCommentPlugin.ID);\n weekly.add(ActivityMentionPlugin.ID);\n weekly.add(LikePlugin.ID);\n weekly.add(RequestJoinSpacePlugin.ID);\n weekly.add(SpaceInvitationPlugin.ID);\n weekly.add(RelationshipReceivedRequestPlugin.ID);\n weekly.add(PostActivitySpaceStreamPlugin.ID);\n \n List<String> webNotifs = new ArrayList<String>();\n webNotifs.add(NewUserPlugin.ID);\n webNotifs.add(PostActivityPlugin.ID);\n webNotifs.add(ActivityCommentPlugin.ID);\n webNotifs.add(ActivityMentionPlugin.ID);\n webNotifs.add(LikePlugin.ID);\n webNotifs.add(RequestJoinSpacePlugin.ID);\n webNotifs.add(SpaceInvitationPlugin.ID);\n webNotifs.add(RelationshipReceivedRequestPlugin.ID);\n webNotifs.add(PostActivitySpaceStreamPlugin.ID);\n \n // root\n saveSetting(instantly, daily, weekly, webNotifs, rootIdentity.getRemoteId());\n\n // mary\n saveSetting(instantly, daily, weekly, webNotifs, maryIdentity.getRemoteId());\n\n // john\n saveSetting(instantly, daily, weekly, webNotifs, johnIdentity.getRemoteId());\n\n // demo\n saveSetting(instantly, daily, weekly, webNotifs, demoIdentity.getRemoteId());\n }", "public void initCup() {\n \tremainingPieces.clear();\n originalPieces.clear();\n\n BufferedReader inFile = null;\n try {\n //File used to read in the different creatures.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupCreatures.txt\"));\n String line = null;\n while ((line = inFile.readLine()) != null) {\n Creature c = new Creature(line);\n remainingPieces.add(c);\n originalPieces.add(c);\n }\n inFile.close();\n //File used to read in the different special incomes.\n inFile = new BufferedReader(new FileReader(System.getProperty(\"user.dir\") + File.separator + \"initCupIncome.txt\"));\n while ((line = inFile.readLine()) != null) {\n SpecialIncome s = new SpecialIncome(line);\n remainingPieces.add(s);\n originalPieces.add(s);\n }\n inFile.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found \" + inFile);\n } catch (EOFException e) {\n System.out.println(\"EOF encountered\");\n } catch (IOException e) {\n System.out.println(\"can't read from file\");\n }\n //Adding the Random Events to the cup.\n BigJuju bj = new BigJuju();\n DarkPlague dp = new DarkPlague();\n Defection df = new Defection();\n GoodHarvest gh = new GoodHarvest();\n MotherLode ml = new MotherLode();\n Teeniepox tp = new Teeniepox();\n TerrainDisaster td = new TerrainDisaster();\n Vandals v = new Vandals();\n WeatherControl wc = new WeatherControl();\n WillingWorkers ww = new WillingWorkers();\n remainingPieces.add(bj);\n originalPieces.add(bj);\n remainingPieces.add(dp);\n originalPieces.add(dp);\n remainingPieces.add(df);\n originalPieces.add(df);\n remainingPieces.add(gh);\n originalPieces.add(gh);\n remainingPieces.add(ml);\n originalPieces.add(ml);\n remainingPieces.add(tp);\n originalPieces.add(tp);\n remainingPieces.add(td);\n originalPieces.add(td);\n remainingPieces.add(v);\n originalPieces.add(v);\n remainingPieces.add(wc);\n originalPieces.add(wc);\n remainingPieces.add(ww);\n originalPieces.add(ww);\n\n //Adding the Magic Events to the cup.\n Balloon b = new Balloon();\n Bow bo = new Bow();\n DispelMagicScroll dms = new DispelMagicScroll();\n DustOfDefense dod = new DustOfDefense();\n Elixir el = new Elixir();\n Fan f = new Fan();\n Firewall fw = new Firewall();\n Golem g = new Golem();\n LuckyCharm lc = new LuckyCharm();\n Sword s = new Sword();\n Talisman t = new Talisman();\n remainingPieces.add(b);\n originalPieces.add(b);\n remainingPieces.add(bo);\n originalPieces.add(bo);\n remainingPieces.add(dms);\n originalPieces.add(dms);\n remainingPieces.add(dod);\n originalPieces.add(dod);\n remainingPieces.add(el);\n originalPieces.add(el);\n remainingPieces.add(f);\n originalPieces.add(f);\n remainingPieces.add(fw);\n originalPieces.add(fw);\n remainingPieces.add(g);\n originalPieces.add(g);\n remainingPieces.add(lc);\n originalPieces.add(lc);\n remainingPieces.add(s);\n originalPieces.add(s);\n remainingPieces.add(t);\n originalPieces.add(t);\n }", "private static void manageGameConfigFile(File configFile) {\n Gson gson = new Gson();\n try {\n GameConfig.setInstance(gson.fromJson(new FileReader(configFile), GameConfig.class));\n } catch (FileNotFoundException e) {\n LogUtils.error(\"FileNotFoundException => \", e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\t\tFile myObj = null;\n\t\tboolean newConfig = false;\n\t\t\n\t\t// Try to create a new file if one doesn't exist yet\n\t\ttry {\n\t\t myObj = new File(\"config.yml\");\n\t\t if (myObj.createNewFile()) {\n\t\t System.out.println(\"File created: \" + myObj.getName());\n\t\t newConfig = true;\n\t\t } else {\n\t\t System.out.println(\"File already exists.\");\n\t\t }\n\t\t } catch (IOException e) {\n\t\t System.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t }\n\t\t\n\t\t// Start up the writer without resetting the whole config\n\t\tConfigControl configControlInit = new ConfigControl(new YamlReader(new FileReader(\"config.yml\")), null);\n\t\tList<Object> r = configControlInit.getConfigObjects();\n\t\tList<Object> configInit = new ArrayList<Object>();\n\t\tYamlWriter yamlW = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\tfor (Object obj : r) {\n\t\t\tyamlW.write(obj);\n\t\t\tconfigInit.add(r);\n\t\t}\n\t\t\n\t\t// Start up a new config control instance\n\t\tConfigControl configControl = new ConfigControl(new YamlReader(new FileReader(\"config.yml\")), yamlW);\n\t\t\n\t\t// If its a new config, fill it with default values\n\t\tif (newConfig) {\n\t\t\tYamlWriter writer = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\t\tMap<String, String> map = new HashMap<String, String>();\n\t\t\tmap.put(\"token\", null);\n\t\t\tmap.put(\"prefix\", \"!\");\n\t\t\tmap.put(\"ping\", \"pong\");\n\t\t\tmap.put(\"custom\", \"\");\n\t\t\tmap.put(\"anotherexample\", \"Create new lines by typing \\\"&n;\\\"!\");\n\t\t\tmap.put(\"deletethis\", \"To delete a command just erase the command name.\");\n\t\t\tmap.put(\"mention\", \"If you are going to mention, use the '_' to represent a space in the name.\");\n\t\t\tmap.put(\"dm\", \"##DM## Start a command response like so for it to be DM'ed to the author.\");\n\t\t\tmap.put(\"music-channel\", \"*\");\n\t\t\tmap.put(\"mg-channel\", \"*\");\n\t\t\twriter.write(map);\n\t\t\tconfigControl.setWriter(writer);\n\t\t}\n\t\t\n\t\t// Close the writer\n\t\tconfigControl.getWriter().close();\n\t\t\n\t\t/*\n\t\t * UI\n\t\t */\n\t\n\t\t// Initialize some variables that will be useful\n\t\tList<Object> configObj = configControl.getConfigObjects();\n\t\tString prefixChars = \"\";\n\t\tString botToken = \"\";\n\t\tString music = \"\";\n\t\tString tos = \"\";\n\t\tString prof = \"\";\n\t\tHashMap<String, Object> commandList = new HashMap<String, Object>();\n\t\tList<JPanel> commandEntries = new ArrayList<JPanel>();\n\n\t\t// Fill the UI fields with config values\n\t\tfor (Object o : configObj) {\n\t\t\tif (o instanceof HashMap<?, ?>) {\n\t\t\t\tHashMap<String, Object> map = (HashMap<String, Object>) o;\n\t\t\t\tfor (String key : map.keySet()) {\n\t\t\t\t\tif (key.equalsIgnoreCase(\"commands02779\")) continue;\n\t\t\t\t\tif (key.equalsIgnoreCase(\"prefix\")) {\n\t\t\t\t\t\tprefixChars = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"token\")) {\n\t\t\t\t\t\tbotToken = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"music-channel\")) {\n\t\t\t\t\t\tmusic = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"mg-channel\")) {\n\t\t\t\t\t\ttos = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"profanity-filter\")) {\n\t\t\t\t\t\tprof = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcommandList.put(key, map.get(key));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Open the window\n\t\tJFrame frame = ConfigUI.openFirstWindow();\n\t\tContainer content = frame.getContentPane();\n\t\tcontent.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));\n\t\t\n\t\t//Header\n\t\tJPanel header = ConfigUI.addHeader(frame);\n\t\tcontent.add(header, BorderLayout.NORTH);\n\t\t\n\t\t\n\t\t//Token Entry\n\t\tJPanel tokenPanel = ConfigUI.addTokenField(frame, botToken);\n\t\tcontent.add(tokenPanel, BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t//Prefix Entry\n\t\tJPanel prefixPanel = ConfigUI.addPrefixField(frame, prefixChars);\n\t\tcontent.add(prefixPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Music Entry\n\t\tJPanel musicPanel = ConfigUI.addMusicField(frame, music);\n\t\tcontent.add(musicPanel, BorderLayout.SOUTH);\n\t\t\t\t\n\t\t//Minigame Entry\n\t\tJPanel tosPanel = ConfigUI.addTOSField(frame, tos);\n\t\tcontent.add(tosPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Profanity Filter Toggle\n\t\tJPanel profPanel = ConfigUI.addProfanityFilterButton(frame, prof);\n\t\tcontent.add(profPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Custom Commands\n\t\tfor (String key : commandList.keySet()) {\n\t\t\tJPanel newEntry = ConfigUI.customCommandEntry(key, commandList.get(key).toString());\n\t\t\tcontent.add(newEntry);\n\t\t\tcommandEntries.add(newEntry);\n\t\t}\n\t\t\n\t\tJPanel submitCancel = new JPanel();\n\t\t\n\t\t//Add Custom Command Addition Button\n\t\tcontent.add(ConfigUI.addAddButton(frame, content, submitCancel, commandEntries));\n\t\t\n\t\t//Submit Button\n\t\tMouseAdapter submitEvent = new MouseAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) { //This is what happens when the fields are submitted\n\t\t\t\ttry {\n\t\t\t\t\tsuper.mouseClicked(e);\n\t\t\t\t\tYamlWriter yamlW = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\t\t\t\tHashMap<String, Object> newMap = new HashMap<String, Object>();\n\t\t\t\t\tList<String> commands = new ArrayList<String>();\n\t\t\t\t\tString newToken = ConfigUI.getTextFromField(tokenPanel);\n\t\t\t\t\tnewMap.put(\"token\", newToken);\n\t\t\t\t\tString newPrefix = ConfigUI.getTextFromField(prefixPanel);\n\t\t\t\t\tnewMap.put(\"prefix\", newPrefix);\n\t\t\t\t\tString newMusic = ConfigUI.getTextFromField(musicPanel);\n\t\t\t\t\tnewMap.put(\"music-channel\", newMusic);\n\t\t\t\t\tString newTOS = ConfigUI.getTextFromField(tosPanel);\n\t\t\t\t\tnewMap.put(\"mg-channel\", newTOS);\n\t\t\t\t\tJRadioButton profButt = new JRadioButton();\n\t\t\t\t\tfor (Component comp : profPanel.getComponents()) {\n\t\t\t\t\t\tif (comp instanceof JRadioButton) {\n\t\t\t\t\t\t\tprofButt = (JRadioButton) comp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString newProf = profButt.isSelected() + \"\";\n\t\t\t\t\tnewMap.put(\"profanity-filter\", newProf);\n\t\t\t\t\tfor (JPanel custom : commandEntries) {\n\t\t\t\t\t\tString key = null;\n\t\t\t\t\t\tString value = null;\n\t\t\t\t\t\tComponent[] comps = custom.getComponents();\n\t\t\t\t\t\tfor (Component c : comps) {\n\t\t\t\t\t\t\tboolean cont = true;\n\t\t\t\t\t\t\tif (c instanceof JTextField) {\n\t\t\t\t\t\t\t\tString text = ((JTextField) c).getText();\n\t\t\t\t\t\t\t\tif (text.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tcont = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tkey = ((JTextField) c).getText();\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (c instanceof JScrollPane && cont) {\n\t\t\t\t\t\t\t\tvalue = ConfigUI.getTextFromArea((JScrollPane) c);\n\t\t\t\t\t\t\t\tnewMap.put(key, value);\n\t\t\t\t\t\t\t\tcommands.add(key);\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\tnewMap.put(\"commands02779\", commands);\n\t\t\t\t\tyamlW.write(newMap);\n\t\t\t\t\tyamlW.close();\n\t\t\t\t\tVariables.setPrefix(newPrefix);\n\t\t\t\t\tVariables.setMusicChannel(newMusic);\n\t\t\t\t\tVariables.setMinigameChannel(newTOS);\n\t\t\t\t\tVariables.setProfanityEnabled(newProf);\n\t\t\t\t\t\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\t\n\t\t\t\t\tJFrame startingFrame = ConfigUI.openStartingFrame();\n\t\t\t\t\tstartingFrame.pack();\n\n\t\t\t\t\tnew Thread(new Runnable() {\n\n @Override\n public void run() {\n try {\n Thread.sleep(2100);\n } catch (InterruptedException ex) {\n }\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n \tboolean ableToLogin = runBot(newToken);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tstartingFrame.dispose();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tJFrame newFrame = ConfigUI.openRunningFrame(ableToLogin);\n \t\t\t\t\t\t\tnewFrame.pack();\n }\n });\n }\n }).start();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\t\tcontent.add(ConfigUI.addSubmitAndCancel(frame, submitCancel, commandEntries, commandList, submitEvent), BorderLayout.SOUTH);\n\t\t\n\t\t//Scrollbar\n\t\tJScrollPane scroll = new JScrollPane(content, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\t\n\t\tframe.setContentPane(scroll);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tframe.pack();\n\t\t/*\n\t\t * END of the config!!\n\t\t */\n\t}", "public static void RT() {////cada clase que tiene informacion en un archivo txt tiene este metodo para leer el respectivo archivoy guardarlo en su hashmap\n\t\treadTxt(\"peliculas.txt\", pelisList);\n\t}", "public abstract CONFIG build();", "public Config() {\n this(System.getProperties());\n\n }", "public TrapManager(){\n\t\n\t\ttrapList = new Trap[15];\n\t\tload();\n\t\t\n\t}", "public void readPoemFiles(){\n try (Scanner fileScan = new Scanner(new File(\"poems.txt\"))) {\n //Poems.txt consist of a header (poet and theme) plus verse lines.\n //First loop reads the header and creates object 'PoetAndTheme'.\n while (fileScan.hasNextLine()){\n String themeAndPoet = fileScan.nextLine();\n PoetAndTheme addToList = new PoetAndTheme(themeAndPoet);\n //Second loop reads verse lines and adds them to object 'PoetAndTheme'.\n while(fileScan.hasNextLine()){\n String verseLine = fileScan.nextLine();\n if (verseLine.isEmpty()){\n break;\n }\n addToList.addVerseLine(verseLine);\n }\n poetsAndThemesList.add(addToList);\n }\n \n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "private void config() {\n\t}", "@Override\n protected void loadConfig(String fileName){\n fileName = PSO_PATH + fileName;\n File file = new File(fileName);\n try {\n Scanner sc = new Scanner(file); \n String line = sc.nextLine();\n List<List<String>> list = Arrays.asList(line.split(\",\"))\n .stream()\n .map(s -> Arrays.asList(s.split(\":\"))\n .stream()\n .map(n -> n.replaceAll(\"[^a-zA-Z0-9_.]\", \"\"))\n .collect(Collectors.toList())\n )\n .collect(Collectors.toList());\n\n this.initialTemperature = Double.parseDouble(list.get(0).get(1));\n this.coolingRate = Double.parseDouble(list.get(2).get(1));\n sc.close();\n } \n catch(IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "@Override\n public void configure() throws Exception {\n BankAccountManagementService bankAccountManagementService = services.get(BankAccountManagementService.class);\n UserManagementService userManagementService = services.get(UserManagementService.class);\n ObjectMapper mapper = JsonMapperFactory.getObjectMapper();\n if (this.filePathAString == null) {\n throw new Exception(\"No config file provided, please set the cashmanager.config.localfile property\");\n }\n LocalFileDTO fileConfig = mapper.readValue(new File(filePathAString), LocalFileDTO.class);\n this.preferences = new HashMap<String, String>(fileConfig.preferences);\n fileConfig.accounts.forEach((account) ->\n bankAccountManagementService.registerNewAcount(account.getId(), account.getBalance())\n );\n fileConfig.users.forEach((user) ->\n userManagementService.registerUser(user.getId(), user.getPassword())\n );\n }", "private static void configureTalons()\n {\n configTalonSensors();\n\n configPIDF(LINEAR_PIDF_SLOT, LINEAR_P, LINEAR_I, LINEAR_D, LINEAR_F);\n\n //Config Front Left Talon\n frontLeftTalon.setSensorPhase(false);\n frontLeftTalon.setInverted(true);\n\n //Config Front Right Talon\n frontRightTalon.setSensorPhase(true);\n frontRightTalon.setInverted(true);\n\n //Config Rear talons\n rearLeftTalon.setInverted(false);\n rearRightTalon.setInverted(true);\n \n rearLeftTalon.follow(frontLeftTalon);\n rearRightTalon.follow(frontRightTalon);\n }", "public static void main(String[] args) {\n\t\tif (args.length != 1) {\n\t\t\tSystem.out.println(\"TestBedConfig test: please provide the name of a config file\\n\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tSystem.out.println(\"Testing TestBedConfig with file \" + args[0]);\n\t\tTestBedConfig tb;\n\t\ttry {\n\t\t\ttb = new TestBedConfig(args[0]);\n\t\n\t\t\tSystem.out.println(\"Read file with \" + tb.getNumberOfMotes() + \" motes\");\n\t\t\tIterator it = tb.getMotesIterator();\n\t\t\tTestBedConfigMote m;\n\t\n\t\t\tint i = 0;\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tm = (TestBedConfigMote)it.next();\n\t\t\t\tSystem.out.println(\"Index \" + i + \": \" + m);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception e) {\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public Set<?> instantiate() throws IOException {\n OrthoMclFormat format = (OrthoMclFormat) wizard.getProperty(PROP_ORTHOMCL_FORMAT);\n format.setDirectory(wizard.getDirectory());\n //update the format settings\n// format.setFilePerOrganism((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_FILE_PER_ORGANISM));\n// format.setPrefixOrganism((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_PREFIX_FOUR_LETTER_ORGANISM));\n// format.setFilePerMethod((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_FILE_PER_METHOD));\n \n// format.setIsWindows((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_IS_WINDOWS));\n// format.setPerlDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_PERL_DIR));\n// format.setOrthoDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_ORTHO_DIR));\n// format.setMclDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_MCL_DIR));\n\n// format.setDb_userName((String) this.wizard.getProperty(OrthoMclFormat.PROP_USER_NAME));\n// format.setDb_password((String) this.wizard.getProperty(OrthoMclFormat.PROP_PASSWORD));\n// format.setDatabaseName((String) this.wizard.getProperty(OrthoMclFormat.PROP_DB_NAME));\n// format.setDropCreateDatabase((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DROP_CREATE_DB));\n //format.setMysqlBin((String) this.wizard.getProperty(OrthoMclFormat.PROP_MYSQL_BIN));\n\n format.setRunBlastp((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DO_BLASTP));\n format.setRunMakeBlastDb((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DO_MAKEBLAST));\n //format.setBlastBin((String) wizard.getProperty(OrthoMclFormat.PROP_BLAST_BIN));\n format.setMakeblastdbParameters((String) wizard.getProperty(OrthoMclFormat.PROP_MAKEBLASTDB_PARAMETERS));\n format.setBlastpParameters((String) wizard.getProperty(OrthoMclFormat.PROP_BLASTP_PARAMETERS));\n\n format.setMinProteinLength((String) this.wizard.getProperty(OrthoMclFormat.PROP_MIN_PROT_LENGTH));\n format.setMaxPercentStops((String) this.wizard.getProperty(OrthoMclFormat.PROP_MAX_PERCENT_STOPS));\n format.setPercentMatchCutoff((String) this.wizard.getProperty(OrthoMclFormat.PROP_PERCENT_MATCH));\n format.seteValueCutoff((String) this.wizard.getProperty(OrthoMclFormat.PROP_EVALUE_CUTOFF));\n// format.setExecute((Boolean)this.wizard.getProperty(OrthoMclFormat.PROP_EXECUTE));\n try {\n final OrthoMclFormat myFormat = format;\n myFormat.download();\n } catch (DownloadException ex) {\n Exceptions.printStackTrace(ex);\n }\n //set the last directory\n if(format.getDirectory() != null){\n NbPreferences.forModule(OrthoMclFormat.class).put(\"orthomcl-run\", format.getDirectory());\n }\n\n return Collections.emptySet();\n }", "public TFreightConfigDao() {\n super(T_FREIGHT_CONFIG, TFreightConfig.class);\n }", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "private Config() {\n }", "public FtlConfig() {\n cfg = new Configuration(Configuration.VERSION_2_3_30);\n cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), \"ftl\");\n cfg.setDefaultEncoding(\"UTF-8\");\n cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n cfg.setSharedVariable(\"random\",\n new BeansWrapperBuilder(Configuration.VERSION_2_3_30).build().getStaticModels());\n cfg.setLogTemplateExceptions(false);\n cfg.setWrapUncheckedExceptions(true);\n cfg.setFallbackOnNullLoopVariable(false);\n }", "Pair<T, U> build() throws IOException, ConfigurationException;", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "public static void acceptConfig() {\r\n\t\t//Here, it tries to read over the config file using try-catch in case of Exception\r\n\t\ttry {\r\n\t\t\tProperties properties = new Properties();\r\n\t\t\tFileInputStream fis = new FileInputStream(new File(\"config.properties\"));\r\n\t\t\tproperties.load(fis);\r\n\t\t\tString storage = properties.getProperty(\"storage\");\r\n\t\t\tif(storage == null) \r\n\t\t\t\tthrow new IllegalArgumentException(\"Property 'storage' not found\");\r\n\t\t\tif(storage.equals(\"tree\"))\r\n\t\t\t\tdata = new BinarySearchTree();\r\n\t\t\tif(storage.equals(\"trie\"))\r\n\t\t\t\tdata = new Trie();\r\n\t\t\tif(data == null) \r\n\t\t\t\tthrow new IllegalArgumentException(\"Not valid storage configuration.\");\r\n\t\t}\r\n\t\t//If an Exception occurs, it just prints a message\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Configuration file not found.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error reading the configuration file.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "private OptimoveConfig() {\n }", "abstract public Config createConfig(String path);", "private void setUpConfetti() {\n Timber.d(\"setUpConfetti\");\n final Resources res = getResources();\n goldDark = res.getColor(R.color.gold_dark);\n goldMed = res.getColor(R.color.gold_med);\n gold = res.getColor(R.color.gold);\n goldLight = res.getColor(R.color.gold_light);\n colors = new int[]{goldDark, goldMed, gold, goldLight};\n }", "public Facts() {\n\t\t\n\t\t// Allocate memory for tips and tCellFacts variables\n\t\ttips = new ArrayList<String>();\n\t\ttCellFacts = new HashMap<Integer,String>();\n\t\t\n\t\t// Calls the method that locates the resource locations for\n\t\t// tips.txt and facts.txt\n\t\tlocateResources();\n\t\t\t\n\t\t// Calls the method that reads the files\n\t\treadFiles();\n\t\t\n\t}", "public static void load() {\n tag = getPlugin().getConfig().getString(\"Tag\");\n hologram_prefix = getPlugin().getConfig().getString(\"Prefix\");\n hologram_time_fixed = getPlugin().getConfig().getBoolean(\"Hologram_time_fixed\");\n hologram_time = getPlugin().getConfig().getInt(\"Hologram_time\");\n hologram_height = getPlugin().getConfig().getInt(\"Hologram_height\");\n help_message = getPlugin().getConfig().getStringList(\"Help_message\");\n hologram_text_lines = getPlugin().getConfig().getInt(\"Max_lines\");\n special_chat = getPlugin().getConfig().getBoolean(\"Special_chat\");\n radius = getPlugin().getConfig().getBoolean(\"Radius\");\n radius_distance = getPlugin().getConfig().getInt(\"Radius_distance\");\n chat_type = getPlugin().getConfig().getInt(\"Chat-type\");\n spectator_enabled = getPlugin().getConfig().getBoolean(\"Spectator-enabled\");\n dataType = getPlugin().getConfig().getInt(\"Data\");\n mySQLip = getPlugin().getConfig().getString(\"Server\");\n mySQLDatabase = getPlugin().getConfig().getString(\"Database\");\n mySQLUsername = getPlugin().getConfig().getString(\"Username\");\n mySQLPassword = getPlugin().getConfig().getString(\"Password\");\n\n }", "public void inicializarListaMascotas()\n {\n //creamos un arreglo de objetos y le cargamos datos\n mascotas = new ArrayList<>();\n mascotas.add(new Mascota(R.drawable.elefante,\"Elefantin\",0));\n mascotas.add(new Mascota(R.drawable.conejo,\"Conejo\",0));\n mascotas.add(new Mascota(R.drawable.tortuga,\"Tortuga\",0));\n mascotas.add(new Mascota(R.drawable.caballo,\"Caballo\",0));\n mascotas.add(new Mascota(R.drawable.rana,\"Rana\",0));\n }", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "public SuperPeer initialize() {\n try {\n // read config file (e.g., all-to-all.config, linear.config)\n Scanner sc = new Scanner(new FileInputStream(this.config));\n\n // process each line\n while (sc.hasNextLine()) {\n // parse and decompose line\n String[] line = sc.nextLine().split(\" \");\n String type = line[0];\n IPv4 peer;\n\n switch (type) {\n case \"c\":\n break;\n case \"s\":\n // SuperPeer definition: 'other' is neighbor to associate with this SuperPeer\n peer = new IPv4(line[1]);\n if (this.equals(peer)) {\n this.neighbors.add(line[2]);\n }\n break;\n case \"p\":\n // peer definition: 'other' is peer to associate with this SuperPeer\n peer = new IPv4(line[1]);\n if (this.equals(peer)) {\n this.leafs.add(line[2]);\n }\n break;\n default:\n this.log(String.format(\"Unknown type '%s'. Ignoring...\", type));\n break;\n }\n }\n sc.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return this;\n }", "private void setTEMinitsFromRunner(){\n\t\n\t\tSiteIn inits = new SiteIn();\n\t\t\n\t\tString dummy=\" \";\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_MOSSTHICK, 1);\n\t\tif (dummy!=\" \") inits.setMossthick(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_FIBTHICK, 1);\n\t\tif (dummy!=\" \") inits.setFibthick(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_HUMTHICK, 1);\n\t\tif (dummy!=\" \") inits.setHumthick(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_VEGC, 1);\n\t\tif (dummy!=\" \") inits.setVegc(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_VEGN, 1);\n\t\tif (dummy!=\" \") inits.setVegn(Float.valueOf(dummy));\n\t\t\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_SOILC, 1);\n\t\tif (dummy!=\" \") inits.setSoilc(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_FIBSOILC, 1);\n\t\tif (dummy!=\" \") inits.setFibc(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_HUMSOILC, 1);\n\t\tif (dummy!=\" \") inits.setHumc(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_MINESOILC, 1);\n\t\tif (dummy!=\" \") inits.setMinc(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_AVAILN, 1);\n\t\tif (dummy!=\" \") inits.setAvln(Float.valueOf(dummy));\n\t\tdummy = (String)initTB.getValueAt(GUIconfigurer.I_SOILN, 1);\n\t\tif (dummy!=\" \") inits.setOrgn(Float.valueOf(dummy));\n \n\t\tif (dummy!=\" \") TEM.runcht.cht.setSiteStates(inits);\n \n\t}", "private void configure(String args[])\r\n\t{\n\t\tfor(int i = 0; i < NUM_USERS; i++)\r\n\t\t{\r\n\t\t\tuserFileNames[i] = args[i+1];\r\n\t\t\t// userFileNames[i] = \"USER\" + i+1;\r\n\t\t}\r\n\r\n\t\t//Populate disks array\r\n\t\tfor(int i = 0; i < NUM_DISKS; i++)\r\n\t\t{\r\n\t\t\tdisks[i] = new Disk();\r\n\t\t}\r\n\r\n\t\t//Populate printers array\r\n\t\tfor(int i = 0; i < NUM_PRINTERS; i++)\r\n\t\t{\r\n\t\t\tprinters[i] = new Printer(i+1); \r\n\t\t}\r\n\r\n\t\t//Populate user\r\n\t\tfor(int i = 0; i< NUM_USERS; i++)\r\n\t\t{\r\n\t\t\tusers[i] = new UserThread(userFileNames[i]);\r\n\t\t}\r\n\t}", "public LocalSettings() {\n // Check if a previous settings file exists\n if (settingsFile.exists()) {\n \n // Read the data from the file\n StringBuilder contentBuilder = new StringBuilder();\n try (BufferedReader br = new BufferedReader(new FileReader(settingsFile))){\n \n // Go through all lines\n String line;\n while ((line = br.readLine()) != null){\n addSetting(line);\n }\n } catch (IOException e){\n e.printStackTrace();\n }\n }\n }", "private void loadVariablesFromConfig()\n {\n List<String> spawnNames = (List<String>) spawnConfig.getConfig().getList(\"spawns\");\n for (String spawn : spawnNames) {\n Location location = new Location(\n getServer().getWorld(spawnConfig.getConfig().getString(\"spawn.\" + spawn + \".world\")),\n spawnConfig.getConfig().getDouble(\"spawn.\" + spawn + \".x\"),\n spawnConfig.getConfig().getDouble(\"spawn.\" + spawn + \".y\"),\n spawnConfig.getConfig().getDouble(\"spawn.\" + spawn + \".z\"));\n location.setPitch(spawnConfig.getConfig().getInt(\"spawn.\" + spawn + \".pitch\"));\n location.setYaw(spawnConfig.getConfig().getInt(\"spawn.\" + spawn + \".yaw\"));\n\n spawnLocations.add(location);\n }\n\n // Spectator Spawn\n spectatorSpawn = new Location(\n getServer().getWorld(spawnConfig.getConfig().getString(\"spectatorSpawn.world\")),\n spawnConfig.getConfig().getDouble(\"spectatorSpawn.x\"),\n spawnConfig.getConfig().getDouble(\"spectatorSpawn.y\"),\n spawnConfig.getConfig().getDouble(\"spectatorSpawn.z\"));\n spectatorSpawn.setPitch(spawnConfig.getConfig().getInt(\"spectatorSpawn.pitch\"));\n spectatorSpawn.setYaw(spawnConfig.getConfig().getInt(\"spectatorSpawn.yaw\"));\n }", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "public static void LoadIntoConfigFiles()\n {\n \tProperties prop = new Properties();\n ///*\n \ttry {\n \t\t//set the properties value\n \n prop.setProperty(\"comp_name\", \"Teledom International Ltd\");\n prop.setProperty(\"com_city\", \"Lagos\");\n \t\tprop.setProperty(\"State\", \"Lagos\");\n \t\tprop.setProperty(\"logo_con\", \"logo.png\");\n \t\tprop.setProperty(\"front_frame\", \"front.png\");\n prop.setProperty(\"back_frame\", \"back.png\");\n \n \n \n \n \t\t//save properties to project root folder\n \t\tprop.store(new FileOutputStream(setupFileName), null);\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n // */\n \n \n \n }", "public Config createConfig(String filename);", "public T loadConfig(File file) throws IOException;", "private static void configure(final VendingTileEntity vte) {\n\n\t\tfinal ItemStack[] inv = vte.getRawInventory();\n\t\tfinal VillagerProfession profession = VillagerProfession.randomProfession();\n\t\tfinal int count = 2 + random.nextInt(5);\n\n\t\t// Use this method because if the spawn point is created before\n\t\t// the world is launched it is not possible to have a FakePlayer\n\t\t// \"log in\".\n\t\tvte.setOwnerId(FakePlayerHelper.getFakePlayerID());\n\t\tvte.setName(profession.getVendingTitle());\n\t\tvte.setNameBackgroundColor(profession.getBackgroundColor());\n\t\tvte.setNameColor(profession.getForegroundColor());\n\n\t\tint index = 0;\n\t\tfor (final Object rm : profession.getTradeList(count)) {\n\t\t\tif (rm instanceof MerchantRecipe) {\n\t\t\t\tfinal MerchantRecipe mr = (MerchantRecipe)rm;\n\t\t\t\tfinal int base = index + VendingTileEntity.CONFIG_SLOT_START;\n\t\t\t\tinv[base] = mr.getItemToBuy().copy();\n\t\t\t\tif (mr.hasSecondItemToBuy())\n\t\t\t\t\tinv[base + 6] = mr.getSecondItemToBuy().copy();\n\t\t\t\tfinal ItemStack stack = inv[base + 12] = mr.getItemToSell().copy();\n\n\t\t\t\t// Put items in inventory to give to the player\n\t\t\t\tint stacks = 0;\n\t\t\t\tif (stack.isStackable())\n\t\t\t\t\tstacks = random.nextInt(6) + random.nextInt(6) + 2;\n\t\t\t\telse\n\t\t\t\t\tstacks = random.nextInt(3) + 1;\n\n\t\t\t\tfor (int i = 0; i < stacks; i++)\n\t\t\t\t\tvte.addStackToOutput(stack.copy());\n\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "public synchronized static void initConfig() {\n\t\tMap<CatPawConfigProperty, String> initialValues = new HashMap<CatPawConfigProperty, String>();\n\t\tinitConfig(initialValues);\n\t}", "public void loadConfigurationFromDisk() {\r\n try {\r\n FileReader fr = new FileReader(CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\")) continue;\r\n if (line.equalsIgnoreCase(\"\")) continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n String aux;\r\n switch (str.nextToken().trim()) {\r\n case \"system.voidchain.protocol_version\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.protocolVersion = aux;\r\n continue;\r\n case \"system.voidchain.transaction.max_size\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.transactionMaxSize = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.block.num_transaction\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.numTransactionsInBlock = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.storage.data_file_extension\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.dataFileExtension = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.walletFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.data_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.dataDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.blockFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.walletFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.memory.block_megabytes\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.memoryUsedForBlocks = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.sync.block_sync_port\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockSyncPort = Integer.parseInt(aux);\r\n }\r\n continue;\r\n case \"system.voidchain.crypto.ec_param\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.ecParam = aux;\r\n continue;\r\n case \"system.voidchain.core.block_proposal_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockProposalTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n case \"system.voidchain.blockchain.chain_valid_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockchainValidTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n fr.close();\r\n rd.close();\r\n\r\n if (this.firstRun)\r\n this.firstRun = false;\r\n } catch (IOException e) {\r\n logger.error(\"Could not load configuration\", e);\r\n }\r\n }", "public Property(String configFileName) {\r\n\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\r\n\t\tif (configFileName == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tScanner in = null;\r\n\t\tScanner scan = null;\r\n\t\ttry {\r\n\t\t\tFile conf = new File(configFileName);\r\n\t\t\tin = new Scanner(conf);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString line = in.nextLine().replace('=', ',');\r\n\t\t\t\tscan = new Scanner(line);\r\n\t\t\t\tscan.useDelimiter(\",\");\r\n\t\t\t\tString firstWord = scan.next();\r\n\t\t\t\tif (firstWord.equals(\"positive\")) {\r\n\t\t\t\t\tpositive = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"negative\")) {\r\n\t\t\t\t\tnegative = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"stop\")) {\r\n\t\t\t\t\tstop = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"scoringmethod\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tscoringmethod = Integer.parseInt(next);\r\n\t\t\t\t} else if (firstWord.equals(\"mindistance\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tmindistance = Double.parseDouble(next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} finally{\r\n\t\t\tif(scan != null)\r\n\t\t\t\tscan.close();\r\n\t\t}\r\n\t}", "public static void hydrateConifg()\r\n {\n \tenableMagnet = config.getBoolean(\"enableMagnet\", \"general\", true, \"\");\r\n \tenableVoidBucket = config.getBoolean(\"enableVoidBucket\", \"general\", true, \"\");\r\n \tenableMatterTransporter = config.getBoolean(\"enableMatterTransporter\", \"general\", true, \"\");\r\n \tenableSitisStick = config.getBoolean(\"enableSitisStick\", \"general\", true, \"\");\r\n \tenableImbuedItems = config.getBoolean(\"enableImbuedItems\", \"general\", true, \"\");\r\n \tenableNetherBlade = config.getBoolean(\"enableNetherBlade\", \"general\", true, \"\");\r\n \t\r\n \tshowDevBookEntry = config.getBoolean(\"showDevBookEntry\", \"general\", false, \"\") || isDev;\r\n\r\n \t\r\n \t//teslaRange = config.getInt(\"teslaCoilRange\", \"general\", 20, 1, 64, \"\");\r\n }", "public static Parametros ConfiguracionParametros(String ruta){\n try{\n Parametros theParametros = new Parametros();\n List<EventoPuertaMagnetica> eventoPM = new ArrayList<>();\n File theXmlFile = new File(ruta + \"config.xml\");\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(theXmlFile);\n doc.getDocumentElement().normalize();\n\n String url_ws= doc.getDocumentElement().getElementsByTagName(\"Url_WebServices\").item(0).getTextContent();\n String id_port = doc.getDocumentElement().getElementsByTagName(\"Id_Portico\").item(0).getTextContent();\n String ip_bd = doc.getDocumentElement().getElementsByTagName(\"Base_Datos_IP\").item(0).getTextContent();\n String mani_puerta_chapa = doc.getDocumentElement().getElementsByTagName(\"Tiene_Chapa\").item(0).getTextContent();\n String dispo = doc.getDocumentElement().getElementsByTagName(\"Disposicion\").item(0).getTextContent();\n String crede_admin = doc.getDocumentElement().getElementsByTagName(\"Id_Crede_Administrador\").item(0).getTextContent();\n String loc_geo = doc.getDocumentElement().getElementsByTagName(\"Localizacion_Geografica\").item(0).getTextContent();\n\n NodeList events = doc.getDocumentElement().getElementsByTagName(\"Evento\"); //0 o mas ...\n for(int i=0; i< events.getLength(); i++){\n EventoPuertaMagnetica event = new EventoPuertaMagnetica();\n\n Node nodo = events.item(i);\n NodeList caracteristicasEvento = nodo.getChildNodes();\n\n String id_evento = caracteristicasEvento.item(0).getTextContent();\n String nombre_evento = caracteristicasEvento.item(1).getTextContent();\n\n event.set_U01B3F3(id_evento);\n event.set_DESTINO(nombre_evento);\n\n eventoPM.add(event);\n }\n theParametros.set_Url_WebServices(url_ws);\n theParametros.set_Id_Portico(id_port);\n theParametros.set_Base_Datos_IP(ip_bd);\n theParametros.set_Manipulacion_Puerta(mani_puerta_chapa);\n theParametros.set_Disposicion(dispo);\n theParametros.set_Id_CredencialAdmin(crede_admin);\n theParametros.set_Localizacion_Geografica(loc_geo);\n theParametros.set_Eventos(eventoPM);\n\n return theParametros;\n\n }catch (Exception ex){\n return null;\n }\n }", "private void createConfig(File fileName) {\n\t\tthis.getConfig().set(\"Auto-update\", false);\n \n\t\t// setting a String\n\t\tString announcerName = \"&6[&cBroadcast&5Ex&6]&f: \";\n\t\tthis.getConfig().set(\"Announcer Name\", announcerName);\n \n\t\t// setting an int value\n\t\tint Interval = 10;\n\t\tthis.getConfig().set(\"Interval\", Interval);\n \n\t\t// Setting a List of Strings\n\t\t// The List of Strings is first defined in this array\n\t\tList<String> Messages = Arrays.asList(\"Hello World\", \"Powered by BroadcastEx\", \"&dColor codes &fare compatible :)\");\n\t\tthis.getConfig().set(\"Messages\", Messages);\n\t\tthis.saveConfig();\n\t}", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "@PostConstruct\n public void init() {\n try {\n String contentFile = PlatformUtils.fileToString(TALKS_FILE_PATH, getClass().getClassLoader());\n loadTalks(PlatformUtils.parseToJson(contentFile));\n } catch (IOException e) {\n logger.log(Level.WARNING, \"An error occurred while loading data\", e);\n }\n }", "public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "public static void generateCustomGameConfiguration() {\n // GameConfig.getInstance().setMapWidthX(20);\n // GameConfig.getInstance().setMapHeightY(20);\n // GameConfig.getInstance().setMaxEnergyPirateValue(100);\n // GameConfig.getInstance().setMonkeyErraticSpeed(1000);\n // GameConfig.getInstance().setMonkeyHunterSpeed(750);\n // GameConfig.getInstance().setRumEnergyValue(10);\n // GameConfig.getInstance().setTimeRumVisibility(10000);\n // GameConfig.getInstance().setRumList(Brain.getInstance().getObjectManager().getRumList());\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // ArrayList<Monkey> monkeyArrayList = new ArrayList<Monkey>();\n // for(int i=0;i<10;i++) {\n // if (i % 2 == 0) {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.ERRATIC));\n // } else {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.HUNTER));\n // }\n // }\n // GameConfig.getInstance().setMonkeyList(monkeyArrayList);\n // for(int i=0;i< Brain.getInstance().getMapManager().getMap().getSquareList().size();i++) {\n // for (int j = 0; j < Brain.getInstance().getMapManager().getMap().getSquareList().get(i).size(); j++) {\n // if (i == 0 || j==0 || i == GameConfig.getInstance().getMapWidthX()-1\n // || j == GameConfig.getInstance().getMapHeightY()-1) {\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.SEA);\n // }else{\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.GROUND);\n // }\n // }\n // }\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // saveGameConfiguration();\n }", "private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }", "private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathTool.getAbsolute(RELATIVE_FILE_PATH));\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t\t\t\t\n\t\t\t//optional, but recommended\n\t\t\t//read this - http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tSystem.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n\t NodeList nList = doc.getElementsByTagName(\"param\");\n\t params = new HashMap<>();\n\t for (int temp = 0; temp < nList.getLength(); temp++) {\n\t Node nodo = nList.item(temp);\n\t System.out.println(\"Elemento:\" + nodo.getNodeName());\n\t if (nodo.getNodeType() == Node.ELEMENT_NODE) {\n\t Element element = (Element) nodo;\n\t params.put(element.getAttribute(\"name\"), element.getAttribute(\"value\"));\n\t }\n\t }\n\t\t\t\n\t\t\t\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}", "private void initTransactions() {\n\n\t transactions = ModelFactory.createDefaultModel();\n\t try\n\t {\n\t\t\ttransactions.read(new FileInputStream(\"transactions.ttl\"),null,\"TTL\");\n\t\t}\n\t catch (FileNotFoundException e) {\n\t \tSystem.out.println(\"Error creating tansactions model\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void loadConfigs() {\n\t configYML = new ConfigYML();\n\t configYML.setup();\n }", "public StructureTownHallConfigDao() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class);\n\t}", "public GameConfigure()\n {\n trackItems = new Stack<String>();\n random = new Random();\n visits = new Stack<Room>();\n items = new ArrayList<Item>(); \n rooms = new ArrayList<Room>(); \n characters = new ArrayList<Person>();\n\n // Creates all the items, people, rooms and the player.\n resetGame();\n }", "private void setUpFrom(){\n\t\tEPVentanaTemporal ven = new EPVentanaTemporal();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\t//setemamos la ventana.\n\t\tven.setNombre(\"time_batch\");\n\t\tven.setValor(\"10\");\n\t\tven.setUnidadTemporal(\"seconds\");\n\t\tven.setPseudonombre(\"a1\");\n\t\tpro.setNombre(\"p4\");\n\t\tpro.setPseudonombre(\"\");\n\t\tpro.setVentana(ven);\n\t\texpresionesFrom.add(pro);\n\t}", "public static void Initialize() {\n // Load config into memory\n ConfigFile config = new ConfigFile(\"money.yml\");\n\n // Initialize iron, gold, and diamond values to the values in the config\n if (config.contains(\"iron\"))\n iron = config.getLong(\"iron\");\n else\n iron = 0;\n if (config.contains(\"gold\"))\n gold = config.getLong(\"gold\");\n else\n gold = 0;\n if (config.contains(\"diamond\"))\n diamond = config.getLong(\"diamond\");\n else\n diamond = 0;\n\n // Assign the config loaded earlier to the config variable so it can be accessed later\n MoneyManager.config = config;\n\n //Load economy\n RegisteredServiceProvider<Economy> rsp = Bukkit.getServicesManager().getRegistration(Economy.class);\n if (rsp == null) {\n FiatPlugin.singleton.getLogger().log(Level.SEVERE, \"There was an error retrieving the vault economy service. This is fatal. Shutting down\");\n Bukkit.getPluginManager().disablePlugin(FiatPlugin.singleton);\n } else\n economy = rsp.getProvider();\n }", "private static void readConfigFile() {\n\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(getConfigFile()));\n String sLine = null;\n while ((sLine = input.readLine()) != null) {\n final String[] sTokens = sLine.split(\"=\");\n if (sTokens.length == 2) {\n m_Settings.put(sTokens[0], sTokens[1]);\n }\n }\n }\n catch (final FileNotFoundException e) {\n }\n catch (final IOException e) {\n }\n finally {\n try {\n if (input != null) {\n input.close();\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n\n }", "void construct() throws FndException\n {\n if (DEBUG) debug(\"ASPConfig.construct()\");\n String cfgdir = getASPManager().getASPConfigFileDir();\n\n synchronized(getClass())\n {\n configfile = ASPConfigFile.getDir(cfgdir);\n if( !configfile.initialized ) configfile.construct(getASPPage());\n }\n parameters = (Hashtable)configfile.params.clone();\n srv_fmt = (ServerFormatter)configfile.srv_fmt.clone();\n }", "@Before\n\tpublic void setTraineeInfo() {\n\t\tthis.traineeOne.setName(\"Joe Smith\");\n\t\tthis.traineeOne.setEmail(\"one@gmail.com\");\n\t\tthis.traineeOne.setPhoneNumber(\"954-798-6005\");\n\t\tthis.traineeOne.setTrainingStatus(TrainingStatus.Training);\n\t\tthis.traineeOne.setBatch(caliberBatch);\n\t\t\n\t\tthis.traineeTwo.setName(\"Shakira Jimenez\");\n\t\tthis.traineeTwo.setResourceId(\"two\");\n\t\tthis.traineeTwo.setEmail(\"two@gmail.com\");\n\t\tthis.traineeTwo.setPhoneNumber(\"347-798-6005\");\n\t\tthis.traineeTwo.setTrainingStatus(TrainingStatus.Training);\n\t\tthis.traineeTwo.setBatch(caliberBatch);\n\t\t\n\t\tthis.traineeThree.setName(\"Joe Smith\");\n\t\tthis.traineeThree.setResourceId(\"one\");\n\t\tthis.traineeThree.setEmail(\"one@gmail.com\");\n\t\tthis.traineeThree.setPhoneNumber(\"954-798-6005\");\n\t\tthis.traineeThree.setTrainingStatus(TrainingStatus.Dropped);\n\t\t\n\t\tcaliberTrainees.add(traineeOne);\n\t\tcaliberTrainees.add(traineeThree);\n\t\tsalesforceTrainees.add(traineeThree);\n\t\tsalesforceTrainees.add(traineeTwo);\n\t}", "private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }", "private void parseConfig() throws CatascopiaException {\n\t\tthis.config = new Properties();\n\t\t//load config properties file\n\t\ttry {\t\t\t\t\n\t\t\tFileInputStream fis = new FileInputStream(JCATASCOPIA_AGENT_HOME + File.separator + CONFIG_PATH);\n\t\t\tconfig.load(fis);\n\t\t\tif (fis != null)\n\t \t\tfis.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tthrow new CatascopiaException(\"config file not found\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\tthrow new CatascopiaException(\"config file parsing error\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t}\n\t}", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public BaseConfig() {\n\t\tlong current = System.currentTimeMillis();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeInMillis(current);\n\t\tthis.start_hours = cal.get(Calendar.HOUR_OF_DAY);\n\t\tthis.start_minutes = cal.get(Calendar.MINUTE);\n\t\tthis.stop_hours = this.start_hours;\n\t\tthis.stop_minutes = this.start_minutes;\n\t\tthis.force_on = false;\n\t\tthis.force_off = false;\n\t\tthis.sensor_type = SensorType.LIGHT;\n\t\tthis.sensing_threshold = .5f;\n\t\tthis.sensorInterval = 3000;\n\t\t/*String address;\n\t\ttry {\n\t\t\taddress = InetAddress.getLocalHost().toString();\n\t\t\taddress = address.substring(address.indexOf('/') + 1);\n\t\t\tserverIP = address;\n\t\t\tserverPort = 9999;\n\t\t} catch (UnknownHostException e) {\n\t\t\t// Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t\n\t}", "public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}", "public MecBasicsConfig()\n {\n\n }", "private void initFiles() {\r\n\t\ttry {\r\n\t\t\tFile file = getConfigFile();\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tXmlFile.write(file, new SystemSettings());\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize settings file\", ex);\r\n\t\t}\r\n\t}", "public BaseClass() {\n\t\t \n\t try {\n\t\t\t \n\t\t\t prop=new Properties();\n\t\t\t \n\t\t\tString path=System.getProperty(\"user.dir\");\n\t\t\t \n\t\t\t // FileInputStream is the pre-defined class\n\t\t\tFileInputStream ip=new FileInputStream(path+\"\\\\src\\\\main\\\\java\\\\com\\\\demoQA\\\\config\\\\Config.Properties\");\n\t\t\t prop.load(ip);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t\t \n\t }", "Factory getFactory()\n {\n return configfile.factory;\n }", "@Test\n public final void testConfigurationParser() {\n URL resourceUrl = this.getClass().getResource(configPath);\n File folder = new File(resourceUrl.getFile());\n for (File configFile : folder.listFiles()) {\n try {\n System.setProperty(\"loadbalancer.conf.file\", configFile.getAbsolutePath());\n LoadBalancerConfiguration.getInstance();\n } finally {\n LoadBalancerConfiguration.clear();\n }\n }\n }", "public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public Config(HG plugin)\r\n/* 38: */ {\r\n/* 39:46 */ if (!new File(plugin.getDataFolder(), \"config.yml\").exists())\r\n/* 40: */ {\r\n/* 41:47 */ Util.log(\"Config not found. Generating default config!\");\r\n/* 42:48 */ plugin.saveDefaultConfig();\r\n/* 43: */ }\r\n/* 44:51 */ config = plugin.getConfig().getRoot();\r\n/* 45:52 */ config.options().copyDefaults(true);\r\n/* 46:53 */ plugin.reloadConfig();\r\n/* 47:54 */ config = plugin.getConfig();\r\n/* 48: */ \r\n/* 49:56 */ spawnmobs = config.getBoolean(\"settings.spawn-mobs\");\r\n/* 50:57 */ spawnmobsinterval = config.getInt(\"settings.spawn-mobs-interval\") * 20;\r\n/* 51:58 */ freeroam = config.getInt(\"settings.free-roam\");\r\n/* 52:59 */ trackingstickuses = config.getInt(\"settings.trackingstick-uses\");\r\n/* 53:60 */ playersfortrackingstick = config.getInt(\"settings.players-for-trackingstick\");\r\n/* 54:61 */ maxchestcontent = config.getInt(\"settings.max-chestcontent\");\r\n/* 55:62 */ teleAtEnd = config.getBoolean(\"settings.teleport-at-end\");\r\n/* 56:63 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 57:64 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 58:65 */ cash = config.getInt(\"reward.cash\");\r\n/* 59:66 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 60:67 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 61:68 */ cash = config.getInt(\"reward.cash\");\r\n/* 62:69 */ breakblocks = config.getBoolean(\"rollback.allow-block-break\");\r\n/* 63:70 */ blocks = config.getIntegerList(\"rollback.editable-blocks\");\r\n/* 64:71 */ randomChest = config.getBoolean(\"random-chest.enabled\");\r\n/* 65:72 */ randomChestInterval = config.getInt(\"random-chest.interval\") * 20;\r\n/* 66:73 */ randomChestMaxContent = config.getInt(\"random-chest.max-chestcontent\");\r\n/* 67:75 */ if (giveReward) {\r\n/* 68: */ try\r\n/* 69: */ {\r\n/* 70:77 */ Vault.setupEconomy();\r\n/* 71: */ }\r\n/* 72: */ catch (NoClassDefFoundError e)\r\n/* 73: */ {\r\n/* 74:79 */ Util.log(\"Unable to setup vault! Rewards will not be given out..\");\r\n/* 75:80 */ giveReward = false;\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:84 */ ItemStack i = new ItemStack(Material.FIREWORK, 64);\r\n/* 79:85 */ FireworkMeta fm = (FireworkMeta)i.getItemMeta();\r\n/* 80:86 */ List<Color> c = new ArrayList();\r\n/* 81:87 */ c.add(Color.ORANGE);\r\n/* 82:88 */ c.add(Color.RED);\r\n/* 83:89 */ FireworkEffect e = FireworkEffect.builder().flicker(true).withColor(c).withFade(c).with(FireworkEffect.Type.BALL_LARGE).trail(true).build();\r\n/* 84:90 */ fm.addEffect(e);\r\n/* 85:91 */ fm.setPower(3);\r\n/* 86:92 */ i.setItemMeta(fm);\r\n/* 87: */ \r\n/* 88:94 */ firework = i;\r\n/* 89: */ }" ]
[ "0.57800233", "0.57373023", "0.5632926", "0.55577695", "0.5421953", "0.53776246", "0.53389955", "0.53361577", "0.53217113", "0.52739555", "0.52634984", "0.5263402", "0.52099794", "0.5196218", "0.51854306", "0.51846653", "0.51769227", "0.5161227", "0.5141727", "0.51278657", "0.5123975", "0.5102054", "0.5095247", "0.5078487", "0.50727266", "0.506792", "0.50469804", "0.50383157", "0.5036631", "0.5034844", "0.50254345", "0.50236326", "0.50223595", "0.502213", "0.5011744", "0.50057745", "0.50040793", "0.49998313", "0.49935287", "0.49915457", "0.49897224", "0.49854746", "0.49781904", "0.4970099", "0.4968501", "0.4958177", "0.4953303", "0.49465665", "0.49428585", "0.49333885", "0.49283832", "0.49191588", "0.4918418", "0.49127144", "0.48992544", "0.48986852", "0.4895544", "0.48953527", "0.48883253", "0.48857933", "0.4885761", "0.488508", "0.48780656", "0.48733926", "0.48710385", "0.48514637", "0.48493555", "0.48443356", "0.48424202", "0.48340684", "0.4831367", "0.48256084", "0.48253974", "0.48192763", "0.4816128", "0.48040318", "0.48031798", "0.4800047", "0.4799833", "0.47996926", "0.47972357", "0.47933292", "0.47926596", "0.47891623", "0.4785491", "0.47843415", "0.47703934", "0.4760591", "0.47599173", "0.47599056", "0.47573793", "0.4751829", "0.47512466", "0.47502735", "0.47500962", "0.47439846", "0.4741774", "0.47403157", "0.47376662", "0.47320956" ]
0.73307705
0
With the two below lines uncommented it resulted in some strange behaviour where if there was a syntax error in the configuration it would delete ALL of the config and just copy the default again. This is obviously not good and could lead to a lot of lost data so until i figure out a solution it will stay like this This may actually be a good solution this.getConfig().options().copyDefaults(true);
public void loadConfig(){ this.saveDefaultConfig(); //this.saveConfig(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void copyDefaults() {\n getConfig().options().copyDefaults(true);\n save();\n }", "public static void resetConfiguration() {\n\t\t// Ignore\n\t}", "void overwriteDefaultConfiguration(Map<String, Object> config);", "public void forceDefaultConfig()\n {\n plugin.saveResource(fileName, true);\n }", "public void fixConfigValues() {\n String cooldown = getConfig().getString(\"Config.Default-Cooldown\");\n if (cooldown.equalsIgnoreCase(\"-1\")) {\n logger.warning(String.format(\"[%s] Patching Config Value\", new Object[]{getDescription().getName()}));\n getConfig().set(\"Config.Default-Cooldown\", \"0\");\n }\n double price = getConfig().getDouble(\"Config.Default-Price\");\n if (price == -1) {\n logger.warning(String.format(\"[%s] Patching Config Value\", new Object[]{getDescription().getName()}));\n getConfig().set(\"Config.Default-Price\", 0);\n }\n int limit = getConfig().getInt(\"Config.Default-Kit-Limit\");\n if (limit == -1) {\n logger.warning(String.format(\"[%s] Patching Config Value\", new Object[]{getDescription().getName()}));\n getConfig().set(\"Config.Default-Kit-Limit\", 0);\n }\n }", "public static void restoreConfig() {\r\n\t\tlong hs = cfg.getHighScore();\r\n\t\tcfg = Config.DEFAULT_CONFIG;\r\n\t\tcfg.setHighScore(hs);\r\n\t\tcfg.save();\r\n\t}", "private static void resetConfiguration(Configuration defaultConfig) {\n new Resources(IEAApp.getInstance().getResources().getAssets(),\n IEAApp.getInstance().getResources().getDisplayMetrics(),\n defaultConfig);\n }", "private void config() {\n\t}", "com.google.protobuf.Any getOldConfig();", "@Override\n\tpublic void setDefaults(ILaunchConfigurationWorkingCopy rootConfiguration) {\n\t}", "private static void applyDefaults(Configuration configuration) {\n // TODO\n }", "void overwriteConfiguration(Map<String, Object> config);", "public GameConfig createDefaultConfig() {\n\n return null;\n }", "@Override\n\tpublic Properties getConfig() {\n\t\treturn null;\n\t}", "public void storeDefaultMassOptions() {\n\t\ttheMassOptions.store(theConfiguration);\n\t}", "public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {\n // No defaults required\n }", "public Config(HG plugin)\r\n/* 38: */ {\r\n/* 39:46 */ if (!new File(plugin.getDataFolder(), \"config.yml\").exists())\r\n/* 40: */ {\r\n/* 41:47 */ Util.log(\"Config not found. Generating default config!\");\r\n/* 42:48 */ plugin.saveDefaultConfig();\r\n/* 43: */ }\r\n/* 44:51 */ config = plugin.getConfig().getRoot();\r\n/* 45:52 */ config.options().copyDefaults(true);\r\n/* 46:53 */ plugin.reloadConfig();\r\n/* 47:54 */ config = plugin.getConfig();\r\n/* 48: */ \r\n/* 49:56 */ spawnmobs = config.getBoolean(\"settings.spawn-mobs\");\r\n/* 50:57 */ spawnmobsinterval = config.getInt(\"settings.spawn-mobs-interval\") * 20;\r\n/* 51:58 */ freeroam = config.getInt(\"settings.free-roam\");\r\n/* 52:59 */ trackingstickuses = config.getInt(\"settings.trackingstick-uses\");\r\n/* 53:60 */ playersfortrackingstick = config.getInt(\"settings.players-for-trackingstick\");\r\n/* 54:61 */ maxchestcontent = config.getInt(\"settings.max-chestcontent\");\r\n/* 55:62 */ teleAtEnd = config.getBoolean(\"settings.teleport-at-end\");\r\n/* 56:63 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 57:64 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 58:65 */ cash = config.getInt(\"reward.cash\");\r\n/* 59:66 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 60:67 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 61:68 */ cash = config.getInt(\"reward.cash\");\r\n/* 62:69 */ breakblocks = config.getBoolean(\"rollback.allow-block-break\");\r\n/* 63:70 */ blocks = config.getIntegerList(\"rollback.editable-blocks\");\r\n/* 64:71 */ randomChest = config.getBoolean(\"random-chest.enabled\");\r\n/* 65:72 */ randomChestInterval = config.getInt(\"random-chest.interval\") * 20;\r\n/* 66:73 */ randomChestMaxContent = config.getInt(\"random-chest.max-chestcontent\");\r\n/* 67:75 */ if (giveReward) {\r\n/* 68: */ try\r\n/* 69: */ {\r\n/* 70:77 */ Vault.setupEconomy();\r\n/* 71: */ }\r\n/* 72: */ catch (NoClassDefFoundError e)\r\n/* 73: */ {\r\n/* 74:79 */ Util.log(\"Unable to setup vault! Rewards will not be given out..\");\r\n/* 75:80 */ giveReward = false;\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:84 */ ItemStack i = new ItemStack(Material.FIREWORK, 64);\r\n/* 79:85 */ FireworkMeta fm = (FireworkMeta)i.getItemMeta();\r\n/* 80:86 */ List<Color> c = new ArrayList();\r\n/* 81:87 */ c.add(Color.ORANGE);\r\n/* 82:88 */ c.add(Color.RED);\r\n/* 83:89 */ FireworkEffect e = FireworkEffect.builder().flicker(true).withColor(c).withFade(c).with(FireworkEffect.Type.BALL_LARGE).trail(true).build();\r\n/* 84:90 */ fm.addEffect(e);\r\n/* 85:91 */ fm.setPower(3);\r\n/* 86:92 */ i.setItemMeta(fm);\r\n/* 87: */ \r\n/* 88:94 */ firework = i;\r\n/* 89: */ }", "public void resetConfiguration() {\n\t\tthis.hierarchy.resetConfiguration();\n\t}", "public Conf() {\n createIfNotExists = false;\n deleteInputOnSuccess = false;\n }", "@Override\n public Object clone()\n {\n try\n {\n DefaultConfigurationNode copy = (DefaultConfigurationNode) super\n .clone();\n copy.initSubNodes();\n return copy;\n }\n catch (CloneNotSupportedException cex)\n {\n // should not happen\n throw new ConfigurationRuntimeException(\"Cannot clone \" + getClass());\n }\n }", "public void reload() {\n\t\tfileConfiguration = YamlConfiguration.loadConfiguration(configFile);\n\t\tfinal InputStream defaultConfigStream = plugin.getResource(fileName);\n\t\tif (defaultConfigStream != null) {\n\t\t\tfinal Reader defConfigStream = new InputStreamReader(defaultConfigStream, StandardCharsets.UTF_8);\n\t\t\tfinal YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n\t\t\tfileConfiguration.setDefaults(defConfig);\n\t\t}\n\t}", "com.google.protobuf.Any getNewConfig();", "private void setDefaultConfiguration(){\n\t\tthis.setProperty(\"DefaultNodeCapacity\", \"5\");\n\t\tthis.setProperty(\"ReplicaNumber\", \"3\");\n\t\tthis.setProperty(\"JobReattemptTimes\", \"2\");\n\t\tthis.setProperty(\"ReducerCount\", \"3\");\n\t}", "private Map<String, Object> getDefaultConfiguration() {\n JavaFormattingOptions options = JavaFormattingOptions.createDefault();\n options.ClassBraceStyle = BraceStyle.EndOfLine;\n options.InterfaceBraceStyle = BraceStyle.EndOfLine;\n options.EnumBraceStyle = BraceStyle.EndOfLine;\n\n return ProcyonBuilderConfiguration\n .getBuilderConfiguration()\n .uploadClassReference(true)\n .excludeNestedTypes(false)\n .flattenSwitchBlocks(true)\n .forceExplicitImports(true)\n .forceExplicitTypeArguments(true)\n .setLanguage(new JavaLanguage())\n .setByteCodeOutputOptions(new BytecodeOutputOptions())\n .setJavaFormatterOptions(options)\n .showSyntheticMembers(false)\n .alwaysGenerateExceptionVariableForCatchBlocks(true)\n .includeErrorDiagnostics(false)\n .includeLineNumbersInByteCode(false)\n .retainRedundantCasts(false)\n .retainPointlessSwitches(true)\n .unicodeOutputEnabled(true)\n .showDebugLineNumbers(false)\n .mergeVariables(false)\n .simplifyMemberReferences(true)\n .disableForEachTransforms(false)\n .setForceFullyQualifiedReferences(false)\n .getConfiguration();\n }", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "@RestrictTo(Scope.LIBRARY_GROUP)\n protected UseCaseConfig<?> applyDefaults(\n UseCaseConfig<?> userConfig,\n UseCaseConfig.Builder<?, ?, ?> defaultConfigBuilder) {\n\n // If any options need special handling, this is the place to do it. For now we'll just copy\n // over all options.\n for (Option<?> opt : userConfig.listOptions()) {\n @SuppressWarnings(\"unchecked\") // Options/values are being copied directly\n Option<Object> objectOpt = (Option<Object>) opt;\n\n defaultConfigBuilder.getMutableConfig().insertOption(\n objectOpt, userConfig.retrieveOption(objectOpt));\n }\n\n @SuppressWarnings(\n \"unchecked\") // Since builder is a UseCaseConfig.Builder, it should produce a\n // UseCaseConfig\n UseCaseConfig<?> defaultConfig = defaultConfigBuilder.build();\n return defaultConfig;\n }", "@Override\n public boolean hasAdditionalConfig() { return true; }", "@Override\n protected Path getConfigurationPath() {\n return null;\n }", "void overwrite(IConfiguration configuration);", "private void updateConfig(){\n try {\n BeanUtils.copyProperties(config_,newConfig_);//copy the properties of newConfig_ into config_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n }\n }", "public void reConfigure();", "@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}", "@Override\n public void reconfigure()\n {\n }", "public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {\n\r\n\t}", "public void addMissingOptions()\n {\n // Stop execution if auto adding is disabled\n ConfigAPI config = new ConfigAPI(FileType.CONFIG, false, plugin);\n boolean autoAdd = config.getBoolean(\"auto_add_missing_options\");\n if (!autoAdd)\n {\n return;\n }\n\n List<String> missingOptions = getMissingOptionPaths();\n\n String missingMessage;\n if (missingOptions.size() == 0)\n {\n return;\n } else if (missingOptions.size() == 1)\n {\n missingMessage = \"A missing option has been found in \" + fileName + \"!\";\n } else {\n missingMessage = missingOptions.size() + \" Missing options have been found in \" + fileName + \"!\";\n }\n\n ConsoleLogger.logNegative(missingMessage, ChatColor.DARK_RED);\n ConsoleLogger.logNegative(\"Automagically adding missing options...\", ChatColor.DARK_RED);\n\n // Set the defaults and report each setting to the console\n for (String path : missingOptions)\n {\n Object value = defaultConfig.get(path); // Get the default value\n configuration.set(path, value);\n configuration.addDefault(path, value);\n\n // Report to console\n // Change formatting if String\n if (value instanceof String)\n value = \"\\\"\" + value + \"\\\"\";\n\n String newValue = \"\";\n if (value != null)\n newValue = value.toString();\n ConsoleLogger.logNegative(\"Setting \" + path + \" to \" + newValue, ChatColor.RED);\n }\n\n try {\n configuration.save(file);\n } catch (IOException e) {}\n }", "private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}", "protected Config(AFK plugin) {\n this.cfg = plugin.getConfig();\n cfg.options().copyDefaults(true);\n plugin.saveConfig();\n }", "@SuppressWarnings(\"deprecation\")\n @Override\n void setDefaults() {\n //Do nothing\n }", "public Builder clearConfig() {\n if (configBuilder_ == null) {\n config_ = null;\n onChanged();\n } else {\n config_ = null;\n configBuilder_ = null;\n }\n\n return this;\n }", "public static YamlConfiguration copy(String name){\r\n\t\t\tif (!name.endsWith(\".yml\")) {\r\n\t\t\t\tname += \".yml\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tYamlConfiguration config = getConfig(name);\r\n\t\t\t\r\n\t\t\t//Does this config exist?\r\n\t\t\tif (config == null){\r\n\t\t\t\tconfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder()+ \"\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tInputStream defaultStream = plugin.getResource(name);\r\n\t\t\t//does the raw config exist?\r\n\t\t\tif (defaultStream != null){\r\n\t\t\t\t\t\r\n\t\t\t\t//laod the stream into a config\r\n\t\t\t\tYamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defaultStream);\r\n\t\t\t\t\t\r\n\t\t\t\t//add the defaults to the config\r\n\t\t\t\tconfig.addDefaults(defConfig);\r\n\t\t\t\t\t\r\n\t\t\t\t//save the config to disk\r\n\t\t\t\tsaveConfig(name, defConfig);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn config;\r\n\t\t}", "protected void checkConfiguration() {\n \tsuper.checkConfiguration();\n \t\n if (this.customizations == null) {\n this.customizations = new ArrayList<String>();\n }\n if (this.options == null) {\n this.options = new HashMap<String, String>();\n }\n if (this.sourceDirectories == null) {\n \tthis.sourceDirectories = new ArrayList<String>();\n \tthis.sourceDirectories.add(DEFAULT_SOURCE_DIRECTORY);\n }\n }", "public void initialConfig() {\n }", "@Override\n\tpublic void setConfigChanged(boolean changed) {\n\t\t//do nothing\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\t\tFile myObj = null;\n\t\tboolean newConfig = false;\n\t\t\n\t\t// Try to create a new file if one doesn't exist yet\n\t\ttry {\n\t\t myObj = new File(\"config.yml\");\n\t\t if (myObj.createNewFile()) {\n\t\t System.out.println(\"File created: \" + myObj.getName());\n\t\t newConfig = true;\n\t\t } else {\n\t\t System.out.println(\"File already exists.\");\n\t\t }\n\t\t } catch (IOException e) {\n\t\t System.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t }\n\t\t\n\t\t// Start up the writer without resetting the whole config\n\t\tConfigControl configControlInit = new ConfigControl(new YamlReader(new FileReader(\"config.yml\")), null);\n\t\tList<Object> r = configControlInit.getConfigObjects();\n\t\tList<Object> configInit = new ArrayList<Object>();\n\t\tYamlWriter yamlW = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\tfor (Object obj : r) {\n\t\t\tyamlW.write(obj);\n\t\t\tconfigInit.add(r);\n\t\t}\n\t\t\n\t\t// Start up a new config control instance\n\t\tConfigControl configControl = new ConfigControl(new YamlReader(new FileReader(\"config.yml\")), yamlW);\n\t\t\n\t\t// If its a new config, fill it with default values\n\t\tif (newConfig) {\n\t\t\tYamlWriter writer = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\t\tMap<String, String> map = new HashMap<String, String>();\n\t\t\tmap.put(\"token\", null);\n\t\t\tmap.put(\"prefix\", \"!\");\n\t\t\tmap.put(\"ping\", \"pong\");\n\t\t\tmap.put(\"custom\", \"\");\n\t\t\tmap.put(\"anotherexample\", \"Create new lines by typing \\\"&n;\\\"!\");\n\t\t\tmap.put(\"deletethis\", \"To delete a command just erase the command name.\");\n\t\t\tmap.put(\"mention\", \"If you are going to mention, use the '_' to represent a space in the name.\");\n\t\t\tmap.put(\"dm\", \"##DM## Start a command response like so for it to be DM'ed to the author.\");\n\t\t\tmap.put(\"music-channel\", \"*\");\n\t\t\tmap.put(\"mg-channel\", \"*\");\n\t\t\twriter.write(map);\n\t\t\tconfigControl.setWriter(writer);\n\t\t}\n\t\t\n\t\t// Close the writer\n\t\tconfigControl.getWriter().close();\n\t\t\n\t\t/*\n\t\t * UI\n\t\t */\n\t\n\t\t// Initialize some variables that will be useful\n\t\tList<Object> configObj = configControl.getConfigObjects();\n\t\tString prefixChars = \"\";\n\t\tString botToken = \"\";\n\t\tString music = \"\";\n\t\tString tos = \"\";\n\t\tString prof = \"\";\n\t\tHashMap<String, Object> commandList = new HashMap<String, Object>();\n\t\tList<JPanel> commandEntries = new ArrayList<JPanel>();\n\n\t\t// Fill the UI fields with config values\n\t\tfor (Object o : configObj) {\n\t\t\tif (o instanceof HashMap<?, ?>) {\n\t\t\t\tHashMap<String, Object> map = (HashMap<String, Object>) o;\n\t\t\t\tfor (String key : map.keySet()) {\n\t\t\t\t\tif (key.equalsIgnoreCase(\"commands02779\")) continue;\n\t\t\t\t\tif (key.equalsIgnoreCase(\"prefix\")) {\n\t\t\t\t\t\tprefixChars = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"token\")) {\n\t\t\t\t\t\tbotToken = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"music-channel\")) {\n\t\t\t\t\t\tmusic = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"mg-channel\")) {\n\t\t\t\t\t\ttos = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"profanity-filter\")) {\n\t\t\t\t\t\tprof = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcommandList.put(key, map.get(key));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Open the window\n\t\tJFrame frame = ConfigUI.openFirstWindow();\n\t\tContainer content = frame.getContentPane();\n\t\tcontent.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));\n\t\t\n\t\t//Header\n\t\tJPanel header = ConfigUI.addHeader(frame);\n\t\tcontent.add(header, BorderLayout.NORTH);\n\t\t\n\t\t\n\t\t//Token Entry\n\t\tJPanel tokenPanel = ConfigUI.addTokenField(frame, botToken);\n\t\tcontent.add(tokenPanel, BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t//Prefix Entry\n\t\tJPanel prefixPanel = ConfigUI.addPrefixField(frame, prefixChars);\n\t\tcontent.add(prefixPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Music Entry\n\t\tJPanel musicPanel = ConfigUI.addMusicField(frame, music);\n\t\tcontent.add(musicPanel, BorderLayout.SOUTH);\n\t\t\t\t\n\t\t//Minigame Entry\n\t\tJPanel tosPanel = ConfigUI.addTOSField(frame, tos);\n\t\tcontent.add(tosPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Profanity Filter Toggle\n\t\tJPanel profPanel = ConfigUI.addProfanityFilterButton(frame, prof);\n\t\tcontent.add(profPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Custom Commands\n\t\tfor (String key : commandList.keySet()) {\n\t\t\tJPanel newEntry = ConfigUI.customCommandEntry(key, commandList.get(key).toString());\n\t\t\tcontent.add(newEntry);\n\t\t\tcommandEntries.add(newEntry);\n\t\t}\n\t\t\n\t\tJPanel submitCancel = new JPanel();\n\t\t\n\t\t//Add Custom Command Addition Button\n\t\tcontent.add(ConfigUI.addAddButton(frame, content, submitCancel, commandEntries));\n\t\t\n\t\t//Submit Button\n\t\tMouseAdapter submitEvent = new MouseAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) { //This is what happens when the fields are submitted\n\t\t\t\ttry {\n\t\t\t\t\tsuper.mouseClicked(e);\n\t\t\t\t\tYamlWriter yamlW = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\t\t\t\tHashMap<String, Object> newMap = new HashMap<String, Object>();\n\t\t\t\t\tList<String> commands = new ArrayList<String>();\n\t\t\t\t\tString newToken = ConfigUI.getTextFromField(tokenPanel);\n\t\t\t\t\tnewMap.put(\"token\", newToken);\n\t\t\t\t\tString newPrefix = ConfigUI.getTextFromField(prefixPanel);\n\t\t\t\t\tnewMap.put(\"prefix\", newPrefix);\n\t\t\t\t\tString newMusic = ConfigUI.getTextFromField(musicPanel);\n\t\t\t\t\tnewMap.put(\"music-channel\", newMusic);\n\t\t\t\t\tString newTOS = ConfigUI.getTextFromField(tosPanel);\n\t\t\t\t\tnewMap.put(\"mg-channel\", newTOS);\n\t\t\t\t\tJRadioButton profButt = new JRadioButton();\n\t\t\t\t\tfor (Component comp : profPanel.getComponents()) {\n\t\t\t\t\t\tif (comp instanceof JRadioButton) {\n\t\t\t\t\t\t\tprofButt = (JRadioButton) comp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString newProf = profButt.isSelected() + \"\";\n\t\t\t\t\tnewMap.put(\"profanity-filter\", newProf);\n\t\t\t\t\tfor (JPanel custom : commandEntries) {\n\t\t\t\t\t\tString key = null;\n\t\t\t\t\t\tString value = null;\n\t\t\t\t\t\tComponent[] comps = custom.getComponents();\n\t\t\t\t\t\tfor (Component c : comps) {\n\t\t\t\t\t\t\tboolean cont = true;\n\t\t\t\t\t\t\tif (c instanceof JTextField) {\n\t\t\t\t\t\t\t\tString text = ((JTextField) c).getText();\n\t\t\t\t\t\t\t\tif (text.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tcont = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tkey = ((JTextField) c).getText();\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (c instanceof JScrollPane && cont) {\n\t\t\t\t\t\t\t\tvalue = ConfigUI.getTextFromArea((JScrollPane) c);\n\t\t\t\t\t\t\t\tnewMap.put(key, value);\n\t\t\t\t\t\t\t\tcommands.add(key);\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\tnewMap.put(\"commands02779\", commands);\n\t\t\t\t\tyamlW.write(newMap);\n\t\t\t\t\tyamlW.close();\n\t\t\t\t\tVariables.setPrefix(newPrefix);\n\t\t\t\t\tVariables.setMusicChannel(newMusic);\n\t\t\t\t\tVariables.setMinigameChannel(newTOS);\n\t\t\t\t\tVariables.setProfanityEnabled(newProf);\n\t\t\t\t\t\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\t\n\t\t\t\t\tJFrame startingFrame = ConfigUI.openStartingFrame();\n\t\t\t\t\tstartingFrame.pack();\n\n\t\t\t\t\tnew Thread(new Runnable() {\n\n @Override\n public void run() {\n try {\n Thread.sleep(2100);\n } catch (InterruptedException ex) {\n }\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n \tboolean ableToLogin = runBot(newToken);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tstartingFrame.dispose();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tJFrame newFrame = ConfigUI.openRunningFrame(ableToLogin);\n \t\t\t\t\t\t\tnewFrame.pack();\n }\n });\n }\n }).start();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\t\tcontent.add(ConfigUI.addSubmitAndCancel(frame, submitCancel, commandEntries, commandList, submitEvent), BorderLayout.SOUTH);\n\t\t\n\t\t//Scrollbar\n\t\tJScrollPane scroll = new JScrollPane(content, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\t\n\t\tframe.setContentPane(scroll);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tframe.pack();\n\t\t/*\n\t\t * END of the config!!\n\t\t */\n\t}", "private void override() {\n AppSettings.setInstance(\n ConfigFactory.parseMap(newSettingsMap).withFallback(AppSettings.getInstance()));\n }", "private OptimoveConfig() {\n }", "public Builder clearConfigSource() {\n if (configSourceBuilder_ == null) {\n configSource_ = null;\n onChanged();\n } else {\n configSource_ = null;\n configSourceBuilder_ = null;\n }\n\n return this;\n }", "public MinaConfiguration copy() {\n try {\n return (MinaConfiguration) clone();\n } catch (CloneNotSupportedException e) {\n throw new RuntimeCamelException(e);\n }\n }", "@Override\n\tpublic YamlDocumentOptions options() {\n\t\treturn super.options();\n\t}", "private void loadDefaultConfig() {\r\n ResourceBundle bundle = ResourceLoader.getProperties(DEFAULT_CONFIG_NAME);\r\n if (bundle != null) {\r\n putAll(bundle);\r\n } else {\r\n LOG.error(\"Can't load default Scope config from: \" + DEFAULT_CONFIG_NAME);\r\n }\r\n }", "public Builder clearConfig() {\n if (configBuilder_ == null) {\n if (converseRequestCase_ == 1) {\n converseRequestCase_ = 0;\n converseRequest_ = null;\n onChanged();\n }\n } else {\n if (converseRequestCase_ == 1) {\n converseRequestCase_ = 0;\n converseRequest_ = null;\n }\n configBuilder_.clear();\n }\n return this;\n }", "@Override\n\tpublic boolean hasConfigChanged() {\n\t\treturn false;\n\t}", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n\n helpPopulate(defaultIndex);\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}", "Map<String, Object> exportDefaultConfiguration();", "private void saveConfiguration() {\n }", "@Config.HotReload\n@Config.Sources({\n \"classpath:server.properties\",\n \"file:/tmp/test.properties\"})\npublic interface ServerConfig extends Config {\n\n @DefaultValue(\"${FOO_ENV}\")\n int maxThreads();\n\n @Config.DefaultValue(\"5\")\n int myNumber();\n}", "private Config() {\n }", "@Test\n public void testClearPropertyMultipleOtherConfig() throws ConfigurationException {\n final DatabaseConfiguration config = helper.setUpMultiConfig();\n final DatabaseConfiguration config2 = helper.setUpMultiConfig(DatabaseConfiguration.class, CONFIG_NAME2);\n config2.addProperty(\"key1\", \"some test\");\n config.clearProperty(\"key1\");\n assertFalse(config.containsKey(\"key1\"));\n assertTrue(config2.containsKey(\"key1\"));\n }", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "public void reloadFile() {\n if (configuration == null) {\n file = new File(plugin.getDataFolder(), fileName);\n }\n configuration = YamlConfiguration.loadConfiguration(file);\n\n // Look for defaults in the jar\n Reader defConfigStream = null;\n try {\n defConfigStream = new InputStreamReader(plugin.getResource(fileName), \"UTF8\");\n } catch (UnsupportedEncodingException ex) {}\n\n if (defConfigStream != null) {\n YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n configuration.setDefaults(defConfig);\n }\n }", "protected void makeConfigImmutable() {\n final Project project = speedment.getProjectComponent().getProject();\n if (project != null) {\n final Project immutableProject = ImmutableProject.wrap(project);\n speedment.getProjectComponent().setProject(immutableProject);\n }\n }", "void importDefaultConfiguration(Map<String, Object> config);", "private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}", "public Builder clearConfig() {\n bitField0_ = (bitField0_ & ~0x00000001);\n config_ = null;\n if (configBuilder_ != null) {\n configBuilder_.dispose();\n configBuilder_ = null;\n }\n onChanged();\n return this;\n }", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "@Deprecated\n\tpublic static void cleanDefaults(){\n\t}", "@Test\n public void testConfigurationBuilderProviderOverrideProperties()\n throws Exception\n {\n factory.addProperty(\"override.configuration[@fileName]\",\n TEST_FILE.getAbsolutePath());\n factory.addProperty(\"override.configuration[@basePath]\", \"base\");\n factory.addProperty(\"override.configuration[@throwExceptionOnMissing]\",\n \"false\");\n factory.setBasePath(\"conf\");\n factory.setThrowExceptionOnMissing(true);\n DefaultConfigurationBuilder.ConfigurationDeclaration decl =\n new DefaultConfigurationBuilder.ConfigurationDeclaration(\n factory,\n factory.configurationAt(\"override.configuration\"));\n DefaultConfigurationBuilder.ConfigurationBuilderProvider provider =\n new DefaultConfigurationBuilder.ConfigurationBuilderProvider();\n DefaultConfigurationBuilder child =\n (DefaultConfigurationBuilder) provider.createBean(\n provider.fetchConfigurationClass(), decl, null);\n assertEquals(\"Wrong base path\", \"base\", child.getBasePath());\n assertFalse(\"Wrong exception flag\", child.isThrowExceptionOnMissing());\n }", "com.google.protobuf.AnyOrBuilder getOldConfigOrBuilder();", "protected void additionalConfig(ConfigType config){}", "@Test\n @NessieApiVersions(versions = NessieApiVersion.V2)\n void invalidCreateRepositoryConfig() throws Exception {\n api().getConfig();\n\n assumeTrue(fullPagingSupport());\n\n @SuppressWarnings(\"resource\")\n NessieApiV2 api = apiV2();\n\n soft.assertThatThrownBy(\n () ->\n api.updateRepositoryConfig()\n .repositoryConfig(\n GarbageCollectorConfig.builder()\n .defaultCutoffPolicy(\"foo\")\n .newFilesGracePeriod(Duration.of(3, ChronoUnit.HOURS))\n .build())\n .update()\n .getPrevious())\n .isInstanceOf(IllegalArgumentException.class)\n .hasMessageContaining(\"Failed to parse default-cutoff-value\");\n }", "protected Properties configure0() {\n return EMPTY_PROPERTIES;\n }", "@Override\n public String getDefaultConfigName() {\n return defaultConfigFileName;\n }", "private void restoreOriginalDomainConfig() {\n getDASDomainXML().delete();\n report(\"restored-domain\", movedDomXml.renameTo(getDASDomainXML()));\n }", "@Test\n public void testLoadOptionalNonFileBased() throws ConfigurationException\n {\n CombinedConfiguration config = prepareOptionalTest(\"configuration\", false);\n assertTrue(\"Configuration not empty\", config.isEmpty());\n assertEquals(\"Wrong number of configurations\", 0, config\n .getNumberOfConfigurations());\n }", "public void reload() {\n try {\n this.configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(this.getConfigurationFile());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void reloadConfig () {\n if (config == null) {\n if (datafolder == null)\n throw new IllegalStateException();\n config = new File(datafolder, configName);\n }\n this.fileConfiguration = YamlConfiguration.loadConfiguration(config);\n }", "@Override\n public Map<String, Object> getConfigParams() {\n return null;\n }", "@Override\n public void checkConfiguration() {\n }", "public void reportMissingOptions()\n {\n // Get the missing configuration options that are not configuration sections\n List<String> missingOptions = getMissingOptionPaths();\n\n // Report to console\n ConsoleCommandSender console = Bukkit.getConsoleSender();\n Console consoleConfig = new Console(plugin);\n\n // Stop execution if settings are added automatically\n ConfigAPI config = new ConfigAPI(FileType.CONFIG, false, plugin);\n boolean autoAdd = config.getBoolean(\"auto_add_missing_options\");\n if (autoAdd)\n {\n return;\n }\n\n if (missingOptions.size() > 0)\n {\n String message1 = \"A missing option has been found in \" + fileName + \"!\";\n String message2 = missingOptions.size() + \" Missing options have been found in \" + fileName + \"!\";\n String message3 = \"Please add the missing option(s) manually or delete this file and perform a reload (/bs reload)\";\n String message4 = \"The default values will be used until then\";\n\n if (consoleConfig.isNegativeRed()) {\n if (missingOptions.size() == 1)\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message1);\n else console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message2);\n\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message3);\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.RED + message4);\n } else {\n if (missingOptions.size() == 1)\n console.sendMessage(\"[BetterSleeping] \" + message1);\n else console.sendMessage(\"[BetterSleeping] \" + message2);\n\n console.sendMessage(\"[BetterSleeping] \" + message3);\n console.sendMessage(\"[BetterSleeping] \" + message4);\n }\n\n ArrayList<String> currentPath = new ArrayList<>();\n currentPath.add(\"\");\n for (String path : missingOptions)\n {\n // Handle value\n Object value = defaultConfig.get(path);\n\n\n // Change formatting if the setting is a String\n if (value instanceof String)\n value = \"\\\"\" + value + \"\\\"\";\n\n\n // Handle path\n String[] sections = path.split(\"\\\\.\"); // Split the path in its sections\n path = \"\"; // Reset the path variable\n\n\n // Remove part of the path that is a deeper level than this setting can possibly be\n if (currentPath.size() > sections.length)\n {\n currentPath.subList(sections.length, currentPath.size()).clear();\n }\n\n\n // Handle subsection logging and indentation\n int index = 0; // Index of the current path level\n String indentation = \"\"; // Indentation for the current level\n for (String section : sections)\n {\n if (index+1 != sections.length) { // Prevents the option name itself to be viewed as part of path\n if (index > currentPath.size() || !currentPath.get(index).equals(section)) // If the current option is in a different subsection\n {\n // Set the path change\n if (index > currentPath.size()) // If index does NOT exist\n {\n // Add to the end of list\n currentPath.add(section);\n } else { // If index DOES exist\n // Replace the element at index\n currentPath.set(index, section);\n // Remove deprecated sub-branches\n currentPath.subList(index, currentPath.size()).clear();\n }\n\n // Print path change\n String message = indentation + \"In subsection: \\'\" + section + \"\\'\";\n if (consoleConfig.isNegativeRed())\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.DARK_RED + message);\n else\n console.sendMessage(\"[BetterSleeping] \" + message);\n }\n\n indentation += \" \";\n index++;\n }\n }\n\n path += \"'\" + sections[0] + \"'\"; // Get the actual setting name\n\n // Print the missing option with its defaul value\n String message = indentation + \"Missing option: \" + path + \" with default value: \" + value;\n if (consoleConfig.isNegativeRed())\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.DARK_RED + message);\n else\n console.sendMessage(\"[BetterSleeping] \" + message);\n }\n } else {\n\n String message = \"No missing options were found in \" + fileName + \"!\";\n\n if (consoleConfig.isPositiveGreen())\n console.sendMessage(\"[BetterSleeping] \" + ChatColor.GREEN + message);\n else\n console.sendMessage(\"[BetterSleeping] \" + message);\n }\n }", "private void restore() {\n AppSettings.setInstance(backupConfig);\n }", "public void loadConfig(){\n \t\tFile configDir = this.getDataFolder();\n \t\tif (!configDir.exists())\n \t\t\tconfigDir.mkdir();\n \n \t\t// Check for existance of config file\n \t\tFile configFile = new File(this.getDataFolder().toString() + \"/config.yml\");\n \t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n \t\t\n \t\t// Adding Variables\n \t\tif(!config.contains(\"Debug\"))\n \t\t{\n \t\t\tconfig.addDefault(\"Debug\", false);\n \t \n \t config.addDefault(\"Worlds\", \"ExampleWorld1, ExampleWorld2\");\n \t\n\t config.addDefault(\"Regions.Residence\", \"ExampleWorld.ExampleResRegion1, ExampleWorld.ExampleResRegion2\");\n \t \n\t config.addDefault(\"Regions.WorldGuard\", \"ExampleWorld.ExampleWGRegion1, ExampleWorld.ExampleWGRegion2\"); \n \t\t}\n \n // Loading the variables from config\n \tdebug = (Boolean) config.get(\"Debug\");\n \tpchestWorlds = (String) config.get(\"Worlds\");\n \tpchestResRegions = (String) config.get(\"Regions.Residence\");\n \tpchestWGRegions = (String) config.get(\"Regions.WorldGuard\");\n \n if(pchestWorlds != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Chests Worlds: \" + pchestWorlds);\n }\n \n if(pchestResRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Residence Regions: \" + pchestResRegions);\n }\n \n if(pchestWGRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All World Guard Regions: \" + pchestWGRegions);\n }\n \n config.options().copyDefaults(true);\n try {\n config.save(configFile);\n } catch (IOException ex) {\n Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, \"Could not save config to \" + configFile, ex);\n }\n }", "@Test\n public void testLoadOptionalChildBuilderSuppressErrorLog()\n throws ConfigurationException\n {\n factory.addProperty(\"override.configuration[@fileName]\",\n OPTIONAL_FILE.getAbsolutePath());\n // a special invocation handler which checks that the warn() method of\n // a logger is not called\n InvocationHandler handler = new InvocationHandler()\n {\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable\n {\n String methodName = method.getName();\n if (methodName.startsWith(\"is\"))\n {\n return Boolean.TRUE;\n }\n if (\"warn\".equals(methodName))\n {\n fail(\"Unexpected log output!\");\n }\n return null;\n }\n };\n factory.setLogger((Log) Proxy.newProxyInstance(getClass()\n .getClassLoader(), new Class[] {\n Log.class\n }, handler));\n factory.getConfiguration(false);\n }", "@Override\n public void setConf(Configuration conf) {\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "private void configInit() {\r\n\t\tconfig = pluginInstance.getConfiguration();\r\n\t\tif (!new File(pluginInstance.getDataFolder().getPath() + File.separator + \"config.yml\")\r\n\t\t\t\t.exists()) {\r\n\t\t\tconfig.setProperty(\"reset-deathloc\", true);\r\n\t\t\tconfig.setProperty(\"use-iConomy\", true);\r\n\t\t\tconfig.setProperty(\"creation-price\", 10.0D);\r\n\t\t\tconfig.setProperty(\"deathtp-price\", 50.0D);\r\n\t\t\tconfig.setProperty(\"allow-tp\", true);\r\n\t\t\tconfig.setProperty(\"maxTombStone\", 0);\r\n\t\t\tconfig.setProperty(\"TombKeyword\", \"[Tomb]\");\r\n\t\t\tconfig.setProperty(\"use-tombAsSpawnPoint\", true);\r\n\t\t\tconfig.setProperty(\"cooldownTp\", 5.0D);\r\n\t\t\tconfig.setProperty(\"reset-respawn\", false);\r\n\t\t\tconfig.setProperty(\"maxDeaths\", 0);\r\n\t\t\tconfig.save();\r\n\t\t\tworkerLog.info(\"Config created\");\r\n\t\t}\r\n\t\tconfig.load();\r\n\t}", "private void updateConfig(DhcpConfig update) {\n if(update == null || update.getConfigs() == null || update.getConfigs().isEmpty()) {\n dhcpManager.setLeaseDuration(DHCPMConstants.DEFAULT_LEASE_TIME);\n dhcpManager.setDefaultDomain(DHCPMConstants.DEFAULT_DOMAIN_NAME);\n return;\n }\n Configs config = update.getConfigs().get(0);\n if(config.getLeaseDuration() != null) {\n dhcpManager.setLeaseDuration(config.getLeaseDuration());\n }\n if(config.getDefaultDomain() != null) {\n dhcpManager.setDefaultDomain(config.getDefaultDomain());\n //TODO: What to do if string is \"\"\n }\n }", "@Override\n\tpublic boolean hasExtraConfigs()\n\t{\n\t\treturn false;\n\t}", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "@Override\n public void configure() {\n }", "private static void deployConfigIfNotexisting() {\n File configurationLocation = new File(STANDARD_CONFIG_LOCATION);\n try {\n if (!configurationLocation.exists()) {\n PdfAsFactory.deployDefaultConfiguration(configurationLocation);\n }\n } catch (Exception e) {\n logger.warn(\"Failed to deploy default confiuration to \"\n + configurationLocation.getAbsolutePath(), e);\n }\n }", "private static void setDefaultConfig() {\n AgentConfig agentConfig = HypertraceConfig.get();\n OpenTelemetryConfig.setDefault(OTEL_EXPORTER, \"zipkin\");\n OpenTelemetryConfig.setDefault(\n OTEL_EXPORTER_ZIPKIN_SERVICE_NAME, agentConfig.getServiceName().getValue());\n OpenTelemetryConfig.setDefault(\n OTEL_PROPAGATORS, toOtelPropagators(agentConfig.getPropagationFormatsList()));\n OpenTelemetryConfig.setDefault(\n OTEL_EXPORTER_ZIPKIN_ENDPOINT, agentConfig.getReporting().getEndpoint().getValue());\n OpenTelemetryConfig.setDefault(\n OTEL_EXPORTER_ZIPKIN_SERVICE_NAME, agentConfig.getServiceName().getValue());\n }", "@Test\n public void testLoadOptionalBuilderForceCreate()\n throws ConfigurationException\n {\n CombinedConfiguration config = prepareOptionalTest(\"configuration\",\n true);\n assertEquals(\"Wrong number of configurations\", 1, config\n .getNumberOfConfigurations());\n assertTrue(\n \"Wrong optional configuration type\",\n config.getConfiguration(OPTIONAL_NAME) instanceof CombinedConfiguration);\n }", "private static ServerConfigPOJO defaultServerConfig() {\n return ServerConfigParser.readServerConfig();\n }", "void config(Config config);", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();" ]
[ "0.6657551", "0.655101", "0.6518097", "0.64848024", "0.6314227", "0.62630284", "0.62521607", "0.6089748", "0.60546637", "0.5978569", "0.5970909", "0.59667355", "0.5928228", "0.59209454", "0.5880974", "0.57963437", "0.57944405", "0.57791483", "0.57779574", "0.5766172", "0.5766139", "0.5757472", "0.57568735", "0.5754032", "0.5745966", "0.5721778", "0.57216126", "0.57192165", "0.5700119", "0.56719726", "0.5670397", "0.56552327", "0.5651086", "0.56499", "0.5642982", "0.56330484", "0.56159645", "0.55689615", "0.55646026", "0.5537341", "0.5520768", "0.5518037", "0.55116504", "0.55090106", "0.55077225", "0.5501146", "0.5482152", "0.5469127", "0.54509926", "0.5444124", "0.5443279", "0.54405284", "0.5427646", "0.54229844", "0.54228705", "0.54190093", "0.541271", "0.540049", "0.5380716", "0.5371447", "0.5361571", "0.53511965", "0.53455853", "0.533561", "0.5314182", "0.5307308", "0.52981085", "0.52950656", "0.52795625", "0.52750117", "0.5271881", "0.5266725", "0.5262329", "0.5251378", "0.5238863", "0.52385086", "0.5230882", "0.5225917", "0.5225677", "0.522527", "0.5220901", "0.5217305", "0.5215127", "0.5213815", "0.521108", "0.52069765", "0.52030355", "0.5202505", "0.5200669", "0.51952475", "0.5194982", "0.51928735", "0.5184029", "0.51822346", "0.51748586", "0.5172601", "0.51725227", "0.51725227", "0.51725227", "0.51725227" ]
0.6156286
7
int maxSize = 0;
public BSearchTree() { this.overallRoot = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaxSize(){\n return maxSize;\n }", "public int maxSize()\n {\n return maxSize;\n }", "public int getMaxSize() {\n return maxSize_;\n }", "public int getMaxSize() {\n return maxSize;\n }", "public int getMaxSize() {\n return maxSize;\n }", "public int getMaxSize() {\n return maxSize;\n }", "public long maxSize() {\n\t\treturn maxSize;\n\t}", "public void setMaxSize(int maxSize) {\n this.maxSize = maxSize;\n }", "public int getMaxSize() {\n return maxSize_;\n }", "public int getMaxSize() {\n return maxSize_;\n }", "int getMaxSize();", "public int getMaxSize() {\n return maxSize_;\n }", "public void setMaxSize(int c) {\n maxSize = c;\n }", "public int getMaxSize()\n {\n return m_MaxSize;\n }", "protected void setMaxSize(int size) {\n maxSize = size;\n }", "public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}", "public int getMaximumSize() {\n return maximumSize;\n }", "@Override\n\tpublic long maxSize() {\n\t\treturn Main.chunkStoreAllocationSize;\n\t}", "@Override\n\t// Return the maximum size of the frontier \n\tpublic int maxSize() {\n\t\treturn maxSize;\n\t}", "public abstract long getMaxSize();", "public synchronized void updateMaxSize(int maxSize) {\n setMaxSize(maxSize);\n }", "public static int size_max() {\n return (8 / 8);\n }", "public int getMaximalSize() {\n return maximalSize;\n }", "public int getSizeLimit() {\n\t\treturn sizeLimit;\n\t}", "public abstract int getMaxIntermediateSize();", "public void setMaxSize(int size) {\n maxSize = size;\n while (size() > maxSize) {\n remove(0);\n }\n }", "private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }", "protected abstract int getMaxDesiredSize();", "@Override\n\tpublic void setWriteQueueMaxSize(int maxSize) {\n\t\t\n\t}", "public int maximumSizeInBytes() {\n return maximumSizeInBytes;\n }", "public int getMaxBufferSize() {\r\n return maxBufferSize;\r\n }", "boolean hasMaxSize();", "public synchronized int getUpperSizeLimit() {\n \t\treturn upper;\n \t}", "public int getMaxBufferSize() {\n return maxBufferSize;\n }", "private void setMaxCacheMemSize(long maxSize) {\n\t\tif ( maxSize < 25 * 1024 ) {\n\t\t\tthrow new IllegalAccessError(\"Cache size must be at least 25 KB (\"+(25*1024)+\" bytes)\");\n\t\t}\n\t\tlog.info(\"setCacheSize(): New cache size: \"+maxSize+\" bytes.\");\n\t\tfinal boolean shrink = this.maxSize > maxSize;\n\t\tthis.maxSize = maxSize;\n\t\tif ( shrink ) {\n\t\t\tpurgeCache(true);\n\t\t}\n\t}", "private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }", "private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }", "public Builder setMaxSize(int value) {\n \n maxSize_ = value;\n onChanged();\n return this;\n }", "public int getMaxUploads() {\n return 0;\r\n }", "@Override\n public int getMaxCapacity() {\n return 156250000;\n }", "int fixedSize();", "public LeetCode346(int size) {\n this.maxSize = size;\n }", "public int getMaxSize(){\n\t\treturn ds.length;\n\t}", "public ByteRingBuffer(int maxSize){\n buffer= new byte[maxSize];\n readIndex = 0;\n writeIndex = -1;\n size=0;\n }", "public int Size(){\n \treturn size;\n\t}", "public int getHighscoreMaxSize() {\n \t\treturn 20;\n \t}", "public void setMaxCapacity(int max) {\n\t\tbuffer = new Object[max];\n\t\tbufferSize = 0;\n\t}", "public int getMaxSize()\r\n\t{\r\n\t\tSystem.out.print(\"The Max size of the Array is \");\r\n\t\treturn MAXSIZE;\r\n\t}", "int getBufferSize();", "public int getMaxLength(){\n return this.maxLength;\n }", "public int getSize(){return _size;}", "int getLimit();", "int getLimit();", "public int size()\n {\n return size; \n }", "public int getMaxValue(){\n\t\treturn maxValue;\n\t}", "public int getMaxValue() {\n return maxValue;\n }", "public int size(){\n return size;\n }", "public Queue(int maxsize){\n this.maxsize=maxsize; // sets the limit\n System.out.println(\"The maxsize was set to \"+maxsize);\n }", "long getMaxFileSizeBytes();", "long getMemLimit();", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "public int size(){\n return size;\n }", "public void setMaxFileSize(int sINGLESIZE) {\n\t\t\r\n\t}", "protected static long getMaxUploadSize() {\n return maxUploadSize;\n }", "public int size(){return n;}", "public BitHistory(int maxSize) {\n mMaxSize = maxSize;\n }", "public boolean isFull(){\r\n return currentSize == maxSize;\r\n }", "int getSize()\n {\n\t return size;\n }", "public static int sizeBits_max() {\n return 8;\n }", "public int getSize(){return this.size;}", "public int getTransactionMaxSize() {\r\n return transactionMaxSize;\r\n }", "int size(){\n return size_ ;\n }", "public int getSize(){\n return size;\n }", "public int size() {\n \t return size;\n }", "public int getSize(){\n return size;\n }", "public int getSize(){\n return size;\n }", "public int getSize(){\n return size;\n }", "public SizeLimitRowMapper(long maxSize){\r\n\t\tthis.maxBytes = maxSize;\r\n\t}", "public Long maxSizeInMegabytes() {\n return this.maxSizeInMegabytes;\n }", "void compact(long maxSize) throws IOException;", "public void setMaxBufferSize(int value) {\n this.maxBufferSize = value;\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(){\n return size;\n }", "@Override\n\tpublic int getMaxSizeX()\n\t{\n\t\treturn 200;\n\t}", "public int getMaxXmlSize()\n {\n return _maxXmlSize;\n }", "@Override\n public void setMaxSize(int maxSize){\n if (maxSize < 0){\n throw new IllegalArgumentException(\"Memory cache size must not be negative\");\n }\n\n this.maxSize = maxSize;\n\n if (maxSize == 0){\n // unlimited cache size\n return;\n }\n\n int cacheSize = this.size();\n if (cacheSize > maxSize){\n // max cache size is less than current cache size\n // delete all object that are out of bound\n ArrayList<K> cacheObjects = new ArrayList<>(this.cache.keySet());\n for (int i = maxSize; i < cacheSize; i++){\n this.delete(cacheObjects.get(i));\n }\n }\n }", "public int size(){\r\n return size;\r\n \r\n }", "public int getBufferSize() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getMaxSizeZ()\n\t{\n\t\treturn 200;\n\t}", "int getMaxSetSize(Object modelID) throws Exception;", "public int size() {\n return size;\n }", "void setMaxValue();", "int getMaxCharSize();", "public int getMaximumValue() {\n/* 359 */ return Math.min(32767, (this.c.getMaximumSize()).width);\n/* */ }", "public HoldingQueue(int maxSize) {\n this.maxSize = maxSize;\n holdingQueue = new ArrayList<Person>(maxSize);\n numPeople = 0;\n }", "public int size(){\r\n return currentSize;\r\n }", "public void setMaxSize(int size) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n maxSize = size;\n if (maxSize != 0 && minSize > maxSize) {\n minSize = maxSize;\n log.warn(\"pool min size set to \" + minSize + \" to stay <= max size\");\n }\n }" ]
[ "0.8402159", "0.8369562", "0.7929585", "0.7853857", "0.7853857", "0.7853857", "0.7803188", "0.77845585", "0.7655413", "0.7655413", "0.7614074", "0.748886", "0.7391712", "0.7370702", "0.7323556", "0.72638524", "0.7230065", "0.7188908", "0.7174448", "0.7110902", "0.70016724", "0.68826884", "0.6859098", "0.6850775", "0.6840738", "0.6760138", "0.6700505", "0.6692395", "0.6684825", "0.66645277", "0.6627932", "0.66157025", "0.660671", "0.6594186", "0.65428233", "0.65423954", "0.65423954", "0.65413696", "0.65244424", "0.651793", "0.6477773", "0.6476595", "0.6470106", "0.6456664", "0.6398819", "0.63967234", "0.63763314", "0.6365921", "0.63656443", "0.63648015", "0.6359282", "0.6355322", "0.6355322", "0.6343578", "0.63421863", "0.6331877", "0.6326661", "0.63256776", "0.63098574", "0.63061655", "0.6302925", "0.63028", "0.6300287", "0.6296403", "0.62891173", "0.62868005", "0.62765443", "0.62698495", "0.6264013", "0.6261386", "0.6253173", "0.62498736", "0.6248428", "0.6246911", "0.6241835", "0.6241835", "0.6241835", "0.6216263", "0.6215357", "0.62153286", "0.62119067", "0.62096184", "0.62096184", "0.62096184", "0.62096184", "0.62096184", "0.62096184", "0.62091625", "0.6203105", "0.6200916", "0.6198786", "0.6189168", "0.6188627", "0.617599", "0.617085", "0.6167388", "0.61563295", "0.61474097", "0.614286", "0.6137777", "0.6134771" ]
0.0
-1
TODO: Write this method. TODO for students: write an iterative method to find the next node in the inorder traversal. Can be used in an iterator.
private BSTNode<E> successor(BSTNode<E> node) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E next() \n {\n \tfor(int i = 0; i < size; i++)\n \t\tif(tree[i].order == next) {\n \t\t\tnext++;\n \t\t\ttree[i].position = i;\n \t\t\treturn tree[i].element;\n \t\t}\n \treturn null;\n }", "public Nodo getnext ()\n\t\t{\n\t\t\treturn next;\n\t\t\t\n\t\t}", "public void inOrderTraverseIterative();", "@Override \r\n\tpublic LLNode<T> next() throws NoSuchElementException{\r\n\t\tLLNode<T> node = nodeptr;\r\n\t\tif (nodeptr == null)\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\tnodeptr = nodeptr.getNext();\r\n\t\treturn node;\r\n\t}", "public Item next() throws XPathException {\n while (true) {\n NodeInfo next = (NodeInfo)iterator.next();\n if (next == null) {\n current = null;\n position = -1;\n return null;\n }\n if (current != null && next.isSameNodeInfo(current)) {\n continue;\n } else {\n position++;\n current = next;\n return current;\n }\n }\n }", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "public void inOrderTraverseRecursive();", "public Node getNext() {\t\t//O(1)\n\t\treturn next;\n\t}", "private Node findNode(int index){\n Node current = start;\n for(int i = 0; i < index; i++){\n current = current.getNext();\n }\n return current;\n }", "private SkipNode<K, V> findNode(Object key) {\n\t\tSkipNode<K, V> nodeOut;\n\t\tnodeOut = headNode;\n\t\twhile (true) {\n\t\t\twhile ((nodeOut.getNext().getKey()) != posInf\n\t\t\t\t\t&& (nodeOut.getNext().getKey()).compareTo((Integer) key) <= 0)\n\t\t\t\tnodeOut = nodeOut.getNext();\n\t\t\tif (nodeOut.getDown() != null)\n\t\t\t\tnodeOut = nodeOut.getDown();\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn nodeOut;\n\t}", "@Override\n public Node next() {\n if (next == null) {\n throw new NoSuchElementException();\n }\n Node current = next;\n next = next.getNextSibling();\n return current;\n }", "Node currentNode();", "public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "void inOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tinOrderTraversal(node.getLeftNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tinOrderTraversal(node.getRightNode());\n\t}", "private void findNext() {\n \tthis.find(true);\n }", "public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "public RBNode nextNode (RBNode x){\r\n\t\t// there are three cases: \r\n\t\t// next node is above x; it is below x; there is no next node\r\n\t\t\r\n\t\t// Case 1: next node is below\r\n\t\tif (x.right != nil) return treeMinimum(x.right);\r\n\t\t\r\n\t\t// Case 2,3: next node is above or there is no next node\r\n\t\telse return firstRightAncestor(x); // returns nil if none exists\r\n\t}", "public Node getNext() { return next; }", "Object getNextElement() throws NoSuchElementException;", "public Node<E> getNext() { return next; }", "@Override\n public E next() throws NoSuchElementException\n {\n if(hasNext() == false)\n {\n throw new NoSuchElementException();\n }\n idx = idx + 1;\n Node theNode = getNth(idx -1);\n left = right;\n right = right.next;\n canRemove = true;\n forward = true;\n return theNode.getElement(); \n }", "public MyNode<? super E> getNext()\n\t{\n\t\treturn this.next;\n\t}", "public void inorder(Node source) {\n inorderRec(source);\n }", "private void updateNextNode(SkiNode head, int nextI, int nextJ, int nextId) {\n\t\tif (!MatrixHelper.isPosValid(nextI, nextJ, map)) {\n\t\t\treturn;\n\t\t}\n\t\tif (head.v <= map[nextI][nextJ]) {\n\t\t\treturn;\n\t\t}\n\t\tif (hMap[nextI][nextJ] != 0) {\n\t\t\thead.level = Math.max(head.level, hMap[nextI][nextJ] + 1);\n\t\t} else {\n\t\t\thead.next[nextId] = new SkiNode(map[nextI][nextJ], nextI, nextJ, head);\n\t\t\tbuildSkiTree(head.next[nextId]);\n\t\t}\n\t}", "public void _next() {\n Object o;\n try {\n o = iter.next();\n } catch (NoSuchElementException e) {\n has_next = 0;\n return;\n }\n // resolve object\n if (o == null) {\n has_next = 1;\n next = null;\n } else if (o instanceof IdentityIF) {\n try {\n o = txn.getObject((IdentityIF)o, true);\n if (o == null) {\n _next();\n } else {\n has_next = 1;\n next = (F) o;\n }\n } catch (Throwable t) {\n has_next = -1;\n next = null;\n }\n } else {\n has_next = 1;\n next = (F) o;\n }\n }", "private void traverseInOrder(BinaryNode<AnyType> curr) {\n\t\tif (curr.left != null) {\n\t\t\ttraverseInOrder(curr.left);\n\t\t}\n\t\tSystem.out.println(curr.element);\n\n\t\t// checking for duplicates\n\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraverseInOrder(curr.right);\n\t\t}\n\t}", "@Override\n\t\tpublic Node next() {\n\t\t\tif (this.next == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tNode element = this.next;\n\t\t\t\tthis.next = (Node) this.next.getNextNode();\n\t\t\t\treturn (Node) element;\n\t\t\t}\n\t\t}", "public ListNode findIndexNode(int index)\n {\n //should probably hande this by throwing an exception when head == null rather than using the if statement.\n if (head != null)\n {\n int counter = 0;\n ListNode iteratorNode = head;\n do\n { \n if (counter + 1 == index)\n {\n return iteratorNode;\n }\n if (iteratorNode.getNext() != null)\n {\n iteratorNode = iteratorNode.getNext();\n counter++;\n }\n } while(counter + 1 <= size);\n }\n return head;\n }", "public int next() {\n TreeNode iter = dq.pop();\n int val = iter.val;\n if(iter.right!=null)\n process(iter.right);\n return val;\n }", "public static Node NextNode(Node curr) {\r\n\t\treturn curr.next;\r\n\t}", "private static boolean inOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the current node, then finally the right child\n else {\n inOrderTraversal(current.getLeftChild());\n inorder.add(current);\n inOrderTraversal(current.getRightChild());\n }\n return true;\n }", "public DNode getNext() { return next; }", "public Node getNext(){\n\t\t\treturn next;\n\t\t}", "public T next(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\tT passed = current;\r\n\t\t\tif ((currentNode.next==endMarker)&&(currentNode.getLast()==current)){\r\n\t\t\t\tcurrentNode = endMarker;\r\n\t\t\t\tcurrent = null;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\r\n\t\t\tif (currentNode.indexOf(current)==currentNode.getArraySize()-1){\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\t\tidx = 0;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\t\r\n\t\t\tidx++;\r\n\t\t\tcurrent = currentNode.get(idx);\r\n\t\t\treturn passed;\r\n\t\t}", "public void traverseIncludeSelf(INext<T> next){\n if(next==null){\n return;\n }\n traverse(this,next,true);\n }", "public Node getNext()\r\n\t{\r\n\t\treturn next;\r\n\t}", "public Node getNext()\r\n\t{\r\n\t\treturn next;\r\n\t}", "public Node getNext(){\n\t\treturn next;\n\t}", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "void inOrderTraversal(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tinOrderTraversal( node.left );\r\n\t\tSystem.out.print( node.value + \" \");\r\n\t\tinOrderTraversal( node.right );\r\n\t}", "public String inOrderTraverse(){\r\n\r\n\t\t//Stack that keeps track of where we go\r\n\t\tStack<BinarySearchTree> traverseStack = new Stack<BinarySearchTree>();\r\n\t\t\r\n\t\t//This is where we want to start\r\n\t\tBinarySearchTree curr = this;\r\n\t\t\r\n\t\t//When true, the string is returned\r\n\t\tBoolean done = false;\r\n\t\t\r\n\t\t//The string to return\r\n\t\tString treeAsString = \"\";\r\n\t\t\r\n\t\t//INORDER: LEFT > ROOT > RIGHT\r\n\r\n\t\twhile(!done){\r\n\t\t\tif(curr != null){\r\n\t\t\t\t\r\n\t\t\t\t//We need to get left first push it onto the stack\r\n\t\t\t\ttraverseStack.push(curr);\r\n\r\n\t\t\t\t//Getting the left first\r\n\t\t\t\tcurr = curr.getLeftChild();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t//curr is null. We checked left.\r\n\t\t\t\tif(!traverseStack.isEmpty()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//pop the stack to get the item\r\n\t\t\t\t\tcurr = traverseStack.pop();\r\n\r\n\t\t\t\t\t//append the item\r\n\t\t\t\t\ttreeAsString += curr.toString() + \" \";\r\n\r\n\t\t\t\t\t//Check the right\r\n\t\t\t\t\tcurr = curr.getRightChild();\r\n\t\t\t\t}\r\n\t\t\t\t//curr was null, the stack was empty, we visited all\r\n\t\t\t\t//of the 'nodes'\r\n\t\t\t\telse{\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn treeAsString;\r\n\t}", "public Node getNext()\n\t{\n\t\treturn next;\n\t}", "public Node getNext()\n\t{\n\t\treturn next;\n\t}", "public MainNode getMainNodeNextPointer(MainNode node) {\n return node.mainNext;\n }", "public Node<E> getNext() {\r\n\t\treturn next;\r\n\t}", "public void inOrder(Node myNode){\n \n if (myNode != null){ //If my node is not null, excute the following\n \n inOrder(myNode.left); //Recurse with left nodes\n System.out.println(myNode.name); //Print node name \n inOrder(myNode.right); //Recurse with right nodes\n \n }\n }", "public T next()\n\t\t{\n\t\t\tif(hasNext())\n\t\t\t{\n\t\t\t\tT currentData = current.getData(); //the data that will be returned\n\t\t\t\t\n\t\t\t\t// must continue to keep track of the Node that is in front of\n\t\t\t\t// the current Node whose data is must being returned , in case\n\t\t\t\t// its nextNode must be reset to skip the Node whose data is\n\t\t\t\t// just being returned\n\t\t\t\tbeforePrevious = previous;\n\t\t\t\t\n\t\t\t\t// must continue keep track of the Node that is referencing the\n\t\t\t\t// data that was just returned in case the user wishes to remove()\n\t\t\t\t// the data that was just returned\n\t\t\t\t\n\t\t\t\tprevious = current; // get ready to point to the Node with the next data value\n\t\t\t\t\n\t\t\t\tcurrent = current.getNext(); // move to next Node in the chain, get ready to point to the next data item in the list\n\t\t\t\t\n\t\t\t\tthis.removeCalled = false;\n\t\t\t\t// it's now pointing to next value in the list which is not the one that may have been removed\n\t\t\t\t\n\t\t\t\treturn currentData;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t}", "public Item next(){\n if(current==null) {\n throw new NoSuchElementException();\n }\n\n Item item = (Item) current.item;\n current=current.next;\n return item;\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\n\t\tNode tempRoot = root;\n\t\tinOrder(tempRoot);\n\t\treturn null;\n\t}", "private void inorder_traversal(Node n, int depth) {\n if (n != null) {\n inorder_traversal(n.left, depth + 1); //add 1 to depth (y coordinate) \n n.xpos = totalNodes++; //x coord is node number in inorder traversal\n n.ypos = depth; // mark y coord as depth\n inorder_traversal(n.right, depth + 1);\n }\n }", "public K next()\n {\n\tif (hasNext()) {\n\t K element = current.data();\n\t current = current.next(0);\n\t return element; \n\t} else {\n\t return null; \n\t}\n }", "public node getNext() {\n\t\t\treturn next;\n\t\t}", "void inorderTraversal(Node node) {\n\t\tif (node != null) {\n\t\t\tinorderTraversal(node.left);\n\t\t\tSystem.out.print(node.data + \" \");\n\t\t\tinorderTraversal(node.right);\n\t\t}\n\t}", "public Node getNext() {\r\n\t\treturn next;\r\n\t}", "private List<T> inOrder(Node<T> curr, List<T> list) { //Time Complexity: O(n)\n if (curr == null) {\n return list;\n }\n inOrder(curr.left, list);\n list.add(curr.data);\n inOrder(curr.right, list);\n return list;\n }", "public Node<S> getNext() { return next; }", "public Item next() throws XPathException {\n curr = base.next();\n if (curr == null) {\n pos = -1;\n } else {\n pos++;\n }\n return curr;\n }", "public Node getNextNode() {\n return nextNode;\n }", "@Override\n\tpublic E next() {\n\t\twhile (curr != null) {\n\t\t\tstack.push(curr);\n\t\t\tcurr = curr.getLeft();\n\t\t}\n\t\n\t\tcurr = stack.pop();\n\t\tTreeNode<E> out = curr;\n\t\tcurr = curr.getRight();\n\t\t\n\t\treturn out.getData();\n\t}", "public Node getNext() {\n\t\treturn next;\n\t}", "public HIR\n getNextExecutableNode();", "public Node<D> getNext(){\n\t\treturn next;\n\t}", "@Override\r\n\t\tpublic Key next() {\n\t\t\tKey i=current.item;\r\n\t\t\tcurrent=current.next;\r\n\t\t\treturn i;\r\n\t\t}", "void traverse2() {\n BTNode node = root, prev = null, next;\n while (node != null) {\n if (prev == node.parent) {\n if (node.left != null) {\n next = node.left;\n }\n else if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else if (prev == node.left) {\n if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else {\n next = node.parent;\n }\n prev = node;\n node = next;\n }\n }", "public Integer next() {\n int next = fringe.pop();\n List list = neighbors(next);\n for(Object a : list){\n currentInDegree[(int)a]--;\n if(currentInDegree[(int)a]==0){\n fringe.push((int)a);\n }\n }\n return next;\n }", "public Iterator<T> inorderIterator() { return new InorderIterator(root); }", "public E next() {\n int index = 0;\n\n // iterating over collections\n for (Collection<E> coll : collectionList) {\n // checking if current collection contains the desired element (i.e. itrCounter falls in coll)\n if (coll.size() <= itrCounter - index)\n // desired index doesn't lie in current collection -> skipping all elements\n index += coll.size();\n // current collection contains desired element\n else {\n // finding desired element; iterating over coll\n for (E element : coll){\n // desired index found -> increment itrCounter and return element\n if (index == itrCounter) {\n itrCounter++;\n return element;\n }\n // desired index not reached yet -> increment index\n else index++;\n }\n }\n }\n // could not find next element\n throw new NoSuchElementException();\n }", "public ListNode<T> getNext();", "public void inorder()\n {\n inorderRec(root);\n }", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public void inorderTraversal() \n { \n inorderTraversal(header.rightChild); \n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "HNode getNextSibling();", "int getNext(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 2);\n\t}", "public Node<E> nextNode() {\n\t\treturn next_node;\n\t}", "public Node<T> getNextNode() {\n\t\treturn nextNode;\n\t}", "@Override\n public T next() {\n T n = null;\n if (hasNext()) {\n // Give it to them.\n n = next;\n next = null;\n // Step forward.\n it = it.next;\n stop -= 1;\n } else {\n // Not there!!\n throw new NoSuchElementException();\n }\n return n;\n }", "public LinearNode<T> getNext() {\r\n\t\t\r\n\t\treturn next;\r\n\t\r\n\t}", "public void inorderTraverse(){\n\t\tinorderHelper(root);\n\t\tSystem.out.println();\n\t}", "void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }", "@Override\n public T next() {\n if (stack.isEmpty()) {\n throw new NoSuchElementException();\n }\n TreeNode<T> node = stack.pop();\n addLeft(node.right);\n return node.value;\n }", "public int findNext(Node root, int key){\n\t\tint res = key;\n\t\twhile(root != nil){\n\t\t\tif(root.id <= key){\n\t\t\t\troot = root.right;\n\t\t\t}\n\t\t\tif(root != nil && root.id > key){\n\t\t\t\tres = root.id;\n\t\t\t\troot=root.left;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn res;\n\t}", "private void inOrder(BSTNode node) {\r\n \r\n // if the node is NOT null, execute the if statement\r\n if (node != null) {\r\n \r\n // go to the left node\r\n inOrder(node.getLeft());\r\n \r\n // visit the node (increment the less than or equal counter)\r\n node.incrementLessThan();\r\n \r\n // go to the right node\r\n inOrder(node.getRight());\r\n }\r\n }", "Node<T> getNext() {\n\t\t\treturn nextNode;\n\t\t}", "@Override\n public Integer next() {\n Integer result = null;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n while (this.currentIterator.hasNext()) {\n return this.currentIterator.next();\n }\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.next();\n }\n return result;\n }", "public Node findInOrderSuccessor() {\n\n return null;\n }", "public Node<T> getNext() {\n\t\treturn next;\n\t}", "public Node<T> getNext()\n\t{\treturn this.next; }", "public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }", "public SimpleNode getNext() {\n return next;\n }", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "public CommitNode getNext(){\r\n\t\treturn next;\r\n\t}", "private List<Node<T>> nodeInOrder (Node<T> curr, List<Node<T>> list) {\n if (curr == null) {\n return list;\n }\n nodeInOrder(curr.left, list);\n list.add(curr);\n nodeInOrder(curr.right, list);\n return list;\n }", "public Node setNextNode(Node node);", "@Override\n public E next() {\n if (this.hasNext()) {\n curr = curr.nextNode;\n return curr.getData();\n }\n else {\n throw new NoSuchElementException();\n }\n }", "public Node getNext() {\n\t\treturn this.next;\n\t}", "private void findPath(int current){\r\n // remove current from OPEN\r\n int index = insideArray(_openSet,current);\r\n if(index == -1){\r\n System.out.println(\"findPath method returns -1.\");\r\n }\r\n _openSet.remove(index);\r\n\r\n // add current to CLOSED\r\n _closedSet.add(current);\r\n\r\n // if current is the target node\r\n if(current == _endIndex){\r\n return;\r\n }\r\n\r\n int neighborNum = _map.get_grid(current).get_neighborNum();\r\n int[] neighbors = _map.get_grid(current).get_neighbors();\r\n\r\n //for each neighbor of the current node\r\n for(int i=0;i<neighborNum;i++){\r\n Grid neighborGrid = _map.get_grid(neighbors[i]);\r\n // if neighbor is not traversable or neighbor is in CLOSED\r\n // SKIP THIS NEIGHBOR\r\n if(!neighborGrid.get_type().equals(\"|\") && insideArray(_closedSet,neighbors[i]) == -1){\r\n int currentNeighborF = neighborGrid.get_Fnum();\r\n int neighborF = findF(neighbors[i]);\r\n if(neighborF < currentNeighborF || insideArray(_closedSet,neighbors[i]) == -1){\r\n neighborGrid.set_Fnum(neighborF);\r\n neighborGrid.set_parent(current);\r\n if(insideArray(_closedSet,neighbors[i]) == -1){\r\n _openSet.add(neighbors[i]);\r\n }\r\n }\r\n }\r\n }\r\n int currentIndex = smallestF();\r\n // RECURSIVE CALL\r\n findPath(_map.get_grid(_openSet.get(currentIndex)).get_index());\r\n }", "public void gotoNext(){\r\n if(curr == null){\r\n return;\r\n }\r\n prev = curr;\r\n curr = curr.link;\r\n }", "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}" ]
[ "0.67537165", "0.6515943", "0.6512486", "0.64567804", "0.64349484", "0.6425918", "0.6413292", "0.6399064", "0.6371191", "0.63320094", "0.6329505", "0.63263524", "0.62661165", "0.6252365", "0.6202397", "0.6197463", "0.6195784", "0.6179704", "0.6173375", "0.6171767", "0.6171188", "0.6154816", "0.6146907", "0.61233914", "0.61175317", "0.6114172", "0.6099751", "0.6099533", "0.60993433", "0.60911876", "0.60837454", "0.6080791", "0.60800016", "0.60627997", "0.6054609", "0.60532624", "0.6045125", "0.6045125", "0.60444164", "0.6042326", "0.60367763", "0.6017632", "0.6014996", "0.6014996", "0.5999936", "0.5995224", "0.5970205", "0.59621674", "0.5952287", "0.59436774", "0.59421045", "0.59339094", "0.59335774", "0.5922469", "0.5917778", "0.5917776", "0.5917237", "0.59095675", "0.5908858", "0.5907995", "0.5902444", "0.59018946", "0.5896861", "0.58927184", "0.58853537", "0.58786726", "0.5877105", "0.58732486", "0.58704907", "0.5868845", "0.5868553", "0.5868337", "0.5865355", "0.5864914", "0.5853235", "0.5845971", "0.58450586", "0.58438337", "0.5841447", "0.5839947", "0.5825267", "0.5823094", "0.5819959", "0.5819852", "0.5817961", "0.5812893", "0.5811361", "0.58016056", "0.5800571", "0.5800193", "0.57949054", "0.57933366", "0.5793011", "0.57896197", "0.5788051", "0.5786889", "0.5786364", "0.5786245", "0.5783005", "0.57780063", "0.57768846" ]
0.0
-1
Does it work? Why or why not?
public void alternateAdd(E value) { alternateAdd(value, overallRoot); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "private void test() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "public boolean method_1456() {\r\n return true;\r\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private final void i() {\n }", "public boolean method_2453() {\r\n return false;\r\n }", "public boolean method_2434() {\r\n return false;\r\n }", "private test5() {\r\n\t\r\n\t}", "public void test5() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void method_4270() {}", "private void m50366E() {\n }", "private static void cajas() {\n\t\t\n\t}", "public boolean method_4088() {\n return false;\n }", "public boolean method_109() {\r\n return true;\r\n }", "public boolean b()\r\n/* 709: */ {\r\n/* 710:702 */ return this.l;\r\n/* 711: */ }", "public abstract Object mo26777y();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public boolean method_4132() {\n return false;\n }", "public void mo38117a() {\n }", "protected boolean func_70041_e_() { return false; }", "private void kk12() {\n\n\t}", "public Object good() {\n\t\treturn \"hyo\";\n\t}", "public void mo21877s() {\n }", "public boolean method_218() {\r\n return false;\r\n }", "public void gored() {\n\t\t\n\t}", "public boolean method_4093() {\n return false;\n }", "public void func_70305_f() {}", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "boolean test() {\n return false; // REPLACE WITH SOLUTION\n }", "public int method_113() {\r\n return 0;\r\n }", "public boolean a()\r\n/* 598: */ {\r\n/* 599:597 */ return this.k;\r\n/* 600: */ }", "private void sub() {\n\n\t}", "public boolean func_145773_az() { return true; }", "public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "private stendhal() {\n\t}", "void mo57277b();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n public void perish() {\n \n }", "public void mo21792Q() {\n }", "public amj p()\r\n/* 543: */ {\r\n/* 544:583 */ return this.f;\r\n/* 545: */ }", "public boolean method_3897() {\r\n return false;\r\n }", "public void m23075a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public boolean method_216() {\r\n return false;\r\n }", "public void mo97908d() {\n }", "public boolean method_4102() {\n return false;\n }", "protected void mo3576c() {\n m9185a(this.this$0.b.getChampIterator());\n }", "public String i() {\n/* 44 */ return this.a.toString();\n/* */ }", "public static void c0() {\n\t}", "@Override\n public int f() {\n return 0;\n }", "public void mo21787L() {\n }", "public abstract void mo70713b();", "public void mo12930a() {\n }", "public int method_209() {\r\n return 0;\r\n }", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public boolean method_194() {\r\n return false;\r\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo21878t() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public boolean i()\r\n/* 46: */ {\r\n/* 47:50 */ return true;\r\n/* 48: */ }", "static int test()\n\t{\n\n\t\treturn 20;\n\t}", "public void mo21779D() {\n }", "protected abstract Set method_1559();", "public boolean method_208() {\r\n return false;\r\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void mo23813b() {\n }", "public boolean c()\r\n/* 36: */ {\r\n/* 37:51 */ return false;\r\n/* 38: */ }", "public boolean method_108() {\r\n return false;\r\n }", "public void mo21825b() {\n }", "@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}", "public static void main(String[] args) {\nSystem.out.println(\"second tricky\");\r\n\t}", "public abstract boolean mo66253b();", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public boolean method_196() {\r\n return false;\r\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public int g()\r\n {\r\n return 1;\r\n }", "public void mo9848a() {\n }", "public boolean c()\r\n/* 56: */ {\r\n/* 57: 77 */ return false;\r\n/* 58: */ }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract boolean mo9234ar();", "public void mo4359a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "public static void thisDemo() {\n\t}", "public abstract String mo13682d();", "public abstract String mo118046b();", "public static void test(){\n\t\tSystem.out.println(a);\n\t}", "@Override\n\tpublic void doIt() {\n\t\t\n\t}", "private void assignment() {\n\n\t\t\t}", "public boolean method_210() {\r\n return false;\r\n }", "@Override\n\tpublic boolean deterministic() {\n\t\treturn true;\n\t}", "@Override\n\tpublic void test() {\n\t\t\n\t}" ]
[ "0.6387611", "0.63795555", "0.5902575", "0.58398324", "0.5714606", "0.5686806", "0.5659182", "0.56525946", "0.56499374", "0.5641624", "0.56333894", "0.5619562", "0.5612214", "0.5605242", "0.5602032", "0.5592749", "0.5586072", "0.55574995", "0.5535791", "0.55238444", "0.552098", "0.5511402", "0.5508232", "0.54986036", "0.5484914", "0.54825544", "0.54822093", "0.5470319", "0.546277", "0.5454839", "0.54433393", "0.543376", "0.54319054", "0.5429263", "0.54264086", "0.54144764", "0.54034877", "0.5399471", "0.53944385", "0.53883684", "0.5387046", "0.5383668", "0.53781563", "0.5370802", "0.5369919", "0.5369124", "0.5368072", "0.5356062", "0.53552336", "0.5353505", "0.53520894", "0.53462577", "0.53200114", "0.5319516", "0.53170943", "0.5314704", "0.5314546", "0.53133965", "0.53056526", "0.5301109", "0.5295211", "0.52910113", "0.52860415", "0.52835816", "0.52735966", "0.52682376", "0.52518064", "0.5251656", "0.5250101", "0.5248715", "0.52482796", "0.5247471", "0.5242268", "0.5234989", "0.52332485", "0.52328455", "0.5227222", "0.5225527", "0.52240336", "0.52230155", "0.5216495", "0.52100605", "0.52028954", "0.51958424", "0.51917577", "0.519057", "0.5190509", "0.5181276", "0.51791114", "0.5177724", "0.5176923", "0.51754284", "0.5166523", "0.51611984", "0.5160517", "0.5158284", "0.51577044", "0.51560676", "0.5155129", "0.5149464", "0.5147493" ]
0.0
-1
Registers a shutdown hook for the Neo4j instance so that it shuts down nicely when the VM exits (even if you "CtrlC" the running application).
private static void registerShutdownHook(final GraphDatabaseService graphDb) { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { graphDb.shutdown(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void registerShutdownHook() {\r\n\t\t// Registers a shutdown hook for the Neo4j instance so that it\r\n\t // shuts down nicely when the VM exits (even if you \"Ctrl-C\" the\r\n\t // running application).\r\n\t Runtime.getRuntime().addShutdownHook( new Thread()\r\n\t {\r\n\t @Override\r\n\t public void run()\r\n\t {\r\n\t _db.shutdown();\r\n\t }\r\n\t } );\r\n\t\t\r\n\t}", "private void registerShutdownHook()\n {\n Runtime.getRuntime().addShutdownHook( new Thread()\n {\n @Override\n public void run()\n {\n db.shutdown();\n }\n } );\n }", "private void registerShutdownHook() {\n Runtime.getRuntime().addShutdownHook(new Thread(\"Metastore Janitor Shutdown Hook\"){\n\n @Override\n public void run() {\n log.info(\"Shutting down all threads\");\n \n synchronized(tasks) {\n for(AbstractDynamoDBTask task : tasks) {\n task.running = false;\n }\n }\n \n synchronized(futures) {\n for(Future future: futures) {\n try {\n future.get();\n } catch (Exception ex) {\n log.error(\"\",ex);\n }\n }\n }\n \n executor.shutdown();\n }\n \n });\n }", "private static void registerShutdownHook(GraphDatabaseService graphDatabaseService,String database ) {\n\t\tRuntime.getRuntime()\n\t\t.addShutdownHook( new Thread() \n\t\t{ \n\t\t\t@Override \n\t\t\tpublic void run() \n\t\t\t{ \n\t\t\t\tSystem.out.println(\"neo4j graph database shutdown hook (\"+database+\")... \"); \n\t\t\t\tgraphDatabaseService.shutdown();\n\t\t\t} \n\t\t} ); \n\t}", "private static void registerShutdownHook( final GraphDatabaseService graphDb )\n {\n Runtime.getRuntime().addShutdownHook( new Thread()\n {\n @Override\n public void run()\n {\n graphDb.shutdown();\n }\n } );\n }", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "private static void registerShutdownHook(final GraphDatabaseService graphDb) {\n\t\tRuntime.getRuntime().addShutdownHook( new Thread()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tgraphDb.shutdown();\n\t\t\t}\n\t\t} );\n\t}", "private void registerShutdownHook(final GraphDatabaseService graphDb) {\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n graphDb.shutdown();\n }\n });\n }", "private static void addShutdownHook() {\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n System.out.println(\"I'm packing my stuff together.\");\n shutdown = true;\n Utility.sleep(WAIT_TIME_TO_SHUTDOWN);\n System.out.println(\"I'm going home.\");\n }\n });\n }", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown()\n {\n // todo\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "public static void shutdown() {\n\t}", "public void shutdown() {\n // no-op\n }", "@Test\n public void testShutdownHook() {\n JVMUtils.closeAtShutdown(() -> {\n });\n }", "public void shutdown() {\n }", "private void addShutdownHook() {\n if (!Boolean.getBoolean(\n org.apache.geode.distributed.internal.InternalDistributedSystem.DISABLE_SHUTDOWN_HOOK_PROPERTY)) {\n Runtime.getRuntime().addShutdownHook(shutdownHook);\n }\n }", "public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "@Override\n\tpublic void shutdown()\n\t{\n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\n\tpublic void shutdown() {\n\t\t\n\t}", "@Override\r\n\tpublic void shutdown() {\n\t\tunRigisterMBean();\r\n\t}", "@Override\n public void shutdown() {\n }", "public void shutdown() {\n\t\t\n\t}", "@Override\n\tpublic void shutdown() {\n\n\t}", "public static void shutdown() {\n\t\t// Ignore\n\t}", "@Override\n public void shutdown()\n {\n // nothing to do\n }", "public void shutdown()\n {\n // nothing to do here\n }", "void shutdown() throws Exception;", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "@Override\n protected void shutdown() {\n super.shutdown();\n // Now perform any other shutdown tasks you need.\n // ...\n }", "public void shutdown() {\n this.isShutdown = true;\n }", "protected abstract void shutdown();", "public void shutdown() {\n // For now, do nothing\n }", "public void shutdown()\r\n\t{\r\n\t\tgraphDb.shutdown();\r\n\t\tSystem.out.println(\"Shutdown-Done!\");\r\n\t}", "@Override\n public void shutdown() {\n log.debug(\"Shutting down Ebean ..\");\n\n // TODO: Verificar si es necesario des-registrar el driver\n this.ebeanServer.shutdown(true, false);\n }", "public void abnormalShutDown() {\n\t}", "@Override\n public void shutdownNow() {\n }", "public void shutdown() {\n shutdown(false);\n }", "@Override\n public void shutDown() {\n }", "public void notifyShutdown();", "@Override\n\t\tprotected void shutdown() {\n\n\t\t}", "protected void shutdown() {\n\r\n }", "public static void shutdown()\n\t{\n\t\tinstance = null;\n\t}", "public void shutdown(IMountShutdownObserver observer) throws RemoteException;", "@Override\r\n\tprotected void shutdownSpecific() {\n\r\n\t}", "@Override\n\tprotected void onShutdown(ApplicationEvent event) {\n\t\t\n\t}", "public void cleanShutDown () {\n shutdown = true;\n }", "@Override\n public void shutdown() {\n // Do nothing.\n }", "public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }", "public void shutdownForUpdate();", "public void shutDown();", "public void shutdown()\n\t{\n\t\ttry\n\t\t{\n\t\t\tsave();\n\t\t\tgetPreparedStatement(\"SHUTDOWN\").executeUpdate();\n\t\t\tgetConnection().close();\n\t\t} \n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly shutdown.\", e);\n\t\t}\n\t}", "public void serverWasShutdown();", "public void shutdownNow() {\n }", "public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}", "public void shutdown() {\r\n System.exit(0);\r\n }", "@Override\n protected void shutDown() {\n }", "public static void shutdown() {\n if(registry != null)\n StandardServiceRegistryBuilder.destroy(registry);\n }", "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "void shutDown();", "public synchronized void terminate () {\n shutdown = true;\n }", "public static void bgfx_shutdown() {\n long __functionAddress = Functions.shutdown;\n invokeV(__functionAddress);\n }", "@AfterClass\n public static void shutdown()\n {\n }", "void prepareForShutdown();", "@Override\n public String shutdown() {\n instance.shutdown();\n return \"ok\";\n }", "public void shutdownSilently() {\n shutdownSilently(true);\n }", "@Override\n public void shutdown() throws PluginException {\n\n }", "public void shutdown() {\n\t\tinternalShutdown();\n\t\tC4JPluginLogging.getDefault().removeLogManager(this); \n\t}", "public void shutDown(){\n sequence128db.shutDown();\n }", "public void shutdown()\n\t{\n\t\t; // do nothing\n\t}", "public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }", "public void shutdown() {\n this.dontStop = false;\n }" ]
[ "0.85333526", "0.7517252", "0.70997673", "0.697069", "0.6885847", "0.68175185", "0.6788956", "0.67598605", "0.66580915", "0.6657607", "0.6657607", "0.6657607", "0.6657607", "0.65998197", "0.6579358", "0.6579358", "0.6579358", "0.65764725", "0.6517159", "0.6493888", "0.6491191", "0.6477884", "0.64742357", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64289415", "0.64268434", "0.64239246", "0.64239246", "0.6390794", "0.6390696", "0.6386504", "0.6345024", "0.6305076", "0.6285383", "0.628096", "0.6273261", "0.6258186", "0.6244011", "0.6244011", "0.6244011", "0.6244011", "0.62332195", "0.618803", "0.6183184", "0.6153776", "0.61419004", "0.6129812", "0.61130065", "0.6069429", "0.605974", "0.6038383", "0.6036542", "0.60014427", "0.59998435", "0.59532607", "0.59477943", "0.5935581", "0.59142077", "0.5905366", "0.5893963", "0.58926827", "0.5888724", "0.5878717", "0.58740175", "0.5868066", "0.5867386", "0.5857822", "0.5848544", "0.5822246", "0.58023816", "0.5777127", "0.57684803", "0.5752322", "0.5743213", "0.5706753", "0.5706684", "0.57061523", "0.568511", "0.56846786", "0.56804746", "0.56803316", "0.56372947", "0.5625874", "0.56233597" ]
0.6705303
9
Metodo que verifica que opcion se ha marcado
public void navegar(Component comp){ for(Funcion fc : funciones) { if(comp.getId().equalsIgnoreCase(String.valueOf(fc.getIdFuncion()))){ cambiarPantalla(fc); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isMostrarBasesDetalle()\r\n/* 592: */ {\r\n/* 593:638 */ return this.mostrarBasesDetalle;\r\n/* 594: */ }", "public boolean isDisponible() {\n if (tipo == CAMINO) return true;\n else return false;\n }", "@Override\n\tpublic void verificar() {\n\t\tsuper.verificar();\n\t}", "public boolean isCorrigeDatosRetencion()\r\n/* 623: */ {\r\n/* 624:696 */ return this.corrigeDatosRetencion;\r\n/* 625: */ }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "@Override\n\tpublic boolean adicionar(Marca marc) {\n\t\treturn marcadao.adicionar(marc);\n\t}", "public boolean esCompuesto() {\n\t\treturn !this.atributos.isEmpty();\n\t}", "public boolean estaEnModoAvion();", "public boolean isPorDescuento();", "boolean isConsomme();", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public boolean isAgregaCC()\r\n/* 364: */ {\r\n/* 365:422 */ return this.agregaCC;\r\n/* 366: */ }", "private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}", "@Override\n\tpublic boolean modificar(Marca marc) {\n\t\treturn marcadao.modificar(marc);\n\t}", "final void checkForComodification() {\n\t}", "public boolean isIndicadorDiscapacidad()\r\n/* 213: */ {\r\n/* 214:390 */ return this.indicadorDiscapacidad;\r\n/* 215: */ }", "private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }", "public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}", "private void verificaData() {\n\t\t\n\t}", "public boolean isPredeterminado()\r\n/* 154: */ {\r\n/* 155:264 */ return this.predeterminado;\r\n/* 156: */ }", "public boolean isMostrarBaseImponible()\r\n/* 602: */ {\r\n/* 603:657 */ return this.mostrarBaseImponible;\r\n/* 604: */ }", "public void verEstadoAmarres() {\n System.out.println(\"****************************************************\");\n for(int posicion = 0; posicion<NUMERO_AMARRES; posicion++) {\n int i = 0;\n boolean posicionEncontrada = false;\n while(!posicionEncontrada && i<alquileres.size()) {\n if(alquileres.get(i)!=null) {\n if(alquileres.get(i).getPosicion()==posicion) {\n System.out.println(\"Amarre [\"+posicion+\"] está ocupado\");\n System.out.println(\"Precio: \" + alquileres.get(i).getCosteAlquiler());\n posicionEncontrada = true;\n }\n }\n i++;\n }\n if(!posicionEncontrada) {\n System.out.println(\"Amarre [\"+posicion+\"] No está ocupado\");\n }\n }\n System.out.println(\"****************************************************\");\n }", "public boolean isIndicadorNuevo()\r\n/* 210: */ {\r\n/* 211:218 */ return this.indicadorNuevo;\r\n/* 212: */ }", "public abstract boolean muere(Casilla cas);", "private boolean validarMezcla() {\n\t\tint grado = nodos.get(0).getGrado();\n\t\tboolean retorno = true;\n\t\tfor (Nodo n : nodos) {\n\t\t\tif (n.getGrado() != grado) {\n\t\t\t\tif (n.getGrado() < grado) {\n\t\t\t\t\tSystem.err.println(\"Error en la mezcla del grafo\");\n\t\t\t\t\tSystem.exit(4321);\n\t\t\t\t} else\n\t\t\t\t\tgrado = n.getGrado();\n\t\t\t}\n\t\t}\n\t\treturn retorno;\n\t}", "public Boolean gorbiernoConPrestamos() {\n if (super.getMundo().getGobierno().getPrestamos().size() > 0)\n return true;\n return false;\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic boolean semelhante(Assemelhavel obj, int profundidade) {\n\t\treturn false;\n\t}", "public boolean attivaPulsanteProsegui(){\n\t\tif(!model.isSonoInAggiornamentoIncasso()){\n\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getOrdinativo() && model.getGestioneOrdinativoStep1Model().getOrdinativo().isFlagCopertura() && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso()!= null && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso().size()>0){\n\t\t\t return true;\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "private boolean esDeMipropiedad(Casilla casilla){\n boolean encontrado = false;\n \n for(TituloPropiedad propiedad: this.propiedades){\n if(propiedad.getCasilla() == casilla){\n encontrado = true;\n break;\n }\n }\n return encontrado; \n }", "private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}", "@Override\r\n\tpublic boolean cadastrar(Loja loja) {\n\t\treturn false;\r\n\t}", "boolean hasIsComplete();", "boolean hasIsComplete();", "public boolean isSetCoResultadoRessonanciaMagnetica() {\n return EncodingUtils.testBit(__isset_bitfield, __CORESULTADORESSONANCIAMAGNETICA_ISSET_ID);\n }", "public boolean esmenor(){\n //este metodo no aplica en la resolución del caso de uso planteado\n //sólo sirve para determinar si el participante es menor de edad para \n //poner como obligatorio el campo nombreTutor de acuerdo a las reglas\n //del negocio.\n return false;\n }", "public abstract boolean isComplete();", "public void verificaDimension()\r\n/* 347: */ {\r\n/* 348:406 */ OrganizacionConfiguracion aux = AppUtil.getOrganizacion().getOrganizacionConfiguracion();\r\n/* 349:407 */ this.agregaCC = false;\r\n/* 350:408 */ if ((\"1\".equals(getDimension())) && (!aux.getNombreDimension1().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension1())) {\r\n/* 351:409 */ this.agregaCC = true;\r\n/* 352:410 */ } else if ((\"2\".equals(getDimension())) && (!aux.getNombreDimension2().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension2())) {\r\n/* 353:411 */ this.agregaCC = true;\r\n/* 354:412 */ } else if ((\"3\".equals(getDimension())) && (!aux.getNombreDimension3().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension3())) {\r\n/* 355:413 */ this.agregaCC = true;\r\n/* 356:414 */ } else if ((\"4\".equals(getDimension())) && (!aux.getNombreDimension4().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension4())) {\r\n/* 357:415 */ this.agregaCC = true;\r\n/* 358:416 */ } else if ((\"5\".equals(getDimension())) && (!aux.getNombreDimension5().equals(\"\")) && (aux.isIndicadorUsoPresupuestoDimension5())) {\r\n/* 359:417 */ this.agregaCC = true;\r\n/* 360: */ }\r\n/* 361: */ }", "@Override\n\tpublic boolean puedoAtacar(ElementoSoldado a) {\n\t\treturn false;\n\t}", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public abstract boolean comprobar(Articulo articulo);", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public void verificarMatriculado() {\r\n\t\ttry {\r\n\t\t\tif (periodo == null)\r\n\t\t\t\tMensaje.crearMensajeERROR(\"ERROR AL BUSCAR PERIODO HABILITADO\");\r\n\t\t\telse {\r\n\t\t\t\tif (mngRes.buscarNegadoPeriodo(getDniEstudiante(), periodo.getPrdId()))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\r\n\t\t\t\t\t\t\t\"Usted no puede realizar una reserva. Para más información diríjase a las oficinas de Bienestar Estudiantil.\");\r\n\t\t\t\telse {\r\n\t\t\t\t\testudiante = mngRes.buscarMatriculadoPeriodo(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\t\tif (estudiante == null) {\r\n\t\t\t\t\t\tMensaje.crearMensajeWARN(\r\n\t\t\t\t\t\t\t\t\"Usted no esta registrado. Para más información diríjase a las oficinas de Bienestar Universitario.\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmngRes.generarEnviarToken(getEstudiante());\r\n\t\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').show();\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error verificar matrícula: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public boolean esArbolVacio() {\n return NodoBinario.esNodoVacio(raiz);\n }", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "public boolean comprobar(){\r\n boolean ind=false;\r\n switch(this.opc){\r\n case 1:\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n if(mfacil[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case 2:\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n if(mmedio[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case 3:\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n if(mdificil[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n return ind;\r\n }", "private boolean jogadorTerminouAVez() {\n return this.terminouVez;\n }", "private boolean verificarMascota(Perro perro, int edad){\n //Propiedades del perro a evaluar\n String raza = perro.getRaza();\n String tamano = perro.getTamano();\n\n boolean bandera = false;\n\n //Si hay un niño pequeño, y se le asigna un perro con tamaño pequeño y no es raza peligrosa\n if (edad < 10 && tamano.equals(\"pequeno\") && verificarRaza(raza))\n bandera = true;\n \n //Si hay un niño grande y se le asigna un perro con tamaño pequeño o mediano y no es raza peligrosa\n else if (18 > edad && edad > 10 && (tamano.equals(\"pequeno\") || tamano.equals(\"mediano\")) && verificarRaza(raza))\n bandera = true;\n\n //Si no hay niños \n else if (edad > 18)\n bandera = true;\n\n //Si la familia no es apta\n else\n bandera = false;\n\n return bandera;\n }", "@Test\r\n public void testVerificaPossibilidade4() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "boolean hasIsPerformOf();", "boolean hasCaz();", "public boolean isSetDescricao() {\n return this.descricao != null;\n }", "public boolean isSetDescricao() {\n return this.descricao != null;\n }", "public boolean isSetDescricao() {\n return this.descricao != null;\n }", "public boolean isSetDescricao() {\n return this.descricao != null;\n }", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public boolean isIndicadorFacturaElectronica()\r\n/* 194: */ {\r\n/* 195:330 */ return this.indicadorFacturaElectronica;\r\n/* 196: */ }", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "boolean hasMission();", "public boolean hayPartidaActiva ()\n {\n return partidaActiva;\n }", "public boolean hasCaz() {\n return caz_ != null;\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 }", "public boolean estavacia(){\n return inicio==null;\n }", "public boolean completed()\r\n {\r\n if(pile.size() == 13)\r\n return true;\r\n return false;\r\n }", "boolean isComplete();", "boolean isComplete();", "public boolean comprobarExistencias(Libro libro){\n return libro.getCantidadCopias() > 0;\n }", "boolean estaAcabado();", "public abstract boolean promulgationDataDefined();", "public void verificaCambioEstado(int op) {\r\n try {\r\n if (Seg.getCodAvaluo() == 0) {\r\n mbTodero.setMens(\"Seleccione un numero de Radicacion\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.setCodAvaluo(Seg.getCodAvaluo());\r\n if (op == 1) {\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').show()\");\r\n } else if (op == 2) {\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').show()\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".verificaCambioEstado()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public abstract boolean esComestible();", "boolean isMetadataComplete();", "boolean puedoHipotecar(Casilla casilla){\n //Para poder hipotecar la casilla tiene que ser propiedad del jugador.\n return this.esDeMipropiedad(casilla);\n }", "@Override\n\tpublic boolean verificarCancelar() {\n\t\treturn true;\n\t}", "private boolean verificarCamposVacios() {\n \n boolean bandera = false; // false = campos no vacios\n \n if(this.jTextFieldDigiteCodigo.getText().equals(\"\") || this.jTextFieldDigiteCodigo.getText().equals(\"Digite Código\"))\n {\n mostrarError(jLabelErrorDigiteCodigo, \"Rellenar este campo\",jTextFieldDigiteCodigo);\n bandera=true;\n }\n return bandera;\n }", "private boolean verificarCliente(int cedulaCliente) {\n for (int i = 0; i < posicionActual; i++) { //Recorre hasta la posicon actual en la que se estan agregando datos, osea en la ultima en que se registro.\n if (getCedulaCliente(i) == cedulaCliente) { //Pregunta si la cedula pasada por parametro exite en la posicon que va recorriendo el for actualmente\n return true; //Si la condicion se da, retorna verdadero para informar que si el cliente si se encuentra\n }\n }\n return false; //si al final no encontro ninguna coincidencia retorna falso para avisar que el cliente no se encuentra registrado\n }", "public boolean isSetMarca() {\r\n return this.marca != null;\r\n }", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "public boolean estaVacia(){\n return inicio == null;\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "boolean hasExtra();", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "boolean isSetIsManaged();", "public boolean isActivo()\r\n/* 144: */ {\r\n/* 145:245 */ return this.activo;\r\n/* 146: */ }", "boolean isSetDesc();", "@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}", "private void verificaNome() {\r\n\t\thasErroNome(nome.getText());\r\n\t\tisCanSave();\r\n\t}", "public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}", "public boolean esVacia(){\r\n return inicio == null;\r\n }", "public int hayGanador() {\n\t\tif(marcador1==2) {\n\t\t\tresultado=1;\n\t\t\treturn 1;\n\t\t}\n\t\telse if(marcador2==2) {\n\t\t\tresultado=2;\n\t\t\treturn 2;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "public boolean asignarMascota(Perro perro){\n boolean bandera = false;\n Persona[] miembros_familia;\n familia_asignada = \"\";\n\n while (!bandera){\n //Recorrer todo el arreglo de Familia\n for (int i = 0; i <= numero_familias; i++){\n //Obtener los miembros de la familia actual \n miembros_familia = familias[i].getMiembros();\n\n //Recorrer cada miembro del arreglo de Persona\n for (int j = 0; j < miembros_familia.length; j++){ \n //Obtener edad del miembro\n int edad = miembros_familia[j].getEdad();\n\n //Verificar si el miembro al que se analiza puede tener la mascota y si esa familia puede tener perro\n if(verificarMascota(perro, edad)){\n if (familias[i].getNumeroMascotas() < 4){\n bandera = true;\n familias[i].setNumeroMascotas();\n familia_asignada = familias[i].getApellido();\n j = miembros_familia.length;\n i = familias.length;\n }\n }\n else{\n j = miembros_familia.length;\n }\n }\n }\n break;\n }\n return bandera;\n }", "public boolean procesarOrdenCompra(OrdenCompra oc) {\n boolean resultado = false;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.agregarOrden(oc);\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n } finally {\n return resultado;\n }\n }", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "@Override\r\n\tpublic boolean lancar(Combativel origem, Combativel alvo) {\r\n DadoVermelho dado = new DadoVermelho();\r\n int valor = dado.jogar();\r\n if(valor < origem.getInteligencia()) {\r\n alvo.defesaMagica(dano);\r\n return true;\r\n }\r\n else {\r\n \tSystem.out.println(\"Voce nao conseguiu usar a magia\");\r\n }\r\n return false;\r\n }", "@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }", "public boolean isComplete();", "@Override\n\tpublic boolean puedoAtacar(ElementoPiedra a) {\n\t\treturn true;\n\t}" ]
[ "0.6376055", "0.6186865", "0.6150627", "0.61410946", "0.6120863", "0.6093805", "0.6084839", "0.6072839", "0.6054224", "0.6020984", "0.6016134", "0.5949652", "0.5940409", "0.5907588", "0.58944243", "0.58914185", "0.5887609", "0.58580714", "0.5839906", "0.5820715", "0.5788777", "0.57862943", "0.5784768", "0.576826", "0.57369107", "0.5724062", "0.56919634", "0.56918156", "0.5675219", "0.5674665", "0.5673408", "0.5650562", "0.5648482", "0.56433165", "0.56433165", "0.56430745", "0.56417525", "0.5634779", "0.5627139", "0.5622075", "0.5612841", "0.56007856", "0.55994207", "0.5595903", "0.5595751", "0.5592545", "0.55879587", "0.5584305", "0.55787206", "0.5577654", "0.5570414", "0.5555771", "0.5555275", "0.5542021", "0.5542021", "0.5542021", "0.5542021", "0.5533158", "0.55327225", "0.55308765", "0.55277103", "0.55243593", "0.5523473", "0.550849", "0.5508368", "0.5506844", "0.55059254", "0.55059254", "0.54991037", "0.54966444", "0.54962236", "0.54890054", "0.54820734", "0.548077", "0.5476803", "0.5475002", "0.5465586", "0.5462993", "0.5455715", "0.5450018", "0.5439122", "0.54320085", "0.54283464", "0.5427044", "0.5425138", "0.5423935", "0.54238546", "0.542378", "0.5419139", "0.5417237", "0.54087454", "0.54016846", "0.5398605", "0.53953385", "0.53927743", "0.5392217", "0.53907937", "0.5387379", "0.53866744", "0.5384627", "0.53836304" ]
0.0
-1
Metodo que asigna al contenedor que ha de cargar
public void cambiarPantalla(Funcion fc) { if(!fc.getPagina().equalsIgnoreCase("")){ contenido.getChildren().clear(); contenedor = (Div) Executions.createComponents(fc.getPagina(), null, null); contenido.appendChild(contenedor); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void cargarBateria() {\n\n\t}", "@Override\n public void eventoCargarData() {\n }", "private void LoadContent()\n {\n \n }", "public String cargarDatos()\r\n/* 137: */ {\r\n/* 138:163 */ limpiar();\r\n/* 139:164 */ return \"\";\r\n/* 140: */ }", "public void LoadContent(){\n }", "public void cargar() \r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString imagen = sudoku.cargar();\r\n\t\t\tactualizarInformacion();\r\n\t\t\tactualizarImagen(imagen);\r\n\t\t\tpack();\r\n\t\t\tpanelOpciones.habilitarBotones();\r\n\t\t\tpanelMovimiento.habilitarBotones();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog( this, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "private void cargarDatos()\n {\n // Pantalla carga\n showProgress(true, mView, mProgressView, getContext());\n Comando login = new LoginComando(KPantallas.PANTALLA_PERFIL);\n String email = UtilUI.getEmail(getContext());\n String password = UtilUI.getPassword(getContext());\n login.ejecutar(email,password);\n }", "@FXML \r\n private void handleIrDescargas() {\r\n \tmain.mostrarVistaDescargarArchivos();\r\n }", "@Override\n\tpublic void cargarInformacion_paciente() {\n\t\tinfoPacientes.cargarInformacion(admision, this,\n\t\t\t\tnew InformacionPacienteIMG() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void ejecutarProceso() {\n\t\t\t\t\t\tif (tbxAccion.getValue().equalsIgnoreCase(\"registrar\")) {\n\n\t\t\t\t\t\t\t// Map<String, Object> parametros = new\n\t\t\t\t\t\t\t// HashMap<String, Object>();\n\t\t\t\t\t\t\t// parametros.put(\"codigo_empresa\", codigo_empresa);\n\t\t\t\t\t\t\t// parametros.put(\"codigo_sucursal\",\n\t\t\t\t\t\t\t// codigo_sucursal);\n\t\t\t\t\t\t\t// parametros.put(\"identificacion\",\n\t\t\t\t\t\t\t// admision.getNro_identificacion());\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\ttoolbarbuttonTipo_historia\n\t\t\t\t\t\t\t\t\t.setLabel(\"Creando historia de Urgencia Odontologica\");\n\t\t\t\t\t\t\tadmision.setPrimera_vez(\"S\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "public void aplicarDescuento();", "public void cargarEpicrisis() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_HC_EPICRISIS,\r\n\t\t\t\t\tIRutas_historia.LABEL_HC_EPICRISIS, parametros);\r\n\t\t}\r\n\r\n\t}", "public void cargarModelo() {\n\t}", "public void ejecutarCargue() {\n String respuesta = null;\n try {\n loggerApp.info(\"Cargues masivos timbres - ejecutar cargue\");\n if (!validarExtension(Constantes.EXTENSIONES_ARCHIVO_EXCEL, file)) {\n abrirModal(\"SARA\", \"Error: El archivo \" + (null == file ? \" \" : file.getName()) + \" no cumple con el formato de extensión válido \" + Constantes.EXTENSIONES_ARCHIVO_EXCEL, null);\n return;\n }\n generarListaData();\n cargarTimbresMasivosObjectContext.setAtributo(\"listaTimbres\", listaData);\n this.servletHelper = new CargarTimbresMasivosServletHelper(sessionLocal, cargarTimbresMasivosObjectContext, objectContext, sessionAjustes, cuadreCifrasSessionLocal, cajeroSession);\n if (this.servletHelper != null) {\n respuesta = servletHelper.obtenerDatos();\n }\n if (respuesta != null && !respuesta.trim().isEmpty()) {\n abrirModal(\"SARA\", respuesta, null);\n }\n } catch (FileStructureException ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", ex.getMessage(), null);\n } catch (Exception ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", Constantes.MSJ_ERROR_INTERNO, null);\n }\n\n }", "private void cargarDatosUsuario() {\n this.textUsuario.setText(this.usuarioCargado.getUsuario());\n this.textContraseña.setText(this.usuarioCargado.getContraseña());\n this.textNombre.setText(this.usuarioCargado.getNombre());\n this.textApellido.setText(this.usuarioCargado.getApellido());\n this.textDocumento.setText(String.valueOf(this.usuarioCargado.getDocumento()));\n this.textTelefono.setText(String.valueOf(this.usuarioCargado.getTelefono()));\n this.textDireccion.setText(this.usuarioCargado.getDireccion());\n this.textoIdUsuairo.setText(String.valueOf(this.usuarioCargado.getId()));\n\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public String cargarDatos()\r\n/* 109: */ {\r\n/* 110:119 */ return null;\r\n/* 111: */ }", "private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "public void cargarOfertas() {\r\n\t\tcoi.clearOfertas();\r\n\t\tController c = gui.getController();\r\n\t\tList<Integer> ofertas = c.ofertanteGetMisOfertas();\r\n\t\tfor (Integer id : ofertas) {\r\n\t\t\tString estado = c.ofertaGetEstado(id);\r\n\t\t\tif (estado.equals(GuiConstants.ESTADO_ACEPTADA) || estado.equals(GuiConstants.ESTADO_CONTRATADA)\r\n\t\t\t\t\t|| estado.equals(GuiConstants.ESTADO_RESERVADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addActiva(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_PENDIENTE) || estado.equals(GuiConstants.ESTADO_PENDIENTE)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOfertaEditable(gui, id);\r\n\t\t\t\tcoi.addPendiente(oferta);\r\n\t\t\t} else if (estado.equals(GuiConstants.ESTADO_RETIRADA)) {\r\n\t\t\t\tPanelOferta oferta = new PanelOferta(gui, id);\r\n\t\t\t\tcoi.addRechazada(oferta);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcoi.repaint();\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tscrollPane.getHorizontalScrollBar().setValue(0);\r\n\t\t\t\tscrollPane.getVerticalScrollBar().setValue(0);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "protected abstract void iniciarModo();", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "private void inicializarFicha(){\n \tTypeface tfBubleGum = Util.fontBubblegum_Regular(this);\n \tTypeface tfBenton = Util.fontBenton_Boo(this);\n \tTypeface tfBentonBold = Util.fontBenton_Bold(this);\n\t\tthis.txtNombre.setTypeface(tfBubleGum);\n\t\tthis.txtDescripcion.setTypeface(tfBenton);\n\t\tthis.lblTitulo.setTypeface(tfBentonBold);\n \tpanelCargando.setVisibility(View.GONE);\n \t\n \t//cargar los datos de las informaciones\n \tif(DataConection.hayConexion(this)){\n \t\tpanelCargando.setVisibility(View.VISIBLE);\n \t\tInfo.infosInterface = this;\n \t\tInfo.cargarInfo(this.app, this.paramIdItem);\n \t}else{\n \t\tUtil.mostrarMensaje(\n\t\t\t\t\tthis, \n\t\t\t\t\tgetResources().getString(R.string.mod_global__sin_conexion_a_internet), \n\t\t\t\t\tgetResources().getString(R.string.mod_global__no_dispones_de_conexion_a_internet) );\n \t}\n }", "public void cargararchivo() throws InterruptedException {\n sleep(1000);\n cargararchivo.click();\n sleep(1000);\n selectDescargas.click();\n sleep(1000);\n selectarchivoEvidencia.click();\n // waitVisibilityOfElement(btnnext);\n /* tomaEvidencia(evidencia,\"PantallaCargadaImagen\");*/\n //btnnext.click();\n }", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String apellido, Date fechaNacimiento, String rutaImagen);", "public void cargarEConcepto() {\n\tevidenciaConcepto = true;\n\tif (conceptoSeleccionado.getOrigen().equals(\n\t OrigenInformacionEnum.CONVENIOS.getValor())) {\n\t idEvidencia = convenioVigenteDTO.getId();\n\t nombreFichero = iesDTO.getCodigo() + \"_\"\n\t\t + convenioVigenteDTO.getId();\n\t}\n\n\ttry {\n\t listaEvidenciaConcepto = institutosServicio\n\t\t .obtenerEvidenciasDeIesPorIdConceptoEIdTabla(\n\t\t iesDTO.getId(), conceptoSeleccionado.getId(),\n\t\t idEvidencia, conceptoSeleccionado.getOrigen());\n\n\t} catch (ServicioException e) {\n\t LOG.log(Level.SEVERE, e.getMessage(), e);\n\t}\n }", "public Encargar() { \n initComponents();\n inicializar();\n \n }", "public void buscarGestor(){\r\n\t\t\r\n\t}", "private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}", "private void cargarContrarreferencia() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& !admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTRAREFERENCIA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTRAREFERENCIA, parametros);\r\n\t\t}\r\n\r\n\t}", "public WebEditar() {\n initComponents();\n this.setLocationRelativeTo(null);\n cargarcomboboxMarcas();\n cargarcomboboxRubros();\n cargarcomboboxMedidas();\n leer_archivo();\n cargardata();\n }", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "private Boolean descargarTodo() {\n\t\t\n\t\tBoolean respuesta;\n\t\trespuesta = true; // Suponemos que no va a ocurrir ningun inconveniente durante la descarga\n\t\tString body;\n\t\tString title;\n\t\tbody = \"Dependiendo de su conexión a Internet, esto podria tomar mucho tiempo.\\n\" +\n\t\t\"Por eso optamos por hacer todas las descargas anted de comenzar a examinar las imágenes.\\n\\n\" +\n\t\t\"Una vez finalizadas las descargas, pasaremos a examinar.\";\n\t\ttitle = \"Download All\";\t\t\t\n\t\tJOptionPane.showConfirmDialog(this, body ,title, JOptionPane.DEFAULT_OPTION ,JOptionPane.INFORMATION_MESSAGE);\n\t\t\n\t\tfor (TemplateCycle fits : this.toDownloadTemplates) {\n\t\t\tthis.taResumen.append(\"\\n Descargando archivo id=\"+fits.getTemplateID()+\" size=\"+fits.getFileSizeDB()+\":\");\n\t\t\tif (fits.Download())\n\t\t\t{\n\t\t\t\tthis.taResumen.append(\"OK\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Si pasamos por aca es porque ocurrio un problema en la descarga y ya no podemos retornar true\n\t\t\t\trespuesta = false;\n\t\t\t\tthis.taResumen.append(\"Problemas en la descarga.\");\n\t\t\t\tthis.taResumen.getParent().repaint();\t\t\t\n\t\t\t\tbody = \"Ocurrio un problema al descargar este archivo. \\n\" +\n\t\t\t\t\"Por favor intente agregando el siguiente DNS a su entorno de red:\\n\\n\" +\n\t\t\t\t\"DNS --> 146.83.9.3\";\n\t\t\t\tJOptionPane.showConfirmDialog(this, body ,title, JOptionPane.DEFAULT_OPTION ,JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}", "@Override\n\tpublic void ejecutar() {\n\t\tcontrolador.resetPartida();\n\n\t}", "public void cargarInformacion()\r\n/* 159: */ {\r\n/* 160:168 */ if (this.indicadorFactura != null)\r\n/* 161: */ {\r\n/* 162:170 */ if (getTipoAnexoSRI().equals(TipoAnexoSRI.ATS.getNombreAbreviado()))\r\n/* 163: */ {\r\n/* 164:171 */ setMostrarBaseImponible(true);\r\n/* 165:172 */ setMostrarBasesDetalle(false);\r\n/* 166: */ }\r\n/* 167: */ else\r\n/* 168: */ {\r\n/* 169:174 */ setMostrarBaseImponible(false);\r\n/* 170:175 */ setMostrarBasesDetalle(true);\r\n/* 171: */ }\r\n/* 172: */ try\r\n/* 173: */ {\r\n/* 174:179 */ this.mensaje = null;\r\n/* 175: */ \r\n/* 176: */ \r\n/* 177:182 */ ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();\r\n/* 178:183 */ HttpSession session = (HttpSession)context.getSession(true);\r\n/* 179:184 */ CompraCajaChica compraCajaChica = (CompraCajaChica)session.getAttribute(\"compraCajaChica\");\r\n/* 180:185 */ FacturaProveedor facturaProveedor = (FacturaProveedor)session.getAttribute(\"facturaProveedor\");\r\n/* 181:186 */ Empresa empresa = null;\r\n/* 182:187 */ if (!this.indicadorFactura.booleanValue())\r\n/* 183: */ {\r\n/* 184:188 */ this.corrigeDatosRetencion = compraCajaChica.getFacturaProveedorSRI().isTraCorregirDatos();\r\n/* 185:189 */ CompraCajaChica ccc = this.servicioCompraCajaChica.cargarDetalle(compraCajaChica.getIdCompraCajaChica());\r\n/* 186:190 */ empresa = ccc.getEmpresa();\r\n/* 187:191 */ this.facturaProveedorSRI = ccc.getFacturaProveedorSRI();\r\n/* 188: */ }\r\n/* 189: */ else\r\n/* 190: */ {\r\n/* 191:193 */ this.corrigeDatosRetencion = facturaProveedor.getFacturaProveedorSRI().isTraCorregirDatos();\r\n/* 192:194 */ FacturaProveedor facProveedor = this.servicioFacturaProveedor.cargarDetalle(Integer.valueOf(facturaProveedor.getId()));\r\n/* 193:195 */ empresa = facProveedor.getEmpresa();\r\n/* 194:196 */ this.facturaProveedorSRI = facProveedor.getFacturaProveedorSRI();\r\n/* 195: */ }\r\n/* 196:200 */ if (empresa != null)\r\n/* 197: */ {\r\n/* 198:201 */ empresa = this.servicioEmpresa.cargarDetalle(empresa);\r\n/* 199:202 */ if (this.facturaProveedorSRI != null)\r\n/* 200: */ {\r\n/* 201:204 */ String email = \"\";\r\n/* 202:205 */ boolean tieneEmail = false;\r\n/* 203:206 */ if ((empresa.getListaContacto() != null) && (!empresa.getListaContacto().isEmpty()))\r\n/* 204: */ {\r\n/* 205:207 */ for (Contacto contacto : empresa.getListaContacto()) {\r\n/* 206:208 */ if ((contacto.getTipoContacto() != null) && (contacto.getTipoContacto().isIndicadorNotificarRetencion()))\r\n/* 207: */ {\r\n/* 208:209 */ if ((contacto.getEmail1() != null) && (!contacto.getEmail1().equals(\"\"))) {\r\n/* 209:210 */ email = email + contacto.getEmail1() + \";\";\r\n/* 210: */ }\r\n/* 211:212 */ if ((contacto.getEmail2() != null) && (!contacto.getEmail2().equals(\"\"))) {\r\n/* 212:213 */ email = email + contacto.getEmail2() + \";\";\r\n/* 213: */ }\r\n/* 214: */ }\r\n/* 215: */ }\r\n/* 216:217 */ if (!email.equals(\"\"))\r\n/* 217: */ {\r\n/* 218:218 */ email = email.substring(0, email.trim().length() - 1).trim();\r\n/* 219:219 */ tieneEmail = true;\r\n/* 220: */ }\r\n/* 221: */ }\r\n/* 222:223 */ if (!tieneEmail)\r\n/* 223: */ {\r\n/* 224:224 */ if ((empresa.getEmail1() != null) && (!empresa.getEmail1().equals(\"\"))) {\r\n/* 225:225 */ email = email + empresa.getEmail1();\r\n/* 226: */ }\r\n/* 227:227 */ if ((empresa.getEmail2() != null) && (!empresa.getEmail2().equals(\"\")))\r\n/* 228: */ {\r\n/* 229:228 */ if (!email.equals(\"\")) {\r\n/* 230:229 */ email = email + \";\";\r\n/* 231: */ }\r\n/* 232:231 */ email = email + empresa.getEmail2();\r\n/* 233: */ }\r\n/* 234: */ }\r\n/* 235:235 */ this.facturaProveedorSRI = this.servicioFacturaProveedorSRI.cargarDetalle(this.facturaProveedorSRI.getIdFacturaProveedorSRI());\r\n/* 236:236 */ this.facturaProveedorSRI.setEmail(email);\r\n/* 237:237 */ this.servicioFacturaProveedorSRI.cargarConceptosRetencion(this.facturaProveedorSRI, empresa);\r\n/* 238:238 */ this.facturaProveedorSRI.setTraCorregirDatos(this.corrigeDatosRetencion);\r\n/* 239:239 */ if ((this.facturaProveedorSRI.getDocumento() == null) && (getListaDocumento().size() > 0)) {\r\n/* 240:240 */ this.facturaProveedorSRI.setDocumento((Documento)this.listaDocumento.get(0));\r\n/* 241: */ }\r\n/* 242:242 */ cargarSecuencia(this.facturaProveedorSRI, AppUtil.getPuntoDeVenta());\r\n/* 243: */ }\r\n/* 244: */ }\r\n/* 245:246 */ if (this.facturaProveedorSRI != null)\r\n/* 246: */ {\r\n/* 247:247 */ this.facturaProveedorSRI.setTraCorregirDatos(this.corrigeDatosRetencion);\r\n/* 248:248 */ if ((!this.corrigeDatosRetencion) && (FuncionesUtiles.getAnio(this.facturaProveedorSRI.getFechaRegistro()) != 9999)) {\r\n/* 249:249 */ this.facturaProveedorSRI.setFechaEmisionRetencion(this.facturaProveedorSRI.getFechaRegistro());\r\n/* 250: */ }\r\n/* 251: */ }\r\n/* 252:252 */ if ((this.facturaProveedorSRI.isIndicadorRetencionEmitida()) && (!this.facturaProveedorSRI.isTraCorregirDatos())) {\r\n/* 253:253 */ this.mensaje = getLanguageController().getMensaje(\"msg_accion_implica_anulacion_previa\");\r\n/* 254: */ }\r\n/* 255: */ }\r\n/* 256: */ catch (ExcepcionAS2 e)\r\n/* 257: */ {\r\n/* 258:256 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 259:257 */ LOG.info(\"ERROR ExcepcionAS2 AL CARGAR DATOS EN FACTURAPROVEEDORSRIBEAN\", e);\r\n/* 260: */ }\r\n/* 261: */ catch (Exception e)\r\n/* 262: */ {\r\n/* 263:260 */ LOG.error(\"ERROR Exception AL CARGAR DATOS EN FACTURAPROVEEDORSRIBEAN \", e);\r\n/* 264:261 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_cargar_datos\"));\r\n/* 265: */ }\r\n/* 266: */ finally\r\n/* 267: */ {\r\n/* 268:264 */ cargarListaTipoComprobanteSRI();\r\n/* 269: */ \r\n/* 270:266 */ cargarListaCreditoTributarioSRI();\r\n/* 271: */ }\r\n/* 272:268 */ this.indicadorFactura = null;\r\n/* 273: */ }\r\n/* 274: */ }", "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "protected void agregarUbicacion(){\n\n\n\n }", "private void cargarRemisiones() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_REMISIONES, \"REMISIONES\", parametros);\r\n\t}", "public void enviarValoresCabecera(){\n }", "public void load() ;", "public void inicializar();", "@Override\n\tpublic void loadCargo() {\n\n\t}", "public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void controladorNuevoProyecto(Controlador controlador){\n this.contCargarImagen = controlador.getCargarImagen();\n nuevoProyecto.setControlFoto(contCargarImagen);\n\n this.contNuevoProyecto = controlador.getNuevoProyecto();\n nuevoProyecto.setControlProponerProyecto(contNuevoProyecto);\n }", "@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}", "public ingresarBiblioteca() {\n initComponents();\n this.nombreUsuario.setText(usuariosID[0].getNombre());\n this.Picture.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.PLAIN,10));\n usuario.insertarInicio(this.nombreUsuario.getText()/*, carpeta*/);\n usuario.obtenerNodo(0).getArchivo().insertarFinal(\"GENERAL\");//carpeta.insertarFinal(\"GENERAL\");\n }", "private void remplirUtiliseData() {\n\t}", "public void load() {\n\t}", "private void cargarControles() {\r\n\t\tc.setLayout(null); //acomodar los objetos como yo quiera\r\n\t\tlbN1.setBounds(10, 10, 280, 30);\r\n\t\tc.add(lbN1); //se asigna al contenedor\r\n\t\t\r\n\t\ttxtN1.setBounds(10, 40, 280,30);\r\n\t\tc.add(txtN1);\r\n\t\t\r\n\t\tlbN2.setBounds(10,80,300,30);\r\n\t\tc.add(lbN2);\r\n\t\ttxtN2.setBounds(10,110, 280,30);\r\n\t\tc.add(txtN2);\r\n\t\t\r\n\t\tbtnCalcular.setBounds(10, 150, 280, 30);\r\n\t\tc.add(btnCalcular);\r\n\t\t\r\n\t\tlbResultado.setBounds(120,180, 280, 30);\r\n\t\tc.add(lbResultado);\r\n\t\t\r\n\t\t//evento en el botón\r\n\t\tbtnCalcular.addActionListener(this);\r\n\t\t\t\r\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}", "public void reiniciar() {\n // TODO implement here\n }", "@Override\n public void onUploadFinish() {\n currentContent = this.loadContent(currentPath);\n populateContentListView(currentContent);\n }", "private void CargaInicial() {\r\n this.setTitle(\"\" + gui.getTitle().concat(\"\").concat(\" - [Modulo: Precio por Producto/Servicio]\"));\r\n }", "public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String[] rutaImagen) throws Exception;", "public void cargarProveedor() {\n\t}", "public void cargarProductosVendidos() {\n try {\n //Lectura de los objetos de tipo productosVendidos\n FileInputStream archivo= new FileInputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosVendidos = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void load() {\n }", "public abstract void loaded();", "private void cargarCodDocente() {\n ClsNegocioDocente negoDoc = new ClsNegocioDocente(); \n txtCodDocente.setText(negoDoc.ObtenerCodigo());\n try {\n negoDoc.conexion.close();\n } catch (SQLException ex) {\n Logger.getLogger(FrmCRUDDocente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void actualizarPorTipoIdentificacion()\r\n/* 686: */ {\r\n/* 687:755 */ cargarListaTipoComprobanteSRI();\r\n/* 688:756 */ cargarListaCreditoTributarioSRI();\r\n/* 689: */ }", "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "protected DataHandler handleDescargar(Long identificador) throws Exception {\n\t\tDataHandler salida=null;\n\t\tString error=\"No se pudo recuperar el DataHandler de la Descarga\";\n\t\ttry {\n\t\t\tString path = getDescargaDao().load(identificador).getPath();\n\t\t\tFile fichero = new File(path);\n\t\t\tlogger.debug(\"Preparando para descargar: El path absoluto es \"+fichero.getAbsolutePath());\n\t\t\tif(fichero.canRead()) {\n\t\t\t\tsalida = new DataHandler(new FileDataSource(path));\n\t\t\t} else {\n\t\t\t\tlogger.debug(error);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(error,e);\n\t\t} \n\t\treturn salida;\n\t}", "private void cargarTarjetaTuberculosis() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_HC_TUBERCULOSIS,\r\n\t\t\t\tIRutas_historia.LABEL_HC_TUBERCULOSIS, parametros);\r\n\t}", "public void LOAD_CUENTASXPAGAR() {\n\t\tFragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r\n//\r\n//\t\tandroid.support.v4.app.Fragment prev = getSupportFragmentManager()\r\n//\t\t\t\t.findFragmentByTag(\"dialog\");\r\n//\t\tif (prev != null) {\r\n//\t\t\ttransaction.remove(prev);\r\n//\t\t}\r\n//\r\n//\t\tBundle msg = new Bundle();\r\n//\t\tmsg.putInt(CuentasPorCobrarFragment.ARG_POSITION, positioncache);\r\n//\t\tmsg.putLong(CuentasPorCobrarFragment.SUCURSAL_ID,\r\n//\t\t\t\titem_selected.getIdSucursal());\r\n//\r\n//\t\ttransaction.addToBackStack(null);\r\n//\t\tcuentasPorCobrar.setArguments(msg);\r\n//\t\tcuentasPorCobrar.show(transaction, \"dialog\");\r\n\t\t\r\n\t\t\r\n\t\tfragmentActive = FragmentActive.CONSULTAR_CUENTA_COBRAR;\r\n\t\tif (findViewById(R.id.fragment_container) != null) \r\n\t\t{\t\r\n\t\t\tcuentasPorCobrar = new CuentasPorCobrarFragment();\t\t\t\t\t\t\r\n\t\t\tBundle msg = new Bundle();\r\n\t\t\tmsg.putInt(CuentasPorCobrarFragment.ARG_POSITION, positioncache);\r\n\t\t\tmsg.putLong(CuentasPorCobrarFragment.SUCURSAL_ID, item_selected.getIdSucursal());\r\n\t\t\tcuentasPorCobrar.setArguments(msg);\t\r\n\t\t\ttransaction = getSupportFragmentManager().beginTransaction();\r\n\t\t\ttransaction.replace(R.id.fragment_container,cuentasPorCobrar);\r\n\t\t\ttransaction.addToBackStack(null);\r\n\t\t\ttransaction.commit();\t\r\n\t\t\tEstablecerMenu(fragmentActive);\r\n\t\t}\r\n\t\t\r\n\t}", "private void onClick_recargar(){\n this.onDestroy();\n ((principal)getActivity()).loadLastFragment();\n }", "public void cargarMedicamento() {\n if (medicamentoSeleccionadoTabla == null) {\r\n imprimirMensaje(\"Error\", \"No se ha seleccionado ningún medicamento de la tabla\", FacesMessage.SEVERITY_ERROR);\r\n return;\r\n }\r\n limpiarFormularioMedicamentos();\r\n medicamentoSeleccionado = medicamentoFacade.find(medicamentoSeleccionadoTabla.getIdMedicamento());\r\n codigoMedicamento = medicamentoSeleccionado.getCodigoMedicamento();\r\n codigoCums = medicamentoSeleccionado.getCodigoCums();\r\n codigoCups = medicamentoSeleccionado.getCodigoCups();\r\n nombreMedicamento = medicamentoSeleccionado.getNombreMedicamento();\r\n nombreGenerico = medicamentoSeleccionado.getNombreGenerico();\r\n nombreComercial = medicamentoSeleccionado.getNombreComercial();\r\n formaMedicamento = medicamentoSeleccionado.getFormaMedicamento();\r\n pos = medicamentoSeleccionado.getPos();\r\n concentracion = medicamentoSeleccionado.getConcentracion();\r\n unidadMedida = medicamentoSeleccionado.getUnidadMedida();\r\n controlMedico = medicamentoSeleccionado.getControlMedico();\r\n registroSanitario = medicamentoSeleccionado.getRegistroSanitario();\r\n modAdmin = medicamentoSeleccionado.getModAdmin();\r\n if (medicamentoSeleccionado.getValor() != null) {\r\n valor = medicamentoSeleccionado.getValor();\r\n }\r\n tituloTabMedicamentos = \"Datos Medicamento: \" + nombreMedicamento;\r\n RequestContext.getCurrentInstance().execute(\"PF('dialogoBuscarMedicamentos').hide();\");\r\n }", "public void cargarImagenes() {\n try {\n\n variedad = sp.getString(\"variedad\", \"\");\n gDia = sp.getFloat(\"gDia\", 0);\n dia = sp.getInt(\"dia\", 0);\n idVariedad = sp.getLong(\"IdVariedad\", 0);\n idFinca = sp.getLong(\"IdFinca\",0);\n\n\n\n imageAdmin iA = new imageAdmin();\n List<fenologiaTab> fi = forGradoloc(dia, gDia, idVariedad);\n\n path = getExternalFilesDir(null) + File.separator;\n String path2 = \"/storage/emulated/0/Pictures/fenologias/\"+idFinca+\"/\";\n\n iA.getImage(path2,jpgView1, idVariedad, fi.get(0).getImagen());\n datos(txt1, fi.get(0).getDiametro_boton(), fi.get(0).getLargo_boton(), fi.get(0).getGrados_dia(), fi.get(0).getImagen());\n\n iA.getImage(path2,jpgView2, idVariedad, fi.get(1).getImagen());\n datos(txt2, fi.get(1).getDiametro_boton(), fi.get(1).getLargo_boton(), fi.get(1).getGrados_dia(), fi.get(1).getImagen());\n\n iA.getImage(path2,jpgView3, idVariedad, fi.get(2).getImagen());\n datos(txt3, fi.get(2).getDiametro_boton(), fi.get(2).getLargo_boton(), fi.get(2).getGrados_dia(), fi.get(2).getImagen());\n\n iA.getImage(path2,jpgView4, idVariedad, fi.get(3).getImagen());\n datos(txt4, fi.get(3).getDiametro_boton(), fi.get(3).getLargo_boton(), fi.get(3).getGrados_dia(), fi.get(3).getImagen());\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"Error \\n\" + e, Toast.LENGTH_LONG).show();\n }\n }", "private void initVistas() {\n // La actividad responderá al pulsar el botón.\n Button btnSolicitar = (Button) this.findViewById(R.id.btnSolicitar);\n btnSolicitar.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n solicitarDatos();\n }\n });\n lblDatos = (TextView) this.findViewById(R.id.lblDatos);\n }", "public void inicializar() {\r\n\t\tthis.bloqueado = false;\r\n\t}", "private static void load(){\n }", "@Override\n public void load() {\n }", "private void inicializarcomponentes() {\n Comunes.cargarJList(jListBecas, becasFacade.getTodasBecasVigentes());\n \n }", "public void cargarProductosComprados() {\n try {\n //Lectura de los objetos de tipo productoComprado\n FileInputStream archivo= new FileInputStream(\"productosComprados\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosComprados = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public static Perro CargarPerro(int capPerro) {\n boolean condicion = false;\r\n int razaPerro, diaIngreso, mesIngreso, anioIngreso, diasDeEstadia;\r\n char generoPerro;\r\n String nombrePerro, nombreCliente, numCliente;\r\n Perro nuevoPerro;\r\n Fecha fechaIngreso;\r\n nuevoPerro = new Perro(codPerro);\r\n System.out.println(\"Ingrese el nombre del perro\");\r\n nombrePerro = TecladoIn.readLine();\r\n nuevoPerro.setNombre(nombrePerro);\r\n\r\n do {\r\n System.out.println(\"Ingrese el Genero de perro : Macho(M),Hembra (H)\");\r\n generoPerro = TecladoIn.readLineNonwhiteChar();\r\n\r\n if (ValidacionDeGenero(generoPerro)) {\r\n nuevoPerro.setGenero(generoPerro);\r\n condicion = true;\r\n } else {\r\n System.out.println(\"Ingrese un Genero Correcto: Macho('M') o Hembra ('H')\");\r\n System.out.println(\".......................................................\");\r\n condicion = false;\r\n }\r\n } while (condicion != true);\r\n\r\n condicion = false;\r\n\r\n do {\r\n MenuRaza();\r\n razaPerro = TecladoIn.readLineInt();\r\n if ((razaPerro > 0) && (razaPerro < 13)) {\r\n nuevoPerro.setRaza(TiposDeRaza(razaPerro - 1));\r\n condicion = true;\r\n } else {\r\n System.out.println(\"Ingrese una raza Correcta del 1 al 12.\");\r\n System.out.println(\".........................................\");\r\n condicion = false;\r\n }\r\n\r\n } while (condicion != true);\r\n condicion = false;\r\n\r\n do {\r\n System.out.println(\"Ingrese una fecha.\\n\"\r\n + \"Ingrese Dia: \");\r\n diaIngreso = TecladoIn.readInt();\r\n System.out.println(\"Ingrese el Mes: \");\r\n mesIngreso = TecladoIn.readLineInt();\r\n System.out.println(\"Ingrese el año: \");\r\n anioIngreso = TecladoIn.readInt();\r\n if (Validaciones.esValidoDatosFecha(diaIngreso, mesIngreso, anioIngreso)) {\r\n fechaIngreso = new Fecha(diaIngreso, mesIngreso, anioIngreso);\r\n nuevoPerro.setFechaIngreso(fechaIngreso);\r\n condicion = true;\r\n } else {\r\n System.out.println(\"Ingrese Una Fecha Correcta: Dia/Mes/Año\");\r\n System.out.println(\"...........................................\");\r\n }\r\n } while (condicion != true);\r\n condicion = false;\r\n\r\n do {\r\n System.out.println(\"Ingrese la Cantidad de estadia:\");\r\n diasDeEstadia = TecladoIn.readLineInt();\r\n if (diasDeEstadia > 0) {\r\n nuevoPerro.setCantDias(diasDeEstadia);\r\n System.out.println(\"Ingrese el Nombre y Apellido del Cliente\");\r\n nombreCliente = TecladoIn.readLine();\r\n nuevoPerro.setNombreDuenio(nombreCliente);\r\n System.out.println(\"Ingrese Numero de telefono\");\r\n numCliente = TecladoIn.readLine();\r\n nuevoPerro.setTelefonoDuenio(numCliente);\r\n codPerro++;\r\n condicion = true;\r\n\r\n } else {\r\n System.out.println(\"Ingrese una cantidad de dias mayor a 0\");\r\n System.out.println(\".........................................\");\r\n condicion = false;\r\n }\r\n\r\n } while (condicion != true);\r\n\r\n return nuevoPerro;\r\n }", "public void cargarNombre() {\n\n System.out.println(\"Indique nombre del alumno\");\n nombre = leer.next();\n nombres.add(nombre);\n\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "@Override\n public void run() {\n\n queryForRoutingManager();\n File f = IMbuffer.fetchFromIMInputBuffer();\n if (f.getName().startsWith(\"Responseto\")) {\n transfertopurge(f);\n }\n }", "private void cargarDatos() {\r\n txtRucDni.setText(objVentas.getObjCliente().getStr_rucdni());\r\n txtCliente.setText(objVentas.getObjCliente().getStr_razonSocial());\r\n txtDocumento.setText(objVentas.getStr_numeroDocumento());\r\n txtMonto.setText(String.valueOf(Util.redondeo(objVentas.getDbTotal(), 2) ));\r\n txtPaga.requestFocus();\r\n setLocationRelativeTo(null);\r\n\r\n String arr[] = objVentas.getStr_numeroDocumento().split(\"-\");\r\n \r\n \r\n \r\n \r\n List<Ventas> listaVentaDetalle = new ArrayList<>();\r\n listaVentaDetalle = PaqueteBusinessDelegate.getFlujoCajaService().\r\n listarVenta(String.valueOf(gui.getLocal().getInt_idLocal()), Util.SINPAGO, objVentas.getStr_numeroDocumento(), 2);\r\n cargarTabla(listaVentaDetalle);\r\n \r\n int cantidadDocumentos;\r\n if (!this.gui.getListaConfig().get(0).getTipoImpresion().equals(Config.TICKETERA)){\r\n //Determinar la cantidad de productos por documentos\r\n cantidadDocumentos=(listaVentaDetalle.size()/10);\r\n log.info(\"Cantidad: \"+cantidadDocumentos);\r\n\r\n if(listaVentaDetalle.size()%10!=0)\r\n cantidadDocumentos++;\r\n }else{\r\n cantidadDocumentos = 1;\r\n }\r\n \r\n \r\n log.info(\"Cantidad: \"+cantidadDocumentos);\r\n \r\n// System.out.println(\"local : \"+objVentas.getObjLocal().getInt_idLocal()+\" tD :\"+arr[2].trim());\r\n txtNroDocumento.setText(PaqueteBusinessDelegate.getVentasService().\r\n consultaSiguinteCorrelativo(objVentas.getObjLocal().getInt_idLocal(), arr[2].trim()));\r\n \r\n// System.out.println(\"consulta : \"+PaqueteBusinessDelegate.getVentasService().\r\n// consultaSiguinteCorrelativo(objVentas.getObjLocal().getInt_idLocal(), arr[2].trim()));\r\n String documento=txtNroDocumento.getText();\r\n String statico=txtNroDocumento.getText().split(\"/\")[0];\r\n// System.out.println(\"estatico : \"+statico);\r\n statico=statico.split(\"-\")[0].concat(\"-\").concat(statico.split(\"-\")[1]).concat(\"-\");\r\n \r\n\r\n if (cantidadDocumentos>1){\r\n for (int i=1;i<cantidadDocumentos;i++){\r\n \r\n if (i<cantidadDocumentos)\r\n documento+=\";\";\r\n \r\n documento+=statico.concat(String.valueOf( Util.stringTOint(\r\n txtNroDocumento.getText().split(\"/\")[0].split(\"-\")[2])+i)).\r\n concat(\"/\").concat(txtNroDocumento.getText().split(\"/\")[1]);\r\n\r\n \r\n log.info(\"NRO: \"+documento);\r\n }\r\n txtNroDocumento.setText(documento);\r\n }\r\n \r\n \r\n \r\n \r\n }", "public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }", "private void cargarTexturas()\n {\n \ttry\n \t{/*\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaC.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaD.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaE.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaF.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaG.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaA.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaB.png\",\n\t getAssets()));\n\t mTextures.add(Texture.cargarTextura(\"texturaTeclaC1.png\",\n\t getAssets()));\n\t */\n \t\tmTextures.add(new Texture(\"texturaTeclaC.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaD.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaE.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaF.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaG.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaA.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaB.png\", getAssets()) );\n \t\tmTextures.add(new Texture(\"texturaTeclaC1.png\", getAssets()) );\n \t} catch(IOException e)\n \t{\n \t\tLog.v(\"ELIMINAR\", \"Fallo en la carga de texturas\");\n \t\te.printStackTrace();\n \t}\n }", "public JefeAvion() {\r\n\t\tsuper(2000, 2, new ImageIcon(url), 1275, 636);\r\n\t\trn = new Random();\r\n\t\tx = 400 - defaultWidth/2;\r\n\t\ty = - defaultHeight;\r\n\t\tdelay = 2;\r\n\t\tint cantTorretasDobles = 8;\r\n\t\tint cantTorretasSimples = 3;\r\n\t\tint cantTorretasInvisibles = 12;\r\n\t\tint cantTorretasGrandes = 6;\r\n\t\t\r\n\t\tString boundsDouble = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasDobles.txt\";\r\n\t\tString boundsSimple = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasSimples.txt\";\r\n\t\tString boundsInvisible = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasInvisibles.txt\";\r\n\t\tString boundsGrande = \"/ProyectoX/img/Enemigo/JefeAvion/posicionesTorretasGrandes.txt\";\r\n\t\t\r\n\t\tinit = System.currentTimeMillis();\r\n\t\tcargarArchivoTorretas(boundsDouble, new FabricaTorretasDobles(), cantTorretasDobles);\r\n\t\tcargarArchivoTorretas(boundsSimple, new FabricaTorretasSimples(), cantTorretasSimples);\r\n\t\tcargarArchivoTorretas(boundsInvisible,new FabricaTorretasInvisibles(), cantTorretasInvisibles);\r\n\t\tcargarArchivoTorretas(boundsGrande,new FabricaTorretasGrandes(), cantTorretasGrandes);\r\n\t\tpuntaje = 500;\r\n\t\tsetearParametrosDefecto(2000, 2, 1275, 636);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "@Override\n\tpublic void darMasaje() {\n\t\t\n\t}", "public void run() {\r\n\t\t\tthis.setName(\"Vista.CacheUploaderDaemon\");\r\n\t\t\tint frac = 0;\r\n\t\t\tint prog = 0; // Progreso de la cola\r\n\t\t\twhile (alive) {\r\n\t\t\t\tif (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tfrac = 100/colaEscritura.size();\r\n\t\t\t\t\tprog = 0;\r\n\t\t\t\t}\r\n\t\t\t\twhile (!colaEscritura.isEmpty()) {\r\n\t\t\t\t\tsetProgreso(\"Actualizando base de datos\", prog);\r\n\t\t\t\t\tprog+=frac;\r\n\t\t\t\t\tElementoCache e = colaEscritura.poll();\r\n\t\t\t\t\tif (e.i==INSERTAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Empleado\" ))\t\tinsertEmpleadoBD((Empleado) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Cuadrante\"))\t\tcontrolador.insertCuadrante((Cuadrante) e.o.get(0)); \t\t\t\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"TurnoContrato\"))\tcontrolador.insertTurnoPorContrato((Integer)e.o.get(0), (Integer)e.o.get(1));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Sugerencia\"))\t\tcontrolador.insertSugerencia((Sugerencia)e.o.get(0));\r\n//\t\t\t\t\t\telse if (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.insertContrato((Contrato) e.o.get(0));\r\n\t\t\t\t\t\t/*else if (e.tipo.equals(\"Departamento\"))\t\tcontrolador.insertDepartamento((Departamento)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"CrearDepartamento\")){ \tcontrolador.insertDepartamentoUsuario((Integer)e.o.get(2),e.o.get(0).toString()); //tabla DepartamentoUsuario\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertNumerosDepartamento((Integer)e.o.get(1),e.o.get(0).toString()); //tabla NumerosDEPARTAMENTOs\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.insertDepartamentoPruebas(e.o.get(0).toString(),(Integer)e.o.get(2)); //tabla DEPARTAMENTO\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Insertar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (e.i==ELIMINAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.eliminaContrato((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.eliminaTurno((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"ContratoConTurnos\"))\tcontrolador.eliminaContratoConTurnos((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.eliminaEmpleado((Integer) e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"eliminaMesTrabaja\")) {\r\n\t\t\t\t\t\t\tArrayList<Object> ar = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaMesTrabaja((Integer)ar.get(0),(Integer)ar.get(1),(Integer)ar.get(2),ar.get(3).toString());\r\n\t\t\t\t\t\t}else if (e.tipo.equals(\"eliminaTurnoDeContrato\")){\r\n\t\t\t\t\t\t\tArrayList<Object> aux = (ArrayList<Object>)e.o.get(0);\r\n\t\t\t\t\t\t\tcontrolador.eliminaTurnoDeContrato((Integer)aux.get(0),(Integer)aux.get(1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Eliminar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(e.i==MODIFICAR) {\r\n\t\t\t\t\t\tif (e.tipo.equals(\"Contrato\"))\t\t\tcontrolador.modificarContrato(((Contrato)e.o.get(0)).getNumeroContrato(), ((Contrato)e.o.get(0)).getTurnoInicial(), ((Contrato)e.o.get(0)).getNombreContrato(), ((Contrato)e.o.get(0)).getPatron() , ((Contrato)e.o.get(0)).getDuracionCiclo(), ((Contrato)e.o.get(0)).getSalario(), ((Contrato)e.o.get(0)).getTipoContrato());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Turno\"))\t\t\tcontrolador.modificarTurno(((Turno)e.o.get(0)).getIdTurno(), ((Turno)e.o.get(0)).getDescripcion(), ((Turno)e.o.get(0)).getHoraEntrada(), ((Turno)e.o.get(0)).getHoraSalida(), ((Turno)e.o.get(0)).getHoraDescanso(), ((Turno)e.o.get(0)).getTDescanso(),((Turno)e.o.get(0)).getColor());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Empleado\"))\t\t\tcontrolador.cambiarEmpleado(((Empleado)e.o.get(0)).getEmplId(), ((Empleado)e.o.get(0)).getNombre(), ((Empleado)e.o.get(0)).getApellido1(), ((Empleado)e.o.get(0)).getApellido2(), ((Empleado)e.o.get(0)).getFechaNac(), ((Empleado)e.o.get(0)).getSexo(), ((Empleado)e.o.get(0)).getEmail(), ((Empleado)e.o.get(0)).getPassword(), ((Empleado)e.o.get(0)).getGrupo(), ((Empleado)e.o.get(0)).getFcontrato(), ((Empleado)e.o.get(0)).getFAlta(), ((Empleado)e.o.get(0)).getFelicidad(), ((Empleado)e.o.get(0)).getIdioma(), ((Empleado)e.o.get(0)).getRango(), ((Empleado)e.o.get(0)).getTurnoFavorito(), ((Empleado)e.o.get(0)).getColor(),((Empleado)e.o.get(0)).getContratoId(), ((Empleado)e.o.get(0)).getPosicion());\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Mensaje\"))\t\t\tcontrolador.marcarMensaje((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\telse if (e.tipo.equals(\"MensajeLeido\"))\t\tcontrolador.setLeido((Mensaje)e.o.get(0));\r\n\t\t\t\t\t\t//else if (e.tipo.equals(\"JefeDepartamento\"))\tcontrolador.modificaDpto(((Departamento)e.o.get(0)).getNombreDepartamento(), ((Departamento)e.o.get(0)).getJefeDepartamento().getEmplId()); \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"NombreDepartamento\")){controlador.cambiaNombreDpto(((ArrayList<String>)e.o.get(0)).get(0),((ArrayList<String>)e.o.get(0)).get(1));}//nombre antiguo,nombre nuevo\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreDepartamentoUsuario(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolador.cambiaNombreNumerosDEPARTAMENTOs(e.o.get(0).toString(),e.o.get(1).toString());\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\telse if (e.tipo.equals(\"Trabaja\"))\t\t\tcontrolador.modificaTrabaja(((Trabaja)e.o.get(0)).getIdEmpl(), ((Trabaja)e.o.get(0)).getIdTurno(), (String)e.o.get(1));\r\n\t\t\t\t\t\t//TODO quitar esto\r\n\t\t\t\t\t\telse System.err.println(\"Error en cache - Modificar \"+e.tipo+\" no existe\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetProgreso(\"Actualizando base de datos\", 100);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsleep(1000);\r\n\t\t\t\t} catch (Exception e) {};\r\n\t\t\t}\r\n\t\t}", "@PostConstruct\n public void CargarTimbresMasivosBean() {\n try {\n objectContext = cargarComponenteAjaxObjectContext();\n loggerApp = objectContext.getConfigApp().loggerApp;\n cargarTimbresMasivosObjectContext = new CargarTimbresMasivosObjectContext(getRequestFaces(), getResponseFaces());\n if (objectContext != null) {\n init();\n }\n } catch (Exception ex) {\n abrirModal(\"SARA\", \"Error\", ex);\n }\n }", "private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "private void cargarDatosParaMapa() {\r\n\tpd = ProgressDialog.show(ListaRutasActivity.this, \"\",\r\n\t\t\"Cargando Datos...\", true);\r\n\r\n\tThread hiloDibujar = new Thread(new Runnable() {\r\n\r\n\t public void run() {\r\n\t\tArrayList<Puntos> listaPuntos;\r\n\t\tArrayList<Paradas> listaParadas;\r\n\r\n\t\ttry {\r\n\t\t mapa = new Intent(ListaRutasActivity.this,\r\n\t\t\t ViewMapaActivity.class);\r\n\t\t listaPuntos = new ConsultarServer().getPuntosRuta(idRuta);\r\n\t\t listaParadas = new ConsultarServer().getParadasRuta(idRuta,\r\n\t\t\t strTipoRuta);\r\n\t\t mapa.putParcelableArrayListExtra(\"listaPuntos\", listaPuntos);\r\n\t\t mapa.putParcelableArrayListExtra(\"listaParadas\",\r\n\t\t\t listaParadas);\r\n\r\n\t\t handler.sendEmptyMessage(2);\r\n\r\n\t\t} catch (SocketException e) {\r\n\t\t mensajeErrorConexion();\r\n\t\t} catch (IOException e) {\r\n\t\t mensajeErrorConexion();\r\n\t\t}\r\n\t }\r\n\t});\r\n\r\n\thiloDibujar.start();\r\n }", "@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}", "private void cargarRegistroMedicamentos() {\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/registro_medicamentos.zul\", \"REGISTRO DE MEDICAMENTOS\",\r\n\t\t\t\tparametros);\r\n\t}", "public ArrayList<T> cargar(String ruta) {\n// ArrayList<T> productos = ArrayList();\n try {\n fis = new FileInputStream(ManejoDato.rutaArchivo);\n ois = new ObjectInputStream(fis);\n ArrayList<T> lista = (ArrayList<T>) ois.readObject();\n// productos = FXCollections.observableList(lista);\n ois.close();\n fis.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"ERROR: \" + e.getLocalizedMessage());\n } catch (IOException | ClassNotFoundException e) {\n System.err.println(\"ERROR: \" + e.getLocalizedMessage());\n }\n return lista;\n }", "public void inicializar(Coleccion coleccion){\n cargador.inicializar();\n analizador.inicializar();\n gestorAlmacenamiento.inicializar(coleccion);\n\n }", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "void load_from_file(){\n\t\tthis.setAlwaysOnTop(false);\n\t\t\n\t\t/**\n\t\t * chose file with file selector \n\t\t */\n\t\t\n\t\tFileDialog fd = new FileDialog(this, \"Choose a file\", FileDialog.LOAD);\n\t\t\n\t\t//default path is current directory\n\t\tfd.setDirectory(System.getProperty(\"user.dir\"));\n\t\tfd.setFile(\"*.cmakro\");\n\t\tfd.setVisible(true);\n\t\t\n\t\t\n\t\t\n\t\tString filename = fd.getFile();\n\t\tString path = fd.getDirectory();\n\t\tString file_withpath = path + filename;\n\t\t\n\t\t\n\t\tif (filename != null) {\n\t\t\t System.out.println(\"load path: \" + file_withpath);\t\n\t\t\n\t\t\t \n\t\t\t /**\n\t\t\t * read object from file \n\t\t\t */\n\t\t\t\ttry {\n\t\t\t\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(file_withpath));\n\n\t\t\t\t\tKey_Lists = Key_Lists.copy((key_lists) in.readObject());\n\n\t\t\t\t\tkeys_area.setText(Key_Lists.arraylist_tostring());\t\t\n\t\t\t\t\t\n\t\t\t\t\tin.close();\n\t\t\t\t\t\n\t\t\t\t\tinfo_label.setForeground(green);\n\t\t\t\t\tinfo_label.setText(\"file loaded :D\");\n\t\t\t\t\t\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tinfo_label.setForeground(white);\n\t\t\t\t\tinfo_label.setText(\"wrong file format\");\n\t\t\t\t\tSystem.out.println(\"io exception\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tthis.setAlwaysOnTop(true);\n\t\n\t}", "public void limpiar() {\n\t\taut_empleado.limpiar();\n\t\tutilitario.addUpdate(\"aut_empleado\");// limpia y refresca el autocompletar\n\n\n\t}", "public static void cargarRecursos(String carpetaArchivosConf, AdministradorRecursosNvjItf recursosProyecto) \n \t\tthrows CargadorRecursosException, MapeoException, IOException{\n System.out.println(\"Comenzando la carga de NavajaFW\");\n //Listo los archivos de configuracion\n String[] listaDeArchivos = new File(carpetaArchivosConf).list();\n \n if (listaDeArchivos == null) {\n throw new CargadorRecursosCarpetaConfVaciaException(carpetaArchivosConf);\n }\n\n //Se listan los archivos de la carpeta indicada\n ArrayList<String> archivosConf = new ArrayList<String>(Arrays.asList(listaDeArchivos));\n\n //Se los itera\n for (String archivoNombre : archivosConf){\n //Si algun archivo termina con _or.xml es un mapeo\n if (archivoNombre.endsWith(NavajaConstantes.GUION_BAJO_OR_PUNTO_XML)) {\n //Muestro que el archivo se esta leyendo\n System.out.println(\"Mapeando \" + archivoNombre + \"...\");\n //Comienzo el mapeo\n Mapeador.mapearXml(carpetaArchivosConf + archivoNombre);\n System.out.println(\"Mapeado correctamente \"); \n }\n }\n \n if (Mapeador.getRaizMapeo() == null || Mapeador.getRaizMapeo().getTablas().isEmpty()) {\n throw new CargadorRecursosNoExistenArchivosMapeoException(); \t\n }\n \n //Se setea la instancia NavajaConector de la app el mapeo recien generado\n NavajaConector.getInstance().setMapeoRaiz(Mapeador.getRaizMapeo());\n \n //Se inicializa los recursos segun lo implementado en el metodo sobrescrito\n recursosProyecto.iniciarRecursos();\n \n //Se setea la instancia NavajaConector de la app el DataSource para conectarse\n DataSource dataSource = recursosProyecto.proveerDataSource();\n \n if(dataSource == null) {\n throw new org.calevin.navaja.excepciones.core.CargadorRecursosDataSourceNuloException();\n }\n\n Connection conexion = null;\n\t\ttry {\n\t\t\tconexion = dataSource.getConnection();\n\t\t\t\n\t\t\tif (conexion == null){\n\t\t\t\tthrow new CargadorRecursosConexionFallidaException(\n\t\t\t\t\t\tNavajaStringUtil.conmutarCaseChar(NavajaConstantes.CONEXION_NULA, 0)\n\t\t\t\t\t\t+ NavajaConstantes.PUNTO);\n\t\t\t} else if (!conexion.isValid(0)) {\n\t\t\t\tthrow new CargadorRecursosConexionFallidaException(\n\t\t\t\t\t\tNavajaStringUtil.conmutarCaseChar(NavajaConstantes.CONEXION_INVALIDA, 0)\n\t\t\t\t\t\t+ NavajaConstantes.COMA_ESPACIO\n\t\t\t\t\t\t+ NavajaConstantes.CONEXION\n\t\t\t\t\t\t+ NavajaConstantes.ESPACIO_COMILLA\n\t\t\t\t\t\t+ conexion\n\t\t\t\t\t\t+ NavajaConstantes.COMILLA\n\t\t\t\t\t\t+ NavajaConstantes.PUNTO);\t\t\t\t\n\t\t\t} else {\n\t\t NavajaConector.getInstance().setDataSource(dataSource);\t\t\t\t\n\t\t\t}\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CargadorRecursosConexionFallidaException(e);\n\t\t} finally {\n\t\t\tif (conexion != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconexion.close(); \n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new CargadorRecursosConexionFallidaException(e);\n\t\t\t\t} \n\t\t\t}\n\t\t}\n }" ]
[ "0.6958339", "0.68279266", "0.65855014", "0.6566655", "0.64307284", "0.6405849", "0.6367807", "0.63536733", "0.6295136", "0.62099034", "0.6156729", "0.6155775", "0.6151273", "0.61228925", "0.6108799", "0.6107143", "0.61067164", "0.6080352", "0.60425913", "0.59891087", "0.5983945", "0.59461564", "0.593845", "0.59363747", "0.5896974", "0.5893027", "0.5889722", "0.58871394", "0.58613306", "0.5854762", "0.5837744", "0.58357227", "0.5834264", "0.5828529", "0.58108574", "0.5810375", "0.5798261", "0.5784935", "0.57764906", "0.57684827", "0.5762912", "0.5750726", "0.5748545", "0.57434916", "0.57284915", "0.5719535", "0.57118624", "0.57023394", "0.5688466", "0.56868076", "0.568329", "0.5680334", "0.5679136", "0.56754464", "0.5674647", "0.567184", "0.5664009", "0.5663767", "0.5661049", "0.562657", "0.56199574", "0.5615033", "0.5614922", "0.5612706", "0.5609527", "0.56086755", "0.55951685", "0.55772626", "0.5577192", "0.5565068", "0.5564293", "0.5563827", "0.5562648", "0.5556102", "0.5555108", "0.5553569", "0.5548321", "0.5540611", "0.5539308", "0.55274343", "0.5522615", "0.5517779", "0.5510056", "0.5498713", "0.54965174", "0.5495515", "0.54930913", "0.5487853", "0.54844964", "0.54797804", "0.5474716", "0.54669505", "0.54654986", "0.54640853", "0.54609096", "0.5458115", "0.5458115", "0.5458115", "0.54555476", "0.5455034", "0.54540443" ]
0.0
-1
for windows System.setProperty("webdriver.chrome.driver","G:\\chromedriver.exe"); for MacOS
public void setup(){ System.setProperty("webdriver.chrome.driver","//Users//bpat12//Downloads//chromedriver"); driver = new ChromeDriver(); System.out.println("launch browser"); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); driver.get(url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setChromeDriverProperty() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\automation_new_code\\\\onfs.alip.accounting\\\\BrowserDriver/chromedriver.exe\");\n\t\t}", "public static void startChromeDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "public static void ChromeExePathSetUp() {\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \r\n\t\t\t\t\"D:\\\\VisionITWorkspace\\\\dependencies\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tReporter.log(\"Chrome Exe path Set up\", true);\r\n\t}", "public static void setSystemPropertyChromeWebDriverOriginal() {\n\t\tString fullPath = getFullPathToSrcTestResourceFolder();\n\t\t\n\t\tString os = getOperationalSystemName();\n\t\t\n\t\tString chromeDriver = CHROME_DRIVER_WINDOWS;\n\t\tif ( os.equals(OS_MAC_OS_X) ) {\n\t\t\tchromeDriver = CHROME_DRIVER_MAC;\n\t\t}\n\t\t\n\t\tSystem.setProperty(\n\t\t\tWEBDRIVER_CHROME_DRIVER, \n\t\t\tfullPath + chromeDriver);\n\t}", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "@Before\n public void setWebDriver() throws IOException {\n System.setProperty(\"webdriver.chrome.driver\", DRIVER_PATH);\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.addArguments(\"start-maximized\");\n driver = new ChromeDriver(chromeOptions);\n }", "@BeforeTest\n public void setup() {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\User\\\\IdeaProjects\\\\LoginToJira\\\\chromedriver.exe\");\n // Create a new instance of the Chrome driver\n this.driver = new ChromeDriver();\n }", "public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\tURL chromeDriverURL = BrowserDriver.class.getResource(\"/drivers/chromedriver.exe\");\n\t\tFile file = new File(chromeDriverURL.getFile()); \n\t\tSystem.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());\n\t\t\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\toptions.addArguments(\"--ignore-certificate-errors\");\n\t\t\n\t\treturn new ChromeDriver(options);\n\t\t}\n\t}", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "@Test\r\n\tpublic void f()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C://Data_Program//Selenium_Dependencies//chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"http://www.google.com\");\r\n\t}", "@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}", "@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "public static void main(String[] args) {\n\t\tString current = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(current);\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", current + \"\\\\Lib\\\\chromedriver.exe\");\n\n\t\tWebDriver driver = new ChromeDriver(); //open browser\n\t\tdriver.get(\"https://www.google.com\"); //open URL\n\t\ttry {\n\t\t\tThread.sleep(5000); //wait for 5 second\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdriver.close(); //close browser \n\t}", "@BeforeSuite\r\n\tpublic void before_suite() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"G:\\\\chromedriver.exe\");\r\n\t}", "@BeforeClass\n public static void setup() {\n String driverPath = \"\";\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tSystem.out.println(\"Before\");\r\n\t\t//System.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Admin/Desktop/Chromedriver.exe\");\r\n\t\t//driver = new ChromeDriver();\r\n\t}", "@BeforeTest\r\n\tpublic void beforeTest() throws MalformedURLException {\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PDC2B-Training.pdc2b\\\\Downloads\\\\Selenium Drivers\\\\BrowserDriver\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5000, TimeUnit.SECONDS);\r\n\t}", "public static ChromeDriver intiChrome() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:/ChromeServer/chromedriver.exe\");\n\t\t// WebDriver driver = new ChromeDriver();\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\t// 设置为 headless 模式 (必须)\n\t\t// chromeOptions.addArguments(\"--headless\");\n\t\t// 设置浏览器窗口打开大小 (非必须)\n\t\t// chromeOptions.addArguments(\"--window-size=1980,1068\");\n\t\tChromeDriver driver = new ChromeDriver(chromeOptions);\n\t\treturn driver;\n\t}", "public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}", "@Before\r\n\tpublic void OpenChrome() {\n\t\tconfig = new ConfigReader();\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",config.getChromePath());\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\texPages = new ExpediaPages(driver);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}", "@BeforeMethod\n\tpublic void setUp() {\n\t\tString driverByOS = \"\";\n\t\tif (System.getProperty(\"os.name\").equals(\"Windows 10\")) {\n\t\t\tdriverByOS = \"Drivers/chromedriver.exe\";\n\t\t} \n\t\telse {\n\t\t\tdriverByOS = \"Drivers/chromedriver\";\n\t\t}\n\t\t//para saber en qué sistema Operativo estamos corriendo el proyecto.\n\t\tSystem.out.println(System.getProperty(\"os.name\"));\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverByOS);\n\t\t//Utilizando headless browser HB\n\t\t/*-HB\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\tchromeOptions.addArguments(\"--headless\");\n\t\tdriver = new ChromeDriver(chromeOptions);\n\t\tHB-*/\n\t\tdriver = new ChromeDriver();\n\t\t//driver.manage().window().maximize(); //esto es para maximizar la ventana del navegador\n\t\t//driver.manage().window().fullscreen(); //esto es para poner en fullscreen la ventana del navegador\n\t\t/*driver.manage().window().setSize(new Dimension(200,200));\n\t\tfor (int i = 0; i <= 800; i++) {\n\t\t\tdriver.manage().window().setPosition(new Point(i,i));\n\t\t}*/\n\t\t//driver.manage().window().setPosition(new Point(800,200)); //posicionando la ventana del navegador\n\t\tdriver.navigate().to(\"http://newtours.demoaut.com/\");\n\t\t//Este codigo de abajo permite abrir otra ventana en el navegador\n\t\t//JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;\n\t\t//String googleWindow = \"window.open('http://www.google.com')\";\n\t\t//javaScriptExecutor.executeScript(googleWindow);\n\t\t//tabs = new ArrayList<String> (driver.getWindowHandles());\n\t\t/*try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//Helpers helper = new Helpers();\n\t\t//helper.sleepSeconds(4);\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./browser/chromedriver.exe\");\r\n\t\t//DesiredCapabilities cap=new DesiredCapabilities();\r\n\t\t\r\n\t\tChromeOptions co=new ChromeOptions();\r\n\t\tco.addArguments(\"--disable-infobars\");\r\n\t\t//co.addArguments(\"--headless\");\r\n\t\tWebDriver driver=new ChromeDriver(co);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.close();\r\n\r\n\t}", "@Given(\"I set up my Chrome Driver\")\n\tpublic void i_am_on_Magalu_HomePage() {\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/gocruz/eclipse-workspace/portal.compras/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(options);\n\n\t}", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }", "public void browser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/Driver/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();// maximize the window\n\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\n\t}", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "public WebDriver LaunchChromeBrowserReturnIt() {\n\t\ttry {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\"/TestSuit/lib/chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver(); // Launch chrome\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn driver;\n\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "@BeforeMethod(alwaysRun = true)\n public void browserSetup(){\n driver = new ChromeDriver();\n }", "@Before\n public void setUp() throws Exception {\n URL = \"https://www.facebook.com/\";\n\t//baseUrl = \"https://www.katalon.com/\";\n System.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Documentos\\\\Java Drivers\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n // driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }", "public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}", "@BeforeClass\n\t public void beforeClass() {\n\t System.setProperty(\"webdriver.chrome.driver\", \"F:\\\\Git\\\\GIT_Repositories\\\\Selenium_Project\\\\Drivers\\\\chromedriver.exe\");\n\t driver = new ChromeDriver();\n\t \n\t \n\t }", "public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }", "@BeforeMethod\n\tpublic void registerChromeDriver() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\"/Users/shwetasharma/Documents/softwares/chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tutil = new Utils(driver);\n\t\t// Put a Implicit wait, this means that any search for elements on the\n\t\t// page\n\t\t// could take the time the implicit wait is set for before throwing\n\t\t// exception\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t// Launch the Applitools hackathon Website\n\t\tdriver.get(\"https://demo.applitools.com/hackathon.html\");\n\t\tdriver.manage().window().maximize();\n\n\t}", "public static void startGeckoDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src//main//resources//drivers//geckodriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src//main//resources//drivers//geckodriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac os x\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src/main//resources//drivers//geckodriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws MalformedURLException {\n\t\t\n\t\tDesiredCapabilities objRc=new DesiredCapabilities();\n\t\tobjRc.setBrowserName(\"chrome\");\n\t\tobjRc.setPlatform(Platform.WINDOWS);\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://localhost:4546/wd/hub\"),objRc);\n\t}", "private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\n\t\t\n\t\t_driver = new ChromeDriver(options);\n\t\treturn _driver;\n\t}", "public static WebDriver setupDriver(String platform, String url, String browser) {\n if (platform.equalsIgnoreCase(\"mac\") && browser.equalsIgnoreCase(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", \"src/main/resources/drivers/chromedriver\");\n } else if (platform.equalsIgnoreCase(\"windows\") && browser.equalsIgnoreCase(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", \"src/main/resources/drivers/chromedriver.exe\");\n }\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n driver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n driver.get(url);\n return driver;\n }", "public void initialization()\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Mrunal\\\\chromedriver.exe\");\n\t\n\t\tif(prop.getProperty(\"browser\").contains(\"chrome\"))\n\t\t driver = new ChromeDriver();\n\t\t \n\t\t driver.manage().deleteAllCookies();\n\t\t driver.manage().timeouts().pageLoadTimeout(2000, TimeUnit.MILLISECONDS);\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n\n\t\t driver.get(prop.getProperty(\"url\"));\n\t\t driver.manage().window().maximize();\n\t\t driver.manage().timeouts().implicitlyWait(8, TimeUnit.SECONDS);\n\t\t \n\t}", "@Before\n public void startingTests() throws Exception {\n // from Sample 1:\n String libWithDriversLocation = System.getProperty(\"user.dir\") + \"\\\\lib\\\\\";\n System.setProperty(\"webdriver.chrome.driver\", libWithDriversLocation + \"chromedriver.exe\");\n // declaration above:\n driver = new ChromeDriver();\n\n //open page:\n driver.get(base_url);\n }", "public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}", "public static void main(String[] args) {\n\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\COMPAQ\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\n\nWebDriver driver =new ChromeDriver();\n\n//WebDriverWait wait = new WebDriverWait(driver, 40);\n\n driver.get(\"http://qatestingtips.com/\");\n\t\n\n}", "private void initChromeDriver(String appUrl) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"Drivers\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(appUrl);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t}", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "@ BeforeTest \n\tpublic void Amazon() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\resources\\\\chromedriver.exe\"); // to make the path portable create folder reources and put the element to it \n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\tSystem.out.println(driver.getCurrentUrl());\t\n\t\tdriver.manage().window().maximize();\n\n}", "public static void initializer() \n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\HP-PC\\\\Downloads\\\\Kahoot\\\\chromedriver.exe\" );\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://www.sathya.in/\");\n\t}", "public WebDriver initializeDriver() {\n System.setProperty(\"webdriver.chrome.driver\", projectPath + \"//src//main//resources//chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n return driver;\n }", "@Test\n public void test() throws MalformedURLException {\n System.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\drivers\\\\chromedriver.exe\"); \n WebDriver driver=new ChromeDriver();\n // WebDriver driver=new RemoteWebDriver(url,cap);\n driver.manage().window().maximize(); \n driver.get(\"https://curiedoctorapp.firebaseapp.com\");\n System.out.println(\"The title is\"+ driver.getTitle());\n driver.quit();\n \n }", "public static void main(String[] args) {\n WebDriver driver = WebDriverFactory.getDriver(\"chrome\");\n driver.manage().window().maximize();\n\n\n }", "public Selenium(String chromePath) {\n this.browserDriverPath = chromePath; \n }", "public static WebDriver initializeChromeDriver() throws Exception {\n\n\t\tFile file = null;\n\t\tChromeDriverService chromeService = null;\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\n\t\tif (os.contains(\"win\")){\n\t\t\t//Operating system is based on Windows\n\t\t\tfile = new File(Constants.CHROMEDRIVER_EXE);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_EXE))\n\t\t\t\t\t.usingAnyFreePort().build();\n\n\t\t} else if (os.contains(\"x\") || os.contains(\"mac\") || os.contains(\"osx\")){\n\t\t\t//Operating system is Apple OSX based\n\t\t\tfile = new File(Constants.CHROMEDRIVER_MAC);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_MAC))\n\t\t\t\t\t.usingAnyFreePort().build();\n\n\t\t} else if (os.contains(\"nix\") || os.contains(\"aix\") || os.contains(\"nux\")){\n\t\t\t//Operating system is based on Linux/Unix/*AIX\n\t\t\tfile = new File(Constants.CHROMEDRIVER_LINUX);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_LINUX))\n\t\t\t\t\t.usingAnyFreePort().build();\n\t\t}\n\n\t\tchromeService.start();\n\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tcapabilities.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, \"about:blank\");\n\n\t\tRemoteWebDriver driver = new RemoteWebDriver(chromeService.getUrl(), capabilities);\n\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n\t\treturn driver;\n\t}", "public static WebDriver init_driver_crome(String browser) {\n\t\t\tif(browser.equals(\"chrome\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"G:\\\\software\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Browser is initialised\" +browser);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Browser is not initialised\" +browser);\n\t\t\t}\n\t\t\treturn getDriverChrome();\n\t\t}", "@BeforeClass\r\n public void beforeClass() {\n \tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\Tuan\\\\Downloads\\\\chromedriver.exe\");\r\n \tdriver = new ChromeDriver();\r\n \tdriver.get(\"http://daominhdam.890m.com/\");\r\n\t}", "@Before\n public void start() {\n\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n //driver.manage().window().maximize();\n wait = new WebDriverWait(driver, 10);\n }", "public WebDriver browserSetup() throws IOException\r\n\t{ \r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tSystem.out.println(\"1.Chrome\\n2.Firefox \\nEnter your choice:\");\r\n\t\tString choice=br.readLine();\r\n\t\t\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t//To start Chrome Driver\r\n\t\tcase \"1\":\r\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Test Automation\\\\Software\\\\chrome\\\\New Version\\\\chromedriver.exe\");\r\n\t\t ChromeOptions options=new ChromeOptions();\r\n\t\t options.addArguments(\"--disable-notifications\");\r\n\t\t driver=new ChromeDriver(options);\r\n\t\t break;\r\n\t\t\r\n\t\t//To start Firefox Driver\r\n\t\tcase \"2\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\***\\\\drivers\\\\geckodriver.exe\");\r\n\t\t\tdriver=new FirefoxDriver();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\t\r\n\t\tdriver.get(url);\r\n\t\t\r\n\t\t//To maximize the window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(8, TimeUnit.SECONDS);\r\n\t\t\r\n\t\treturn driver;\r\n\t}", "@Given(\"^Initialize the browser with Chrome$\")\r\n\tpublic void initialize_the_browser_with_Chrome() throws Throwable {\n\t\tdriver = DriverManager.getDriverInstance(\"chrome\", 20);\r\n\t\tSystem.out.println(\"Launched Chrome\");\r\n\t}", "public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "@Test\n @Given(\"I launch browser\")\n public void s01_BrowserMaximizeLaunch() {\n System.setProperty(\"webdriver.chrome.driver\", \"src/ChromeDriver.exe\");\n// Init new instance of ChromeDriver.\n driver = new ChromeDriver();\n// Maximise browser window\n driver.manage().window().maximize();\n System.out.println(\"Step01 PASSED\");\n }", "public void launch() throws IOException {\n \r\n FileInputStream fs=new FileInputStream(\"C:\\\\New folder\\\\PHPTravelers\\\\src\\\\main\\\\java\\\\file\\\\base.properties\");\r\n\t\tprop.load(fs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\rakshitha\\\\chromedriver.exe\"); \r\n\t\t\t\t driver = new ChromeDriver(); \r\n\t\t\t\t//driver.get(\"https://www.phptravels.net\");\r\n\t\t\t\t//System.out.println(driver.getTitle());\r\n\t\t\t\tdriver.manage().window().maximize();\r\n\t\t\t driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n\t\t\t driver.get(prop.getProperty(\"url\"));\r\n\t\t\r\n\t\t\r\n\t}", "@BeforeTest\n public void setup() {\n\n String browser = Environment.getProperties().browser().toString().toLowerCase();\n\n switch (browser) {\n \n case \"firefox\":\n FirefoxOptions options = new FirefoxOptions(); \n if(Environment.getProperties().headless()){\n options.addArguments(\"--headless\");\n }\n driver = new FirefoxDriver();\n break;\n \n default:\n ChromeOptions optionsChrome = new ChromeOptions();\n if(Environment.getProperties().headless()){\n optionsChrome.addArguments(\"--headless\");\n } \n driver = new ChromeDriver(optionsChrome);\n break;\n } \n\n driver.manage().window().maximize();\n }", "@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "public static void main(String[] args) {\n /* location of the driver executable\n For windows, navigate to file location, right click and click Properties. Grab the location value, add the filename at the end\n For MAC, navigate to file location, right click and click Get Info. Grab the location value, add the filename at the end\n */\n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\IJProjs\\\\NAAutoBoot\\\\chromedriver.exe\");\n\n System.out.println(\"driver location is:\"+System.getProperty(\"webdriver.chrome.driver\"));\n\n WebDriver driver1 = new ChromeDriver();\n\n driver1.get(\"https://www.bankofamerica.com/\");\n\n }", "public static void main(String[] args) throws IOException {\n\r\n\r\n\t WebDriver driver;\r\n\t ChromeOptions options=new ChromeOptions();\r\n\t options.addArguments(\"C:\\\\chromedriver.exe\"); \r\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.chrome();\r\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY,options);\r\n\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n driver.get(\"http://www.baidu.com\");\r\n \r\n \r\n \r\n//\t\tWebDriver driver;\r\n//\t\tProfilesIni allProfiles =new ProfilesIni();\r\n// FirefoxProfile profile=allProfiles.getProfile(\"default\");\r\n// DesiredCapabilities capabilities=DesiredCapabilities.firefox();\r\n//\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n//\t\tdriver.get(\"http://www.baidu.com\");\r\n\t}", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "public static void main(String[] args) throws Exception{\n\n WebDriverManager.chromedriver().setup();\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"http://practice.cybertekschool.com/open_new_tab\");\n\n Thread.sleep(4000);\n\n //driver.close(); //expected to close the original one\n driver.quit(); //all window will be closed\n\n\n\n\n }", "@BeforeMethod\n\tpublic void setUp() throws Exception{\n\n\t\tDesiredCapabilities chromecap= DesiredCapabilities.chrome();\n\t\tchromecap.setBrowserName(\"chrome\");\n\t\tchromecap.setPlatform(Platform.WINDOWS);\n\t\tdriver= new RemoteWebDriver(new URL(\"http://localhost:4444/wd/hub\"), chromecap);\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t}", "public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.println(prop.getProperty(\"URL\"));\r\ndriver.get(prop.fetchProp(\"URL\"));\r\n\r\n//System.out.println(\"Hiii\");\r\n\r\n\t}", "@Given(\"^the user launch the chrome application$\")\r\n\tpublic void the_user_launch_the_chrome_application() throws Throwable {\n\t\tlaunchBrowser(\"chrome\");\r\n\t\t register= new Para_Registartion_page(driver);\r\n\t}", "public static void main(String[] args) {\n String str = getDriver(\"chrome\");\n System.out.println(str);\n\n }", "@Test\r\n\tpublic void testcase() throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\chromedriver.exe\");\r\n\t\t\r\n\t\t//Step2: Launch the browser\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\t\r\n\t\t//Setp3: Launch URL\r\n\t\tdriver.get(\"http://www.google.com\");\r\n\t\t\r\n\t\tThread.sleep(2000);\r\n\t\t\r\n\t\tdriver.close();\t\r\n\r\n\t}", "@BeforeSuite\n\t\n\tpublic void setUp()\n\t{\n\t\t\n\t\tSystem.out.println(\" set system property for chrome\");\n\t}", "private void setWebDriver() {\n if (Boolean.valueOf(System.getProperty(\"LOCAL_DRIVER\"))) {\n setLocalWebdriver();\n } else if (Boolean.valueOf(System.getProperty(\"REMOTE_DRIVER\"))) {\n setRemoteWebdriver();\n } else if (Boolean.valueOf(System.getProperty(\"SAUCE_DRIVER\"))) {\n setSauceWebdriver();\n } else {\n throw new WebDriverException(\"Type of driver not specified!!!\");\n }\n this.driver.get().manage().timeouts()\n .implicitlyWait(10, TimeUnit.SECONDS);\n if (browser.equalsIgnoreCase(\"internet explorer\")|browser.equalsIgnoreCase(\"firefox\")|browser.equalsIgnoreCase(\"chrome\")|browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t//we only want to maximise the browser window for desktop browser, not devices.\n \tthis.driver.get().manage().window().maximize();\n\t\t}\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }", "@BeforeClass\n public static void setup(){\n WebDriverManager.chromedriver().setup();\n webDriver = new ChromeDriver();\n webDriver.manage().window().maximize();\n webDriver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);\n }", "@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "@Given(\"^the user launch chrome application$\")\r\n\tpublic void the_user_launch_chrome_application() throws Throwable {\n\t w.browser();\r\n\t}", "public static void setChromeDriverDownloadPath(String path)\n\t{\n\t\tApplicationProperties appProperties = p6web.getInstance();\n\t\t\n\ttry{\n\t\t\n\t\tm_driver = ApplicationProperties.getInstance().getDriver();\n\t\tm_driver.get(\"chrome://settings/advanced\");\n JavascriptExecutor js = (JavascriptExecutor) m_driver;\n String prefId = \"download.default_directory\";\n File tempDir=new File(System.getProperty(\"user.dir\")+path);\n if (m_driver.findElements(By.xpath(String.format(\".//input[@pref='%s']\", prefId))).size() == 0) {\n \tm_driver.get(\"chrome://settings-frame\");\n \tm_driver.findElement(By.xpath(\".//button[@id='advanced-settings-expander']\")).click(); }\n String tmpDirEscapedPath = tempDir.getCanonicalPath().replace(\"\\\\\", \"\\\\\\\\\");\n js.executeScript(String.format(\"Preferences.setStringPref('%s', '%s', true)\", prefId,\n tmpDirEscapedPath));\n\t\t}\n\t\n\t\tcatch(IOException e){\n\t\t\t\n\t\t}\n\t\n\t\tm_driver.get(appProperties.getUrl());\n\t\n\t}", "public static void initialization() {\n\t\tSystem.out.println(\"**Open initialization**\");\r\n\t\tString browserName = props.getProperty(\"browser\");\r\n\t\tSystem.out.println(\"Browser User = \" + browserName + \" URL = \" + props.getProperty(\"url\"));\r\n\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:/Selenium Automation/chromedriver/chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\r\n\t\tdriver.get(props.getProperty(\"url\"));\r\n\t\tSystem.out.println(\"**Close initialization**\");\r\n\t}", "public static WebDriver getLocalChromeDriver() {\n WebDriverManager.chromedriver().setup();\n return new ChromeDriver();\n }", "@Parameters({\"browser\"})\n\t@BeforeMethod\n\tpublic final void setDriver(String browser) throws Exception{\n\t\tsetBrowser = browser;\n\t\tswitch(browser){\n\t\t\n\t\tcase \"chrome\":\n\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\twebDriver.set(new ChromeDriver());\n\t\tbreak;\n\t\t\n\t\tcase \"firefox\":\n\t\t\tWebDriverManager.firefoxdriver().setup();\n\t\t\twebDriver.set(new FirefoxDriver());\n\t\tbreak;\n\t\t\n\t\tcase \"ie\":\n\t\t\tWebDriverManager.edgedriver().setup();\n\t\t\twebDriver.set(new EdgeDriver());\n\t\tbreak;\n\t\t\n\t\tcase \"edge\":\n\t\t\t/*EdgeOptions options = new EdgeOptions();\n\t\t\t//options.setProxy(proxy)\n*/\t\t\tSystem.setProperty(\"webdriver.edge.driver\", resourcePath+\"Drivers/MicrosoftWebDriver.exe\");\n\t\t\tWebDriver driver = new EdgeDriver();\n\t\t\t//WebDriverManager.edgedriver().setup();\n\t\t\twebDriver.set(driver);\n\t\tbreak;\n\t\t\n\t\tcase \"safari\":\n\t\t\twebDriver.set(new SafariDriver());\n\t\t\n\t\t}\n\t}", "public static void main(String asrgs[]) {\r\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\tWebDriver driver=new ChromeDriver();\r\n\tdriver.navigate().to(\"https://www.facebook.com/\");\r\n\tdriver.findElement(By.name(\"email\")).sendKeys(\"sainagakrishna79@gmail.com\");\r\n\tdriver.findElement(By.name(\"pass\")).sendKeys(\"Sainaga@5\");\r\n\tdriver.findElement(By.name(\"login\")).click();\r\n\tdriver.findElement(By.className(\"_6s5d _71pn _-kb segoe\")).click();\r\n \r\n}", "@Test\n public void f() {\n\t \n\t System.setProperty(\"webdriver.chrome.driver\", getClass().getResource(\"/chromedriver.exe\").getPath());\n\t System.out.println(\"ssss:\"+getClass().getResource(\"/chromedriver.exe\"));\n\t WebDriver dr = new ChromeDriver();\n\t dr.get(\"http://www.baidu.com\");\n\t \n\t App.printhello();\n\t System.out.println(\"aaaaaaaaaa\");\n\t try {\n\t\tThread.sleep(3000);\n\t} catch (InterruptedException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t dr.close();\n }", "@BeforeClass\n @Parameters({ \"browser\", \"url\" })\n public void startDriver(@Optional(\"chrome\") String WindowBrowser, @Optional(\"http://computer-database.herokuapp.com/computers\") String URL) {\n\n final String os = System.getProperty(\"os.name\");\n userDirectory = System.getProperty(\"user.dir\");\n Log.info(\"Starting to intialise driver\");\n Log.info(\"OS environment: \" + os);\n Log.info(\"Browser: \" + WindowBrowser);\n if (WindowBrowser.equalsIgnoreCase(BROWSERS.FIREFOX.getBrowserName())) {\n final StringBuilder geckoDriverPath = new StringBuilder();\n geckoDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n geckoDriverPath.append(File.separator + \"mac\" + File.separator + \"geckodriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n geckoDriverPath.append(File.separator + \"win\" + File.separator + \"geckodriver.exe\");\n }\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath.toString());\n driver = new FirefoxDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.CHROME.getBrowserName())) {\n final StringBuilder chromeDriverPath = new StringBuilder();\n System.out.println(userDirectory);\n chromeDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n chromeDriverPath.append(File.separator + \"mac\" + File.separator + \"chromedriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n chromeDriverPath.append(File.separator + \"win\" + File.separator + \"chromedriver.exe\");\n }\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath.toString());\n driver = new ChromeDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.SAFARI.getBrowserName())) {\n driver = new SafariDriver();\n }\n driver.manage().window().setSize(new Dimension(1440, 844));\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n BaseURl = URL;\n Log.info(\"Driver initialised successfully\");\n driver.get(BaseURl);\n Log.info(\"Opening URl: \" + URL);\n }", "private void setDriverPathForBrowser(String browserName) {\n \t\n \tif ( !binariesPath.exists() ) throw new IllegalStateException(\"No path at \" + binariesPath.getAbsolutePath() );\n \t\n switch (browserName.toLowerCase()) {\n case \"firefox\":\n {\n if (isMac())\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath,\"/MAC/geckodriver-v0.19.0-macos.tar.gz/geckodriver-v0.19.0-macos.tar\").getAbsolutePath());\n }\n else if (isLinux())\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath, \"/Ubuntu/geckodriver\").getAbsolutePath());\n }\n else\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath, \"/Windows/geckodriver.exe\").getAbsolutePath());\n }\n break;\n }\n case \"chrome\": {\n if (isMac()) {\n System.setProperty(\"webdriver.chrome.driver\", new File(binariesPath, \"/MAC/chromedriver\").getAbsolutePath());\n } else if (isLinux()) {\n System.setProperty(\"webdriver.chrome.driver\",new File(binariesPath, \"/Ubuntu/chromedriver\").getAbsolutePath());\n } else {\n System.setProperty(\"webdriver.chrome.driver\",new File(binariesPath,\"/Windows/chromedriver.exe\").getAbsolutePath());\n }\n break;\n }\n case \"ie\":\n System.setProperty(\"webdriver.ie.driver\", new File(binariesPath,\"/Windows/IEDriverServer.exe\").getAbsolutePath());\n }\n }", "@BeforeTest // which will be executed first before all the test methods\n@Parameters(\"browser\") //@Parameter is used to pass the values(during run time) to the test methods as arguments using .xml file\npublic void setup(String browser) throws Exception{\n \n//Check if parameter passed as 'chrome'\nif (browser.equalsIgnoreCase(\"chrome\")){\n//set path to chromedriver.exe\nSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\mouleeswaranb\\\\\\\\\\\\\\\\eclipse-workspace_Selenium learning_6127\\\\\\\\\\\\\\\\SeleniumProject\\\\\\\\\\\\\\\\drivers\\\\\\\\\\\\\\\\chromedriver.exe\");\ndriver = new ChromeDriver(); \n}\n\nelse{\n//If no browser passed throw exception\nthrow new Exception(\"Browser is not correct\");\n}\ndriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n}", "public static void main(String[] args) throws IOException, InterruptedException {\nFileInputStream file=new FileInputStream(\"E:\\\\JIJO A J\\\\ECLIPSE\\\\D3\\\\src\\\\props.properties\");\r\nProperties p=new Properties();\r\np.load(file);\r\nSystem.setProperty(\"webdriver.chrome.driver\", \"chromedriver.exe\");\r\nWebDriver driver=new ChromeDriver();\r\ndriver.get(p.getProperty(\"url\"));\r\ndriver.findElement(By.id(p.getProperty(\"uid\"))).sendKeys(\"love4messi\");\r\ndriver.findElement(By.id(p.getProperty(\"pwd\"))).sendKeys(\"9946619269\");\r\nThread.sleep(4000);\r\ndriver.findElement(By.xpath(p.getProperty(\"btn\"))).click();\r\nThread.sleep(4000);\r\n\r\ndriver.quit();\r\n\r\n\t}", "@Before\n public void start(){\n DesiredCapabilities caps = new DesiredCapabilities();\n driver = new FirefoxDriver(new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Nightly\\\\firefox.exe\")), new FirefoxProfile(), caps);\n wait = new WebDriverWait(driver, 10);\n\n //IE\n// DesiredCapabilities caps = new DesiredCapabilities();\n// caps.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);\n// WebDriver driver = new InternetExplorerDriver(caps);\n\n\n }", "public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }" ]
[ "0.85488796", "0.8264945", "0.8136589", "0.79710203", "0.76035154", "0.75753987", "0.7475319", "0.74514216", "0.735849", "0.73311055", "0.7328404", "0.7246303", "0.7186388", "0.71656334", "0.7131086", "0.7086419", "0.706157", "0.70472616", "0.7013867", "0.6963706", "0.69348913", "0.691934", "0.6889584", "0.6876893", "0.6866423", "0.6865159", "0.68490064", "0.68486595", "0.68274987", "0.6806013", "0.6803952", "0.67868173", "0.67861915", "0.673816", "0.671702", "0.6711021", "0.6691019", "0.66825676", "0.66822696", "0.6674162", "0.66635454", "0.6663026", "0.6658899", "0.66565096", "0.6653419", "0.6647037", "0.6637107", "0.6630555", "0.6629922", "0.6614582", "0.66108435", "0.6609288", "0.6595317", "0.658562", "0.65730655", "0.65634465", "0.65544504", "0.65490806", "0.65483326", "0.65439606", "0.6531802", "0.6526747", "0.65175974", "0.65090275", "0.6492047", "0.6490569", "0.6488463", "0.64841044", "0.64599127", "0.64485735", "0.6443362", "0.6435502", "0.64328873", "0.6420349", "0.64171827", "0.6414661", "0.64077574", "0.6404151", "0.6395818", "0.63857996", "0.6384668", "0.63801104", "0.6376134", "0.63753396", "0.6369793", "0.63676745", "0.6362822", "0.63592994", "0.6356418", "0.63450485", "0.63349736", "0.6324223", "0.63236415", "0.631872", "0.6316895", "0.63015634", "0.62949044", "0.6294815", "0.6263195", "0.6255798" ]
0.7093402
15
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Creates new form ifrm_historial
public ifrm_historial() { initComponents(); this.setTitle("Historial bitacoraCalculadora.txt"); File archivo; try{ final BufferedReader lector = new BufferedReader(new FileReader("bitacoraCalculadora.txt")); String line = ""; while ((line = lector.readLine()) != null){ //txt_mostrar.setText(line); txt_mostrar.append(line +"\n"); }lector.close(); }catch(FileNotFoundException e){ e.printStackTrace(); } catch(IOException e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "FORM createFORM();", "public ActionForward populateHistopathology(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n setCancerModel(request);\n \n setComments(request, Constants.Pages.HISTOPATHOLOGY);\n \n return mapping.findForward(\"viewHistopathology\");\n }", "public JSFManagedBeanHistorialTurno() {\r\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Buscar_Historia() {\n initComponents();\n }", "public AuditFunctionForm() {\n initComponents();\n init();\n }", "@Override\n public boolean createApprisialForm(ApprisialFormBean apprisial) {\n apprisial.setGendate(C_Util_Date.generateDate());\n return in_apprisialformdao.createApprisialForm(apprisial);\n }", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic static void populateFormWithExistingData(OHD ohd, OnHandForm theform) {\n\t\tif(ohd!=null){\n\t\t\tif(ohd.getMatched_incident()!=null && !ohd.getMatched_incident().isEmpty()){\n\t\t\t\tIncident inc=IncidentBMO.getIncidentByID(ohd.getMatched_incident(), null);\n\t\t\t\tif(inc!=null){\n\t\t\t\t\tif(inc.getItemlist()!=null){\n\t\t\t\t\t\ttheform.setExistMatchedItemlist(new ArrayList(inc.getItemlist()));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(inc.getItemtype()!=null){\n\t\t\t\t\t\ttheform.setExistMatchedItemType(inc.getItemtype().getItemType_ID());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(ohd.getDisposal_status()!=null){\n\t\t\t\ttheform.setExistDisposalStatus(ohd.getDisposal_status());\n\t\t\t} else {\n\t\t\t\ttheform.setExistDisposalStatus(new Status());\n\t\t\t}\n\n\t\t\tif(ohd.getRemarks()!=null){\n\t\t\t\ttheform.setExistRemarkSize(ohd.getRemarks().size());\n\t\t\t} else {\n\t\t\t\ttheform.setExistRemarkSize(1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void formPopulated(FormEvent fe) {\n formObject = FormContext.getCurrentInstance().getFormReference();\n\n formObject.setNGValue(\"purchasestatus\", \"\");\n formObject.setNGValue(\"purchaseremarks\", \"\");\n formObject.setNGValue(\"previousstatus\", \"\");\n formObject.setNGValue(\"returnpo\", \"\");\n\n String previousactivity = formObject.getNGValue(\"previousactivity\");\n if (previousactivity.equalsIgnoreCase(\"Initiator\")\n || previousactivity.equalsIgnoreCase(\"StoreMaker\")\n || previousactivity.equalsIgnoreCase(\"StoreChecker\")\n || previousactivity.equalsIgnoreCase(\"AccountsMaker\")\n || previousactivity.equalsIgnoreCase(\"AccountsChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Exception Cleared\", \"Exception Cleared\");\n }\n\n if (previousactivity.equalsIgnoreCase(\"QualityMaker\")\n || previousactivity.equalsIgnoreCase(\"QualityChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Replacement or Exchange\", \"Replacement or Exchange\");\n formObject.addComboItem(\"purchasestatus\", \"Purchase Return\", \"Purchase Return\");\n }\n\n formObject.clear(\"proctype\");\n Query = \"select HeadName from supplypoheadmaster order by HeadName asc\";\n System.out.println(\"Query is \" + Query);\n result = formObject.getDataFromDataSource(Query);\n for (int i = 0; i < result.size(); i++) {\n formObject.addComboItem(\"proctype\", result.get(i).get(0), result.get(i).get(0));\n }\n }", "public VentanaInformacionHistoriaClinica() {\n \n menuOpciones = new JPopupMenu(\"Opciones\");\n \n menuOpciones.add(causas);\n menuOpciones.add(medicamentos);\n \n causas.addActionListener(this::causasRegistroHistoria);\n medicamentos.addActionListener(this::medicamentosRegistrosHistoria);\n \n modeloRegistro = new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Atendido por\", \"Fecha consulta\", \"Costo\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.Double.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n @Override\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n @Override\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n initComponents(); \n \n \n }", "public Historial_equipo() {\n initComponents();\n\n user = Login.user;\n IDequipo = GestionarEquipos.IDequipo_update;\n\n setTitle(\"Historial del equipo registrado con el ID \" + IDequipo + \" - Sesión de \" + user);\n setSize(850, 630);\n setResizable(false);\n setLocationRelativeTo(null);\n\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n\n ImageIcon wallpaper = new ImageIcon(\"src/imagenes/wallpapertech.jpg\");\n Icon icono = new ImageIcon(wallpaper.getImage().getScaledInstance(jLabel_Wallpaper.getWidth(), jLabel_Wallpaper.getHeight(), Image.SCALE_DEFAULT));\n jLabel_Wallpaper.setIcon(icono);\n this.repaint();\n\n try {\n Connection cn = Conexion.conectar();\n PreparedStatement pst = cn.prepareStatement(\"select comentario_historial, dia, mes, annio, insumo, revision_tecnica_de from historial where id_equipo = '\" + IDequipo + \"'\");\n ResultSet rs = pst.executeQuery();\n\n jTable_historial = new JTable(model);\n jScrollPane_historial.setViewportView(jTable_historial);\n\n model.addColumn(\"Comentario\");\n model.addColumn(\"Dia\");\n model.addColumn(\"Mes\");\n model.addColumn(\"Año\");\n model.addColumn(\"Insumo Usado\");\n model.addColumn(\"Registro del Tecnico\");\n\n while (rs.next()) {\n Object[] fila = new Object[6];\n\n for (int i = 0; i < 6; i++) {\n fila[i] = rs.getObject(i + 1);\n }\n\n model.addRow(fila);\n\n }\n\n cn.close();\n } catch (SQLException e) {\n\n }\n\n }", "public ControllerReporteHistorialClinico() {\n }", "public ConsultaHistorialClinico(java.awt.Frame parent, boolean modal,TipoInforme tipo,DTOAbuelo dto) {\n super(parent, modal);\n initComponents();\n Image icon = new ImageIcon(getClass().getResource(\"/Vistas/imagenes/pinaricono.jpg\")).getImage();\n this.setLocationRelativeTo(null);\n idPaciente = dto.getId();\n tipoInforme=tipo;\n controlador= new ControladorABMAbuelos();\n controladorHistorial = new ControladorHistorialClinico();\n textDNI.setText(dto.getDni());\n textNombre.setText(dto.getNombre() + \" \" + dto.getApellido());\n textObraSocial.setText(dto.getDTOobraSocial().getNombreObraSocial());\n textPeso.setText(Double.toString(dto.getPeso()));\n textTalla.setText(Double.toString(dto.getTalla()));\n textTipoHistorial.setText(tipo.name());\n ///////FOTO////\n if(dto.getFoto()!=null){\n byte[] imagenbyte = dto.getFoto();\n BufferedImage img = null;\n try{ \n img = ImageIO.read(new ByteArrayInputStream(imagenbyte));\n Image imagen = img;\n imagen = imagen.getScaledInstance(130, 130, imagen.SCALE_DEFAULT);\n jLabel5.setIcon(new ImageIcon(imagen));\n }catch(IOException e){\n System.out.println(\"error\");\n }\n }\n ///////////////\n mostrarInformes();\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public TelaFuncionario_TelaMenu_GerenciarHistorico() {\n initComponents();\n try {\n listaUsuario = fc.listarTodos();\n } catch (SQLException ex) {\n Logger.getLogger(TelaFuncionario_TelaMenu_GerenciarCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n btSelecionar.setEnabled(false);\n btHabilitar.setEnabled(false);\n }", "public void nuevo(HistoriaClinica historia) {\n this.fechaConsulta = FechaUtil.ahora();\n this.pkHistoria = historia.getPk();\n }", "public frm_tutor_subida_prueba() {\n }", "private void loadForm() {\n service.getReasons(refusalReasons);\n service.getVacEligibilty(vacElig);\n service.getVacSites(vacSites);\n service.getReactions(vacReactions);\n service.getOverrides(vacOverrides);\n updateComboValues();\n \n selPrv = \"\";\n selLoc = \"\";\n \n //datGiven.setDateConstraint(new SimpleDateConstraint(SimpleDateConstraint.NO_NEGATIVE, DateUtil.addDays(patient.getBirthDate(), -1, true), null, BgoConstants.TX_BAD_DATE_DOB));\n datGiven.setDateConstraint(getConstraintDOBDate());\n datEventDate.setConstraint(getConstraintDOBDate());\n radFacility.setLabel(service.getParam(\"Caption-Facility\", \"&Facility\"));\n if (immunItem != null) {\n \n txtVaccine.setValue(immunItem.getVaccineName());\n txtVaccine.setAttribute(\"ID\", immunItem.getVaccineID());\n txtVaccine.setAttribute(\"DATA\", immunItem.getVaccineID() + U + immunItem.getVaccineName());\n setEventType(immunItem.getEventType());\n \n radRefusal.setDisabled(!radRefusal.isChecked());\n radHistorical.setDisabled(!radHistorical.isChecked());\n radCurrent.setDisabled(!radCurrent.isChecked());\n \n visitIEN = immunItem.getVisitIEN();\n if (immunItem.getProvider() != null) {\n txtProvider.setText(FhirUtil.formatName(immunItem.getProvider().getName()));\n txtProvider.setAttribute(\"ID\", immunItem.getProvider().getId().getIdPart());\n selPrv = immunItem.getProvider().getId().getIdPart() + U + U + immunItem.getProvider().getName();\n }\n switch (immunItem.getEventType()) {\n case REFUSAL:\n ListUtil.selectComboboxItem(cboReason, immunItem.getReason());\n txtComment.setText(immunItem.getComment());\n datEventDate.setValue(immunItem.getDate());\n break;\n case HISTORICAL:\n datEventDate.setValue(immunItem.getDate());\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n txtAdminNote.setText(immunItem.getAdminNotes());\n ZKUtil.disableChildren(fraDate, true);\n ZKUtil.disableChildren(fraHistorical, true);\n default:\n service.getLot(lotNumbers, getVaccineID());\n loadComboValues(cboLot, lotNumbers, comboRenderer);\n loadVaccination();\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n ListUtil.selectComboboxItem(cboLot, immunItem.getLot());\n ListUtil.selectComboboxItem(cboSite, StrUtil.piece(immunItem.getInjSite(), \"~\", 2));\n spnVolume.setText(immunItem.getVolume());\n datGiven.setDate(immunItem.getDate());\n datVIS.setValue(immunItem.isImmunization() ? immunItem.getVISDate() : null);\n ListUtil.selectComboboxItem(cboReaction, immunItem.getReaction());\n ListUtil.selectComboboxData(cboOverride, immunItem.getVacOverride());\n txtAdminNote.setText(immunItem.getAdminNotes());\n cbCounsel.setChecked(immunItem.wasCounseled());\n }\n } else {\n IUser user = UserContext.getActiveUser();\n Practitioner provider = new Practitioner();\n provider.setId(user.getLogicalId());\n provider.setName(FhirUtil.parseName(user.getFullName()));\n txtProvider.setValue(FhirUtil.formatName(provider.getName()));\n txtProvider.setAttribute(\"ID\", VistAUtil.parseIEN(provider)); //provider.getId().getIdPart());\n selPrv = txtProvider.getAttribute(\"ID\") + U + U + txtProvider.getValue();\n Location location = new Location();\n location.setName(\"\");\n location.setId(\"\");\n datGiven.setDate(getBroker().getHostTime());\n onClick$btnVaccine(null);\n \n if (txtVaccine.getValue().isEmpty()) {\n close(true);\n return;\n }\n \n Encounter encounter = EncounterContext.getActiveEncounter();\n if (!EncounterUtil.isPrepared(encounter)) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n if (isCategory(encounter, \"E\")) {\n setEventType(EventType.HISTORICAL);\n Date date = encounter == null ? null : encounter.getPeriod().getStart();\n datEventDate.setValue(DateUtil.stripTime(date == null ? getBroker().getHostTime() : date));\n radCurrent.setDisabled(true);\n txtLocation.setText(user.getSecurityDomain().getName());\n PromptDialog.showInfo(user.getSecurityDomain().getLogicalId());\n txtLocation.setAttribute(\"ID\", user.getSecurityDomain().getLogicalId());\n \n } else {\n if (isVaccineInactive()) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n setEventType(EventType.CURRENT);\n radCurrent.setDisabled(false);\n }\n }\n }\n selectItem(cboReason, NONESEL);\n }\n btnSave.setLabel(immunItem == null ? \"Add\" : \"Save\");\n btnSave.setTooltiptext(immunItem == null ? \"Add record\" : \"Save record\");\n txtVaccine.setFocus(true);\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@RequestMapping(method=RequestMethod.GET)\n\tpublic String intializeForm(Model model) {\t\t\n\t\tlog.info(\"GET method is called to initialize the registration form\");\n\t\tEmployeeManagerRemote employeeManager = null;\n\t\tEmployeeRegistrationForm employeeRegistrationForm = new EmployeeRegistrationForm();\n\t\tList<Supervisor> supervisors = null;\n\t\ttry{\n\t\t\temployeeManager = (EmployeeManagerRemote) ApplicationUtil.getEjbReference(emplManagerRef);\n\t\t\tsupervisors = employeeManager.getAllSupervisors();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmodel.addAttribute(\"supervisors\", supervisors);\n\t\tmodel.addAttribute(\"employeeRegistrationForm\", employeeRegistrationForm);\n\t\t\n\t\treturn FORMVIEW;\n\t}", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "public IfrViagem() {\n initComponents();\n v = new Viagem();\n criarViagem();\n\n Formatacao.formatarData(ftfDataSaida);\n Formatacao.formatarHora(ftfHoraSaida);\n Formatacao.formatarData(ftfDataRetorno);\n Formatacao.formatarHora(ftfHoraRetorno);\n Formatacao.formatarReal(ftfValorViagem);\n\n }", "public Ventana_HistoriaClinica() {\n initComponents();\n }", "public void setHistroyid(Integer histroyid) {\n this.histroyid = histroyid;\n }", "private void panelNuevoDistribuidor_botonHistorialDeDistribuidorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_panelNuevoDistribuidor_botonHistorialDeDistribuidorActionPerformed\n Logica.herramientas.procesoDeHistorial();\n }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n labelTitulo = new javax.swing.JLabel();\n labelOperador = new javax.swing.JLabel();\n labelIdArchivo = new javax.swing.JLabel();\n valueIdArchivo = new javax.swing.JLabel();\n scrollDescripcion = new javax.swing.JScrollPane();\n textDescripcion = new javax.swing.JTextArea();\n botonGuardar = new javax.swing.JButton();\n scrollHistorial = new javax.swing.JScrollPane();\n tablaHistorial = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n labelTitulo.setText(\"CONTROL DE CAMBIOS\");\n\n labelOperador.setText(\"Operador\");\n\n labelIdArchivo.setText(\"Id Archivo\");\n\n scrollDescripcion.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Descripción último cambio\"));\n\n textDescripcion.setColumns(20);\n textDescripcion.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n textDescripcion.setRows(5);\n textDescripcion.setTabSize(4);\n textDescripcion.setText(\"Correcciones menores\");\n scrollDescripcion.setViewportView(textDescripcion);\n\n botonGuardar.setText(\"Guardar y Salir\");\n botonGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botonGuardarActionPerformed(evt);\n }\n });\n\n scrollHistorial.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Historial de Cambios\"));\n\n tablaHistorial.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"#\", \"Fecha\", \"Operador\", \"Descripcion\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tablaHistorial.setRowSelectionAllowed(false);\n tablaHistorial.getTableHeader().setReorderingAllowed(false);\n scrollHistorial.setViewportView(tablaHistorial);\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 .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(scrollDescripcion, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(labelIdArchivo)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(valueIdArchivo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(labelTitulo))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(labelOperador)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(botonGuardar)\n .addGap(19, 19, 19))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(scrollHistorial, javax.swing.GroupLayout.DEFAULT_SIZE, 547, Short.MAX_VALUE)\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelTitulo)\n .addComponent(labelOperador))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(labelIdArchivo)\n .addComponent(valueIdArchivo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(scrollDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(botonGuardar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(scrollHistorial, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n pack();\n }", "@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }", "private void loadForm() {\n CodingProxy icd9 = problem.getIcd9Code();\n \n if (icd9 != null) {\n txtICD.setText(icd9.getProxiedObject().getCode());\n }\n \n String narr = problem.getProviderNarrative();\n \n if (narr == null) {\n narr = icd9 == null ? \"\" : icd9.getProxiedObject().getDisplay();\n }\n \n String probId = problem.getNumberCode();\n \n if (probId == null || probId.isEmpty()) {\n probId = getBroker().callRPC(\"BGOPROB NEXTID\", PatientContext.getActivePatient().getIdElement().getIdPart());\n }\n \n String pcs[] = probId.split(\"\\\\-\", 2);\n lblPrefix.setValue(pcs[0] + \" - \");\n txtID.setValue(pcs.length < 2 ? \"\" : pcs[1]);\n txtNarrative.setText(narr);\n datOnset.setValue(problem.getOnsetDate());\n \n if (\"P\".equals(problem.getProblemClass())) {\n radPersonal.setSelected(true);\n } else if (\"F\".equals(problem.getProblemClass())) {\n radFamily.setSelected(true);\n } else if (\"I\".equals(problem.getStatus())) {\n radInactive.setSelected(true);\n } else {\n radActive.setSelected(true);\n }\n \n int priority = NumberUtils.toInt(problem.getPriority());\n cboPriority.setSelectedIndex(priority < 0 || priority > 5 ? 0 : priority);\n loadNotes();\n }", "@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}", "public FormInserir() {\n initComponents();\n }", "public ValidFrequencyForm() {\r\n initComponents();\r\n }", "public ProfilsFIForm() {\r\n\t\tsuper();\r\n\t}", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "public Historique()\n\t{\n\t\t\n\t}", "public static void populateFormWithExistingData(String ohd_id, OnHandForm theform) {\n\t\tOHD ohd=OHDUtils.getOHD(ohd_id);\n\t\tpopulateFormWithExistingData(ohd,theform);\n\t}", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "private void refreshForm(){ \r\n //tf_nroguia.setText(String.valueOf(Datos.getLog_cguias().getNumrela()));\r\n \r\n //Ejecuta el metodo que define el formulario segun el tipo de operacion que fue ejecutada\r\n setCurrentOperation();\r\n }", "public void nuevaRestriccion(RestricionPredio cd) {\n Map<String, List<String>> params = null;\n List<String> p = null;\n if (cd != null) {\n params = new HashMap<>();\n p = new ArrayList<>();\n p.add(cd.getId() + \"\");\n params.put(\"idRestriccion\", p);\n if (ver) {\n p = new ArrayList<>();\n p.add(ver.toString());\n params.put(\"ver\", p);\n ver = false;\n }\n } else {\n\n }\n Utils.openDialog(\"/restricciones/restriccionPredio\", params, \"500\", \"80\");\n }", "public Form getRecordVehicule() {\n if (RecordVehicule == null) {//GEN-END:|36-getter|0|36-preInit\n // write pre-init user code here\n RecordVehicule = new Form(\"V\\u00E9hicule en infraction\", new Item[]{getStringItem2(), getTextField3(), getTextField4()});//GEN-BEGIN:|36-getter|1|36-postInit\n RecordVehicule.addCommand(getOkCommand3());\n RecordVehicule.setCommandListener(this);//GEN-END:|36-getter|1|36-postInit\n // write post-init user code here\n }//GEN-BEGIN:|36-getter|2|\n return RecordVehicule;\n }", "public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}", "public CreateTremaDbDialogForm(AnActionEvent event) {\n this.event = event;\n this.windowTitle = \"New Trema XML database file\";\n init();\n }", "private void initialize() {\r\n\r\n\t\tfrmHistoriasDeZagas = new JFrame();\r\n\t\tfrmHistoriasDeZagas.getContentPane().setBackground(Color.BLACK);\r\n\t\tfrmHistoriasDeZagas.setTitle(\"Historias de Zagas\");\r\n\t\tfrmHistoriasDeZagas.setBackground(Color.WHITE);\r\n\t\tfrmHistoriasDeZagas\r\n\t\t\t\t.setIconImage(Toolkit\r\n\t\t\t\t\t\t.getDefaultToolkit()\r\n\t\t\t\t\t\t.getImage(\r\n\t\t\t\t\t\t\t\tArmas.class\r\n\t\t\t\t\t\t\t\t\t\t.getResource(\"/images/Historias de Zagas, logo.png\")));\r\n\t\tfrmHistoriasDeZagas.setBounds(100, 100, 439, 462);\r\n\t\tfrmHistoriasDeZagas.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\r\n\t\tfrmHistoriasDeZagas.getContentPane().setLayout(null);\r\n\t\tfrmHistoriasDeZagas.setLocationRelativeTo(null);\r\n\t\tfrmHistoriasDeZagas.setResizable(false);\r\n\r\n\t\tfinal JButton btnNewButton = new JButton(\"JUGAR\");\r\n\t\tif (Loader.usuario.equals(\"\")) {\r\n\t\t\tbtnNewButton.setEnabled(false);\r\n\r\n\t\t}\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJugar window = new Jugar();\r\n\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnNewButton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnNewButton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnNewButton.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\t\t\t\tnull, null));\r\n\t\tbtnNewButton.setForeground(Color.WHITE);\r\n\t\tbtnNewButton.setBackground(new Color(139, 69, 19));\r\n\t\tbtnNewButton.setFont(mf.MyFont(0, 17));\r\n\t\tbtnNewButton.setBounds(10, 51, 414, 34);\r\n\t\tbtnNewButton.setBorderPainted(false);\r\n\t\tbtnNewButton.setContentAreaFilled(false);\r\n\t\tbtnNewButton.setFocusPainted(false);\r\n\t\tbtnNewButton.setOpaque(false);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnNewButton);\r\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnNewButton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t\t\tbtnNewButton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\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\tfinal JButton btnCreadorDeNpcs = new JButton(\"CREADOR DE NPCs\");\r\n\t\tbtnCreadorDeNpcs.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tStartNPC.atrpoints = new AtributePoints();\r\n\t\t\t\tStartNPC.skpoints = new SkillPoints();\r\n\t\t\t\tStartNPC.atributos = new Atributes(StartNPC.atrpoints);\r\n\t\t\t\tStartNPC.combatSkills = new CombatSkills(StartNPC.skpoints);\r\n\t\t\t\tStartNPC.knowledgeSkills = new KnowledgeSkills(\r\n\t\t\t\t\t\tStartNPC.skpoints);\r\n\t\t\t\tStartNPC.magicSkills = new MagicSkills(StartNPC.skpoints);\r\n\t\t\t\tStartNPC.knowhowSkills = new KnowHowSkills(StartNPC.skpoints);\r\n\t\t\t\tBlessing blessing = new Blessing(\"\");\r\n\t\t\t\tSetbacks setbacks = new Setbacks();\r\n\t\t\t\tPrivileges privileges = new Privileges();\r\n\t\t\t\tRace race = new Race(\"\");\r\n\t\t\t\tEquipment equipment = new Equipment();\r\n\t\t\t\tArrayList<String> posarm = new ArrayList<String>();\r\n\t\t\t\tPossesions posss = new Possesions(posarm);\r\n\t\t\t\tArmor armor = new Armor(\"\", \"\", false,false, posss);\r\n\t\t\t\tStartNPC.character = new Characters(null, race, \"\", 0, 2, 10,\r\n\t\t\t\t\t\t20, 20, StartNPC.atributos, StartNPC.combatSkills,\r\n\t\t\t\t\t\tStartNPC.knowledgeSkills, StartNPC.magicSkills,\r\n\t\t\t\t\t\tStartNPC.knowhowSkills, blessing, privileges, setbacks,\r\n\t\t\t\t\t\tfalse, armor, equipment,null,null,null,null,null,null,null,null,null,null,null,null, 0, 1,0,\"\",\"\",\"\");\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\tStartNPC window;\r\n\t\t\t\ttry {\r\n\t\t\t\t\twindow = new StartNPC();\r\n\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDeNpcs.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDeNpcs.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDeNpcs.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDeNpcs.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\r\n\t\tbtnCreadorDeNpcs.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnCreadorDeNpcs.setBorder(new BevelBorder(BevelBorder.RAISED, null,\r\n\t\t\t\tnull, null, null));\r\n\t\tbtnCreadorDeNpcs.setForeground(Color.WHITE);\r\n\t\tbtnCreadorDeNpcs.setBackground(new Color(139, 69, 19));\r\n\t\tbtnCreadorDeNpcs.setFont(mf.MyFont(0, 17));\r\n\t\tbtnCreadorDeNpcs.setBounds(10, 141, 414, 34);\r\n\t\tbtnCreadorDeNpcs.setBorderPainted(false);\r\n\t\tbtnCreadorDeNpcs.setContentAreaFilled(false);\r\n\t\tbtnCreadorDeNpcs.setFocusPainted(false);\r\n\t\tbtnCreadorDeNpcs.setOpaque(false);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnCreadorDeNpcs);\r\n\r\n\t\tfinal JButton btnCreadorDePersonajes = new JButton(\r\n\t\t\t\t\"CREADOR DE PERSONAJES\");\r\n\t\tbtnCreadorDePersonajes.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDePersonajes.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnCreadorDePersonajes.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDePersonajes.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnCreadorDePersonajes.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnCreadorDePersonajes.setBorder(new BevelBorder(BevelBorder.RAISED,\r\n\t\t\t\tnull, null, null, null));\r\n\t\tbtnCreadorDePersonajes.setForeground(Color.WHITE);\r\n\t\tbtnCreadorDePersonajes.setBackground(new Color(139, 69, 19));\r\n\t\tbtnCreadorDePersonajes.setBorderPainted(false);\r\n\t\tbtnCreadorDePersonajes.setContentAreaFilled(false);\r\n\t\tbtnCreadorDePersonajes.setFocusPainted(false);\r\n\t\tbtnCreadorDePersonajes.setOpaque(false);\r\n\t\tbtnCreadorDePersonajes.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcrear = \"pj\";\r\n\t\t\t\tStart.atrpoints = new AtributePoints();\r\n\t\t\t\tStart.skpoints = new SkillPoints();\r\n\t\t\t\tStart.atributos = new Atributes(Start.atrpoints);\r\n\t\t\t\tStart.combatSkills = new CombatSkills(Start.skpoints);\r\n\t\t\t\tStart.knowledgeSkills = new KnowledgeSkills(Start.skpoints);\r\n\t\t\t\tStart.magicSkills = new MagicSkills(Start.skpoints);\r\n\t\t\t\tStart.knowhowSkills = new KnowHowSkills(Start.skpoints);\r\n\t\t\t\tBlessing blessing = new Blessing(\"\");\r\n\t\t\t\tSetbacks setbacks = new Setbacks();\r\n\t\t\t\tPrivileges privileges = new Privileges();\r\n\t\t\t\tRace race = new Race(\"\");\r\n\t\t\t\tEquipment equipment = new Equipment();\r\n\t\t\t\tArrayList<String> posarm = new ArrayList<String>();\r\n\t\t\t\tPossesions posss = new Possesions(posarm);\r\n\t\t\t\tArmor armor = new Armor(\"\", \"\", false,false, posss);\r\n\t\t\t\tStart.character = new Characters(null, race, \"\", 0, 2, 10, 20,\r\n\t\t\t\t\t\t20, Start.atributos, Start.combatSkills,\r\n\t\t\t\t\t\tStart.knowledgeSkills, Start.magicSkills,\r\n\t\t\t\t\t\tStart.knowhowSkills, blessing, privileges, setbacks,\r\n\t\t\t\t\t\tfalse, armor, equipment,null,null,null,null,null,null,null,null,null,null,null,null, 0, 1,0,\"\",\"\",\"\");\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\tStart window;\r\n\t\t\t\ttry {\r\n\t\t\t\t\twindow = new Start();\r\n\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreadorDePersonajes.setFont(mf.MyFont(0, 17));\r\n\t\tbtnCreadorDePersonajes.setBounds(10, 186, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnCreadorDePersonajes);\r\n\r\n\t\tfinal JButton btnCreditos = new JButton(\"CRÉDITOS\");\r\n\t\tbtnCreditos.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnCreditos.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnCreditos.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreditos.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnCreditos.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnCreditos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tCreditos window = new Creditos();\r\n\t\t\t\twindow.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tfinal JButton btnHistoria = new JButton(\"GESTOR DE PARTIDAS\");\r\n\t\tbtnHistoria.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tGestorMain window = new GestorMain();\r\n\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\r\n\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnHistoria.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t\tbtnHistoria.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t\tbtnHistoria.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnHistoria.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnHistoria.setOpaque(false);\r\n\t\tbtnHistoria.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnHistoria.setForeground(Color.WHITE);\r\n\t\tbtnHistoria.setFont(mf.MyFont(0, 17));\r\n\t\tbtnHistoria.setFocusPainted(false);\r\n\t\tbtnHistoria.setContentAreaFilled(false);\r\n\t\tbtnHistoria.setBorderPainted(false);\r\n\t\tbtnHistoria.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\r\n\t\tnull, null));\r\n\t\tbtnHistoria.setBackground(new Color(139, 69, 19));\r\n\t\tbtnHistoria.setBounds(10, 96, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnHistoria);\r\n\t\tbtnCreditos.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\t\t\t\tnull, null));\r\n\t\tbtnCreditos.setForeground(Color.WHITE);\r\n\t\tbtnCreditos.setBackground(new Color(139, 69, 19));\r\n\t\tbtnCreditos.setFont(mf.MyFont(0, 17));\r\n\t\tbtnCreditos.setBounds(10, 321, 414, 34);\r\n\t\tbtnCreditos.setBorderPainted(false);\r\n\t\tbtnCreditos.setContentAreaFilled(false);\r\n\t\tbtnCreditos.setFocusPainted(false);\r\n\t\tbtnCreditos.setOpaque(false);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnCreditos);\r\n\r\n\t\tfinal JButton button = new JButton(\"SALIR\");\r\n\t\tbutton.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbutton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbutton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tint seleccion = JOptionPane.showOptionDialog(\r\n\t\t\t\t\t\tfrmHistoriasDeZagas,\r\n\t\t\t\t\t\t\"¿Estás seguro de querer cerrar el programa?.\",\r\n\t\t\t\t\t\t\"¡Atención!\", JOptionPane.YES_NO_OPTION,\r\n\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, new Object[] { \"Si\",\r\n\t\t\t\t\t\t\t\t\"No\" }, // null para YES, NO y CANCEL\r\n\t\t\t\t\t\t\"opcion 1\");\r\n\t\t\t\tif (JOptionPane.YES_OPTION == seleccion) {\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\ttxtBienvenidoSeleccioneA = new JLabel();\r\n\t\ttxtBienvenidoSeleccioneA.setOpaque(false);\r\n\t\ttxtBienvenidoSeleccioneA.setForeground(Color.WHITE);\r\n\t\ttxtBienvenidoSeleccioneA.setBackground(new Color(205, 133, 63));\r\n\t\ttxtBienvenidoSeleccioneA.setBorder(null);\r\n\t\ttxtBienvenidoSeleccioneA.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtBienvenidoSeleccioneA.setFont(mf.MyFont(0, 13));\r\n\t\ttxtBienvenidoSeleccioneA\r\n\t\t\t\t.setText(\"Bienvenido, seleccione a qué servicio desea acceder.\");\r\n\t\ttxtBienvenidoSeleccioneA.setBounds(0, 0, 444, 40);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(txtBienvenidoSeleccioneA);\r\n\t\tbutton.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbutton.setOpaque(false);\r\n\t\tbutton.setForeground(Color.WHITE);\r\n\t\tbutton.setFont(mf.MyFont(0, 17));\r\n\t\tbutton.setFocusPainted(false);\r\n\t\tbutton.setContentAreaFilled(false);\r\n\t\tbutton.setBorderPainted(false);\r\n\t\tbutton.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null,\r\n\t\t\t\tnull));\r\n\t\tbutton.setBackground(new Color(139, 69, 19));\r\n\t\tbutton.setBounds(10, 366, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(button);\r\n\r\n\t\tfinal JButton btnAyuda = new JButton(\"AYUDA\");\r\n\t\tbtnAyuda.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tAyudaPrincipal window = new AyudaPrincipal();\r\n\t\t\t\twindow.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAyuda.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t\tbtnAyuda.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t\tbtnAyuda.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAyuda.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnAyuda.setOpaque(false);\r\n\t\tbtnAyuda.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnAyuda.setForeground(Color.WHITE);\r\n\t\tbtnAyuda.setFont(mf.MyFont(0, 17));\r\n\t\tbtnAyuda.setFocusPainted(false);\r\n\t\tbtnAyuda.setContentAreaFilled(false);\r\n\t\tbtnAyuda.setBorderPainted(false);\r\n\t\tbtnAyuda.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\r\n\t\tnull, null));\r\n\t\tbtnAyuda.setBackground(new Color(139, 69, 19));\r\n\t\tbtnAyuda.setBounds(10, 276, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnAyuda);\r\n\r\n\t\tfinal JButton btnPerfil = new JButton(\"PERFIL\");\r\n\t\tif (Loader.usuario.equals(\"\")) {\r\n\t\t\tbtnPerfil.setEnabled(false);\r\n\r\n\t\t}\r\n\t\tbtnPerfil.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnPerfil.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnPerfil.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnPerfil.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\t\tPerfil window = new Perfil();\r\n\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t} catch (ClassNotFoundException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (InstantiationException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (IllegalAccessException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnPerfil.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnPerfil.setOpaque(false);\r\n\t\tbtnPerfil.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnPerfil.setForeground(Color.WHITE);\r\n\t\tbtnPerfil.setFont(mf.MyFont(0, 17));\r\n\t\tbtnPerfil.setFocusPainted(false);\r\n\t\tbtnPerfil.setContentAreaFilled(false);\r\n\t\tbtnPerfil.setBorderPainted(false);\r\n\t\tbtnPerfil.setBorder(new BevelBorder(BevelBorder.RAISED, null, null,\r\n\r\n\t\tnull, null));\r\n\t\tbtnPerfil.setBackground(new Color(139, 69, 19));\r\n\t\tbtnPerfil.setBounds(10, 231, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnPerfil);\r\n\r\n\t\tfinal JButton btnAdministracin = new JButton(\"ADMINISTRACI\\u00D3N\");\r\n\t\tbtnAdministracin.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tAdministracionPrinc window = new AdministracionPrinc();\r\n\t\t\t\twindow.getFrame().setVisible(true);\r\n\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAdministracin.setVisible(false);\r\n\t\tbtnAdministracin.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnAdministracin.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio2.png\")));\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnAdministracin.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAdministracin.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/botonesInicio.png\")));\r\n\t\tbtnAdministracin.setOpaque(false);\r\n\t\tbtnAdministracin.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnAdministracin.setForeground(Color.WHITE);\r\n\t\tbtnAdministracin.setFont(mf.MyFont(0, 17));\r\n\t\tbtnAdministracin.setFocusPainted(false);\r\n\t\tbtnAdministracin.setContentAreaFilled(false);\r\n\t\tbtnAdministracin.setBorderPainted(false);\r\n\t\tbtnAdministracin.setBorder(new BevelBorder(BevelBorder.RAISED, null,\r\n\t\t\t\tnull,\r\n\r\n\t\t\t\tnull, null));\r\n\t\tbtnAdministracin.setBackground(new Color(139, 69, 19));\r\n\t\tbtnAdministracin.setBounds(10, 321, 414, 34);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnAdministracin);\r\n\t\r\n\r\n\t\tfinal JButton btnNewButton_1 = new JButton(\"(Desconectar)\");\r\n\t\t\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\r\n\t\t\t\tint seleccion = JOptionPane.showOptionDialog(\r\n\t\t\t\t\t\tfrmHistoriasDeZagas,\r\n\t\t\t\t\t\t\"¿Estás seguro de querer desconectarte?.\",\r\n\t\t\t\t\t\t\"¡Atención!\", JOptionPane.YES_NO_OPTION,\r\n\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, new Object[] { \"Si\",\r\n\t\t\t\t\t\t\t\t\"No\" }, // null para YES, NO y CANCEL\r\n\t\t\t\t\t\t\"opcion 1\");\r\n\t\t\t\tif (JOptionPane.YES_OPTION == seleccion) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (Loader.usuario.length() == 0) {\r\n\t\t\t\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\t\t\t\tLoader window = new Loader();\r\n\t\t\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\tLoader.usuario = \"\";\r\n\t\t\t\t\t\t\tfrmHistoriasDeZagas.dispose();\r\n\t\t\t\t\t\t\tLoader window = new Loader();\r\n\t\t\t\t\t\t\twindow.getFrmHistoriasDeZagas().setVisible(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tbtnNewButton_1.setForeground(Color.BLUE);\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\tbtnNewButton_1.setForeground(Color.WHITE);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setFont(mf.MyFont(3, 11));\r\n\t\tbtnNewButton_1.setFocusPainted(false);\r\n\t\tbtnNewButton_1.setContentAreaFilled(false);\r\n\t\tbtnNewButton_1.setBorderPainted(false);\r\n\t\tbtnNewButton_1.setForeground(Color.WHITE);\r\n\t\tbtnNewButton_1.setBounds(-10, 416, 125, 17);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(btnNewButton_1);\r\n\r\n\t\tJLabel lblNewLabel_1 = new JLabel(Loader.usuario);\r\n\t\tlblNewLabel_1.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_1.setFont(mf.MyFont(0, 11));\r\n\t\tlblNewLabel_1.setBounds(104, 416, 86, 17);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(lblNewLabel_1);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"\");\r\n\t\tlblNewLabel.setIcon(new ImageIcon(Inicio.class\r\n\t\t\t\t.getResource(\"/images/background-inicio.jpg\")));\r\n\t\tlblNewLabel.setBackground(Color.BLACK);\r\n\t\tlblNewLabel.setBounds(0, 0, 444, 472);\r\n\t\tfrmHistoriasDeZagas.getContentPane().add(lblNewLabel);\r\n\t\tif (Loader.admin==1) {\r\n\t\t\tfrmHistoriasDeZagas.setBounds(100, 100, 439, 500);\r\n\t\t\tfrmHistoriasDeZagas.setLocationRelativeTo(null);\r\n\t\t\tbtnCreditos.setBounds(10, 365, 414, 34);\r\n\t\t\tbutton.setBounds(10, 410, 414, 34);\r\n\t\t\tlblNewLabel_1.setBounds(104, 455, 86, 17);\r\n\t\t\tbtnNewButton_1.setBounds(-10, 455, 125, 17);\r\n\t\t\tbtnAdministracin.setVisible(true);\r\n\t\t}\r\n\t}", "public XStatusForm(Icq icq) {\n this.icq = icq;\n }", "private void butNew_Click(Object sender, System.EventArgs e) throws Exception {\n FormProcCodeNew FormPCN = new FormProcCodeNew();\n FormPCN.ShowDialog();\n if (FormPCN.Changed)\n {\n changed = true;\n ProcedureCodes.refreshCache();\n fillGrid();\n }\n \n }", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "public Frm_AddJob() {\n initComponents();\n ClearEdit();\n }", "public CentralAC_GUI(HVACGUI hvacForm) {\n\n //setting the content pane\n setContentPane(rootPanel);\n\n setPreferredSize(new Dimension(500, 500));\n pack();\n setVisible(true);\n //using the dispose on close to close the form\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n //setting the hvac form to false so its not the active form\n hvacForm.setEnabled(false);\n //calling the addToList method\n addToList();\n //making the hvac gui form active\n hvacForm.setEnabled(true);\n\n }", "public OverdueRecordForm() {\n initComponents();\n display_Overdue();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tnew Histo_avance(client);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@GetMapping(\"/add\")\n\tpublic String showFormForAdd(Model model) {\n\t\tMemo memo = new Memo();\n\t\t\n\t\t// load categories for select options\n\t\tMap<String, String> mapCategories = generateMapCategories();\n\t\t\n\t\t// add to the model\n\t\tmodel.addAttribute(\"memo\", memo);\n\t\tmodel.addAttribute(\"categories\", mapCategories);\n\t\t\n\t\treturn \"add\";\n\t}", "public frmAfiliado() {\n initComponents();\n \n }", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "public Form getCheckVehicule() {\n if (CheckVehicule == null) {//GEN-END:|28-getter|0|28-preInit\n \n CheckVehicule = new Form(\"V\\u00E9rification d\\'un v\\u00E9hicule\", new Item[]{getTextField1(), getTextField2()});//GEN-BEGIN:|28-getter|1|28-postInit\n CheckVehicule.addCommand(getOkCommand1());\n CheckVehicule.setCommandListener(this);//GEN-END:|28-getter|1|28-postInit\n // write post-init user code here\n }//GEN-BEGIN:|28-getter|2|\n return CheckVehicule;\n }", "private void imprimirBotonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imprimirBotonActionPerformed\n ReportPrinter printer = new ReportPrinter(ninno, \"Historico\");\n printer.imprimirPDF();\n JOptionPane.showMessageDialog(this, \"Reporte creado, ver Archivo pdf\", \"Reporte Creado\", JOptionPane.INFORMATION_MESSAGE);\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "public Form_soal() {\n initComponents();\n tampil_soal();\n }", "public InvoiceCreate() {\n initComponents();\n }", "private void btnReporteActionPerformed(java.awt.event.ActionEvent evt) {\n HashMap parametros = new HashMap();\n parametros.put(\"Logo\", \".//src//Imagenes//BuscarComputadora.png\");\n parametros.put(\"Titulo\", \"Resultado de Análisis\");\n parametros.put(\"Subtitulo\", \"Documentos\");\n JasperPrint jprint = EvaluacionBL.generaReporte(\"rptReporteAnalisis\", parametros, null);\n\n try {\n JRViewer jrv = new JRViewer(jprint);\n JFrame frmReporteAnalisis = new JFrame();\n frmReporteAnalisis.getContentPane().add(jrv,BorderLayout.CENTER);\n frmReporteAnalisis.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frmReporteAnalisis.setSize(706, 478);\n\n frmReporteAnalisis.setTitle(\"Pre - View de Resultado de Análisis\");\n frmReporteAnalisis.setVisible(true);\n\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n\n }", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "public void addHospital(Hospital hospital) {\n\t\tlistOfHospitals.add(hospital); // Adds the object of the model \"hospital\" to the list created above\n\t\tString hospitalName = hospital.getHospitalName();\t// Gets the String name from the hospital model\n\t\tLong regionId = hospital.getRegionId(); // Gets the integer value of the region id\n System.out.println(\"regionId from GUI hospital object: \"+regionId);\n\t\t\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t \n session.beginTransaction();\n \n Query regquery = session.createQuery(\"from Region where id= :id\");\n regquery.setLong(\"id\", regionId);\n Region region = (Region) regquery.uniqueResult();\n session.save(new Hospital(hospital.getHospitalName(), region));\n //session.save(hospital);\n session.getTransaction().commit();\n session.close();\n \n\t\t//Connection connection = null;\t// Instantiation of the connection to the database\n\t\t\n\t\t/**\n\t\t * The following contains a set of prepared statements to be prepared to be synchronized to the MySql database.\n\t\t * The prepared statements pull information that was saved to the model via the form submission.\n\t\t */\n /*\n\t\ttry {\n\t\t\tconnection = dataSource.getConnection(); // Connection of the dataSource with the MySql sever\n\t\t\t\n\t\t\tString sql = \"Insert into hospital (id, name, region_id) values(?, ?, ?)\"; // First sql statement that contains the information to query into hospital\n\t\t\tPreparedStatement ps = connection.prepareStatement(sql); // Instantiation of the class \"PreparedStatement\" of how the query statements are prepared to be added to the database and establishment of the sql query\n\t\t\t\n\t\t\tps.setInt(1, this.getMaxHospitalID()+1);\n\t\t\tps.setString(2, hospitalName);\n\t\t\tps.setInt(3, regionId);\n\t\t\t\n\t\t\tps.executeUpdate();\n\t\t\tps.close();\n\t\t} catch (SQLException e) { // Catches SQL exception errors\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\tif (connection != null) { // Closes SQL connection \n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn;\n\t}", "@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}", "public HospitalHistoryCasePanel() {\n initComponents();\n }", "public FrmFactura() {\n initComponents();\n }", "@Override\n\tpublic void handle(ActionEvent arg0) {\n\t\tCreateTables creator = new CreateTables(tlp);\n\t\tcreator.createLogTable();\n//\t\tcreator.createRacesTable();\n//\t\tcreator.createTravelHistoryTable();\n\t\tSystem.out.println(\"log exist: \"+creator.checkExistingTable(\"log\"));\n\t\tSystem.out.println(\"races exist: \"+creator.checkExistingTable(\"races\"));\n\t\tSystem.out.println(\"travelhistory exist: \"+creator.checkExistingTable(\"travelhistory\"));\n\t}", "private void createInputBloodDonationForm( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n String path = req.getServletPath();\n req.setAttribute( \"path\", path );\n req.setAttribute( \"title\", path.substring( 1 ) );\n \n BloodDonationLogic logic = LogicFactory.getFor(\"BloodDonation\");\n req.setAttribute( \"bloodDonationColumnNames\", logic.getColumnNames().subList(1, logic.getColumnNames().size()));\n req.setAttribute( \"bloodDonationColumnCodes\", logic.getColumnCodes().subList(1, logic.getColumnCodes().size()));\n req.setAttribute(\"bloodGroupList\", Arrays.asList(BloodGroup.values()));\n req.setAttribute(\"rhdList\", Arrays.asList(RhesusFactor.values()));\n BloodBankLogic bloodBankLogic = LogicFactory.getFor(\"BloodBank\");\n List<String> bloodBankIDs = new ArrayList<>();\n bloodBankIDs.add(\"\");\n for (BloodBank bb : bloodBankLogic.getAll()) {\n bloodBankIDs.add(bb.getId().toString());\n }\n req.setAttribute( \"bloodBankIDs\", bloodBankIDs);\n req.setAttribute( \"request\", toStringMap( req.getParameterMap() ) );\n \n if (errorMessage != null && !errorMessage.isEmpty()) {\n req.setAttribute(\"errorMessage\", errorMessage);\n }\n //clear the error message if when reload the page\n errorMessage = \"\";\n \n req.getRequestDispatcher( \"/jsp/CreateRecord-BloodDonation.jsp\" ).forward( req, resp );\n }", "public void sol_historiasolicitud(){\n try{\n FacesContext context = FacesContext.getCurrentInstance();\n context.getExternalContext().redirect(\"sol_historialsolicitud.xhtml\");\n }\n catch(Exception e){\n System.out.println(\"Error: \"+e);\n }\n }", "public JFrmPagoCuotaAnulacion() {\n setTitle(\"JFrmPagoCuotaAnulacion\");\n initComponents();\n }", "public AlleleFreq(FormCreator f) {\r\n\t\tsuper(f, name);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "public void setHist_type(java.lang.String hist_type) {\r\n this.hist_type = hist_type;\r\n }", "public FiltroCreditoARealizarHistorico() {\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}", "public RiswanAgam_HistoryFrame() {\n initComponents();\n Dimension size = Toolkit.getDefaultToolkit().getScreenSize();\n int width = (int)size.getWidth();\n int height = (int)size.getHeight();\n setBounds(width/2-200,height/2-250,670,540);\n database = new RiswanAgam_Database();\n database.connection();\n initTable();\n setResizable(false);\n setTitle(\"History\");\n setDefaultCloseOperation(this.DO_NOTHING_ON_CLOSE);\n }", "@RequestMapping(value = \"/artisan/societe/valider-horaires\", method = RequestMethod.POST)\n\tpublic String sauvegarderHoraires(HttpServletRequest request,\n\t\t\t@Valid @ModelAttribute(\"horairesForm\") HorairesForm form, BindingResult result, Model model) {\n\t\t\n\t\tif (result.hasErrors()) {\n\t\t\tif (result.getFieldError().getField().toString().equals(\"email\")) {\n\t\t\t\tmodel.addAttribute(\"msg\", \"Errreur : le format de l'adresse email n'est pas correct !\");\n\t\t\t} else {\n\t\t\t\tmodel.addAttribute(\"msg\", \"Errreur : au moins un des champs n'a pas été correctement rempli !\");\n\t\t\t}\n\t\t\tmodel.addAttribute(\"errors\", result);\n\n\t\t\tmodel.addAttribute(\"horairesForm\", form);\n\t\t\treturn (\"redirect:artisan/modifier-horaires\");\n\t\t}\n\t\tSociete s = societeDao.findById((long) request.getSession().getAttribute(\"societeId\"));\n\n\t\tHoraire h = horaireDao.findById(form.getHoraireId());\n\t\tSystem.out.println(\"form.getAmOpenHeure() = \" + form.getAmOpenHeure());\n\n\t\tif (form.getAmOpenHeure().equals(\"Fermé\")) {\n\t\t\tSystem.out.println(\"C'est bien fermé\");\n\t\t\th.setAmOpen(\"Fermé\");\n\t\t\th.setAmClose(\"Fermé\");\n\t\t\t\n\t\t} else {\n\t\t\th.setAmOpen(form.getAmOpenHeure() + \":\" + form.getAmOpenMinutes());\n\t\t\th.setAmClose(form.getAmCloseHeure() + \":\" + form.getAmCloseMinutes());\n\t\t}\n\n\t\tif (form.getPmOpenHeure().equals(\"Fermé\")) {\n\t\t\th.setPmOpen(\"Fermé\");\n\t\t\th.setPmClose(\"Fermé\");\n\t\t\ts.setPmCloseToDay(true);\n\t\t} else {\n\t\t\th.setPmOpen(form.getPmOpenHeure() + \":\" + form.getPmOpenMinutes());\n\t\t\th.setPmClose(form.getPmCloseHeure() + \":\" + form.getPmCloseMinutes());\n\t\t\ts.setPmCloseToDay(false);\n\t\t\t\n\t\t}\n\t\ttry {\n\t\t\tsocieteDao.update(s);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\thoraireDao.update(h);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Pour l'envoi de mails à tous le sutilisateurs ayant accepté la nexsletter\n\t\t// on récupère la liste de newsletters de la société\n\t\t\n\t\t\n\t\tList<Newsletter> news = new ArrayList<Newsletter>();\n\t\tList<String> emails = new ArrayList<>();\n\n\t\tnews = newsletterDao.findBySociete_id(s.getId());\n\t\tfor (Newsletter n : news) {\n\t\t\tUtilisateur utilisateur = utilisateurDao.findById(n.getUtilisateur_id());\n\t\t\tif (utilisateur != null)\n\t\t\t\temails.add(utilisateur.getEmail());\n\t\t}\n\t\t// on envoie les mails\n\t\tString msgMail = \"La société \" + s.getNom() + \" a modifié ses horaires pour le \" +\n\t\th.getJour() + \". Désormais les horaires seront : \";\n\t\tif(h.getAmOpen().equals(\"Fermé\") && h.getPmOpen().equals(\"Fermé\")) {\n\t\t\tmsgMail += \" << Fermé toute la journée >>\";\n\t\t}\n\t\telse if (!h.getAmOpen().equals(\"Fermé\") && h.getPmOpen().equals(\"Fermé\")) {\n\t\t\tmsgMail += \" << Ouvert le matin de \" + h.getAmOpen() + \" à \" + h.getAmClose() + \" mais fermé l'après-midi >>\";\n\t\t}\n\t\telse if(h.getAmOpen().equals(\"Fermé\") && !h.getPmOpen().equals(\"Fermé\")) {\n\t\t\tmsgMail += \" << Fermé le matin mais ouvert l'après-midi de \" + h.getPmOpen() + \" à \" + h.getPmClose() + \">>\";\n\t\t}\n\t\telse {\n\t\t\tmsgMail += \" << le matin de \" + h.getAmOpen() + \" à \" + h.getAmClose();\n\t\t\tmsgMail += \" et l'après-midi de \" + h.getPmOpen() + \" à \" + h.getPmClose() + \" >> \";\n\t\t}\n\t\t\n\t\tUtilisateur u = new Utilisateur();\n\n\t\tif(request.getSession().getAttribute(\"user_id\")!= null) {\n\t\t\tu = utilisateurDao.findById((long) request.getSession().getAttribute(\"user_id\"));\n\t\t}\n\t\telse {\n\t\t\treturn \"login\";\n\t\t}\n\t\tString sujet = s.getNom() + \" vient de modifier ses horaires pour \" + h.getJour() + \" !!!\";\n\t\tString msgEnvoiMail = \"\";\n\t\tfor (String email : emails) {\n\t\t\ttry {\n\t\t\t\tEmailTools.sendEmailToClient(u.getEmail(), sujet, msgMail, email);\n\t\t\t\tmsgEnvoiMail = \"Un email a été envoyé à tous vos clients ayant accepté la newsletter\";\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Erreur = \" + e.getMessage());\n\t\t\t\tmsgEnvoiMail = \"L'envoi de mail a échoué, veuillez contacter l'administrateur du site\";\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tmodel.addAttribute(\"msgEnvoiMail\", msgEnvoiMail);\n\t\t}\n\t\t// Fin Envoi mails\n\n\t\tif (request.getSession().getAttribute(\"user_id\") != null) {\n\t\t\treturn \"redirect:/artisan/societe/mes-horaires?id=\" + request.getSession().getAttribute(\"societeId\");\n\t\t}\n\t\treturn \"login\";\n\t}", "private void jBtn_AjouterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_AjouterActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n Formulaire_Client creaClient = new Formulaire_Client();\n creaClient.setVisible(true);\n this.setVisible(false);\n \n }\n else{\n Formulaire_Prospect creaProspect = new Formulaire_Prospect();\n creaProspect.setVisible(true);\n this.setVisible(false);\n } \n }", "public FrmGestion(FrmMenu menu) {\n this.menu=menu;\n initComponents();\n ConstruyeTablaGestion();\n }", "public Hospital() {\n initComponents();\n }", "@GetMapping(\"/add\")\n public String showSocioForm(Model model, Persona persona) {\n List<Cargo> cargos = cargoService.getCargos();\n model.addAttribute(\"cargos\", cargos);\n return \"/backoffice/socioForm\";\n }", "public quanlixe_form() {\n initComponents();\n }", "@RequestMapping(value = \"/newFact/{fact}\", method = { RequestMethod.GET, RequestMethod.POST })\n\tpublic void newFact(HttpServletRequest req, HttpServletResponse resp, @PathVariable String fact, Model model) throws IOException, ServletException {\n\t\tfactDao.addNewFact(fact);\n\t}", "public LibrosFormBean() {\r\n libr = new ConjuntoLibro();\r\n }", "public Form_reporte_comuna_y_tipo(Controlador cont) {\n initComponents();\n this.controlador = cont;\n cargarSelect();\n\n }", "public jHistorialSeleccionarVoluntario() {\n initComponents();\n \n \n }", "public GestioneProfiliFW(Form form) {\r\n\t\tthis.form = form;\r\n\t\tpagefirst = (RepeaterAction)form.getChild(\"pagefirst\");\t\r\n\t\tpageprev = (RepeaterAction)form.getChild(\"pageprev\");\t\r\n\t\tpagenext = (RepeaterAction)form.getChild(\"pagenext\");\t\r\n\t\tpagelast = (RepeaterAction)form.getChild(\"pagelast\");\t\r\n\t\ttopage = (Field)form.getChild(\"topage\");\t\r\n\t\tpagecustom = (RepeaterAction)form.getChild(\"pagecustom\");\t\r\n\t\tsortnatural = (RepeaterAction)form.getChild(\"sortnatural\");\t\r\n\t\tremoveprofilo= (RepeaterAction)form.getChild(\"removeprofilo\");\t\r\n\t\taddprofilo = (RepeaterAction)form.getChild(\"addprofilo\");\t\r\n\t\tprofili = new ProfiliRepeaterWrapper((Repeater)form.getChild(\"profili\"));\r\n\t\tprofiliaction = (Action)form.getChild(\"profiliaction\");\r\n }", "public frmDecisionInvestigationCom_Dec() {\n initComponents();\n }", "private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public void eventoFiltrar() {\n if (index >= 0) {\n if (tipoLista == 0) {\n tipoLista = 1;\n }\n RequestContext context = RequestContext.getCurrentInstance();\n infoRegistro = \"Cantidad de registros : \" + filtrarListFormulasProcesos.size();\n context.update(\"form:informacionRegistro\");\n }\n }", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "public FrmInicioSesion() {\n initComponents();\n\n }" ]
[ "0.6038189", "0.5907356", "0.57010305", "0.5684853", "0.56369543", "0.5583208", "0.55825084", "0.55390275", "0.5531106", "0.55200505", "0.5516967", "0.5513793", "0.54340976", "0.5409566", "0.5408618", "0.5398087", "0.53530645", "0.53320235", "0.5330322", "0.53225553", "0.5306943", "0.53064173", "0.53022134", "0.5298871", "0.5267783", "0.52657247", "0.52312", "0.522297", "0.519687", "0.51806086", "0.5136884", "0.5126975", "0.51191974", "0.5106687", "0.50984824", "0.5084937", "0.5072201", "0.5071723", "0.5051566", "0.504882", "0.5045429", "0.5044312", "0.5036849", "0.5026105", "0.5025607", "0.50255895", "0.5023115", "0.5014676", "0.5010627", "0.5010022", "0.5008982", "0.50058615", "0.5003167", "0.50023276", "0.49805743", "0.4978823", "0.49731782", "0.4966465", "0.49654576", "0.49617547", "0.49609357", "0.49580082", "0.49423334", "0.49278527", "0.49277785", "0.4927699", "0.49156857", "0.49129125", "0.49050218", "0.48836318", "0.48762557", "0.4875587", "0.48733255", "0.4849603", "0.48486182", "0.484822", "0.484403", "0.48344922", "0.4834114", "0.48311803", "0.4828042", "0.4827291", "0.4826322", "0.48255363", "0.48252076", "0.48246464", "0.482036", "0.4820351", "0.48188087", "0.48169005", "0.4814217", "0.48136887", "0.4813171", "0.48122293", "0.4811648", "0.48115984", "0.48092163", "0.48045123", "0.48029983", "0.47998917" ]
0.5245453
26