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
Return current lengthof Doubly LinkedList
public int length() { return length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int length() {\n int ret_val = 1;\n LinkedList i = this;\n\n while (i.next != null) {\n i = i.next;\n ret_val++;\n }\n return ret_val;\n }", "public int sizeOfLinkedList(){\n\t\treturn size;\n\t}", "public int length(){\r\n int counter = 0;\r\n ListNode c = head;\r\n while(c != null){\r\n c = c.getLink();\r\n counter++;\r\n }\r\n return counter;\r\n }", "public int length(){\n\t\tint cnt = 0;\n\t\tNode temp = this.head;\n\t\twhile(temp != null){\n\t\t\ttemp = temp.next;\n\t\t\tcnt++;\n\t\t}\n\t\treturn cnt;\n\t}", "public int length() {\n\tif (next == null) return 1;\n\telse return 1 + next.length();\n }", "@Override\n public int size() {\n if(isEmpty()){ //if list is empty, size is 0\n return 0;\n }\n /*int size = 1; //if list is not empty, then we have at least one element in it\n DLNode<T> current = last; //a reference, pointing to the last element\n while(current.prev != null){\n current = current.prev;\n size++;\n }*/\n \n int count = 0;\n DLNode<T> p = first;\n while (p != null){\n count++;\n p = p.next;\n }\n //return size;\n return count;\n }", "public int getLength()\n\t{\n\t\tDNode tem=first;\n\t\tint length=0;\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\tlength=length+1;\n\t\t\ttem=tem.nextDNode;\n\t\t}\n\t\tif(first!=null)\n\t\t\tlength=length+1;\n\t\treturn length;\n\t}", "public int length(){\n\t\tint length = 0;\n\t\tListNode temp = firstNode;\n\t\twhile(temp!=null){\n\t\t\tlength++;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn length;\n\t}", "public int ListLength(){\n int j = 0;\n // Get index of the first element with value\n int i = StaticLinkList[MAXSIZE-1].cur;\n while (i!=0)\n {\n i = StaticLinkList[i].cur;\n j++;\n }\n return j;\n }", "public int length()\n {\n int count = 0;\n Node position = head;\n\n while(position != null)\n {\n count++;\n position = position.nLink;\n } // end while\n\n return count;\n }", "int size() {\n if (this.next.equals(this)) {\n return 0;\n }\n return this.next.size(this);\n }", "@Override\n public int size() {\n\n Node nodePointer = listHead;\n int size = 0;\n while (nodePointer != null) {\n size += 1;\n nodePointer = nodePointer.next;\n }\n return size;\n }", "public int length() \n\t//POST: FCTVAL == length of the circular linked list\n\t{\n\t\treturn length;\n\t}", "public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public double length() {\n if (first.p == null) return 0;\n double distance = 0.0;\n Node n = first;\n Node n2 = first.next;\n while (!n.next.equals(first)) {\n distance += n.p.distanceTo(n2.p);\n n = n.next;\n n2 = n2.next;\n }\n distance += n.p.distanceTo(n2.p);\n return distance;\n }", "public int size() {\n//\t\tint rtn = 0;\n//\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n//\t\t\trtn++;\t\n//\t\t}\n//\t\treturn rtn;\n\t\treturn mySize;\n\t}", "public int size() {\n ListNode current = front;\n int size = 0;\n while (current != null) {\n size += 1;\n current = current.next;\n }\n return size;\n }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "int size()\n\t{\n\t\t//Get the reference of the head of the Linked list\n\t\tNode ref = head;\n\t\t\n\t\t//Initialize the counter to -1\n\t\tint count = -1;\n\t\t\n\t\t//Count the number of elements of the Linked List\n\t\twhile(ref != null)\n\t\t{\n\t\t\tcount++;\n\t\t\tref = ref.next;\n\t\t}\n\t\t\n\t\t//Return the number of elements as the size of the Linked List\n\t\treturn count;\n\t}", "public int size()\n {\n \tDNode<E> temp=first;\n \tint count=0;\n \twhile(temp!=null)\t\t//Iterating till the end of the list\n \t{\n \t\tcount++;\n \t\ttemp=temp.next;\n \t}\n \treturn count;\n }", "public int findLength(ListNode head){\n\n int len = 0;\n ListNode curr = head;\n while(curr != null){\n curr = curr.next;\n len++;\n }\n\n return len;\n }", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "@Override\n public int size()\n {\n int numLinks = 0;\n Node currNode = this.head.next; \n while(currNode.next != null)\n {\n numLinks++;\n currNode = currNode.next;\n }\n return numLinks;\n }", "public int getSize() {\n\t\tint size = 0;\n\t\tNode current = head;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\treturn size;\n\t}", "public int length() {\n return nextindex - startIndex;\n }", "int node_size()\n {\n Node temp =headnode;\n int count=0;\n while (temp.next!=null)\n {\n count++;\n temp=temp.next;\n }\n return count;\n }", "public int size() {\n\t\t\n\t\tint count = 0;\n\t\t\n\t\t// Iterate through list and increment count until pointer cycles back to head (tail.next)\n\t\tfor (Node curr = head; curr == tail.next; curr = curr.next) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn count;\n\t}", "public int size() {\n\t\tint rtn = 0;\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\trtn++;\n\t\t}\n\t\tthis.mySize = rtn;\n\t\treturn rtn;\n\t}", "public int size() {\n\t\tint size = 0;\n\t\tnode tmp = head;\n\t\twhile(tmp != null) {\n\t\t\tsize++;\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn size;\n\t}", "private static int length(Node head) {\n Node current = head;\n // if list is empty simply return length zero\n if (head == null) {\n return 0;\n }\n int count = 1;\n while (current.next != head) {\n current = current.next;\n count++;\n }\n return count;\n }", "public int size() {\n\t\treturn recSize(head);\n\t}", "public int size() {\n\r\n int size = 0;\r\n for(Node n = head; n.getNext() != null; n = n.getNext()) {\r\n size++;\r\n }\r\n\r\n return size;\r\n }", "public int size()\n {\n int result = 0;\n SingleNode current = head;\n \n while (current != null)\n {\n result++;\n current = current.getNext();\n }\n return result;\n }", "public int size() {\n Node<T> temp = head;\n int count = 0;\n while (temp != null)\n {\n count++;\n temp = temp.next;\n }\n return count;\n }", "public int size() {\n if (first.p == null) return 0;\n int counter = 1;\n Node n = first;\n while (!n.next.equals(first) && counter != 0) {\n counter++;\n n = n.next;\n }\n return counter;\n }", "public static int LLlength(Node head) {\n\t\tint length = 0;\n\t\tNode currentNode = head;\n\t\twhile(currentNode != null) {\n\t\t\tlength++;\n\t\t\tcurrentNode = currentNode.next;\n\t\t}\n\t\treturn length;\n\t}", "public int sizeOf() {\n BookList target = this;\n int count = 0;\n if (isEmpty()){\n count= 0;\n }\n else if (!isEmpty()){\n count = 1;\n while (target.next != null){\n target = target.next;\n if(target.next == null){\n }\n \n ++count;\n }\n \n }\n\t\treturn count;\n\t}", "public int size() {\n // recursive approach seems more perspicuous\n if( headReference == null) return 0;\n else return size( headReference);\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int size()\n\t{\n\t\tint count = 0;\n\t\tSinglyLinkedListNode node = head;\n\t\twhile(head != null)\n\t\t{\n\t\t\tcount++;\n\t\t\tif(node.getNext() != null)\n\t\t\t{\n\t\t\t\tnode = node.getNext();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int size()\n {\n Node n = head.getNext();\n int count = 0;\n while(n != null)\n {\n count++; \n n = n.getNext();\n }\n return count;\n }", "public int getSize() {\n\t\tint size=0;\n\t\tfor(Node<E> p=head.next;p!=null; p=p.next){\n\t\t\tsize++;\n\t\t}\n\t\treturn size;\n\t}", "public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}", "@Override\n public Integer getSize() {\n Integer size = 0;\n Node<T> tempNode = this.head;\n while(tempNode.getNext() != null){\n tempNode = tempNode.getNext();\n size++;\n }\n return size;\n }", "public int size() {\n\t\tint count = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "public int size() {\n \t\n \tint i = 0;\n \t\n \twhile(this.front != null) {\n \t\ti = i+1;\n \t\tthis.front = this.front.next; \n \t}\n \t\n \treturn i;\n \t\n }", "public int size() {\n\t\tint count = 0;\n\t\tfor (Node<T> current = start; current == null; current = current.next) {\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "@Override\n public int size() {\n return wordsLinkedList.size();\n }", "@Override\n public int size() {\n int i = 0;\n boolean cont = true;\n Node holder = new Node();\n holder = head;\n do {\n if (isEmpty()) {\n cont = false;\n } else if (holder.getNext() == null) {\n i++;\n cont = false;\n } else {\n holder = holder.getNext();\n i++;\n }\n } while (cont == true);\n return i;\n }", "public int size(){\n if (head == null) {\n // Empty list\n return 0;\n } else {\n return head.size();\n }\n }", "public int size(){\n\t\tNode<E> current = top;\n\t\tint size = 0;\n\t\t\n\t\twhile(current != null){\n\t\t\tcurrent = current.next;\n\t\t\tsize++;\n\t\t}\n\t\t\n\t\treturn size;\n\t}", "int size(){\n return tail;\n }", "public int size() {\n if (head == null) {\n return 0;\n } else {\n int size = 0;\n while (head.getNext() != null) {\n head = head.getNext();\n size++;\n }\n return size;\n }\n }", "public int length() {\n return links.length;\n }", "public int printLength(ListNode head) {\n\t\tif (head == null) {\n\t\t\tSystem.out.println(\"Empty List\");\n\t\t}\n\t\tint count = 0;\n\t\tListNode current = head;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tcount++;\n\t\t}\n\t\t//System.out.println(\"Length of Linked List is : \" + count);\n\t\treturn count;\n\t}", "@Contract(pure = true)\n public static <E> int listLength(Node<E> head) {\n Node<E> cursor;\n int answer;\n\n answer = 0;\n for (cursor = head; cursor != null; cursor = cursor.getNext()) { answer++; }\n return answer;\n }", "public int getSize()\n {\n return ll.getSize();\n }", "public double Length()\n {\n\n return new Point3D().distance(head);\n }", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "public static int listLength( IntNode head ) {\r\n\t\tint answer = 0;\r\n\t\tfor (IntNode cursor = head; cursor != null; cursor = cursor.link) {\r\n\t\t\tanswer++;\r\n\t\t}\r\n\t\treturn answer;\r\n\t}", "public int size() {\r\n\t\t\tint size = 0;\r\n\t\t\tListNode counter = header;\r\n\t\t\twhile (counter != null) {\r\n\t\t\t\tsize++;\r\n\t\t\t\tcounter = counter.next;\r\n\t\t\t}\r\n\t\t\treturn size;\r\n\t\t}", "public int length()\n {\n if(integerList == null)\n return 0;\n else\n return integerList.length;\n }", "public int size() {\n return headReference == null ? 0 : headReference.size();\n }", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "public long size() {\n return links.length * links.length;\n }", "public int listSize(){\r\n return counter;\r\n }", "public int length() {\n\t\treturn this.n;\n\t}", "private int length() {\n\t\treturn this.lenght;\n\t}", "public int length() {\n \treturn length;\n }", "public final int getLength()\n {\n return m_firstFree;\n }", "public int length() {\n return size();\n }", "public int length() {\n return nodeList.size();\n }", "public int len() {\n return 1 + this.rest.len();\n }", "public int length()\n\t{\n\t\treturn length;\n\t}", "int length()\n\t{\n\t\treturn length;\n\t}", "@Override\n\tpublic int size() {\n\t\tif(top == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tNode<T> tempNode = top;\n\t\tint counter = 1;\n\t\twhile(tempNode.getLink() != null) {\n\t\t\tcounter++;\n\t\t\ttempNode = tempNode.getLink();\n\t\t}\n\t\treturn counter;\n\t}", "private int length() { return length; }", "@Override\n public int size()\n {\n return next;\n }", "public int height()\n {\n\treturn this.next.size();\n }", "public int length() {\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn length;\n\t}", "public int size() {\n if(head == null) {\n return 0;\n }\n \n int i = 1;\n Node<T> node = head;\n while(node.getNext() != null) {\n node = node.getNext();\n i++;\n }\n return i;\n }", "public long length() {\n return length;\n }", "public int size()\n\t{\n\t\tint count = 0;\n\t\tif(this.isEmpty())\n\t\t\treturn count;\n\t\telse\n\t\t{\n\t\t\t// Loop through and count the number of nodes.\n\t\t\tNode<T> curr = head;\t\n\t\t\twhile(curr != null)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tcurr = curr.getNext();\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}", "public int length() {\n \t \n \t //return the length\n \t return(len);\n }", "@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}", "public int size() {\n\t\t//if the head isn't null\n\t\tif (head != null) {\n\t\t\t//create a node that's set to the head\n\t\t\tLinkedListNode<T> node = head;\n\t\t\t//set number of nodes to 0\n\t\t\tint numNodes = 0;\n\n\t\t\t//while the node isn't null\n\t\t\twhile (node != null) {\n\t\t\t\t//increment the number of nodes\n\t\t\t\tnumNodes++;\n\t\t\t\t//set node to the next node\n\t\t\t\tnode = node.getNext();\n\t\t\t}\n\t\t\t//return the number of nodes\n\t\t\treturn numNodes;\n\t\t}\n\t\t//otherwise, the head is null meaning the list is empty\n\t\telse {\n\t\t\t//size is 0 (empty)\n\t\t\treturn 0;\n\t\t}\n\t}", "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "int length() {\n return this.myArrayList.size();\n }", "public int Count()\n {\n\tint total = 0;\n\tnode cur = new node();\n\tcur = Head.Next;\n\tif(cur == Head)\n\t return total;\n\twhile(cur != Head)\n\t {\n\t\ttotal++;\n\t\tcur = cur.Next;\n\t }\n\treturn total;\n }", "public int nodeSize()\n{\n\treturn getNodes().size();\n}", "public int size() {\n int found = 0;\n Node<T> it = head.get();\n // Do a raw count.\n for (int i = 0; i < capacity; i++) {\n if (!it.free.get()) {\n found += 1;\n }\n it = it.next;\n }\n return found;\n }", "public double length() {\n\t\tdouble length = 0;\n\t\tif (isEmpty())\n\t\t\treturn 0;\n\t\tjava.util.ListIterator<PathPoint> it = listIterator();\n\t\tPathPoint current = it.next();\n\t\twhile (it.hasNext()) {\n\t\t\tPathPoint next = it.next();\n\t\t\tlength += mc.distance3d(current.getLocation(), next.getLocation());\n\t\t\tcurrent = next;\n\t\t}\n\t\treturn length;\n\t}", "public int length() {\n\t\treturn size;\r\n\t}", "public int size()\r\n { \r\n return numNodes;\r\n }", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int getLength()\n\t{\n\t\treturn length;\n\t}", "public int size(){\n\t\treturn list.size();\n\t}" ]
[ "0.85197806", "0.81836855", "0.8171478", "0.8107905", "0.80140793", "0.7937197", "0.78383243", "0.7827252", "0.77585983", "0.7687707", "0.7684501", "0.7665825", "0.7647538", "0.7607818", "0.7587338", "0.7539668", "0.75308955", "0.75038", "0.74983335", "0.74176174", "0.74138767", "0.7413657", "0.73681605", "0.7362704", "0.73469186", "0.7342656", "0.73408496", "0.73404115", "0.7340205", "0.73258907", "0.7282645", "0.7281033", "0.72627956", "0.7238682", "0.7238221", "0.7228271", "0.72274125", "0.7213737", "0.71938324", "0.7185235", "0.7171614", "0.7152959", "0.7132794", "0.71177566", "0.7114748", "0.7102361", "0.7075582", "0.7030079", "0.7028769", "0.7017951", "0.70175254", "0.69932646", "0.69767904", "0.6972903", "0.69713897", "0.6953652", "0.69225925", "0.6913719", "0.69119346", "0.6911167", "0.69091463", "0.69087505", "0.69055915", "0.6902232", "0.68569094", "0.68567", "0.67849314", "0.6772374", "0.6768262", "0.67546344", "0.6752351", "0.6747668", "0.6746241", "0.67436767", "0.6730924", "0.67268133", "0.67204815", "0.67199254", "0.6708309", "0.6705338", "0.6705338", "0.6699679", "0.66976357", "0.6697122", "0.6696563", "0.66960394", "0.66925454", "0.6686869", "0.664355", "0.6639387", "0.6633573", "0.6633148", "0.6607716", "0.6604748", "0.6593331", "0.6584176", "0.6584176", "0.6583476" ]
0.66567725
90
CASE 1: Add a new value to the front of the list.(AFTER HEAD & BEFORE TAIL)
public void insertAtHead(int newValue) { DoublyLinkedList newNode = new DoublyLinkedList(newValue, head, head.getNext()); newNode.getNext().setPrev(newNode); head.setNext(newNode); length += 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void addToHead(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, head);\n\t\t\n\t\tif(head != null)\n\t\t\thead.setPrev(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\ttail = newElm;\n\t\t\t\n\t\thead = newElm;\n\t}", "void pushFront(T value) throws ListException;", "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 }", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "public void addFirst(Object value)\n {\n if(last == null && first == null)\n {\n ListNode temp = new ListNode(value, null);\n last = temp;\n first = temp;\n }\n else\n {\n first = new ListNode(value, first);\n }\n \n }", "public void prepend(int val) {\n int i = -34;\n if(head != null) {\n Node node = head;\n head = new Node();\n\n node.prev = head;\n head.next = node;\n head.val = val;\n }\n else if(head == null) {\n\n head = new Node();\n head.val = val;\n tail = head;\n }\n\n size++;\n }", "protected void addToTail(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, null, tail);\n\t\t\n\t\tif(tail != null)\n\t\t\ttail.setNext(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\thead = newElm;\n\t\t\t\n\t\ttail = newElm;\n\t}", "public void addToFront(T value) {\n\t\tstart = new Node<T>(value, start);\n\t}", "protected void insertBeginning(T value) {\r\n\t\tthis.getHead().setPrev(new SNode<T>(value, this.getHead().getPrev()));\r\n\t\tthis.size++;\r\n\t}", "void addToHead(int v) {\n if (empty) {\n x = v;\n empty = false;\n }\n else {\n next = new Lista (this);\n x = v;\n }\n }", "void insertBefore(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 insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "public void insertAtFrontOfList(T item){\n //if (contains(item) == false){\n MyDoubleNode<T> temp = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n tail.prev = temp;\n temp.next = tail;\n }\n else {\n temp.data = item;\n temp.next = head.next;\n temp.prev = head;\n head.next = temp;\n }\n //}\n }", "public void prepend(Integer data) {\n\t\tListNode tmp = new ListNode(data, head);\n\n\t\tif (null != this.head) {\n\t\t\t// asign new head:make tmp the new head:Step2\n\t\t\tthis.head = tmp;\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element and is new\n\t\t\t// tail as wells as head[see next statement executed]\n\t\t\tthis.tail = tmp;// tmp is new tail\n\t\t}\n\t\tthis.head = tmp;\n\t\tlength++;\n\t}", "public Node<T> addBefore(Node<T> listNode, T t) \r\n {\r\n Node<T> beforeNewNode = listNode.prev;\r\n Node<T> newNode = new Node<T>(t, beforeNewNode, listNode);\r\n beforeNewNode.next = newNode;\r\n listNode.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addFirst(Item item){\r\n\t\t if (item == null) throw new NullPointerException();\r\n\t\t if (n == list.length){resize(2*list.length);}\r\n\t\t if(isEmpty()){prior=0;first=0;last=0;latter=1;}\r\n\t\t list[prior--]=item;\r\n\t\t first = prior+1;\r\n\t\t if(prior==-1){prior=list.length-1;}\r\n\t\t n++;}", "public void pushFront(int val) {\n\n\t\tDLNode a = new DLNode(val);\n\t\tif (head == null) {\n\t\t\thead = tail = a;\n\t\t\telements++;\n\t\t\treturn;\n\t\t}\n\t\thead.prev = a;\n\t\ta.next = head;\n\t\thead = a;\n\t\telements++;\n\n\t}", "void prepend(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (front == null) \n\t\t{\n\t\t\tfront = back = temp; // if the list is empty the node will be the first node in the list making it the front and back node\n\t\t\tlength++;\n index = 0; //added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfront.prev=temp; //the temp node is inserted before the front\n\t\t\ttemp.next=front; //the node after temp will be the front because temp was inserted before the front\n\t\t\tfront = temp; //the front is now the temp node\n\t\t\tlength++;\n index++;//added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t}", "void prepend(int value) {\n\t\tNode n = new Node(value);\n\t\tn.next = head;\n\t\thead = n;\n\t\tlength++;\n\t\t//print();\n\t}", "public void addFirst(T value) {\n Node<T> node = new Node<T>(value);\n Node<T> next = sentinel.next;\n\n node.next = next;\n next.prev = node;\n sentinel.next = node;\n node.prev = sentinel;\n\n size += 1;\n }", "void pushBack(T value) throws ListException;", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "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 }", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "private List<T> preOrderHelper(Node<T> current, List<T> result) {\n\t\tif (current != null) {\n\t\t\tresult.add(current.getData());\n\t\t\tresult = preOrderHelper(current.getLeft(), result);\n\t\t\tresult = preOrderHelper(current.getRight(), result);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Test\n\tpublic void addNodeAtFront() {\n\t\tSystem.out.println(\"Adding a node at the front of the list\");\n\t\tdll.push(3);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.print();\n\t}", "public void pushFront(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tnode.next = head;\n\tif (null == head) {\t// the list was empty\n\t tail = node;\n\t}\n\telse {\n\t head.prev = node;\n\t}\n\thead = node;\n }", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "private void preorderHelper(ArrayList<T> list, BSTNode<T> current) {\n // look at data, left, right\n if (current.getLeft() != null) {\n list.add(current.getLeft().getData());\n preorderHelper(list, current.getLeft());\n }\n if (current.getRight() != null) {\n list.add(current.getRight().getData());\n preorderHelper(list, current.getRight());\n }\n }", "public void addAtHead(int val) {\n SingleNode cur = new SingleNode(val, head);\n head =cur;\n if(len==0) tail = cur;\n len++;\n }", "private static void recAdd(Node l, String value) {\n\t\tif (l.next == null) {\n\t\t\tl.next = new Node(value);\n\t\t\treturn;\n\t\t} else {\n\t\t\t// Base 2, the value behide the leader's value bigger than the value we want to add\n\t\t\tif (l.next.value.compareTo(value) > 0) {\n\t\t\t\tNode temp = new Node(value, l.next);\n\t\t\t\tl.next = temp;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Base 2, the value already in the list\n\t\t\telse if (l.next.value.equals(value)) {\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\t\trecAdd(l.next, value);\n\t\t\t\treturn;\n\t\t}\n\n\t}", "@Override\n\tpublic void add(L value) {\n\t\tif(value==null) throw new NullPointerException();\n\t\tListNode<L> newNode=new ListNode<>(value);\n newNode.storage=value;\n newNode.next=null;\n newNode.previous=last;\n if(last==null){\n first=newNode;\n }else {\n last.next=newNode;\n }\n last=newNode;\n\t\tthis.size++;\n\t\tthis.modificationCount++;\n\t}", "private static void Recursively(Node top) {\n\t\tif(top.next == null){\n\t\t\tlid = top;\n\t\t\treturn;\n\t\t}\n\t\tRecursively(top.next);\n\n\t\tNode newNode = top.next; //This the value we are inserting in our list\n\t\tnewNode.next = top; //now points to previous element;\n\t\ttop.next = null; //remove original pointer;\n\t}", "public void addFirst(T value){\n\tif (size == 1){\n\t data = new Object[5];\n\t size = 5;\n\t head = size / 2;\n\t tail = head + 1;\n\t hC = head;\n\t tC = tail;\n\t}\n\tif (((head-1 == tail || head == tail) && (data[head] != null && data[head-1] != null)) || (head == 0 && tail == size-1)){\n\t // System.out.println(\"need to resize first\");\n\t resize(size*2);\n\t}\n\tif (head == 0){\n\t head = size-1;\n\t if (data[head] == null || head-1 != tail){\n\t\tdata[head] = value;\n\t }\n\t}else{\n\t if (begin == true){\n\t\tdata[head] = value;\n\t\tbegin = false;\n\t }else{\n\t\tif (head-1 < size || data[head-1] == null){\n\t\t data[head-1] = value;\n\t\t head--;\n\t\t}\n\t }\n\t}\n\tnumElements++;\n }", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "public void addAtHead(int val) {\n ListNode ptr=new ListNode(val);\n ptr.next=head;\n if(head==null)\n tail=ptr;\n head=ptr;\n size++;\n // display();\n }", "private void inorderHelper(ArrayList<T> list, BSTNode<T> current) {\n if (current.getLeft() != null) {\n inorderHelper(list, current.getLeft());\n }\n list.add(current.getData());\n if (current.getRight() != null) {\n inorderHelper(list, current.getRight());\n }\n }", "public void addToStart(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n tail = current;\n } else {\n current.connectNext(head);\n head = current;\n }\n count++;\n }", "public void addBefore(E val, int idx) throws IndexOutOfBoundsException {\n addNodeBefore(new SinglyLinkedList.Node<>(val), idx);\n }", "public void add(int value) {\n if (front == null) {\n front = new ListNode(value);\n } else {\n ListNode current = front;\n while (current.next != null) {\n current = current.next;\n }\n current.next = new ListNode(value);\n }\n }", "public void addFirst(E item) {\n Node<E> n = new Node<>(item, head);\n size++;\n if(head == null) {\n // The list was empty\n head = tail = n;\n } else {\n head = n;\n }\n }", "public void addFront (E val) {\n\t\tNode <E> n = new Node(val, head);\n\t\thead = n;\n\t\tcount ++;\n\t}", "public void addToFront(T elem) {\n\t\tNode newNode = new Node();\n\t\tnewNode.value = elem;\n\t\tnewNode.next = first;\n\t\tfirst = newNode;\t\n\t}", "public static MyLinkedList addToTail(MyLinkedList list, int value) {\n\n Node toInsert = new Node(value);\n toInsert.next = null; //because it has to be the tail (last node)\n\n // If the Linked List is empty,\n // then make the new node as head\n if (list.head == null) {\n list.head = toInsert;\n } else {\n // Else traverse till the last node\n // and insert the new_node there\n Node last = list.head;\n while (last.next != null) {\n last = last.next;\n }\n // Insert the new_node at last node\n last.next = toInsert;\n }\n return list;\n }", "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n size++; // increment size\n elements[0] = t; // store element at index 0\n }", "public void add(T newVal) {\n//\t\tcreated a empty object reference and store the value of head le instance variable in it\n\t\tLinkedElement<T> temp=le;\n//\t\tif head's le have does have null value then this block will run\n\t\tif(temp==null) {\n//\t\t\tthe head's le changed with this newly created object\n\t\t\tle= new LinkedElement<T>(newVal);\n\t\t}\n//\t\tif head's le have doesn't have null value then this block will run\n\t\telse {\n//\t\t\tthis loop is used to save last object reference in temp\n\t\t\twhile(temp.le!=null) {\n\t\t\t\ttemp=temp.le;\n\t\t\t}\n//\t\tthe last object le changed with this newly created object\n\t\ttemp.le= new LinkedElement<T>(newVal);\n\t\t}\n\t\t\n\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "public void addAtStart(T value) {\n Node<T> newNode = new Node<>();\n newNode.data = value;\n newNode.next = head;\n head = newNode;\n }", "public void pushFrontRecursive(DoubleLinkedList _list) {\n\n\t\tDoubleLinkedList l = _list.clone();\n\t\tDLNode n = new DLNode(l);\n\t\tif (head == null) {\n\t\t\thead = tail = n;\n\t\t\tthis.elements = elements + l.elements;\n\t\t\treturn;\n\t\t}\n\n\t\tif (head.list == null && head.val != Integer.MIN_VALUE) {\n\t\t\tn.next = head;\n\t\t\thead.prev = n;\n\t\t\thead = n;\n\t\t\tthis.elements = elements + l.elements;\n\t\t\treturn;\n\t\t}\n\t\thead.list.pushFrontRecursive(l);\n\n\t}", "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}", "private void changeHead(Node node){\n node.next = head;\n node.pre = head == null ? null : head.pre;\n // node.pre = null;\n\n // if (head != null)\n // head.pre = node;\n\n head = node;\n \n if(end == null)\n end = head;\n }", "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 List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "@Test\n public void testAdd_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.add(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public synchronized void insertAtBegin(ListNode tmp) {\n\t\ttmp.setNext(head);\n\t\tif (null != this.head) {\n\t\t\t// asign new head:make tmp the new head:Step2\n\t\t\tthis.head = tmp;\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element and is new\n\t\t\t// tail as wells as head[see next statement executed]\n\t\t\tthis.tail = tmp;// tmp is new tail\n\t\t}\n\t\tthis.head = tmp;\n\t\tlength++;\n\t}", "public void addFirst(int value) {\n if (head == null) {\n head = new SinglyLinkedNode(value, null);\n }\n //case: one value\n else {\n SinglyLinkedNode previousHead = head;\n head = new SinglyLinkedNode(value, previousHead);\n }\n count += 1;\n }", "@Override\r\n public void addFront(T b) {\r\n head = head.addFront(b);\r\n }", "void prepend(int element) {\n Node newHead = new Node(element,head);\n head = newHead;\n }", "public void insertAtEndOfList(T item){\n //if (contains(item) == false) {\n MyDoubleNode<T> temp = new MyDoubleNode();\n MyDoubleNode<T> temp2 = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n temp.next = tail;\n tail.prev = temp;\n }\n else {\n temp.data = item;\n temp2 = tail.prev;\n temp.prev = temp2;\n temp2.next = temp;\n temp.next = tail;\n tail.prev = temp;\n\n }\n //}\n }", "public void addAtTail(int val) {\n if(len==0) {\n addAtHead(val);\n return;\n }\n SingleNode cur = new SingleNode(val, null);\n tail.next = cur;\n tail = cur;\n len++;\n }", "private Value update(Node recentNode) {\n Node temp = recentNode.next;\n Value value = temp.val;\n recentNode.next = recentNode.next.next;\n Node node = first;\n while (node.next != null) {\n node = node.next;\n }\n node.next = temp;\n temp.next = null;\n return value;\n }", "@Override\n public void insertAtBeginning(T value) {\n Node<T> new_node = new Node<>(value);\n new_node.next = start;\n start = new_node;\n }", "@Test\n public void testAddToFront() {\n DoubleLinkedList<Integer> list = new DoubleLinkedList<Integer>();\n list.addToFront(3);\n list.addToFront(2);\n list.addToFront(1);\n DLNode<Integer> head = list.getFront();\n DLNode<Integer> tail = list.getBack();\n \n assertEquals(\"Testing first node of list\", new Integer(1), head.getElement());\n assertEquals(\"Testing second node of list\", new Integer(2), head.getNext().getElement());\n assertEquals(\"Testing third node of list\", new Integer(3), head.getNext().getNext().getElement());\n assertEquals(\"Testing end of list\", null, head.getNext().getNext().getNext());\n \n assertEquals(\"Testing node at back of list\", new Integer(3), tail.getElement());\n assertEquals(\"Testing next to last node\", new Integer(2), tail.getPrevious().getElement());\n assertEquals(\"Testing third to last node\", new Integer(1), tail.getPrevious().getPrevious().getElement());\n assertEquals(\"Testing front of list\", null, tail.getPrevious().getPrevious().getPrevious());\n }", "public void addAtHead(int val) {\n addAtIndex(0, val);\n }", "public void addAtHead(int val) {\n addAtIndex(0, val);\n }", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "private void moveToHead(ListNode node) { \n\t removeFromList(node);\n\t addToFront(node);\n\t }", "public /*@ non_null @*/ JMLListEqualsNode<E> prepend(E item) {\n // cons() handles any necessary cloning\n return cons(item, this);\n }", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public void append(int val) {\n if(tail != null) {\n Node node = tail;\n tail = new Node();\n node.next = tail;\n\n tail.prev = node;\n tail.val = val;\n } else if(tail == null) {\n\n tail = new Node();\n tail.val = val;\n head = tail;\n }\n\n size++;\n }", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public void addAtTail(int val) {\n ListNode ptr=new ListNode(val);\n if(tail==null)\n head = ptr;\n else\n tail.next = ptr;\n tail = ptr;\n size++;\n // display();\n }", "public void insert(int value){\n linkedList.insertLast(value);\n }", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "private void addToHead() {\n Node currentNode = null;\n switch (head.dir) {\n case LEFT:\n currentNode = new Node(head.row - 1, head.col, head.dir);\n break;\n case RIGHT:\n currentNode = new Node(head.row + 1, head.col, head.dir);\n break;\n case UP:\n currentNode = new Node(head.row, head.col - 1, head.dir);\n break;\n case DOWN:\n currentNode = new Node(head.row, head.col + 1, head.dir);\n break;\n }\n currentNode.next = head;\n head.pre = currentNode;\n head = currentNode;\n size++;\n }", "public void add(int value) {\n\t\tif (front == null) {\n\t\t\tfront = new ListNode(value);\n\t\t} else {\n\t\t\tListNode current = front;\n\t\t\twhile (current.next != null) {\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t\t\tcurrent.next = new ListNode(value);\n\t\t}\n\t}", "public void addFirst(E e) { // adds element e to the front of the list\n // TODO\n if (size == 0) {\n tail = new Node<>(e, null);\n tail.setNext(tail);\n } else {\n Node<E> newest = new Node<>(e, tail.getNext());\n tail.setNext(newest);\n }\n size++;\n }", "protected void insertEnd(T value) {\r\n\t\tSNode<T> iterator = head;\r\n\t\twhile (iterator.getPrev() != this.tail) {\r\n\t\t\titerator = iterator.getPrev();\r\n\t\t}\r\n\t\titerator.setPrev(new SNode<T>(value, this.tail));\r\n\t\tsize++;\r\n\t}", "public boolean insertFront(int value) {\n if(size == k) return false;\n DoublyLinkedList temp = new DoublyLinkedList(value);\n DoublyLinkedList curr = head.next;\n head.next = temp;\n temp.prev = head;\n temp.next = curr;\n curr.prev = temp;\n size += 1;\n return true;\n}", "public ListNode sortedInsert(ListNode head, int value){\t\t\n\t\tListNode dummy = new ListNode(-1);\n\t\tdummy.next = head;\n\t\tListNode current = head;\n\t\t\n\t\twhile(current.next != null && current.next.value < value){\n\t\t\tcurrent = current.next;\n\t\t}\n\t\t\n\t\tListNode target = new ListNode(value);\n\t\ttarget.next = current.next;\n\t\tcurrent.next = node;\n\t\t\n\t\treturn dummy.next;\n\t}", "@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}", "private void preorderH(BSTNode<T> p, List<T> list) {\n list.add(p.getData());\n if (p.getLeft() != null) {\n preorderH(p.getLeft(), list);\n }\n\n if (p.getRight() != null) {\n preorderH(p.getRight(), list);\n }\n }", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "public void add(K value)\n {\n\tSkipListNode<K> newNode = new SkipListNode<K>(value, p); //New node with random height\n\tint h = newNode.height(); \n\thead.ensureHeight(h); \n\tArrayList<SkipListNode<K>> pred = findPredecessors(value); //ArrayList of predecessors\n\tSkipListNode<K> predNode = new SkipListNode<K>();\n\n\t//For each sub-list, adjusts next of newNode and next of predecessor\n\twhile (h > 0) {\n\t predNode = pred.get(h-1);\n\t newNode.setNext(h-1, predNode.next(h-1)); //Set next of newNode at level h-1 to h-1 predecessor's next at level h-1\n\t predNode.setNext(h-1, newNode); //Set the h-1 predecessor's next reference to newNode at level h-1\n\t h--; //Decrement h\n\t}\n\tsize++; //Increment size to indicate new node\n }", "public void addFirst(Item item) {\n Node oldFirst = first;\n first = new Node(null, item, oldFirst);\n if (oldFirst == null)\n last = first;\n else\n oldFirst.prev = first;\n size++;\n }", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "public void addToFront(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n node.setNext(front);\n front = node;\n // modify rear when adding to an empty list\n if (isEmpty()){\n rear = node;\n }\n count++;\n }", "public void append(int value) {\n\t\t\n\t\tNode temp = new Node(value);\n\t\t\n\t\t// no node available therefore this is 1st node\n\t\tif(this.head == null) {\n\t\t\thead = temp;\n\t\t}\n\t\t// 1 and more than one node available\n\t\telse {\n\t\t\tNode it = this.head; // it pointed to head pointed\n\t\t\twhile(it.next != null) { //it++ up to it.next get null\n\t\t\t\tit = it.next;\n\t\t\t}\n\t\t\t// it pointed to last node\n\t\t\tit.next = temp; // insert value at last\n\t\t\ttemp.next = null;\n\t\t}\n\t}", "public ListNode insertionSortList(ListNode head) {\n\n ListNode helper = new ListNode(0);\n ListNode pre = helper;\n ListNode cur = head;\n while(cur!=null) {\n\n while(pre.next.val < cur.val){ //keep looking until find right place\n ;\n }\n }\n return null;\n }", "public void addToHead(int i)\r\n\t{\r\n\t\tNode add = new Node(i, null);\r\n\t\tsize++;\r\n\t\t\r\n\t\t// checks if the list is empty, then adds element to head/start.\r\n\t\tif(start == null)\r\n\t\t{\r\n\t\t\tstart = add;\r\n\t\t\tend = start;\r\n\t\t}\r\n\t\telse // if the list has more values inside.\r\n\t\t{\r\n\t\t\tadd.setNext(start);\r\n\t\t\tstart = add;\r\n\t\t}\r\n\t}", "public void addFront(E d) {\n\t\t// make new node to contain d\n\t\tListNode<E> node = new ListNode<E>(d);\n\t\tif (this.head == null) {\n\t\t\t// the list is empty so make the head point at the node\n\t\t\tthis.head = node;\n\t\t\tthis.last = node;\n\t\t} else {\n\t\t\t// the list it not empty, so the old head's next points at the node\n\t\t\t// the head points at the node\n\t\t\tnode.next = this.head;\n\t\t\tthis.head = node;\n\t\t}\n\t\tthis.size++;\n\t}", "@Override\r\n public void addBack(T b) {\r\n head = head.addBack(b);\r\n }", "public void insertionRear( int val) {\r\n\t\tif(isFull()) return;\r\n\t\tLink2 newNode = new Link2(val);\r\n\t\ttail.next = newNode;\r\n\t\ttail = newNode;\r\n\t}", "public void addFront(E item) {\r\n\t\tNode<E> node = new Node<E>(item, first);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;//it would be the first node so it would be first and last\r\n\t\telse {\r\n\t\t\tfirst = node;//creates a new node and puts it in the 1st position\r\n\t\t}\r\n\t}", "public void addAtTail(int val) {\n ListNode curr = new ListNode(val);\n size++;\n if (size == 0) {\n head = curr;\n tail = curr;\n }\n tail.next = curr;\n tail = curr;\n }", "public void insertFirst(int data) { // insert at front of list\n\t\tNode newNode = new Node(data); // creation of new node.\n\t\tif (first == null) // means LinkedList is empty.\n\t\t\tlast = newNode; // newNode <--- last\n\t\telse\n\t\t\tfirst.previous = newNode; // newNode <-- old first\n\t\tnewNode.next = first; // newNode --> old first\n\t\tfirst = newNode; // first --> newNode\n\t}", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "public Item setFront(Item item) {\n // check if list is not empty:\n if(isEmpty()) throw new NoSuchElementException(\"Failed to setFront, because DList is empty!\");\n // update the data of the first actual node (first itself is a sentinel node)\n Item oldValue = first.next.data;\n first.next.data = item;\n return oldValue;\n }", "public void addFirst(Comparable o){\n\t\t head=new ListElement(o,head);\n\t }" ]
[ "0.7377282", "0.7034304", "0.67992085", "0.6786794", "0.66770834", "0.65174395", "0.65089166", "0.6494166", "0.6490549", "0.6453737", "0.6427566", "0.64005226", "0.6332149", "0.6282056", "0.62713796", "0.6269509", "0.6259891", "0.6248318", "0.6244586", "0.6228779", "0.62278086", "0.6223205", "0.62205154", "0.6216653", "0.62136644", "0.62050426", "0.6202874", "0.617304", "0.61700547", "0.6154884", "0.6153978", "0.6151551", "0.6150543", "0.61395454", "0.6134518", "0.6131821", "0.61267734", "0.61260825", "0.6123203", "0.61223704", "0.61197686", "0.6118477", "0.61132497", "0.61130226", "0.61111176", "0.609035", "0.6080849", "0.6079671", "0.60775304", "0.6062844", "0.6059855", "0.6056596", "0.604239", "0.60364115", "0.60299295", "0.6017937", "0.6003064", "0.6000859", "0.5998584", "0.599685", "0.5987629", "0.59787774", "0.5975239", "0.5974434", "0.5965374", "0.59625494", "0.5958144", "0.5951047", "0.5946483", "0.59414595", "0.59376854", "0.5932498", "0.59290916", "0.5927287", "0.5925654", "0.59237933", "0.59121966", "0.59120566", "0.5901548", "0.5899423", "0.5897322", "0.58964795", "0.58934695", "0.5890038", "0.58869016", "0.58845305", "0.5881673", "0.5880573", "0.58803654", "0.58788455", "0.5875757", "0.5863772", "0.5863164", "0.58630806", "0.58608043", "0.58604604", "0.5854743", "0.58542675", "0.5853931", "0.5853034", "0.5849422" ]
0.0
-1
CASE 2: Add a new value at a given position
public void insertAtPosition(int data, int position) { //fix the position if (position < 0) position = 0; if (position > length) position = length; //if the list is empty, this is going to be the only element in the list. if (head == null) { head = new DoublyLinkedList(data); tail = head; } //if the element is added at the front of list else if (position == 0) { DoublyLinkedList temp = new DoublyLinkedList(data); temp.next = head; head = temp; } //locate the exact position and add the element now else { DoublyLinkedList temp = head; int i = 1; while (i < position) { temp = temp.getNext(); } DoublyLinkedList newNode = new DoublyLinkedList(data); newNode.next = temp.next; newNode.prev = temp; newNode.next.prev = newNode; newNode.prev.next = newNode; // temp.next = newNode; } //finally increment the length length += 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void add(int idx, float incr);", "public void addValue(int i) {\n value = value + i;\n }", "public int addPosition(int faceValue){\n position += faceValue;\n\n if(position > 12){\n position -= 12;\n }\n return position;\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 }", "@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }", "Builder addPosition(Integer value);", "public int addValue(int i) {\n return foldIn(i);\n }", "public void add(int add) {\r\n value += add;\r\n }", "private void addCardValue(ArrayList<Integer> myList, int value)\n {\n for (int i = 0; i < myList.size(); i++)\n myList.set(i, myList.get(i) + value);\n }", "public void add1() {\r\n value++;\r\n }", "public void add(T element, int pos);", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "void insert(int idx, int val);", "void add(int index, int value) {\n int[] newItems = new int[size++];\n\n System.arraycopy(items, 0, newItems, 0, index);\n\n newItems[index] = value;\n\n System.arraycopy(items, index, newItems, index + 1, items.length - index);\n\n items = newItems;\n }", "public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}", "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 addValue() {\n addValue(1);\n }", "public void add( int index, Comparable newVal ) { \n \t//checks if there is a meaningful value at index\n \tif (index> _lastPos){\n\t System.out.println(\"No meaningful int at index\");\n \t} else {\n\t //If _data is full, increase length of _data\n\t if (_size == _data.length) {\n\t\texpand();\n\t }\t\t\n\t //copies everything before index from _data to temp \n\t for (int i = _lastPos; i >= index; i--) {\n\t\t_data[i+1]= _data[i];\n\t }\n\t _data[index]= newVal;\n\t _size++;\n\t _lastPos++;\n\t}//end else\n\t \n }", "Position<T> addAfter(Position<T> p, T data) throws IllegalStateException;", "public int addValue(char i) {\n return foldIn(i);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(int pos, T item){\n\n\t\tif(pos > data.length){\n\t\t\tcurrentsize = currentsize*2;\n\t\t}\n\n\t\n\t\tfor(int i = currentsize; i > pos; i--){\n\t\t\tdata[i] = data[i-1];\n\t\t}\n\t\tdata[pos]= item;\n\t\tcurrentsize++;\n\t}", "@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 }", "@Override\n public int incrementSecondValue(int key, int delta) {\n return array.incrementEntry((key << 1) + 1, delta);\n }", "public int insert(int value)\n {\n amount = amount + value;\n return amount;\n }", "public void add(int value) {\n m_value += value;\n }", "public int addValue(byte i) {\n return foldIn(i);\n }", "public void add(int index, double value) {\n\t\t\n\t}", "public Integer mutate(int index);", "void insert(Object value, int position);", "@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 void addToCurrX(int x) {\n currX += x;\n }", "void add(int val);", "protected int addInfo(syntaxMap toAdd){\n if(index == 10){\n return 0;\n }\n else if(index < 5) {\n this.array1[index] = toAdd;\n }\n else{\n this.array2[index - 5] = toAdd;\n }\n ++index;\n return 1;\n }", "@Override\n public boolean add(E value) {\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n this.values[index++] = value;\n return true;\n }", "public void add(Object incValue) {\n\t\tvalue = operate(\n\t\t\t\ttransform(value),\n\t\t\t\ttransform(incValue),\n\t\t\t\t(v1, v2) -> v1 + v2,\n\t\t\t\t(v1, v2) -> v1 + v2\n\t\t);\n\t}", "void add(int index, T element);", "void add(int index, T element);", "public int add(Object key, int off)\r\n {\r\n if ( key == null )\r\n return nullValue;\r\n int i;\r\n for (i = firstIndex(key); keys[i] != null; i = nextIndex(i))\r\n {\r\n if ( keys[i] == key || key.equals(keys[i]) )\r\n {\r\n values[i] += off;\r\n return values[i];\r\n }\r\n }\r\n return nullValue;\r\n }", "long getAndAdd(long delta);", "Position<T> addFirst(T data);", "void insert(T value, int position);", "void add(int value) {\n size++;\n\n int[] newItems = new int[size];\n\n System.arraycopy(items, 0, newItems, 0, items.length);\n\n newItems[newItems.length - 1] = value;\n\n items = newItems;\n }", "com.walgreens.rxit.ch.cda.IVLPPDPQ addNewOffset();", "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 add (int value) {\r\n\t\ttotal = total + value;\r\n\t\thistory = history + \" + \" + value;\r\n\t}", "Builder addPosition(String value);", "public void add(int toBeAdded) {\n\t\tif (this.myCount==this.myValues.length){\n\t\t\tSystem.err.println(\"No more space in array\");\n\t\t\tSystem.exit(1);\n\t\t}\n \tthis.myValues[this.myCount] = toBeAdded;\n this.myCount++;\n }", "void add(int value);", "public void increment(){\n value+=1;\n }", "void increase();", "void increase();", "Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;", "public void add(E value){\n if (maxIndex != array.length-1){\n array[++maxIndex] = value;\n }else {\n Object[] tmpArray = new Object[array.length+ capacity];\n for (int i = 0; i < array.length; i++) {\n tmpArray[i] = array[i];\n }\n array = tmpArray;\n array[++maxIndex] = value;\n }\n }", "public void add()\n {\n set(++ current);\n }", "public static void insertValue(int [] array, int location, int value){\n array[location -1] = value;\n System.out.println(Arrays.toString(array));\n }", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "public void add(int v, int p){\n \n \n \n }", "private int plusOne(int index) {\n if (index + 1 >= array.length) {\n return 0;\n } else {\n return index + 1;\n }\n }", "public void addLocX (int adder)\n {\n locX += adder;\n }", "public void addAfter(E val, int idx) throws IndexOutOfBoundsException {\n addNodeAfter(new SinglyLinkedList.Node<>(val), idx);\n }", "public abstract GF2nElement increase();", "private int addShift( int x ) { x += _nxx; int sz = H2O.CLOUD.size(); return x < sz ? x : x-sz; }", "public void add(int i, int k) {\n for (int m = i + 1; m <= count; m++) {\n values[m] = values[m-1];\n }\n values[i] = k;\n count++;\n }", "public int addValue(short i) {\n return foldIn(i);\n }", "@Override\n\tpublic int add(int val1, int val2) {\n\t\tthis.test++;\n\t\tSystem.out.println(this.test);\n\t\treturn val1+val2;\n\t}", "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 }", "public void addValue(int v) {\n ++totalCount;\n int i = calBucketIndex(v);\n ++buckets[i];\n }", "public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}", "@Override\n public void add(final int index, final Date value) {\n final long date = value.getTime();\n if (date2 == Long.MIN_VALUE) {\n switch (index) {\n case 0: {\n date2 = date1;\n date1 = date;\n modCount++;\n return;\n }\n case 1: {\n if (date1 == Long.MIN_VALUE) {\n break; // Exception will be thrown below.\n }\n date2 = date;\n modCount++;\n return;\n }\n }\n }\n throw new IndexOutOfBoundsException(Errors.format(Errors.Keys.IndexOutOfBounds_1, index));\n }", "private static void increasePrimitive(int value) {\n value++;\n }", "public void add(T val){\n myCustomStack[numElements] = val; // myCustomStack[0] = new value, using numElements as index of next open space\n numElements++; //increase numElements by one each time a value is added to the stack, numElements will always be one more than number of elements in stack\n resize(); //call resize to check if array needs resizing\n }", "public void addElement(int row, int value, String data) {\n if (vector[row] == null) {\n vector[row] = new TransactionIds();\n //when vector of row is null then we should increment the absolute support\n absoluteSupport++;\n }\n vector[row].add(new ListNode(value, data));\n }", "void addVelocityValue(int velocityValue);", "public void add (int value) {\n\t\ttotal = total + value;\n\n\t\thistory = history + \" + \" + value;\n\t\t\n\t}", "public Position add(Position p) {\n return new Position(r + p.getR(), c + p.getC());\n }", "public void addToBill(int newBill){\n Bill = Bill + newBill;\n }", "@Override\n\tpublic void add(int n) {\n\t\tvalues[size] = n; //add value to the list\n\t\tsize++; //increment size\n\t\tif (size == values.length){ //if the list is full expand it\n\t\t\tresize();\n\t\t}\n\t}", "org.hl7.fhir.Quantity addNewValueQuantity();", "private int plusOne(int i) {\n return (i + 1) % capacity;\n }", "public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "public void add(int index, Type t);", "public abstract void add(T element, int index);", "public int increase() {\r\n return ++value;\r\n }", "public void insert(int newItem){\n itemArray[count] = newItem;\n count++;\n }", "public int add(E value) {\r\n int index = items.size();\r\n items.add(value);\r\n return index;\r\n }", "public void push(int value){\n //To be written by student\n localSize++;\n top++;\n if(localSize>A.getSize()){\n A.doubleSize();\n try{\n A.modifyElement(value,top);\n }catch(Exception c){c.printStackTrace();}\n }\n else{try{\n A.modifyElement(value,top);\n }catch(Exception a){a.printStackTrace();} }\n }", "T put(CharSequence key, int pos, T addValue)\n\t\t{\n\t\t\tNode<T> nextNode;\n\t\t\tCharacter ch;\n\t\t\tT old;\n\n\t\t\tif(key.length() == pos)\n\t\t\t{\t// at terminating node\n\t\t\t\told = value;\n\t\t\t\tsetValue(addValue);\n\t\t\t\treturn old;\n\t\t\t}\n\t\t\tch = key.charAt(pos);\n\t\t\tif(nextMap == null)\n\t\t\t{\n\t\t\t\tnextMap = newNodeMap();\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch, nextNode);\n\t\t\t}\n\t\t\telse if((nextNode = nextMap.get(ch))==null)\n\t\t\t{\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch,nextNode);\n\t\t\t}\n\t\t\treturn nextNode.put(key,pos+1,addValue);\n\t\t}", "public Integer add(String v)\n {\n Integer pos = h(v);\n if (search(v) != -1)\n {\n return -1;\n }\n while (pos < cap && table.get(pos) != null && !table.get(pos).equals(v))\n {\n pos++;\n }\n if (pos == cap)\n {\n while (table.get(pos) != null)\n {\n pos++;\n }\n }\n table.set(pos, v);\n return pos;\n }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void add(int x, int y, int t, int v) {\n\t\tif (v < vArray[49]) {\n\t\t\treturn;\n\t\t}\n\t\t \t\n \t// find out the position\n \tint newIndex = indexOf(v);\n \t \t\n \t// shift arrays\n \tfor (int i = 49; i > newIndex; --i) {\n \t\txArray[i] = xArray[i - 1];\n \t\tyArray[i] = yArray[i - 1];\n \t\ttArray[i] = tArray[i - 1];\n \t\tvArray[i] = vArray[i - 1];\n \t}\n\n \t// put the new item in position\n \txArray[newIndex] = x;\n \tyArray[newIndex] = y;\n \ttArray[newIndex] = t;\n \tvArray[newIndex] = v;\n\t}", "public void add( Comparable newVal ) {\n \t//if _data is full, expand the array\n \tif (_size == _data.length){\n\t \texpand();\n \t}\n \t\n\tset(_lastPos + 1, newVal);\n \t//increases _lastPos and _size\n \t_lastPos++;\n \t_size++;\n }", "private Node add(int value, int pos) {\n int len = this.getlength();\n Node result = new Node(value);\n\n if (pos > len - 1) {\n System.out.println(\"out of range: added to tail\");\n result = this.add(value);\n return result;\n } else if (pos == 0) { // add to a new node's head\n if (this.value == Integer.MIN_VALUE) {\n return result;\n } else {\n result.nextNode = this;\n return result;\n }\n } else {\n Node current = this;\n Node inNode = new Node(value);\n for (int i = pos; i > 1; i--) {\n current = current.nextNode;\n }\n Node temp = current.nextNode;\n current.nextNode = inNode;\n inNode.nextNode = temp;\n return this;\n }\n }", "public void add(int element);", "public boolean insert(int val) {\n if(!valueIndex.containsKey(val)){\n valueIndex.put(val,data.size());\n data.add(val);\n return true;\n }\n return false;\n }", "void add(int index, Object element);", "float put(int idx, float val);", "public abstract void add(int index, E e);", "public void insertValue(int value) {\n if (arraySize < 50) {\n theArray[arraySize] = value;\n arraySize++;\n }\n }", "private static void addOrIncrement(HashMap<Pair<String, String>, Integer> m, Pair<String, String> p){\n // In python, this is a defaultdict.\n if(!m.containsKey(p)){\n m.put(p, 0);\n }\n m.put(p, m.get(p)+1);\n }", "public void insertValueAtIndex(int value, int index) {\n if (arraySize < 50 && index < arraySize) {\n theArray[index] = value;\n }\n }" ]
[ "0.6735805", "0.6594136", "0.6534475", "0.64605147", "0.638313", "0.6357671", "0.63344806", "0.6294734", "0.6292356", "0.625702", "0.6226846", "0.61575544", "0.61533815", "0.614504", "0.61395204", "0.61363506", "0.60749805", "0.6018751", "0.60122925", "0.6002253", "0.5960912", "0.59525365", "0.5935028", "0.5922553", "0.59209776", "0.5905539", "0.59038687", "0.58753604", "0.58695453", "0.5852385", "0.584897", "0.5836423", "0.5835421", "0.5822914", "0.5803438", "0.5802872", "0.5802872", "0.57984084", "0.5792311", "0.5781771", "0.5768311", "0.5758217", "0.5754338", "0.57540286", "0.5749912", "0.57467157", "0.5740273", "0.57394886", "0.5732098", "0.57310545", "0.57310545", "0.5727206", "0.5719677", "0.5718055", "0.5716034", "0.5715072", "0.57101625", "0.5709975", "0.56978154", "0.56932735", "0.56864244", "0.568028", "0.5678794", "0.5670287", "0.5655587", "0.5655334", "0.5647649", "0.5641234", "0.5637278", "0.5633036", "0.56307274", "0.5627942", "0.5623844", "0.56110865", "0.5605269", "0.5605002", "0.5601512", "0.5599024", "0.5594081", "0.5592816", "0.55876845", "0.55867213", "0.5575333", "0.55698925", "0.5557067", "0.5548771", "0.55480194", "0.5544035", "0.5532615", "0.5531205", "0.5525194", "0.5522905", "0.55195403", "0.5513921", "0.5510801", "0.5509938", "0.54967374", "0.54957914", "0.54937947", "0.54864633", "0.54803133" ]
0.0
-1
CASE 3: Add a node to the rear.(BEFORE TAIL)
public void insertAtTail(int newValue) { DoublyLinkedList newNode = new DoublyLinkedList(newValue, tail.getPrev(), tail); newNode.getPrev().setNext(newNode); tail.setPrev(newNode); length += 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToRear(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n // modify both front and rear when appending to an empty list\n if (isEmpty()){\n front = rear = node;\n }else{\n rear.setNext(node);\n rear = node;\n }\n count++;\n }", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "private void addAfter (Node<E> node, E item)\n {\n Node<E> temp = new Node<E>(item,node.next);\n node.next = temp;\n size++;\n }", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "public Node appendNode(Node node);", "public void append(PartialTree tree) {\r\n \tNode ptr = new Node(tree);\r\n \tif (rear == null) {\r\n \t\tptr.next = ptr;\r\n \t} else {\r\n \t\tptr.next = rear.next;\r\n \t\trear.next = ptr;\r\n \t}\r\n \trear = ptr;\r\n \tsize++;\r\n }", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "public void insertRear(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\ttail.next = newNode;\n\t\t\tnewNode.prev = tail;\n\t\t\tnewNode.next = null;\n\t\t\ttail = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "private void addNode(Node<AnyType> t) {\n \n if ( isEmpty() ) {\n \n headNode = t;\n tailNode = headNode;\n \n } else { \n \n Node<AnyType> node = getNode( size-1 );\n node.setNextNode( t );\n t.setPreviousNode( node );\n \n tailNode = t;\n \n }\n \n size++;\n \n }", "public void addNode(Node node){subNodes.add(node);}", "private void addElementNode(BaleElement nbe,int prior)\n{\n if (nbe.getBubbleType() != BaleFragmentType.NONE) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n if (cur_parent == root_element) {\n\t int j = -1;\n\t for (int i = new_children.size() - 1; i >= 0; --i) {\n\t BaleElement celt = new_children.get(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < new_children.size()) {\n\t BaleElement celt = new_children.remove(j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n else {\n\t int j = -1;\n\t for (int i = cur_parent.getElementCount() - 1; i >= 0; --i) {\n\t BaleElement celt = cur_parent.getBaleElement(i);\n\t if (celt.isComment() || celt.isEmpty()) j = i;\n\t else break;\n\t }\n\t if (j >= 0) {\n\t while (j < cur_parent.getElementCount()) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n\t }\n\t }\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent != root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = cur_parent.getElementCount();\n prior -= 1;\t\t\t// is this what we want?\n int j = n-prior;\n for (int i = 0; i < prior; ++ i) {\n\t BaleElement celt = cur_parent.getBaleElement(j);\n\t cur_parent.remove(j,j);\n\t bbe.add(celt);\n }\n }\n else if (nbe.isComment() && prior > 0 && cur_parent == root_element) {\n BaleElement.Branch bbe = (BaleElement.Branch) nbe;\n int n = new_children.size();\n int j = n-prior+1;\n for (int i = 0; i < prior-1; ++ i) {\n\t BaleElement celt = new_children.get(j);\n\t new_children.remove(j);\n\t bbe.add(celt);\n }\n }\n\n if (cur_parent == root_element) {\n new_children.add(nbe);\n }\n else {\n cur_parent.add(nbe);\n }\n}", "public Node<E> addToEnd(Node<E> node){\n Node<E> previous = tail.getPrevious();\n\n previous.setNext(node);\n node.setPrevious(previous);\n tail.setPrevious(node);\n node.setNext(tail);\n size++;\n\n return node;\n }", "public void pushRight(Item item){\n Node<Item> oldLast = last;\n last = new Node<>();\n last.item = item;\n last.next = null;\n\n if (n == 0) first = last;\n else if(oldLast!=null) oldLast.next = last;\n }", "public Node insertAfter(Node node);", "public void addAfter(MovieNode target, Object item){\n MovieNode insert = new MovieNode(item);\n insert.next = target.next;\n target.next = insert;\n size++;\n }", "private Node<E> addAfter(Node current, E toAdd) {\n\t\tif ((((Comparable<E>) toAdd).compareTo((E) current.data)) >= 0) {\n\t\t\tif (current.rightChild == null) {\n\t\t\t\tcurrent.rightChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.rightChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.rightChild, toAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tif (current.leftChild == null) {\n\t\t\t\tcurrent.leftChild = new Node(toAdd, current, null, null);\n\t\t\t\treturn current.leftChild;\n\t\t\t} else {\n\t\t\t\treturn addAfter(current.leftChild, toAdd);\n\t\t\t}\n\t\t}\n\t}", "public void add(int index, int data){\r\n if (index == 0){\r\n front = ned node(data, front){\r\n } else {\r\n node curr = front;\r\n for (int i = 0; i < index - 1; i++){\r\n curr = curr.next;\r\n }\r\n curr.next = new node(data, curr.next);\r\n }\r\n }\r\n \r\n}", "public void addAfter(T target, T element) throws NoSuchElementException{\n if(isEmpty()){\n throw new NoSuchElementException();\n }\n // find target node\n LinearNode<T> trav = front;\n while(trav != null &&\n !trav.getElement().equals(target)){\n trav = trav.getNext();\n }\n if(trav == null){\n // target not found\n throw new NoSuchElementException();\n }else if(trav == rear){\n // add to rear -> update rear\n addToRear(element);\n }else{\n // target found\n LinearNode<T> node = new LinearNode<T>(element);\n node.setNext(trav.getNext()); // make new node point to node after target\n trav.setNext(node); // make target point to new node\n count++;\n }\n }", "public void add_node(int pos, Type new_element) {\n \t \n \t //if pos_ is greater than len_ then show exception\n \t if (pos > len) {\n \t\t \n \t\t //then throw the exception\n \t\t throw new IndexOutOfBoundsException(\"your index has reached bounds\");\n \t }\n \t \n \t //now we need to go at i_th position and change the node their\n \t //give i_th node to next element of new node and for i - 1 node give next as new node\n \t else {\n \t\t \n \t\t //just create new_node with new_element as initiator\n\t\t\t //make new node\n\t\t\t node<Type> new_node = new node<>(new_element);\n \t\t \n \t\t //if i = 1 will have to change head\n \t\t if(pos == 0) {\n \t\t\t \n \t\t\t //if len is zero need to do something\n \t\t\t if (len ==0) {\n \t\t\t\t \n \t\t\t\t//just update the tail\n \t\t\t\t tail.change_element(new_element);\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //just keep tail to head\n \t\t\t\t head = new_node;\n \t\t\t\t \n \t\t\t\t //and keep tail as next of head\n \t\t\t\t head.change_next(tail);\n \t\t\t\t \n \t\t\t\t //change prev of tail to head\n \t\t\t\t tail.change_prev(head);\n \t\t\t\t\t\t \n \t\t\t }\n \t\t\t //if n = 1 the case is different\n \t\t\t else if (len ==1) {\n\n \t\t\t\t //and keep tail as next of head\n \t\t\t\t new_node.change_next(tail);\n \t\t\t\t \n \t\t\t\t //change prev of tail to head\n \t\t\t\t tail.change_prev(new_node);\n \t\t\t\t \n \t\t\t\t //change head to new_node\n head = new_node;\n \t\t\t }\n \t\t\t \n \t\t\t //else\n \t\t\t else {\n \t\t\t \n \t\t\t //just need to change next node to head\n \t\t\t new_node.change_next(head);\n \t\t\t \n \t\t\t //need to change prev of head to new_node\n \t\t\t head.change_prev(new_node);\n \t\t\t \n \t\t\t //now change head to new_node\n \t\t\t head = new_node;\n\n \t\t\t }}\n \t\t \n \t\t //now if we have pos==len then\n \t\t else if(pos == len) { \n \t\t\t \n \t\t\t //just change the tail\n \t\t\t tail.change_next(new_node);\n \t\t\t \n \t\t\t //change prev of new_node as\n \t\t\t new_node.change_prev(tail);\n \t\t\t \n \t\t\t //now change tail\n \t\t\t tail = new_node;\n \t\t\t \n \t\t }\n \t\t \n \t\t//need to go at i_th position\n \t\telse {\n \t\t\t\n \t\t\t//define curent_node as head\n \t\t\tnode<Type> current_node = head;\n \t\t\t\n \t\t\t\n \t\t\t//now run for loop from i = 0 to i = i_th pos_\n \t\t\tfor (int i = 1 ; i <= pos; i++) {\n \t\t\t\t\n \t\t\t\t//now just change value of current node to its next element\n \t\t\t\tcurrent_node = current_node.show_next();\n \t\t\t}\n \t\t\t//for next of new_node add current node\n \t\t\tnew_node.change_next(current_node);\n \t\t\t\n \t\t\t//also change prev of current_node\n \t\t\tcurrent_node.change_prev(new_node);\n \t\t\t\n \t\t\t//now set the next of pre_node to be new node\n \t\t\tcurrent_node.show_prev().change_next(new_node);\n \t\t\t\n \t\t\t//change prev of new_node\n \t\t\tnew_node.change_prev(current_node.show_prev());\n \t\t }\n \t\t//change the len_ by one\n \t\t\tlen++;\n \t }\n }", "void append(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (back == null) \n\t\t{\n\t\t\tfront = back = temp; //if the list is empty, then the new node temp becomes the front and back of the list as its the only node within the list\n\t\t\tlength++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tback.next = temp; //the next node after the back node becomes the new node temp since it was inserted into the back of the list\n\t\t\ttemp.prev = back; //the new node temp's previous node becomes the back since temp is now the new back of the list\n\t\t\tback = temp; //the new back of the list now becomes the new node temp\n\t\t\tlength++;\n\t\t}\n\t}", "public void insertionRear( int val) {\r\n\t\tif(isFull()) return;\r\n\t\tLink2 newNode = new Link2(val);\r\n\t\ttail.next = newNode;\r\n\t\ttail = newNode;\r\n\t}", "public void add(Item item) {\r\n Node x = current.prev; //prev node\r\n Node y = new Node(); //new node\r\n Node z = current; //current node\r\n y.item = item;\r\n x.next = y;\r\n y.next = z;\r\n z.prev = y;\r\n y.prev = x;\r\n n++;\r\n index++;\r\n lastAccessed = null;\r\n }", "@Override\n public void visit(Node node) {\n nodes.add(node);\n }", "public void addToFront(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n node.setNext(front);\n front = node;\n // modify rear when adding to an empty list\n if (isEmpty()){\n rear = node;\n }\n count++;\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}", "public Item push(Item item){\n N++; \n Node<Item> oldfirst = top;\n top = new Node<Item>(); //same error here: <Item> + ();\n top.item= item;\n top.next =oldfirst;\n// else{\n// top= new Node;\n// top.item =item; \n// top.next = null;\n \n// } \n }", "public void addAfter(Node prevNode , Integer newdata){\n if (prevNode==null){\n return;\n }\n\n Node n = new Node(newdata);\n n.next = prevNode.next;\n prevNode.next = n;\n\n }", "@Override\n\tpublic void addNode(Node node) {\n\t\tfrontier.addLast(node);\n\t\tif(frontier.size() > maxSize)\n\t\t\tmaxSize = frontier.size();\n\t}", "public void addBack(E data) {\r\n\t\tNode<E> node = new Node<E>(data);\r\n\t\tif(isEmpty())\r\n\t\t\tfirst = last = node;\r\n\t\telse {\r\n\t\t\tlast = last.next = node;//the last node's next node will be the new node - at the end\r\n\t\t}\r\n\t}", "public void add(T element)\r\n {\r\n Node<T> newNode = new Node<T>(element);\r\n Node<T> origPrev = prev; // remember original prev\r\n \r\n // these are needed for all 4 scenarios:\r\n newNode.next = next;\r\n prev = newNode;\r\n \r\n if (isEmpty())\r\n {\r\n front = rear = newNode;\r\n }\r\n \r\n // cursor position at front:\r\n else if (prev == null)\r\n {\r\n front = newNode;\r\n }\r\n\r\n // cursor position at rear:\r\n else if (next == null)\r\n {\r\n rear = newNode;\r\n origPrev.next = newNode;\r\n }\r\n\r\n else // cursor position in the interior:\r\n {\r\n origPrev.next = newNode;\r\n }\r\n \r\n numElements++;\r\n }", "void append(int new_data) {\n\t\tNode new_node = new Node(new_data);\n\t\tNode last = head;\n\t\tnew_node.next = null;\n\t\tif (head == null) {\n\t\t\tnew_node.prev = null;\n\t\t\thead = new_node;\n\t\t\treturn;\n\t\t}\n\t\twhile (last.next != null)\n\t\t\tlast = last.next;\n\t\tlast.next = new_node;\n\t\tnew_node.prev = last;\n\t}", "int addItem(final T pNode);", "private void addAfter(Node n, String data)\n {\n Node next = n.next;\n n.next = new Node(data, next);\n size++;\n }", "public void add (Object element)\n {\n if (position == null)\n {\n addFirst(element);//LL is empty\n position = first;\n }\n else{\n Node newNode = new Node();\n newNode.data = element; // Alias \n newNode.next = position.next; //I know who is next \n position.next =newNode; //Iterator thinks next is me\n position= newNode;// current posiion is me, little conflict if you call remove\n \n \n }\n isAfterNext = false;\n \n }", "public void enqueue(E item) {\n Node<E> oldlast = last;\n last = new Node<E>();\n last.item = item;\n last.next = null;\n if (isEmpty()) first = last;\n else oldlast.next = last;\n n++;\n }", "void append(E data) {\n Node<E> node = new Node<>(data);\n if (isNull(head)) {\n head = node;\n return;\n }\n\n Node<E> last = head;\n while (nonNull(last.next)) {\n last = last.next;\n }\n\n last.next = node;\n node.previous = last;\n }", "public void insertAtBack(T insertItem) {\n\t\tNode<T> node = new Node<T>(insertItem);\n\t\t\n\t\tif (isEmpty()) // firstNode and lastNode refer to same Object\n\t\t\tfirstNode = lastNode = node;\n\t\telse { // lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t// you can replace the two previous lines with this line: lastNode =\n\t\t\t// lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t\tsize++;\n\t}", "void append(int new_data)\n {\n /* 1. allocate node\n * 2. put in the data */\n Node new_node = new Node(new_data);\n\n Node last = head;/* used in step 5*/\n\n /* 3. This new node is going to be the last node, so\n * make next of it as NULL*/\n new_node.setNext(null);\n\n /* 4. If the Linked List is empty, then make the new\n * node as head */\n if(head == null)\n {\n new_node.setPrev(null);\n head = new_node;\n return;\n }\n\n /* 5. Else traverse till the last node */\n while(last.getNext() != null)\n last = last.getNext();\n\n /* 6. Change the next of last node */\n last.setNext(new_node);\n\n /* 7. Make last node as previous of new node */\n new_node.setPrev(last);\n }", "void append(SNode node);", "private void addNode(DLinkedNode node) {\n\t\t\tnode.pre = head;\n\t\t\tnode.post = head.post;\n\n\t\t\thead.post.pre = node;\n\t\t\thead.post = node;\n\t\t}", "public void push(Item item){\n\t\tNode oldfirst=first;\r\n\t\tfirst=new Node();\r\n\t\tfirst.item=item;\r\n\t\tfirst.next=oldfirst;\r\n\t\tN++;\r\n\t}", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }", "public void addANodeToEnd(E addData)\n\n\t{\n\t\tNode position = head;\n\t\t// when the link is null, stop the loop and add a node \n\t\twhile (position.link != null) {\n\t\t\t// get next node\n\t\t\tposition = position.link;\n\t\t}\n\t\t// add a new node to the end\n\t\tposition.link = new Node(addData, null);\n\n\t}", "public void append(int new_data) \r\n\t\t{ \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t \r\n\t\t if (head == null) \r\n\t\t { \r\n\t\t head = new Node(new_data); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t new_node.next = null; \r\n\t\t \r\n\t\t Node last = head; \r\n\t\t while (last.next != null) \r\n\t\t last = last.next; \r\n\t\t \r\n\t\t last.next = new_node; \r\n\t\t return; \r\n\t\t}", "public void insertEnd(Item item) {\n if (size == 0) insertCreator(item); // if circle is empty\n else { // if these's at least one node already\n Node temp = new Node(item, head, head.before); // creates a new node\n head.before.next = temp;\n head.before = temp;\n }\n size++;\n }", "public void add(Item item)\n\t {\n\t Node oldfirst = first;\n\t first = new Node();\n\t first.item = item;\n\t first.next = oldfirst;\n\t N++;\n\t}", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "private void addToHead() {\n Node currentNode = null;\n switch (head.dir) {\n case LEFT:\n currentNode = new Node(head.row - 1, head.col, head.dir);\n break;\n case RIGHT:\n currentNode = new Node(head.row + 1, head.col, head.dir);\n break;\n case UP:\n currentNode = new Node(head.row, head.col - 1, head.dir);\n break;\n case DOWN:\n currentNode = new Node(head.row, head.col + 1, head.dir);\n break;\n }\n currentNode.next = head;\n head.pre = currentNode;\n head = currentNode;\n size++;\n }", "void addAtBegning(int data){\n\t\t\n\t\tNode newNode = new Node(data);\n\t\tnewNode.next = head;\n\t\tif(head != null){\n\t\t\tNode temp = head;\n\t\t\twhile(temp.next != head)\n\t\t\t\ttemp = temp.next;\n\t\t\ttemp.next = newNode;\n\t\t}else{\n\t\t\tnewNode.next = newNode;\n\t\t}\n\t\thead = newNode;\n\t}", "private void addNode(DLinkedNode node){\n node.pre = head;\n node.post = head.post;\n\n head.post.pre = node;\n head.post = node;\n }", "@Override\n public void add(E e) throws NullPointerException\n {\n if(e == null)\n {\n throw new NullPointerException();\n }\n new Node(e, left, right);\n idx += 1;\n previous();\n canRemove = false;\n }", "private void addNodeAfter(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n SinglyLinkedList.Node<E> before = indexNode(idx);\n\n node.next = before.next;\n before.next = node;\n\n len += 1;\n }", "@Override\n public void addTail (E el){\n if (el == null)\n return;\n\n // it the list is empty\n if (this.size <= 0){\n this.head = new Node2<E>(el);\n this.tail = this.head;\n this.size = 1;\n return;\n }\n\n Node2<E> temp = new Node2<E>(el);\n this.tail.setNext(temp);\n this.tail = temp;\n this.size++;\n }", "public /*@ non_null @*/ JMLListEqualsNode<E> append(E item) {\n // To avoid full recursion, we build the reverse of what we want in\n // revret, then reverse it. To make sure we only clone once,\n // we let reverse do the cloning\n JMLListEqualsNode<E> ptr = this;\n JMLListEqualsNode<E> revret = null;\n //@ maintaining (* reverse(revret) concatenated with ptr equals this *);\n while (ptr != null) {\n revret = new JMLListEqualsNode<E>(ptr.val, revret); // don't clone yet\n ptr = ptr.next;\n }\n return (new JMLListEqualsNode<E>(item, revret)).reverse();\n }", "private void insert(Node node) {\n//\t\t//A*\n\t\topen.add(node);\n\t\tCollections.sort(open);\n//\t\t\n//\t\t//dfs\n//\t\topen.add(0, node);\n\t\t\n\t\t//bfs\n//\t\topen.add(node);\n\t}", "public static void addSample() {\n System.out.println(\"==test for add(value) to tail\");\n Node ll1_5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1 = new Node(1, null);\n Node lln = new Node();\n\n ll1_5 = ll1_5.add(6);\n ll1_5.printList();\n ll1_5 = ll1_5.add(7);\n ll1_5.printList();\n\n ll1 = ll1.add(2);\n ll1.printList();\n\n lln = lln.add(10);\n lln.printList();\n\n System.out.println(\"==test for add(value,pos) to delicated position\");\n Node ll1_5a = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5b = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5c = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5d = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5e = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll1_5f = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n Node ll1_2 = new Node(1, null);\n Node lln_2 = new Node();\n\n Node ll0p = ll1_5a.add(-1, 0);\n ll0p.printList();\n Node ll1p = ll1_5b.add(-2, 1);\n ll1p.printList();\n Node ll2p = ll1_5c.add(-3, 2);\n ll2p.printList();\n Node ll3p = ll1_5d.add(-4, 3);\n ll3p.printList();\n Node ll4p = ll1_5e.add(-5, 4);\n ll4p.printList();\n Node ll5p = ll1_5f.add(-6, 5);\n ll5p.printList();\n\n ll1_2 = ll1_2.add(2, 1);\n ll1_2.printList();\n\n lln_2 = lln_2.add(10, 1);\n lln_2.printList();\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "public void addToBack(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"You can't insert null\"\n + \" data in the structure.\");\n }\n if (size == 0) {\n head = new DoublyLinkedListNode<>(data);\n tail = head;\n size += 1;\n } else {\n DoublyLinkedListNode<T> newnode =\n new DoublyLinkedListNode<>(data);\n tail.setNext(newnode);\n newnode.setPrevious(tail);\n tail = newnode;\n size += 1;\n\n }\n }", "private void addNode(int index, Node<AnyType> t) throws IndexOutOfBoundsException {\n \n /**\n * -------------------------------------------\n * TODO: You fully implement this method\n * \n */\n \n \n if ( index == 0 && !isEmpty() ) {\n \n t.setNextNode( headNode );\n headNode.setPreviousNode( t );\n headNode = t;\n size++;\n \n } else if ( index == 0 && isEmpty() ) { \n \n t.setNextNode( headNode );\n headNode = t;\n size++;\n \n } else if ( index == size ) {\n \n addNode( t );\n \n } else {\n \n Node<AnyType> node = getNode( index );\n \n node.getPreviousNode().setNextNode( t );\n t.setPreviousNode( node.getPreviousNode() );\n node.setPreviousNode( t );\n t.setNextNode( node );\n \n size++;\n \n }\n \n }", "private static void insertAtEnd(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=null;\n\tNode n=head;\n\tNode last=head;\n\twhile(last.next!=null)\n\t{\n\t\tlast=last.next;\n\t}\n\tlast.next=newnode;\n\tnewnode.prev=last;\n\treturn;\n\t\n}", "@Test\n\tpublic void addNodeAtFront() {\n\t\tSystem.out.println(\"Adding a node at the front of the list\");\n\t\tdll.push(3);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.print();\n\t}", "public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}", "public void addToFront(T elem) {\r\n\tDLLNode<T> newNode = new DLLNode<T>(elem);\r\n\t\r\n\tif (header == null) {\r\n\t\theader = newNode;\r\n\t}\r\n\tif (trailer == null)\r\n\t\ttrailer = newNode;\r\n\telse {\r\n\t\tnewNode.setLink(header);\r\n\t\theader.setBack(newNode);\r\n\t\theader = newNode;\r\n\t}\r\n\tsize++;\r\n\r\n}", "public void addNode(int item) { \n //Create a new node \n Node newNode = new Node(item); \n \n //if list is empty, head and tail points to newNode \n if(head == null) { \n head = tail = newNode; \n //head's previous will be null \n head.previous = null; \n //tail's next will be null \n tail.next = null; \n } \n else { \n //add newNode to the end of list. tail->next set to newNode \n tail.next = newNode; \n //newNode->previous set to tail \n newNode.previous = tail; \n //newNode becomes new tail \n tail = newNode; \n //tail's next point to null \n tail.next = null; \n } \n }", "public void add(Node node) {\n node.next = tail;\n node.prev = tail.prev;\n tail.prev.next = node;\n tail.prev = node;\n size++;\n }", "public void addLast(Object item){\n //Using the getNode() method to retrieve the reference and then call addAfter()\n MovieNode target = getNode(size);\t//yo retreive the last MovieNode\n addAfter(target, item);\t\t\t//call the addAfter method \n }", "public RNode insertAtBack(int item) {\n if (next == null) {\n next = new RNode(item, null);\n return this;\n } else {\n next = next.insertAtBack(item);\n return this; \n }\n }", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "private void addNodeAtTheEnd(int data) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n ListNode current = head;\n while (current.next != null) {\n current = current.next;\n }\n current.next = newNode;\n }", "@Test\n\tpublic void addNodeAtEnd() {\n\t\tSystem.out.println(\"Adding a node at the End of the list\");\n\t\tdll.append(1);\n\t\tdll.append(2);\n\t\tdll.append(3);\n\t\tdll.print();\n\t}", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "public void add(T elem){\n\t\tNode<T> toAdd = new Node<T>(elem);\r\n\t\tif(this.start == null)\r\n\t\t\tthis.start = toAdd;\r\n\t\telse {\r\n\t\t\tNode<T> temp = this.start;\r\n\t\t\twhile (temp.next != null)\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\ttemp.next = toAdd;\r\n\t\t}\r\n\t}", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "public void add(Item item) {\n Node last = post.previous;\n Node node = new Node();\n node.item = item;\n node.next = post;\n node.previous = last;\n post.previous = node;\n last.next = node;\n size++;\n }", "public void enqueue (Item item){\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if(isEmpty()) {first = last;}\n else oldLast.next = last;\n N++;\n }", "protected void addingNode( SearchNode n ) { }", "@Override\r\n public T add(T item) \r\n {\n Node<T> n = new Node<T>();\r\n n.setItem(item);\r\n\r\n if (head == null) { //first one\r\n head = n;\r\n tail = n;\r\n } else {\r\n tail.setNext(n); //tail's next is the new node\r\n n.setPrevious(tail); //points the new node backwards at the tail\r\n tail = n; //sets tail to the node we added\r\n }\r\n\r\n count++;\r\n\r\n return item;\r\n }", "public void insertNewNode(int newElement ) \n { \n current = parent = grand = header; //set header value to current, parent, and grand node \n nullNode.element = newElement; //set newElement to the element of the null node \n \n //repeat statements until the element of the current node will not equal to the value of the newElement \n while (current.element != newElement) \n { \n great = grand; \n grand = parent; \n parent = current; \n \n //if the value of the newElement is lesser than the current node element, the current node will point to the current left child else point to the current right child. \n current = newElement < current.element ? current.leftChild : current.rightChild; \n \n // Check whether both the children are RED or NOT. If both the children are RED change them by using handleColors() method \n if (current.leftChild.color == RED && current.rightChild.color == RED) \n handleColors( newElement ); \n } \n \n // insertion of the new node will be fail if will already present in the tree \n if (current != nullNode) \n return; \n \n //create a node having no left and right child and pass it to the current node \n current = new RedBlackNode(newElement, nullNode, nullNode); \n \n //connect the current node with the parent \n if (newElement < parent.element) \n parent.leftChild = current; \n else \n parent.rightChild = current; \n handleColors( newElement ); \n }", "public void push(Item item) {\r\n Node oldfirst = first;\r\n first = new Node();\r\n first.item = item;\r\n first.next = oldfirst;\r\n N++;\r\n }", "@Override\n public void add(T element){\n if(isEmpty()){\n this.first = new DLLNode<T>(element);\n this.last = this.first;\n } else{\n DLLNode<T> current = this.first;\n while(current.successor!=null){\n current = current.successor;\n }\n current.successor = new DLLNode<T>(element, current,null);\n this.last = current.successor;\n this.last.previous = current;\n }\n }", "@Override\n public void addToEnd(T data){\n Node<T> dataNode = new Node<>();\n\n dataNode.setData(data);\n dataNode.setNext(null);\n\n Node<T> tempHead = this.head;\n while(tempHead.getNext() != null) {\n tempHead = tempHead.getNext();\n }\n\n tempHead.setNext(dataNode);\n }", "public void putItemLIFO(T item) {\n\t\tNode newItem = new Node(item);\n\t\tif (first == null) { \n\t\t\tfirst = newItem; \n\t\t} else {\n\t\t\tnewItem.next = first;\n\t\t\tfirst = newItem;\n\t\t}\n\t}", "public void addlast(Item item)\r\n {\r\n Node last = post.prev;\r\n Node x = new Node();\r\n x.item = item;\r\n x.next = post;\r\n x.prev = last;\r\n post.prev = x;\r\n last.next = x;\r\n n++;\r\n }", "public void insertElement(int newData)\n {\n if( root == null )\n {\n this.root = new Node(newData);\n this.actualNode = this.root;\n }\n else\n {\n Node newNode = new Node(newData);\n Node loopAux = this.actualNode;\n\n while(true)\n {\n if( !this.altMode )\n {\n if (loopAux.getLeftChild() == null)\n {\n newNode.setParent(loopAux);\n loopAux.setLeftChild(newNode);\n loopAux.incrementChildFactor();\n\n if (newData == 0)\n {\n this.actualNode = loopAux.getLeftChild();\n this.altMode = true;\n }\n break;\n\n } else if (loopAux.getRightChild() == null)\n {\n newNode.setParent(loopAux);\n loopAux.setRightChild(newNode);\n loopAux.incrementChildFactor();\n\n if (newData == 0)\n {\n this.actualNode = loopAux.getRightChild();\n this.altMode = true;\n }\n break;\n } else\n {\n if (loopAux.getLeftChild().getChildFactor() < 2)\n loopAux = loopAux.getLeftChild();\n else if (loopAux.getRightChild().getChildFactor() < 2)\n loopAux = loopAux.getRightChild();\n else\n loopAux = loopAux.getLeftChild();\n }\n }\n else if( this.altMode ) //basically the same, but nodes are added form the right side\n { // and actualNode is set to latest '0' node\n if (loopAux.getRightChild() == null)\n {\n newNode.setParent(loopAux);\n loopAux.setRightChild(newNode);\n loopAux.incrementChildFactor();\n\n if (newData == 0)\n {\n this.actualNode = loopAux.getRightChild();\n this.altMode = false;\n }\n\n break;\n\n } else if (loopAux.getLeftChild() == null)\n {\n newNode.setParent(loopAux);\n loopAux.setLeftChild(newNode);\n loopAux.incrementChildFactor();\n\n if (newData == 0)\n {\n this.actualNode = loopAux.getLeftChild();\n this.altMode = false;\n }\n\n break;\n } else\n {\n if (loopAux.getRightChild().getChildFactor() < 2)\n loopAux = loopAux.getRightChild();\n else if (loopAux.getLeftChild().getChildFactor() < 2)\n loopAux = loopAux.getLeftChild();\n else\n loopAux = loopAux.getRightChild();\n }\n }\n }\n }\n }", "public void addToEnd( int newdata ) {\t\t\r\n\t\tif( link == null )\r\n\t\t\tlink = new IntNode( newdata, null );\r\n\t\telse {\r\n\t\t\tIntNode current = link;\r\n\t\t\twhile( current.link != null ) {\r\n\t\t\t\tcurrent = current.link;\r\n\t\t\t} // end while\r\n\t\t\tIntNode newNode = new IntNode( newdata, null );\r\n\t\t\tcurrent.link = newNode;\r\n\t\t} // end else\r\n\t}", "void addFlight(Node toNode);", "public void insertAtEndOfList(T item){\n //if (contains(item) == false) {\n MyDoubleNode<T> temp = new MyDoubleNode();\n MyDoubleNode<T> temp2 = new MyDoubleNode();\n if (isEmpty()){\n temp.data = item;\n head.next = temp;\n temp.prev = head;\n temp.next = tail;\n tail.prev = temp;\n }\n else {\n temp.data = item;\n temp2 = tail.prev;\n temp.prev = temp2;\n temp2.next = temp;\n temp.next = tail;\n tail.prev = temp;\n\n }\n //}\n }", "public void addAtEnd(int item) {\n\t\t// pre: a head node is created; length doesn't matter\n\t\t// post: node added in the end; length increased\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t}\n\t\tthis.length++;\n\t}", "public void insertAfter(Node prev_node, int new_data) \r\n\t\t{ \r\n\t\t if (prev_node == null) \r\n\t\t { \r\n\t\t System.out.println(\"\\nThe given previous node cannot be null\"); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t new_node.next = prev_node.next; \r\n\t\t prev_node.next = new_node; \r\n\t\t}", "@Override\n\tpublic boolean add(E e) {\n\t\tNode<E> element = new Node<E>(e);\n\t\t// 2. Traverse to end of list\n\t\tif (root == null) {\n\t\t\troot = element;\n\t\t} else {\n\t\t\ttail.setNext(element);\n\t\t\telement.setBefore(tail);\n\t\t}\n\t\ttail = element;\n\t\treturn true;\n\t}", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public Node<E> append(Node<E> node){\n this.addToEnd(node);\n return node;\n }", "void addNode()\n {\n Node newNode = new Node(this.numNodes);\n this.nodeList.add(newNode);\n this.numNodes = this.numNodes + 1;\n }", "public void insertAfter(Node node, int data) {\n\t\tif (node == null) {\n\t\t\tSystem.out.println(\"The given previous node cannot be NULL \");\n\t\t\treturn;\n\t\t}\n\t\t/* 2. allocate node 3. put in the data */\n\t\tNode new_node = new Node(data);\n\n\t\t/* 4. Make next of new node as next of prev_node */\n\t\tnew_node.next = node.next;\n\n\t\t/* 5. Make the next of prev_node as new_node */\n\t\tnode.next = new_node;\n\n\t\t/* 6. Make prev_node as previous of new_node */\n\t\tnode.previous = node;\n\n\t\t/* 7. Change previous of new_node's next node */\n\t\tif (new_node.next != null)\n\t\t\tnew_node.next.previous = new_node;\n\t}", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "public Node<E> addToBeginning(Node<E> node){\n node.setNext(head.getNext());\n head.getNext().setPrevious(node);\n node.setPrevious(head);\n head.setNext(node);\n size++;\n return node;\n }", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "private void moveToTail(DoubleListNode node){\n \t\tnode.prev.next = node.next;\n \t\tnode.next.prev = node.prev;\n \t\ttail.prev.next = node;\n \t\tnode.prev = tail.prev;\n \t\ttail.prev = node;\n \t\tnode.next = tail;\n \t\n }" ]
[ "0.72691983", "0.6986246", "0.6961009", "0.667196", "0.65824383", "0.6581469", "0.6571282", "0.64994", "0.6495083", "0.6476832", "0.64665407", "0.6457385", "0.6388131", "0.63733673", "0.6366939", "0.6358629", "0.6324468", "0.63222194", "0.63054144", "0.6296694", "0.62920636", "0.6284542", "0.6265635", "0.62432474", "0.6242889", "0.6219149", "0.62187916", "0.61802673", "0.61791545", "0.6145817", "0.6138049", "0.61324036", "0.61152315", "0.6113462", "0.61131024", "0.6109384", "0.6101008", "0.6097343", "0.6096972", "0.60926574", "0.608635", "0.60764307", "0.6075502", "0.6075258", "0.6059938", "0.60591954", "0.6058659", "0.6056995", "0.60543644", "0.6053027", "0.605146", "0.60467845", "0.60239625", "0.60060966", "0.59968144", "0.59916484", "0.598639", "0.5984881", "0.59787863", "0.597364", "0.5971707", "0.596374", "0.5962579", "0.5957329", "0.595655", "0.59529454", "0.5947488", "0.5946271", "0.5943687", "0.59346", "0.59339476", "0.5930883", "0.592641", "0.5912064", "0.5908875", "0.5906746", "0.59017384", "0.58892417", "0.5888246", "0.5886414", "0.58751917", "0.58683634", "0.5867197", "0.5863673", "0.585646", "0.5853605", "0.5853294", "0.5850122", "0.5847653", "0.584374", "0.584207", "0.5841956", "0.5839169", "0.58380866", "0.5835695", "0.583216", "0.58317375", "0.5828025", "0.5827905", "0.58257884", "0.582493" ]
0.0
-1
String representation of the DLL
public String toString() { String result = "[]"; if (length == 0) return result; result = "[" + head.getNext().getData(); DoublyLinkedList temp = head.getNext().getNext(); while (temp != tail) { result += "," + temp.getData(); temp = temp.getNext(); } return result + "]"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return \"Module Dependency : \" + getName() + \":\" + getVersion();\n }", "public String toString() {\r\n\treturn \"interfaceID = \" + interfaceID + \"; versionInfoID = \" + versionInfoID + \"; blender = \" + blender;\r\n }", "public String getDumpString() {\n return \"[clazz = \" + clazz + \" , name = \" + name + \" , elementType = \" + elementType + \" , primitivePointerType = \" + primitivePointerType + \"]\";\n }", "public String toString()\n {\n return Native.getNumeralString(getContext().nCtx(), getNativeObject());\n }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CS1010\").get());\n }", "public String toString() {\n return path + RegistryConstants.URL_SEPARATOR + \"version:\" + version;\n }", "java.lang.String getOutputjar();", "public java.lang.String toString() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.toString():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.toString():java.lang.String\");\n }", "@Override\n public String toString() {\n if (this == UNREFERENCED_EXTERNAL) {\n return \"Unreferenced external class name\";\n } else {\n return method.getSimpleName().toString() + \"=\" + obfuscatedClassName;\n }\n }", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CFG1010\").get());\n\n // Test module with preclusions\n System.out.println(ModuleInfo.getFromModuleCode(\"GER1000\").get());\n\n // Test module with prerequisites\n System.out.println(ModuleInfo.getFromModuleCode(\"CS2040\").get());\n }", "public String toString() {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < symbolCodeBits.length; i++) {\n sb.append(String.format(\"Code %s: Symbol %d%n\", Integer.toBinaryString(symbolCodeBits[i]).substring(1),\n symbolValues[i]));\n }\n return sb.toString();\n }", "@Override\n public String toString() {\n return String.format(\"REIL function %s\", getName());\n }", "public String serialize()\n {\n return String.format(\"invuln=%b, flying=%b, canfly=%b, instabuild=%b, flyspeed=%.4f, walkspped=%.4f\", new Object[] {Boolean.valueOf(this.func_149112_c()), Boolean.valueOf(this.func_149106_d()), Boolean.valueOf(this.func_149105_e()), Boolean.valueOf(this.func_149103_f()), Float.valueOf(this.func_149101_g()), Float.valueOf(this.func_149107_h())});\n }", "public java.lang.String toString() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.toString():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.toString():java.lang.String\");\n }", "public native String toString();", "public java.lang.String toString() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.toString():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.toString():java.lang.String\");\n }", "public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Files: \\n\");\n\n\t\tfor( String file : files){\n\t\t\tbuffer.append(\"\t-\");\n\t\t\tbuffer.append(file);\n\t\t\tbuffer.append(\"\\n\");\n\t\t}\n\n\t\tthis.appendIntValueToBuffer(this.regions, \"Regions\", buffer);\n\t\tthis.appendIntValueToBuffer(this.lineAdded, \"LA\", buffer);\n\t\tthis.appendIntValueToBuffer(this.lineDeleted, \"LD\", buffer);\n\n\t\tbuffer.append(\"Functions calls: \\n\");\n\n\t\tfor(String key : this.functionCalls.keySet()) {\n\t\t\tthis.appendIntValueToBuffer(functionCalls.get(key), key, buffer);\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "public java.lang.String toString() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.toString():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.toString():java.lang.String\");\n }", "String toString(String functionName);", "public String toString()\n\t{\n\t\tString answer;\n\t\t//if the size not 0, indent 9 spaces to make room for the \"(null)<--\" that backwards will print\n\t\tif (size() != 0)\n\t\t\tanswer = \" \";\n\t\telse\n\t\t\tanswer = \"\";\n\n\t\tDLLNode cursor = head;\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tanswer = answer + cursor.data + \"-->\";\n\t\t\tcursor = cursor.next;\n\t\t}\n\n\t\tanswer = answer + \"(null)\";\n\t\treturn answer;\n\t}", "public String toString() {\n return Util.bytesToHex(getByteArray());\n }", "public String toString() {\n\t\treturn thisInstance.getInstanceClass().getName() + \" : \" + thisInstance.getInstanceInObject().getObjectId() ;\n\t}", "public String toString()\n\t{\n\t\treturn (new String(wLocalBuffer)) ;\n\t}", "public String toString ()\n {\n return \"function:\" + _vname;\n }", "public String toString() {\n StringBuffer ret = new StringBuffer(\"APDU_Buffer = \");\n ret.append(makeHex(getBytes()));\n ret.append(\" (hex) | lc = \");\n ret.append(lc);\n ret.append(\" | le = \");\n ret.append(le);\n\n // make hex representation of byte array\n return ret.toString();\n }", "public String toString() {\n\t\treturn GrilleLoader.serialize(this, false); //isGrlFormat=false\n\t}", "public static String getName() {\n\t\treturn _asmFileStr;\n\t}", "public String toString() {\n return crcValue.toString();\n }", "public String getModuleInfo() {\n\t\tString s =\n\t\t\t\"<p>Overview: Automatically discretize scalar data for the \"\n\t\t\t\t+ \"Naive Bayesian classification model.\"\n\t\t\t\t+ \"<p>Detailed Description: Given a table of Examples, define the bins for each \"\n\t\t\t\t+ \"scalar input column. </P><P>When binning Uniformly, \"\n\t\t\t\t+ \"the number of bins is determined by '<i>Number of Bins</i>' property, \"\n\t\t\t\t+ \"and the boundaries of the bins are set so that they divide evenly over the range \"\n\t\t\t\t+ \"of the binned column.</p><P>\"\n\t\t\t\t+ \" When binning by weight, '<i>Number of Items per Bin</I>' sets the size of each bin. \"\n\t\t\t\t+ \"The values are then binned so that in each bin there is the same number of items. \"\n\t\t\t\t+ \"For more details see description of property '<i>Number of Items per Bin</I>'.\"\n\t\t\t\t+ \"</P><P>Data Handling: This module does not modify the input data.\"\n\t\t\t\t+ \"<p>Scalability: The module requires enough memory to make copies of \"\n\t\t\t\t+ \"each of the scalar input columns.\";\n\n\t\treturn s;\n\t}", "@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }", "public String toString(){\n\t\treturn modulname;\n\t}", "void convertToDll1(){\n\t\t\thead=null;\n\t\t\treverseInOrder(root);\n\t\t\tprintDLL(head);\n\t\t}", "public String toDebugString();", "public String getInfoString();", "public String getString(){\n\t\treturn \t_name + String.format(\"\\nWeight: %s\", _weight) + String.format( \"\\nNumber of wheels: %s\", _numberOfWheels ) + \n\t\t\t\tString.format( \"\\nMax of speed: %s\", _maxOfSpeed ) + String.format( \"\\nMax acceleration: %s\", _maxAcceleration ) + \n\t\t\t\tString.format( \"\\nHeight: %s\", _height ) + String.format( \"\\nLength: %s\", _length ) + String.format( \"\\nWidth: %s\", _width );\n\t}", "public String toString(){\n return \"MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION - sysid:\"+sysid+\" compid:\"+compid+\" time_boot_ms:\"+time_boot_ms+\" firmware_version:\"+firmware_version+\" tilt_max:\"+tilt_max+\" tilt_min:\"+tilt_min+\" tilt_rate_max:\"+tilt_rate_max+\" pan_max:\"+pan_max+\" pan_min:\"+pan_min+\" pan_rate_max:\"+pan_rate_max+\" cap_flags:\"+cap_flags+\" vendor_name:\"+vendor_name+\" model_name:\"+model_name+\"\";\n }", "public final String mo4983Fk() {\n AppMethodBeat.m2504i(128894);\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"InstanceId:\").append(this.ddx);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"AppId:\").append(this.ddc);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"AppVersion:\").append(this.ddd);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"AppState:\").append(this.dgQ);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"AppType:\").append(this.ddz);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"CostTimeMs:\").append(this.ddA);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"Scene:\").append(this.cVR);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"StartTimeStampMs:\").append(this.ddB);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"EndTimeStampMs:\").append(this.ddC);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"path:\").append(this.bUh);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"isPreload:\").append(this.ddg);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"isPreloadPageFrame:\").append(this.deD);\n stringBuffer.append(IOUtils.LINE_SEPARATOR_WINDOWS);\n stringBuffer.append(\"networkTypeStr:\").append(this.dex);\n String stringBuffer2 = stringBuffer.toString();\n AppMethodBeat.m2505o(128894);\n return stringBuffer2;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 224,\n FQN=\"llvm::Module::getDataLayoutStr\", NM=\"_ZNK4llvm6Module16getDataLayoutStrEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module16getDataLayoutStrEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getDataLayoutStr() /*const*/ {\n return DL.getStringRepresentation();\n }", "public String toString() {\n return super.toString(Mnemonics.OPCODES[OPC.LOAD], type());\n }", "public String toString() {\n return function.toString();\n }", "public String toString(){\t\t\n //---------------------------------------------------------------------------\n StringBuffer buff=new StringBuffer(\"\\n*****ClassHelperMethods: \"); \n buff.append(\"\\tbuffer=\"+buffer.toString()); \n buff.append(\"\\theaderDefinition=\"+header); \n buff.append(\"\\tsqlTagsGeneratorTable=\"+sqlTagsGeneratorTable); \n buff.append(\"\\ttableName=\"+tableName); \n return buff.toString(); \n\t}", "public String toString()\n {\n StringBuffer sb = new StringBuffer();\n\n boolean fInterface = isInterface();\n String sMod = m_flags.toString(fInterface ? ACC_INTERFACE : ACC_CLASS);\n if (sMod.length() > 0)\n {\n sb.append(sMod)\n .append(' ');\n }\n\n sb.append(fInterface ? \"interface \" : \"class \")\n .append(m_clzName.getJavaName());\n\n ClassConstant clzSuper = m_clzSuper;\n if (clzSuper != null)\n {\n String sSuper = clzSuper.getValue();\n if (!sSuper.equals(DEFAULT_SUPER))\n {\n sb.append(\" extends \")\n .append(clzSuper.getJavaName());\n }\n }\n\n if (!m_tblInterface.isEmpty())\n {\n sb.append(fInterface? \" extends \" : \" implements \");\n Enumeration enmr = m_tblInterface.elements();\n boolean fTrailing = false;\n while (enmr.hasMoreElements())\n {\n if (fTrailing)\n {\n sb.append(\", \");\n }\n sb.append(((ClassConstant) enmr.nextElement()).getJavaName());\n fTrailing = true;\n }\n }\n\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(accessType.toString());\n if(staticMethod)\n builder.append(\" static \");\n else\n builder.append(\" \");\n builder.append(returnTypeName);\n builder.append(\" \");\n builder.append(name);\n builder.append(\"(\");\n if(arguments != null) {\n Iterator<String> it = arguments.iterator();\n if(it.hasNext()) {\n builder.append(it.next());\n }\n while(it.hasNext()) {\n builder.append(\", \");\n builder.append(it.next());\n }\n }\n builder.append(\")\");\n return builder.toString().trim();\n }", "public static String string() {\n\t\t\tString s = \"\";\n\t\t\ts += \"Locaux :\\n\";\n\t\t\tfor(String key : locaux.keySet()) {\n\t\t\t\tIdent i = locaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\t\t\ts += \"Globaux :\\n\";\n\t\t\tfor(String key : globaux.keySet()) {\n\t\t\t\tIdent i = globaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}", "public String binaryName() {\n return fullName();\n }", "public String toString (){\r\n\t\t\treturn \"[FZipFile]\"\r\n\t\t\t\t+ \"\\n name:\" + _filename\r\n\t\t\t\t+ \"\\n date:\" + _date\r\n\t\t\t\t+ \"\\n sizeCompressed:\" + _sizeCompressed\r\n\t\t\t\t+ \"\\n sizeUncompressed:\" + _sizeUncompressed\r\n\t\t\t\t+ \"\\n versionHost:\" + _versionHost\r\n\t\t\t\t+ \"\\n versionNumber:\" + _versionNumber\r\n\t\t\t\t+ \"\\n compressionMethod:\" + _compressionMethod\r\n\t\t\t\t+ \"\\n encrypted:\" + _encrypted\r\n\t\t\t\t+ \"\\n hasDataDescriptor:\" + _hasDataDescriptor\r\n\t\t\t\t+ \"\\n hasCompressedPatchedData:\" + _hasCompressedPatchedData\r\n\t\t\t\t+ \"\\n filenameEncoding:\" + _filenameEncoding\r\n\t\t\t\t+ \"\\n crc32:\" + _crc32.toString(16)\r\n\t\t\t\t+ \"\\n adler32:\" + _adler32.toString(16);\r\n\t\t}", "public String toString() {\n\t\treturn infExt + \" - \" + supExt;\n\t}", "public java.lang.String toString() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.toString():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.toString():java.lang.String\");\n }", "public static void ConvertToString() {\n\t\t_asmFileStr = _asmFile.toString();\n\t\t_asmFileStr = _asmFileStr.substring(0, _asmFileStr.lastIndexOf('.'));\n\t}", "public String toString() {\r\n\t\tStringBuffer buf = new StringBuffer();\r\n\t\tbuf.append(\"WSDL name=\");\r\n\t\tbuf.append(name);\r\n\t\tbuf.append(\", TargetNamespace=\");\r\n\t\tbuf.append(targetNamespace);\r\n\t\tbuf.append(\"\\n\");\r\n\r\n\t\tfor (Iterator iter = messages.entrySet().iterator(); iter.hasNext(); ) {\r\n\t\t\tMessage m = (Message) ((Map.Entry) iter.next()).getValue();\r\n\t\t\tbuf.append(\"Message:\");\r\n\t\t\tbuf.append(m.toString());\r\n\t\t\tbuf.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\tfor (Iterator iter = portTypes.entrySet().iterator(); iter.hasNext(); ) {\r\n\t\t\tPortType pt = (PortType) ((Map.Entry) iter.next()).getValue();\r\n\t\t\tbuf.append(\"PortType:\");\r\n\t\t\tbuf.append(pt.toString());\r\n\t\t\tbuf.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\tfor (Iterator iter = bindings.entrySet().iterator(); iter.hasNext(); ) {\r\n\t\t\tBinding binding = (Binding) ((Map.Entry) iter.next()).getValue();\r\n\t\t\tbuf.append(\"Binding:\");\r\n\t\t\tbuf.append(binding.toString());\r\n\t\t\tbuf.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\tfor (Iterator iter = services.entrySet().iterator(); iter.hasNext(); ) {\r\n\t\t\tService service = (Service) ((Map.Entry) iter.next()).getValue();\r\n\t\t\tbuf.append(\"Service:\");\r\n\t\t\tbuf.append(service.toString());\r\n\t\t\tbuf.append(\"\\n\");\r\n\t\t}\r\n\r\n\t\treturn buf.toString();\r\n\t}", "public String makeString()\n\t{\n\t\treturn \"RandomLevelSource\";\n\t}", "public String toExternalString() {\n\t\treturn new String(signature, US_ASCII);\n\t}", "public String toString(){ \n //--------------------------------------------------------------------------- \n StringBuffer buffer=new StringBuffer(\"*****GeneratorProperties:\"); \n buffer.append(\"\\tdatabaseDriver\"+databaseDriver); \n buffer.append(\"\\turlString\"+urlString); \n buffer.append(\"\\tuserName=\"+userName); \n buffer.append(\"\\tpassword=\"+password); \n buffer.append(\"\\tpackageName=\"+packageName); \n buffer.append(\"\\toutputDirectory=\"+outputDirectory); \n buffer.append(\"\\tjarFilename=\"+jarFilename); \n buffer.append(\"\\twhereToPlaceJar=\"+whereToPlaceJar); \n buffer.append(\"\\ttmpWorkDir=\"+tmpWorkDir); \n buffer.append(\"\\taitworksPackageBase=\"+aitworksPackageBase); \n buffer.append(\"\\tincludeClasses=\"+includeClasses); \n buffer.append(\"\\tincludeSource=\"+includeSource); \n buffer.append(\"\\tgeneratedClasses=\"+generatedClasses); \n return buffer.toString();\n }", "String getOutputName();", "public String toString() {\n String result = \"VersionDownload: \";\n result += \", serverType: \";\n result += serverType;\n result += \", userName: \";\n result += userName;\n result += \", userPass: \";\n result += userPass;\n result += \", versionPath: \";\n result += versionPath;\n result += \", serverPort: \";\n result += serverPort;\n result = result.replaceFirst(\", \", \"\");\n\n return result;\n }", "public static String getInterfaceName(){\r\n return getAppName()+\" \"+getAppVersion()+\" (\"+System.getProperty(\"java.vendor\")+\" \"+System.getProperty(\"java.version\")+\", \"+System.getProperty(\"os.name\")+\" \"+System.getProperty(\"os.version\")+\")\";\r\n }", "public String toString()\r\n {\r\n\t\tString value = \"\";\r\n\t\tif (endpointInterface != null && endpointInterface.length() > 0) {\r\n\t\t\tvalue += \"endpointInterface = \\\"\" + endpointInterface + \"\\\"\";\r\n\t\t}\r\n\t\tif (name != null && name.length() > 0) {\r\n\t\t\tif (value.length() != 0) {\r\n\t\t\t\tvalue += \", \";\r\n\t\t\t}\r\n\t\t\tvalue += \"name = \\\"\" + name + \"\\\"\";;\r\n\t\t}\r\n\t\tif (serviceName != null && serviceName.length() > 0) {\r\n\t\t\tif (value.length() != 0) {\r\n\t\t\t\tvalue += \", \";\r\n\t\t\t}\r\n\t\t\tvalue += \"serviceName = \\\"\" + serviceName + \"\\\"\";;\r\n\t\t}\r\n\t\tif (targetNamespace != null && targetNamespace.length() > 0) {\r\n\t\t\tif (value.length() != 0) {\r\n\t\t\t\tvalue += \", \";\r\n\t\t\t}\r\n\t\t\tvalue += \"targetNamespace = \\\"\" + targetNamespace + \"\\\"\";;\r\n\t\t}\r\n\t\tif (portName != null && portName.length() > 0) {\r\n\t\t\tif (value.length() != 0) {\r\n\t\t\t\tvalue += \", \";\r\n\t\t\t}\r\n\t\t\tvalue += \"portName = \\\"\" + portName + \"\\\"\";;\r\n\t\t}\r\n\t\tif (wsdlLocation != null && wsdlLocation.length() > 0) {\r\n\t\t\tif (value.length() != 0) {\r\n\t\t\t\tvalue += \", \";\r\n\t\t\t}\r\n\t\t\tvalue += \"wsdlLocation = \\\"\" + wsdlLocation + \"\\\"\";;\r\n\t\t}\r\n\t\tvalue = \"WebService(\" + value + \")\";\r\n\t\treturn value;\r\n\t}", "public String toString(){\t\t\n //---------------------------------------------------------------------------\n StringBuffer buff=new StringBuffer(\"\\n*****ClassSQLContract: \"); \n buff.append(\"\\tbuffer=\"+buffer.toString()); \n buff.append(\"\\theaderDefinition=\"+header); \n buff.append(\"\\tsqlTagsGeneratorTable=\"+sqlTagsGeneratorTable); \n buff.append(\"\\ttableName=\"+tableName); \n return buff.toString(); \n\t}", "public String toString() {\r\n\r\n StringBuffer sb = new StringBuffer();\r\n sb.append('(');\r\n for (int i = 0; i < parameterCount; i++) {\r\n if (i != 0)\r\n sb.append(\", \");\r\n\r\n if (returnType == null) {\r\n // This is a PROCEDURE. We only want to print the\r\n // parameter mode (ex. \"IN\", \"OUT\", \"INOUT\") for procedures--\r\n // we don't do it for functions since use of the \"IN\" keyword\r\n // is not part of the FUNCTION syntax.\r\n sb.append(parameterMode(parameterModes[i]));\r\n sb.append(' ');\r\n }\r\n if (parameterNames[i] != null) {\r\n sb.append(parameterNames[i]);\r\n sb.append(' ');\r\n }\r\n sb.append(parameterTypes[i].getSQLstring());\r\n }\r\n sb.append(')');\r\n\r\n if (returnType != null) {\r\n // this a FUNCTION, so syntax requires us to append the return type.\r\n sb.append(\" RETURNS \" + returnType.getSQLstring());\r\n }\r\n\r\n sb.append(\" LANGUAGE \");\r\n sb.append(language);\r\n\r\n if (parameterStyle != null) {\r\n sb.append(\" PARAMETER STYLE \" );\r\n sb.append(parameterStyle);\r\n }\r\n \r\n if (deterministic) { \r\n sb.append(\" DETERMINISTIC \"); \r\n }\r\n\r\n if (definersRights) { \r\n sb.append(\" EXTERNAL SECURITY DEFINER\"); \r\n }\r\n\r\n if (sqlAllowed != null) {\r\n sb.append(\" \");\r\n sb.append(sqlAllowed.getSQL());\r\n }\r\n if ((returnType == null) &&\r\n (dynamicResultSets != 0)) {\r\n // Only print dynamic result sets if this is a PROCEDURE\r\n // because it's not valid syntax for FUNCTIONs.\r\n sb.append(\" DYNAMIC RESULT SETS \");\r\n sb.append(dynamicResultSets);\r\n }\r\n\r\n if (returnType != null) {\r\n // this a FUNCTION, so append the syntax telling what to\r\n // do with a null parameter.\r\n sb.append(calledOnNullInput ? \" CALLED \" : \" RETURNS NULL \");\r\n sb.append(\"ON NULL INPUT\");\r\n }\r\n \r\n return sb.toString();\r\n }", "public String toString()\n\t{\n\t\tString scriptsOutput = \"{\";\n\t\tfor (int i=0 ; i<scripts.length ; i++)\n\t\t{\n\t\t\tscriptsOutput += scripts[i];\n\t\t\tif (i<scripts.length-1)\n\t\t\t\tscriptsOutput += \",\";\n\t\t}\n\t\tscriptsOutput += \"}\";\n\t\treturn this.agentName + \" v\" + version + \", Reporting metrics to Servers: \" + reportMetricsToServers + \", Scripts: \" + scriptsOutput;\n\t}", "public final String toString ()\r\n\t{\r\n\t\tStringBuffer retVal = new StringBuffer ();\r\n\t\tif (codeset != null)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < prolog.size (); i++)\r\n\t\t\t{\r\n\t\t\t\tConcreteElement e = (ConcreteElement)prolog.elementAt (i);\r\n\t\t\t\tretVal.append (e.toString (getCodeset ()) + \"\\n\");\r\n\t\t\t}\r\n\t\t\tif (content != null)\r\n\t\t\t\tretVal.append (content.toString (getCodeset ()));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < prolog.size (); i++)\r\n\t\t\t{\r\n\t\t\t\tConcreteElement e = (ConcreteElement)prolog.elementAt (i);\r\n\t\t\t\tretVal.append (e.toString () + \"\\n\");\r\n\t\t\t}\r\n\t\t\tif (content != null)\r\n\t\t\t\tretVal.append (content.toString ());\r\n\t\t}\r\n\t\t/**\r\n * FIXME: The other part of the version hack! Add the version\r\n * declaration to the beginning of the document.\r\n */\r\n\t\treturn versionDecl + retVal.toString ();\r\n\t}", "public String toString() {\n return new StringBuffer(\"Encrypt3DESSamples\").append(\"\").toString();\n }", "public String toString() {\n\t String outPut = \"byteValue(): \" + byteValue()\n\t \t\t+ \"\\nshortValue(): \" + shortValue()\n\t \t\t+ \"\\nintValue(): \" + intValue()\n\t \t\t+ \"\\nlongValue(): \" + longValue()\n\t \t\t+ \"\\nfloatValue(): \" + floatValue()\n\t \t\t+ \"\\ndoubleValue(): \" + doubleValue();\n\t \n\t return outPut;\n }", "@Override\n public String toString() {\n switch (this) {\n case CODE128_A:\n return \"code128A\";\n case CODE25INTER:\n return \"2/5 interleave\";\n default:\n return name();\n }\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "@Override\n public String toString() {\n StringBuilder buff = new StringBuilder();\n\n buff.append(\" refex:\");\n buff.append(informAboutUuid(this.refexUuid));\n buff.append(\" component:\");\n buff.append(informAboutUuid(this.componentUuid));\n buff.append(\" \");\n buff.append(super.toString());\n\n return buff.toString();\n }", "public String toString()\n {\n try\n {\n return Native.patternToString(Context().nCtx(), NativeObject());\n } catch (Z3Exception e)\n {\n return \"Z3Exception: \" + e.getMessage();\n }\n }", "public String toString() {\n\t\treturn \"MAVLINK_MSG_ID_PROPELLER -\" + \" propeller1:\" + propeller1\n\t\t\t\t+ \" propeller2:\" + propeller2 + \" propeller3:\" + propeller3\n\t\t\t\t+ \" propeller4:\" + propeller4 + \"\";\n\t}", "default public String strandInfo() {\n\t\treturn this.getClass().getName();\n\t}", "public String toString(){\n\t\tStringBuilder s = new StringBuilder(\"\");\n\t\ts.append(\"\\nMD2 Model details\\n\");\n\t\ts.append(\"\\tThere are \" + numFrames + \" key framess\\n\");\n\t\ts.append(\"\\tThere are \"+ point.length + \" points (XYZ coordinates)\\n\");\n\t\ts.append(\"\\tFor rendering there are \" + glComannd.length + \" triangle strips/fans\\n\");\n\t\ts.append(\"\\t and these have \" + glVertex.length + \" vertex definitions\\n\");\n\t\ts.append(\"\\tThere are \" + state.length + \" animation sequences\\n\");\n\t\ts.append(\"Estimated memory used \" + memUsage() + \" bytes for model excluding texture.\");\n\n\t\treturn new String(s);\n\t}", "public java.lang.String toDebugString () { throw new RuntimeException(); }", "String mo20732d();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "public String toString()\n {\n return getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(this)) + \"[uniqueID=\" + getID()\n + \", serviceDescription=\" + data.serviceDescription + \", updateTime=\" + data.updateTime + \", lsData\"\n + ((lsData == null) ? \"=null\" : \"[language=\" + lsData.language + \"]\") + \"]\";\n }" ]
[ "0.5902853", "0.5863904", "0.58156127", "0.58019894", "0.57986367", "0.5796126", "0.57823354", "0.57413554", "0.5736837", "0.57343584", "0.5719363", "0.56830055", "0.56781965", "0.56626105", "0.5620633", "0.5609851", "0.556225", "0.5530639", "0.5529641", "0.5507377", "0.5497249", "0.54680616", "0.545658", "0.5433358", "0.54312575", "0.54307574", "0.5429511", "0.54238796", "0.54197985", "0.5417104", "0.54150534", "0.53902483", "0.53739935", "0.537368", "0.5372528", "0.5363456", "0.5339253", "0.53212494", "0.5313969", "0.53072363", "0.53034365", "0.53000224", "0.52841854", "0.52833265", "0.52810216", "0.52730834", "0.5265376", "0.52625275", "0.5259692", "0.5254638", "0.5251415", "0.5249045", "0.5243515", "0.5230789", "0.5228134", "0.5226547", "0.52202076", "0.5218184", "0.521509", "0.5214379", "0.51996577", "0.51968646", "0.5194006", "0.51866215", "0.5185085", "0.5183776", "0.5182812", "0.5180309", "0.5176327", "0.5173103", "0.5171077", "0.51668996", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.51614934", "0.515731" ]
0.0
-1
An object that handles all types of client. Depends on annotation Client.
public interface ClientApi extends Api { /** * To parse client request * * @param message * the request message from client to be parsed * @return IsoBuffer object the implementation of {@link ConcurrentHashMap} * @throws PosException * thrown when an exception occurs during parsing */ public IsoBuffer parse(String message) throws PosException; /** * To parse emv data * * @param isoBuffer * the parsed buffer containing emv data * @return Map object containing tags and data as key value pair */ public Map<EmvTags, String> parseEmvData(IsoBuffer isoBuffer); /** * To modify the {@link IsoBuffer} object for client response. * * @param isoBuffer * the buffer need to modified for response */ public void modifyBits4Response(IsoBuffer isoBuffer, Data data); /** * To build the client message * * @param isoBuffer * the buffer holding all fields and data need to be formed as * response * @return response formed response {@link String} object need to responded * to client */ public String build(IsoBuffer isoBuffer); public String getStoredProcedure(); public Boolean checkHostToHost(); public boolean errorDescriptionRequired(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int getClientType() {\n\n return clientType;\n\n }", "public abstract Client getClient();", "interface Client {\n\n /**\n * Returns an ID string for this client.\n * The returned string should be unique among all clients in the system.\n *\n * @return An unique ID string for this client.\n */\n @Nonnull\n String getId();\n\n /**\n * Called when resources have been reserved for this client.\n *\n * @param resources The resources reserved.\n * @return <code>true</code> if, and only if, this client accepts the resources allocated. A\n * return value of <code>false</code> indicates this client does not need the given resources\n * (any more), freeing them implicitly.\n */\n boolean allocationSuccessful(@Nonnull Set<TCSResource<?>> resources);\n\n /**\n * Called if it was impossible to allocate a requested set of resources for this client.\n *\n * @param resources The resources which could not be reserved.\n */\n void allocationFailed(@Nonnull Set<TCSResource<?>> resources);\n }", "public int getType() {\n return TAXI_CLIENT_TYPE;\n }", "public Class<? extends ClientService> getObjectType() {\n\t\treturn ClientService.class;\r\n\t}", "public interface Client {\n\n}", "public ClientType getType() {\n return type;\n }", "public interface Client {\n \n /**\n * Get the unique id of current client.\n *\n * @return id of client\n */\n String getClientId();\n \n /**\n * Whether is ephemeral of current client.\n *\n * @return true if client is ephemeral, otherwise false\n */\n boolean isEphemeral();\n \n /**\n * Set the last time for updating current client as current time.\n */\n void setLastUpdatedTime();\n \n /**\n * Get the last time for updating current client.\n *\n * @return last time for updating\n */\n long getLastUpdatedTime();\n \n /**\n * Add a new instance for service for current client.\n *\n * @param service publish service\n * @param instancePublishInfo instance\n * @return true if add successfully, otherwise false\n */\n boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);\n \n /**\n * Remove service instance from client.\n *\n * @param service service of instance\n * @return instance info if exist, otherwise {@code null}\n */\n InstancePublishInfo removeServiceInstance(Service service);\n \n /**\n * Get instance info of service from client.\n *\n * @param service service of instance\n * @return instance info\n */\n InstancePublishInfo getInstancePublishInfo(Service service);\n \n /**\n * Get all published service of current client.\n *\n * @return published services\n */\n Collection<Service> getAllPublishedService();\n \n /**\n * Add a new subscriber for target service.\n *\n * @param service subscribe service\n * @param subscriber subscriber\n * @return true if add successfully, otherwise false\n */\n boolean addServiceSubscriber(Service service, Subscriber subscriber);\n \n /**\n * Remove subscriber for service.\n *\n * @param service service of subscriber\n * @return true if remove successfully, otherwise false\n */\n boolean removeServiceSubscriber(Service service);\n \n /**\n * Get subscriber of service from client.\n *\n * @param service service of subscriber\n * @return subscriber\n */\n Subscriber getSubscriber(Service service);\n \n /**\n * Get all subscribe service of current client.\n *\n * @return subscribe services\n */\n Collection<Service> getAllSubscribeService();\n \n /**\n * Generate sync data.\n *\n * @return sync data\n */\n ClientSyncData generateSyncData();\n \n /**\n * Whether current client is expired.\n *\n * @param currentTime unified current timestamp\n * @return true if client has expired, otherwise false\n */\n boolean isExpire(long currentTime);\n \n /**\n * Release current client and release resources if neccessary.\n */\n void release();\n \n /**\n * Recalculate client revision and get its value.\n * @return recalculated revision value\n */\n long recalculateRevision();\n \n /**\n * Get client revision.\n * @return current revision without recalculation\n */\n long getRevision();\n \n /**\n * Set client revision.\n * @param revision revision of this client to update\n */\n void setRevision(long revision);\n \n}", "interface myClient {\n}", "@Override\r\n\tpublic Class getClase() {\n\t\treturn Cliente.class;\r\n\t}", "public void setClientType(Byte clientType) {\r\n this.clientType = clientType;\r\n }", "private SOSCommunicationHandler getClient() {\r\n\t\treturn client;\r\n\t}", "interface ClientName {\n\t\tString getName();\n\t}", "public interface ClientType {\n /**\n * Run the client, processing the specified options.\n *\n * @param options The options extracted from the command line.\n */\n public void run(ClientOptions options);\n}", "public interface Client {\n\n\t/**\n\t * Provides the ID of the current user. In case the application doesn't have\n\t * authentication, a static ID must be defined.\n\t * \n\t * @return the ID of the current user.\n\t */\n\tString getUserId();\n\n\t/**\n\t * Provides the username of the current user. In case the application\n\t * doesn't have authentication, a static ID must be defined.\n\t * \n\t * @return the username of the current user.\n\t */\n\tString getUserUsername();\n\n\t/**\n\t * Provides the password of the current user. In case the application\n\t * doesn't have authentication, a static password must be defined.\n\t * \n\t * @return the password of the current user.\n\t */\n\tString getUserPassword();\n\t\n\t/**\n\t * Provides the password hash of the current user.\n\t * \n\t * @return the password hash of the current user.\n\t */\n\tString getUserPasswordHash();\n\t\n\t/**\n\t * Sets the password hash of the current user\n\t * \n\t * @param passwordHash the password hash of the current user.\n\t */\n\tvoid setUserPasswordHash(String passwordHash);\n\n\t/**\n\t * Sets the username of the current user\n\t * \n\t * @param username the username of the current user.\n\t */\n\tvoid setUserUsername(String username);\n\n\t/**\n\t * Provides the ability to clear the user ID, username and user password.\n\t */\n\tvoid logout();\n\t\n\t/**\n\t * Provides the ability to track the current menu item.\n\t */\n\tvoid setMenuItem(MenuItem menuItem);\n\t\n\t/**\n\t * Provides the ability to track the current resource item.\n\t */\n\tvoid setResourceItem(BaseContentItem resourceItem);\n\t\n\t/**\n\t * Provides the ability to open a resource.\n\t */\n\tvoid openResource(String resourcePath);\n\t\n\t/**\n\t * Gets a value for a key on the native storage. Native storage is provided by the framework. It consists in a way to store key/value pairs. Like the HTML5 DB, this kind of storage is cleaned up automatically if the user removes the application. This storage should be used specially if you want to share data between the HTML content and native side of the application, otherwise we highly recommend use HTML5 DB. There are two ways of store data on the native storage, globally and content-specific.\n\t *\n\t * <p>\n\t * <strong>Globally</strong>\n\t * It's global on the application. The key can be retrieved from any content in any part of the system, as well as in any part of the native code. You must take care that the key can be used by other content developer. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.getValue(MFStoreType.GLOBAL, key, callback);</li>\n\t * </ul>\n\t * </p>\n\t * <p>\n\t * <strong>Content-specific</strong>\n\t * It's connected to the current resource/menu-item. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.getValue(MFStoreType.SPECIFIC, key, callback);</li>\n\t * </ul>\n\t * </p>\n\t * \n\t * @param type\t\tThe type of the native storage.\n\t * @param key\t\tThe key name.\n\t */\n\tString getValue(String type, String key);\n\t\n\t/**\n\t * Sets a value for a key on the native storage. Native storage is provided by the framework. It consists in a way to store key/value pairs. Like the HTML5 DB, this kind of storage is cleaned up automatically if the user removes the application. This storage should be used specially if you want to share data between the HTML content and native side of the application, otherwise we highly recommend use HTML5 DB. There are two ways of store data on the native storage, globally and content-specific.\n\t * <p>\n\t * <strong>Globally</strong>\n\t * It's global on the application. The key can be retrieved from any content in any part of the system, as well as in any part of the native code. You must take care that the key can be used by other content developer. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.setValue(MFStoreType.GLOBAL, key, value, callback);</li>\n\t * </ul>\n\t * </p>\n\t * <p>\n\t * <strong>Content-specific</strong>\n\t * It's connected to the current resource/menu-item. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.setValue(MFStoreType.SPECIFIC, key, value, callback);</li>\n\t * </ul>\n\t * </p>\n\t * \n\t * @param type\t\tThe type of the native storage.\n\t * @param key\t\tThe key name.\n\t * @param value\t\tThe value.\n\t */\n\tboolean setValue(String type, String key, String value);\n\n\t/**\n\t * Forces a sync. This method should be only used when user has set\n\t * {@link SyncType} to MANUAL.\n\t * \n\t */\n\tvoid sync();\n\n\t/**\n\t * Tracks the access to the current object. The time spent on this object is\n\t * calculated between calls to this method.\n\t * \n\t * @param sender\t\t\tThe sender. This will be 'mf' for internal mobile framework calls. It's a string value.\n\t * @param additionalInfo \tOptional additional information. This information must be used by content developers to track internal pages.\n\t */\n\tvoid track(String sender, String additionalInfo);\n\t\n\t/**\n\t * Tracks some information.\n\t * \n\t * @param sender\t\t\tThe sender. This will be 'mf' for internal mobile framework calls. It's a string value.\n\t * @param objectId\t\t\tObjectId.\n\t * @param additionalInfo \tOptional additional information. This information must be used by content developers to track internal pages.\n\t */\n\tvoid track(String sender, String objectId, String additionalInfo);\n\n\t/**\n\t * Provides the list of all available packages, installed or not.\n\t * \n\t * @param callback\n\t * the list of all available packages.\n\t */\n\tvoid getPackageCatalogue(PackageCatalogueRetrieved callback);\n\t\n\t/**\n\t * Retrieves the local path root for a particular course.\n\t * \n\t * @param courseId\t\t\tThe course id.\n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function. \n\t */\n\tvoid getCourseLocalPathRoot(String courseId, String phoneGapCallback, GetCourseLocalPathRootCompleted callback);\n\t\n\t/**\n\t * Retrieves the local path root for the currently opened course.\n\t * \n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function. \n\t */\n\tvoid getCurrentCourseLocalPathRoot(String phoneGapCallback, GetCourseLocalPathRootCompleted callback);\n\t\n\t/**\n\t * Initialises a temporary folder for the currently opened course.\n\t * If the folder already exists, the folder will be cleared. If it does not exist, it will be created.\n\t * \n\t * Callback will return a JSON object with the following key and value pairs:\n\t * \ttempFolderPath\tThe full local path to the temporary folder in the course directory. E.g. /mnt/sdcard/.../{uniqueCourseFolderId}/temp\n\t * \n\t * Error callback will return a JSON object with the following key and value pairs:\n\t * error\t\t\tAn error string to determine why the native method call failed.\n\t * \n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function. \n\t */\n\tvoid initialiseCurrentCourseLocalTempFolder(String phoneGapCallback, InitialiseCurrentCourseLocalTempFolderCompleted callback);\n\t\n\t/**\n\t * Clears the temporary folder for the currently opened course.\n\t * If the folder exists, the folder will be cleared and removed. If the folder does not exist, an error will occur.\n\t * \n\t * Callback will not return a value and will be invoked when the operation has finished.\n\t * \n\t * Error callback will return a JSON object with the following key and value pairs:\n\t * error\t\t\tAn error string to determine why the native method call failed.\n\t * \n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function.\n\t */\n\tvoid clearCurrentCourseLocalTempFolder(String phoneGapCallback, PhoneGapOperationNoResultCompleted callback);\n}", "public Byte getClientType() {\r\n return clientType;\r\n }", "@Override\n\t\tpublic Client getClient(int idClient) {\n\t\t\treturn null;\n\t\t}", "protected void configureClient() {\n\t\tswitch (getVariant(ClientRegistration.class)) {\n\t\tcase STATIC_CLIENT:\n\t\t\tcallAndStopOnFailure(GetStaticClientConfiguration.class);\n\t\t\tconfigureStaticClient();\n\t\t\tbreak;\n\t\tcase DYNAMIC_CLIENT:\n\t\t\tcallAndStopOnFailure(StoreOriginalClientConfiguration.class);\n\t\t\tcallAndStopOnFailure(ExtractClientNameFromStoredConfig.class);\n\t\t\tconfigureDynamicClient();\n\t\t\tbreak;\n\t\t}\n\n\t\texposeEnvString(\"client_id\");\n\n\t\tcompleteClientConfiguration();\n\t}", "@Override\n\tpublic Boolean isClient() {\n\t\treturn true;\n\t}", "public Client getClient() {\n return client;\n }", "public Client getClient() {\n return client;\n }", "default Client getClient(Long id) {\r\n return get(Client.class, id);\r\n }", "@Override\n\tpublic boolean isClient() {\n\t\treturn true;\n\t}", "public ClientI getClient() {\n\t\treturn client;\n\t}", "public interface Client {\n /**\n * Called when a link is clicked by the user.\n * @param itemId The ContentId of the item currently being shown in the InfoBar.\n */\n void onLinkClicked(@Nullable ContentId itemId);\n\n /**\n * Called when the InfoBar is closed either implicitly or explicitly by the user.\n * @param explicitly Whether the InfoBar was closed explicitly by the user from close\n * button.\n */\n void onInfoBarClosed(boolean explicitly);\n }", "public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }", "protected Client getRealClient() {\n\t\treturn client;\n\t}", "public Client getClient() {\n\t\tcheckInit();\n\t\tfinal Client cli = tenant.getContext().getBean(Client.class);\n\t\tif (cli.getEventMapper()==null) {\n\t\t\tcli.setEventMapper(getEventMapper());\n\t\t}\n\t\treturn cli;\n\t}", "public Client getClient() {\n\t\treturn client;\n\t}", "public Client getClient() {\n\t\treturn client;\n\t}", "@Override\n public void modifyClientObjectDefinition(RPClass client) {\n }", "public Client getClient() {\r\n\t\treturn this.client;\r\n\t}", "public void setClient(Client client) {\r\n\t\tthis.client = client;\r\n\t}", "public void setClient(Client client_) {\n\t\tclient = client_;\n\t}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "@Override\r\n\tpublic Client consulterClient(Long codeClient) {\n\t\treturn dao.consulterClient(codeClient);\r\n\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "Cliente(){}", "@Override\n public io.emqx.exhook.ClientInfoOrBuilder getClientinfoOrBuilder() {\n return getClientinfo();\n }", "public interface IClient {\n\n public <E> NetConfig<E> buildStringRequest(NetConfig<E> config);\n\n public <E> NetConfig<E> buildJsonRequest(NetConfig<E> config);\n\n public <E> NetConfig<E> buildStandardJsonRequest(NetConfig<E> config);\n\n public<E> NetConfig<E> buildDownloadRequest(NetConfig<E> config);\n\n <E> NetConfig<E> buildUpLoadRequest(NetConfig<E> config);\n\n <E> NetConfig<E> start(NetConfig<E> config);\n\n <E> NetConfig<E> cancel(NetConfig<E> config);\n\n}", "public interface Client extends ClientBase {\n\n\t/**\n\t * Adds a new listener for the client.<br>\n\t * <b>Note</b> that listeners should be added immediately when receiving the incoming notification.\n\t */\n\tpublic Client addListener(ClientListener listener);\n\n}", "public Client(Client client) {\n\n }", "public String getClientType() {\n return (String)getAttributeInternal(CLIENTTYPE);\n }", "public ServerInfo clientInterface()\n {\n return client_stub;\n }", "public static IClient clientAccessor() {\n return Application.getGame().getClientAccessor();\n }", "public void setClient(Client client) {\n\t\tthis.client = client;\n\t}", "public interface RestClientInt {\n\n /**\n * It performs a GET request\n * \n * @param client registration ID\n * \t\t\t (can be null\n * @param url\n * @param headers\n * (can be null)\n * @param queryParameters\n * (can be null)\n * @return\n */\n public ClientResponse performGetRequest(String clientRegistrationID, URL url, Map<String, String> headers, Map<String, String> queryParameters);\n\n /**\n * It returns the body representation of the HTTP response\n * \n * @param <T>\n * @param response\n * @param clazz\n * -> Class to use when parsing the response body\n * @return\n */\n public <T> T getBodyFromResponse(ClientResponse response, Class<T> clazz);\n\n}", "public SampleModelDoctorImpl(Object client)\n {\n clientDoctor = (SampleClientDoctor) client;\n }", "public interface ClientService {\n\n /**\n * This service adds the given client to the database.\n * Afterwards with the help of ClientEntity the Client will be persistent.\n *\n * @param client is the Client to add.\n * @return This service returns the persistent DB Client.\n * @throws BaseException as exception.\n */\n Client addClient(Client client) throws BaseException;\n\n /**\n * Update a client service.\n *\n * @param client the client to be updated.\n * @return updated client.\n * @throws BaseException as exception.\n */\n Client updateClient(Client client) throws BaseException;\n\n /**\n * Find client by ID.\n * @param id the ID of a client.\n * @return a client.\n * @throws BaseException as exception.\n */\n Client findClientById(Long id) throws BaseException;\n\n /**\n * It gives back a list of clients, belonging to a user.\n * @param user the employee.\n * @return list of clients.\n * @throws BaseException as exception.\n */\n List<ClientResponse> findUsersClient(User user) throws BaseException;\n}", "protected void setClient(Client _client) {\n\t\tclient = _client;\n\t}", "public ICliente getCodCli();", "@Override\r\n\tpublic void addclient(Client client) {\n\t\t\r\n\t}", "private void setClient(ClientImpl model) {\n if (client == null) {\n this.client = model;\n }\n }", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "private ClientController(){\n\n }", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public static DucktalesClient getClient() {\n \treturn client;\n }", "@Override\n\tpublic Player getClient() {\n\t\treturn client;\n\t}", "private ClientController() {\n }", "public EO_ClientsImpl() {\n }", "@Override\n\tpublic void setClient(Client client) {\n\t\tlog.warn(\"setClient is not implemented\");\n\t}", "Client getClient();", "public Client getSomeClient() {\n return new Client(3L, \"Yulian\", \"Tsvetkovskiy\", 20, null);\n }", "@Override\n\tpublic Client getClientById(int id) {\n\t\treturn null;\n\t}", "protected HeavyClient getClient() {\n\t\treturn client;\n\t}", "@JacksonInject\n public void setClient(HttpClient client) {\n this.client = client;\n }", "public interface ClientType {\n String RED = \"红方\";\n String BLUE = \"蓝方\";\n String AUDIENCE = \"观战者\";\n}", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public interface ICordysGatewayClientFactory\r\n{\r\n /**\r\n * Return a client (the factory is also responsable for creating the gateway).\r\n *\r\n * @return A cordys gateway client.\r\n */\r\n ICordysGatewayClient getGatewayClientInstance();\r\n}", "public interface Client<C extends Client<C,S>, S extends Server<S,C>> {\n\n\t/**\n\t * Callback called when the connection to the server has been established. Should not be called\n\t * directly from the server.\n\t */\n\tvoid onOpen();\n\n\t/**\n\t * Callback called when the connection to the server has been closed. Should not be called\n\t * directly from the server.\n\t */\n\tvoid onClose();\n\n\t/**\n\t * Called when an error occurs while trying to send a message to the server.\n\t * @param error the error that occurred.\n\t */\n\tvoid onError(Throwable error);\n}", "private static JsonClient toBasicJson(Client client) {\r\n\t\tJsonClient jsonClient = new JsonClient();\r\n\t\tapplyBasicJsonValues(jsonClient, client);\r\n\t\treturn jsonClient;\r\n\t}", "public interface IClient extends Remote, Serializable {\n /**\n * @param auction\n * @throws RemoteException\n */\n void newAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param auction\n * @throws RemoteException\n */\n void submit(AuctionBean auction) throws RemoteException;\n\n /**\n * @param buyer\n * @throws RemoteException\n */\n void bidSold(IClient buyer) throws RemoteException;\n\n /**\n * @param auctionID\n * @param price\n * @throws RemoteException\n */\n void newPrice(UUID auctionID, int price) throws RemoteException;\n\n /**\n * @return\n * @throws RemoteException\n */\n String getName() throws RemoteException;\n\n ClientState getState() throws RemoteException;\n\n void setState(ClientState newState) throws RemoteException;\n}", "@Override\n\tpublic SACliente generarSACliente() {\n\t\treturn new SAClienteImp();\n\t}", "public void setClientType(String value) {\n setAttributeInternal(CLIENTTYPE, value);\n }", "@Override\n public KimbleClient[] clientStartInfo() {\n return clients;\n }", "public interface IXoClientHost {\n\n public ScheduledExecutorService getBackgroundExecutor();\n public ScheduledExecutorService getIncomingBackgroundExecutor();\n public IXoClientDatabaseBackend getDatabaseBackend();\n public KeyStore getKeyStore();\n public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();\n public InputStream openInputStreamForUrl(String url) throws IOException;\n\n public String getClientName();\n public String getClientLanguage();\n public String getClientVersionName();\n public int getClientVersionCode();\n public String getClientBuildVariant();\n public Date getClientTime();\n\n public String getDeviceModel();\n\n public String getSystemName();\n public String getSystemLanguage();\n public String getSystemVersion();\n}", "public ArkFolioClientFactory(HttpClient client) {\n\t\tthis.client = client;\n\t}", "public interface ClientService {\n Client save(Client client);\n Client getClientById(Long id);\n Client updateClient(Client client);\n Client deleteClient(Long id);\n}", "public interface ClientsInterface {\r\n\t/**\r\n\t * Gibt die Anzahl an Kunden in der Warteschlange an.\r\n\t * @return\tAnzahl an Kunden in der Warteschlange\r\n\t */\r\n\tint count();\r\n\r\n\t/**\r\n\t * Legt fest, dass ein bestimmter Kunde für den Weitertransport freigegeben werden soll.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t */\r\n\tvoid release(final int index);\r\n\r\n\t/**\r\n\t * Liefert den Namen eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tName des Kunden\r\n\t */\r\n\tString clientTypeName(final int index);\r\n\r\n\t/**\r\n\t * Liefert die ID der Station, an der der aktuelle Kunde erzeugt wurde oder an der ihm sein aktueller Typ zugewiesen wurde.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tID der Station\r\n\t */\r\n\tint clientSourceStationID(final int index);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Daten-Element eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tdouble clientData(final int index, final int data);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Daten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientData(final int index, final int data, final double value);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Textdaten-Element eins Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tString clientTextData(final int index, final String key);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Textdaten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientTextData(final int index, final String key, final String value);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingTime(int)\r\n\t */\r\n\tdouble clientWaitingSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tString clientWaitingTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Wartezeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tWartezeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tvoid clientWaitingSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferTime(int)\r\n\t */\r\n\tdouble clientTransferSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tString clientTransferTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Transferzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tTransferzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tvoid clientTransferSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessTime(int)\r\n\t */\r\n\tdouble clientProcessSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tString clientProcessTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Bedienzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tBedienzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tvoid clientProcessSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceTime(int)\r\n\t */\r\n\tdouble clientResidenceSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tString clientResidenceTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Verweilzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tVerweilzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tvoid clientResidenceSecondsSet(final int index, final double time);\r\n}", "public interface CatalogueClient {\n\n\tList<Exoplanet> getCatalogue();\n\n}", "@Override\r\n\tpublic void updateclient(Client client) {\n\t\t\r\n\t}", "@Override\r\n\tprotected ICardController createController() {\n\t\treturn new ClientCtrl();\r\n\t}", "public interface ClientInterface {\r\n\r\n\t/**\r\n\t * Start.\r\n\t */\r\n\tpublic abstract void start();\r\n}", "public Client() {}", "public static Map<String, Client> getClientMap() {\r\n return clientMap;\r\n }", "public Cliente() {\n\t\tsuper();\n\t}", "protected NuxeoClient getClient() {\n if (client == null) {\n initClient();\n }\n return client;\n }", "public JDJAnzahlKarottenLogic(Starter client) {\r\n this.client = client;\r\n }", "public Integer getClientId() { return clientId; }", "public interface ClientListener {\n\t/**\n\t * Fired when client list should be updated\n\t * \n\t * @param clients Array of clients\n\t */\n void onClientsUpdated(String[] clients);\n \n /**\n * Fired when a message has been received\n * \n * @param message Message that was received\n */\n void onMessageReceived(Message message);\n \n /**\n * Fired when client has been disconnected from server\n */\n void onDisconnected();\n}", "public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }", "public int getIdClient() {\r\n return idClient;\r\n }", "public interface IndexProviderClient extends IndexServiceClient {\n\n}", "public Client() {\n }", "public Client getClientCode() {\r\n\t\treturn this.client;\r\n\t}", "public CoARadiusClient(RadiusEndpoint client) {\n\t\tsuper(client);\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Cliente() {\n }", "public Logic(Starter client) {\n\t\tthis.client = client;\n\t}", "public interface IClient {\n\n void setName(String name);\n}", "public ClientController() {\n }", "public static Client getClient() {\n if (ClientHandler.client == null) {\n ClientHandler.client = new Client();\n }\n return ClientHandler.client;\n }" ]
[ "0.7059662", "0.70440435", "0.67982024", "0.67358017", "0.67301124", "0.66357493", "0.65045226", "0.6490169", "0.63852763", "0.6357297", "0.62872636", "0.6255354", "0.6254933", "0.6239449", "0.62308395", "0.6198037", "0.6135405", "0.6112758", "0.6099653", "0.60981566", "0.60981566", "0.6075364", "0.6072247", "0.60073453", "0.599447", "0.5979316", "0.5967567", "0.5964819", "0.5958056", "0.5958056", "0.595105", "0.5944752", "0.5919553", "0.5917895", "0.59143746", "0.59008026", "0.5898346", "0.58775884", "0.587264", "0.5872148", "0.58673227", "0.5863119", "0.5861729", "0.58607197", "0.584249", "0.58386075", "0.58274907", "0.5822997", "0.58220243", "0.5817252", "0.58109635", "0.5807075", "0.57849103", "0.5773215", "0.5770131", "0.57676697", "0.57672876", "0.576392", "0.57590616", "0.57574743", "0.5755655", "0.5736263", "0.57196313", "0.5717371", "0.57082015", "0.5706464", "0.5698904", "0.5698498", "0.5694945", "0.569156", "0.5688379", "0.5679173", "0.5678809", "0.5670313", "0.56519914", "0.5650752", "0.56495446", "0.5636271", "0.56359035", "0.5634726", "0.5614275", "0.5612709", "0.5611308", "0.5608341", "0.55978274", "0.559699", "0.55968577", "0.5596337", "0.55919737", "0.5591907", "0.55862635", "0.5581154", "0.5579544", "0.5579246", "0.55778706", "0.55549675", "0.5554305", "0.55522645", "0.5550552", "0.5543154", "0.5539824" ]
0.0
-1
To parse emv data
public Map<EmvTags, String> parseEmvData(IsoBuffer isoBuffer);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseData() {\n\t\t\r\n\t}", "public void parse(){\r\n\t\t//StringTokenizer st = new StringTokenizer(nmeaSentence,\",\");\r\n\t\tst = new StringTokenizer(nmeaSentence,\",\");\r\n\t\tString sv = \"\";\r\n\r\n\t\ttry{\r\n\t\t\tnmeaHeader = st.nextToken();//Global Positioning System Fix Data\r\n\t\t\tmode = st.nextToken();\r\n\t\t\tmodeValue = Integer.parseInt(st.nextToken());\r\n\r\n\t\t\tfor(int i=0;i<=11;i++){\r\n\t\t\t\tsv = st.nextToken();\r\n\t\t\t\tif(sv.length() > 0){\r\n\t\t\t\t\tSV[i] = Integer.parseInt(sv);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSV[i] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tPDOP = Float.parseFloat(st.nextToken());\r\n\t\t\tHDOP = Float.parseFloat(st.nextToken());\r\n\t\t\tVDOP = Float.parseFloat(st.nextToken());\r\n\r\n\t\t}catch(NoSuchElementException e){\r\n\t\t\t//Empty\r\n\t\t}catch(NumberFormatException e2){\r\n\t\t\t//Empty\r\n\t\t}\r\n\r\n\t}", "public void parse() {\n }", "private static void parseMETS() throws IOException, XMLStreamException {\r\n\r\n\t\tFile metsFile = new File(additionalDir, metsPath);\r\n\r\n\t\tif (!metsFile.exists()) {\r\n\t\t\tthrow new IOException(\"File does not exist. Current path is \"\r\n\t\t\t\t\t+ metsFile.getAbsolutePath());\r\n\t\t}\r\n\t\tString volumeID = extractVolumeIDFromFilePath(metsPath);\r\n\t\tXMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();\r\n\r\n\t\tvolumeRecord = new VolumeRecord(volumeID);\r\n\r\n\t\t// copyright is assumed to be public domain for all volumes\r\n\t\tvolumeRecord.setCopyright(CopyrightEnum.PUBLIC_DOMAIN);\r\n\r\n\t\tMETSParser metsParser = new METSParser(metsFile, volumeRecord,\r\n\t\t\t\txmlInputFactory);\r\n\t\tmetsParser.parse();\r\n\r\n\t\t// that's it. it is now parsed and the volumeRecord should be populated\r\n\t\t// by the parser\r\n\t\t// use volumeRecord to retrieve the information (see test cases on what\r\n\t\t// information is there)\r\n\r\n\t}", "public Vector parse(){\n \n // make sure c != -1, because that signals end of stream\n c = 0; \n \n // initialize c\n read();\n \n return pparse();\n }", "void parse();", "private Vector pparse(){\n Vector<Object> ret = new Vector<Object>();\n clearWhitespace();\n while (c != -1){\n ret.add(parseSingle());\n clearWhitespace();\n }\n return ret;\n }", "@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length > 4) {\n mSvCount = parseStringToInt(tmp[3]);\n if (mSvCount == 0) {\n return;\n }\n int totalSentences = parseStringToInt(tmp[1]);\n int currSentence = parseStringToInt(tmp[2]);\n\n if (mSatsReady) {\n resetSats();\n mSatsReady = false;\n } else if ((currSentence == totalSentences) && !mSatsReady) {\n // tag data as dirty when we have parsed the last part\n mSatsReady = true;\n }\n int idx = 0;\n while ((currSentence <= totalSentences) && (idx < 4)) {\n int offset = idx << 2;\n int base_offset = (currSentence - 1) << 2;\n if (offset + 4 < tmp.length)\n mSvs[base_offset + idx] = parseStringToInt(tmp[4 + offset]);\n if (offset + 5 < tmp.length)\n mSvElevations[base_offset + idx] = parseStringToInt(tmp[5 + offset]);\n if (offset + 6 < tmp.length)\n mSvAzimuths[base_offset + idx] = parseStringToInt(tmp[6 + offset]);\n if (offset + 7 < tmp.length)\n mSnrs[base_offset + idx] = parseStringToInt(tmp[7 + offset]);\n idx++;\n }\n }\n }", "public Object decodeEMF(String value, Object root) {\n\t\tif (value == null) {\n\t\t\treturn null;\n\t\t}\n\t\tEMFTokener tokener = new EMFTokener();\n\t\tMapEntity map = new MapEntity(filter, flag, this, tokener);\n\t\ttokener.withMap(this);\n\t\tCharacterBuffer buffer = new CharacterBuffer().with(value);\n\t\treturn tokener.decode(map, buffer, root);\n\t}", "protected final void parseV() {\n current = read();\n skipSpaces();\n\n for (;;) {\n switch (current) {\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n float y = parseNumber();\n smoothQCenterX = currentX;\n smoothCCenterX = currentX;\n\n currentY = y;\n smoothQCenterY = y;\n smoothCCenterY = y;\n p.lineTo(smoothCCenterX, smoothCCenterY);\n break;\n default:\n return;\n }\n skipCommaSpaces();\n }\n }", "public DValParser(byte[] data)\r\n/* 18: */ {\r\n/* 19: 72 */ int options = IntegerHelper.getInt(data[0], data[1]);\r\n/* 20: */ \r\n/* 21: 74 */ this.promptBoxVisible = ((options & PROMPT_BOX_VISIBLE_MASK) != 0);\r\n/* 22: 75 */ this.promptBoxAtCell = ((options & PROMPT_BOX_AT_CELL_MASK) != 0);\r\n/* 23: 76 */ this.validityDataCached = ((options & VALIDITY_DATA_CACHED_MASK) != 0);\r\n/* 24: */ \r\n/* 25: 78 */ this.objectId = IntegerHelper.getInt(data[10], data[11], data[12], data[13]);\r\n/* 26: 79 */ this.numDVRecords = IntegerHelper.getInt(data[14], data[15], \r\n/* 27: 80 */ data[16], data[17]);\r\n/* 28: */ }", "@Override\n\tpublic void parse() throws IOException {\n\t}", "public abstract List<EXIFContent> parse();", "@Test\n void testParser() {\n VmParsingHelper.DEFAULT.parse(VM_SRC);\n }", "protected void parseTermData()\n {\n for (int i = 0; i < data.length; i++)\n {\n data[i] = Cdata[i];\n }\n }", "public void parseMXL() {\n try {\n unzipMXL();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void parsePerformanceMeasurements(RawMessage msg)\n\t\tthrows HeaderParseException\n\t{\n\t\tbeginTimeHasTz = false;\n\t\tbyte data[] = msg.getData();\n\t\tint len = data.length;\n\n\t\tboolean inNotes = false;\n\t\tString beginDate = null;\n\t\tString beginTime = null;\n\t\tString endTime = null;\n\t\tString station = null;\n\t\tString device = null;\n\t\tStringBuffer notes = new StringBuffer();\n\t\tint e=0;\n\t\tfor(int p=0; p<len-3; p = e)\n\t\t{\n\t\t\t// Find the beginning of the next line.\n\t\t\tfor(e = p; e < len && data[e] != (byte)'\\n'; e++);\n\t\t\te++;\n\n\t\t\t// Check for start of new tag.\n\t\t\tif (data[p] == (byte)'/' && data[p+1] == (byte)'/')\n\t\t\t{\n\t\t\t\tp += 2;\n\t\t\t\tString s = new String(data, p, e-p);\n\t\t\t\ts = s.toUpperCase().trim();\n\t\t\t\tif (s.length() == 0)\n\t\t\t\t\tcontinue;\t// Skip comment line with just '//'\n\t\t\t\tif (s.startsWith(\"STATION\"))\n\t\t\t\t{\n\t\t\t\t\tString val = s.substring(7).trim();\n\t\t\t\t\tmsg.setPM(STATION, new Variable(val));\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"DEVICE END TIME\")) // do before DEVICE !!\n\t\t\t\t{\n\t\t\t\t\tif (endTime == null)\n\t\t\t\t\t\tendTime = s.substring(15).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"DEVICE\"))\n\t\t\t\t{\n\t\t\t\t\tString val = s.substring(6).trim();\n\t\t\t\t\tint hyphen = val.indexOf('-');\n\t\t\t\t\tint space = val.indexOf(' ');\n\t\t\t\t\tif (hyphen >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (space > 0 && hyphen < space)\n\t\t\t\t\t\t\tval = val.substring(0, space);\n\t\t\t\t\t\telse if (space > 0 && space < hyphen)\n\t\t\t\t\t\t\tval = val.substring(0, space) + \"-\"\n\t\t\t\t\t\t\t\t+ val.substring(space+1);\n\t\t\t\t\t}\n\t\t\t\t\telse // no hyphen\n\t\t\t\t\t{\n\t\t\t\t\t\tif (space >= 0)\n\t\t\t\t\t\t\tval = val.substring(0,space) + \"-\"\n\t\t\t\t\t\t\t\t+ val.substring(space+1);\n\t\t\t\t\t}\n\t\t\t\t\tspace = val.indexOf(' ');\n\t\t\t\t\tif (space > 0)\n\t\t\t\t\t\tval = val.substring(0,space);\n\t\t\t\t\tmsg.setPM(DEVICE, new Variable(val));\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"SOURCE\"))\n\t\t\t\t{\n\t\t\t\t\tString val = s.substring(6).trim();\n\t\t\t\t\tmsg.setPM(SOURCE, new Variable(val));\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"BEGIN DATE\"))\n\t\t\t\t{\n\t\t\t\t\tbeginDate = s.substring(10).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"BEGIN TIME\"))\n\t\t\t\t{\n\t\t\t\t\tbeginTime = s.substring(10).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"ACTUAL END TIME\"))\n\t\t\t\t{\n\t\t\t\t\tendTime = s.substring(15).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"EDL NOTES\")\n\t\t\t\t || s.startsWith(\"PFC NOTES\")\n\t\t\t\t || s.startsWith(\"DEVICE NOTES\"))\n\t\t\t\t{\n\t\t\t\t\tinNotes = true;\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"DATA\"))\n\t\t\t\t{\n\t\t\t\t\tinNotes = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (inNotes)\n\t\t\t\tnotes.append(new String(data, p, e-p));\n\t\t\telse // this is the end of the header!\n\t\t\t{\n\t\t\t\tmsg.setHeaderLength(p);\n\t\t\t\tmsg.setPM(MESSAGE_LENGTH, new Variable((long)(len - p)));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (beginDate != null)\n\t\t{\n\t\t\tif (beginTime != null)\n\t\t\t{\n\t\t\t\t// begin time can optionally contain time zone.\n\t\t\t\tint idx = beginTime.lastIndexOf('S');\n\t\t\t\tif (idx != -1)\n\t\t\t\t{\n\t\t\t\t\tbeginTimeHasTz = true;\n\t\t\t\t\tbeginTime = beginTime.substring(0, idx) + \"00\";\n\t\t\t\t}\n\t\t\t\telse // Add dummy offset to UTC\n\t\t\t\t{\n\t\t\t\t\tbeginTimeHasTz = false;\n\t\t\t\t\tbeginTime += \" +0000\";\n\t\t\t\t}\n\t\t\t\tbeginDate += beginTime;\n\t\t\t}\n\t\t\telse\n\t\t\t\tbeginDate += \"0000 +0000\"; // HHMM & TZ\n\t\t\ttry\n\t\t\t{\n\t\t\t\tLogger.instance().debug1(\"Parsing begin date/time '\"\n\t\t\t\t\t+ beginDate + \"'\");\n\t\t\t\tDate d = beginDateTimeSdf.parse(beginDate);\n\t\t\t\tmsg.setPM(BEGIN_TIME_STAMP, new Variable(d));\n\t\t\t}\n\t\t\tcatch(ParseException ex)\n\t\t\t{\n\t\t\t\tLogger.instance().log(Logger.E_FAILURE, \n\t\t\t\t\t\"Unparsable begin time '\" + beginTime + \"': Ignored.\");\n\t\t\t}\n\t\t}\n\n\t\tif (endTime != null)\n\t\t{\n\t\t\t// Check for start of timezone.\n\t\t\tint idx = endTime.indexOf('-');\n\t\t\tif (idx == -1)\n\t\t\t\tidx = endTime.indexOf('+');\n\n\t\t\tif (idx == -1) // No time zone at all, add one.\n\t\t\t\tendTime += \" +0000\";\n\t\t\telse\n\t\t\t{\n\t\t\t\tint i = ++idx; // idx points to first digit after sign.\n\n\t\t\t\tfor(; i < endTime.length() \n\t\t\t\t\t&& i-idx <= 4\n\t\t\t\t\t&& Character.isDigit(endTime.charAt(i)); i++);\n\t\t\t\t// i now points to first non-digit after TZ\n\n\t\t\t\tswitch(i-idx) // i-idx is # of digits after sign.\n\t\t\t\t{\n\t\t\t\tcase 0: \n\t\t\t\t\tendTime = endTime.substring(0,idx) + \"0000\"; \n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: // 1 digit hour? move to position 2 in HHMM:\n\t\t\t\t\tendTime = endTime.substring(0,idx) + \"0\" \n\t\t\t\t\t\t+ endTime.charAt(idx) + \"00\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: // HH only, add MM\n\t\t\t\t\tendTime = endTime.substring(0,i) + \"00\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: // HHM, ad lcd\n\t\t\t\t\tendTime = endTime.substring(0,i) + \"0\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // complete. Just truncate at 4 digits.\n\t\t\t\t\tendTime = endTime.substring(0, idx+4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tmsg.setPM(END_TIME_STAMP, new Variable(\n\t\t\t\t\tendTimeSdf.parse(endTime)));\n\t\t\t}\n\t\t\tcatch(ParseException ex)\n\t\t\t{\n\t\t\t\tLogger.instance().log(Logger.E_FAILURE, \"Unparsable end time '\"\n\t\t\t\t\t+ endTime + \"': Ignored.\");\n\t\t\t}\n\t\t}\n\n\t\tif (notes.length() > 0)\n\t\t{\n\t\t\tmsg.setPM(EDL_NOTES, new Variable(notes.toString()));\n\t\t}\n\n\t\t// Construct medium ID by concatenating station to device.\n\t\tif (msg.getMediumId() == null)\n\t\t{\n\t\t\tString mid = System.getProperty(\"MEDIUMID\");\n\t\t\tif (mid == null)\n\t\t\t{\n\t\t\t\tVariable v = msg.getPM(STATION);\n\t\t\t\tif (v == null)\n\t\t\t\t\tthrow new HeaderParseException(\"No STATION in EDL file.\");\n\t\t\t\tmid = v.getStringValue();\n\t\t\t\tv = msg.getPM(DEVICE);\n\t\t\t\tif (v != null)\n\t\t\t\t\tmid = mid + \"-\" + v.getStringValue();\n\t\t\t}\n\t\t\tLogger.instance().log(Logger.E_DEBUG3,\n\t\t\t\t\"Setting EDL File Medium ID to '\" + mid + \"'\");\n\t\t\tmsg.setMediumId(mid);\n\t\t}\n\t}", "protected final void parsev() {\n current = read();\n skipSpaces();\n\n for (;;) {\n switch (current) {\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n float y = parseNumber();\n smoothQCenterX = currentX;\n smoothCCenterX = currentX;\n\n currentY += y;\n smoothQCenterY = currentY;\n smoothCCenterY = currentY;\n p.lineTo(smoothCCenterX, smoothCCenterY);\n break;\n default:\n return;\n }\n skipCommaSpaces();\n }\n }", "private void parseRawText() {\n\t\t//1-new lines\n\t\t//2-pageObjects\n\t\t//3-sections\n\t\t//Clear any residual data.\n\t\tlinePositions.clear();\n\t\tsections.clear();\n\t\tpageObjects.clear();\n\t\tcategories.clear();\n\t\tinterwikis.clear();\n\t\t\n\t\t//Generate data.\n\t\tparsePageForNewLines();\n\t\tparsePageForPageObjects();\n\t\tparsePageForSections();\n\t}", "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "public DocumentData parseData(byte[] data) throws Exception {\n if (data.length < 30) {\n throw new Exception(\"Unsupported barcode encoding\");\n }\n byte complianceIndicator = data[0];\n if (complianceIndicator == 0x40) {\n // May be AAMVA\n byte elementSeparator = data[1];\n byte recordSeparator = data[2];\n byte segmentTerminator = data[3];\n byte[] fileType = Arrays.copyOfRange(data, 4, 9);\n byte[] iin = Arrays.copyOfRange(data, 9, 15);\n int aamvaVersionNumber = dataToInt(Arrays.copyOfRange(data, 15, 17));\n AAMVASubfileParser subfileParser = new AAMVASubfileParser(aamvaVersionNumber, elementSeparator);\n byte[] jurisdictionVersionNumber = Arrays.copyOfRange(data, 17, 19);\n int numberOfEntries = dataToInt(Arrays.copyOfRange(data, 19, 21));\n int index = 21;\n AAMVADocumentData documentData = null;\n for (int i=0; i<numberOfEntries; i++) {\n String subfileType = new String(Arrays.copyOfRange(data, index, index+2), UTF8);\n int offset = dataToInt(Arrays.copyOfRange(data, index+2, index+6));\n int length = dataToInt(Arrays.copyOfRange(data, index+6, index+10));\n int start = Math.min(offset, data.length);\n int end = Math.min(offset+length, data.length);\n if (numberOfEntries == 1 && offset == 0) {\n start = data.length - length;\n end = data.length;\n }\n AAMVADocumentData subData = subfileParser.parseFields(Arrays.copyOfRange(data, start, end));\n if (documentData == null) {\n documentData = subData;\n } else {\n documentData.appendFieldsFrom(subData);\n }\n index += 10;\n }\n if (documentData == null || documentData.isEmpty()) {\n throw new Exception(\"Empty document\");\n }\n return documentData;\n } else if (data[0] == 0x25) {\n MagStripeDocumentData documentData = new MagStripeDocumentData();\n String track = new String(data, StandardCharsets.US_ASCII);\n String jurisdiction = track.substring(1, 3);\n documentData.setValue(new DataField(\"State/Province\", jurisdiction, jurisdiction), \"State/Province\");\n track = track.substring(3);\n String city = getStringToDelimiter(track, \"^\", 13);\n documentData.setValue(new DataField(\"City\", city, city), \"City\");\n track = track.substring(city.length());\n track = leftTrimString(track, \"^\");\n String name = getStringToDelimiter(track, \"^\", 35);\n String[] names = name.split(\"\\\\$\");\n if (names.length > 2) {\n documentData.setValue(new DataField(\"Title\", names[2], names[2].trim()), \"Title\");\n }\n if (names.length > 1) {\n documentData.setValue(new DataField(\"First name\", names[1], StringUtils.strip(names[1], \"/, \")), \"First name\");\n }\n if (names.length > 0) {\n documentData.setValue(new DataField(\"Last name\", names[0], StringUtils.strip(names[0], \"/, \")), \"Last name\");\n }\n track = track.substring(name.length());\n track = leftTrimString(track, \"^\");\n String address = getStringToDelimiter(track, \"^\", 77 - city.length() - name.length());\n address = getStringToDelimiter(address, \"?\", address.length());\n String[] addressFields = address.split(\"\\\\$\");\n address = TextUtils.join(\"\\n\", addressFields);\n documentData.setValue(new DataField(\"Address\", address, address), \"Address\");\n if (track.substring(0, 1).equals(\"?\")) {\n track = track.substring(1);\n }\n int delimiterIndex = track.indexOf(\";\");\n if (delimiterIndex > -1) {\n track = track.substring(delimiterIndex+1);\n String iin = track.substring(0, 6);\n documentData.setValue(new DataField(\"IIN\", iin, iin), \"IIN\");\n track = track.substring(6);\n String dlNo = getStringToDelimiter(track, \"=\", 13);\n track = track.substring(dlNo.length());\n track = leftTrimString(track, \"=\");\n String expiryYear = \"20\"+track.substring(0, 2);\n String expiryMonth = track.substring(2, 4);\n track = track.substring(4);\n String birthYear = track.substring(0, 4);\n String birthMonth = track.substring(4, 6);\n String birthDate = track.substring(6, 8);\n track = track.substring(8);\n String expiryDate = null;\n if (expiryMonth.equals(\"77\")) {\n expiryDate = \"non-expiring\";\n } else if (expiryMonth.equals(\"88\")) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(\"20\" + expiryYear) + 1, Integer.parseInt(birthMonth), 1);\n expiryDate = Integer.toString(calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n expiryDate = expiryDate + \"/\" + birthMonth + \"/\" + expiryYear;\n } else if (expiryMonth.equals(\"99\")) {\n expiryDate = birthDate + \"/\" + birthMonth + \"/\" + expiryYear;\n } else {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(\"20\" + expiryYear), Integer.parseInt(expiryMonth), 1);\n expiryDate = Integer.toString(calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n expiryDate = expiryDate + \"/\" + expiryMonth + \"/\" + expiryYear;\n }\n documentData.setValue(new DataField(\"Date of expiry\", expiryDate, expiryDate), \"Date of expiry\");\n documentData.setValue(new DataField(\"Date of birth\", birthDate+birthMonth+birthYear, birthDate+\"/\"+birthMonth+\"/\"+birthYear), \"Date of birth\");\n if (track.length() > 0) {\n String dlNoOverflow = getStringToDelimiter(track, \"=\", 5);\n if (!dlNoOverflow.isEmpty()) {\n dlNo += dlNoOverflow;\n }\n }\n documentData.setValue(new DataField(\"DL/ID#\", dlNo, dlNo), \"DL/ID#\");\n delimiterIndex = track.indexOf(\"%\");\n }\n if (delimiterIndex > -1) {\n track = track.substring(delimiterIndex+1);\n String versionNumber = track.substring(0, 1);\n documentData.setValue(new DataField(\"Version #\", versionNumber, versionNumber), \"Version #\");\n track = track.substring(1);\n String securityVersionNumber = track.substring(0, 1);\n documentData.setValue(new DataField(\"Security v. #\", securityVersionNumber, securityVersionNumber), \"Security v. #\");\n track = track.substring(1);\n String postalCode = StringUtils.strip(track.substring(0, 11), \"/, \");\n documentData.setValue(new DataField(\"Postal code\", postalCode, postalCode), \"Postal code\");\n track = track.substring(11);\n String dlClass = track.substring(0, 2).trim();\n if (!dlClass.isEmpty()) {\n documentData.setValue(new DataField(\"Class\", dlClass, dlClass), \"Class\");\n }\n track = track.substring(2);\n String restrictions = track.substring(0, 10).trim();\n if (!restrictions.isEmpty()) {\n documentData.setValue(new DataField(\"Restrictions\", restrictions, restrictions), \"Restrictions\");\n }\n track = track.substring(10);\n String endorsements = track.substring(0, 4).trim();\n if (!endorsements.isEmpty()) {\n documentData.setValue(new DataField(\"Endorsements\", endorsements, endorsements), \"Endorsements\");\n }\n track = track.substring(4);\n String sex = track.substring(0, 1);\n documentData.setValue(new DataField(\"Sex\", sex, sex), \"Sex\");\n track = track.substring(1);\n String height = track.substring(0, 3).trim();\n if (!height.isEmpty()) {\n documentData.setValue(new DataField(\"Height\", height, height), \"Height\");\n }\n track = track.substring(3);\n String weight = track.substring(0, 3).trim();\n if (!weight.isEmpty()) {\n documentData.setValue(new DataField(\"Weight\", weight, weight), \"Weight\");\n }\n track = track.substring(3);\n String hairColour = track.substring(0, 3).trim();\n if (!hairColour.isEmpty()) {\n documentData.setValue(new DataField(\"Hair color\", hairColour, getHairColour(hairColour)), \"Hair color\");\n }\n track = track.substring(3);\n String eyeColour = track.substring(0, 3).trim();\n if (!eyeColour.isEmpty()) {\n documentData.setValue(new DataField(\"Eye color\", eyeColour, getEyeColour(eyeColour)), \"Eye color\");\n }\n }\n return documentData;\n }\n throw new Exception(\"Nothing decoded\");\n }", "public abstract void parse() throws IOException;", "public void parse(Visitor v) {\n\t\tTransitionsParser.Transitions tr = new TransitionsParser.Transitions();\n\t\tStreamTokenizer st = new StreamTokenizer(reader);\n\t\tst.ordinaryChar('.');\n\t\ttr.parse(st, v);\n\t}", "private void parseForRecords() {\r\n\t\tApacheAgentExecutionContext c = (ApacheAgentExecutionContext)this.fContext;\r\n\t\tString text = c.getStatusPageContent();\r\n\t\tif(text == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tswitch(c.getApacheVersion()) {\r\n\t\t\tcase VERSION_IBM_6_0_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_ibm_6_0(text);\r\n\t\t\tbreak;\r\n\t\t\tcase VERSION_ORACLE_1_3_X:\r\n\t\t\tcase VERSION_IBM_1_3_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_1_3_x(text);\r\n\t\t\tbreak;\r\n\t\t\tcase VERSION_ORACLE_2_0_X:\r\n\t\t\tcase VERSION_IBM_2_0_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_1_3_x(text);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif(records == null) {\r\n\t\t\tfContext.error(new InvalidDataPattern());\r\n\t\t}\r\n\t}", "Collection<MeterRead> parseSimpleNem12(File simpleNem12File) throws SimpleNemParserException;", "private void viterbiParse(Tree<State> tree) {\n\t\tList<State> sentence = tree.getYield();\n\t\tint nword = sentence.size();\n\t\tif (chart != null) {\n\t\t\tchart.clear(nword);\n\t\t} else {\n\t\t\tchart = new Chart(nword, false, true, false);\n\t\t} \n\t\tinferencer.viterbiParse(chart, sentence, nword);\n\t}", "public Object decodeEMF(String value) {\n\t\treturn decodeEMF(value, null);\n\t}", "protected void parse(byte[] data) {\n version = data[0];\n flags = new byte[3];\n flags[0] = data[1];\n flags[1] = data[2];\n flags[2] = data[3];\n\n url = new String(data, 4, data.length - 4);\n }", "@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}", "@Override\n\tprotected void parseResult() {\n\t\t\n\t}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "private synchronized void parsebm() throws MessagingException {\n/* 777 */ if (this.parsed) {\n/* */ return;\n/* */ }\n/* 780 */ InputStream in = null;\n/* 781 */ SharedInputStream sin = null;\n/* 782 */ long start = 0L, end = 0L;\n/* */ \n/* */ try {\n/* 785 */ in = this.ds.getInputStream();\n/* 786 */ if (!(in instanceof java.io.ByteArrayInputStream) && !(in instanceof BufferedInputStream) && !(in instanceof SharedInputStream))\n/* */ {\n/* */ \n/* 789 */ in = new BufferedInputStream(in); } \n/* 790 */ } catch (Exception ex) {\n/* 791 */ throw new MessagingException(\"No inputstream from datasource\", ex);\n/* */ } \n/* 793 */ if (in instanceof SharedInputStream) {\n/* 794 */ sin = (SharedInputStream)in;\n/* */ }\n/* 796 */ ContentType cType = new ContentType(this.contentType);\n/* 797 */ String boundary = null;\n/* 798 */ if (!this.ignoreExistingBoundaryParameter) {\n/* 799 */ String bp = cType.getParameter(\"boundary\");\n/* 800 */ if (bp != null)\n/* 801 */ boundary = \"--\" + bp; \n/* */ } \n/* 803 */ if (boundary == null && !this.ignoreMissingBoundaryParameter && !this.ignoreExistingBoundaryParameter)\n/* */ {\n/* 805 */ throw new MessagingException(\"Missing boundary parameter\");\n/* */ }\n/* */ \n/* */ try {\n/* 809 */ LineInputStream lin = new LineInputStream(in);\n/* 810 */ StringBuffer preamblesb = null;\n/* */ \n/* 812 */ String lineSeparator = null; String line;\n/* 813 */ while ((line = lin.readLine()) != null) {\n/* */ int k;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 821 */ for (k = line.length() - 1; k >= 0; k--) {\n/* 822 */ char c = line.charAt(k);\n/* 823 */ if (c != ' ' && c != '\\t')\n/* */ break; \n/* */ } \n/* 826 */ line = line.substring(0, k + 1);\n/* 827 */ if (boundary != null) {\n/* 828 */ if (line.equals(boundary))\n/* */ break; \n/* 830 */ if (line.length() == boundary.length() + 2 && line.startsWith(boundary) && line.endsWith(\"--\")) {\n/* */ \n/* 832 */ line = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* 841 */ } else if (line.length() > 2 && line.startsWith(\"--\") && (\n/* 842 */ line.length() <= 4 || !allDashes(line))) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 850 */ boundary = line;\n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 857 */ if (line.length() > 0) {\n/* */ \n/* */ \n/* 860 */ if (lineSeparator == null) {\n/* */ try {\n/* 862 */ lineSeparator = System.getProperty(\"line.separator\", \"\\n\");\n/* */ }\n/* 864 */ catch (SecurityException ex) {\n/* 865 */ lineSeparator = \"\\n\";\n/* */ } \n/* */ }\n/* */ \n/* 869 */ if (preamblesb == null)\n/* 870 */ preamblesb = new StringBuffer(line.length() + 2); \n/* 871 */ preamblesb.append(line).append(lineSeparator);\n/* */ } \n/* */ } \n/* */ \n/* 875 */ if (preamblesb != null) {\n/* 876 */ this.preamble = preamblesb.toString();\n/* */ }\n/* 878 */ if (line == null) {\n/* 879 */ if (this.allowEmpty) {\n/* */ return;\n/* */ }\n/* 882 */ throw new MessagingException(\"Missing start boundary\");\n/* */ } \n/* */ \n/* */ \n/* 886 */ byte[] bndbytes = ASCIIUtility.getBytes(boundary);\n/* 887 */ int bl = bndbytes.length;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 894 */ int[] bcs = new int[256];\n/* 895 */ for (int i = 0; i < bl; i++) {\n/* 896 */ bcs[bndbytes[i] & 0xFF] = i + 1;\n/* */ }\n/* */ \n/* 899 */ int[] gss = new int[bl];\n/* */ \n/* 901 */ for (int j = bl; j > 0; j--) {\n/* */ \n/* 903 */ int k = bl - 1; while (true) { if (k >= j) {\n/* */ \n/* 905 */ if (bndbytes[k] == bndbytes[k - j]) {\n/* */ \n/* 907 */ gss[k - 1] = j;\n/* */ \n/* */ k--;\n/* */ } \n/* */ \n/* */ break;\n/* */ } \n/* 914 */ while (k > 0)\n/* 915 */ gss[--k] = j; break; }\n/* */ \n/* 917 */ } gss[bl - 1] = 1;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 923 */ boolean done = false;\n/* */ \n/* 925 */ while (!done) {\n/* 926 */ int eolLen; MimeBodyPart part; InternetHeaders headers = null;\n/* 927 */ if (sin != null) {\n/* 928 */ start = sin.getPosition();\n/* */ \n/* 930 */ while ((line = lin.readLine()) != null && line.length() > 0);\n/* */ \n/* 932 */ if (line == null) {\n/* 933 */ if (!this.ignoreMissingEndBoundary) {\n/* 934 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* */ \n/* 937 */ this.complete = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } else {\n/* 942 */ headers = createInternetHeaders(in);\n/* */ } \n/* */ \n/* 945 */ if (!in.markSupported()) {\n/* 946 */ throw new MessagingException(\"Stream doesn't support mark\");\n/* */ }\n/* 948 */ ByteArrayOutputStream buf = null;\n/* */ \n/* 950 */ if (sin == null) {\n/* 951 */ buf = new ByteArrayOutputStream();\n/* */ } else {\n/* 953 */ end = sin.getPosition();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 965 */ byte[] inbuf = new byte[bl];\n/* 966 */ byte[] previnbuf = new byte[bl];\n/* 967 */ int inSize = 0;\n/* 968 */ int prevSize = 0;\n/* */ \n/* 970 */ boolean first = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ while (true) {\n/* 976 */ in.mark(bl + 4 + 1000);\n/* 977 */ eolLen = 0;\n/* 978 */ inSize = readFully(in, inbuf, 0, bl);\n/* 979 */ if (inSize < bl) {\n/* */ \n/* 981 */ if (!this.ignoreMissingEndBoundary) {\n/* 982 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* 984 */ if (sin != null)\n/* 985 */ end = sin.getPosition(); \n/* 986 */ this.complete = false;\n/* 987 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ int k;\n/* 992 */ for (k = bl - 1; k >= 0 && \n/* 993 */ inbuf[k] == bndbytes[k]; k--);\n/* */ \n/* */ \n/* 996 */ if (k < 0) {\n/* 997 */ eolLen = 0;\n/* 998 */ if (!first) {\n/* */ \n/* */ \n/* 1001 */ int b = previnbuf[prevSize - 1];\n/* 1002 */ if (b == 13 || b == 10) {\n/* 1003 */ eolLen = 1;\n/* 1004 */ if (b == 10 && prevSize >= 2) {\n/* 1005 */ b = previnbuf[prevSize - 2];\n/* 1006 */ if (b == 13)\n/* 1007 */ eolLen = 2; \n/* */ } \n/* */ } \n/* */ } \n/* 1011 */ if (first || eolLen > 0) {\n/* 1012 */ if (sin != null)\n/* */ {\n/* */ \n/* 1015 */ end = sin.getPosition() - bl - eolLen;\n/* */ }\n/* */ \n/* 1018 */ int b2 = in.read();\n/* 1019 */ if (b2 == 45 && \n/* 1020 */ in.read() == 45) {\n/* 1021 */ this.complete = true;\n/* 1022 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 1027 */ while (b2 == 32 || b2 == 9) {\n/* 1028 */ b2 = in.read();\n/* */ }\n/* 1030 */ if (b2 == 10)\n/* */ break; \n/* 1032 */ if (b2 == 13) {\n/* 1033 */ in.mark(1);\n/* 1034 */ if (in.read() != 10)\n/* 1035 */ in.reset(); \n/* */ break;\n/* */ } \n/* */ } \n/* 1039 */ k = 0;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1049 */ int skip = Math.max(k + 1 - bcs[inbuf[k] & Byte.MAX_VALUE], gss[k]);\n/* */ \n/* 1051 */ if (skip < 2) {\n/* */ \n/* */ \n/* */ \n/* 1055 */ if (sin == null && prevSize > 1)\n/* 1056 */ buf.write(previnbuf, 0, prevSize - 1); \n/* 1057 */ in.reset();\n/* 1058 */ skipFully(in, 1L);\n/* 1059 */ if (prevSize >= 1) {\n/* */ \n/* 1061 */ previnbuf[0] = previnbuf[prevSize - 1];\n/* 1062 */ previnbuf[1] = inbuf[0];\n/* 1063 */ prevSize = 2;\n/* */ } else {\n/* */ \n/* 1066 */ previnbuf[0] = inbuf[0];\n/* 1067 */ prevSize = 1;\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1072 */ if (prevSize > 0 && sin == null) {\n/* 1073 */ buf.write(previnbuf, 0, prevSize);\n/* */ }\n/* 1075 */ prevSize = skip;\n/* 1076 */ in.reset();\n/* 1077 */ skipFully(in, prevSize);\n/* */ \n/* 1079 */ byte[] tmp = inbuf;\n/* 1080 */ inbuf = previnbuf;\n/* 1081 */ previnbuf = tmp;\n/* */ } \n/* 1083 */ first = false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1090 */ if (sin != null) {\n/* 1091 */ part = createMimeBodyPartIs(sin.newStream(start, end));\n/* */ } else {\n/* */ \n/* 1094 */ if (prevSize - eolLen > 0) {\n/* 1095 */ buf.write(previnbuf, 0, prevSize - eolLen);\n/* */ }\n/* */ \n/* 1098 */ if (!this.complete && inSize > 0)\n/* 1099 */ buf.write(inbuf, 0, inSize); \n/* 1100 */ part = createMimeBodyPart(headers, buf.toByteArray());\n/* */ } \n/* 1102 */ super.addBodyPart(part);\n/* */ } \n/* 1104 */ } catch (IOException ioex) {\n/* 1105 */ throw new MessagingException(\"IO Error\", ioex);\n/* */ } finally {\n/* */ try {\n/* 1108 */ in.close();\n/* 1109 */ } catch (IOException cex) {}\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1114 */ this.parsed = true;\n/* */ }", "public static String[] processPageReturn(String data){\n\t\t\n\t\tString videoAddress = null;\n\t\t\n\t\tPattern pat = Pattern.compile(\",\\\"res\\\":\\\\[(.*?)\\\\]\");\n\t\tMatcher match = pat.matcher(data);\n\n\t\tif (match.find()){\n\t\t\tString temp = match.group(match.groupCount());\n\t\t\t\n\t\t\tpat = Pattern.compile(\"\\\"u\\\":\\\"(.*?)\\\"\");\n\t\t\tmatch = pat.matcher(temp);\n\t\t\t\n\t\t\tif (match.find()){\n\t\t\t\tBase64 b64 = new Base64();\n\t\t\t\tvideoAddress = new String(b64.decode(match.group(1)));\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tSystem.err.println(\"error\");\n\t\t\t\n\t\t}\n\t\t\n\t\tString videoTitle = decodePattern(data,\"\\\"video_details\\\":\\\\{\\\"video\\\":\\\\{\\\"title\\\":\\\"(.*?)\\\"\");\n\t\t\n\t\treturn new String[]{videoAddress,videoTitle};\n\t\t\n\t}", "public void parse(final String content){\n\t\t// Datum\n\t\tdate = getDate(content);\n\t\t\n\t\twbc = getWBC(content);\n\t\trbc = getRBC(content);\n\t\thgb = getHGB(content);\n\t\thct = getHCT(content);\n\t\tmcv = getMCV(content);\n\t\tmch = getMCH(content);\n\t\tmchc = getMCHC(content);\n\t\tplt = getPLT(content);\n\t\tlym_percent = getLYMPercent(content);\n\t\tmxd_percent = getMXDPercent(content);\n\t\tneut_percent = getNEUTPercent(content);\n\t\tlym_volume = getLYMVolume(content);\n\t\tmxd_volume = getMXDVolume(content);\n\t\tneut_volume = getNEUTVolume(content);\n\t\trdw_sd = getRDWSD(content);\n\t\trdw_cv = getRDWCV(content);\n\t\tpdw = getPDW(content);\n\t\tmpv = getMPV(content);\n\t\tp_lcr = getPLCR(content);\n\t}", "protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }", "public void parseParameter(byte[] data)\n {\n return; \n }", "@Override\n public void parse(String sentence) {\n String[] tmp = sentence.split(DELIM);\n if (tmp.length >= 16) {\n if (\"1\".equals(tmp[2])) {\n // return invalid location or invalid sentence\n return;\n }\n for (int i = 3; i < 15; i++) {\n // tag sats used for fix\n int sat = parseStringToInt(tmp[i]);\n if (sat > 0)\n mSvMasks[USED_FOR_FIX_MASK] |= (1 << (sat - 1));\n }\n if (tmp.length > 15)\n PDOP = parseStringToFloat(tmp[15]);\n if (tmp.length > 16)\n HDOP = parseStringToFloat(tmp[16]);\n if (tmp.length > 17)\n VDOP = parseStringToFloat(tmp[17]);\n }\n }", "public Event interpret(Event e) {\r\n\t\tEvent event = new Event(e.getTitle());\r\n\t\tevent.setImpact(e.getImpact());\r\n\t\tevent.setInstrument(e.getInstrument());\r\n\r\n\t\tPattern pattern = Pattern\r\n\t\t\t\t.compile(\"<td class=\\\"time\\\">([0-9]?[0-9]:[0-9][0-9][a-z][a-z])?</td> <td class=\\\"currency\\\">[A-Z][A-Z][A-Z]</td> <td class=\\\"impact\\\"> <span title=\\\"([A-Z]*[a-z]* *)*\\\" class=\\\"[a-z]*\\\"></span> </td> <td class=\\\"event\\\"><span>\"\r\n\t\t\t\t\t\t+ e.getTitle()\r\n\t\t\t\t\t\t+ \"</span></td> <td class=\\\"detail\\\"><a class=\\\"calendar_detail level[0-9]\\\" data-level=\\\"[0-9]\\\"></a></td> <td class=\\\"actual\\\"> <span class=\\\"[a-z]*\\\">-?[0-9]*\\\\.*[0-9]*%?[A-Z]?</span>\");\r\n\t\trfc.downloadFile(\"http://www.forexfactory.com/\");\r\n\r\n\t\tString fileContent = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tfileContent = new Scanner(rfc.getFile()).useDelimiter(\"\\\\Z\").next();\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\r\n\t\tMatcher matcher = pattern.matcher(fileContent);\r\n\r\n\t\tboolean foundPrimeResult = false;\r\n\t\tString eventString = \"\";\r\n\t\twhile (matcher.find()) {\r\n\t\t\teventString = matcher.group();\r\n\t\t\tif (eventString.contains(\"EUR\") || eventString.contains(\"USD\"))\r\n\t\t\t\tbreak;\r\n\t\t\tfoundPrimeResult = true;\r\n\t\t}\r\n\r\n\t\t// System.out.println(eventString);\r\n\r\n\t\tPattern resultPattern = Pattern\r\n\t\t\t\t.compile(\"<td class=\\\"actual\\\"> <span class=\\\"[a-z]*\\\">-?[0-9]*\\\\.*[0-9]*%?[A-Z]?</span>\");\r\n\r\n\t\t// match and set result\r\n\t\tmatcher = resultPattern.matcher(eventString);\r\n\t\tif (matcher.find()) {\r\n\t\t\tpattern = Pattern.compile(\"<span class=\\\"[a-z]*\\\">\");\r\n\t\t\tMatcher matcher2 = pattern.matcher(matcher.group());\r\n\t\t\tif (matcher2.find()) {\r\n\t\t\t\tString result = matcher2.group();\r\n\t\t\t\tif (result.contains(\"better\"))\r\n\t\t\t\t\tevent.setResult(EventResult.BETTER);\r\n\t\t\t\telse if (result.contains(\"worse\"))\r\n\t\t\t\t\tevent.setResult(EventResult.WORSE);\r\n\t\t\t\telse\r\n\t\t\t\t\tevent.setResult(EventResult.NONE);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// check if unchanged but result is in\r\n\t\t// TODO fixa denna s? att den inte matcher med events som ?nnu inte har\r\n\t\t// kommit in.\r\n\t\t// Fan sv?rt att matcha unchanged faktiskt tobbe\r\n\t\tif (!foundPrimeResult) {\r\n\t\t\tpattern = Pattern\r\n\t\t\t\t\t.compile(e.getTitle()\r\n\t\t\t\t\t\t\t+ \"</span></td> <td class=\\\"detail\\\"><a class=\\\"calendar_detail level[0-9]\\\" data-level=\\\"[0-9]\\\"></a></td> <td class=\\\"actual\\\">*[0-9]+.*</td>\");\r\n\t\t\tmatcher = pattern.matcher(fileContent);\r\n\t\t\twhile (matcher.find()) {\r\n\t\t\t\tevent.setResult(EventResult.UNCHANGED);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event;\r\n\r\n\t}", "TextDecoder getTextDecoder();", "public void parse(byte[] buffer) {\n if (buffer == null) {\n MMLog.log(TAG, \"parse failed buffer = \" + null);\n return;\n }\n\n if (buffer.length >= 9) {\n this.msgHead = getIntVale(0, 2, buffer);\n if(this.msgHead != DEFAULT_HEAD) return;\n\n this.msgEnd = getIntVale(buffer.length - 1, 1, buffer);\n if(this.msgEnd != DEFAULT_END) return;\n\n this.msgID = getIntVale(2, 2, buffer);\n this.msgIndex = getIntVale(4, 1, buffer);\n this.msgLength = getIntVale(5, 2, buffer);\n this.msgCRC = getIntVale(buffer.length - 2, 1, buffer);\n\n } else {\n MMLog.log(TAG, \"parse failed length = \" + buffer.length);\n }\n if (msgLength <= 0) return;\n datas = new byte[msgLength];\n System.arraycopy(buffer, 7, datas, 0, this.msgLength);\n }", "@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getMeter(),\"4/4\");// this will test for M:C\n ArrayList<String> voice = new ArrayList<String>();\n voice.add(\"V:1\");\n voice.add(\"V:2\");\n assertEquals(h.getVoice(),voice);\n }", "SAPL parse(InputStream saplInputStream);", "public ExpenseEntity parse(String line);", "private Element parseRoot() {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n while (peek()<=' ') next();//skip whitespace\r\n switch (peek()) {//switch on next character\r\n case 'n': return new ScalarElement(parseNull());//parse null \r\n case 'f': return new ScalarElement(parseBoolean());//parse false\r\n case 't': return new ScalarElement(parseBoolean());//parse true\r\n case '[': return new ArrayElement(parseArray());//parse array \r\n case '{': return new ObjectElement(parseObject());//parse object\r\n default : throw new RuntimeException(\"Invalid syntax : \"+context());//ruh roh\r\n }//switch on next character\r\n \r\n }", "@Test\n public void testParseCDM4() {\n final String ex = \"/ccsds/cdm/CDMExample4.txt\";\n\n // Initialize the parser\n final CdmParser parser = new ParserBuilder().buildCdmParser();\n\n final DataSource source = new DataSource(ex, () -> getClass().getResourceAsStream(ex));\n\n // Generated CDM file\n final Cdm file = parser.parseMessage(source);\n\n Assertions.assertEquals(IERSConventions.IERS_2010, file.getConventions());\n Assertions.assertEquals(DataContext.getDefault(), file.getDataContext());\n\n // Check Header Block\n Assertions.assertEquals(1.0, file.getHeader().getFormatVersion(), 1.0e-10);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 22, 31, 12,\n TimeScalesFactory.getUTC()), file.getHeader().getCreationDate());\n Assertions.assertEquals(\"JSPOC\", file.getHeader().getOriginator());\n Assertions.assertEquals(\"201113719185\", file.getHeader().getMessageId());\n\n // OBJECT1\n // Check Relative Metadata Block\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.618,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getTca());\n Assertions.assertEquals(715.0, file.getRelativeMetadata().getMissDistance(), DISTANCE_PRECISION);\n\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStartScreenPeriod());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 15, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStopScreenPeriod());\n Assertions.assertEquals(ScreenVolumeFrame.RTN, file.getRelativeMetadata().getScreenVolumeFrame());\n Assertions.assertEquals(ScreenVolumeShape.ELLIPSOID, file.getRelativeMetadata().getScreenVolumeShape());\n Assertions.assertEquals(200, file.getRelativeMetadata().getScreenVolumeX(), 0);\n Assertions.assertEquals(1000, file.getRelativeMetadata().getScreenVolumeY(), 0);\n Assertions.assertEquals(1000, file.getRelativeMetadata().getScreenVolumeZ(), 0);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.222,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenEntryTime());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.824,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenExitTime());\n Assertions.assertEquals(4.835E-05, file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(\"FOSTER-1992\", file.getRelativeMetadata().getCollisionProbaMethod().getName());\n Assertions.assertEquals(PocMethodType.FOSTER_1992,\n file.getRelativeMetadata().getCollisionProbaMethod().getType());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT1\", file.getMetadataObject1().getObject());\n Assertions.assertEquals(ObjectType.PAYLOAD, file.getMetadataObject1().getObjectType());\n Assertions.assertEquals(\"OSA\", file.getMetadataObject1().getOperatorContactPosition());\n Assertions.assertEquals(\"EUMETSAT\", file.getMetadataObject1().getOperatorOrganization());\n\n // Covariance Matrix block\n Assertions.assertEquals(4.142e1, file.getDataObject1().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-8.579, file.getDataObject1().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.533e3, file.getDataObject1().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.313e1, file.getDataObject1().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.336e1, file.getDataObject1().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.098e1, file.getDataObject1().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(-1.862E+00, file.getDataObject1().getRTNCovarianceBlock().getCdrgr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(3.530E+00, file.getDataObject1().getRTNCovarianceBlock().getCdrgt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-3.100E-01, file.getDataObject1().getRTNCovarianceBlock().getCdrgn(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-1.214E-04, file.getDataObject1().getRTNCovarianceBlock().getCdrgrdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.580E-04, file.getDataObject1().getRTNCovarianceBlock().getCdrgtdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-6.467E-05, file.getDataObject1().getRTNCovarianceBlock().getCdrgndot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(3.483E-06, file.getDataObject1().getRTNCovarianceBlock().getCdrgdrg(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(-1.492E+02, file.getDataObject1().getRTNCovarianceBlock().getCsrpr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.044E+02, file.getDataObject1().getRTNCovarianceBlock().getCsrpt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.331E+01, file.getDataObject1().getRTNCovarianceBlock().getCsrpn(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-1.254E-03, file.getDataObject1().getRTNCovarianceBlock().getCsrprdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.013E-02, file.getDataObject1().getRTNCovarianceBlock().getCsrptdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-4.700E-03, file.getDataObject1().getRTNCovarianceBlock().getCsrpndot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.210E-04, file.getDataObject1().getRTNCovarianceBlock().getCsrpdrg(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.593E-02, file.getDataObject1().getRTNCovarianceBlock().getCsrpsrp(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(-1.803E-06, file.getDataObject1().getRTNCovarianceBlock().getCthrr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(3.803E-03, file.getDataObject1().getRTNCovarianceBlock().getCthrt(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(3.303E02, file.getDataObject1().getRTNCovarianceBlock().getCthrn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(7.203E01, file.getDataObject1().getRTNCovarianceBlock().getCthrrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.654E01, file.getDataObject1().getRTNCovarianceBlock().getCthrtdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(9.203E-01, file.getDataObject1().getRTNCovarianceBlock().getCthrndot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.876, file.getDataObject1().getRTNCovarianceBlock().getCthrdrg(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.876E03, file.getDataObject1().getRTNCovarianceBlock().getCthrsrp(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-2.986E-02, file.getDataObject1().getRTNCovarianceBlock().getCthrthr(),\n COVARIANCE_PRECISION);\n\n // OBJECT2\n // Check Relative Metadata Block\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getScreenVolumeX(),\n file.getRelativeMetadata().getScreenVolumeX(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativePosition().getY(),\n file.getRelativeMetadata().getRelativePosition().getY(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativeVelocity().getZ(),\n file.getRelativeMetadata().getRelativeVelocity().getZ(), DERIVATION_PRECISION);\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbability(),\n file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbaMethod(),\n file.getRelativeMetadata().getCollisionProbaMethod());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT2\", file.getMetadataObject2().getObject());\n Assertions.assertEquals(\"30337\", file.getMetadataObject2().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject2().getCatalogName());\n Assertions.assertEquals(\"FENGYUN 1C DEB\", file.getMetadataObject2().getObjectName());\n Assertions.assertEquals(\"1999-025AA\", file.getMetadataObject2().getInternationalDes());\n Assertions.assertEquals(\"NONE\", file.getMetadataObject2().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject2().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.NO, file.getMetadataObject2().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject2().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject2().getTimeSystem().name());\n\n // Check data block\n Assertions.assertEquals(2569.540800e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(-2.888612500e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getX(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(1.337e3, file.getDataObject2().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-7.5888e2, file.getDataObject2().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.591e-3, file.getDataObject2().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.886e-5, file.getDataObject2().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.506e-4, file.getDataObject2().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.059e-5, file.getDataObject2().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(8.633e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903e-6, file.getDataObject2().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-5.117E-01, file.getDataObject2().getRTNCovarianceBlock().getCdrgr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.319E+00, file.getDataObject2().getRTNCovarianceBlock().getCdrgt(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903E-05, file.getDataObject2().getRTNCovarianceBlock().getCdrgndot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(7.402E-05, file.getDataObject2().getRTNCovarianceBlock().getCdrgtdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.297E+01, file.getDataObject2().getRTNCovarianceBlock().getCsrpr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.164E+01, file.getDataObject2().getRTNCovarianceBlock().getCsrpt(),\n COVARIANCE_PRECISION);\n\n // Verify comments\n Assertions.assertEquals(\"[Relative Metadata/Data]\", file.getRelativeMetadata().getComment().toString());\n Assertions.assertEquals(\"[Object1 Metadata]\", file.getMetadataObject1().getComments().toString());\n Assertions.assertEquals(\"[Object2 Metadata]\", file.getMetadataObject2().getComments().toString());\n Assertions.assertEquals(\"[Object1 Data]\", file.getDataObject1().getComments().toString());\n Assertions.assertEquals(\"[Object1 OD Parameters]\",\n file.getDataObject1().getODParametersBlock().getComments().toString());\n Assertions.assertEquals(\"[Object2 OD Parameters]\",\n file.getDataObject2().getODParametersBlock().getComments().toString());\n Assertions.assertEquals(\n \"[Object1 Additional Parameters, Apogee Altitude=779 km, Perigee Altitude=765 km, Inclination=86.4 deg]\",\n file.getDataObject1().getAdditionalParametersBlock().getComments().toString());\n Assertions.assertEquals(\n \"[Object2 Additional Parameters, Apogee Altitude=786 km, Perigee Altitude=414 km, Inclination=98.9 deg]\",\n file.getDataObject2().getAdditionalParametersBlock().getComments().toString());\n\n }", "public interface LineParser {\n boolean hasProtocolVersion(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor);\n\n Header parseHeader(CharArrayBuffer charArrayBuffer) throws ParseException;\n\n ProtocolVersion parseProtocolVersion(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor) throws ParseException;\n\n RequestLine parseRequestLine(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor) throws ParseException;\n\n StatusLine parseStatusLine(CharArrayBuffer charArrayBuffer, ParserCursor parserCursor) throws ParseException;\n}", "protected final void parseM() {\n current = read();\n skipSpaces();\n\n float x = parseNumber();\n skipCommaSpaces();\n float y = parseNumber();\n \n currentX = x;\n smoothQCenterX = x;\n smoothCCenterX = x;\n\n currentY = y;\n smoothQCenterY = y;\n smoothCCenterY = y;\n p.moveTo(x, y);\n lastMoveToX = x;\n lastMoveToY = y;\n\n skipCommaSpaces();\n }", "public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"40\", BodyLength.FIELD);\n assertEquals(\"wrong field value\", 40, message.getHeader().getInt(BodyLength.FIELD));\n assertHeaderField(message, \"A\", MsgType.FIELD);\n assertBodyField(message, \"0\", EncryptMethod.FIELD);\n assertTrailerField(message, \"96\", CheckSum.FIELD);\n NoMsgTypes valueMessageType = new Logon.NoMsgTypes();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"D\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"R\", valueMessageType.getString(MsgDirection.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"8\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"S\", valueMessageType.getString(MsgDirection.FIELD));\n }", "public static MxSeev03400211 parse(String xml) {\n return ((MxSeev03400211) com.prowidesoftware.swift.model.mx.MxReadImpl.parse(MxSeev03400211 .class, xml, _classes, new com.prowidesoftware.swift.model.mx.MxReadParams()));\n }", "@Test\n public void testParseCDM1() {\n final String ex = \"/ccsds/cdm/CDMExample1.txt\";\n\n // Initialize the parser\n final CdmParser parser = new ParserBuilder().buildCdmParser();\n\n final DataSource source = new DataSource(ex, () -> getClass().getResourceAsStream(ex));\n\n // Generated CDM file\n final Cdm file = parser.parseMessage(source);\n\n // Verify general data\n Assertions.assertEquals(IERSConventions.IERS_2010, file.getConventions());\n Assertions.assertEquals(DataContext.getDefault(), file.getDataContext());\n\n // Check Header Block\n Assertions.assertEquals(1.0, file.getHeader().getFormatVersion(), 1.0e-10);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 22, 31, 12,\n TimeScalesFactory.getUTC()), file.getHeader().getCreationDate());\n Assertions.assertEquals(\"JSPOC\", file.getHeader().getOriginator());\n Assertions.assertEquals(\"201113719185\", file.getHeader().getMessageId());\n\n // OBJECT1\n // Check Relative Metadata Block\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.618,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getTca());\n Assertions.assertEquals(715.0, file.getRelativeMetadata().getMissDistance(), DISTANCE_PRECISION);\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT1\", file.getMetadataObject1().getObject());\n Assertions.assertEquals(\"12345\", file.getMetadataObject1().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject1().getCatalogName());\n Assertions.assertEquals(\"SATELLITE A\", file.getMetadataObject1().getObjectName());\n Assertions.assertEquals(\"1997−030E\", file.getMetadataObject1().getInternationalDes());\n Assertions.assertEquals(\"EPHEMERIS SATELLITE A\", file.getMetadataObject1().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject1().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.YES, file.getMetadataObject1().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject1().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject1().getTimeSystem().name());\n\n // Check data block\n // State vector block\n Assertions.assertEquals(2570.097065e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(2244.654904e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getY(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(6281.497978e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getZ(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(4.418769571e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getX(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(4.833547743e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-3.526774282e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getZ(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(4.142e1, file.getDataObject1().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-8.579, file.getDataObject1().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.533e3, file.getDataObject1().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.313e1, file.getDataObject1().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.336e1, file.getDataObject1().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.098e1, file.getDataObject1().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.520e-3, file.getDataObject1().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-5.476, file.getDataObject1().getRTNCovarianceBlock().getCrdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.626e-4, file.getDataObject1().getRTNCovarianceBlock().getCrdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.744e-3, file.getDataObject1().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.006e-2, file.getDataObject1().getRTNCovarianceBlock().getCtdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(4.041e-3, file.getDataObject1().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.359e-3, file.getDataObject1().getRTNCovarianceBlock().getCtdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.502e-5, file.getDataObject1().getRTNCovarianceBlock().getCtdotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.049e-5, file.getDataObject1().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(1.053e-3, file.getDataObject1().getRTNCovarianceBlock().getCndotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.412e-3, file.getDataObject1().getRTNCovarianceBlock().getCndott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.213e-2, file.getDataObject1().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.004e-6, file.getDataObject1().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.091e-6, file.getDataObject1().getRTNCovarianceBlock().getCndottdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.529e-5, file.getDataObject1().getRTNCovarianceBlock().getCndotndot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(2.520e-3, file.getDataObject1().getRTNCovarianceBlock().\n getRTNCovarianceMatrix().getEntry(3, 0), COVARIANCE_PRECISION);\n Assertions.assertEquals(Double.NaN, file.getDataObject1().getRTNCovarianceBlock().\n getRTNCovarianceMatrix().getEntry(7, 6), COVARIANCE_PRECISION);\n\n\n\n // OBJECT2\n // Check Relative Metadata Block\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getTca(),\n file.getRelativeMetadata().getTca());\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getMissDistance(),\n file.getRelativeMetadata().getMissDistance(), DISTANCE_PRECISION);\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT2\", file.getMetadataObject2().getObject());\n Assertions.assertEquals(\"30337\", file.getMetadataObject2().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject2().getCatalogName());\n Assertions.assertEquals(\"FENGYUN 1C DEB\", file.getMetadataObject2().getObjectName());\n Assertions.assertEquals(\"1999-025AA\", file.getMetadataObject2().getInternationalDes());\n Assertions.assertEquals(\"NONE\", file.getMetadataObject2().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject2().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.NO, file.getMetadataObject2().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject2().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject2().getTimeSystem().name());\n\n // Check data block\n Assertions.assertEquals(2569.540800e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(2245.093614e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getY(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(6281.599946e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getZ(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(-2.888612500e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getX(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-6.007247516e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(3.328770172e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getZ(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(1.337e3, file.getDataObject2().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-4.806e4, file.getDataObject2().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.492e6, file.getDataObject2().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-3.298e1, file.getDataObject2().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-7.5888e2, file.getDataObject2().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.105e1, file.getDataObject2().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.591e-3, file.getDataObject2().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-4.152e-2, file.getDataObject2().getRTNCovarianceBlock().getCrdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.784e-6, file.getDataObject2().getRTNCovarianceBlock().getCrdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.886e-5, file.getDataObject2().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.016e-2, file.getDataObject2().getRTNCovarianceBlock().getCtdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.506e-4, file.getDataObject2().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.637e-3, file.getDataObject2().getRTNCovarianceBlock().getCtdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-2.987e-6, file.getDataObject2().getRTNCovarianceBlock().getCtdotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.059e-5, file.getDataObject2().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(4.400e-3, file.getDataObject2().getRTNCovarianceBlock().getCndotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.482e-3, file.getDataObject2().getRTNCovarianceBlock().getCndott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.633e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903e-6, file.getDataObject2().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-4.594e-6, file.getDataObject2().getRTNCovarianceBlock().getCndottdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.178e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotndot(),\n COVARIANCE_PRECISION);\n // Test in the matrix\n Assertions.assertEquals(1.337e3, file.getDataObject2().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-4.806e4, file.getDataObject2().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.492e6, file.getDataObject2().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-3.298e1, file.getDataObject2().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-7.5888e2, file.getDataObject2().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.105e1, file.getDataObject2().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.591e-3,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(3, 0),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-4.152e-2,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(3, 1),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.784e-6,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(3, 2),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.886e-5,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(3, 3),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.016e-2,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(4, 0),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.506e-4,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(4, 1),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.637e-3,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(4, 2),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-2.987e-6,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(4, 3),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.059e-5,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(4, 4),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(4.400e-3,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(5, 0),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.482e-3,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(5, 1),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.633e-5,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(5, 2),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903e-6,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(5, 3),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-4.594e-6,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(5, 4),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.178e-5,\n file.getDataObject2().getRTNCovarianceBlock().getRTNCovarianceMatrix().getEntry(5, 5),\n COVARIANCE_PRECISION);\n\n }", "@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}", "CParser getParser();", "public static void main(String[] args) throws Exception {\n\t\tString v25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\tString v23message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v23|T|2.3\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\";\n\n\t\t/*\n\t\t * The first (and probably better in most ways) technique is as follows. Use a model class\n\t\t * factory called the CanonicalModelClassFactory. This class forces a specific version of\n\t\t * HL7 to be used. Because HL7 v2.x is a backwards compatible standard, you can choose the\n\t\t * highest version you need to support, and the model classes will be compatible with\n\t\t * messages from previous versions.\n\t\t */\n\n\t\tHapiContext context = new DefaultHapiContext();\n\n\t\t// Create the MCF. We want all parsed messages to be for HL7 version 2.5,\n\t\t// despite what MSH-12 says.\n\t\tCanonicalModelClassFactory mcf = new CanonicalModelClassFactory(\"2.5\");\n\t\tcontext.setModelClassFactory(mcf);\n\n\t\t// Pass the MCF to the parser in its constructor\n\t\tPipeParser parser = context.getPipeParser();\n\n\t\t// The parser parses the v2.3 message to a \"v25\" structure\n\t\tca.uhn.hl7v2.model.v25.message.ORU_R01 msg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v23message);\n\n\t\t// 20169838-v23\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n\t\t// The parser also parses the v2.5 message to a \"v25\" structure\n\t\tmsg = (ca.uhn.hl7v2.model.v25.message.ORU_R01) parser.parse(v25message);\n\n\t\t// 20169838-v25\n\t\tSystem.out.println(msg.getMSH().getMessageControlID().getValue());\n\n//\t\t/*\n//\t\t * The second technique is to use the Terser. The Terser allows you\n//\t\t * to access field values using a path-like notation. For more information\n//\t\t * on the Terser, see the example here:\n//\t\t * http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleUseTerser.html\n//\t\t */\n//\n//\t\t// This time we just use a normal ModelClassFactory, which means we will be\n//\t\t// using the standard version-specific model classes\n//\t\tcontext.setModelClassFactory(new DefaultModelClassFactory());\n//\n//\t\t// 20169838-v23\n//\t\tMessage v23Message = parser.parse(v23message);\n//\t\tTerser t23 = new Terser(v23Message);\n//\t\tSystem.out.println(t23.get(\"/MSH-10\"));\n//\n//\t\t// 20169838-v25\n//\t\tMessage v25Message = parser.parse(v25message);\n//\t\tTerser t25 = new Terser(v25Message);\n//\t\tSystem.out.println(t25.get(\"/MSH-10\"));\n//\n//\t\t/*\n//\t\t * Note that this second technique has one major drawback: Although\n//\t\t * message definitions are backwards compatible, some group names\n//\t\t * change between versions. If you are accessing a group within\n//\t\t * a complex message structure, this can cause issues.\n//\t\t *\n//\t\t * This is less of an issue for some message types where groups are\n//\t\t * not used much (e.g. ADT)\n//\t\t */\n//\n//\t\t// This works and prints \"Test Value\"\n//\t\tSystem.out.println(t23.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// This fails...\n//\t\t// System.out.println(t25.get(\"/RESPONSE/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n//\n//\t\t// ...because this would be required to extract the OBX-5 value from a v2.5 message\n//\t\tSystem.out.println(t25.get(\"/PATIENT_RESULT/ORDER_OBSERVATION/OBSERVATION(0)/OBX-5\"));\n\n\t\t/*\n\t\t * Another technique which may occasionally be useful is to simply use\n\t\t * a \"Generic\" message structure. Generic message structures can\n\t\t * represent anything within an HL7 message, but they don't actually\n\t\t * model all of the intricacies of the structure within the message,\n\t\t * but rather just model all of the data in an unstructured way.\n\t\t */\n\n\t\t// Create a new context using a Generic Model Class Factory\n\t\tcontext = new DefaultHapiContext();\n\t\tcontext.setModelClassFactory(new GenericModelClassFactory());\n\n\t\tv25message = \"MSH|^~\\\\&|ULTRA|TML|OLIS|OLIS|200905011130||ORU^R01|20169838-v25|T|2.5\\r\"\n\t\t\t\t+ \"PID|||7005728^^^TML^MR||TEST^RACHEL^DIAMOND||19310313|F|||200 ANYWHERE ST^^TORONTO^ON^M6G 2T9||(416)888-8888||||||1014071185^KR\\r\"\n\t\t\t\t+ \"PV1|1||OLIS||||OLIST^BLAKE^DONALD^THOR^^^^^921379^^^^OLIST\\r\"\n\t\t\t\t+ \"ORC|RE||T09-100442-RET-0^^OLIS_Site_ID^ISO|||||||||OLIST^BLAKE^DONALD^THOR^^^^L^921379\\r\"\n\t\t\t\t+ \"OBR|0||T09-100442-RET-0^^OLIS_Site_ID^ISO|RET^RETICULOCYTE COUNT^HL79901 literal|||200905011106|||||||200905011106||OLIST^BLAKE^DONALD^THOR^^^^L^921379||7870279|7870279|T09-100442|MOHLTC|200905011130||B7|F||1^^^200905011106^^R\\r\"\n\t\t\t\t+ \"OBX|1|ST|||Test Value\\r\"\n\t\t\t\t+ \"NTE||Note for OBX(1)\\r\"\n\t\t\t\t+ \"OBX|2|ST|||Value number 2\";\n\n\t\t// The parser will always parse this as a \"GenericMessage\"\n\t\tGenericMessage message = (GenericMessage) context.getPipeParser().parse(v25message);\n\n\t\t/*\n\t\t * A generic message has a flat structure, so you can ask for any\n\t\t * field by only its segment name, not a complex path\n\t\t */\n\t\tTerser t = new Terser(message);\n\t\tSystem.out.println(t.get(\"/OBX-5\"));\n\t\t// Prints: Test Value\n\n\t\t/*\n\t\t * This technique isn't great for messages with complex structures. For\n\t\t * example, the second OBX in the message above is a part of the base structure\n\t\t * because GenericMessage has no groups.\n\t\t *\n\t\t * It can be accessed using a new segment name (OBX2 instead of OBX)\n\t\t * but this is error prone, so use with caution.\n\t\t */\n\t\tSystem.out.println(t.get(\"/OBX2-5\"));\n\t\t// Prints: Value number 2\n\n\t}", "@Override\n\tpublic void postParse() {\n\t}", "@Override\n\tpublic void postParse() {\n\t}", "@Test\n public void testParseCDM3() {\n final String ex = \"/ccsds/cdm/CDMExample3.txt\";\n\n // Initialize the parser\n final CdmParser parser = new ParserBuilder().buildCdmParser();\n\n final DataSource source = new DataSource(ex, () -> getClass().getResourceAsStream(ex));\n\n // Generated CDM file\n final Cdm file = parser.parseMessage(source);\n\n\n Assertions.assertEquals(IERSConventions.IERS_2010, file.getConventions());\n Assertions.assertEquals(DataContext.getDefault(), file.getDataContext());\n\n // Check Header Block\n Assertions.assertEquals(1.0, file.getHeader().getFormatVersion(), 0.0);\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 12, 22, 31, 12,\n TimeScalesFactory.getUTC()), file.getHeader().getCreationDate());\n Assertions.assertEquals(\"SDC\", file.getHeader().getOriginator());\n Assertions.assertEquals(\"GALAXY 15\", file.getHeader().getMessageFor());\n Assertions.assertEquals(\"20120912223112\", file.getHeader().getMessageId());\n\n // OBJECT1\n // Check Relative Metadata Block\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 13, 22, 37, 52.618,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getTca());\n Assertions.assertEquals(104.92, file.getRelativeMetadata().getMissDistance(), DISTANCE_PRECISION);\n Assertions.assertEquals(12093.52, file.getRelativeMetadata().getRelativeSpeed(), DERIVATION_PRECISION);\n Assertions.assertEquals(30.6, file.getRelativeMetadata().getRelativePosition().getX(), DISTANCE_PRECISION);\n Assertions.assertEquals(100.2, file.getRelativeMetadata().getRelativePosition().getY(), DISTANCE_PRECISION);\n Assertions.assertEquals(5.7, file.getRelativeMetadata().getRelativePosition().getZ(), DISTANCE_PRECISION);\n Assertions.assertEquals(-20.3, file.getRelativeMetadata().getRelativeVelocity().getX(), DERIVATION_PRECISION);\n Assertions.assertEquals(-12000.0, file.getRelativeMetadata().getRelativeVelocity().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-1500.9, file.getRelativeMetadata().getRelativeVelocity().getZ(), DERIVATION_PRECISION);\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 12, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStartScreenPeriod());\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 15, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStopScreenPeriod());\n Assertions.assertEquals(ScreenVolumeFrame.RTN, file.getRelativeMetadata().getScreenVolumeFrame());\n Assertions.assertEquals(ScreenVolumeShape.ELLIPSOID, file.getRelativeMetadata().getScreenVolumeShape());\n Assertions.assertEquals(500, file.getRelativeMetadata().getScreenVolumeX(), 0);\n Assertions.assertEquals(500, file.getRelativeMetadata().getScreenVolumeY(), 0);\n Assertions.assertEquals(500, file.getRelativeMetadata().getScreenVolumeZ(), 0);\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 13, 20, 25, 43.222,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenEntryTime());\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 13, 23, 44, 29.324,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenExitTime());\n Assertions.assertEquals(2.355e-03, file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(\"ALFANO-2005\", file.getRelativeMetadata().getCollisionProbaMethod().getName());\n Assertions.assertEquals(PocMethodType.ALFANO_2005,\n file.getRelativeMetadata().getCollisionProbaMethod().getType());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT1\", file.getMetadataObject1().getObject());\n Assertions.assertEquals(\"28884\", file.getMetadataObject1().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject1().getCatalogName());\n Assertions.assertEquals(\"GALAXY 15\", file.getMetadataObject1().getObjectName());\n Assertions.assertEquals(\"2005-041A\", file.getMetadataObject1().getInternationalDes());\n Assertions.assertEquals(ObjectType.PAYLOAD, file.getMetadataObject1().getObjectType());\n Assertions.assertEquals(null, file.getMetadataObject1().getOperatorContactPosition());\n Assertions.assertEquals(\"INTELSAT\", file.getMetadataObject1().getOperatorOrganization());\n Assertions.assertEquals(\"GALAXY-15A-2012JAN-WMANEUVER23A\", file.getMetadataObject1().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject1().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.YES, file.getMetadataObject1().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject1().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject1().getTimeSystem().name());\n\n // Check data block\n // OD parameters block\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 6, 20, 25, 43.222,\n TimeScalesFactory.getUTC()),\n file.getDataObject1().getODParametersBlock().getTimeLastObsStart());\n Assertions.assertEquals(new AbsoluteDate(2012, 9, 6, 20, 25, 43.222,\n TimeScalesFactory.getUTC()),\n file.getDataObject1().getODParametersBlock().getTimeLastObsEnd());\n // State vector block\n Assertions.assertEquals(-41600.46272465e3,\n file.getDataObject1().getStateVectorBlock().getPositionVector().getX(), DISTANCE_PRECISION);\n Assertions.assertEquals(3626.912120064e3,\n file.getDataObject1().getStateVectorBlock().getPositionVector().getY(), DISTANCE_PRECISION);\n Assertions.assertEquals(6039.06350924e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getZ(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(-0.306132852503e3,\n file.getDataObject1().getStateVectorBlock().getVelocityVector().getX(), DERIVATION_PRECISION);\n Assertions.assertEquals(-3.044998353334e3,\n file.getDataObject1().getStateVectorBlock().getVelocityVector().getY(), DERIVATION_PRECISION);\n Assertions.assertEquals(-0.287674310725e3,\n file.getDataObject1().getStateVectorBlock().getVelocityVector().getZ(), DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(4.142e1, file.getDataObject1().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-8.579, file.getDataObject1().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.533e3, file.getDataObject1().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.313e1, file.getDataObject1().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.336e1, file.getDataObject1().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.098e1, file.getDataObject1().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.520E-03, file.getDataObject1().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-5.476E+00, file.getDataObject1().getRTNCovarianceBlock().getCrdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.626E-04, file.getDataObject1().getRTNCovarianceBlock().getCrdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.744E-03, file.getDataObject1().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.006E-02, file.getDataObject1().getRTNCovarianceBlock().getCtdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(4.041E-03, file.getDataObject1().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.359E-03, file.getDataObject1().getRTNCovarianceBlock().getCtdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.502E-05, file.getDataObject1().getRTNCovarianceBlock().getCtdotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.049E-05, file.getDataObject1().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(1.053E-03, file.getDataObject1().getRTNCovarianceBlock().getCndotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.412E-03, file.getDataObject1().getRTNCovarianceBlock().getCndott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.213E-02, file.getDataObject1().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.004E-06, file.getDataObject1().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.091E-06, file.getDataObject1().getRTNCovarianceBlock().getCndottdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.529E-05, file.getDataObject1().getRTNCovarianceBlock().getCndotndot(),\n COVARIANCE_PRECISION);\n\n // OBJECT2\n // Check Relative Metadata Block\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getScreenVolumeX(),\n file.getRelativeMetadata().getScreenVolumeX(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativePosition().getX(),\n file.getRelativeMetadata().getRelativePosition().getX(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativeVelocity().getZ(),\n file.getRelativeMetadata().getRelativeVelocity().getZ(), DERIVATION_PRECISION);\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbability(),\n file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbaMethod(),\n file.getRelativeMetadata().getCollisionProbaMethod());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT2\", file.getMetadataObject2().getObject());\n Assertions.assertEquals(\"21139\", file.getMetadataObject2().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject2().getCatalogName());\n Assertions.assertEquals(\"ASTRA 1B\", file.getMetadataObject2().getObjectName());\n Assertions.assertEquals(\"1991-051A\", file.getMetadataObject2().getInternationalDes());\n Assertions.assertEquals(ObjectType.PAYLOAD, file.getMetadataObject2().getObjectType());\n Assertions.assertEquals(\"NONE\", file.getMetadataObject2().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject2().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.YES, file.getMetadataObject2().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject2().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject2().getTimeSystem().name());\n\n // Check data block\n Assertions.assertEquals(-2956.02034826e3,\n file.getDataObject2().getStateVectorBlock().getPositionVector().getX(), DISTANCE_PRECISION);\n Assertions.assertEquals(-3.047096589536e3,\n file.getDataObject2().getStateVectorBlock().getVelocityVector().getX(), DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(1.337e3, file.getDataObject2().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-7.5888e2, file.getDataObject2().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.591e-3, file.getDataObject2().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.886e-5, file.getDataObject2().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.506e-4, file.getDataObject2().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.059e-5, file.getDataObject2().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(8.633e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903e-6, file.getDataObject2().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n\n // Verify comments\n Assertions.assertEquals(\"[Relative Metadata/Data]\",\n file.getMetadataObject1().getRelativeMetadata().getComment().toString());\n Assertions.assertEquals(\"[Object1 Metadata]\", file.getMetadataObject1().getComments().toString());\n Assertions.assertEquals(\"[Object2 Metadata]\", file.getMetadataObject2().getComments().toString());\n Assertions.assertEquals(\"[Object1 OD Parameters]\",\n file.getDataObject1().getODParametersBlock().getComments().toString());\n Assertions.assertEquals(\"[Object1 Data]\", file.getDataObject1().getComments().toString());\n Assertions.assertEquals(\"[Object2 Data]\", file.getDataObject2().getComments().toString());\n Assertions.assertEquals(\"[Object2 OD Parameters]\",\n file.getDataObject2().getODParametersBlock().getComments().toString());\n Assertions.assertEquals(\"[]\", file.getDataObject1().getStateVectorBlock().getComments().toString());\n Assertions.assertEquals(\"[Object1 Covariance in the RTN Coordinate Frame]\",\n file.getDataObject1().getRTNCovarianceBlock().getComments().toString());\n\n }", "public void parse() {\n MessageBlockLexer lexer = new MessageBlockBailLexer(name, postNumber, CharStreams.fromString(raw));\n\n // remove ConsoleErrorListener\n lexer.removeErrorListeners();\n\n // create a buffer of tokens pulled from the lexer\n CommonTokenStream tokens = new CommonTokenStream(lexer);\n\n // create a parser that feeds off the tokens buffer\n MessageBlockParser parser = new MessageBlockParser(tokens);\n\n // remove ConsoleErrorListener\n parser.removeErrorListeners();\n\n // Create/add custom error listener\n MessageBlockErrorListener errorListener = new MessageBlockErrorListener(name, topic, postNumber);\n parser.addErrorListener(errorListener);\n\n // Begin parsing at the block rule\n ParseTree tree = parser.block();\n\n // Check for parsing errors\n errorListener.throwIfErrorsPresent();\n\n LOGGER.trace(tree.toStringTree(parser));\n\n // Walk the tree\n ParseTreeWalker walker = new ParseTreeWalker();\n walker.walk(new Listener(this), tree);\n }", "void Parse(Source source);", "@Test\n public void testParseCDM2() {\n final String ex = \"/ccsds/cdm/CDMExample2.txt\";\n\n // Initialize the parser\n final CdmParser parser = new ParserBuilder().buildCdmParser();\n\n final DataSource source = new DataSource(ex, () -> getClass().getResourceAsStream(ex));\n\n // Generated CDM file\n final Cdm file = parser.parseMessage(source);\n\n Assertions.assertEquals(IERSConventions.IERS_2010, file.getConventions());\n Assertions.assertEquals(DataContext.getDefault(), file.getDataContext());\n\n // Check Header Block\n Assertions.assertEquals(1.0, file.getHeader().getFormatVersion(), 1.0e-10);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 22, 31, 12,\n TimeScalesFactory.getUTC()), file.getHeader().getCreationDate());\n Assertions.assertEquals(\"JSPOC\", file.getHeader().getOriginator());\n Assertions.assertEquals(\"201113719185\", file.getHeader().getMessageId());\n\n // OBJECT1\n // Check Relative Metadata Block\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.618,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getTca());\n Assertions.assertEquals(715.0, file.getRelativeMetadata().getMissDistance(), DISTANCE_PRECISION);\n Assertions.assertEquals(14762.0, file.getRelativeMetadata().getRelativeSpeed(), DERIVATION_PRECISION);\n Assertions.assertEquals(27.4, file.getRelativeMetadata().getRelativePosition().getX(), DISTANCE_PRECISION);\n Assertions.assertEquals(-70.2, file.getRelativeMetadata().getRelativePosition().getY(), DISTANCE_PRECISION);\n Assertions.assertEquals(711.8, file.getRelativeMetadata().getRelativePosition().getZ(), DISTANCE_PRECISION);\n Assertions.assertEquals(-7.2, file.getRelativeMetadata().getRelativeVelocity().getX(), DERIVATION_PRECISION);\n Assertions.assertEquals(-14692.0, file.getRelativeMetadata().getRelativeVelocity().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-1437.2, file.getRelativeMetadata().getRelativeVelocity().getZ(), DERIVATION_PRECISION);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStartScreenPeriod());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 15, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStopScreenPeriod());\n Assertions.assertEquals(ScreenVolumeFrame.RTN, file.getRelativeMetadata().getScreenVolumeFrame());\n Assertions.assertEquals(ScreenVolumeShape.ELLIPSOID, file.getRelativeMetadata().getScreenVolumeShape());\n Assertions.assertEquals(200, file.getRelativeMetadata().getScreenVolumeX(), 0);\n Assertions.assertEquals(1000, file.getRelativeMetadata().getScreenVolumeY(), 0);\n Assertions.assertEquals(1000, file.getRelativeMetadata().getScreenVolumeZ(), 0);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.222,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenEntryTime());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.824,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenExitTime());\n Assertions.assertEquals(4.835E-05, file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(\"FOSTER-1992\", file.getRelativeMetadata().getCollisionProbaMethod().getName());\n Assertions.assertEquals(PocMethodType.FOSTER_1992,\n file.getRelativeMetadata().getCollisionProbaMethod().getType());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT1\", file.getMetadataObject1().getObject());\n Assertions.assertEquals(ObjectType.PAYLOAD, file.getMetadataObject1().getObjectType());\n Assertions.assertEquals(\"OSA\", file.getMetadataObject1().getOperatorContactPosition());\n Assertions.assertEquals(\"EUMETSAT\", file.getMetadataObject1().getOperatorOrganization());\n Assertions.assertEquals(\"+49615130312\", file.getMetadataObject1().getOperatorPhone());\n Assertions.assertEquals(\"[email protected]\", file.getMetadataObject1().getOperatorEmail());\n Assertions.assertEquals(\"EPHEMERIS SATELLITE A\", file.getMetadataObject1().getEphemName());\n Assertions.assertEquals(FramesFactory.getEME2000(), file.getMetadataObject1().getFrame());\n Assertions.assertEquals(\"JACCHIA 70 DCA\", file.getMetadataObject1().getAtmosphericModel());\n Assertions.assertEquals(\"EGM-96\", file.getMetadataObject1().getGravityModel());\n Assertions.assertEquals(36, file.getMetadataObject1().getGravityDegree(), 0);\n Assertions.assertEquals(36, file.getMetadataObject1().getGravityOrder(), 0);\n Assertions.assertEquals(\"MOON\", file.getMetadataObject1().getNBodyPerturbations().get(0).getName());\n Assertions.assertEquals(\"SUN\", file.getMetadataObject1().getNBodyPerturbations().get(1).getName());\n Assertions.assertEquals(\"NO\", file.getMetadataObject1().getSolarRadiationPressure().name());\n Assertions.assertEquals(\"NO\", file.getMetadataObject1().getEarthTides().name());\n Assertions.assertEquals(\"NO\", file.getMetadataObject1().getIntrackThrust().name());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject1().getTimeSystem().name());\n\n // Check data block\n // OD parameters block\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 02, 14, 12.746,\n TimeScalesFactory.getUTC()),\n file.getDataObject1().getODParametersBlock().getTimeLastObsStart());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 02, 14, 12.746,\n TimeScalesFactory.getUTC()),\n file.getDataObject1().getODParametersBlock().getTimeLastObsEnd());\n Assertions.assertEquals(7.88*3600.0*24.0, file.getDataObject1().getODParametersBlock().getRecommendedOdSpan(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(5.50*3600.0*24.0, file.getDataObject1().getODParametersBlock().getActualOdSpan(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(592, file.getDataObject1().getODParametersBlock().getObsAvailable(), DOUBLE_PRECISION);\n Assertions.assertEquals(579, file.getDataObject1().getODParametersBlock().getObsUsed(), DOUBLE_PRECISION);\n Assertions.assertEquals(123, file.getDataObject1().getODParametersBlock().getTracksAvailable(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(119, file.getDataObject1().getODParametersBlock().getTracksUsed(), DOUBLE_PRECISION);\n Assertions.assertEquals(97.8/100.0, file.getDataObject1().getODParametersBlock().getResidualsAccepted(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(0.864, file.getDataObject1().getODParametersBlock().getWeightedRMS(), DOUBLE_PRECISION);\n // Additional parameters block\n Assertions.assertEquals(5.2, file.getDataObject1().getAdditionalParametersBlock().getAreaPC(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(251.6, file.getDataObject1().getAdditionalParametersBlock().getMass(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(0.045663, file.getDataObject1().getAdditionalParametersBlock().getCDAreaOverMass(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(0.000000, file.getDataObject1().getAdditionalParametersBlock().getCRAreaOverMass(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(0.0, file.getDataObject1().getAdditionalParametersBlock().getThrustAcceleration(),\n DOUBLE_PRECISION);\n Assertions.assertEquals(4.54570E-05, file.getDataObject1().getAdditionalParametersBlock().getSedr(),\n DOUBLE_PRECISION);\n // State vector block\n Assertions.assertEquals(2570.097065e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(4.833547743e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getY(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(4.142e1, file.getDataObject1().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-8.579, file.getDataObject1().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.533e3, file.getDataObject1().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.313e1, file.getDataObject1().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.336e1, file.getDataObject1().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.098e1, file.getDataObject1().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(-1.862E+00, file.getDataObject1().getRTNCovarianceBlock().getCdrgr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(3.530E+00, file.getDataObject1().getRTNCovarianceBlock().getCdrgt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-3.100E-01, file.getDataObject1().getRTNCovarianceBlock().getCdrgn(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-1.214E-04, file.getDataObject1().getRTNCovarianceBlock().getCdrgrdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.580E-04, file.getDataObject1().getRTNCovarianceBlock().getCdrgtdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-6.467E-05, file.getDataObject1().getRTNCovarianceBlock().getCdrgndot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(3.483E-06, file.getDataObject1().getRTNCovarianceBlock().getCdrgdrg(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(-1.492E+02, file.getDataObject1().getRTNCovarianceBlock().getCsrpr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.044E+02, file.getDataObject1().getRTNCovarianceBlock().getCsrpt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.331E+01, file.getDataObject1().getRTNCovarianceBlock().getCsrpn(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-1.254E-03, file.getDataObject1().getRTNCovarianceBlock().getCsrprdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.013E-02, file.getDataObject1().getRTNCovarianceBlock().getCsrptdot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-4.700E-03, file.getDataObject1().getRTNCovarianceBlock().getCsrpndot(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.210E-04, file.getDataObject1().getRTNCovarianceBlock().getCsrpdrg(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.593E-02, file.getDataObject1().getRTNCovarianceBlock().getCsrpsrp(),\n COVARIANCE_DIAG_PRECISION);\n\n\n // OBJECT2\n // Check Relative Metadata Block\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getScreenVolumeX(),\n file.getRelativeMetadata().getScreenVolumeX(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativePosition().getY(),\n file.getRelativeMetadata().getRelativePosition().getY(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativeVelocity().getZ(),\n file.getRelativeMetadata().getRelativeVelocity().getZ(), DERIVATION_PRECISION);\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbability(),\n file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbaMethod(),\n file.getRelativeMetadata().getCollisionProbaMethod());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT2\", file.getMetadataObject2().getObject());\n Assertions.assertEquals(\"30337\", file.getMetadataObject2().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject2().getCatalogName());\n Assertions.assertEquals(\"FENGYUN 1C DEB\", file.getMetadataObject2().getObjectName());\n Assertions.assertEquals(\"1999-025AA\", file.getMetadataObject2().getInternationalDes());\n Assertions.assertEquals(\"NONE\", file.getMetadataObject2().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject2().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.NO, file.getMetadataObject2().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject2().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject2().getTimeSystem().name());\n\n // Check data block\n Assertions.assertEquals(2569.540800e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(-2.888612500e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getX(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(1.337e3, file.getDataObject2().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-7.5888e2, file.getDataObject2().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.591e-3, file.getDataObject2().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.886e-5, file.getDataObject2().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.506e-4, file.getDataObject2().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.059e-5, file.getDataObject2().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(8.633e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903e-6, file.getDataObject2().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-5.117E-01, file.getDataObject2().getRTNCovarianceBlock().getCdrgr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.319E+00, file.getDataObject2().getRTNCovarianceBlock().getCdrgt(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903E-05, file.getDataObject2().getRTNCovarianceBlock().getCdrgndot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(7.402E-05, file.getDataObject2().getRTNCovarianceBlock().getCdrgtdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.297E+01, file.getDataObject2().getRTNCovarianceBlock().getCsrpr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.164E+01, file.getDataObject2().getRTNCovarianceBlock().getCsrpt(),\n COVARIANCE_PRECISION);\n\n // Verify comments\n Assertions.assertEquals(\"[Relative Metadata/Data]\", file.getRelativeMetadata().getComment().toString());\n Assertions.assertEquals(\"[Object1 Metadata]\", file.getMetadataObject1().getComments().toString());\n Assertions.assertEquals(\"[Object2 Metadata]\", file.getMetadataObject2().getComments().toString());\n Assertions.assertEquals(\"[Object1 Data]\", file.getDataObject1().getComments().toString());\n Assertions.assertEquals(\"[Object1 OD Parameters]\",\n file.getDataObject1().getODParametersBlock().getComments().toString());\n Assertions.assertEquals(\"[Object2 OD Parameters]\",\n file.getDataObject2().getODParametersBlock().getComments().toString());\n Assertions.assertEquals(\n \"[Object1 Additional Parameters, Apogee Altitude=779 km, Perigee Altitude=765 km, Inclination=86.4 deg]\",\n file.getDataObject1().getAdditionalParametersBlock().getComments().toString());\n Assertions.assertEquals(\n \"[Object2 Additional Parameters, Apogee Altitude=786 km, Perigee Altitude=414 km, Inclination=98.9 deg]\",\n file.getDataObject2().getAdditionalParametersBlock().getComments().toString());\n\n }", "public long parseVCard(BufferedReader vCard) throws IOException {\n\t\t// Reset the currently read values.\n\t\treset();\n\n\t\t// Find Begin.\n\t\tString line = vCard.readLine();\n\t\tif (line != null)\n\t\t\tparseLen += line.length();\n\t\telse\n\t\t\treturn -1;\n\n\t\twhile (line != null && !beginPattern.matcher(line).matches()) {\n\t\t\tline = vCard.readLine();\n\t\t\tparseLen += line.length();\n\t\t}\n\n\t\tboolean skipRead = false;\n\n\t\twhile (line != null) {\n\t\t\tif (!skipRead) {\n\t\t\t\tline = vCard.readLine();\n\t\t\t}\n\n\t\t\tif (line == null) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tparseLen += line.length();\n\n\t\t\tskipRead = false;\n\n\t\t\t// do multi-line unfolding (cr lf with whitespace immediately\n\t\t\t// following is removed, joining the two lines).\n\t\t\tvCard.mark(1);\n\t\t\tfor (int ch = vCard.read(); ch == (int) ' ' || ch == (int) '\\t'; ch = vCard\n\t\t\t\t\t.read()) {\n\t\t\t\tvCard.reset();\n\t\t\t\tString newLine = vCard.readLine();\n\t\t\t\tif (newLine != null) {\n\t\t\t\t\tline += newLine;\n\t\t\t\t\tparseLen += line.length();\n\t\t\t\t\t// parseLen += newLine.length();\n\t\t\t\t}\n\t\t\t\tvCard.mark(1);\n\t\t\t}\n\t\t\tvCard.reset();\n\n\t\t\t// parseLen += line.length(); // TODO: doesn't include CR LFs\n\n\t\t\tMatcher pm = propPattern.matcher(line);\n\n\t\t\tif (pm.matches()) {\n\t\t\t\tString prop = pm.group(1);\n\t\t\t\tString val = pm.group(2);\n\n\t\t\t\tif (prop.equalsIgnoreCase(\"END\")\n\t\t\t\t\t\t&& val.equalsIgnoreCase(\"VCARD\")) {\n\t\t\t\t\t// End of vCard\n\t\t\t\t\treturn parseLen;\n\t\t\t\t}\n\n\t\t\t\tMatcher ppm = propParamPattern.matcher(prop);\n\t\t\t\tif (!ppm.find())\n\t\t\t\t\t// Doesn't seem to be a valid vCard property\n\t\t\t\t\tcontinue;\n\n\t\t\t\tString propName = ppm.group(1).toUpperCase();\n\t\t\t\tVector<String> propVec = new Vector<String>();\n\t\t\t\tString charSet = \"UTF-8\";\n\t\t\t\tString encoding = \"\";\n\t\t\t\twhile (ppm.find()) {\n\t\t\t\t\tString param = ppm.group(1);\n\t\t\t\t\tString paramVal = ppm.group(3);\n\t\t\t\t\tpropVec.add(param\n\t\t\t\t\t\t\t+ (paramVal != null ? \"=\" + paramVal : \"\"));\n\t\t\t\t\tif (param.equalsIgnoreCase(\"CHARSET\"))\n\t\t\t\t\t\tcharSet = paramVal;\n\t\t\t\t\telse if (param.equalsIgnoreCase(\"ENCODING\"))\n\t\t\t\t\t\tencoding = paramVal;\n\t\t\t\t\tLog.d(TAG, \"propName: \" + propName + \", paramVal: \"\n\t\t\t\t\t\t\t+ paramVal);\n\t\t\t\t}\n\t\t\t\tif (encoding.equalsIgnoreCase(\"QUOTED-PRINTABLE\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tval = QuotedPrintable.decode(val.getBytes(charSet),\n\t\t\t\t\t\t\t\t\"UTF-8\");\n\t\t\t\t\t} catch (UnsupportedEncodingException uee) {\n\n\t\t\t\t\t}\n\t\t\t\t} else if (encoding.equalsIgnoreCase(\"BASE64\")) {\n\t\t\t\t\tStringBuffer tmpVal = new StringBuffer(val);\n\t\t\t\t\tdo {\n\t\t\t\t\t\tline = vCard.readLine();\n\n\t\t\t\t\t\tif ((line == null) || (line.length() == 0)\n\t\t\t\t\t\t\t\t|| (!base64Pattern.matcher(line).matches())) {\n\t\t\t\t\t\t\t// skipRead = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseLen += line.length();\n\t\t\t\t\t\ttmpVal.append(line);\n\t\t\t\t\t} while (true);\n\n\t\t\t\t\tBase64Coder.decodeInPlace(tmpVal);\n\t\t\t\t\tval = tmpVal.toString();\n\t\t\t\t}\n\t\t\t\thandleProp propHandler = propHandlers.get(propName);\n\t\t\t\tif (propHandler != null)\n\t\t\t\t\tpropHandler.parseProp(propName, propVec, val);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "byte[] getStructuredData(String messageData);", "public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }", "public void testReadAsVector() throws Exception {\n\t\tVector foundTextV = te.getTextAsVector();\n\n\t\t// Ensure they match\n\t\tassertEquals(allTheText.length,foundTextV.size());\n\t\tfor(int i=0; i<allTheText.length; i++) {\n\t\t\tString foundText = (String)foundTextV.get(i);\n\t\t\tassertEquals(allTheText[i],foundText);\n\t\t}\n\t}", "private static VerseList readXMV(File bibleFile) {\r\n\t\tVerseList v = null;\r\n\t\ttry {\r\n\t\t\tFileReader FR = new FileReader(bibleFile);\r\n\t\t\tBufferedReader BR = new BufferedReader(FR);\r\n\t\t\tString line = BR.readLine();\r\n\t\t\tif (line.length() == 0) {\r\n\t\t\t\tv = new VerseList(\"unknown\", \"\");\r\n\t\t\t} else {\r\n\t\t\t\tif (line.contains(\": \")) {\r\n\t\t\t\t\tline = line.replace(\"<Version \", \"\").trim();\r\n\t\t\t\t\tString[] L = line.split(\": \");\r\n\t\t\t\t\tif (L.length == 1) {\r\n\t\t\t\t\t\tv = new VerseList(L[0], \"\");\r\n\t\t\t\t\t} else if (L.length < 1) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tv = new VerseList(L[0], L[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tv = new VerseList(line, \"\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tline = BR.readLine();\r\n\t\t\tString book = \"\";\r\n\t\t\tint chapter = 0;\r\n\t\t\twhile (line != null) {\r\n\t\t\t\tif (line.startsWith(\"<Book\")) {\r\n\t\t\t\t\tline = line.replace(\"<Book \", \"\");\r\n\t\t\t\t\tline = line.substring(0, line.indexOf(\",\")).trim();\r\n\t\t\t\t\tbook = line;\r\n\t\t\t\t} else if (line.startsWith(\"<Chapter\")){\r\n\t\t\t\t\tline = line.replace(\"<Chapter \", \"\").replace(\">\", \"\").trim();\r\n\t\t\t\t\tchapter = Integer.parseInt(line);\r\n\t\t\t\t} else if (line.startsWith(\"<Verse\")){\r\n\t\t\t\t\tline = line.replace(\"<Verse \", \"\").trim();\r\n\t\t\t\t\tString[] L = line.split(\">\");\r\n\t\t\t\t\tint verse = Integer.parseInt(L[0]);\r\n\t\t\t\t\tString text = L[1];\r\n\t\t\t\t\tVerse vers = new Verse(BookOfBible.getBookOfBible(book), chapter, verse, text);\r\n\t\t\t\t\tv.add(vers);\r\n\t\t\t\t}\r\n\t\t\t\tline = BR.readLine();\r\n\t\t\t}\r\n\t\t\tBR.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t} catch (NumberFormatException e){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn v;\r\n\t}", "public void parse(String aMessage) {\r\n \r\n assert aMessage!=null;\r\n assert fBuffer!=null;\r\n \r\n iMessage=aMessage;//set parse string\r\n iIndex=0;//start parsing at first character\r\n iRootElement=parseRoot();//parse message\r\n \r\n }", "private void parseAndPopulate(String in) {\r\n\t\tIParser parser = new AbbyyOCRDataParser(in);\r\n\t\tocrData = parser.parse();\r\n\t\tStore.addData(ocrData);\r\n\t\t\r\n\t\tEditText np = (EditText)findViewById(R.id.patient_et);\r\n\t\tEditText nm = (EditText)findViewById(R.id.medicine_et);\r\n\t\tEditText cd = (EditText)findViewById(R.id.consumption_et);\r\n\t\t\r\n\t\tPatient2Medicine p2m = ocrData.getPatient2Medicine();\r\n\t\tnp.setText(ocrData.getPatient().getName());\r\n\t\tnm.setText(ocrData.getMedicine().getMedicine());\r\n\t\tcd.setText(p2m.getFrequencyOfIntake()\r\n\t\t\t\t+ \" \" + p2m.getQuantityPerIntake() + \" by \" + p2m.getMode());\r\n\t\t\r\n\t}", "void parseCardData(ICardContext context);", "public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}", "CParserResult getParserResult();", "public void parse() throws ParserConfigurationException, SAXException,\n\t\t\tIOException, XMLStreamException {\n\n\t\tGem gem = new Gem();\n\t\tVisualParameters params = new VisualParameters();\n\n\t\t// current element name holder\n\t\tString currentElement = null;\n\n\t\tXMLInputFactory factory = XMLInputFactory.newInstance();\n\n\t\tfactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);\n\n\t\tXMLEventReader reader = factory.createXMLEventReader(new StreamSource(\n\t\t\t\txmlFileName));\n\n\t\twhile (reader.hasNext()) {\n\t\t\tXMLEvent event = reader.nextEvent();\n\n\t\t\t// skip any empty content\n\t\t\tif (event.isCharacters() && event.asCharacters().isWhiteSpace()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// handler for start tags\n\t\t\tif (event.isStartElement()) {\n\t\t\t\tStartElement startElement = event.asStartElement();\n\t\t\t\tcurrentElement = startElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.FOND.equalsTo(currentElement)) {\n\t\t\t\t\tfond = new Fond();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.GEM.equalsTo(currentElement)) {\n\t\t\t\t\tgem = new Gem();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(currentElement)) {\n\t\t\t\t\tparams = new VisualParameters();\n\t\t\t\t\tAttribute attribute = startElement\n\t\t\t\t\t\t\t.getAttributeByName(new QName(XML.VALUE_COLOR\n\t\t\t\t\t\t\t\t\t.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setValueColor(EnumColors.fromValue(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.TRANSPARENCY.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setTransparency(Integer.valueOf(attribute\n\t\t\t\t\t\t\t\t.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tattribute = startElement.getAttributeByName(new QName(\n\t\t\t\t\t\t\tXML.FACETING.value()));\n\t\t\t\t\tif (attribute != null) {\n\t\t\t\t\t\tparams.setFaceting(Integer.valueOf(attribute.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// handler for contents\n\t\t\tif (event.isCharacters()) {\n\t\t\t\tCharacters characters = event.asCharacters();\n\n\t\t\t\tif (XML.NAME.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setName(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.PRECIOUSNESS.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setPreciousness(Boolean.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.ORIGIN.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setOrigin(characters.getData());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (XML.VALUE.equalsTo(currentElement)) {\n\t\t\t\t\tgem.setValue(Double.valueOf(characters.getData()));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// handler for end tags\n\t\t\tif (event.isEndElement()) {\n\t\t\t\tEndElement endElement = event.asEndElement();\n\t\t\t\tString localName = endElement.getName().getLocalPart();\n\n\t\t\t\tif (XML.GEM.equalsTo(localName)) {\n\t\t\t\t\tfond.getGem().add(gem);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (XML.VISUAL_PARAMETRS.equalsTo(localName)) {\n\t\t\t\t\t// just add answer to container\n\t\t\t\t\tgem.setVisualParameters(params);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException{\n super.characters(ch, start, length);\n if(length<=0)\n return;\n for(int i=start; i<start+length; i++){\n if(ch[i]=='\\n')\n return;\n }\n\n String str=new String(ch,start,length);\n switch (tagName)\n {\n case \"key\":wordValue.setWord(str); break;\n case \"ps\": if(wordValue.getPsE().length()<=0)\n wordValue.setPsE(str);\n else wordValue.setPsA(str);\n break;\n case \"pron\":if(wordValue.getPronE().length()<=0)\n wordValue.setPronE(str);\n else wordValue.setPronA(str);\n break;\n case \"pos\":isChinese=false;\n interpret+=str+\" \";\n break;\n case \"acceptation\":interpret+=str+\"\\n\";\n interpret=wordValue.getInterpret()+interpret;\n wordValue.setInterpret(interpret);\n interpret=\"\";\n break;\n case \"orig\":orig=wordValue.getSentOrig();\n wordValue.setSentOrig(orig+str+\"\\n\");\n break;\n case \"trans\":trans=wordValue.getSentTrans();\n wordValue.setSentTrans(trans+str+\"\\n\");\n break;\n case \"fy\":isChinese=true;\n wordValue.setInterpret(str);\n }\n }", "@Test\n public void testParseXML_CDM1() {\n final String ex = \"/ccsds/cdm/CDMExample1.xml\";\n\n // Initialize the parser\n final CdmParser parser = new ParserBuilder().buildCdmParser();\n\n final DataSource source = new DataSource(ex, () -> getClass().getResourceAsStream(ex));\n\n // Generated CDM file\n final Cdm file = parser.parseMessage(source);\n\n Assertions.assertEquals(IERSConventions.IERS_2010, file.getConventions());\n Assertions.assertEquals(DataContext.getDefault(), file.getDataContext());\n\n // Check Header Block\n Assertions.assertEquals(1.0, file.getHeader().getFormatVersion(), 0.0);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 22, 31, 12.000,\n TimeScalesFactory.getUTC()), file.getHeader().getCreationDate());\n Assertions.assertEquals(\"JSPOC\", file.getHeader().getOriginator());\n Assertions.assertEquals(\"SATELLITE A\", file.getHeader().getMessageFor());\n Assertions.assertEquals(\"20111371985\", file.getHeader().getMessageId());\n\n // OBJECT1\n // Check Relative Metadata Block\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 22, 37, 52.618,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getTca());\n Assertions.assertEquals(715.0, file.getRelativeMetadata().getMissDistance(), DISTANCE_PRECISION);\n Assertions.assertEquals(14762.0, file.getRelativeMetadata().getRelativeSpeed(), DERIVATION_PRECISION);\n Assertions.assertEquals(27.4, file.getRelativeMetadata().getRelativePosition().getX(), DISTANCE_PRECISION);\n Assertions.assertEquals(-70.2, file.getRelativeMetadata().getRelativePosition().getY(), DISTANCE_PRECISION);\n Assertions.assertEquals(711.8, file.getRelativeMetadata().getRelativePosition().getZ(), DISTANCE_PRECISION);\n Assertions.assertEquals(-7.2, file.getRelativeMetadata().getRelativeVelocity().getX(), DERIVATION_PRECISION);\n Assertions.assertEquals(-14692.0, file.getRelativeMetadata().getRelativeVelocity().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-1437.2, file.getRelativeMetadata().getRelativeVelocity().getZ(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 12, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStartScreenPeriod());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 15, 18, 29, 32.212,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getStopScreenPeriod());\n Assertions.assertEquals(ScreenVolumeFrame.RTN, file.getRelativeMetadata().getScreenVolumeFrame());\n Assertions.assertEquals(ScreenVolumeShape.ELLIPSOID, file.getRelativeMetadata().getScreenVolumeShape());\n Assertions.assertEquals(200, file.getRelativeMetadata().getScreenVolumeX(), 0);\n Assertions.assertEquals(1000, file.getRelativeMetadata().getScreenVolumeY(), 0);\n Assertions.assertEquals(1000, file.getRelativeMetadata().getScreenVolumeZ(), 0);\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 20, 25, 43.222,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenEntryTime());\n Assertions.assertEquals(new AbsoluteDate(2010, 3, 13, 23, 44, 29.324,\n TimeScalesFactory.getUTC()), file.getRelativeMetadata().getScreenExitTime());\n Assertions.assertEquals(4.835E-05, file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(\"FOSTER-1992\", file.getRelativeMetadata().getCollisionProbaMethod().getName());\n Assertions.assertEquals(PocMethodType.FOSTER_1992,\n file.getRelativeMetadata().getCollisionProbaMethod().getType());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT1\", file.getMetadataObject1().getObject());\n Assertions.assertEquals(\"12345\", file.getMetadataObject1().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject1().getCatalogName());\n Assertions.assertEquals(\"SATELLITE A\", file.getMetadataObject1().getObjectName());\n Assertions.assertEquals(\"1997-030E\", file.getMetadataObject1().getInternationalDes());\n Assertions.assertEquals(\"EPHEMERIS SATELLITE A\", file.getMetadataObject1().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject1().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.YES, file.getMetadataObject1().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject1().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject1().getTimeSystem().name());\n\n\n // Check data block\n // State vector block\n Assertions.assertEquals(2570.097065e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(2244.654904e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getY(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(6281.497978e3, file.getDataObject1().getStateVectorBlock().getPositionVector().getZ(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(4.418769571e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getX(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(4.833547743e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-3.526774282e3, file.getDataObject1().getStateVectorBlock().getVelocityVector().getZ(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(4.142e1, file.getDataObject1().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-8.579, file.getDataObject1().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.533e3, file.getDataObject1().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-2.313e1, file.getDataObject1().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(1.336e1, file.getDataObject1().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.098e1, file.getDataObject1().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.520e-3, file.getDataObject1().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-5.476, file.getDataObject1().getRTNCovarianceBlock().getCrdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.626e-4, file.getDataObject1().getRTNCovarianceBlock().getCrdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.744e-3, file.getDataObject1().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.006e-2, file.getDataObject1().getRTNCovarianceBlock().getCtdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(4.041e-3, file.getDataObject1().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.359e-3, file.getDataObject1().getRTNCovarianceBlock().getCtdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.502e-5, file.getDataObject1().getRTNCovarianceBlock().getCtdotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.049e-5, file.getDataObject1().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(1.053e-3, file.getDataObject1().getRTNCovarianceBlock().getCndotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.412e-3, file.getDataObject1().getRTNCovarianceBlock().getCndott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.213e-2, file.getDataObject1().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-3.004e-6, file.getDataObject1().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.091e-6, file.getDataObject1().getRTNCovarianceBlock().getCndottdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.529e-5, file.getDataObject1().getRTNCovarianceBlock().getCndotndot(),\n COVARIANCE_PRECISION);\n\n // OBJECT2\n // Check Relative Metadata Block\n Assertions.assertEquals(file.getSegments().get(1).getMetadata().getRelativeMetadata().getScreenVolumeX(),\n file.getRelativeMetadata().getScreenVolumeX(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativePosition().getZ(),\n file.getRelativeMetadata().getRelativePosition().getZ(), DISTANCE_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getRelativeVelocity().getZ(),\n file.getRelativeMetadata().getRelativeVelocity().getZ(), DERIVATION_PRECISION);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbability(),\n file.getRelativeMetadata().getCollisionProbability(), 1e-30);\n Assertions.assertEquals(\n file.getSegments().get(1).getMetadata().getRelativeMetadata().getCollisionProbaMethod(),\n file.getRelativeMetadata().getCollisionProbaMethod());\n\n // Check Metadata Block\n Assertions.assertEquals(\"OBJECT2\", file.getMetadataObject2().getObject());\n Assertions.assertEquals(\"30337\", file.getMetadataObject2().getObjectDesignator());\n Assertions.assertEquals(\"SATCAT\", file.getMetadataObject2().getCatalogName());\n Assertions.assertEquals(\"FENGYUN 1C DEB\", file.getMetadataObject2().getObjectName());\n Assertions.assertEquals(\"1999-025AA\", file.getMetadataObject2().getInternationalDes());\n Assertions.assertEquals(\"NONE\", file.getMetadataObject2().getEphemName());\n Assertions.assertEquals(CovarianceMethod.CALCULATED, file.getMetadataObject2().getCovarianceMethod());\n Assertions.assertEquals(Maneuvrable.NO, file.getMetadataObject2().getManeuverable());\n Assertions.assertEquals(CelestialBodyFrame.EME2000,\n file.getMetadataObject2().getRefFrame().asCelestialBodyFrame());\n Assertions.assertEquals(\"UTC\", file.getMetadataObject2().getTimeSystem().name());\n\n // Check data block\n Assertions.assertEquals(2569.540800e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getX(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(2245.093614e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getY(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(6281.599946e3, file.getDataObject2().getStateVectorBlock().getPositionVector().getZ(),\n DISTANCE_PRECISION);\n Assertions.assertEquals(-2.888612500e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getX(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(-6.007247516e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getY(),\n DERIVATION_PRECISION);\n Assertions.assertEquals(3.328770172e3, file.getDataObject2().getStateVectorBlock().getVelocityVector().getZ(),\n DERIVATION_PRECISION);\n // Covariance Matrix block\n Assertions.assertEquals(1.337e3, file.getDataObject2().getRTNCovarianceBlock().getCrr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-4.806e4, file.getDataObject2().getRTNCovarianceBlock().getCtr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(2.492e6, file.getDataObject2().getRTNCovarianceBlock().getCtt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-3.298e1, file.getDataObject2().getRTNCovarianceBlock().getCnr(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(-7.5888e2, file.getDataObject2().getRTNCovarianceBlock().getCnt(),\n COVARIANCE_DIAG_PRECISION);\n Assertions.assertEquals(7.105e1, file.getDataObject2().getRTNCovarianceBlock().getCnn(),\n COVARIANCE_DIAG_PRECISION);\n\n Assertions.assertEquals(2.591e-3, file.getDataObject2().getRTNCovarianceBlock().getCrdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-4.152e-2, file.getDataObject2().getRTNCovarianceBlock().getCrdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.784e-6, file.getDataObject2().getRTNCovarianceBlock().getCrdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(6.886e-5, file.getDataObject2().getRTNCovarianceBlock().getCrdotrdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(-1.016e-2, file.getDataObject2().getRTNCovarianceBlock().getCtdotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.506e-4, file.getDataObject2().getRTNCovarianceBlock().getCtdott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.637e-3, file.getDataObject2().getRTNCovarianceBlock().getCtdotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-2.987e-6, file.getDataObject2().getRTNCovarianceBlock().getCtdotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(1.059e-5, file.getDataObject2().getRTNCovarianceBlock().getCtdottdot(),\n COVARIANCE_PRECISION);\n\n Assertions.assertEquals(4.400e-3, file.getDataObject2().getRTNCovarianceBlock().getCndotr(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.482e-3, file.getDataObject2().getRTNCovarianceBlock().getCndott(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(8.633e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotn(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-1.903e-6, file.getDataObject2().getRTNCovarianceBlock().getCndotrdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(-4.594e-6, file.getDataObject2().getRTNCovarianceBlock().getCndottdot(),\n COVARIANCE_PRECISION);\n Assertions.assertEquals(5.178e-5, file.getDataObject2().getRTNCovarianceBlock().getCndotndot(),\n COVARIANCE_PRECISION);\n\n // Check relative metadata comments for Object1\n ArrayList<String> relativeMetadataComment = new ArrayList<String>();\n relativeMetadataComment.add(\"Relative Metadata/Data\");\n Assertions.assertEquals(relativeMetadataComment, file.getRelativeMetadata().getComment());\n\n // Check metadata comments for Object1\n ArrayList<String> MetadataComment = new ArrayList<String>();\n MetadataComment.add(\"Object1 Metadata\");\n Assertions.assertEquals(MetadataComment, file.getMetadataObject1().getComments());\n\n // Check data general comments and OD parameters comments for Object1\n ArrayList<String> generalComment = new ArrayList<String>();\n generalComment.add(\"Object1 Data\");\n Assertions.assertEquals(generalComment, file.getDataObject1().getComments());\n\n // Check additional parameters comments Object1\n ArrayList<String> addParametersComment = new ArrayList<String>();\n addParametersComment.add(\"Object 1 Additional Parameters\");\n Assertions.assertEquals(addParametersComment,\n file.getDataObject1().getAdditionalParametersBlock().getComments());\n\n // Check state vector comments Object1\n ArrayList<String> stateVectorComment = new ArrayList<String>();\n stateVectorComment.add(\"Object1 State Vector\");\n Assertions.assertEquals(stateVectorComment, file.getDataObject1().getStateVectorBlock().getComments());\n\n // Check RTN covariance comments Object1\n ArrayList<String> RTNComment = new ArrayList<String>();\n RTNComment.add(\"Object1 Covariance in the RTN Coordinate Frame\");\n Assertions.assertEquals(RTNComment, file.getDataObject1().getRTNCovarianceBlock().getComments());\n\n\n // Check general comments Object2\n ArrayList<String> generalCommentObj2AddParam = new ArrayList<String>();\n generalCommentObj2AddParam.add(\"Object2 Additional Parameters\");\n generalCommentObj2AddParam.add(\"Apogee Altitude=768 km, Perigee Altitude=414 km, Inclination=98.8 deg\");\n Assertions.assertEquals(generalCommentObj2AddParam.toString(),\n file.getDataObject2().getAdditionalParametersBlock().getComments().toString());\n\n }", "private void parse(String _content){\n\t\tString[] segmts = _content.split(\"\\\\s+\");\n\t\trelKeyTimes = new double[segmts.length + 2];\n\t\tfor(int i = 0; i < segmts.length; i++){\n\t\t\ttry{\n\t\t\t\tif(timingIsAbsolute){\n\t\t\t\t\trelKeyTimes[i + 1] = (float)(new CMsgTime(segmts[i])).getTotalMillis();\n\t\t\t\t} else {\n\t\t\t\t\trelKeyTimes[i + 1] = Float.parseFloat(segmts[i]);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e){;\n\t\t\t} catch (ScriptMsgException e){;}\n\t\t\t\n\t\t}\n\t\t// make sure the last keyTime is a perfect 1.0:\n\t\trelKeyTimes[0] = 0.0f;\n\t\trelKeyTimes[relKeyTimes.length - 1] = 1.0f;\n\t}", "public static VersionVO parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n VersionVO object =\n new VersionVO();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"VersionVO\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (VersionVO)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.platform.blackboard/xsd\",\"version\").equals(reader.getName())){\n \n java.lang.String content = reader.getElementText();\n \n object.setVersion(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n object.setVersion(java.lang.Long.MIN_VALUE);\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected synchronized void parse() throws MessagingException {\n/* 481 */ if (this.parsed) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 487 */ this.ignoreMissingEndBoundary = PropUtil.getBooleanSystemProperty(\"mail.mime.multipart.ignoremissingendboundary\", true);\n/* */ \n/* */ \n/* 490 */ this.ignoreMissingBoundaryParameter = PropUtil.getBooleanSystemProperty(\"mail.mime.multipart.ignoremissingboundaryparameter\", true);\n/* */ \n/* */ \n/* 493 */ this.ignoreExistingBoundaryParameter = PropUtil.getBooleanSystemProperty(\"mail.mime.multipart.ignoreexistingboundaryparameter\", false);\n/* */ \n/* */ \n/* 496 */ this.allowEmpty = PropUtil.getBooleanSystemProperty(\"mail.mime.multipart.allowempty\", false);\n/* */ \n/* */ \n/* 499 */ this.bmparse = PropUtil.getBooleanSystemProperty(\"mail.mime.multipart.bmparse\", true);\n/* */ \n/* */ \n/* 502 */ if (this.bmparse) {\n/* 503 */ parsebm();\n/* */ \n/* */ return;\n/* */ } \n/* 507 */ InputStream in = null;\n/* 508 */ SharedInputStream sin = null;\n/* 509 */ long start = 0L, end = 0L;\n/* */ \n/* */ try {\n/* 512 */ in = this.ds.getInputStream();\n/* 513 */ if (!(in instanceof java.io.ByteArrayInputStream) && !(in instanceof BufferedInputStream) && !(in instanceof SharedInputStream))\n/* */ {\n/* */ \n/* 516 */ in = new BufferedInputStream(in); } \n/* 517 */ } catch (Exception ex) {\n/* 518 */ throw new MessagingException(\"No inputstream from datasource\", ex);\n/* */ } \n/* 520 */ if (in instanceof SharedInputStream) {\n/* 521 */ sin = (SharedInputStream)in;\n/* */ }\n/* 523 */ ContentType cType = new ContentType(this.contentType);\n/* 524 */ String boundary = null;\n/* 525 */ if (!this.ignoreExistingBoundaryParameter) {\n/* 526 */ String bp = cType.getParameter(\"boundary\");\n/* 527 */ if (bp != null)\n/* 528 */ boundary = \"--\" + bp; \n/* */ } \n/* 530 */ if (boundary == null && !this.ignoreMissingBoundaryParameter && !this.ignoreExistingBoundaryParameter)\n/* */ {\n/* 532 */ throw new MessagingException(\"Missing boundary parameter\");\n/* */ }\n/* */ \n/* */ try {\n/* 536 */ LineInputStream lin = new LineInputStream(in);\n/* 537 */ StringBuffer preamblesb = null;\n/* */ \n/* 539 */ String lineSeparator = null; String line;\n/* 540 */ while ((line = lin.readLine()) != null) {\n/* */ int i;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 548 */ for (i = line.length() - 1; i >= 0; i--) {\n/* 549 */ char c = line.charAt(i);\n/* 550 */ if (c != ' ' && c != '\\t')\n/* */ break; \n/* */ } \n/* 553 */ line = line.substring(0, i + 1);\n/* 554 */ if (boundary != null) {\n/* 555 */ if (line.equals(boundary))\n/* */ break; \n/* 557 */ if (line.length() == boundary.length() + 2 && line.startsWith(boundary) && line.endsWith(\"--\")) {\n/* */ \n/* 559 */ line = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* 568 */ } else if (line.length() > 2 && line.startsWith(\"--\") && (\n/* 569 */ line.length() <= 4 || !allDashes(line))) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 577 */ boundary = line;\n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 584 */ if (line.length() > 0) {\n/* */ \n/* */ \n/* 587 */ if (lineSeparator == null) {\n/* */ try {\n/* 589 */ lineSeparator = System.getProperty(\"line.separator\", \"\\n\");\n/* */ }\n/* 591 */ catch (SecurityException ex) {\n/* 592 */ lineSeparator = \"\\n\";\n/* */ } \n/* */ }\n/* */ \n/* 596 */ if (preamblesb == null)\n/* 597 */ preamblesb = new StringBuffer(line.length() + 2); \n/* 598 */ preamblesb.append(line).append(lineSeparator);\n/* */ } \n/* */ } \n/* */ \n/* 602 */ if (preamblesb != null) {\n/* 603 */ this.preamble = preamblesb.toString();\n/* */ }\n/* 605 */ if (line == null) {\n/* 606 */ if (this.allowEmpty) {\n/* */ return;\n/* */ }\n/* 609 */ throw new MessagingException(\"Missing start boundary\");\n/* */ } \n/* */ \n/* */ \n/* 613 */ byte[] bndbytes = ASCIIUtility.getBytes(boundary);\n/* 614 */ int bl = bndbytes.length;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 620 */ boolean done = false;\n/* */ \n/* 622 */ while (!done) {\n/* 623 */ MimeBodyPart part; InternetHeaders headers = null;\n/* 624 */ if (sin != null) {\n/* 625 */ start = sin.getPosition();\n/* */ \n/* 627 */ while ((line = lin.readLine()) != null && line.length() > 0);\n/* */ \n/* 629 */ if (line == null) {\n/* 630 */ if (!this.ignoreMissingEndBoundary) {\n/* 631 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* */ \n/* 634 */ this.complete = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } else {\n/* 639 */ headers = createInternetHeaders(in);\n/* */ } \n/* */ \n/* 642 */ if (!in.markSupported()) {\n/* 643 */ throw new MessagingException(\"Stream doesn't support mark\");\n/* */ }\n/* 645 */ ByteArrayOutputStream buf = null;\n/* */ \n/* 647 */ if (sin == null) {\n/* 648 */ buf = new ByteArrayOutputStream();\n/* */ } else {\n/* 650 */ end = sin.getPosition();\n/* */ } \n/* 652 */ boolean bol = true;\n/* */ \n/* 654 */ int eol1 = -1, eol2 = -1;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ while (true) {\n/* 660 */ if (bol) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 666 */ in.mark(bl + 4 + 1000);\n/* */ int i;\n/* 668 */ for (i = 0; i < bl && \n/* 669 */ in.read() == (bndbytes[i] & 0xFF); i++);\n/* */ \n/* 671 */ if (i == bl) {\n/* */ \n/* 673 */ int b2 = in.read();\n/* 674 */ if (b2 == 45 && \n/* 675 */ in.read() == 45) {\n/* 676 */ this.complete = true;\n/* 677 */ done = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 682 */ while (b2 == 32 || b2 == 9) {\n/* 683 */ b2 = in.read();\n/* */ }\n/* 685 */ if (b2 == 10)\n/* */ break; \n/* 687 */ if (b2 == 13) {\n/* 688 */ in.mark(1);\n/* 689 */ if (in.read() != 10) {\n/* 690 */ in.reset();\n/* */ }\n/* */ break;\n/* */ } \n/* */ } \n/* 695 */ in.reset();\n/* */ \n/* */ \n/* */ \n/* 699 */ if (buf != null && eol1 != -1) {\n/* 700 */ buf.write(eol1);\n/* 701 */ if (eol2 != -1)\n/* 702 */ buf.write(eol2); \n/* 703 */ eol1 = eol2 = -1;\n/* */ } \n/* */ } \n/* */ \n/* */ int b;\n/* 708 */ if ((b = in.read()) < 0) {\n/* 709 */ if (!this.ignoreMissingEndBoundary) {\n/* 710 */ throw new MessagingException(\"missing multipart end boundary\");\n/* */ }\n/* 712 */ this.complete = false;\n/* 713 */ done = true;\n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 721 */ if (b == 13 || b == 10) {\n/* 722 */ bol = true;\n/* 723 */ if (sin != null)\n/* 724 */ end = sin.getPosition() - 1L; \n/* 725 */ eol1 = b;\n/* 726 */ if (b == 13) {\n/* 727 */ in.mark(1);\n/* 728 */ if ((b = in.read()) == 10) {\n/* 729 */ eol2 = b; continue;\n/* */ } \n/* 731 */ in.reset();\n/* */ } continue;\n/* */ } \n/* 734 */ bol = false;\n/* 735 */ if (buf != null) {\n/* 736 */ buf.write(b);\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 744 */ if (sin != null) {\n/* 745 */ part = createMimeBodyPartIs(sin.newStream(start, end));\n/* */ } else {\n/* 747 */ part = createMimeBodyPart(headers, buf.toByteArray());\n/* 748 */ } super.addBodyPart(part);\n/* */ } \n/* 750 */ } catch (IOException ioex) {\n/* 751 */ throw new MessagingException(\"IO Error\", ioex);\n/* */ } finally {\n/* */ try {\n/* 754 */ in.close();\n/* 755 */ } catch (IOException cex) {}\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 760 */ this.parsed = true;\n/* */ }", "public Message(String unparsedData){\n\t\theaderLines = new ArrayList<ArrayList<String>>();\n\t\tString[] headFromEntity = unparsedData.split(\"\\n\\n\", 2);\n\t\tString[] msgInfo = headFromEntity[0].split(\"\\n\");\n\t\tString[] status = msgInfo[0].split(\" \");\n\t\t\n\t\tthis.messageInfo[0]= status[0];\t\t\t\t\t// Version\n\t\tthis.messageInfo[1] = status[1];\t\t\t\t// status code\n\t\tthis.messageInfo[2] = msgInfo[0].substring(2);\t// phrase\n\t\t\n\t\tfor (int i = 1; i < msgInfo.length; i++){\n\t\t\tstatus = msgInfo[i].split(\" \");\n\t\t\theaderLines.add(new ArrayList<String>());\n\t\t\theaderLines.get(headerLines.size()-1).add(status[0]);\n\t\t\theaderLines.get(headerLines.size()-1).add(msgInfo[i].substring(status[0].length()));\n\t\t}\n\t\t\n\t\tentity = headFromEntity[1].getBytes();\n\t}", "public void parse(String fileName) throws Exception;", "@Override\n protected void onTextData(Reader r) throws IOException {\n\n }", "public NFA parse() throws ParseException;", "protected void logParsedMessage()\n {\n if (log.isInfoEnabled())\n {\n StringBuffer buf = new StringBuffer(\"Parsed EASMessage:\");\n buf.append(\"\\n OOB alert = \").append(isOutOfBandAlert());\n buf.append(\"\\n sequence_number = \").append(this.sequence_number);\n buf.append(\"\\n protocol_version = \").append(this.protocol_version);\n buf.append(\"\\n EAS_event_ID = \").append(this.EAS_event_ID);\n buf.append(\"\\n EAS_originator_code = \").append(this.EAS_originator_code).append(\": \").append(\n getOriginatorText());\n buf.append(\"\\n EAS_event_code = \").append(this.EAS_event_code);\n buf.append(\"\\n nature_of_activation_text = \").append(getNatureOfActivationText(new String[] { \"eng\" }));\n buf.append(\"\\n alert_message_time_remaining = \").append(getAlertMessageTimeRemaining()).append(\" seconds\");\n buf.append(\"\\n event_start_time = \").append(this.event_start_time);\n buf.append(\"\\n event_duration = \").append(this.event_duration).append(\" minutes\");\n buf.append(\"\\n alert_priority = \").append(getAlertPriority());\n buf.append(\"\\n details_OOB_source_ID = \").append(this.details_OOB_source_ID);\n buf.append(\"\\n details_major_channel_number = \").append(this.details_major_channel_number);\n buf.append(\"\\n details_minor_channel_number = \").append(this.details_minor_channel_number);\n buf.append(\"\\n audio_OOB_source_ID = \").append(this.audio_OOB_source_ID);\n buf.append(\"\\n alert_text = \").append(getAlertText(new String[] { \"eng\" }));\n buf.append(\"\\n location_code_count = \").append(this.m_locationCodes.size());\n for (int i = 0; i < this.m_locationCodes.size(); ++i)\n {\n buf.append(\"\\n location[\").append(i).append(\"]: \").append(this.m_locationCodes.get(i).toString());\n }\n buf.append(\"\\n exception_count = \").append(this.m_exceptions.size());\n for (int i = 0; i < this.m_exceptions.size(); ++i)\n {\n buf.append(\"\\n exception[\").append(i).append(\"]: \").append(this.m_exceptions.get(i).toString());\n }\n buf.append(\"\\n descriptor count = \").append(this.m_descriptors.size());\n for (int i = 0; i < this.m_descriptors.size(); ++i)\n {\n buf.append(\"\\n descriptor[\").append(i).append(\"]: \").append(this.m_descriptors.get(i).toString());\n }\n buf.append(\"\\n isAudioChannelAvailable = \").append(isAudioChannelAvailable());\n buf.append(\"\\n number of audio sources = \").append(this.m_audioFileSources.size());\n for (int i = 0; i < this.m_audioFileSources.size(); ++i)\n {\n buf.append(\"\\n audio file source[\").append(i).append(\"]: \").append(\n this.m_audioFileSources.get(i).toString());\n }\n buf.append(\"\\n m_detailsChannelLocator = \").append(this.m_detailsChannelLocator);\n buf.append(\"\\n m_eventReceivedTime = \").append(new Date(this.m_eventReceivedTime));\n buf.append(\"\\n m_eventStartTime = \").append(new Date(this.m_eventStartTime));\n buf.append(\"\\n m_eventExpirationTime = \").append(new Date(this.m_eventExpirationTime));\n if (log.isInfoEnabled())\n {\n log.info(buf.toString());\n }\n }\n }", "List<ParseData> parse(ParseDataSettings parseData);", "private Measurement parseMeasurement(Element e) {\n if (e != null && e.getNodeName().equals(\"measurement\")) {\n NumberFormat format = NumberFormat.getInstance(Locale.GERMANY);\n Number value;\n\n try {\n // get measurement Value\n value = format.parse(e.getAttribute(\"value\"));\n\n // get timeStamp\n LocalDateTime timeStamp = LocalDateTime\n .parse(e.getAttribute(\"timestamp\"));\n\n Measurement m = new Measurement(value.doubleValue(), timeStamp);\n return m;\n } catch (ParseException e1) {\n System.err.println(\n \"Value was not a Number with Germany formation (comma)\");\n return null;\n }\n } else {\n return null;\n }\n }", "public Object[] parse()\n\t{\n\t\tObject[] contents = new Object[2];\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\n\t\t\tSAXParser parser = factory.newSAXParser();\n\t\t\tWumpusWorldHandler handler = new WumpusWorldHandler();\n\t\t\tparser.parse(this.file, handler);\n\t\t\t\n\t\t\tcontents[0] = handler.getBoard();\n\t\t\tcontents[1] = handler.getPosition();\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn contents;\n\t}", "public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }", "protected final void parsem() {\n current = read();\n skipSpaces();\n\n final float x = parseNumber();\n skipCommaSpaces();\n final float y = parseNumber();\n\n currentX += x;\n smoothQCenterX = currentX;\n smoothCCenterX = currentX;\n currentY += y;\n smoothQCenterY = currentY;\n smoothCCenterY = currentY;\n p.moveTo(smoothCCenterX, smoothCCenterY);\n lastMoveToX = smoothCCenterX;\n lastMoveToY = smoothCCenterY;\n\n skipCommaSpaces();\n }", "public abstract byte[] parse(String input);", "@Override\n\tpublic Collection<Measurement> parseMeasurements(byte[] serializedMeasurements, int offset, int length)\n\t{\n\t\treturn parseMeasurements(ByteBuffer.wrap(serializedMeasurements, offset, length));\n\t}", "private void parseMessages() {\n\n // Find the first delimiter in the buffer\n int inx = rx_buffer.indexOf(DELIMITER);\n\n // If there is none, exit\n if (inx == -1)\n return;\n\n // Get the complete message\n String s = rx_buffer.substring(0, inx);\n\n // Remove the message from the buffer\n rx_buffer = rx_buffer.substring(inx + 1);\n\n // Send to read handler\n sendToReadHandler(s);\n\n // Look for more complete messages\n parseMessages();\n }", "public void parse() throws Exception {\r\n\t\tToken token;\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\ttry {\r\n\t\t\t// Loop over each token until the end of file.\r\n\t\t\twhile (!((token = nextToken()) instanceof EofToken)) {\r\n\t\t\t\tTokenType tokenType = token.getType();\r\n\t\t\t\tif (tokenType != ERROR) {\r\n\t\t\t\t\t// Format each token.\r\n\t\t\t\t\tsendMessage(new Message(TOKEN, new Object[] {\r\n\t\t\t\t\t\t\ttoken.getLineNumber(), token.getPosition(),\r\n\t\t\t\t\t\t\ttokenType, token.getText(), token.getValue() }));\r\n\t\t\t\t} else {\r\n\t\t\t\t\terrorHandler.flag(token,\r\n\t\t\t\t\t\t\t(OracleErrorCode) token.getValue(), this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Send the parser summary message.\r\n\t\t\tfloat elapsedTime = (System.currentTimeMillis() - startTime) / 1000f;\r\n\t\t\tsendMessage(new Message(PARSER_SUMMARY, new Number[] {\r\n\t\t\t\t\ttoken.getLineNumber(), getErrorCount(), elapsedTime }));\r\n\t\t} catch (java.io.IOException ex) {\r\n\t\t\terrorHandler.abortTranslation(IO_ERROR, this);\r\n\t\t}\r\n\t}", "public abstract void decode(SubtitleInputBuffer subtitleInputBuffer);", "public static String[] parsingMSRData(byte[] rawData)\n {\n final byte[] FS = { (byte) 0x1C };\n final byte[] ETX = { (byte) 0x03 };\n\n String temp = new String(rawData);\n String trackData[] = new String[3];\n\n // ETX , FS\n String[] rData = temp.split(new String(ETX));\n temp = rData[0];\n String[] tData = temp.split(new String(FS));\n\n switch (tData.length)\n {\n case 1:\n break;\n case 2:\n trackData[0] = tData[1];\n break;\n case 3:\n trackData[0] = tData[1];\n trackData[1] = tData[2];\n break;\n case 4:\n trackData[0] = tData[1];\n trackData[1] = tData[2];\n trackData[2] = tData[3];\n break;\n }\n return trackData;\n }", "@Test\n public void testParseExtensionMessageContent() {\n KeyShareExtensionParser parser = new KeyShareExtensionParser(start, extension, Config.createConfig());\n KeyShareExtensionMessage msg = parser.parse();\n assertArrayEquals(msg.getExtensionBytes().getValue(), completeExtension);\n assertArrayEquals(type.getValue(), msg.getExtensionType().getValue());\n assertTrue(extensionLength == msg.getExtensionLength().getValue());\n assertArrayEquals(msg.getKeyShareListBytes().getValue(), ksListBytes);\n assertTrue(ksListLength == msg.getKeyShareListLength().getValue());\n }", "private String parseNumber () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n fBuffer.delete(0, fBuffer.length());//empty string buffer\r\n \r\n char chr=next();//get next character\r\n assert \"-0123456789\".indexOf(chr)>=0;//assert valid start character\r\n while (\"0123456789.Ee+-\".indexOf(chr)>=0) {//until non number character\r\n fBuffer.append(chr);//append to string buffer\r\n chr=next();//get next character\r\n if (chr==NONE) throw new RuntimeException(\"Invalid syntax : \"+context());//gee, thanks...\r\n }//until non number character\r\n \r\n if (\"]},\".indexOf(chr)<0) throw new RuntimeException(\"Invalid syntax : \"+context());//no way jose\r\n\r\n back(); //rewind to the terminator character\r\n \r\n return fBuffer.toString();//return string in buffer\r\n \r\n }", "public abstract String getEtokenValue() throws WebdavException;", "public ArrayList<ArrayList<Double>> parseVertices() {\n\t\tArrayList<ArrayList<Double>> ret = new ArrayList<ArrayList<Double>>();\n\t\tString file = getFilepath();\n\t\ttry {\n\t\t\tFile myObj = new File(file);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tif (data.length() > 2 && data.substring(0,2).equals(\"v \")) {\n\t\t\t\t\tString[] s = data.split(\" \");\n\t\t\t\t\tArrayList<Double> v = new ArrayList<Double>();\n\t\t\t\t\tv.add(Double.parseDouble(s[1]));\n\t\t\t\t\tv.add(Double.parseDouble(s[2]));\n\t\t\t\t\tv.add(Double.parseDouble(s[3]));\n\t\t\t\t\tret.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ret;\n\n\t}", "public org.jivesoftware.smackx.xdata.packet.DataForm parse(org.xmlpull.v1.XmlPullParser r6, int r7) {\n /*\n r5 = this;\n r0 = \"\";\n r1 = \"type\";\n r0 = r6.getAttributeValue(r0, r1);\n r0 = org.jivesoftware.smackx.xdata.packet.DataForm.Type.fromString(r0);\n r1 = new org.jivesoftware.smackx.xdata.packet.DataForm;\n r1.<init>(r0);\n L_0x0011:\n r0 = r6.next();\n switch(r0) {\n case 2: goto L_0x0021;\n case 3: goto L_0x0019;\n default: goto L_0x0018;\n };\n L_0x0018:\n goto L_0x0011;\n L_0x0019:\n r0 = r6.getDepth();\n if (r0 == r7) goto L_0x0020;\n L_0x001f:\n goto L_0x0011;\n L_0x0020:\n return r1;\n L_0x0021:\n r0 = r6.getName();\n r2 = r6.getNamespace();\n r3 = -1;\n r4 = r0.hashCode();\n switch(r4) {\n case -427039533: goto L_0x006e;\n case 3242771: goto L_0x0064;\n case 3433103: goto L_0x005a;\n case 97427706: goto L_0x0050;\n case 107944136: goto L_0x0046;\n case 110371416: goto L_0x003c;\n case 757376421: goto L_0x0032;\n default: goto L_0x0031;\n };\n L_0x0031:\n goto L_0x0077;\n L_0x0032:\n r4 = \"instructions\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x003a:\n r3 = 0;\n goto L_0x0077;\n L_0x003c:\n r4 = \"title\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x0044:\n r3 = 1;\n goto L_0x0077;\n L_0x0046:\n r4 = \"query\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x004e:\n r3 = 5;\n goto L_0x0077;\n L_0x0050:\n r4 = \"field\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x0058:\n r3 = 2;\n goto L_0x0077;\n L_0x005a:\n r4 = \"page\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x0062:\n r3 = 6;\n goto L_0x0077;\n L_0x0064:\n r4 = \"item\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x006c:\n r3 = 3;\n goto L_0x0077;\n L_0x006e:\n r4 = \"reported\";\n r0 = r0.equals(r4);\n if (r0 == 0) goto L_0x0077;\n L_0x0076:\n r3 = 4;\n L_0x0077:\n switch(r3) {\n case 0: goto L_0x00bf;\n case 1: goto L_0x00b6;\n case 2: goto L_0x00ad;\n case 3: goto L_0x00a4;\n case 4: goto L_0x009b;\n case 5: goto L_0x0088;\n case 6: goto L_0x007b;\n default: goto L_0x007a;\n };\n L_0x007a:\n goto L_0x0011;\n L_0x007b:\n r0 = \"http://jabber.org/protocol/xdata-layout\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x0011;\n L_0x0083:\n r0 = org.jivesoftware.smackx.xdatalayout.provider.DataLayoutProvider.parse(r6);\n goto L_0x0096;\n L_0x0088:\n r0 = \"jabber:iq:roster\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x0011;\n L_0x0090:\n r0 = org.jivesoftware.smack.roster.provider.RosterPacketProvider.INSTANCE;\n r0 = r0.parse(r6);\n L_0x0096:\n r1.addExtensionElement(r0);\n goto L_0x0011;\n L_0x009b:\n r0 = parseReported(r6);\n r1.setReportedData(r0);\n goto L_0x0011;\n L_0x00a4:\n r0 = parseItem(r6);\n r1.addItem(r0);\n goto L_0x0011;\n L_0x00ad:\n r0 = parseField(r6);\n r1.addField(r0);\n goto L_0x0011;\n L_0x00b6:\n r0 = r6.nextText();\n r1.setTitle(r0);\n goto L_0x0011;\n L_0x00bf:\n r0 = r6.nextText();\n r1.addInstruction(r0);\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.jivesoftware.smackx.xdata.provider.DataFormProvider.parse(org.xmlpull.v1.XmlPullParser, int):org.jivesoftware.smackx.xdata.packet.DataForm\");\n }", "public FeedEvent processMessage(byte[] message) {\n\t\tif ((message == null) || (message.length < 2))\n\t\t\treturn null;\n\n\t\tDdfMarketBase msg = Codec.parseMessage(message);\n\n\t\tif (msg == null) {\n\t\t\tlog.error(\"DataMaster.processMessage(\" + new String(message) + \") failed.\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn processMessage(msg);\n\t}", "public static WsPmsResult parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n WsPmsResult object =\n new WsPmsResult();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"WsPmsResult\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (WsPmsResult)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\"errorMessage\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setErrorMessage(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\"responseXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setResponseXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\"result\").equals(reader.getName())){\n \n java.lang.String content = reader.getElementText();\n \n object.setResult(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n object.setResult(java.lang.Integer.MIN_VALUE);\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public GetParse(String line){\r\n\r\n Inline = line;\r\n this.parseWord(line);\r\n }", "protected void parseCDT(RectData tempVector) throws LoadException {\n\t\t// find eweightLine, ngene, nexpr\n\t\tfindCdtDimensions(tempVector);\n\t\tloadArrayAnnotation(tempVector);\n\t\tloadGeneAnnotation(tempVector);\n\t\tloadCdtData(tempVector);\n\t}" ]
[ "0.61832726", "0.59983623", "0.58220214", "0.5803177", "0.56125766", "0.5582071", "0.5567091", "0.55611074", "0.54440695", "0.5440364", "0.5433749", "0.5408231", "0.53772604", "0.5374872", "0.5307699", "0.5298916", "0.5287632", "0.5287417", "0.52581155", "0.5255195", "0.5241163", "0.52200425", "0.518604", "0.5182119", "0.5173413", "0.51526326", "0.51289535", "0.51222456", "0.5065264", "0.5047098", "0.5036925", "0.50267154", "0.499996", "0.49963722", "0.49827206", "0.49614063", "0.49570724", "0.49569702", "0.49504226", "0.49467793", "0.49445307", "0.4938866", "0.49325442", "0.49266905", "0.48960704", "0.48869148", "0.4880943", "0.4869961", "0.48689717", "0.48659888", "0.4865047", "0.48547596", "0.48511374", "0.48320025", "0.48320025", "0.48202136", "0.48194873", "0.48151416", "0.48105824", "0.4804095", "0.48013657", "0.479735", "0.47939545", "0.47914737", "0.4788554", "0.47861964", "0.47839516", "0.47650677", "0.47616535", "0.4760917", "0.4758603", "0.47552148", "0.47470236", "0.47445947", "0.4739815", "0.4725922", "0.4725667", "0.47214904", "0.47180334", "0.4709923", "0.47095776", "0.469824", "0.46922484", "0.4690178", "0.46897462", "0.46858764", "0.46853796", "0.4682094", "0.46815717", "0.46798065", "0.4679525", "0.46675438", "0.46657047", "0.46654", "0.4664776", "0.46647295", "0.4662426", "0.4658164", "0.46436572", "0.4641451" ]
0.63564235
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Locacao)) { return false; } Locacao other = (Locacao) object; if ((this.idLocacao == null && other.idLocacao != null) || (this.idLocacao != null && !this.idLocacao.equals(other.idLocacao))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
/ renamed from: io.reactivex.functions.Predicate
public interface Predicate<T> { boolean test(@NonNull T t) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Predicate<I> extends Function<I,Boolean> {}", "@FunctionalInterface\n/* */ public interface Predicate<T>\n/* */ {\n/* */ default Predicate<T> and(Predicate<? super T> paramPredicate) {\n/* 68 */ Objects.requireNonNull(paramPredicate);\n/* 69 */ return paramObject -> (test((T)paramObject) && paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> negate() {\n/* 80 */ return paramObject -> !test((T)paramObject);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static <T> Predicate<T> isEqual(Object paramObject) {\n/* 115 */ return (null == paramObject) ? Objects::isNull : (paramObject2 -> paramObject1.equals(paramObject2));\n/* */ }\n/* */ \n/* */ boolean test(T paramT);\n/* */ }", "@Test\n public void testPredicateNot() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n\n assertTrue(isEven.apply(10));\n assertFalse(isEven.not().apply(10));\n }", "Boolean exists(Predicate<X> p);", "public interface IntPredicate {\n boolean test(int t);\n}", "@SuppressWarnings(\"unchecked\")\n @Test\n public void oneTruePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(true);\n\n assertTrue(allPredicate(predicate).evaluate(getTestValue()), \"single true predicate evaluated to false\");\n }", "@FunctionalInterface\npublic interface IntPredicate {\n boolean test(int t);\n}", "Predicate<Method> getPredicate();", "@Test\n public void testPredicateAlwaysTrue() {\n Predicate<Integer> predicate = Predicate.alwaysTrue();\n\n assertTrue(predicate.apply(10));\n assertTrue(predicate.apply(null));\n assertTrue(predicate.apply(0));\n }", "Boolean forAll(Predicate<X> p);", "public interface MyPredicate<T> {\n\n boolean command(T t);\n\n}", "@Test\n public void testPredicateAnd() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0;\n\n Predicate<Integer> evenOrDivSeven = isEven.and(isDivSeven);\n\n assertTrue(evenOrDivSeven.apply(14));\n assertFalse(evenOrDivSeven.apply(21));\n assertFalse(evenOrDivSeven.apply(8));\n assertFalse(evenOrDivSeven.apply(5));\n }", "BPredicate createBPredicate();", "GeneralPredicate createGeneralPredicate();", "public interface ApplePredicate {\n boolean test (Apple apple);\n}", "default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void oneFalsePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(false);\n assertFalse(allPredicate(predicate).evaluate(getTestValue()),\n \"single false predicate evaluated to true\");\n }", "Stream<T> filter(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate);", "public static void main(String[] args) {\n\t\tPredicate<Integer> fun1= x-> x>5;\r\n\t\tSystem.out.println(fun1.test(5));\r\n\t\t\r\n\t\tPredicate<String> fun2 = x-> x.isEmpty();\r\n\t\tSystem.out.println(fun2.test(\"\"));\r\n\t\t\r\n\t\tList<Integer> numbers = Arrays.asList(1,2,3,4,6,5,7,8,0);\r\n\t\tSystem.out.println(numbers.stream().filter(fun1).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with and\r\n\t\tSystem.out.println(numbers.stream().filter(x-> x>5 && x<8).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with negate\r\n\t\tList<String> names = Arrays.asList(\"Nayeem\", \"John\", \"SDET\");\r\n\t\tPredicate<String> fun3 = x -> x.contains(\"e\");\r\n\t\tSystem.out.println(names.stream().filter(fun3.negate()).collect(Collectors.toList()));\r\n\t\t\r\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<Boolean> any(\r\n\t\t\t@Nonnull final Observable<T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> predicate) {\r\n\t\treturn new Containment.Any<T>(source, predicate);\r\n\t}", "public interface AsyncPredicateListener {\n\n void onTrue();\n\n void onFalse();\n\n}", "Try<T> filter(Predicate<? super T> p);", "@Test\n public void testPredicateAlwaysFalse() {\n Predicate<Integer> predicate = Predicate.alwaysFalse();\n\n assertFalse(predicate.apply(10));\n assertFalse(predicate.apply(null));\n assertFalse(predicate.apply(0));\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> takeWhile(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> predicate) {\r\n\t\treturn new Take.While<T>(source, predicate);\r\n\t}", "Predicate<File> pass();", "List<E> list(Predicate<E> predicate);", "public interface Predicate<E> {\n\t\n\t/** Checks if a binary predicate relation holds. */\n\tboolean evaluate(E input);\n\t\n}", "IEmfPredicate<R> getPredicateVisible();", "public static <T> Predicate<Predicate<T>> test(T t) {\n\t\treturn pred -> pred.test(t);\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<T> where(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> clause) {\r\n\t\treturn new Where.Simple<T>(source, clause);\r\n\t}", "public static Predicate<Boolean> identity() {\n return new Predicate<Boolean>() {\n\n @Override\n public boolean test(Boolean b) {\n return b;\n }\n\n };\n }", "public static <T> Predicate<T> asPredicate(Function<T, Boolean> function) {\n\t\treturn function::apply;\n\t}", "@Test\n public void testPredicateOr() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0;\n\n Predicate<Integer> evenOrDivSeven = isEven.or(isDivSeven);\n\n assertTrue(evenOrDivSeven.apply(14));\n assertTrue(evenOrDivSeven.apply(21));\n assertTrue(evenOrDivSeven.apply(8));\n assertFalse(evenOrDivSeven.apply(5));\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> takeWhile(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, Boolean> predicate) {\r\n\t\treturn new Take.WhileIndexed<T>(source, predicate);\r\n\t}", "public RelationPredicate(){}", "public interface Filter extends Predicate<Element> {\n\n}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "default Predicate<T> negate() {\n/* 80 */ return paramObject -> !test((T)paramObject);\n/* */ }", "@Test\n public void testCaseIsPredicateBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseIs(s -> true, () -> success.set(true));\n assertTrue(success.get());\n }", "static <T> Predicate<T> isEqual(Object paramObject) {\n/* 115 */ return (null == paramObject) ? Objects::isNull : (paramObject2 -> paramObject1.equals(paramObject2));\n/* */ }", "@Nonnull\r\n\tpublic static <T> Observable<Boolean> all(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> predicate) {\r\n\t\treturn new Containment.All<T>(source, predicate);\r\n\t}", "default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }", "private static UnaryPredicate bepred() {\n return new UnaryPredicate() {\n public boolean execute(Object o) {\n\tif (o instanceof BulkEstimate) {\n\t return ((BulkEstimate)o).isComplete();\n }\n\treturn false;\n }\n };\n }", "public static <T> Function<T, Boolean> asFunction(Predicate<T> predicate) {\n\t\treturn predicate::test;\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public boolean satisfies(Predicate p){\r\n\t\tif(selfSatisfied)\r\n\t\t\treturn isSatisfied();\r\n\t\telse return ((type.equals(p.type))&&(id.equals(p.id) || p.id.equals(\"?\"))&&(value.equals(p.value)));\r\n\t}", "private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}", "public T casePredicate(Predicate object)\n {\n return null;\n }", "public QueryIterable<T> where(\n final Func2<Boolean, T> predicate\n ) {\n return Query.where(iterable, predicate);\n }", "public PredicateBuilder openPredicate(String name, String... argTypes) { return predicate(false, name, argTypes); }", "IEmfPredicate<R> getPredicateMandatory();", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "public void check(final Predicate<T> property);", "public abstract PredicateExpr getNext();", "@Nonnull\r\n\tpublic static <T> Observable<T> where(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, Boolean> clause) {\r\n\t\treturn new Where.Indexed<T>(source, clause);\r\n\t}", "public static <T> Predicate<T> not(Predicate<T> predicate) { return object -> !predicate.test(object); }", "@FunctionalInterface\n/* */ public interface DoublePredicate\n/* */ {\n/* */ default DoublePredicate and(DoublePredicate paramDoublePredicate) {\n/* 69 */ Objects.requireNonNull(paramDoublePredicate);\n/* 70 */ return paramDouble -> (test(paramDouble) && paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate or(DoublePredicate paramDoublePredicate) {\n/* 101 */ Objects.requireNonNull(paramDoublePredicate);\n/* 102 */ return paramDouble -> (test(paramDouble) || paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ boolean test(double paramDouble);\n/* */ }", "PolynomialNode filter(Predicate test);", "@Nonnull \r\n\tpublic static <T> Observable<Integer> count(\r\n\t\t\t@Nonnull Observable<? extends T> source, \r\n\t\t\t@Nonnull Func1<? super T, Boolean> predicate) {\r\n\t\treturn count(where(source, predicate));\r\n\t}", "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }", "KTable<K, V> filter(Predicate<K, V> predicate);", "IEmfPredicate<R> getPredicateEditable();", "public ElementList getPredicate() {\r\n return predicate;\r\n }", "@Test\n public void contains() {\n Observable.just(2, 30, 22, 5, 60, 1)\n .contains(22)\n .subscribe(mList::add);\n assertEquals(mList, Collections.singletonList(true));\n }", "public static <A> CompositePredicate<A> predicate(Predicate<? super A> pred) {\n return new CompositePredicate<A>(pred);\n }", "public static void main(String[] args) {\n\t\t\n\t\tPredicate<Integer> p1 = a-> a%2==0;\n\t\tSystem.out.println(p1.test(101));\n\t\tProduct product = new Product(100,\"shoes\",12.00);\n\t\t\n\t\tPredicate<Product> p2 = p->(p.id<50);\n\t\t\n\t\tSystem.out.println(p2.test(product));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@FunctionalInterface\npublic interface TwoElementPredicate<T> {\n\t\n\t/**\n\t * Defines a functional interface which can be implemented using a lamda function.\n\t * Returns true if the first element t1 of type T is better than the second element t2 of type T,\n * false otherwise.\n * Lambdas that implement this interface need to define what \"better\" means.\n\t * @param <T> t1\n\t * @param <T> t2\n\t * @return the 'better' String, with the lambda defining what \"better\" means.\n\t */\n\tpublic boolean isBetter(T t1, T t2);\n\n}", "public static void main(final String[] args) {\n\t\tfinal Predicate<Integer> p1 = i -> i > 10;\n\t\tSystem.out.println(p1.test(10)); // OP: false\n\n\t\t// i>10 && number is even then return true\n\t\tfinal Predicate<Integer> p2 = i -> i % 2 == 0;\n\t\tSystem.out.println(p1.and(p2).test(20)); // OP: true\n\n\t\t// i>10 || number is even then return true\n\t\tSystem.out.println(p1.or(p2).test(21)); // OP: true\n\n\t\t// i>10 && number is odd then return true\n\t\tSystem.out.println(p1.and(p2.negate()).test(21)); // OP: true\n\t}", "public static void main (String args [ ] ) {\r\n\t\r\n\tList<String> colors = Arrays.asList(\"red\", \"green\", \"yellow\");\r\n\t \r\n\tPredicate<String> test = n -> {\r\n\t \r\n\tSystem.out.println(\"Searching…\");\r\n\t \r\n\treturn n.contains(\"red\");\r\n\t \r\n\t};\r\n\t \r\n\tcolors.stream()\r\n\t \r\n\t.filter(c -> c.length() > 3).peek(System.out::println\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t)\r\n\t \r\n\t.allMatch(test);\r\n \r\n}", "private boolean allTrue(CompositeTrue predicate) {\n if (kids.isEmpty()) {\n return false;\n }\n\n Iterator<E> i = kids.iterator();\n while (i.hasNext()) {\n E future = i.next();\n if (!predicate.isTrue(future)) {\n return false;\n }\n }\n return true;\n }", "public abstract AisPacketStream filter(Predicate<? super AisPacket> predicate);", "private static Predicate<Person> predicate(CrudFilter filter) {\n return filter.getConstraints().entrySet().stream()\n .map(constraint -> (Predicate<Person>) person -> {\n try {\n Object value = valueOf(constraint.getKey(), person);\n return value != null && value.toString().toLowerCase()\n .contains(constraint.getValue().toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n })\n .reduce(Predicate::and)\n .orElse(e -> true);\n }", "private PredicateTransformer(Predicate predicate) {\n super();\n iPredicate = predicate;\n }", "public OptionalThing<THING> filter(OptionalThingPredicate<THING> oneArgLambda) {\n assertOneArgLambdaNotNull(oneArgLambda);\n return (OptionalThing<THING>) callbackFilter(oneArgLambda);\n }", "@Test\n public void test5(){\n List<Employee> list= fileEmployee(employees, new MyPredicate<Employee>() {\n @Override\n public boolean test(Employee employee) {\n return employee.getSalary()<=5000;\n }\n });\n for (Employee e : list){\n System.out.println(e);\n }\n }", "default boolean every( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().allMatch(predicate);\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> where(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func0<? extends Func2<? super T, ? super Integer, Boolean>> clauseFactory) {\r\n\t\treturn new Where.IndexedFactory<T>(source, clauseFactory);\r\n\t}", "Observable<Page<E>> search(C criteria);", "default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }", "private IPredicateElement createPredicate() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IAxiom.ELEMENT_TYPE, null, null);\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<Boolean> contains(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func0<? extends T> supplier) {\r\n\t\treturn any(source, new Func1<T, Boolean>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean invoke(T param1) {\r\n\t\t\t\tT value = supplier.invoke();\r\n\t\t\t\treturn param1 == value || (param1 != null && param1.equals(value));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Test public void onePredicate() {\n query(\"//ul/li['']\", \"\");\n query(\"//ul/li['x']\", LI1 + '\\n' + LI2);\n query(\"//ul/li[<a b='{\" + _RANDOM_INTEGER.args() + \" }'/>]\", LI1 + '\\n' + LI2);\n\n query(\"//ul/li[0]\", \"\");\n query(\"//ul/li[1]\", LI1);\n query(\"//ul/li[2]\", LI2);\n query(\"//ul/li[3]\", \"\");\n query(\"//ul/li[last()]\", LI2);\n }", "@Test\n public void testPredicate2() throws Exception {\n final RuleDescr rule = ((RuleDescr) (parse(\"rule\", \"rule X when Foo(eval( $var.equals(\\\"xyz\\\") )) then end\")));\n final PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n final List<?> constraints = pattern.getConstraint().getDescrs();\n TestCase.assertEquals(1, constraints.size());\n final ExprConstraintDescr predicate = ((ExprConstraintDescr) (constraints.get(0)));\n TestCase.assertEquals(\"eval( $var.equals(\\\"xyz\\\") )\", predicate.getExpression());\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);", "public PredicateOperator getOperator();", "public void higherOrderFunction(Function<Integer, Integer> function2,\n Predicate<Integer> predicate){\n System.out.println(\"Higher fn1: \" + function2.apply(10)); // output: Higher fn1: 11\n System.out.println(\"Higher fn2: \" + predicate.test(10)); // output: Higher fn2: false\n}", "public Element getPredicateVariable();", "public PredicateBuilder closedPredicate(String name, String... argTypes) { return predicate(true, name, argTypes); }", "public Object transform(Object input) {\n try {\n return new Boolean(iPredicate.evaluate(input));\n\n } catch (PredicateException ex) {\n throw new TransformerException(\"PredicateTransformer: \" + ex.getMessage(), ex);\n }\n }", "default boolean any( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().anyMatch(predicate);\n }", "@Override\n public Possible<T> filter(Predicate<? super T> predicate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n if (self.isPresent()) {\n boolean reallyPresent = true;\n T t = null;\n try {\n t = self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n reallyPresent = false;\n }\n if (reallyPresent) {\n return predicate.test(t);\n }\n }\n return false;\n }\n\n @Override\n public T get() {\n T result = self.get();\n if (predicate.test(result)) {\n return result;\n }\n throw new NoSuchElementException();\n }\n };\n }", "public IterableIterator<T> select(String predicate);", "@Nonnull\r\n\tpublic static <T> Observable<Boolean> contains(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tfinal T value) {\r\n\t\treturn any(source, new Func1<T, Boolean>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean invoke(T param1) {\r\n\t\t\t\treturn param1 == value || (param1 != null && param1.equals(value));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static <T> Predicate<T> not(final Predicate<T> predicate) {\n return new Predicate<T>() {\n\n @Override\n public boolean test(T t) {\n return !predicate.test(t);\n }\n\n };\n }", "public static void main(String[] args) {\n // count operator counter number of elements emmitted,\n Observable<Integer> observable = Observable.just(1,2,3,4);\n observable.count().subscribe(s->System.out.println(s));\n\n // conditional opertors\n // all() -> this operator checks condition for all values and returns false if any condition fails\n observable.all(i->i<3).subscribe(s->System.out.println(s));\n\n // any() -> this operator checks condition for all values and returns true if any condition is true\n // empty() -> checks if observable have empty value and returns true/false \n // contains() -> checks if specified item is contained/emmitted by observable\n // sequenceEqual() -> checks if two sequences are equals (sequences contains same values)\n\n observable.any(i->i<3).subscribe(s->System.out.println(s));\n observable.filter(i->i<5).isEmpty().subscribe(s->System.out.println(s));\n }", "public interface PredicateBinaryExpr extends BinaryExpr {\r\n /**\r\n * Returns the wildcard operator.\r\n * \r\n * @return the wildcard operator.\r\n */\r\n public PredicateOperator getOperator();\r\n\r\n /**\r\n * Returns the property.\r\n * \r\n * @return the property.\r\n */\r\n public Property getProperty();\r\n\r\n /**\r\n * Returns the string representation of the path qualified property.\r\n * \r\n * @return the string representation of the path qualified property\r\n */\r\n public String getPropertyPath();\r\n\r\n /**\r\n * Returns the query literal\r\n * \r\n * @return the query literal\r\n */\r\n public Literal getLiteral();\r\n}", "public Predicate(String type, String id, String value) {\r\n\t\t super();\r\n\t\t this.type = type;\r\n\t\t this.id = id;\r\n\t\t this.value = value;\r\n\t\t selfSatisfied = false;\r\n\t}", "@Override\n public Predicate<Transaction> getPredicate() {\n return t -> t.getTags().stream().anyMatch(budgets::containsKey);\n }", "static <T> Predicate<T> not(Predicate<T> predicate) {\n return predicate.negate();\n }", "@Override\n protected SerializablePredicate<T> getFilter(Query<T, Void> query) {\n return Optional.ofNullable(inMemoryDataProvider.getFilter())\n .orElse(item -> true);\n }" ]
[ "0.6759018", "0.66738486", "0.66279817", "0.6537236", "0.6521747", "0.652019", "0.64903206", "0.6479712", "0.64784515", "0.64627427", "0.6427581", "0.64155126", "0.6415196", "0.6408243", "0.6406156", "0.6362702", "0.6314803", "0.627675", "0.6272706", "0.62623423", "0.6257329", "0.6239017", "0.62154514", "0.61860055", "0.6088261", "0.6072278", "0.60705215", "0.60401", "0.603754", "0.6036141", "0.60309196", "0.6026486", "0.5971418", "0.5963249", "0.5960806", "0.59553283", "0.5954683", "0.59406376", "0.59331316", "0.5862643", "0.58577687", "0.5844291", "0.5830718", "0.5815294", "0.57984906", "0.5797777", "0.5786527", "0.5746881", "0.57442594", "0.57305205", "0.5727834", "0.57252836", "0.57189536", "0.57183945", "0.56520265", "0.56181437", "0.560957", "0.56066096", "0.559163", "0.55869806", "0.55837387", "0.55483", "0.55456674", "0.55311424", "0.55170333", "0.5515651", "0.54930186", "0.5489635", "0.5474859", "0.54684585", "0.5466882", "0.5464973", "0.54618543", "0.5428827", "0.54271674", "0.538635", "0.53659815", "0.53568965", "0.5355278", "0.5329208", "0.5315578", "0.531525", "0.53048325", "0.52960753", "0.52734315", "0.52723277", "0.52623403", "0.52585864", "0.525632", "0.5250643", "0.52500796", "0.5249973", "0.52439237", "0.5225265", "0.5223069", "0.5214959", "0.51987576", "0.5193968", "0.5185551", "0.51822644" ]
0.64816165
7
/ Metodo toString del aliado
@Override public String toString() { return nom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() ;", "@Override\n String toString();", "@Override\n String toString();", "@Override\n\tString toString();", "@Override\r\n String toString();", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "@Override\n String toString();", "public String toString() {\n\t}", "public String toString()\r\n/* 189: */ {\r\n/* 190:321 */ return this.autorizacion;\r\n/* 191: */ }", "@Override\n\tpublic String toString();", "@Override public String toString();", "public String toString() { return kind() + \":\"+ text() ; }", "@Override String toString();", "@Override\r\n\tpublic String toString();", "public String toString ( ) {\r\n String returnString = _name + \"{ id: \" + _uniqueID + \" pos: [\"+ getPosition().getPosition() + \"] }\";\r\n return returnString;\r\n }", "@Override\n public String toString();", "@Override\n public String toString();", "@Override\r\n public String toString();", "public String toString() { return stringify(this, true); }", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "@Override\r\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\r\n\t\t}", "@Override\n\tpublic String toString(){\n\n\t}", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\treturn super.toString();\n\t\t}", "@Override\n \tpublic String toString() {\n \t\treturn toStringHelper(1, \"\");\n \t}", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "public String toString() { return \"\"; }", "public String toString() { return \"\"; }", "@Override\n public String toString() {\n return toString(false, true, true, null);\n }", "public String toString(){\n \treturn \"todo: use serialize() method\";\r\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn super.toString();\r\n\t}", "public String toString() {\n \t\treturn super.toString();\n \t}", "@Override\n public String toString()\n {\n return this.toLsString();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"\";\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn this.titolo + \" \" +this.autore + \" \" + this.genere;\r\n\t}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n public abstract String toString();", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}" ]
[ "0.7904777", "0.7746123", "0.7746123", "0.7702174", "0.76637506", "0.7621499", "0.7589863", "0.75898045", "0.75832796", "0.7575646", "0.7563688", "0.75627863", "0.75595224", "0.7551528", "0.7543546", "0.75423944", "0.75423944", "0.75416243", "0.7521781", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.75122666", "0.749472", "0.7491343", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.7476423", "0.74426997", "0.7441551", "0.7422865", "0.7418328", "0.74105334", "0.74105334", "0.73847055", "0.73706955", "0.73646617", "0.73646617", "0.73646617", "0.73646617", "0.73646617", "0.73646617", "0.73559535", "0.73555475", "0.73398566", "0.7323095", "0.7320556", "0.7319368", "0.7319368", "0.7319368", "0.7319368", "0.7319368", "0.7319368", "0.7319368", "0.7315692", "0.7315692", "0.7315692", "0.7315692" ]
0.0
-1
creates an input stream for the file to be parsed
public static void beautify(File input, File output) throws IOException, ParseException { FileInputStream in = new FileInputStream(input); CompilationUnit cu; try { // parse the file cu = JavaParser.parse(in); orderImports(cu); } finally { in.close(); } // prints the resulting compilation unit to default system output System.out.println(cu.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }", "public StreamReader() {}", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }", "public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }", "public File preProcessFile(InputStream in) throws IOException {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tLOG.info(\"BIOPAX Conversion started \"\n\t\t\t\t+ sdf.format(Calendar.getInstance().getTime()));\n\n\t\tif (in == null) {\n\t\t\tthrow new IllegalArgumentException(\"Input File: \" + \" is not found\");\n\t\t}\n\n\t\tSimpleIOHandler simpleIO = new SimpleIOHandler(BioPAXLevel.L3);\n\n\t\t// create a Paxtools Model from the BioPAX L3 RDF/XML input file (stream)\n\t\torg.biopax.paxtools.model.Model model = simpleIO.convertFromOWL(in);\n\t\t// - and the input stream 'in' gets closed inside the above method call\n\n\t\t// set for the IO to output full URIs:\n\n\t\tsimpleIO.absoluteUris(true);\n\n\t\tFile fullUriBiopaxInput = File.createTempFile(\"paxtools\", \".owl\");\n\n\t\tfullUriBiopaxInput.deleteOnExit(); // delete on JVM exits\n\t\tFileOutputStream outputStream = new FileOutputStream(fullUriBiopaxInput);\n\n\t\t// write to an output stream (back to RDF/XML)\n\n\t\tsimpleIO.convertToOWL((org.biopax.paxtools.model.Model) model,\toutputStream); // it closes the stream internally\n\n\t\tLOG.info(\"BIOPAX Conversion finished \" + sdf.format(Calendar.getInstance().getTime()));\n\t\treturn fullUriBiopaxInput;\n\t}", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public OnDemandInputStream(File file) {\n super();\n\n this.file = file;\n }", "public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }", "Stream<In> getInputStream();", "public InputStream readFile( String fileName, FileType type );", "protected InputStream getInputStream() throws IOException\n\t {\n\t FileInputStream fin = new FileInputStream(fFilename);\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }", "private InputStream getInstream() {\r\n\t\tif (instream == null) try {\r\n\t\t\tinstream = new FileInputStream(file);\r\n\t\t} catch(IOException ioe) {\r\n\t\t\tthrow new RuntimeException(\"Couldn't create instream for test\", ioe);\r\n\t\t}\r\n\t\treturn instream;\r\n\t}", "Object create(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "ReleaseFile parse( InputStream is ) throws IOException;", "public PragyanXmlParser(InputStream file) {\r\n\t\tfileToParse = file;\r\n\t\tcharWriter = new CharArrayWriter();\r\n\t\tdateWriter = new CharArrayWriter();\r\n\t\tformat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\"); \r\n\t\t\r\n\t}", "InputStream openStream() throws IOException;", "public JsonParser createParser(InputStream in)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 809 */ IOContext ctxt = _createContext(in, false);\n/* 810 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private IntStream createStream() {\n DataInputStream dataInputStream = null;\n try {\n dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n }\n DataInputStream finalDin = dataInputStream;\n return IntStream.generate(() -> {\n try {\n assert finalDin != null;\n return finalDin.readInt();\n } catch (IOException e) {\n System.out.println(\"Stream problem\");\n }\n return 0;\n })\n .limit(20);\n }", "public DerParser( InputStream in ) throws IOException {\n this.in = in;\n }", "public InputStream getInputStream() throws IOException {\n return new FileInputStream(_file);\n }", "public void setupParser(InputStream is) {\r\n inputSource = new InputSource(is);\r\n }", "@NotNull InputStream openInputStream() throws IOException;", "public Scanner( String filename ) throws IOException\n {\n sourceFile = new PushbackInputStream(new FileInputStream(filename));\n \n nextToken = null;\n }", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "public MiniLexer(java.io.InputStream in, Handler handler) {\r\n this(new java.io.InputStreamReader(in), handler);\r\n }", "public InputStream open(File file) {\n return new FileInputStream(file);\n }", "private InputStream openContentStream() {\n\t\tString contents =\n\t\t\t\"This is the initial file contents for *.opera file that should be word-sorted in the Preview page of the multi-page editor\";\n\t\treturn new ByteArrayInputStream(contents.getBytes());\n\t}", "public GridFSInputFile createFile(InputStream in, String filename,\n\t boolean closeStreamOnPersist) {\n\treturn new GridFSInputFile(this, in, filename, closeStreamOnPersist);\n }", "public void start(InputStream in, String path);", "Yylex(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public _SFMLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public abstract InputStream openStream(String str);", "InputStream convert(InputStream inputStream, String specificationName) throws IOException;", "public COSInputStream createInputStream() throws IOException\n {\n return stream.createInputStream();\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "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 File openInputFile() throws Exception{\n\t\t// Open the input file\n\t\tinputFile = new File(PLEIADEAN_FILE);\n\t\t\n\t\t// return to the caller\n\t\treturn(inputFile);\n\t}", "public static synchronized void Initialize() throws FileNotFoundException, UnsupportedEncodingException {\n fileReaderInit(fLocation);\n \n pbr = new PushbackReader(reader, 5);\n \n \n File currentDirFile = new File(\".\");\n String helper = currentDirFile.getAbsolutePath();\n outLocation = \"src/parser_resources/\" + outFile;\n /*scan.nextLine();*/\n \n File f = new File(outLocation);\n\n if (f.exists() && !f.isDirectory()) {\n fWriter = new PrintWriter(outLocation, \"Ascii\");\n System.out.println(\"\\nOutput file initialized for Scanner\");\n System.out.println(\"Scanning output to: \" + helper + \"/\" + outLocation);\n } else {\n System.out.println(\"Error: output file missing please \\\"touch\"\n + \"scanner.out\\\" in parser_resources directory.\");\n }\n }", "public ClassParser(final InputStream inputStream, final String file_name) {\n this.file_name = file_name;\n fileOwned = false;\n\n if (inputStream instanceof DataInputStream) {\n this.dataInputStream = (DataInputStream) inputStream;\n } else {\n this.dataInputStream = new DataInputStream(new BufferedInputStream(inputStream, BUF_SIZE));\n }\n }", "public CompressionInputStream(InputStream in) {\n super(in);\n }", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "@Override\n public InputStream getInputStream() throws IOException\n {\n/**/\n/**/\n/**/\n if (Files.isDirectory(path))\n throw new IOException(path + \" is a directory\");\n\n return Files.newInputStream(path,StandardOpenOption.READ);\n }", "public XMLReader()\r\n {\r\n \r\n String filePathHead = \"\";\r\n\r\n Path inputPath = Paths.get(\"src\\\\dataFiles\");\r\n\r\n try\r\n {\r\n filePathHead = inputPath.toRealPath().toString();\r\n System.out.println(\"PATH: \" + inputPath.toRealPath().toString());\r\n }\r\n catch (NoSuchFileException x)\r\n {\r\n System.err.format(\"%s: no such\" + \" file or directory%n\", filePathHead);\r\n // Logic for case when file doesn't exist.\r\n }\r\n catch (IOException x)\r\n {\r\n System.err.format(\"%s%n\", x);\r\n // Logic for other sort of file error.\r\n }\r\n }", "public void xmlInputStream() {\n inputStream = context.getResources().openRawResource(R.raw.flowers_xml);\n //stringInputStream = convertInputStreamToString(inputStream);\n //System.out.println(\"------------ InputStream ------------\\n\" + stringInputStream);\n //------------------------------------------------------------------------------------------\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "public void processInput(String theFile){processInput(new File(theFile));}", "public StreamReader(File file) {\r\n\t\tthis.setFile(file);\r\n\t}", "public XGMMLReader(InputStream is) {\n \t\tthis.networkStream = is;\n \t\tinitialize();\n \t}", "public GridFSInputFile createFile(InputStream in,\n\t boolean closeStreamOnPersist) {\n\treturn createFile(in, null, closeStreamOnPersist);\n }", "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "public static BufferedInputStream getInput(File file) throws IOException {\n return getInput(file.toPath());\n }", "protected Iterator parse(InputStream stream)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\treturn new BcPGPObjectFactory(stream).iterator();\r\n\t}", "static void init(InputStream input) {\n reader = new BufferedReader(new InputStreamReader(input));\n tokenizer = new StringTokenizer(\"\");\n }", "public COSInputStream createInputStream() throws IOException {\n/* 236 */ return this.stream.createInputStream();\n/* */ }", "static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "protected final ByteSource getInput(String name) {\n try {\n if (name.equals(\"-\")) {\n return new StandardInputSource();\n } else {\n File file = new File(name);\n if (!file.exists()) {\n throw new FileNotFoundException(name);\n } else if (file.isDirectory()) {\n throw new IOException(name); // TODO Message? Exception?\n } else if (!file.canRead()) {\n throw new IOException(name); // TODO Message? Exception?\n } else {\n return Files.asByteSource(file);\n }\n }\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }", "public FileCommandInput(File inputFile) throws FileNotFoundException {\n Validate.notNull(inputFile, \"Input can't be NULL\");\n this.in = new LineNumberReader(new FileReader(inputFile));\n }", "public StockReport init(InputStream inputStream){\n\t\tmStockReport = new StockReport();\n\t\t/**\n\t\t * counters used to determine if the Scanner is \n\t\t * on the first line or the last line\n\t\t */\n\t\tint counter = 0;\n\t\tint lineCount = 0;\n\t\t/**\n\t\t * initiate scanner with input.def file\n\t\t */\n\t\tScanner scanner = new Scanner(inputStream);\n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString line = scanner.nextLine();\n\t\t\tcounter++;\n\t\t\t/**\n\t\t\t * check and make sure we are not first line \n\t\t\t * or last line, if not parserRecord\n\t\t\t */\n\t\t\tif(counter > 1 && counter < lineCount){\n\t\t\t\tparseRecord(line);\n\t\t\t/**\n\t\t\t * if on the first line calculate how many lines\n\t\t\t * there are by adding two to the value of the \n\t\t\t * first line\n\t\t\t */\n\t\t\t}else if(counter == 1){\n\t\t\t\tlineCount = Integer.parseInt(line)+2;\n\t\t\t/**\n\t\t\t * if this is the last line set the Date Cut off\n\t\t\t * and the Market Price for vesting in the StockReport Model\n\t\t\t */\n\t\t\t}else{\n\t\t\t\tString[] split = line.split(\",\");\n\t\t\t\tmStockReport.setDateCut(Integer.parseInt(split[RECORD_DATECUT]));\n\t\t\t\tmStockReport.setmMarketPrice(Double.parseDouble(split[RECORD_MARKETPRICE]));\n\t\t\t}\n\t\t }\n\t\tscanner.close();\n\t\treturn mStockReport;\n\t}", "protected StreamParser()\n {\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "SparseStream openFile(String path, FileMode mode) throws IOException;", "static void init(InputStream input) {\r\n\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n\r\n tokenizer = new StringTokenizer(\"\");\r\n\r\n }", "public ResourceInputStream(File file) throws IOException {\n\t\t\tthis(new FileInputStream(file), file.lastModified());\n\t\t}", "public void processStreamInput() {\n }", "public _RestFlexLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "Auditorium(java.util.Scanner input, java.io.File file){\r\n\t\t\r\n\t\tString line = input.next(); // read in next line from file // or nextLine()\r\n\t\tboolean flag = true;\r\n\t\tcolumns = line.length();\r\n\t\twhile(line != \"\" && flag != false) {\r\n\t\t\trows++; // increment number of rows\r\n\t\t\tif (!input.hasNext())\r\n\t\t\t\tflag = false;\r\n\t\t\tparseLine(line, rows, columns); // send line, array, and rows to a parse function\r\n\t\t\tif(input.hasNext())\r\n\t\t\t\tline = input.next(); //read in next line\r\n\t\t}\r\n\t}", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "protected abstract InputStream getFile(final String path);", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "public void inputFromStream(BufferedReader dis) throws IOException {\n String line = dis.readLine();\n setFile(line);\n int lines = Str.strToInt(dis.readLine());\n if (lines != 0) {\n lineNos = new int[lines];\n for (int i = 0; i < lineNos.length; ++i) {\n lineNos[i] = Str.strToInt(dis.readLine());\n }\n }\n }" ]
[ "0.67260146", "0.67066514", "0.650775", "0.64766437", "0.6413909", "0.6378263", "0.63261104", "0.62950504", "0.6271372", "0.6137105", "0.6121564", "0.61108994", "0.6103169", "0.60598224", "0.5980119", "0.5975469", "0.59438944", "0.59400773", "0.5926593", "0.5922425", "0.5919594", "0.59086066", "0.58918464", "0.58735645", "0.5856081", "0.58440155", "0.5812344", "0.57998544", "0.578756", "0.57679397", "0.5749359", "0.57453525", "0.5735204", "0.57343453", "0.571099", "0.5702256", "0.56977105", "0.5674911", "0.5670021", "0.5666446", "0.566644", "0.56646043", "0.56485635", "0.56405276", "0.56306326", "0.56140023", "0.5610031", "0.56030387", "0.5591165", "0.5591165", "0.5591165", "0.55908924", "0.5586322", "0.5584187", "0.5578604", "0.55612624", "0.5558864", "0.5558864", "0.5544645", "0.55430657", "0.55426055", "0.5528266", "0.5522411", "0.55204874", "0.5507513", "0.5492327", "0.54874176", "0.54854", "0.5484787", "0.54844224", "0.5483828", "0.54829395", "0.5476154", "0.5473501", "0.54689336", "0.5464623", "0.5463109", "0.54620004", "0.546188", "0.54605454", "0.5460266", "0.5458788", "0.54547346", "0.54547346", "0.5452516", "0.54496944", "0.54492164", "0.54486954", "0.54479694", "0.5443635", "0.54385525", "0.5429719", "0.54288024", "0.54288024", "0.54288024", "0.54288024", "0.5425772", "0.542542", "0.5422973", "0.54041827", "0.540264" ]
0.0
-1
get the full package name as would be printed
private static String getFullyQualifiedImport( ImportDeclaration importDeclaration) { NameExpr nameExpr = importDeclaration.getName(); String buf = nameExpr.getName(); while (nameExpr instanceof QualifiedNameExpr) { nameExpr = ((QualifiedNameExpr) nameExpr).getQualifier(); buf = nameExpr.getName() + "." + buf; } return buf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPackage();", "String getPackageName() {\n final int lastSlash = name.lastIndexOf('/');\n final String parentPath = name.substring(0, lastSlash);\n return parentPath.replace('/', '.');\n }", "public DsByteString getFullPackageName() {\n if (m_subPackages == null || m_subPackages.size() == 0) {\n return m_strPackage;\n }\n\n DsByteString fullName = m_strPackage.copy();\n Iterator iter = m_subPackages.listIterator(0);\n // GOGONG 09/08/05 should not append \".\" to the pacakge name if sub-package is null\n DsByteString nextSubPkg;\n while (iter.hasNext()) {\n nextSubPkg = (DsByteString) iter.next();\n if (nextSubPkg != null) {\n fullName.append(BS_PERIOD);\n fullName.append(nextSubPkg);\n }\n }\n\n return fullName;\n }", "java.lang.String getPackageName();", "@Override\n public String toString() {\n return packageName;\n }", "public String getRuntimeName() {\r\n\t\tfinal StringBuffer runtimeName = new StringBuffer();\r\n\t\tfinal String name = this.getName();\r\n\t\tfinal Package packagee = this.getPackage();\r\n\t\tfinal String packageName = null == packagee ? null : packagee.getName();\r\n\t\tString nameLessPackageName = name;\r\n\r\n\t\tif (false == Tester.isNullOrEmpty(packageName)) {\r\n\t\t\truntimeName.append(packageName);\r\n\t\t\truntimeName.append('.');\r\n\r\n\t\t\tnameLessPackageName = name.substring(packageName.length() + 1);\r\n\t\t}\r\n\r\n\t\tnameLessPackageName = nameLessPackageName.replace('.', '$');\r\n\t\truntimeName.append(nameLessPackageName);\r\n\r\n\t\treturn runtimeName.toString();\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 }", "String pkg();", "private String getPkgName () {\n return context.getPackageName();\n }", "public String getName() {\n return Utility.getInstance().getPackageName();\n }", "public String getPackageName() {\n final var lastDotIdx = name.lastIndexOf('.');\n\n if (lastDotIdx > 0) {\n return name.substring(0, lastDotIdx);\n } else {\n throw new CodeGenException(String.format(\"Couldn't determine package name of '%s'\", name));\n }\n }", "private static String getPackage(final String fullName) {\n \t\treturn fullName.substring(0, fullName.lastIndexOf(\".\"));\n \t}", "String getPackageName();", "public abstract String packageName();", "String packageName() {\n return name;\n }", "String getFullName() {\r\n StringBuffer buf = new StringBuffer(type.getName());\r\n Summary current = type.getParent();\r\n\r\n while (current != null) {\r\n if (current instanceof TypeSummary) {\r\n buf.insert(0, \".\");\r\n buf.insert(0, ((TypeSummary)current).getName());\r\n } else if (current instanceof PackageSummary) {\r\n String temp = ((PackageSummary)current).getName();\r\n\r\n if ((temp != null) && (temp.length() > 0)) {\r\n buf.insert(0, \".\");\r\n buf.insert(0, temp);\r\n }\r\n }\r\n current = current.getParent();\r\n }\r\n\r\n return buf.toString();\r\n }", "default String getPackageName() {\n return declaringType().getPackageName();\n }", "public static String getPackageName() {\n return CELibHelper.sPackageName;\n }", "public static String getFormattedBukkitPackage() {\n final String version = getBukkitPackage().replace(\"v\", \"\").replace(\"R\", \"\");\n return version.substring(2, version.length() - 2);\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 getPackageName() {\n Object ref = packageName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n packageName_ = s;\n }\n return s;\n }\n }", "public String getPackageName() {\n Object ref = packageName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n packageName_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getModelPackageStr() {\n\t\tString thepackage = getModelXMLTagValue(\"package\");\n\t\treturn thepackage != null ? thepackage + \".\" : \"\";\n\t}", "@Override\n public String getLocalPackageName() {\n return Name.from(getApiWrapperModuleName().split(\"[^a-zA-Z0-9']+\")).toLowerCamel();\n }", "protected String getPackageName(Class<?> type) {\n return type.getPackage().getName();\n }", "public String getPackageName() {\n\t\treturn pkgField.getText();\n\t}", "private static String packageName(String cn) {\n int index = cn.lastIndexOf('.');\n return (index == -1) ? \"\" : cn.substring(0, index);\n }", "public String getPackageName();", "public static String getBukkitPackage() {\n return Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n }", "public String getPackageName() {\n return packageName.get();\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 String getFullyQualifiedName() {\n\t\treturn this.getPackageName() + \".\" + this.getClassName();\n\t}", "public String getAppPackage() {\n\t\treturn fnh.getOutputAppPackage();\n\t}", "public static String getPackageFromName(String name)\n \t{\n \t\tif (name.lastIndexOf('/') != -1)\n \t\t\tname = name.substring(0, name.lastIndexOf('/'));\n \t\tif (name.startsWith(\"/\"))\n \t\t\tname = name.substring(1);\n \t\treturn name.replace('/', '.');\t\t\n \t}", "private static String getPackage() {\n\t\tPackage pkg = EnergyNet.class.getPackage();\n\n\t\tif (pkg != null) {\n\t\t\tString packageName = pkg.getName();\n\n\t\t\treturn packageName.substring(0, packageName.length() - \".api.energy\".length());\n\t\t}\n\n\t\treturn \"ic2\";\n\t}", "public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}", "public String getPackageName() {\n return mAppEntry.info.packageName;\n }", "public static String getPackageName(Context ctx) {\n return packageName = ctx.getPackageName();\n }", "public String getFullName() {\n return getAndroidPackage() + \"/\" + getInstrumentationClass();\n }", "private String getExportPackage() {\n boolean hasSharedPackages = false;\n StringBuilder exportPackage = new StringBuilder();\n // XXX: Because of issue #1517, root package is returned more than once\n // I wrap packages in the LinkedHashSet, that elliminates duplicates \n // while retaining the insertion order. \n // (see https://github.com/ceylon/ceylon-compiler/issues/1517)\n for (Package pkg : new LinkedHashSet<>(module.getPackages())) {\n if (pkg.isShared()) {\n if (hasSharedPackages) {\n exportPackage.append(\";\");\n }\n exportPackage.append(pkg.getNameAsString());\n //TODO : should we analyze package uses as well?\n hasSharedPackages = true;\n }\n }\n if (hasSharedPackages) {\n // Ceylon has no separate versioning of packages, so all\n // packages implicitly inherit their respective module version\n exportPackage.append(\";version=\").append(module.getVersion());\n }\n return exportPackage.toString();\n }", "public String getReadableName(String packageName){\n ApplicationInfo applicationInfo;\n try{\n applicationInfo = packageManager.getApplicationInfo(packageName, 0);\n }\n catch (Exception e){\n applicationInfo = null;\n }\n if(packageNameReadableNameMap.containsKey(packageName))\n return packageNameReadableNameMap.get(packageName);\n else if (applicationInfo != null)\n return (String)packageManager.getApplicationLabel(applicationInfo);\n else\n return packageName;\n }", "@NotNull\n public static String getFirstPackage(@NotNull String packageName) {\n int idx = packageName.indexOf('.');\n return idx >= 0 ? packageName.substring(0, idx) : packageName;\n }", "public static String getPackageName(String className) {\n String packageName = getQualifier(className);\n return packageName != null ? packageName : \"\";\n }", "public String getAppName(PackageInfo packageInfo) {\n return (String) packageInfo.applicationInfo.loadLabel(packageManager);\n }", "public String getFullyQualifiedPackageName(final Object object) {\r\n\t\treturn (String) super.invokeCorrectMethod(object);\r\n\t}", "public String getPackagedJava();", "@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 PackageName() {\n setFullyQualified(\"\");\n setShortName(\"\");\n }", "protected abstract String getPackageName();", "public String getBasePackage() {\n\t\treturn this.basePackage;\n\t}", "public static String m21401e(Context context) {\n return context.getApplicationInfo().packageName;\n }", "public String getFullName() {\n return group + \".\" + name;\n }", "private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}", "public static String m19632a(Context context) {\n String str;\n String str2 = \"\";\n try {\n str = context.getPackageName();\n } catch (Throwable unused) {\n str = str2;\n }\n return str == null ? str2 : str.trim();\n }", "default HtmlFormatter shortenPackages() {\n return replace(\n PACKAGE_PATTERN,\n \"$2\"\n );\n }", "public static String getAbsoluteName(Package p) {\n\t\tString res = \"\";\n\t\twhile (p.parent.parent != null) {\n\t\t\tres = p.parent.name + \"_\" + res;\n\t\t\tp = p.parent;\n\t\t}\n\t\treturn res;\n\t}", "private String getPackageAlias(SymbolEnv env) {\n return env.enclPkg.imports.stream()\n .filter(imports -> imports.symbol.pkgID.toString().equals(ORG_NAME + ORG_SEPARATOR + PACKAGE_NAME))\n .map(importPackage -> importPackage.alias.value).findFirst().orElse(PACKAGE_NAME);\n }", "public String getModuleName() {\n if (repository == null) {\n return baseName;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(baseName);\n return b.toString();\n }\n }", "public String getPackageName() {\n return pkg;\n }", "@NotNull\n public static String dropFirstPackage(@NotNull String packageName) {\n int idx = packageName.indexOf('.');\n return idx >= 0 ? packageName.substring(idx + 1) : \"\";\n }", "public String getShortAppName();", "public static String getPackage(String element) {\n return element.substring(0, element.lastIndexOf('.'));\n }", "public static String getServicePackageName(String packagePrefix) {\n List<String> split = Splitter.on('/').splitToList(packagePrefix);\n String localName = \"\";\n if (split.size() < 2) {\n throw new IllegalArgumentException(\"expected packagePrefix to have at least 2 segments\");\n }\n // Get the second to last value.\n // \"google.golang.org/api/logging/v2beta1\"\n // ^^^^^^^\n localName = split.get(split.size() - 2);\n return localName;\n }", "@Override\n public String getApiWrapperModuleName() {\n List<String> names = Splitter.on(\".\").splitToList(packageName);\n return names.get(0);\n }", "String getFriendlyName(YAPIContext ctx) throws YAPI_Exception\n {\n if (_classname.equals(\"Module\")) {\n if (_logicalName.equals(\"\"))\n return _serial + \".module\";\n else\n return _logicalName + \".module\";\n } else {\n YPEntry moduleYP = ctx._yHash.resolveFunction(\"Module\", _serial);\n String module = moduleYP.getFriendlyName(ctx);\n int pos = module.indexOf(\".\");\n module = module.substring(0, pos);\n if (_logicalName.equals(\"\"))\n return module + \".\" + _funcId;\n else\n return module + \".\" + _logicalName;\n }\n }", "public static String getPackageName() {\n return mPackageName;\n }", "String getModuleDisplayName();", "java.lang.String getAppName();", "java.lang.String getAppName();", "java.lang.String getAppName();", "public String getFullyQualifiedName();", "public String getBasePackage() {\n\t\treturn DataStore.getInstance().getBasePackage();\n\t}", "public String getFullName() {\n return getNamespace().getFullName();\n }", "String getBundleSymbolicName();", "@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}", "io.deniffel.dsl.useCase.useCase.Package getPackage();", "public static String getCraftBukkitPackage() {\n \t\t// Ensure it has been initialized\n \t\tgetMinecraftPackage();\n \t\treturn CRAFTBUKKIT_PACKAGE;\n \t}", "private String name(String module)\n {\n return module.split(\"%%\")[1];\n }", "String getResourceBundleName() {\n return getPackageName() + \".\" + getShortName();\n }", "private String getPackageAlias(SymbolEnv env, BLangNode node) {\n String compUnitName = node.pos.getSource().getCompilationUnitName();\n for (BLangImportPackage importStmt : env.enclPkg.imports) {\n if (!ORG_NAME.equals(importStmt.symbol.pkgID.orgName.value) ||\n !PACKAGE_NAME.equals(importStmt.symbol.pkgID.name.value)) {\n continue;\n }\n\n if (importStmt.compUnit.value.equals(compUnitName)) {\n return importStmt.alias.value;\n }\n\n }\n\n return PACKAGE_NAME;\n }", "public static String packageName(TableModel table) {\n return instance.getPackageName(table);\n }", "public String getName()\n {\n return MODULE_NAME;\n }", "public String getPackageName() {\n return packageName;\n }", "public String getPackageName() {\n return packageName;\n }", "private String m5297b() {\n String str = \"\";\n try {\n return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n return str;\n }\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}", "public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }", "public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }", "public java.lang.String shortName () { throw new RuntimeException(); }", "public static Optional<String> packageName(String longName) {\n\t\tif (longName.contains(\".\")) {\n\t\t\treturn Optional.of(longName.substring(0,\n longName.lastIndexOf('.')\n ).replace(\" \", \"\"));\n\n\t\t} else {\n\t\t\treturn Optional.empty();\n\t\t}\n }", "public static String getAppPackageName(Context context) {\n\n\t\treturn context.getApplicationContext().getPackageName();\n\t}", "String getSymbolicName();", "public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }", "private String getVersionName() {\n\n\t\tString versionName = \"\";\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager\n\t\t\t\t\t.getPackageInfo(getPackageName(), 0);// 获取包的内容\n\t\t\t// int versionCode = packageInfo.versionCode;\n\t\t\tversionName = packageInfo.versionName;\n\t\t\tSystem.out.println(\"versionName = \" + versionName);\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn versionName;\n\t}", "public abstract String getAndroidPackage();", "public String getSystemName();", "String fullName();", "private static String getVerName(Context context) {\r\n String verName = \"unKnow\";\r\n try {\r\n verName = context.getPackageManager().\r\n getPackageInfo(context.getPackageName(), 0).versionName;\r\n } catch (PackageManager.NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n return verName;\r\n }", "public String getFormatName() {\n\t\tString name = getName();\n\t\tif (name.startsWith(SpotlessPlugin.EXTENSION)) {\n\t\t\tString after = name.substring(SpotlessPlugin.EXTENSION.length());\n\t\t\tif (after.endsWith(SpotlessPlugin.CHECK)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.CHECK.length()).toLowerCase(Locale.US);\n\t\t\t} else if (after.endsWith(SpotlessPlugin.APPLY)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.APPLY.length()).toLowerCase(Locale.US);\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "public String getPackageName() {\n\t\treturn packageName;\n\t}", "public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}" ]
[ "0.8057319", "0.76376045", "0.75915885", "0.7560494", "0.7442466", "0.74194914", "0.7413661", "0.74130094", "0.7401434", "0.73946047", "0.73465425", "0.7288446", "0.7283229", "0.7224086", "0.71648234", "0.7143577", "0.7109618", "0.7088709", "0.70728594", "0.7065189", "0.7056315", "0.7040181", "0.69736093", "0.6966536", "0.69643724", "0.695884", "0.6944093", "0.69347113", "0.69241315", "0.6873415", "0.685938", "0.6857299", "0.68439466", "0.68334633", "0.6830214", "0.6810879", "0.6799852", "0.6784012", "0.6780433", "0.67735344", "0.67555386", "0.6726384", "0.6671307", "0.66701186", "0.6627722", "0.662648", "0.66237336", "0.6623565", "0.6605001", "0.65937215", "0.65414834", "0.6522647", "0.65142566", "0.6503058", "0.64872754", "0.64767075", "0.6463535", "0.6462193", "0.6454316", "0.6446055", "0.64411217", "0.64376634", "0.6428311", "0.6406036", "0.63895273", "0.6385744", "0.63806385", "0.63646716", "0.63646716", "0.63646716", "0.63527054", "0.6352564", "0.63519555", "0.6343646", "0.6327679", "0.6326258", "0.63256377", "0.6318732", "0.6311634", "0.63039964", "0.6299389", "0.6297512", "0.62870646", "0.62870646", "0.6278562", "0.62765515", "0.62758714", "0.62703705", "0.62670285", "0.6260856", "0.625855", "0.62584305", "0.6257805", "0.62527144", "0.6246885", "0.6245194", "0.62353706", "0.62351274", "0.6230246", "0.62187153", "0.62142617" ]
0.0
-1
Restricted constructor for Singleton creation. Visibility is relaxed from private to protected for testing purposes. The constructor should never be invoked outside of the class.
protected InterestRate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton() { }", "private Singleton() {\n\t}", "private Singleton()\n\t\t{\n\t\t}", "private Singleton(){}", "private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }", "private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }", "private SingletonObject() {\n\n\t}", "private Singleton(){\n }", "private LazySingleton(){}", "private SingletonSample() {}", "private SingletonDoubleCheck() {}", "private SingletonSigar(){}", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "private J2_Singleton() {}", "private Instantiation(){}", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private EagerInitializedSingleton() {\n\t}", "private EagerInitializedSingleton() {\n\t}", "private LoggerSingleton() {\n\n }", "private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }", "private SparkeyServiceSingleton(){}", "private InnerClassSingleton(){}", "private InstanceUtil() {\n }", "public SingletonVerifier() {\n }", "private Utility() {\n throw new IllegalAccessError();\n }", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private SingletonClass() {\n x = 10;\n }", "private SingletonEager(){\n \n }", "private Const() {\n }", "private EagerlySinleton()\n\t{\n\t}", "private Singleton()\r\n\t{\r\n\t\tSystem.out.println(\"1st instance of class Singleton created\");\r\n\t\tstr = \"Constructor init\";\r\n\t}", "private Security() { }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private Foo() {\n\t\tSystem.out.println(\"Private Constructor.\");\n\t}", "Reproducible newInstance();", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private SecurityConsts()\r\n\t{\r\n\r\n\t}", "private Utility() {\n\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private EagerInitializationSingleton() {\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private SingletonClass()\n {\n s = \"Hello I am a string part of Singleton class\";\n }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private NullSafe()\n {\n super();\n }", "private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private Constantes() {\r\n\t\t// No way\r\n\t}", "private XLogger() {\n throw new UnsupportedOperationException(\"Do not need instantiate!\");\n }", "private ObjectFactory() { }", "@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Constants() {\n throw new AssertionError();\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "private SingleObject()\r\n {\r\n }", "private ResourceFactory() {\r\n\t}", "private EclipsePrefUtils() {\n // Exists only to defeat instantiation.\n }", "private PropertySingleton(){}", "private Util() {\n }", "private MApi() {}", "private Util() {\n }", "private Util() {\n }", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "private Service() {}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "private PrefUtils() {\n }", "private ClassUtil() {}", "private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }", "private DarthSidious(){\n }", "private SupplierLoaderUtil() {\n\t}", "private PuzzleConstants() {\n // not called\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "public Instance() {\n }", "private A(){\n System.out.println(\"Instance created\");\n }", "private StaticData() {\n\n }", "private LOCFacade() {\r\n\r\n\t}", "private Util() { }", "private Constants() {\n }", "private Constants() {\n }", "private Server()\n\t{\n\t}", "private Rekenhulp()\n\t{\n\t}", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "private LogUtil() {\r\n /* no-op */\r\n }", "private Ex() {\n }", "private SingleTon() {\n\t}" ]
[ "0.8469356", "0.8372574", "0.83484054", "0.83279866", "0.814648", "0.8072138", "0.80062616", "0.79832023", "0.78554815", "0.7813375", "0.75717247", "0.7461472", "0.74520385", "0.7425358", "0.73334813", "0.7331536", "0.727219", "0.7242965", "0.72080356", "0.7202224", "0.7179271", "0.7179271", "0.71766317", "0.7154865", "0.7149657", "0.71465236", "0.71206886", "0.71019655", "0.70646554", "0.7033144", "0.70308137", "0.6995074", "0.6972498", "0.6941416", "0.69301856", "0.68640435", "0.6850148", "0.6836592", "0.68359864", "0.68331033", "0.68123144", "0.6766169", "0.6765187", "0.6736146", "0.6734571", "0.6714364", "0.6709857", "0.6694072", "0.66920304", "0.66816425", "0.6679478", "0.6669172", "0.6651513", "0.66499263", "0.6622777", "0.6621724", "0.6610916", "0.6605109", "0.65797204", "0.65669113", "0.6562117", "0.6560984", "0.6556398", "0.65533656", "0.65499544", "0.65436196", "0.6532335", "0.6531953", "0.6529866", "0.6529866", "0.651805", "0.6516518", "0.6516518", "0.65134585", "0.65117735", "0.650978", "0.6495294", "0.64802164", "0.64645725", "0.6456166", "0.6440962", "0.64287704", "0.64235324", "0.64199287", "0.64199287", "0.64199287", "0.64199287", "0.64199287", "0.6407942", "0.64073247", "0.6407032", "0.6401093", "0.6400837", "0.63983166", "0.63983166", "0.63952386", "0.6376792", "0.63745636", "0.63603604", "0.6355608", "0.6353051" ]
0.0
-1
returns random double between 3.0 and 9.0, based on todays date
public double todaysRate() { randomDelay(1.0, 2.0); LocalDate today = LocalDate.now(); int seed = today.getDayOfMonth() + today.getMonthValue() + today.getYear(); return new Random(1000 * seed).nextDouble() * 6.0 + 3.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date randomDate() {\n return VALUES.get(RND.nextInt(SIZE));\n }", "private Date randomDate() {\n int minDay = (int) LocalDate.of(2012, 1, 1).toEpochDay();\n int maxDay = (int) LocalDate.now().toEpochDay();\n int randomDay = minDay + intRandom(maxDay - minDay);\n LocalDate randomDate = LocalDate.ofEpochDay(randomDay);\n Date d = toDate(randomDate);\n return d;\n }", "private static Date getRandomDate(){\n Instant instant = Instant.now();\n long timeStampMillis = instant.toEpochMilli();\n long leftLimit = timeStampMillis - (1000 * 60 * 60 * 24 * 20);\n long rightLimit = timeStampMillis + (1000 * 60 * 60 * 24 * 20);\n return new Date(\n leftLimit + (long) (Math.random() * (rightLimit - leftLimit))\n );\n }", "private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }", "public static double rand() {\n return (new Random()).nextDouble();\n }", "public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}", "public double getRandom(){\n\t\treturn random.nextDouble();\n\t}", "public static double randomDouble() {\n return randomDouble(-Double.MAX_VALUE, Double.MAX_VALUE);\n }", "public static double random() {\r\n return uniform();\r\n }", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "private String getRandomDate() {\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR); \t\t\n\t\tint year = (int) Math.round(Math.random()*(currentYear-1950)+1950); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// between 1950 and currentYear\n\t\tint month = (int) Math.round(Math.floor(Math.random()*11)+1);\t\t\n\t\t// 3. select a random day in the selected month\n\t\t// 3.1 prepare an array to store how many days in each month\n\t\tint[] months = new int[]{31,28,30,30,31,30,31,31,30,31,30,31};\n\t\t// 3.2 if it is a leap year, feb (months[1]) should be 29\n\t\tif ((currentYear % 4 == 0) && ((currentYear % 100 != 0) || (currentYear % 400 == 0))) {\n\t\t\tmonths[1] = 29;\n\t\t}\n\t\tlong day = Math.round(Math.floor(Math.random()*(months[month-1]-1)+1));\n\t\treturn \"\"+year+\"-\"+month+\"-\"+day;\n\t}", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "public Double generateRandomDouble() {\n\t\tRandom rand = new Random(Double.doubleToLongBits(Math.random()));\n\t\treturn rand.nextDouble();\n\t}", "public static double random()\n {\n return _prng2.nextDouble();\n }", "private static double randomDouble(final Random rnd) {\n return randomDouble(Double.MIN_EXPONENT, Double.MAX_EXPONENT, rnd);\n }", "public double nextDouble(){\r\n\t\tlong rand = nextLong();\r\n\t\treturn (double)(rand & 0x000fffffffffffffL)/((double)0x000fffffffffffffL);\r\n\t}", "public static double fastRandomDouble(){\n\t\treturn rdm.nextDouble();\n\t\t//return rdm.nextDoubleFast();\n\t\t//return ((double)(fastRandomInt()) - ((double)Integer.MIN_VALUE)) / (-(Integer.MIN_VALUE * 2.0));\n\t}", "public static double random(double input){\n\t\treturn Math.random()*input;\n\t}", "public double getRandom() {\n return 20*Math.random() - 10;\n }", "private String getRandomDate(int Margin) {\n\t\t// Given Date in String format\n\t\tString todayDate = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tCalendar c = Calendar.getInstance();\n\t\ttry {\n\t\t\tc.setTime(sdf.parse(todayDate));\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Number of Days to add\n\t\tc.add(Calendar.DAY_OF_MONTH, generateRandomNumber() + Margin);\n\n\t\t// Date after adding the days to the given date\n\t\treturn sdf.format(c.getTime()).toString();\n\t}", "private String getVaryingDate() {\n LocalDateTime now = LocalDateTime.now();\n LocalDateTime variedDate = now.plusDays(new Random().nextInt((30-1) +1))\n .plusHours(new Random().nextInt((60-1) + 1))\n .withMinute(0);\n\n return variedDate.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));\n }", "public static double doubleSample() {\n return random_.nextDouble();\n }", "public String randomDateGenerator() {\n\n\t\tLocalDate startDate = LocalDate.now();\n\n\t\tint year = startDate.getYear();\n\t\tint month = startDate.getMonthValue();\n\t\tint day = startDate.getDayOfMonth();\n\n\t\tLocalDate endDate = LocalDate.of(year + 1, month, day);\n\n\t\tlong randomDate = randBetween(startDate.toEpochDay(), endDate.toEpochDay());\n\t\treturn LocalDate.ofEpochDay(randomDate).toString();\n\n\t}", "@Override\n\t\t\tpublic double getAsDouble() {\n\t\t\t\treturn Math.random();\n\t\t\t}", "public static Date newRandomDate(final Date from)\r\n\t{\r\n\t\tfinal Random secrand = new SecureRandom();\r\n\t\tfinal double randDouble = -secrand.nextDouble() * from.getTime();\r\n\t\tfinal double randomDouble = from.getTime() - secrand.nextDouble();\r\n\t\tfinal double result = randDouble * randomDouble;\r\n\t\treturn new Date((long)result);\r\n\t}", "public static double uniform() {\r\n return random.nextDouble();\r\n }", "public Double randomDouble() {\n\n final Random random = new Random();\n return random.nextInt(100) / 100.0;\n }", "public int generarDE(){\n int ts;\n float rnd=(float)Math.random();\n \n if(rnd<=0.35){ts=1;}\n else if(rnd<=0.75){ts=2;}\n else {ts=3;}\n \n return ts;\n }", "public double getTimestamp() {\n switch (randomType) {\n case EXPONENT:\n return forArrive ? (-1d / LAMBDA) * Math.log(Math.random()) : (-1d / NU) * Math.log(Math.random());\n\n default:\n return 0;\n }\n }", "public static LocalDate randomLocalDate() {\n\t\tlong minDay = LocalDate.now().plusDays(1).toEpochDay();\n\t\tlong maxDay = LocalDate.now().plusMonths(1).toEpochDay();\n\t\tlong randomDay = ThreadLocalRandom.current().nextLong(minDay, maxDay);\n\t\treturn LocalDate.ofEpochDay(randomDay);\n\t}", "public static double genRandomRestPeriod() {\n return Simulator.randomGenerator.genRestPeriod();\n }", "public static double uniform() {\n return random.nextDouble();\n }", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "private float randomPrice() {\n float price = floatRandom(this.maxRandomPrice);\n return price;\n }", "public static double getRandomRating() {\n return (double) (RandomNumberGenerator.getRandomInt(0, 10) / 2d);\n }", "public double randomValue(){\n\t\treturn _randomValue() + _randomValue() + _randomValue();\n\t}", "public static double randDouble(int hso) {\n\t Random rand = new Random();\n\n\t // nextInt is normally exclusive of the top value,\n\t // so add 1 to make it inclusive\n\t double randomNum = rand.nextDouble()*hso;\n\n\t return randomNum;\n\t}", "public static double genRandomServiceTime() {\n return Simulator.randomGenerator.genServiceTime();\n }", "public double nextServiceTime() {\n return (-1 / mu) * Math.log(1 - randomST.nextDouble());\n }", "public double doubleRandomNegativeNumbers() {\n\t\tdouble result = 0.0;\n\t\tresult = rnd.nextDouble() * (-10);\n\t\treturn result;\n\t}", "public static double random()\n {\n final int MAX_INT = 2147483647;\n int n = MAX_INT;\n \n // Just to ensure it does not return 1.0\n while(n == MAX_INT)\n \tn = abs (RAND.nextInt());\n \n return n * (1.0 / MAX_INT);\n }", "public static double randomPositiveDouble() {\n return randomDouble(1, Double.MAX_VALUE);\n }", "static double randomDouble(int maxExponent) {\n double result = RANDOM_SOURCE.nextDouble();\n result = Math.scalb(result, RANDOM_SOURCE.nextInt(maxExponent + 1));\n return RANDOM_SOURCE.nextBoolean() ? result : -result;\n }", "public static double randomNum(Random g)\n\t{\n\t\treturn -5+g.nextDouble()*10;\n\t}", "public static long randomTime() {\n return (random.nextInt(11) + 25)*1000;\n }", "private double getRandomDouble(double min, double max)\r\n\t{\r\n\t\tdouble randNum = Math.random() * (max - min) + min;\r\n\t\treturn randNum;\r\n\t}", "public static Timestamp getRandomLoginDate() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, generatRandomPositiveNegitiveValue(30, 30));\n\t\treturn new Timestamp(calendar.getTimeInMillis());\n\n\t}", "public static String randomDate() {\n DateFormat format = new SimpleDateFormat(\"ddMMyyHHmmss\");\n return format.format(new Date());\n }", "long random(long ws) {\r\n\t\treturn (System.currentTimeMillis() % ws);\r\n\t}", "private static double randDouble(double lower, double upper) {\n\t\tRandom random = new Random();\n\t\treturn (random.nextDouble() * (upper - lower)) + lower;\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public double getCurrentGeneration() throws IOException{\n\t\tint minute = TimeSlice.getCurrentMinute();\n\t\tif((minute<6*60)||(minute>18*60))\n\t\t\treturn Math.random();\t// at night, return a noise near to 0\n\t\tWebWeather webWeather = (new WebWeather()).getCurrentDay();\n\t\tint dayText = webWeather.getDayText();\n\t\tdouble level = normalPower*dayText/3.5;\n\t\tdouble d = (Math.random()-0.5)/0.5;\n\t\tdouble ratio = 0.1;\t\t// 波动方差\n\t\tdouble noise = ratio*level;\n\t\treturn level*Math.cos((minute-12*60)/12/60*Math.PI)+noise; \t\n\t}", "public static double randomDouble(double min, double max) {\r\n\t\tdouble diff = max - min;\r\n\t\treturn (Math.random() * diff) + min;\r\n\t}", "public double setRandomPrice() {\n\t\tdouble price = dishPrices.get(roll.nextInt(dishPrices.size()));\n\t\treturn price;\n\t}", "public static Double randomDecimal(){\r\n int max = 1000;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n double randDec = (randNum/100.0);\r\n \r\n return randDec;\r\n \r\n }", "private double m9971g() {\n return (new Random().nextDouble() * 0.4d) - 22.4d;\n }", "public float generarTE(){\n float ts;\n float rnd=(float)Math.random();\n \n if(rnd<=0.20){ts=1;}\n else if(rnd<=0.50){ts=2;}\n else if(rnd<=0.85){ts=3;}\n else {ts=4;}\n \n return ts;\n }", "private static double randomizePrice(double start) {\n start += (0.5 * Math.random()) * (Math.random() > 0.5 ? 1 : -1);\n start *= 1000;\n int result = (int) start;\n return result / 1000.0;\n }", "static int randomDelta(int average)\n\t{\n\t\treturn rand.nextInt(4*average + 1) - 2*average;\n\t}", "public static int getRndMonthNumber() {\n return ThreadLocalRandom.current().nextInt(1, 12 + 1);\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public static double generateDensity() {\n double lower = config.getDensityLowerBound();\n double upper = config.getDensityUpperBound();\n\n Random random = new Random();\n return lower + (upper - lower) * random.nextDouble();\n }", "private static double randomGenerator(double min, double max) {\n return (double)java.lang.Math.random() * (max - min +1) + min;\n }", "public double GenerateTime() {\r\n double d = R.nextDouble();\r\n double generatedtime=mean+range*(d-0.5);\r\n return generatedtime;\r\n }", "@Override\r\n\t\tpublic Double get() {\n\t\t\treturn Math.random();\r\n\t\t}", "public static double randomNegativeDouble() {\n return randomDouble(-Double.MAX_VALUE, 0);\n }", "protected Random get_rand_value()\n {\n return rand;\n }", "@Override\r\n public Double getValue() {\r\n return Math.random()*Integer.MAX_VALUE;\r\n \r\n }", "public double DiskServiceTime()\r\n\t{\r\n\t\tdouble rand = 0.0;\r\n\t\tdouble sum = 0.0;\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tsum += Math.random();\r\n\t\t}\r\n\t\tsum = (sum - 10.0/2.0) / Math.sqrt(10.0/12.0);\r\n\t\trand = 20.0 * sum - 100.0;\r\n\t\trand = Math.abs(rand);\r\n\t\treturn rand;\r\n\t}", "public static double URV() {\r\n\t\tRandom randomGenerator = new Random();\r\n\t\treturn randomGenerator.nextDouble();\r\n\t}", "private int randomAge() {\n \tint low = 18;\n \tint high = 100;\n \tint offset = high - low;\n \tRandom r = new Random();\n \treturn r.nextInt(offset) + low;\n \t\n }", "public static String generateDOB() {\n GregorianCalendar gc = new GregorianCalendar();\n int yyyy = randBetween(1950, 2000);\n gc.set(gc.YEAR, yyyy);\n int dd = randBetween(1, gc.getActualMaximum(gc.DAY_OF_YEAR));\n gc.set(gc.DAY_OF_YEAR, dd);\n\t\tString dob= gc.get(gc.DAY_OF_MONTH)+\"-\"+(gc.get(gc.MONTH) + 1)+\"-\"+gc.get(gc.YEAR);\n System.out.println(gc.get(gc.DAY_OF_MONTH)+\"-\"+(gc.get(gc.MONTH) + 1)+\"-\"+gc.get(gc.YEAR));\n\t\treturn(dob);\n}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "private double generateTimeServ() throws ExceptionInvalidTimeDelay {\n if (distribution != null) {\n if (distribution.equalsIgnoreCase(\"exp\")) {\n timeServ = FunRand.exp(parametr);\n } else if (distribution.equalsIgnoreCase(\"unif\")) {\n timeServ = FunRand.unif(parametr - paramDeviation, parametr + paramDeviation);\n } else if (distribution.equalsIgnoreCase(\"norm\")) {\n timeServ = FunRand.norm(parametr, paramDeviation);\n }\n } else {\n timeServ = parametr;\n }\n return timeServ;\n }", "private Date toDate(LocalDate randomDate) {\n Date d = Date.from(randomDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());\n return d;\n }", "public static double genRandomRestNumber() {\n return Simulator.randomGenerator.genRandomRest();\n }", "public float gaussianRandom() {\n\t\treturn (CCMath.constrain((float)nextGaussian() / 4,-1 ,1 ) + 1) / 2;\n\t}", "public static int randomNext() { return 0; }", "private int randomWeight()\n {\n return dice.nextInt(1000000);\n }", "private static long getRandAccountD() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranchD(bid);\n }", "public static double nextGaussian() {\n return randGen.nextGaussian();\n }", "public static double rangedRandom(double a){\n\t\treturn -a + Calc.random(a * 2);\n\t}", "public double simulate(){\n\t\tdouble r = Math.sqrt(-2 * Math.log(Math.random()));\n\t\tdouble theta = 2 * Math.PI * Math.random();\n\t\treturn Math.exp(location + scale * r * Math.cos(theta));\n\t}", "private double generateRandomValue(int min, int max) {\n\t\tdouble number = (Math.random() * max * 100) / 100 + min;\n\t\treturn number;\n\t}", "static double expon(double mean) {\n return -mean * Math.log(Math.random());\n }", "public static int randomSleepTime() {\n return ThreadLocalRandom.current().nextInt(2000);\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 static void demoCommon() {\n Random random = new Random();\n random.setSeed(1);\n for (int i = 0; i < 4; ++i) {\n print(1, random.nextInt(100));\n print(2, random.nextDouble());\n }\n /** Arrays.asList turns array into List */\n List<Integer> array = Arrays.asList(new Integer[]{1, 2, 3, 4, 5});\n print(3, array);\n /** Collections.shuffle randomly permutes the specified list */\n Collections.shuffle(array);\n print(4, array);\n /** date class */\n Date date = new Date();\n print(5, date);\n print(6, date.getTime());\n DateFormat df = new SimpleDateFormat(\"HH:mm:ss yyyy/MM/dd\");\n /** set the format of time date */\n print(7, df.format(date));\n print(8, DateFormat.getDateInstance(DateFormat.FULL).format(date));\n // 习题,已知今天日期,计算未来的时间,星期几\n\n print(9, UUID.randomUUID());\n print(10, Math.max(1, 2));\n print(11, Math.ceil(2.2));\n print(12, Math.floor(2.2));\n print(13, Math.log(2.71)); //e\n }", "public static float getRandomWeight() {\n\t\tfloat weight = (float)(Math.random()*17+3);\n\t\treturn weight;\n\t}", "public double[] randomPoint(){\n\t\t\n\t\t//d1 = first random value\n\t\t//d2 = second random value\n\t\t\n\t\tdouble d1;\n\t\tdouble d2;\n\t\t\n\t\td1 = RAD_TO_DEG*(2.*PI*rnd1.nextDouble()-PI);\n\t\td2 = RAD_TO_DEG*acos(2.*rnd1.nextDouble()-1.) - 90.;\n\t\t\n\t\treturn new double[]{d2,d1};\n\t}", "public static int getRandomNumber(){\n int random = 0; // set variable to 0\r\n random = (int)(Math.random()*10) + 1; //generate random number between 1 and 10\r\n return random; //return random number\r\n }", "public float randomize() {\n return nextFloat(this.min, this.max);\n }", "public double random(CCInterpolator theInterpolator) {\n\t\treturn theInterpolator.interpolate(0, 0, 1, 1, random());\n\t}", "public static void main(String[] args) {\n\t\tDate today = new Date();\r\n\t\t\r\n\t\tSystem.out.println(random()); //////// 이렇게 생략가능 Math.random() -> random()\r\n\t\t\r\n\t\tSimpleDateFormat date = new SimpleDateFormat(\"yyyy/MM/dd\");//연도,월,일 순으로 date에 저장\r\n\t\tSimpleDateFormat time = new SimpleDateFormat(\"hh:mm:ss a\");\r\n\t\t\r\n\t\tSystem.out.println(\"오늘 날짜는 \" + date.format(today));\r\n\t\tSystem.out.println(\"현재 시간은 \" + time.format(today));\r\n\t}", "public int eDmg(){\r\n eDmg = rand.nextInt(13);\r\n return eDmg;\r\n }", "public int randomDP() {\n\t\treturn(getRandomInteger(10,250));\n\t}", "public static LocalDate generateExpiration() {\n LocalDate today = LocalDate.now(); //gives us the information at the moment the program is running\n int expYear = today.getYear() + 5;\n LocalDate exp = LocalDate.of(expYear, today.getMonth(), today.getDayOfMonth());\n return exp;\n }", "private static int newNumber()\n\t{\n\t\tdouble initial = Math.random();\n\t\tdouble rangeAdjusted = initial * (10000 - 1001) + 1000;\n\t\tint rounded = (int)Math.round(rangeAdjusted);\n\t\treturn rounded;\n\t}", "public double getRandomX() {\r\n\t\treturn x1;\r\n\t}", "@Override\n public long generateNewTimeToNextContract() {\n return new Random().nextInt(5);\n }" ]
[ "0.7358303", "0.7251427", "0.7230785", "0.7117023", "0.69570553", "0.69232506", "0.6842604", "0.67754674", "0.6769486", "0.6761304", "0.6736435", "0.6729014", "0.67241454", "0.6702574", "0.6671628", "0.66597086", "0.6595591", "0.6578401", "0.6533773", "0.6484119", "0.646404", "0.6457993", "0.6411691", "0.63851845", "0.63154143", "0.6283043", "0.6276445", "0.6264161", "0.6237153", "0.62309384", "0.6198845", "0.6196671", "0.6187686", "0.6180885", "0.61757255", "0.61734307", "0.6163522", "0.6148835", "0.61316776", "0.61285245", "0.609186", "0.60570854", "0.605318", "0.6049211", "0.6018529", "0.6016008", "0.6015908", "0.6010781", "0.59652746", "0.5933278", "0.59098107", "0.5903016", "0.5881094", "0.58741736", "0.5857119", "0.584165", "0.5840672", "0.5837141", "0.5830271", "0.5820823", "0.57999974", "0.578843", "0.57674384", "0.5766036", "0.57559013", "0.5743538", "0.57434386", "0.57322824", "0.5730616", "0.5716692", "0.5663687", "0.5650197", "0.562077", "0.5620319", "0.56020683", "0.5584131", "0.55721694", "0.5567786", "0.5544145", "0.5535138", "0.5531776", "0.55229837", "0.5522329", "0.550185", "0.5499844", "0.5494105", "0.54881", "0.54790235", "0.5478248", "0.5468642", "0.545039", "0.544773", "0.5433651", "0.5426546", "0.5417718", "0.54174125", "0.5415312", "0.5413392", "0.5410558", "0.5403931" ]
0.7723608
0
min, max in secs
private void randomDelay(double min, double max) { try { double delaySecs = rnd.nextDouble() * (max - min) + min; Thread.sleep((long) (delaySecs * 1000)); } catch (InterruptedException e) { // ignore } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "private int secToMin(int sec){\n return sec/60;\n }", "public int getMaxTime() { return _maxTime; }", "public void setTimeRange(int itmin, int itmax) {\n _itmin = itmin;\n _itmax = itmax;\n }", "public int getEleMinTimeOut(){\r\n\t\t String temp=rb.getProperty(\"eleMinTimeOut\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}", "public java.util.Collection getTimeLimit();", "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}", "private long calculateTimeToWait(int min, int max, long totalRunningTime)\n {\n double randomNumber = Math.random();\n\n if (randomNumber < 0.003)\n return Random.nextInt(60523, 127443);\n\n if (randomNumber < 0.05)\n return Random.nextInt(2519, 28111);\n\n long waitTime = (long) Random.nextInt(min, max);\n return (long) Math.floor(waitTime * (1 / (1 - (totalRunningTime / FIVE_HOURS_MILLIS))));\n }", "private double convertSecondsToMinutes(int seconds) {\r\n int sec = seconds;\r\n int min = 0;\r\n while (sec > 60) {\r\n sec -= 60;\r\n min++;\r\n }\r\n return Double.valueOf(min + \".\" + sec);\r\n }", "int getMinRecordingMillis();", "int getMaxRecordingMillis();", "@Override\n public double getMaxTimeBeetween2Measurement() {\n return super.getMaxTimeBeetween2Measurement();\n }", "public String manipulateTimeForScore(String mins, String secs) {\n\n\t\tint min = -1;\n\t\tint sec = -1;\n\t\tif (mins != null && mins.trim().length() > 0) {\n\t\t\ttry {\n\t\t\t\tmin = Integer.parseInt(mins);\n\t\t\t} catch (Exception e) {\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\tif (secs != null && secs.trim().length() > 0) {\n\t\t\ttry {\n\t\t\t\tsec = Integer.parseInt(secs);\n\t\t\t} catch (Exception e) {\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\tString result = \"\";\n\t\tif (min != -1 && sec != -1) {\n\t\t\tif (min < 10) {\n\t\t\t\tresult = \"0\" + min + \":\";\n\t\t\t} else {\n\t\t\t\tresult = min + \":\";\n\t\t\t}\n\n\t\t\tif (sec < 10) {\n\t\t\t\tresult = result + \"0\" + sec;\n\t\t\t} else {\n\t\t\t\tresult = result + sec;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "TimeResource maxDuration();", "int getAbsoluteMaximumDelay();", "private void populateMinMaxTime()\n {\n final ColumnHolder columnHolder = index.getColumnHolder(ColumnHolder.TIME_COLUMN_NAME);\n try (final NumericColumn column = (NumericColumn) columnHolder.getColumn()) {\n this.minTime = DateTimes.utc(column.getLongSingleValueRow(0));\n this.maxTime = DateTimes.utc(column.getLongSingleValueRow(column.length() - 1));\n }\n }", "public Integer getMaxTime() {\n return maxTime;\n }", "int getMaximumDelay();", "public double getSecs( );", "int getTtiSeconds();", "public Integer getMinTime() {\n return minTime;\n }", "public int getIntervalMinutes();", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "private String findMaximumValidTime1(int a, int b, int c, int d) {\n int[] arr = {a,b,c,d};\n int maxHr = -1;\n int hr_i = 0, hr_j = 0;\n\n //Find maximum HR\n for(int i=0; i < arr.length; i++){\n for(int j=i+1; j < arr.length; j++){\n int value1 = arr[i] * 10 + arr[j];\n int value2 = arr[j] * 10 + arr[i];\n if(value1 < 24 && value2 < 24){\n if(value1 > value2 && value1 > maxHr) {\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 > value1 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n }else if(value1 < 24 && value2 > 24 && value1 > maxHr){\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 < 24 && value1 > 24 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n\n }\n }\n System.out.println(maxHr);\n\n //Find maximum MM\n int[] mArr = new int[2]; //minutes array\n int k=0;\n for(int i=0; i < arr.length; i++){\n if(i != hr_i && i != hr_j){\n mArr[k++] = arr[i];\n }\n }\n\n System.out.println(Arrays.toString(mArr));\n int maxMin = -1;\n int val1 = mArr[0] * 10 + mArr[1];\n int val2 = mArr[1] * 10 + mArr[0];\n\n if(val1 < 60 && val2 < 60){\n maxMin = Math.max(val1,val2);\n }else if(val1 < 60 && val2 > 60) {\n maxMin = val1;\n }else if(val2 < 60 && val1 > 60){\n maxMin = val2;\n }\n System.out.println(maxMin);\n\n //Create answer\n StringBuilder sb = new StringBuilder();\n if(maxHr == -1 || maxMin == -1){\n return \"Not Possible\";\n }\n\n if(Integer.toString(maxHr).length() < 2){ //HR\n sb.append(\"0\"+maxHr+\":\");\n }else {\n sb.append(maxHr+\":\");\n }\n\n if(Integer.toString(maxMin).length() < 2){ //MM\n sb.append(\"0\"+maxMin);\n }else {\n sb.append(maxMin);\n }\n\n return sb.toString();\n }", "public void setMaxTimeSeconds(float aTime) { setMaxTime(Math.round(aTime*1000)); }", "public static double limitRange( double val , double max , double min )\n {\n //If number is greater than maximum, it becomes the maximum.\n if( val > max )\n {\n val = max; \n }\n else if( val < min )//Else if the number is less than minimum, it becomes the minimum.\n {\n val = min;\n }\n \n //Returns the limited number.\n return val;\n }", "public double getMaxTimeDiff()\n\t{\n\t\treturn 0;\n\t}", "int getMaxTicksLimit();", "final void minEvent() {\n minTime = Double.MAX_VALUE;\n if (timeOut.size() > 0) {\n for (int i = 0; i < timeOut.size(); i++) {\n if (timeOut.get(i) < minTime) {\n minTime = timeOut.get(i);\n num = i;\n }\n }\n }\n\n }", "public long getTimeLimit() {\n\t\treturn timeLimit;\n\t}", "public long ticks(){\n return maxTicks;\n\n }", "public WrongIntervalException(int max, int min, int actual) {\n super(\"Refresh inteval is \" + actual + \"sec but must be within \" + min + \"sec to \" + max + \"sec\");\n }", "public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }", "double getMinTimerTrig();", "public void setMaxTime(int aMaxTime)\n{\n // Set max time\n _maxTime = aMaxTime;\n \n // If time is greater than max-time, reset time to max time\n if(getTime()>_maxTime)\n setTime(_maxTime);\n}", "public int getEleMaxTimeOut(){\r\n\t\t String temp= rb.getProperty(\"eleMaxTimeOut\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }", "double getSolverTimeLimitSeconds();", "private String secsToTime(int secs) {\n String min = secs / 60 + \"\";\n String sec = secs % 60 + \"\";\n if(sec.length() == 1) {\n sec = \"0\" + sec;\n }\n\n return min + \":\" + sec;\n }", "public int getMinutes(){\n return (int) ((totalSeconds%3600)/60);\n }", "int maxSecondsForRawSampleRow();", "public int duration (long start, long end){\n\t\tlong duration = end - start;\n\t\tint time = (int)(duration /1000);\n\t\treturn time;\n\t}", "int getPaceSeconds() {\r\n\t\tint m = getContents(minutes);\r\n\t\tint s = getContents(seconds);\r\n\t\treturn 60*m +s;\r\n\t}", "public void setTime(int mins, int sec){\r\n this.Minutes = mins;\r\n this.Seconds = sec;\r\n }", "long getIntervalInSeconds();", "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "public long getMinTime()\n {\n return times[0];\n }", "public void durata(long start, long stop){\n\t\tlong durata = stop - start;\n\t\tlong secondi = durata % 60;\n\t\tlong minuti = durata / 60;\n\t\t\n\t\tSystem.out.println(\"Durata: \" + minuti + \"m \" + secondi + \"s\");\n\t}", "@Test\n\tpublic void testMinMinMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( min, MaxDiTre.max(min, min, min) );\n\t}", "public final double getMinTime() {\n\t\treturn minTime;\n\t}", "public static int getMinuteOfTime(long time){\n \t//time-=59999;\n \tif (time==0) { return 0; }\n \tint retMin=0;\n \tlong editMin = time % (60 * 60 * 1000) ;\n \tint oneMin = 1000 * 60;\n \twhile ((retMin*oneMin) < (editMin - 59999)){\n \t\tretMin++;\n \t}\n \treturn retMin;\n }", "public int getMinutes(){\r\n return Minutes;\r\n }", "public static void printTimelimit() {\n\t\n\tSystem.out.println(\"Time Limit \" + timeLimit);\n\t\n}", "public void setTimeLimit(long value) {\n\t\ttimeLimit = value;\n\t}", "public void setMinTime(Integer minTime) {\n this.minTime = minTime;\n }", "Integer getMinute();", "public static String millsToMinSec(long mills) {\n int min = (int) (mills / 1000 / 60);\n int second = (int) (mills / 1000 % 3600 % 60);\n String time = \"\";\n// if (hour < 10) {\n// time = \"0\" + hour;\n// } else {\n// time = \"\" + hour;\n// }\n if (min < 10) {\n time += \"0\" + min;\n } else {\n time += \"\" + min;\n }\n if (second < 10) {\n time += \":0\" + second;\n } else {\n time += \":\" + second;\n }\n return time;\n }", "public void loadLimit(String who, int loadMin, int waitms, int waittimemax) {\n\t\ti(TAG,\"loadLimit() loadMin(\"+loadMin+\") waitms(\"+waitms+\") waittimemax(\"+waittimemax+\") for \" + who);\n\t\t\n\t\tdouble load = 0;\n\t\tdouble lastload = 0;\n int waitloopmax = waittimemax / waitms;\n int sleepcounter = 0;\n //Thread sleeperThread = new Thread(){\n \t//public void run(){ SystemClock.sleep(1000); }\n //};\n \n int spin = 0;\n for(int lc = 1; lc <= waitloopmax; lc++){\n \tload = getload(TAG + \" loadLimit() 822 for \" + who);\n \t\n \tif( load > (loadMin + 0.99) ){\n \t\tmPreferencesEditor.putLong(\"cpublock\", System.currentTimeMillis());\n \t\tmPreferencesEditor.commit();\n \t\tw(TAG,\"loadLimit() load(\"+load+\") > loadMin(\"+loadMin+\".99) for \" + who);\n \t\t//if( lc == 2 ){ // second loop, notify user app has paused.\n \t\t\t//setServiceNotification(TAG + \" loadLimit() 340\", android.R.drawable.ic_media_pause, Custom.APP + \" (Press to Stop)\", \"Waiting for device CPU load to decrease.\", Custom.APP + \" synchronizing service is paused, waiting for CPU load to decrease.\");\n \t\t//}\n \t\tfor(sleepcounter = 0; sleepcounter < (waitms/1000); sleepcounter++){ SystemClock.sleep(1000); }\n \t}else{\n \t\tmPreferencesEditor.putLong(\"cpublock\", 0);\n \t\tmPreferencesEditor.commit();\n \t\ti(TAG,\"loadLimit() load(\"+load+\") <= loadMin(\"+loadMin+\".99) for \" + who);\n \t\tbreak;\n \t\t//lc = waitloopmax;// setting to end so the following code is run (protects against raising load)\n \t\t//spin++;\n \t\t//if( spin > 5 ){\n \t\t\t//e(TAG,\"Spin Doctor Limit Reached moving on.\");\n \t\t\t//break; \n \t\t\t//}\n \t}\n \tif( lc == waitloopmax ){\n \t\tif( load > lastload ){\n \t\t\tw(TAG,\"loadLimit() load(\"+load+\") > lastload(\"+lastload+\") for \" + who);\n \t\t\t// Load is going up, let's hold off till this isn't true.\n \t\t\t// First available chance though, I'm on it.\n \t\t\tlc--;\n \t\t\tSystemClock.sleep( (long)(waitms/2) );\n \t\t}else{\n \t\t\tw(TAG,\"Waited for maximum limit(\"+waittimemax+\"ms), running anyway. for \" + who);\n \t\t}\n \t}\n \tlastload = load;\n }\n mPreferencesEditor.putLong(\"cpublock\", 0);\n mPreferencesEditor.commit();\n i(TAG,\"loadLimit() DONE\");\n //setServiceNotification(TAG + \" loadLimit() 350\", android.R.drawable.stat_notify_sync, Custom.APP + \" (Press to Stop)\", \"Synchronizing updates.\", Custom.APP + \" synchronizing updates.\");\n\t}", "static int Limit(int val, int max, int min) {\n if (val > max) {\n val = max;\n } else if (val < min) {\n val = min;\n }\n\n return val;\n }", "@Test\n\tpublic void testMinMinMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(min, min, max) );\n\t}", "public int GetMinVal();", "public double maxWait()\r\n {\r\n //find the max value in an arraylist\r\n double maxWait = servedCustomers.get(0).getwaitTime();\r\n for(int i = 1; i < servedCustomers.size(); i++){\r\n if(servedCustomers.get(i).getwaitTime()>maxWait){\r\n maxWait = servedCustomers.get(i).getwaitTime();\r\n }\r\n }\r\n return maxWait;\r\n }", "@Test\n\tpublic void testMidMaxMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(mid, max, min) );\n\t}", "public long getElapsedTimeMin() {\n return running ? (((System.currentTimeMillis() - startTime) / 1000) / 60 ) % 60 : 0;\n }", "private int clamp(int val, int min, int max){\n\t\tif(val > max){\n\t\t\tval = max;\n\t\t}\n\t\telse if(val < min){\n\t\t\tval = min;\n\t\t}\n\t\treturn val;\n\t}", "public double minWait()\r\n {\r\n //find the minimum value in an arraylist\r\n double minWait = this.servedCustomers.get(0).getwaitTime();\r\n for(int i = 1; i < this.servedCustomers.size(); i++){\r\n if(this.servedCustomers.get(i).getwaitTime()<minWait){\r\n minWait = this.servedCustomers.get(i).getwaitTime();\r\n }\r\n }\r\n return minWait;\r\n }", "double getMin();", "double getMin();", "public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}", "public static void sleep(int min, int max) {\n\t\tGeneral.sleep(min, max);\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public int getwaitTime(){\r\n\t\t String temp=rb.getProperty(\"waitTime\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}", "private int get_delay() {\n double exp = slider1.getValue() / 100.0 - 9; // Range -9, 1\n exp = Math.min(0, exp); // Range -9, 0\n return (int) (Math.pow(10.0, exp) * 100000000.0);\n }", "public double clamp(double num, double max, double min){\n \t\tif(num < min){return min;}else if(num > max){return max;}else{return num;}\n \t}", "Range alarmLimits();", "private String formatTime(final long time) {\n if ( time == 0 ) {\n return \"-\";\n }\n if ( time < 1000 ) {\n return time + \" ms\";\n } else if ( time < 1000 * 60 ) {\n return time / 1000 + \" secs\";\n }\n final long min = time / 1000 / 60;\n final long secs = (time - min * 1000 * 60);\n return min + \" min \" + secs / 1000 + \" secs\";\n }", "public String waitTimeConroller(long start) throws NumberFormatException, IOException {\n\t\t\t\tdouble sec = waitTimeCalculatior(start)/1000;\n\t\t\t\tlong testStart = convertStringToLong(fileScanner(\"start.time\"));\n\t\t\t\tint limit = 0;\n\t\t\t\t\n\t\t\t\tif ((sec >= 15) && (sec < 30)) { limit = 15; }\n\t\t\t\tif ((sec >= 30) && (sec < 60)) { limit = 30; }\n\t\t\t\tif (sec >= 60) { limit = 60; }\n\t\t\t\t\n\t\t\t\tif (sec >= 15) {\n\t\t\t\tfileWriterPrinter(\"Waiting time exceeded limit of \" + new DecimalFormat(\"0.000\").format(limit) + \" seconds!\");\n\t\t\t\tfileWriter(\"wait.log\", \" Test: #\" + fileScanner(\"test.num\"));\t\n\t\t\t\tfileWriter(\"wait.log\", \" Started: \" + convertCalendarMillisecondsAsLongToDateTimeHourMinSec(testStart));\n\t\t\t\tfileWriter(\"wait.log\", \" Event: \" + convertCalendarMillisecondsAsLongToDateTimeHourMinSec(start));\n\t\t\t\tfileWriter(\"wait.log\", \" XML Path: \" + fileScanner(\"xml.path\"));\n\t\t\t\tfileWriter(\"wait.log\", \" Waiting time is \" + sec + \" sec, which exceeds limit of \" + new DecimalFormat(\"0.000\").format(limit) + \" seconds!\");\n\t\t\t\tfileWriterPrinter(\"wait.log\", \"\");\n\t\t\t\t}\n\t\t\t\treturn padNum(sec);\n\t\t\t}", "Integer getStartTimeout();", "public String duration(){\n long duration =beginTime.getTime()-endTime.getTime();\n long diffMinutes = duration / (60 * 1000) % 60;\n long diffHours = duration / (60 * 60 * 1000);\n if(diffHours ==0)\n return -1*diffMinutes + \" minutes\";\n else\n return \" \"+-1*diffHours+\":\"+ -1*diffMinutes +\"min\";\n }", "public double getAsSeconds()\n {\n return itsValue / 1000000.0;\n }", "com.google.protobuf.Duration getMinExperience();", "int getSampleMs();", "public int getAvpfRrInterval();", "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 static void main(String[] args) {\n\t\tint total_sec,hr,min,sec;\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter total seconds:\");\r\n\t\ttotal_sec=s.nextInt();\r\n\t\thr=total_sec/3600;\r\n\t\tmin=(total_sec-(hr*3600))/60;\r\n\t\tsec=total_sec-((hr*3600)+(min*60));\r\n\t\tSystem.out.println(\"H:M:S format is:\");\r\n\t\tSystem.out.println(hr+\":\"+min+\":\"+sec);\r\n\r\n\t}", "public void setMaxTime(Integer maxTime) {\n this.maxTime = maxTime;\n }", "public static void checkMinMax() {\r\n\t\tSystem.out.println(\"Beginning min/max test (should be -6 and 17)\");\r\n\t\tSortedIntList list = new SortedIntList();\r\n\t\tlist.add(5);\r\n\t\tlist.add(-6);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" min = \" + list.min());\r\n\t\tSystem.out.println(\" max = \" + list.max());\r\n\t\tSystem.out.println();\r\n\t}", "private static double timeInSec(long endTime, long startTime) {\n\t\tlong duration = (endTime - startTime);\n\t\tif (duration > 0) {\n\t\t\tdouble dm = (duration/1000000.0); //Milliseconds\n\t\t\tdouble d = dm/1000.0; //seconds\n\t\t\treturn d ;\n\t\t}\n\t\treturn 0.0 ;\n\t}", "int getMaxInactiveInterval();", "public static String getDurationString(long minutes, long seconds) {\n if(minutes>=0 && (seconds >=0 && seconds<=59)){\n// minutes = hours/60;\n// seconds = hours/3600;\n long hours = minutes / 60;\n long remainingMinutes = minutes % 60;\n\n return hours + \" h \" + remainingMinutes + \"m \" + seconds + \"s\";\n }\n else\n\n {\n return \"invalid value\";\n }\n }", "public float getTimeSeconds() { return getTime()/1000f; }", "public double calcAverageWaitingTime()\n\t{\n\t\tint min,y;\n\t\tint sum=0;\n\t\tint x=0,j;\n\t\tfor( int i=0;i<num;i++)\n\t\t{\n\t\t\ttest[i]=Priority[i];\n\n\t\t}\n\t\tint max=test[0];\n\t\tfor (int i=0;i<num;i++)\n\t\t{\n\t\t\tif(test[i]>max)\n\t\t\t{\n\t\t\t\tmax=test[i];\n\t\t\t}\n\n\t\t}\n\t\tmax=max+1;\n\t\tfor (int i=0;i<num;i++)\n\t\t{ \n\t\t\tmin = max;\n\t\t\tfor(j=0;j<num;j++)\n\t\t\t{\n\t\t\t\tif(test[j]!=-1&&test[j]<min)\n\t\t\t\t{\n\t\t\t\t\tmin = test[j];\n\t\t\t\t\tx = j;\n\t\t\t\t}\n\t\t\t\telse if(test[j]!=-1&&test[j]==min)\n\t\t\t\t{\n\t\t\t\t\tif(burstTime[j]<burstTime[x])\n\t\t\t\t\t{\n\t\t\t\t\t\tmin = test[j];\n\t\t\t\t\t\tx = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpid1[i]=x;\n\t\t\ttest[x]=-1;\n\t\t}\n\t\treturn printWaitingTime();\n\t}", "long toTimelineValue(long millisecond);", "int getMPPerSecond();", "@java.lang.Override\n public long getMinigameEndMs() {\n return minigameEndMs_;\n }", "public String secToMin(long totalSec) {\n\t\tlong s = totalSec;\n\t\tString minute;\n\t\tif ((s % 60) < 10) {\n\t\t\tminute = s / 60 + \":0\" + s % 60;\n\t\t} else {\n\t\t\tminute = s / 60 + \":\" + s % 60;\n\t\t}\n\t\treturn minute;\n\t}", "private String calculateTimeInterval(long startTime, long endTime){\n\t\tTimeSpanItem ti = TimeSpanItem.creatTimeItem(startTime, endTime);\n\t\tint intervalHour=ti.getHour();\n\t\tint intervalMin=ti.getMinute();\n\t\tString hourString=\"\";\n\t\tif(intervalHour>=1){\n\t\t\tif(intervalHour==1){\n\t\t\t\thourString=intervalHour+mContext.getString(R.string.daily_info_time_hour);\n\t\t\t}\n\t\t\telse{\n\t\t\t\thourString=intervalHour+mContext.getString(R.string.daily_info_time_hours);\n\t\t\t}\n\t\t}\n\t\t\n\t\tString minString=\"\";\n if(intervalMin < 1){\n intervalMin = 1;\n }\n\t\tminString=intervalMin+mContext.getString(R.string.daily_info_time_minute);\n\t\tString timeString=hourString+\" \"+minString;\n\n\t\treturn timeString;\n\t}", "@Test\r\n public void minMax() throws Exception {\r\n assertEquals(1, (int) sInt.first());\r\n assertEquals(5, (int) sInt.last());\r\n assertEquals(\"kek\", sStr.first());\r\n assertEquals(\"lol\", sStr.last());\r\n }" ]
[ "0.71722144", "0.6909575", "0.6502331", "0.61718154", "0.61075824", "0.6094885", "0.6086159", "0.60451853", "0.6030242", "0.5973898", "0.5962164", "0.59511065", "0.5940225", "0.5939569", "0.5923072", "0.588528", "0.5857275", "0.5841352", "0.5840775", "0.583513", "0.58132976", "0.5810176", "0.5800133", "0.5797295", "0.57744205", "0.5763062", "0.5752248", "0.57366264", "0.57346267", "0.57297504", "0.5700309", "0.5691654", "0.56507117", "0.56337076", "0.5627778", "0.5612834", "0.56098473", "0.56083614", "0.5601357", "0.5578822", "0.5564056", "0.5549869", "0.5541252", "0.5537417", "0.5534826", "0.5534604", "0.5527629", "0.5524848", "0.55214834", "0.5506616", "0.55025095", "0.54958934", "0.5494752", "0.5486435", "0.5481362", "0.5479295", "0.54788846", "0.54619205", "0.54593474", "0.54561967", "0.5449564", "0.54358655", "0.5434383", "0.54280967", "0.5424407", "0.54172784", "0.54124486", "0.54115975", "0.54115975", "0.54081553", "0.5403455", "0.5398682", "0.53669846", "0.53577405", "0.53554255", "0.5355201", "0.53532994", "0.5340716", "0.53301656", "0.5329758", "0.53287596", "0.5328098", "0.5325345", "0.53238887", "0.5321907", "0.53216726", "0.53132224", "0.53111726", "0.53106403", "0.53056407", "0.5301923", "0.530058", "0.52983093", "0.5295348", "0.52881265", "0.52843136", "0.5274671", "0.5273092", "0.52635723", "0.5263467" ]
0.5478338
57
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, MENU_CLEAR_ID, 0, "CLEAR"); menu.add(0, MENU_QIET_ID, 0, "QUIET"); return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_CLEAR_ID: editText1.setText(""); editText2.setText(""); textView.setText(""); break; case MENU_QIET_ID: finish(); break; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Prompt p = new LogInPrompt(); while(true) { p = p.run(); } }
{ "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
Gets an immutable list of out edges of the given node.
public abstract List<? extends DiGraphEdge<N, E>> getOutEdges(N nodeValue);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int[] getOutEdges(int... nodes);", "public ExtendedListIterable<Edge> edges(Node node, Direction direction) {\n return inspectableGraph.edges(node, Direction.EITHER);\n }", "@Override\n\tpublic Set<ET> getAdjacentEdges(N node)\n\t{\n\t\t// implicitly returns null if gn is not in the nodeEdgeMap\n\t\tSet<ET> adjacentEdges = nodeEdgeMap.get(node);\n\t\treturn adjacentEdges == null ? null : new HashSet<ET>(adjacentEdges);\n\t}", "public LinkedList<Edgeq> getAllEdges(String node) {\n return this.graph.get(node);\n }", "Map<Node, Edge> getOutEdges() {\n return outEdges;\n }", "public Collection<Edge> getE(int node_id) {\n\tCollection<Edge> list=new ArrayList<Edge>();\n\t\n\tif(getNodes().containsKey(node_id))\n\t{\n\t\tNode n=(Node) getNodes().get(node_id);\n\t\tlist.addAll(n.getEdgesOf().values());\n\t}\n\treturn list;\n}", "Collection<E> edges();", "public ArrayList<Integer> getOutNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> outNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of outgoing edge ids\r\n\t\tSet<Integer> edgeSet = mOutEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\toutNeighbors.add( getEdge(edgeId).getToId() );\r\n\t\t}\r\n\t\treturn outNeighbors;\r\n\t}", "@Override\n public Collection<edge_data> getE(int node_id) {\n return ((NodeData) this.nodes.get(node_id)).getNeighborEdges().values();\n }", "public abstract List<? extends DiGraphEdge<N, E>> getInEdges(N nodeValue);", "public abstract List<? extends GraphEdge<N, E>> getEdges();", "List<CyEdge> getInternalEdgeList();", "public List<IEdge> getAllEdges();", "List<IEdge> getAllEdges();", "int[] getInEdges(int... nodes);", "public Iterable<Edge> edges() {\r\n Bag<Edge> list = new Bag<Edge>();\r\n for (int v = 0; v < V; v++) {\r\n for (Edge e : adj(v)) {\r\n list.add(e);\r\n }\r\n }\r\n return list;\r\n }", "public LinkedList<String> getAllNeighbours(String node) {\n LinkedList<Edgeq> edgesList = getAllEdges(node);\n LinkedList<String> neighboursList = new LinkedList<>();\n for (Edgeq edge : edgesList) {\n neighboursList.add(edge.n2);\n }\n return neighboursList;\n }", "int[] getEdgesIncidentTo(int... nodes);", "public Iterable<DirectedEdge> edges() {\n ArrayList<DirectedEdge> list = new ArrayList<DirectedEdge>();\n for (int v = 0; v < V; v++) {\n for (DirectedEdge e : adj(v)) {\n list.add(e);\n }\n }\n return list;\n }", "private List<Graph.Edge> getEdge(PathMap map) {\n // record the visited coordinates\n List<Coordinate> visited = new ArrayList<>();\n // get all coordinates from the map\n List<Coordinate> allCoordinates = map.getCoordinates();\n // for record all generated edges\n List<Graph.Edge> edges = new ArrayList<>();\n\n\n while (visited.size() <= allCoordinates.size() - 1) {\n for (Coordinate temp : allCoordinates) {\n\n if (visited.contains(temp)) {\n continue;\n }\n visited.add(temp);\n List<Coordinate> neighbors = map.neighbours(temp);\n for (Coordinate tempNeighbour : neighbors) {\n edges.add(new Graph.Edge(temp, tempNeighbour, tempNeighbour.getTerrainCost()));\n }\n }\n }\n // trim impassable coordinates\n List<Graph.Edge> fEdges = new ArrayList<>();\n for (Graph.Edge dd : edges) {\n if (dd.startNode.getImpassable() || dd.endNode.getImpassable()) {\n continue;\n }\n fEdges.add(dd);\n }\n return fEdges;\n }", "public Set<E> getEdges();", "public static ArrayList<Edge> getAllEdges(){\n\t\treturn edgeList;\n\t}", "List<Integer> getNeighboursOf(int node) {\n\t\treturn adjList.get(node);\n\t}", "Map<Node, Edge> getInEdges() {\n return inEdges;\n }", "Collection<? extends IREdge<? extends IRBasicBlock>> getOutgoingEdges(\n IRBasicBlock block);", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "private List<Vertex> getNeighbors(Vertex node) {\n return edges.stream()\n .filter( edge ->edge.getSource().equals(node) && !settledNodes.contains(edge.getDestination()))\n .map(edge -> edge.getDestination())\n .collect(Collectors.toList());\n }", "private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}", "public DSALinkedList<DSAGraphEdge<E>> getAdjacentEdges()\n {\n return edgeList;\n }", "public Edge[] getEdges()\r\n {\r\n if(edges == null)\r\n\t{\r\n\t edges = new Edge[numEdges()];\r\n\t int i = 0;\r\n\t for (final EdgeTypeHolder eth : ethMap.values())\r\n\t\tfor (final Edge e : eth.getEdges())\r\n\t\t edges[i++] = e;\r\n\t}\r\n return edges.clone();\r\n }", "public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}", "public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }", "public Iterable<Edge> edges() {\r\n\t\treturn mst;\r\n\t}", "private List<Integer> getAdjacent(int node) {\n List<Integer> adjacent = new ArrayList<>();\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n adjacent.add(i);\n }\n }\n return adjacent;\n }", "public List<Piece> getEdges() {\n List<Piece> result = new ArrayList<>();\n result.add(_board[0][1]);\n result.add(_board[1][0]);\n result.add(_board[1][2]);\n result.add(_board[2][1]);\n return result;\n }", "public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }", "public List<Edge> findAllEdge() throws SQLException {\n\t\treturn rDb.findAllEdges();\n\t}", "public Enumeration undirectedEdges();", "List<Edge<V>> getEdgeList();", "public Edge[] getEdges() {\n\t\treturn edges;\n\t}", "public ArrayList<Edge> getListEdges(){\r\n return listEdges;\r\n }", "Set<CyEdge> getExternalEdgeList();", "String getEdges();", "@Override\n public Collection<? extends IEdge> getEdges() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.edgeMap\n .values()));\n }", "public int[] getUnderlyingNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0 || roads[i][node] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "public Enumeration edges();", "@Override\r\n public Collection<edge_data> getE(int node_id) {\r\n return this.neighbors.get(node_id).values(); //o(k)\r\n }", "@Override\n\tpublic Collection<edge_data> getE(int node_id) {\n\t\t// TODO Auto-generated method stub\n\t\treturn Edges.get(node_id).values();\n\t}", "public abstract ArrayList<Pair<Vector2, Vector2>> getEdges();", "public DEdge[] getEdges(){\n return listOfEdges;\n }", "public List<? super Object> getEdgeValues(Node<A> n) {\n\t\t\n\t\tif (g == null) return null;\n\t\t\n\t\tList<? super Object> s = new LinkedList<>();\n\t\t\n\t\tif(isConnectedTo(n)) {\n\t\t\t\n\t\t\tfor(Object o: g.getEdges()) {\n\t\t\t\tif(((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\ts.add( ((Edge<?>)o).getData() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n return s;\n\t\n\t}", "@Override\n\tpublic List<Edge> getAllEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.relations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Edge> getAllMapEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.maprelations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n\tpublic List<ET> getEdgeList()\n\t{\n\t\treturn new ArrayList<ET>(edgeList);\n\t}", "public ArrayList<DrawableGraphEdge> getEdges() {\r\n\t\treturn new ArrayList<DrawableGraphEdge>(edges);\r\n\t}", "public List<EdgeType> getEdges()\n {\n return edges;\n }", "public Enumeration directedEdges();", "public ArrayList<Edge> getEdgeList() {\n return edgeList;\n }", "public Collection<Edge> edges() {\n Collection<Collection<Edge>> copyOfEdges = new ArrayList<Collection<Edge>>();\n //values = myGraph.values(); OLD\n //create a copy of all the edges in the map to restrict any reference\n //to interals of this class\n copyOfEdges.addAll(myGraph.values());\n Collection<Edge> allValues = new ArrayList<Edge>();\n Iterator<Collection<Edge>> eachColl = copyOfEdges.iterator();\n while(eachColl.hasNext()){\n allValues.addAll(eachColl.next());\n }\n\n return allValues;\n }", "public int[] getNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "@Override\n public List<Edge<Stop>> getEdgesFromNode(long time, Stop node, Set<Stop> found) {\n List<Edge<Stop>> walkingEdges = getWalkingEdgesFromStop(time, node, found);\n List<Edge<Stop>> publicTransportEdges = getPublicTransportEdgesFromStop(time, node, found);\n\n List<Edge<Stop>> edges = new TiraArrayList<>(walkingEdges.size() + publicTransportEdges.size());\n edges.addAll(walkingEdges);\n edges.addAll(publicTransportEdges);\n\n return edges;\n }", "public Set<Eventable> getAllEdges() {\n\t\treturn sfg.edgeSet();\n\t}", "public Edge[] getEdges(EdgeType et)\r\n {\r\n\treturn getEdges(et.getName());\r\n }", "private List<Node> getNeighbors(Node node) {\n List<Node> neighbors = new LinkedList<>();\n\n for(Node adjacent : node.getAdjacentNodesSet()) {\n if(!isSettled(adjacent)) {\n neighbors.add(adjacent);\n }\n }\n\n return neighbors;\n }", "default Iterator<E> edgeIterator() {\n return getEdges().iterator();\n }", "public Map<T, Path> edgesFrom(T node) {\n\t\tif (node == null) {\n\t\t\tthrow new NullPointerException(\"The node should not be null.\");\n\t\t}\n\t\tMap<T, Path> edges = graph.get(node);\n\t\tif (edges == null) {\n\t\t\tthrow new NoSuchElementException(\"Source node does not exist.\");\n\t\t}\n\t\treturn Collections.unmodifiableMap(edges);\n\t}", "public Set<E> getEdges(V tail);", "public Set<Node<E>> getNeighbors(Node<E> node){\n Set<Node<E>> result = new HashSet<>();\n result = nodes.get(node);\n return result;\n }", "public static int[][] getEdgeMatrix() {\n\t\treturn edge;\n\t}", "@Override\n\tpublic Collection<IEdge<S>> getEdges()\n\t{\n\t\tfinal List<IEdge<S>> set = new ArrayList<>(map.size());\n\t\tfor (final Entry<S, Integer> entry : map.entrySet())\n\t\t{\n\t\t\tset.add(createEdge(entry.getKey(), entry.getValue()));\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(set);\n\t}", "Set<Edge> getDownwardOutgoingNeighborEdges() {\n\t\t\tif(_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling downward pass neighbor method on upward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\tSystem.out.println(this.toString()+\"'s outgoing edges:\\n\"+ outgoingEdges);\n\t\t\t\treturn outgoingEdges;\n\t\t}", "Collection<? extends IREdge<? extends IRBasicBlock>> getIncomingEdges(\n IRBasicBlock block);", "@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}", "public HashSet<Edge> getEdges() {\n\t\treturn edges;\n\t}", "ArrayList<Edge> getEdges(ArrayList<ArrayList<Vertex>> v) {\n ArrayList<Edge> all = new ArrayList<Edge>();\n for (ArrayList<Vertex> verts : v) {\n for (Vertex vt : verts) {\n for (Edge ed : vt.outEdges) {\n all.add(ed);\n }\n }\n }\n return all;\n }", "@NotNull\n List<ExpLineageEdge> getEdges(ExpLineageEdge.FilterOptions options);", "@Override\n\tpublic List<Path> getOutEdges(Location src) {\n\t\treturn \tpaths.get(locations.indexOf(src));\n\t}", "Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}", "public ExtendedListIterable<Edge> edges(Node n1, Node n2, Direction direction) {\n return inspectableGraph.edges(n1, n2, Direction.EITHER);\n }", "@Override\r\n\tpublic Iterable<EntityGraphEdge> getEdges()\r\n\t{\n\t\treturn null;\r\n\t}", "public Collection<LazyRelationship2> getEdges() {\n long relCount=0;\n ArrayList l = new ArrayList();\n \n for(Path e : getActiveTraverser()){\n for(Path p : getFlushTraverser(e.endNode())){\n if((relCount++%NEO_CACHE_LIMIT)==0){\n l.add(p.lastRelationship());\n clearNeoCache();\n }\n }\n }\n return l; \n }", "public ArrayList<Integer> getInNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> inNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of incoming edge ids\r\n\t\tSet<Integer> edgeSet = mInEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\tinNeighbors.add( getEdge(edgeId).getFromId() );\r\n\t\t}\r\n\t\treturn inNeighbors;\r\n\t}", "public edge_data getEdge(int nodeKey) {\n return this.neighborEdges.get(nodeKey);\n }", "public Iterator<Edge> getEdgeIter() {\n\t\treturn edges.iterator();\n\t}", "public Set<Edge<V>> getEdges(V vertex);", "public Set<JmiAssocEdge> getAllOutgoingAssocEdges(JmiClassVertex vertex)\n {\n return getClassAttributes(vertex).allOutgoingAssocEdges;\n }", "public Collection getNonEscapingEdgeTargets() {\n if (addedEdges == null) return Collections.EMPTY_SET;\n return new FlattenedCollection(addedEdges.values());\n }", "public int[] getEdgeIndicesArray() {\n \t\tginy_edges.trimToSize();\n \t\treturn giny_edges.elements();\n \t}", "ArrayList<Edge> getAdjacencies();", "public ArrayList<GraphEdge> getEdges() {\n return selectedEdges;\n }", "public Set getNonEscapingEdges() {\n if (addedEdges == null) return Collections.EMPTY_SET;\n return addedEdges.entrySet();\n }", "public List<Line> getEdgeLines()\r\n {\r\n final List<Line> lineList = new ArrayList<Line>();\r\n lineList.add(new Line(getUpperLeft(), getLowerLeft()));\r\n lineList.add(new Line(getLowerLeft(), getLowerRight()));\r\n lineList.add(new Line(getLowerRight(), getUpperRight()));\r\n lineList.add(new Line(getUpperRight(), getUpperLeft()));\r\n return lineList;\r\n }", "public Iterator<LayoutEdge> edgeIterator() {\n\treturn edgeList.iterator();\n }", "public abstract List<? extends GraphEdge<N, E>> getEdges(N n1, N n2);", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> getEdgeList() {\n if (edgeBuilder_ == null) {\n return java.util.Collections.unmodifiableList(edge_);\n } else {\n return edgeBuilder_.getMessageList();\n }\n }", "public Enumeration outIncidentEdges(Position vp) throws InvalidPositionException;", "private List<PlainEdge> getNotEdge(PlainGraph graph, PlainEdge edge) {\n return graph.edgeSet().stream().filter(e ->\n e.source().equals(edge.source())\n && e.target().equals(edge.target())\n && e.label().text().equals(String.format(\"%s:\", NOT)))\n .collect(Collectors.toList());\n }", "public E getEdge(N startNode, N endNode)\r\n/* 90: */ {\r\n/* 91:166 */ assert (checkRep());\r\n/* 92:167 */ if ((contains(startNode)) && (((Map)this.map.get(startNode)).containsKey(endNode))) {\r\n/* 93:168 */ return ((Map)this.map.get(startNode)).get(endNode);\r\n/* 94: */ }\r\n/* 95:170 */ return null;\r\n/* 96: */ }", "private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}", "public HashMap<String, Edge> getEdgeList () {return edgeList;}" ]
[ "0.72519296", "0.6997939", "0.6993243", "0.6942154", "0.6834504", "0.676144", "0.67443573", "0.6599746", "0.6583681", "0.6560321", "0.6557796", "0.6532383", "0.6459377", "0.6440547", "0.6431046", "0.6398349", "0.6364605", "0.6361578", "0.6347961", "0.63251716", "0.63184094", "0.6303267", "0.6299329", "0.62588865", "0.62558687", "0.6249565", "0.6248392", "0.6202278", "0.6196693", "0.6187508", "0.6164571", "0.6158586", "0.6148795", "0.61320144", "0.6129338", "0.61238647", "0.6119563", "0.6099359", "0.6096335", "0.6079091", "0.606065", "0.60549575", "0.60271305", "0.60171646", "0.6016081", "0.59922904", "0.5991772", "0.59907037", "0.5985142", "0.59769136", "0.5971983", "0.59690976", "0.5956989", "0.59533817", "0.5930863", "0.5925209", "0.58788395", "0.5878266", "0.5844506", "0.5841805", "0.5811525", "0.5809798", "0.58064103", "0.5791605", "0.57854813", "0.5775046", "0.57661605", "0.5755956", "0.5752287", "0.5746391", "0.57448244", "0.57414013", "0.57399386", "0.5715531", "0.5692011", "0.5692003", "0.56901455", "0.56607115", "0.565195", "0.5640694", "0.5631033", "0.5629989", "0.5622134", "0.5610308", "0.55717003", "0.5558382", "0.55577564", "0.5544741", "0.5543361", "0.55429447", "0.5539507", "0.553086", "0.5516991", "0.55115175", "0.55111367", "0.55036086", "0.5494906", "0.5480208", "0.5474673", "0.5470051" ]
0.7406083
0
Gets an immutable list of in edges of the given node.
public abstract List<? extends DiGraphEdge<N, E>> getInEdges(N nodeValue);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LinkedList<Edgeq> getAllEdges(String node) {\n return this.graph.get(node);\n }", "int[] getInEdges(int... nodes);", "public Collection<Edge> getE(int node_id) {\n\tCollection<Edge> list=new ArrayList<Edge>();\n\t\n\tif(getNodes().containsKey(node_id))\n\t{\n\t\tNode n=(Node) getNodes().get(node_id);\n\t\tlist.addAll(n.getEdgesOf().values());\n\t}\n\treturn list;\n}", "Collection<E> edges();", "@Override\n\tpublic Set<ET> getAdjacentEdges(N node)\n\t{\n\t\t// implicitly returns null if gn is not in the nodeEdgeMap\n\t\tSet<ET> adjacentEdges = nodeEdgeMap.get(node);\n\t\treturn adjacentEdges == null ? null : new HashSet<ET>(adjacentEdges);\n\t}", "public ExtendedListIterable<Edge> edges(Node node, Direction direction) {\n return inspectableGraph.edges(node, Direction.EITHER);\n }", "Map<Node, Edge> getInEdges() {\n return inEdges;\n }", "public abstract List<? extends GraphEdge<N, E>> getEdges();", "int[] getEdgesIncidentTo(int... nodes);", "List<IEdge> getAllEdges();", "@Override\n public Collection<edge_data> getE(int node_id) {\n return ((NodeData) this.nodes.get(node_id)).getNeighborEdges().values();\n }", "List<Integer> getNeighboursOf(int node) {\n\t\treturn adjList.get(node);\n\t}", "public List<IEdge> getAllEdges();", "public Set<E> getEdges();", "private List<Integer> getAdjacent(int node) {\n List<Integer> adjacent = new ArrayList<>();\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n adjacent.add(i);\n }\n }\n return adjacent;\n }", "public ArrayList<Integer> getInNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> inNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of incoming edge ids\r\n\t\tSet<Integer> edgeSet = mInEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\tinNeighbors.add( getEdge(edgeId).getFromId() );\r\n\t\t}\r\n\t\treturn inNeighbors;\r\n\t}", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "public Iterable<Edge> edges() {\r\n Bag<Edge> list = new Bag<Edge>();\r\n for (int v = 0; v < V; v++) {\r\n for (Edge e : adj(v)) {\r\n list.add(e);\r\n }\r\n }\r\n return list;\r\n }", "List<Edge<V>> getEdgeList();", "List<CyEdge> getInternalEdgeList();", "public Iterable<DirectedEdge> edges() {\n ArrayList<DirectedEdge> list = new ArrayList<DirectedEdge>();\n for (int v = 0; v < V; v++) {\n for (DirectedEdge e : adj(v)) {\n list.add(e);\n }\n }\n return list;\n }", "public DSALinkedList<DSAGraphEdge<E>> getAdjacentEdges()\n {\n return edgeList;\n }", "public LinkedList<String> getAllNeighbours(String node) {\n LinkedList<Edgeq> edgesList = getAllEdges(node);\n LinkedList<String> neighboursList = new LinkedList<>();\n for (Edgeq edge : edgesList) {\n neighboursList.add(edge.n2);\n }\n return neighboursList;\n }", "Set<CyEdge> getExternalEdgeList();", "int[] getOutEdges(int... nodes);", "public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }", "public ArrayList<Edge> getListEdges(){\r\n return listEdges;\r\n }", "public static ArrayList<Edge> getAllEdges(){\n\t\treturn edgeList;\n\t}", "public Map<T, Path> edgesFrom(T node) {\n\t\tif (node == null) {\n\t\t\tthrow new NullPointerException(\"The node should not be null.\");\n\t\t}\n\t\tMap<T, Path> edges = graph.get(node);\n\t\tif (edges == null) {\n\t\t\tthrow new NoSuchElementException(\"Source node does not exist.\");\n\t\t}\n\t\treturn Collections.unmodifiableMap(edges);\n\t}", "@Override\n\tpublic Collection<edge_data> getE(int node_id) {\n\t\t// TODO Auto-generated method stub\n\t\treturn Edges.get(node_id).values();\n\t}", "@Override\r\n public Collection<edge_data> getE(int node_id) {\r\n return this.neighbors.get(node_id).values(); //o(k)\r\n }", "public Enumeration edges();", "private List<Vertex> getNeighbors(Vertex node) {\n return edges.stream()\n .filter( edge ->edge.getSource().equals(node) && !settledNodes.contains(edge.getDestination()))\n .map(edge -> edge.getDestination())\n .collect(Collectors.toList());\n }", "public Set<Edge<V>> getEdges(V vertex);", "public Iterable<Edge> edges() {\r\n\t\treturn mst;\r\n\t}", "public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}", "public Set<Node<E>> getNeighbors(Node<E> node){\n Set<Node<E>> result = new HashSet<>();\n result = nodes.get(node);\n return result;\n }", "default Iterator<E> edgeIterator() {\n return getEdges().iterator();\n }", "public ArrayList<Edge> getEdgeList() {\n return edgeList;\n }", "public List<Edge> findAllEdge() throws SQLException {\n\t\treturn rDb.findAllEdges();\n\t}", "public abstract List<? extends DiGraphEdge<N, E>> getOutEdges(N nodeValue);", "Collection<? extends IREdge<? extends IRBasicBlock>> getIncomingEdges(\n IRBasicBlock block);", "@Override\n\tpublic List<ET> getEdgeList()\n\t{\n\t\treturn new ArrayList<ET>(edgeList);\n\t}", "String getEdges();", "public Enumeration directedEdges();", "public Set<Edge<V>> edgeSet();", "public List<? super Object> getEdgeValues(Node<A> n) {\n\t\t\n\t\tif (g == null) return null;\n\t\t\n\t\tList<? super Object> s = new LinkedList<>();\n\t\t\n\t\tif(isConnectedTo(n)) {\n\t\t\t\n\t\t\tfor(Object o: g.getEdges()) {\n\t\t\t\tif(((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\ts.add( ((Edge<?>)o).getData() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n return s;\n\t\n\t}", "public Iterator<Edge> getEdgeIter() {\n\t\treturn edges.iterator();\n\t}", "public Edge[] getEdges() {\n\t\treturn edges;\n\t}", "public List<EdgeType> getEdges()\n {\n return edges;\n }", "public DEdge[] getEdges(){\n return listOfEdges;\n }", "public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }", "@Override\n public Collection<? extends IEdge> getEdges() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.edgeMap\n .values()));\n }", "private List<Graph.Edge> getEdge(PathMap map) {\n // record the visited coordinates\n List<Coordinate> visited = new ArrayList<>();\n // get all coordinates from the map\n List<Coordinate> allCoordinates = map.getCoordinates();\n // for record all generated edges\n List<Graph.Edge> edges = new ArrayList<>();\n\n\n while (visited.size() <= allCoordinates.size() - 1) {\n for (Coordinate temp : allCoordinates) {\n\n if (visited.contains(temp)) {\n continue;\n }\n visited.add(temp);\n List<Coordinate> neighbors = map.neighbours(temp);\n for (Coordinate tempNeighbour : neighbors) {\n edges.add(new Graph.Edge(temp, tempNeighbour, tempNeighbour.getTerrainCost()));\n }\n }\n }\n // trim impassable coordinates\n List<Graph.Edge> fEdges = new ArrayList<>();\n for (Graph.Edge dd : edges) {\n if (dd.startNode.getImpassable() || dd.endNode.getImpassable()) {\n continue;\n }\n fEdges.add(dd);\n }\n return fEdges;\n }", "public ArrayList<DrawableGraphEdge> getEdges() {\r\n\t\treturn new ArrayList<DrawableGraphEdge>(edges);\r\n\t}", "public abstract ArrayList<Pair<Vector2, Vector2>> getEdges();", "public int[] getUnderlyingNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0 || roads[i][node] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "private List<Node> getNeighbors(Node node) {\n List<Node> neighbors = new LinkedList<>();\n\n for(Node adjacent : node.getAdjacentNodesSet()) {\n if(!isSettled(adjacent)) {\n neighbors.add(adjacent);\n }\n }\n\n return neighbors;\n }", "public ArrayList<V> getEdges(V vertex){\n return (ArrayList<V>) graph.get(vertex);\n }", "ArrayList<Edge> getAdjacencies();", "public ArrayList<Integer> getOutNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> outNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of outgoing edge ids\r\n\t\tSet<Integer> edgeSet = mOutEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\toutNeighbors.add( getEdge(edgeId).getToId() );\r\n\t\t}\r\n\t\treturn outNeighbors;\r\n\t}", "public HashSet<Edge> getEdges() {\n\t\treturn edges;\n\t}", "public Edge[] getEdges()\r\n {\r\n if(edges == null)\r\n\t{\r\n\t edges = new Edge[numEdges()];\r\n\t int i = 0;\r\n\t for (final EdgeTypeHolder eth : ethMap.values())\r\n\t\tfor (final Edge e : eth.getEdges())\r\n\t\t edges[i++] = e;\r\n\t}\r\n return edges.clone();\r\n }", "@Override\n\tpublic Collection<IEdge<S>> getEdges()\n\t{\n\t\tfinal List<IEdge<S>> set = new ArrayList<>(map.size());\n\t\tfor (final Entry<S, Integer> entry : map.entrySet())\n\t\t{\n\t\t\tset.add(createEdge(entry.getKey(), entry.getValue()));\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(set);\n\t}", "java.util.List<? extends uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdgeOrBuilder> \n getEdgeOrBuilderList();", "List<Edge<V>> getIncidentEdgeList(V v);", "public Set<Eventable> getAllEdges() {\n\t\treturn sfg.edgeSet();\n\t}", "public Collection<Edge> edges() {\n Collection<Collection<Edge>> copyOfEdges = new ArrayList<Collection<Edge>>();\n //values = myGraph.values(); OLD\n //create a copy of all the edges in the map to restrict any reference\n //to interals of this class\n copyOfEdges.addAll(myGraph.values());\n Collection<Edge> allValues = new ArrayList<Edge>();\n Iterator<Collection<Edge>> eachColl = copyOfEdges.iterator();\n while(eachColl.hasNext()){\n allValues.addAll(eachColl.next());\n }\n\n return allValues;\n }", "@Override\n\tpublic List<Edge> getAllEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.relations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}", "private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}", "public synchronized Set<String> getIncomingEdges(String currentEdge) {\n\t\tif (currentEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tSumoEdge currentSumoEdge = getEdge(currentEdge);\n\t\tif (currentSumoEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tString currentEdgeEnd = graph.getEdgeTarget(currentSumoEdge);\n\t\tSet<SumoEdge> edges = graph.incomingEdgesOf(currentEdgeEnd);\n\t\t\n\t\tSet<String> edgeIds = new HashSet<String>();\n\t\tfor (SumoEdge edge: edges) {\n\t\t\tedgeIds.add(edge.getId());\n\t\t}\n\t\t\n\t\treturn edgeIds;\n\t}", "public int[] getNeighbours(int node) {\n ArrayList ns = new ArrayList(10);// should be plenty\n for (int i = 0; i < nodeCount; i++)\n if (roads[node][i] > 0)\n ns.add(Integer.valueOf(i));\n int[] nbs = new int[ns.size()];\n for (int i = 0; i < ns.size(); i++)\n nbs[i] = ((Integer) ns.get(i)).intValue();\n return nbs;\n }", "public Enumeration undirectedEdges();", "public ArrayList<GraphEdge> getEdges() {\n return selectedEdges;\n }", "public ExtendedListIterable<Edge> edges(Node n1, Node n2, Direction direction) {\n return inspectableGraph.edges(n1, n2, Direction.EITHER);\n }", "Map<Node, Edge> getOutEdges() {\n return outEdges;\n }", "public abstract Set<? extends EE> edgesOf(VV vertex);", "public Set<E> getEdges(V tail);", "List<GraphEdge> getNeighbors(NodeKey key);", "public HashMap<String, Edge> getEdgeList () {return edgeList;}", "public Iterator<LayoutEdge> edgeIterator() {\n\treturn edgeList.iterator();\n }", "public abstract List<? extends GraphEdge<N, E>> getEdges(N n1, N n2);", "@Override\n public List<Edge<Stop>> getEdgesFromNode(long time, Stop node, Set<Stop> found) {\n List<Edge<Stop>> walkingEdges = getWalkingEdgesFromStop(time, node, found);\n List<Edge<Stop>> publicTransportEdges = getPublicTransportEdgesFromStop(time, node, found);\n\n List<Edge<Stop>> edges = new TiraArrayList<>(walkingEdges.size() + publicTransportEdges.size());\n edges.addAll(walkingEdges);\n edges.addAll(publicTransportEdges);\n\n return edges;\n }", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> getEdgeList() {\n if (edgeBuilder_ == null) {\n return java.util.Collections.unmodifiableList(edge_);\n } else {\n return edgeBuilder_.getMessageList();\n }\n }", "private ArrayList<Integer> getCityEdges(HashMap<Integer,Integer> table){\n ArrayList<Integer> edges = new ArrayList<Integer>();\n edges.addAll(table.keySet());\n return edges;\n }", "public Map<String, Edge> edges() {\n return this.edges;\n }", "public Set<Pair<V,V>> neighbourEdgesOf(V vertex);", "public static int[][] getEdgeMatrix() {\n\t\treturn edge;\n\t}", "public Set<E> getEdges(V tail, V head);", "private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> getEdgeList() {\n return edge_;\n }", "public Set<Node3D> getNeighbors(Node3D node){\n List<Triangle3D> triangles = node_to_triangle.get(node);\n Set<Node3D> neighbors = new HashSet<>();\n neighbors.add(node);\n for(Triangle3D t: triangles){\n neighbors.add(t.A);\n neighbors.add(t.B);\n neighbors.add(t.C);\n }\n neighbors.remove(node);\n return neighbors;\n }", "public List<Node> getAdjacent(Node node){\n\n int nodeX, x = node.getX();\n int nodeY, y = node.getY();\n List<Node> adj = new ArrayList<Node>();\n\n for(Node n:allNodes){\n if(n.isReachable()) {\n nodeX = n.getX();\n nodeY = n.getY();\n if ((Math.abs(nodeX - x) == 1 && nodeY == y) || (nodeX == x && Math.abs(nodeY - y) == 1)) {\n adj.add(n);\n //if(node.getCost()==n.getCost()||n.getCost()==1) n.setCost(node.getCost()+1);\n }\n }\n }\n\n return adj;\n }", "public int[] getEdgeIndicesArray() {\n \t\tginy_edges.trimToSize();\n \t\treturn giny_edges.elements();\n \t}", "public Edge[] getEdges(EdgeType et)\r\n {\r\n\treturn getEdges(et.getName());\r\n }", "public List<Piece> getEdges() {\n List<Piece> result = new ArrayList<>();\n result.add(_board[0][1]);\n result.add(_board[1][0]);\n result.add(_board[1][2]);\n result.add(_board[2][1]);\n return result;\n }", "public Iterator<Edge> edgeIterator(int source){\n return edges[source].iterator();\n }", "@Override\n\tpublic List<Edge> getAllMapEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.maprelations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}", "public Set<E> getIn() {\n return in;\n }", "public ArrayList<Edge> getAdjacencies(){\r\n return adjacencies;\r\n }" ]
[ "0.7065019", "0.7019859", "0.70057", "0.6996845", "0.6980905", "0.6962302", "0.67063767", "0.65826106", "0.6576253", "0.6550945", "0.6529412", "0.65071654", "0.6505329", "0.64785725", "0.64647716", "0.6435732", "0.6411741", "0.63138175", "0.63047546", "0.62793195", "0.6261211", "0.6260572", "0.62502295", "0.62391216", "0.622697", "0.6212202", "0.61984026", "0.6148727", "0.61372477", "0.6102648", "0.60668737", "0.60617626", "0.60585403", "0.60267043", "0.6024267", "0.60096216", "0.60051095", "0.59838367", "0.59794754", "0.5970088", "0.596884", "0.5964461", "0.59550315", "0.5949786", "0.59383994", "0.592535", "0.59148115", "0.58938867", "0.58897805", "0.588815", "0.5881936", "0.58630735", "0.58209825", "0.58194", "0.5782978", "0.57819706", "0.5751684", "0.5735673", "0.573148", "0.57303584", "0.5729994", "0.57123685", "0.57093996", "0.5694417", "0.5691375", "0.56867075", "0.56863743", "0.5655432", "0.565431", "0.56459594", "0.56416017", "0.56183803", "0.5613414", "0.5586549", "0.55796057", "0.5574958", "0.55735666", "0.557237", "0.55658484", "0.55643487", "0.5555438", "0.5551847", "0.55300653", "0.5525478", "0.551321", "0.54982936", "0.5491735", "0.5487793", "0.5482396", "0.5464033", "0.54571146", "0.5455742", "0.54501384", "0.544807", "0.5446505", "0.54417765", "0.5431535", "0.5428649", "0.5416695", "0.54106945" ]
0.7166141
0
Disconnects all edges from n1 to n2.
public abstract void disconnectInDirection(N n1, N n2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void disconnect(N n1, N n2);", "public void removeEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode n1 = (Node) getNodes().get(node1);\n\t\tNode n2 = (Node) getNodes().get(node2);\n\n\t\tif(n1.getEdgesOf().containsKey(node2))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn1.getEdgesOf().remove(node2);\n\n\t\t}\n\t\tif(n2.getEdgesOf().containsKey(node1))\n\t\t{\n\t\t\tedge_size--;\n\t\t\tmc++;\n\t\t\tn2.getEdgesOf().remove(node1);\n\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t\t//System.out.println(\"Edge doesnt exist\");\n\t\t}\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dest doesnt exist\");\n\t}\n}", "public void removeEdge(int start, int end);", "void removeDirectedEdge(final Node first, final Node second)\n {\n if (first.connectedNodes.contains(second))\n first.connectedNodes.remove(second);\n\n }", "void removeEdge(Vertex v1, Vertex v2) throws GraphException;", "public void removeEdge(N startNode, N endNode)\r\n/* 80: */ {\r\n/* 81:151 */ assert (checkRep());\r\n/* 82:152 */ if ((contains(startNode)) && (((Map)this.map.get(startNode)).containsKey(endNode)))\r\n/* 83: */ {\r\n/* 84:153 */ ((Map)this.map.get(startNode)).remove(endNode);\r\n/* 85:154 */ ((Map)this.map.get(endNode)).remove(startNode);\r\n/* 86: */ }\r\n/* 87: */ }", "public abstract void removeEdge(int from, int to);", "public abstract List<? extends GraphEdge<N, E>> getEdges(N n1, N n2);", "void removeEdge(int x, int y);", "public void removeAllEdges() {\n }", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "public abstract void connect(N n1, E edge, N n2);", "public void setEdge(int n1, int n2){\n\t\tif(outOfBounds(n1) || outOfBounds(n2))// if node indexes are bad return\n\t\t\treturn ;\n\t\t\n if((dGraph.getElement(n1, n2)) == 1){\n\t\t\treturn;\n\t}\n\t\tdGraph.setElement(n1, n2, 1); //shows that there is an edge going from n1 to n2\n\t\tdGraphin.setElement(n2, n1, 1);// show the edges going into n2\n\t\toutdegree[n1]++;\n\t\tindegree[n2]++;\n\t\t\n\t}", "private static void stripTrivialCycles(CFG cfg) {\n\t\tCollection<SDGEdge> toRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge e : cfg.edgeSet()) {\n\t\t\tif (e.getSource().equals(e.getTarget())) {\n\t\t\t\ttoRemove.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcfg.removeAllEdges(toRemove);\n\t}", "void removeEdges(List<CyEdge> edges);", "@Override\r\n public void disconnect(V start, V destination) {\r\n try {\r\n Iterator<Vertex> vertexIterator = map.values().iterator();\r\n Vertex a = null, b = null;\r\n while(vertexIterator.hasNext()) {\r\n Vertex v = vertexIterator.next();\r\n if(start.compareTo(v.vertexName) == 0)\r\n a = v;\r\n if(destination.compareTo(v.vertexName) == 0)\r\n b = v;\r\n }\r\n if(a == null || b == null)\r\n vertexIterator.next();\r\n a.removeDestinations(destination);\r\n\r\n } catch(NoSuchElementException e) {\r\n throw e;\r\n }\r\n }", "public void removeEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\tthis.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }", "public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }", "public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }", "public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }", "private void removeNoMoreExistingOriginalEdges() {\n for (MirrorEdge mirrorEdge : directEdgeMap.values()) {\n if (!originalGraph.has(mirrorEdge.original)) {\n for (Edge segment : mirrorEdge.segments) {\n mirrorGraph.forcedRemove(segment);\n reverseEdgeMap.remove(segment);\n }\n for (Node bend : mirrorEdge.bends) {\n mirrorGraph.forcedRemove(bend);\n reverseEdgeMap.remove(bend);\n }\n directEdgeMap.remove(mirrorEdge.original);\n }\n }\n }", "public void removeEdge() {\n Graph GO = new Graph(nbOfVertex + 1);\n Value.clear();\n for (int i = 0; i < x.length; i++) {\n for (int j : x[i].getDomain()) {\n Value.add(j);\n if (MaxMatch[i] == Map.get(j)) {\n GO.addEdge(Map.get(j), i);\n } else {\n GO.addEdge(i, Map.get(j));\n }\n }\n }\n\n for (int i : V2) {\n for (int j : Value) {\n if (!V2.contains(j)) {\n GO.addEdge(i, j);\n }\n }\n }\n //System.out.println(\"GO : \");\n //System.out.println(GO);\n int[] map2Node = GO.findStrongConnectedComponent();\n //GO.printSCC();\n\n ArrayList<Integer>[] toRemove = new ArrayList[n];\n for (int i = 0; i < n; i++) {\n toRemove[i] = new ArrayList<Integer>();\n }\n for (int i = 0; i < n; i++) {\n for (int j : x[i].getDomain()) {\n ////System.out.println(i + \" \" + j);\n if (map2Node[i] != map2Node[Map.get(j)] && MaxMatch[i] != Map.get(j)) {\n toRemove[i].add(j);\n if (debug == 1) System.out.println(\"Remove arc : \" + i + \" => \" + j);\n }\n }\n }\n for (int i = 0; i < n; i++) {\n for (int j : toRemove[i]) {\n x[i].removeValue(j);\n }\n }\n }", "public void removeEdge(int indexOne, int indexTwo)\n\t{\n\t\tadjacencyMatrix[indexOne][indexTwo] = false;\n\t\tadjacencyMatrix[indexTwo][indexOne] = false;\n\t}", "public void disconnect(){\n\t\tfor (NodeInfo peerInfo : peerList) {\r\n\t\t\t// send leave to peer\r\n\t\t\tsend(\"0114 LEAVE \" + ip + \" \" + port, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\r\n\t\t\tfor (NodeInfo peerInfo2 : peerList) {\r\n\t\t\t\tif (!peerInfo.equals(peerInfo2)) {\r\n\t\t\t\t\tString joinString = \"0114 JOIN \" + peerInfo2.getIp() + \" \" + peerInfo2.getPort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsend(joinString, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tunRegisterBootstrapServer(serverIp, serverPort, ip, port, username);\r\n\t\t\tapp.printInfo(\"Node disconnected from server....\");\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//socket = null;\r\n\t}", "public void testRemoveEdge_betweenVertices() {\n System.out.println(\"removeEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n continue;\n }\n\n Assert.assertNotNull(graph.removeEdge(new Integer(i), new Integer(j)));\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }", "private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }", "public ExtendedListIterable<Edge> edges(Node n1, Node n2, Direction direction) {\n return inspectableGraph.edges(n1, n2, Direction.EITHER);\n }", "private void removeEdges()\r\n\t{\r\n\t final String edgeTypeName = edgeType.getName();\r\n\t for (final Edge e : eSet)\r\n\t\te.getSource().removeEdge(edgeTypeName, e.getDest());\r\n\t eSet.clear();\r\n\t}", "private static <N, E extends Edge<N>> ImmutableAdjacencyGraph<N, Edge<N>> deleteFromGraph(final Graph<N, E> graph, final Set<N> deleteNodes, final Set<E> deleteEdges)\n\t{\n\t\t// remove the deleteNodes\n\t\tfinal Set<N> cutNodes = graph.getNodes();\n\t\tcutNodes.removeAll(deleteNodes);\n\t\t// remove the deleteEdges\n\t\tfinal Set<Edge<N>> cutEdges = new HashSet<Edge<N>>(deleteEdges);\n\t\tfor (final E edge : deleteEdges)\n\t\t\tcutEdges.remove(edge);\n\t\t// remove any remaining deleteEdges which connect to removed deleteNodes\n\t\t// also replace deleteEdges that have one removed node but still have\n\t\t// 2 or more remaining deleteNodes with a new edge.\n\t\tfinal Set<Edge<N>> removeEdges = new HashSet<Edge<N>>();\n\t\tfinal Set<Edge<N>> addEdges = new HashSet<Edge<N>>();\n\t\tfor(final Edge<N> cutEdge : cutEdges)\n\t\t{\n\t\t\tfinal List<N> cutEdgeNeighbors = cutEdge.getNodes();\n\t\t\tcutEdgeNeighbors.removeAll(cutNodes);\n\t\t\tif( cutEdgeNeighbors.size() != cutEdge.getNodes().size() )\n\t\t\t\tremoveEdges.add(cutEdge);\n\t\t\tif( cutEdgeNeighbors.size() > 1 )\n\t\t\t\t// TODO instead of ImmutableHyperEdge implement clone or something\n\t\t\t\taddEdges.add(new ImmutableHyperEdge<N>(cutEdgeNeighbors));\n\t\t}\n\t\tfor(final Edge<N> removeEdge : removeEdges)\n\t\t\tcutEdges.remove(removeEdge);\n\t\tcutEdges.addAll(addEdges);\n\t\t// check if a graph from the new set of deleteEdges and deleteNodes is\n\t\t// still connected\n\t\treturn new ImmutableAdjacencyGraph<N, Edge<N>>(cutNodes, cutEdges);\n\t}", "public boolean removeEdge(String label1, String label2)\n\t{\n\t\tif(isAdjacent(label1, label2)) //if edge exists remove it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.removeEdge(vx2);\n\t\t\tvx2.removeEdge(vx1);\n\t\t\tedgeCount--;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public void drawUndirectedEdge(String label1, String label2) {\n }", "public void mergeDisjoint(UFPartition<T> p2){\r\n\t\tp2 = p2.clone();\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tassert !nodes.containsKey(n.getE());\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\tfor(Node<T> n : p2.nodes.values()) {\r\n\t\t\tNode<T> newNode = getNode(n.getE());\r\n\t\t\tNode<T> newNodeRoot = getNode(n.getRoot().getE());\r\n\t\t\tnewNode.setParent(newNodeRoot);\r\n\t\t\tnodes.put(n.getE(), new Node<T>(n.getE()));\r\n\t\t}\r\n\t\t\r\n\t}", "private void deleteConnections() {\n for (int i = 0; !this.sourceConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.sourceConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n\n for (int i = 0; !this.targetConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.targetConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n }", "public void removeEdge(int i, int j)\n {\n \tint v = i;\n \tint w = j;\n \t//Create an iterator on the adjacency list of i \n \tIterator<DirectedEdge> it = adj[v].iterator();\n \t//Loop through adj and look for any edge between i and j\n \twhile(it.hasNext())\n \t{\n \t\tDirectedEdge ed = it.next();\n \t\t//If an edge is found, remove it and its reciprocal\n \t\tif(ed.from() == v && ed.to() == w)\n \t\t{\n \t\t\tit.remove();\n \t\t\tit = adj[w].iterator();\n \t\t\twhile(it.hasNext())\n \t\t\t{\n \t\t\t\ted = it.next();\n \t\t\t\tif(ed.from() == w && ed.to() == v)\n \t\t\t\t{\n \t\t\t\t\tit.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t} \t\n \tE-=2;\n }", "private static void RemoveEdge(Point a, Point b)\n {\n //Here we use a lambda expression/predicate to express that we're looking for a match in list\n //Either if (n.A == a && n.B == b) or if (n.A == b && n.B == a)\n edges.removeIf(n -> n.A == a && n.B == b || n.B == a && n.A == b);\n }", "public void disconnectFromClientAndServer() {\n //sends disconnect message to server\n this.sendMessages(Arrays.asList(\"DISCONNECT\"));\n \n //disconnect self\n this.isConnectedToClientServer = false;\n board.disconnectFromClientServer();\n this.inputQueue = null;\n this.outputQueue = null;\n \n //make all boundaries visible\n for (Boundary boundary : board.boundaries){\n boundary.makeVisible();\n }\n board.neighbors.changeDown(\"\");\n board.neighbors.changeLeft(\"\");\n board.neighbors.changeRight(\"\");\n board.neighbors.changeUp(\"\");\n \n //remove all balls\n board.clearBalls();\n }", "private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}", "final public void disconnect() {\n \n _input.removeInputConnection();\n _output.removeConnection(this);\n\n \n }", "private static <V> Graph<V> unirGrafos(Graph<V> grafo1, Graph<V> grafo2) {\n V[] array = grafo2.getValuesAsArray();\n double[][] matriz = grafo2.getGraphStructureAsMatrix();\n for (int x = 0; x < array.length; x++) {\n grafo1.addNode(array[x]);\n for (int y = 0; y < array.length; y++) {\n if (matriz[x][y] != -1) {\n if (!grafo2.isDirected()) {\n matriz[y][x] = -1;\n }\n grafo1.addNode(array[y]);\n grafo1.addEdge(array[x], array[y], grafo2.getWeight(array[x], array[y]));\n }\n }\n }\n return grafo1;\n }", "private static Set symmetricSetDifference (Set<Integer> set1, Set<Integer> set2)\n {\n Set<Integer> skæringspunktet = new HashSet<Integer>(set1);\n\n // Holder på set2 også\n skæringspunktet.retainAll(set2);\n\n // Set1 fjerner alt fra Settet\n set1.removeAll(skæringspunktet);\n // Set1 fjerner alt fra Settet\n set2.removeAll(skæringspunktet);\n\n // Tilføjer alt fra set2 til set1\n set1.addAll(set2);\n\n // Returnerer set1\n return set1;\n }", "public static int[] setDiff(int[] nodes1, int[] nodes2) {\r\n\t\tint[] output = new int[1];\r\n\t\tint idx_count = 0;\r\n\t\tfor(int i=0; i<nodes1.length; i++) {\t\t\t\r\n\t\t\tif(nodes2.length==0) {\r\n\t\t\t\tif(idx_count==0) {\r\n\t\t\t\t\toutput[0] = nodes1[i];\r\n\t\t\t\t\tidx_count++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\toutput = setAdd(output,nodes1[i]);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<nodes2.length; j++) {\r\n\t\t\t\tif(nodes1[i]==nodes2[j]) {\r\n\t\t\t\t\tnodes2 = removeTheElement(nodes2,j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif(j==nodes2.length-1) {\r\n\t\t\t\t\tif(idx_count==0) {\r\n\t\t\t\t\t\toutput[0] = nodes1[i];\r\n\t\t\t\t\t\tidx_count++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\toutput = setAdd(output,nodes1[i]);\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 output;\r\n\t}", "int removeEdges(ExpLineageEdge.FilterOptions options);", "public boolean unlink(Node n1, Node n2) {\n\t\t\n\t\t//Validate n1 has a value\n\t\tif (n1 == null) { return false; } \n\t\t\n\t\t//Validate n has a value\n\t\tif (n2 == null) { return false; } \t\t\t\n\t\t\n\t\t//Verify nodes arn't the same\n\t\tif (n1 == n2) { return false; } \n\t\t\n\t\t//verify n1 and n2 are in the network\n\t\tif(!(nodes.contains(n1) && nodes.contains(n2))){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Remove node 2 as neighbor from node 1 and vice versa\n\t\tif (n1.removeNeighbor(n2) && n2.removeNeighbor(n1)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void removeEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tedges.remove(edge);\n\t}", "private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "public void onDisconnect(PeerNode node2) {\n\t\tif(announcer != null)\n\t\t\tannouncer.maybeSendAnnouncementOffThread();\n\t}", "public void connect(int node1, int node2, double w)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2) && (node1 != node2))\n\t{\n\t \tNode n1 = (Node)getNodes().get(node1);\n\t\t Node n2 = (Node)getNodes().get(node2);\n\t\t\n\t\tif(!n1.hasNi(node2)&&!n2.hasNi(node1))\n\t\t{\n\t\t\tEdge e=new Edge(w,node1,node2);\n\t\t\tn1.addEdge(e);\n\t\t\tn2.addEdge(e);\n\t\t\tmc++;//adding an edge\n\t\t\tedge_size++;\n\t\t}\n\t\telse\n\t\t\t// if the edge already exist in the HashMap of the two nodes\n\t\t\t//we want only update the weight of the edge.\n\t\t{\n\t\t\tn1.getEdgesOf().get(node2).set_weight(w);\n\t\t\tn2.getEdgesOf().get(node1).set_weight(w);\n\t\t}\n\t\t\n\t}\n\telse {\n\t\treturn;\n\t\t//System.out.println(\"src or dst doesnt exist OR src equals to dest\");\n\t}\n}", "public void testRemoveAllEdges() {\n System.out.println(\"removeAllEdges\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllEdges());\n Assert.assertEquals(graph.edgesSet().size(), 0);\n }", "void removeNeighbors();", "public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}", "public void removeEdge(V from, V to){\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (hasEdge(from, to)){\n ArrayList<V> edges = (ArrayList<V>)getEdges(from);\n int i = 1;\n V vertex = edges.get(0);\n while (i < edges.size() && !vertex.equals(to)){\n i++;\n vertex = edges.get(i);\n }\n edges.remove(vertex);\n graph.put(from, edges);\n }\n\n }", "private void connectAll()\n {\n\t\tint i = 0;\n\t\tint j = 1;\n\t\twhile (i < getNodes().size()) {\n\t\t\twhile (j < getNodes().size()) {\n\t\t\t\tLineEdge l = new LineEdge(false);\n\t\t\t\tl.setStart(getNodes().get(i));\n\t\t\t\tl.setEnd(getNodes().get(j));\n\t\t\t\taddEdge(l);\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++; j = i+1;\n\t\t}\n\n }", "@Override\n public boolean removeEdge(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)\n && dictionary.get(vertex1).contains(vertex2)\n && dictionary.get(vertex2).contains(vertex1)) {\n dictionary.get(vertex1).remove(vertex2);\n dictionary.get(vertex2).remove(vertex1);\n return true;\n } else {\n return false;\n }\n\n }", "public void removeEdge(Entity entityFirst, Entity entitySecond) {\n\t\tif(Processing.friendMap.containsKey(entityFirst.getEmail())) {\n\t\t\tif(Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())) {\n\t\t\t\tProcessing.friendMap.get(entityFirst.getEmail()).remove(entitySecond.getEmail());\n\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is removed from your Friend list\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is not friend of you\");\n\t\t\t}\n\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(entityFirst.getEmail()+\" does not exist\");\n\t\t}\n\t}", "int[] getOutEdges(int... nodes);", "public void removeEdge(int s,int d) throws Exception\r\n\t{\r\n\t\tif(s>=0&&s<n&&d>=0&&d<n)\r\n\t\t{\r\n\t\t\tLinkedList l=g.get(s);\r\n\t\t\tl.deleteMatched(g.get(d).getHead());\r\n\t\t\t\r\n\t\t\t//undirected graph\r\n\t\t\tLinkedList l1=g.get(d);\r\n\t\t\tl1.deleteMatched(g.get(s).getHead());\r\n\t\t}\r\n\t}", "protected void merge(FlowGraph graph){\r\n for(FlowGraphNode node : this.from){\r\n node.addTo(graph.start);\r\n node.to.remove(this);\r\n }\r\n for(FlowGraphNode node : this.to){\r\n graph.end.addTo(node);\r\n node.from.remove(this);\r\n }\r\n }", "public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }", "public void deleteEdge(Integer idVertex1, Integer idVertex2) throws Exception {\r\n\t\tmatrix.deleteEdge(idVertex1, idVertex2);\r\n\t}", "public void cleanNodeListToEdges(CircosEdgeList edges){\n\t\tArrayList<CircosNode> tempnodes = new ArrayList<CircosNode>();\n\t\tHashMap<String,String> tempcolors = new HashMap<String,String>();\n\t\t\n\t\tfor(int i = 0; i < nodes.size(); i++){\n\t\t\tif(edges.containsNodeAsSourceOrTarget(nodes.get(i).getID())){\n\t\t\t\ttempnodes.add(nodes.get(i));\n\t\t\t\ttempcolors.put(nodes.get(i).getID(), colors.get(nodes.get(i).getID()));\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tnodes = tempnodes;\n\t\tcolors = tempcolors;\n\t}", "public static int[] findRedundantConnection(int[][] edges) {\n UnionDataStructure obj = new UnionDataStructure();\n \n int nodes = edges.length;\n Set<int[]> set = new HashSet<>();\n \n for( int i = 1; i<=nodes; i++ ){\n\t\t\tobj.makeSet( i );\n\t\t}\n\t\t\n for( int[] edge: edges ){\n\t\t\tint edge1 = edge[0];\n\t\t\tint edge2 = edge[1];\n\t\t\tset.add( edge );\n\t\t\t\n\t\t\tif( obj.findSet_representative( edge1 ) != obj.findSet_representative( edge2 ) ){\n\t\t\t\tset.remove( edge );\n\t\t\t\tobj.union( edge1, edge2 );\n\t\t\t}\n\t\t}\n\n Iterator<int[]> iterator = set.iterator();\n\n return iterator.next();\n }", "public boolean resetEdges();", "public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }", "public final void connectIfNotFound(N n1, E edge, N n2) {\n if (!isConnected(n1, edge, n2)) {\n connect(n1, edge, n2);\n }\n }", "private final void connectSkipEdgesAndGroupLevelWEdges() {\n for (int v1=0;v1<nNodes;++v1) {\n int nSkipEdges = nSkipEdgess[v1];\n // Loop through only skip vertices.\n if (nSkipEdges == 0) continue;\n\n int[] nextNodes = outgoingSkipEdgeNextNodess[v1];\n int[] nextNodeEdgeIndexes = outgoingSkipEdgeNextNodeEdgeIndexess[v1];\n int[] outgoingSkipEdges = outgoingSkipEdgess[v1];\n float[] skipWeights = outgoingSkipEdgeWeightss[v1];\n for (int j=0;j<nSkipEdges;++j) {\n // Start from vertex v1, move in direction j.\n int previous = v1;\n int current = nextNodes[j];\n int firstEdgeIndex = nextNodeEdgeIndexes[j];\n outgoingSkipEdges[j] = current;\n skipWeights[j] = edgeWeights[firstEdgeIndex];\n\n // invariants:\n // 1. outgoingSkipEdges[j] == current.\n // 2. skipWeights[j] == path length from v1 up to current.\n // initially, skipWeights[j] = weight(v1, nextNodes[j])\n\n while (nSkipEdgess[current] == 0) {\n int nLevelWNeighbours = nLevelWNeighbourss[current];\n int[] levelWEdgeOutgoingIndexes = levelWEdgeOutgoingIndexess[current];\n \n // While current is still not yet a skip vertex,\n // Else continue expanding.\n int[] outgoingEdges = outgoingEdgess[current];\n\n for (int k=0;k<nLevelWNeighbours; ++k) {\n int index = levelWEdgeOutgoingIndexes[k];\n int next = outgoingEdges[index];\n if (next == previous) continue;\n \n int edgeIndex = outgoingEdgeIndexess[current][index];\n\n // now next == the next node in the list.\n previous = current;\n current = next;\n\n outgoingSkipEdges[j] = current;\n skipWeights[j] += edgeWeights[edgeIndex];\n break;\n }\n }\n // now all the edges along that subpath will be of the same index group.\n }\n }\n }", "static void disconnect(FlowGraph graph, Inlet inlet) {\n if (!(inlet instanceof InPort)) {\n throw new IllegalArgumentException(\"Invalid outlet passed to graph\");\n }\n\n InPort inPort = (InPort) inlet;\n\n if (!graph.equals(inPort.getGraph())) {\n throw new IllegalArgumentException(\"Outlet or inlet does not belong to graph\");\n }\n\n inPort.finish(null);\n inPort.cancel(null);\n }", "public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\r\n \tmyAdjLists[v1].add(new Edge(v1, v2, edgeInfo));\r\n \tmyAdjLists[v2].add(new Edge(v2, v1, edgeInfo));\r\n }", "public void filter1NRelations() {\n this.relations.removeIf(Relationship::isOneToOne);\n }", "private void phaseTwo(){\r\n\r\n\t\tCollections.shuffle(allNodes, random);\r\n\t\tList<Pair<Node, Node>> pairs = new ArrayList<Pair<Node, Node>>();\r\n\t\t\r\n\t\t//For each node in allNode, get all relationshpis and iterate through each relationship.\r\n\t\tfor (Node n1 : allNodes){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//If a node n1 is related to any other node in allNodes, add those relationships to rels.\r\n\t\t\t\t//Avoid duplication, and self loops.\r\n\t\t\t\tIterable<Relationship> ite = n1.getRelationships(Direction.BOTH);\t\t\t\t\r\n\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\tNode n2 = rel.getOtherNode(n1);\t//Get the other node\r\n\t\t\t\t\tif (allNodes.contains(n2) && !n1.equals(n2)){\t\t\t\t\t//If n2 is part of allNodes and n1 != n2\r\n\t\t\t\t\t\tif (!rels.contains(rel)){\t\t\t\t\t\t\t\t\t//If the relationship is not already part of rels\r\n\t\t\t\t\t\t\tPair<Node, Node> pA = new Pair<Node, Node>(n1, n2);\r\n\t\t\t\t\t\t\tPair<Node, Node> pB = new Pair<Node, Node>(n2, n1);\r\n\r\n\t\t\t\t\t\t\tif (!pairs.contains(pA)){\r\n\t\t\t\t\t\t\t\trels.add(rel);\t\t\t\t\t\t\t\t\t\t\t//Add the relationship to the lists.\r\n\t\t\t\t\t\t\t\tpairs.add(pA);\r\n\t\t\t\t\t\t\t\tpairs.add(pB);\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}\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}", "public static Graph<Integer,String> CopyModel (Integer n, double p1, double p2) {\n\t\t\r\n\t\tGraph<Integer,String> g = new SparseGraph<Integer,String>();\r\n\t\tRandom generator = new Random();\r\n\t\tInteger k = 2;\r\n\t\tg.addEdge(\"e12\", 1,2); // initial edge\r\n\r\n\t\twhile (k<n) {\r\n\t\t\tdouble r = generator.nextDouble();\r\n\t\t\tint v = generator.nextInt(k);\r\n\t\t\t// k = number of existing vertices\r\n\t\t\tv += 1; // since vertices will be 1...N\r\n\t\t\tk += 1;\r\n\t\t\t// k is the new vertex. v is a randomly selected existing vertex\r\n\t\t\t\r\n\t\t\tif (r < p1) {\r\n\t\t\t\t// generate a new vertex adjacent to 1 randomly selected\t\t\t\t\r\n\t\t\t\tg.addEdge(\"e\"+k+v, k, v);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// generate a copy vertex. Will check r < p2 to decide if adjacent or not\r\n\t\t\t\tfor (Integer i : g.getNeighbors(v)) {\r\n\t\t\t\t\tg.addEdge(\"e\"+k+i, k,i);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif (r < p2) {\r\n\t\t\t\t\tg.addEdge(\"e\"+k+v, k, v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn g;\r\n\t}", "public void EliminarArista(int v1, int v2) {\n\t\tNodoGrafo n1 = Vert2Nodo(v1);\n\t\tEliminarAristaNodo(n1, v2);\n\t}", "public abstract GraphEdge<N, E> getFirstEdge(N n1, N n2);", "public abstract boolean isConnected(N n1, N n2);", "protected abstract Graph filterGraph();", "public void removeEdge(Vertex other) {\n edges.remove(other);\n other.edges.remove(this);\n }", "private PlainGraph mergeGraphsInternal(PlainGraph g1, PlainGraph g2) {\n // Create all nodes of g2 in g1\n // AddNode does check if the node does exist already, if so it doesn't create a new one\n for (Map.Entry<String, PlainNode> entry: graphNodeMap.get(g2).entrySet()){\n addNode(g1, entry.getKey(), null);\n }\n\n // create all edges of g2 in g1\n for (PlainEdge edge: g2.edgeSet()) {\n // check if the edge exists in g1, if so check if the variable names of the source and the target are also the same and not just the node names\n // Since the node names are numbered in each graph starting with 0, collisions could exists without the 2nd and 3rd check\n // Inverse the whole such that if this edge doesn't exist create it in g1\n if (! (g1.containsEdge(edge) && getVarName(g2, edge.source()).equals(getVarName(g1, edge.source())) && getVarName(g2, edge.target()).equals(getVarName(g1, edge.target())))) {\n addEdge(g1, getVarName(g2, edge.source()), edge.label().text(), getVarName(g2, edge.target()));\n }\n }\n return g1;\n }", "public void removeEdgeWeight(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tweights.remove(edge);\n\t}", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "static void disconnect(FlowGraph graph, Outlet outlet) {\n if (!(outlet instanceof OutPort)) {\n throw new IllegalArgumentException(\"Invalid outlet passed to graph\");\n }\n\n OutPort outPort = (OutPort) outlet;\n\n if (!graph.equals(outPort.getGraph())) {\n throw new IllegalArgumentException(\"Outlet or inlet does not belong to graph\");\n }\n\n outPort.cancel(null);\n outPort.complete();\n }", "public void removeCutVertices() {\n boolean found;\n LinkedList<Integer> isolated = new LinkedList<>();\n do {\n found = false;\n for (Map.Entry<Integer, Set<Integer>> entry : adjacencyMap.entrySet()) {\n// System.out.println(\"adjacency print key: \" + entry.getKey() + \"value: \" +\n// entry.getValue() + \"set size: \" + entry.getValue().size());\n if (entry.getValue().size() == 1) {\n// System.out.println(\"found cut vertex\");\n found = true; // loop yielded a cut vertex\n // get the only vertex in the set\n for (Integer integer : entry.getValue()) {\n// System.out.println(\"started set iterator\" + integer);\n int removalSet = integer; // take the value of the set element\n // create a temp set\n Set<Integer> tempSet = adjacencyMap.get(removalSet);\n tempSet.remove(entry.getKey()); // remove the cut vertex from this set\n adjacencyMap.replace(removalSet, tempSet); // put the smaller set in place\n }\n isolated.add(entry.getKey());\n\n\n }\n\n }\n // remove isolated vertices\n for (Integer vert : isolated) {\n adjacencyMap.remove(vert);\n }\n isolated.clear();\n } while (found);\n }", "private void removeDisconnectedViews() {\n List<View> disconnectedViews;\n synchronized (connectedViews) {\n disconnectedViews = connectedViews\n .stream()\n .filter(view -> !view.isConnected())\n .collect(Collectors.toList());\n connectedViews.removeAll(disconnectedViews);\n }\n synchronized (connectedNicknames) {\n disconnectedViews.forEach(v -> connectedNicknames.remove(v.getNickname()));\n }\n disconnectedViews.forEach(this::closeView);\n }", "public boolean deleteConnection(GraphNode nodeA, GraphNode nodeB) {\n if (nodeB.getAdjacent().contains(nodeA)) {\n //do the thing\n nodeA.removeAdjacent(nodeB);\n nodeB.removeAdjacent(nodeA);\n return true;\n }\n return false;\n }", "public Enumeration undirectedEdges();", "public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }", "public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }", "protected void disconnectFromAllEndpoints() {\n for (Endpoint endpoint : mEstablishedConnections.values()) {\n mConnectionsClient.disconnectFromEndpoint(endpoint.getId());\n }\n mEstablishedConnections.clear();\n }", "@Test\r\n void test_remove_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"B\");\r\n graph.removeEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n } \r\n }", "public abstract boolean isConnected(N n1, E e, N n2);", "public boolean removeEdge(V source, V target);", "private static void addEdgeDiag(int n1num, int n2num, int x, int y,\n\t\t\tboolean b) {\n\t\taddEdgeReal(n1num, n2num, x, y);\n\t\taddEdgeReal(n2num, n1num, x, y);\n\t}", "public void testRemoveEdge_edge() {\n System.out.println(\"removeEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n continue;\n }\n\n Assert.assertNotNull(\n graph.removeEdge(new UnweightedEdge(new Integer(i), new Integer(j))));\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }", "public Node opposite(Node n) {\n\t if (from == n)\n\t\treturn to;\n\t if (to == n)\n\t\treturn from;\n\t return null;\n\t}", "void randGraphGenerate(long de, int n, LinkedList<Edge> l1[]){\n\t\t\t\t\n\t\tRandom rand= new Random();\n\t\tfor(int i=0;i<de;i++)\n\t\t{\n\t\t\tEdge e1[] = new Edge[2];\n\t\t\tEdge e2[] = new Edge[2];\n\n\t\t\tint s1 = rand.nextInt(n);\n\t\t\tint s2 = rand.nextInt(n);\n\t\t\twhile(s1==s2){\n\t\t\t\ts1 = rand.nextInt(n);\n\t\t\t\ts2 = rand.nextInt(n);\n\t\t\t}\n\t\t\tint tempCost = rand.nextInt(1000)+1;\n\t\t\tIterator<Edge> it = l1[s1].iterator();\n\t\t\twhile(it.hasNext()) {\n\t\t\t\tif(it.next().adjIndex==s2) {\n\t\t\t\t\ts1 = rand.nextInt(n);\n\t\t\t\t\ts2 = rand.nextInt(n);\n\t\t\t\t\tit = l1[s1].iterator();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\te1[j]=new Edge();\n\t\t\t\te2[j]=new Edge();\n\n\t\t\t}\n\t\t\te1[0].adjIndex=s1;\n\t\t\te1[0].cost=tempCost;\n\t\t\te1[1].adjIndex=s2;\n\t\t\te1[1].cost=tempCost;\n\t\t\te2[0].adjIndex=s1;\n\t\t\te2[0].cost=tempCost;\n\t\t\te2[1].adjIndex=s2;\n\t\t\te2[1].cost=tempCost;\n\n\t\t\tl1[s1].add(e1[1]);\n\t\t\tl1[s2].add(e1[0]);\n\t\t\n\t\t}\n\t}", "private final void pruneParallelSkipEdges() {\n // TODO: IF THERE ARE MULTIPLE EDGES WITH THE SAME EDGE WEIGHT, WE ARBITRARILY PICK THE FIRST EDGE TO KEEP\n // THE ORDERING MAY BE DIFFERENT FROM BOTH SIDES OF THE EDGE, WHICH CAN LEAD TO A NONSYMMETRIC GRAPH\n // However, no issues have cropped up yet. Perhaps the ordering happens to be the same for both sides,\n // due to how the graph is constructed. This is not good to rely upon, however.\n Memory.initialise(maxSize, Float.POSITIVE_INFINITY, -1, false);\n \n int maxDegree = 0;\n for (int i=0;i<nNodes;++i) {\n maxDegree = Math.max(maxDegree, nSkipEdgess[i]);\n }\n \n int[] neighbourIndexes = new int[maxDegree];\n int[] lowestCostEdgeIndex = new int[maxDegree];\n float[] lowestCost = new float[maxDegree];\n int nUsed = 0;\n \n for (int i=0;i<nNodes;++i) {\n nUsed = 0;\n int degree = nSkipEdgess[i];\n int[] sEdges = outgoingSkipEdgess[i];\n float[] sWeights = outgoingSkipEdgeWeightss[i];\n \n for (int j=0;j<degree;++j) {\n int dest = sEdges[j];\n float weight = sWeights[j];\n \n int p = Memory.parent(dest);\n int index = -1;\n \n if (p == -1) {\n index = nUsed;\n ++nUsed;\n \n Memory.setParent(dest, index);\n neighbourIndexes[index] = dest;\n \n lowestCostEdgeIndex[index] = j;\n lowestCost[index] = weight;\n } else {\n index = p;\n if (weight < lowestCost[index]) {\n // Remove existing\n \n /* ________________________________\n * |______E__________C____________L_|\n * ________________________________\n * |______C__________L____________E_|\n * ^\n * |\n * nSkipEdges--\n */\n swapSkipEdges(i, lowestCostEdgeIndex[index], j);\n swapSkipEdges(i, j, degree-1);\n --j; --degree;\n \n // lowestCostEdgeIndex[index] happens to be the same as before.\n lowestCost[index] = weight;\n } else {\n // Remove this.\n \n /* ________________________________\n * |______E__________C____________L_|\n * ________________________________\n * |______E__________L____________C_|\n * ^\n * |\n * nSkipEdges--\n */\n swapSkipEdges(i, j, degree-1);\n --j; --degree;\n }\n }\n \n }\n nSkipEdgess[i] = degree;\n \n // Cleanup\n for (int j=0;j<nUsed;++j) {\n Memory.setParent(neighbourIndexes[j], -1); \n }\n }\n }", "void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }", "private void removeEdgeJointPointDest(Vector<Edge> edges) {\n\t\tfor (Edge e: edges) {\n\t\t\t\tEdge currentEdge = e;\n\t\t\t\tremoveEdge(e);\n\t\t\t\twhile (shapes.contains(currentEdge.getDest()) && currentEdge.getDest() instanceof JoinPoint) {\n\t\t\t\t\tJoinPoint join = (JoinPoint) currentEdge.getDest();\n\t\t\t\t\tshapes.remove(join);\n\t\t\t\t\tcurrentEdge = (Edge) join.getDest();\n\t\t\t\t\tremoveEdge(currentEdge);\n\t\t\t\t}\n\t\t}\n\t}", "public void clear() {\r\n for (Edge edge : edges)\r\n edge.disconnect();\r\n for (Vertex vertex : vertices)\r\n vertex.disconnect();\r\n edges.clear();\r\n vertices.clear();\r\n getChildren().remove(1, getChildren().size());\r\n }", "public void avoidOverlappingCell(Object[] cells2) {\r\n \r\n \t\toverlapping.avoidOverlappingCell(cells2);\r\n \t\tgraphRepaint();\r\n \t\tgraph.getGraphLayoutCache().reload();\r\n \t}", "public void disjointSetMethod(Graph g)\n\t{\n\t\tsets = new DisjointSets(g.getNumNodes());\n\t\tsetup(g.getNumNodes());\n\t\tsets.print();\n\t\t\n\t}" ]
[ "0.7092443", "0.65287095", "0.65112984", "0.6462319", "0.6386112", "0.6286524", "0.6153374", "0.61235267", "0.6054608", "0.60528827", "0.59488887", "0.58981913", "0.5867816", "0.58408386", "0.58007556", "0.5787011", "0.5737339", "0.57135105", "0.56672484", "0.56672484", "0.5650444", "0.56392825", "0.56145984", "0.55869097", "0.5576862", "0.5572258", "0.55385345", "0.5533413", "0.549409", "0.54719067", "0.54686004", "0.5464643", "0.5455412", "0.5437458", "0.5436196", "0.5423484", "0.541456", "0.5412069", "0.5399206", "0.53871584", "0.5366033", "0.5358789", "0.5352489", "0.53435403", "0.53401107", "0.5327629", "0.53242075", "0.5322639", "0.530444", "0.5296115", "0.5295462", "0.5283388", "0.5279408", "0.52657723", "0.52264583", "0.51860356", "0.51780653", "0.51636696", "0.5152595", "0.5144654", "0.513265", "0.5116447", "0.51161087", "0.51028407", "0.50936323", "0.5091247", "0.50818306", "0.50694734", "0.50665426", "0.5046694", "0.5032066", "0.5025988", "0.5010443", "0.4998451", "0.4995116", "0.49876806", "0.4978496", "0.49704581", "0.49611813", "0.4959601", "0.4957869", "0.4954943", "0.49493918", "0.4946931", "0.49451724", "0.49451724", "0.49429074", "0.49421868", "0.49401578", "0.49309817", "0.49235776", "0.49214792", "0.4921434", "0.49204478", "0.49177787", "0.4899053", "0.48922753", "0.48909172", "0.48711053", "0.486945" ]
0.7234519
0
Checks whether two nodes in the graph are connected via a directed edge.
public abstract boolean isConnectedInDirection(N n1, N n2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}", "public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);", "public abstract boolean isConnected(N n1, E e, N n2);", "public boolean isConnected(String node1, String node2) {\r\n\r\n Set<String> adjacent = map.get(node1);\r\n if (adjacent == null) {\r\n return false; // boolean method should return a value; if adjacent node is null then the method return false\r\n }\r\n return adjacent.contains(node2); // if there exist adjacent node then returns adjacency list contains node2 \r\n }", "private boolean isEdge(Node node) {\n for (Node n: nodes){\n if(!node.equals(n)) {\n for(Edge e:n.getEdges()){\n if(e.getDestination().equals(node)) {\n return true;\n }\n }\n }\n }\n return false;\n }", "public abstract boolean hasEdge(int from, int to);", "public abstract boolean isConnected(N n1, N n2);", "default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }", "public boolean isConnectedTo(Node<A> n) {\n\t\t\n\t\tif (g == null) return false;\n\t\t\n\t\tif (g.contains(n)){\n\t\t\t\n\t\t\tfor (Object o: g.getEdges()) {\n\t\t\t\t\n\t\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEdge (T vertex1, T vertex2){\n int i1 = vertexIndex(vertex1);\n int i2 = vertexIndex(vertex2);\n if (i1 != NOT_FOUND && i2 != NOT_FOUND && edges[i1][i2] > 0){\n return true;\n }\n return false;\n }", "public boolean hasEdge(T beg, T end);", "public abstract boolean isUsing(Edge graphEdge);", "public boolean hasEdge(String id1, String id2)\n\t{\n\t\treturn nodes.containsKey(id1) && getNode(id1).hasEdge(id2);\n\t}", "boolean isConnected(int a, int b) {\n\t\tint nodea = getRoot(a); //logN\r\n\t\tint nodeb = getRoot(b); //logN\r\n\t\tSystem.out\r\n\t\t\t\t.println(a + \" and \" + b + \" CONNECTED?: \" + (nodea == nodeb));\r\n\t\treturn nodea == nodeb;\r\n\t}", "public boolean containsEdge(V source, V target);", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean hasEdge(T begin, T end);", "public boolean isConnectedTo(A e) {\n\t\n\t\tif (g == null) return false;\n\t\t\n\t\tfor (Object o: g.getEdges()) {\n\t\t\t\n\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().getValue().equals(e)) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean hasEdge(Node source, Node destination) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == destination) {\n return true;\n }\n }\n return false;\n }", "boolean canConnect(IAgriIrrigationNode other, Direction from);", "public static boolean connected(Graph grafo) {\r\n\t\tint numVertices = grafo.getVertexNumber();\r\n\t\tSet<Vertice> verticesVisitados = new HashSet<Vertice>(); // sem repeticoes\r\n\t\tfor (Aresta aresta : grafo.getArestas()) {\r\n\t\t\tverticesVisitados.add(aresta.getV1());\r\n\t\t\tverticesVisitados.add(aresta.getV2());\r\n\t\t}\r\n\r\n\t\treturn numVertices == verticesVisitados.size();\r\n\t}", "protected boolean connects(R r1, R r2) {\n\t\t\treturn getPreviousOrSame(getLower(r1)).compareTo(getUpper(r2)) <= 0 ||\n\t\t\t\tgetPreviousOrSame(getLower(r2)).compareTo(getUpper(r1)) <= 0;\n\t\t}", "public boolean addConnection(GraphNode nodeA, GraphNode nodeB){\n nodeA.addAdjacent(nodeB);\n nodeB.addAdjacent(nodeA);\n if(nodeA.getAdjacent().contains(nodeB) && nodeB.getAdjacent().contains(nodeA))\n return true;\n else\n return false;\n }", "@Override\r\n public boolean isConnected(V start, V destination) {\r\n return !shortestPath(start, destination).isEmpty();\r\n }", "@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isEdge(int source, int destination){\n return edges[source].contains(new Edge(source, destination));\n }", "public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }", "private void checkConnection( SquareNode a , SquareNode b ) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tSquareEdge edgeA = a.edges[i];\n\t\t\tif( edgeA == null )\n\t\t\t\tcontinue;\n\n\t\t\tSquareNode common = edgeA.destination(a);\n\t\t\tint commonToA = edgeA.destinationSide(a);\n\t\t\tint commonToB = CircularIndex.addOffset(commonToA,1,4);\n\n\t\t\tSquareEdge edgeB = common.edges[commonToB];\n\t\t\tif( edgeB != null && edgeB.destination(common) == b ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tfail(\"Failed\");\n\t}", "public boolean validateConnection(CellStorage from, CellStorage to) {\r\n\t\tHashMapConnectedNodes nodeFrom = null;\r\n\t\tHashMapConnectedNodes nodeTo = null;\r\n\t\tif (hshMConnectedNodes.size() == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor (int counter = 0; counter < hshMConnectedNodes.size(); counter++) {\r\n\t\t\tif (hshMConnectedNodes.get(counter).searchNode(from))\r\n\t\t\t\tnodeFrom = hshMConnectedNodes.get(counter);\r\n\t\t\tif (hshMConnectedNodes.get(counter).searchNode(to))\r\n\t\t\t\tnodeTo = hshMConnectedNodes.get(counter);\r\n\t\t}\r\n\t\tif (nodeFrom == null || nodeTo == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n graph.addEdge(\"Mumbai\",\"Warangal\");\n graph.addEdge(\"Warangal\",\"Pennsylvania\");\n graph.addEdge(\"Pennsylvania\",\"California\");\n //graph.addEdge(\"Montevideo\",\"Jameka\");\n\n\n String sourceNode = \"Pennsylvania\";\n\n if(graph.isGraphConnected(sourceNode)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }", "public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}", "public boolean hasEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n \n Node node = adjacencySequences[index1];\n boolean hasEdge = false;\n while (!hasEdge && node != null)\n {\n if (node.neighbourIndex == index2)\n hasEdge = true;\n else\n node = node.nextNode;\n }\n\n return hasEdge;\n }", "public boolean hasEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\treturn edges.contains(edge);\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean containsEdge(E edge);", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public abstract boolean getEdge(Point a, Point b);", "boolean isDirected();", "public static <T> boolean routeBetween2NodesDFS(MyGraph<T> graph, MyNode<T> start, MyNode<T> end) {\n if (start == end) return true;\n\n return dfs(start, new Predicate<MyNode<T>>() {\n @Override\n public boolean test(MyNode<T> t) {\n return t == end;\n }\n });\n }", "public static <N, E extends Edge<N>> boolean isWeaklyConnected(final Graph<N, E> graph, final N leftNode, final N rightNode)\n\t{\n\t\tif( graph instanceof WeakConnectivityOptimizedGraph )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn ((WeakConnectivityOptimizedGraph)graph).isWeaklyConnected(leftNode, rightNode);\n\t\t\t}\n\t\t\tcatch(UnsupportedOperationException caught)\n\t\t\t{\n\t\t\t\t// if it is not supported, lets handle it as if it was not\n\t\t\t\t// optimized\n\t\t\t}\n\t\t}\n\n\t\tfinal Set<N> visited = new HashSet<N>();\n\t\tvisited.add(leftNode);\n\n\t\tfinal Set<N> toVisit = new HashSet<N>();\n\t\ttoVisit.addAll(graph.getAdjacentNodes(leftNode));\n\n\t\twhile( !toVisit.isEmpty() )\n\t\t{\n\t\t\tfinal N node = toVisit.iterator().next();\n\t\t\tif( node.equals(rightNode) )\n\t\t\t\treturn true;\n\n\t\t\tvisited.add(node);\n\t\t\ttoVisit.remove(node);\n\n\t\t\ttoVisit.addAll(graph.getAdjacentNodes(node));\n\t\t\ttoVisit.removeAll(visited);\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isSame(MoveEdge other) {\n if (other == this) {\n return true;\n }\n return Objects.equals(in, other.in) && Objects.equals(out, other.out);\n }", "public boolean hasEdge(Node k){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == k){\n return true;\n }\n }\n return false;\n }", "public boolean connected(int first, int second) {\n return find(first) == find(second);\n }", "public boolean isEdge(int source, int dest) {\r\n return edges[source].contains(new Edge(source, dest));\r\n }", "@Override\r\n public boolean edgeExists(Vertex v1, Vertex v2) {\r\n return adjacencyList.get(v1).contains(v2); //checking if the list of adjacent vertices contains v2\r\n }", "public boolean areAdjacent(Node n1, Node n2, Direction direction) {\n return areAdjacent(n1, n2);\n }", "public boolean deleteConnection(GraphNode nodeA, GraphNode nodeB) {\n if (nodeB.getAdjacent().contains(nodeA)) {\n //do the thing\n nodeA.removeAdjacent(nodeB);\n nodeB.removeAdjacent(nodeA);\n return true;\n }\n return false;\n }", "public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }", "public int checkEdgeDirection(Object src, Object dest)\n\t{\t\t\n\t\tif(this.map.get(src).contains(dest) && !this.map.get(dest).contains(src))\n\t\t\treturn 1;\n\t\telse if(this.map.get(src).contains(dest) && this.map.get(dest).contains(src))\n\t\t\treturn 2;\n\t\treturn 0;\n\t}", "public static boolean verifyGraph(Graph<V, DefaultEdge> g)\n {\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n if (v.color == -1)\n {\n System.out.println(\"Did not color vertex \" + v.getID());\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n for (V neighbor : neighbors)\n {\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n return false;\n }\n if (!verifyColor(g, v))\n {\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n for (V neighbor : neighbors)\n {\n if (v.color == neighbor.color)\n {\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n }\n return false;\n }\n }\n return true;\n }", "private static boolean edgeConnectsTwoMachines(int rootOne, int rootTwo, Set<Integer> machines,\n\t\t\tSet<Integer> rootsLeadingToMachines) {\n\t\tboolean rootOne_leadsToMachine = rootsLeadingToMachines.contains(rootOne);\n\t\tboolean rootTwo_leadsToMachine = rootsLeadingToMachines.contains(rootTwo);\n\t\tboolean rootOne_isMachine = machines.contains(rootOne);\n\t\tboolean rootTwo_isMachine = machines.contains(rootTwo);\n\n\t\treturn (rootOne_leadsToMachine || rootOne_isMachine) && (rootTwo_leadsToMachine || rootTwo_isMachine);\n\t}", "public static boolean cycleInGraph(int[][] edges) {\n int numberOfNodes = edges.length;\n int[] colors = new int[numberOfNodes]; // By default, 0 (WHITE)\n\n for (int i = 0; i < numberOfNodes; i++) {\n\n if (colors[i] != WHITE) // If already visited/finished.\n continue;\n\n boolean isCycle = traverseAndMarkColor(edges, i, colors);\n\n if (isCycle)\n return true;\n }\n return false;\n }", "public boolean isAdjacent(String label1, String label2)\n\t{\n\t\tboolean found = false;\n\t\ttry {\n\t\t\tDSAGraphVertex temp, vx1 = getVertex(label1);\n\t\t\tDSALinkedList adjList = vx1.getAdjacent();\n\t\t\tIterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?\n\t\t\tif(!adjList.isEmpty()) // if list is not empty\n\t\t\t{\n\t\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t\t{\n\t\t\t\t\ttemp = itr.next();\n\t\t\t\t\tif(temp.getLabel().equals(label2))\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Handles exception thrown by getVertex()\n\t\t\tfound = false;\n\t\t}\n\t\treturn found;\n\t}", "public static <N, E extends Edge<N>> boolean isStronglyConnected(final Graph<N, E> graph, final N leftNode, final N rightNode)\n\t{\n\t\tif( graph instanceof StrongConnectivityOptimizedGraph )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn ((StrongConnectivityOptimizedGraph)graph).isStronglyConnected(leftNode, rightNode);\n\t\t\t}\n\t\t\tcatch(UnsupportedOperationException caught)\n\t\t\t{\n\t\t\t\t// if it is not supported, lets handle it as if it was not\n\t\t\t\t// optimized\n\t\t\t}\n\t\t}\n\n\t\tfinal Set<N> visited = new HashSet<N>();\n\t\tvisited.add(leftNode);\n\t\tfinal Set<N> toVisit = new HashSet<N>();\n\t\ttoVisit.addAll(graph.getTraversableNodes(leftNode));\n\t\twhile( !toVisit.isEmpty() )\n\t\t{\n\t\t\tfinal N node = toVisit.iterator().next();\n\t\t\tif( node.equals(rightNode) )\n\t\t\t\treturn true;\n\t\t\tvisited.add(node);\n\t\t\ttoVisit.remove(node);\n\t\t\ttoVisit.addAll(graph.getTraversableNodes(node));\n\t\t\ttoVisit.removeAll(visited);\n\t\t}\n\t\treturn false;\n\t}", "public boolean areAdjacent(Node u, Node v) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null)\n\t\t\tthrow new GraphException(\"Node not found.\");\n\t\t\n\t\tif (adjMatrix[u.getName()][v.getName()] == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public static <T> boolean routeBetween2NodesBFS(MyGraph<T> graph, MyNode<T> start, MyNode<T> end) {\n if (start == end) return true;\n LinkedList<MyNode<T>> queue = new LinkedList<>();\n queue.add(start);\n while (!queue.isEmpty()) {\n MyNode<T> u = queue.removeFirst();\n if (u != null) {\n for (MyNode<T> node : u.getAdjacent()) {\n if (node.getState() == State.Unvisited) {\n if (node == end) {\n return true;\n } else {\n node.setState(State.Visiting);\n queue.add(node);\n }\n }\n }\n\n }\n }\n return false;\n }", "@GuardedBy(\"sfg\")\n\tpublic boolean canGoTo(StateVertex source, StateVertex target) {\n\t\tsynchronized (sfg) {\n\t\t\treturn sfg.containsEdge(source, target) || sfg.containsEdge(target, source);\n\t\t}\n\t}", "public boolean equals(Object obj){\r\n\t\tDirectedEdge edge=(DirectedEdge)obj;\r\n\t\tif (source.equals(edge.getSouceNode() )&& \r\n\t\t\ttarget.equals(edge.getTargetNode()))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public boolean hasEdge(Edge e) {\n for (Edge outEdge : outEdges) {\n if (outEdge.equals(e) && e.getTo() == outEdge.getTo()) {\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean connected(Station station1, Station station2) {\n if (station1.id() >= links.length || station2.id() >= links.length) {\n return station1.id() == station2.id();\n }\n return links[station1.id()] == links[station2.id()];\n }", "public boolean isDirected();", "public boolean isDirected();", "public boolean containsEdge(Edge<V> edge);", "public boolean connected(Path p1,Path p2){\n\t\t// Checks if p1 and p2 are connected\n\t\tif(p1.getExit()==p2.getPos()&&p1.getPos()==p2.getEntry())\n\t\t\t// If the exit of the first tile is equal to the position of the second tile\n\t\t\t// AND if the entrance of the second tile is equal to the position of the first tile\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\t\n\t}", "public boolean isEdge(int i, int j) {\n\t\n\treturn\n\t\t((Linkable)Network.node[i].getProtocol(protocolID)\n\t\t).contains(Network.node[j]) &&\n\t\tNetwork.node[j].isUp() &&\n\t\tNetwork.node[i].isUp();\n}", "public boolean reachable(Vertex start, Vertex end){\n\t\tSet<Vertex> reach = this.post(start); \n\t\treturn reach.contains(end);\n\t}", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\tif(other instanceof Edge) {\n\t\t\t\tEdge e = (Edge) other;\n\t\t\t\treturn e._one.equals(this._one) && e._two.equals(this._two)\n\t\t\t\t\t|| e._one.equals(this._two) && e._two.equals(this._one);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public boolean isEdge(int s,int d) throws Exception\r\n\t{\r\n\t\tif(s>=0&&s<n&&d>=0&&d<n)\r\n\t\t{\r\n\t\t\tLinkedList l=g.get(s);\r\n\t\t\tNode temp=l.getHead();\r\n\t\t\twhile(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tif(temp.getData()==g.get(d).getHead().getData())\r\n\t\t\t\t{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ttemp=temp.getNext();\t\t\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new Exception(\"Vertex is not present\");\r\n\t}", "public boolean connectsVertices(Collection<V> vs);", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "@Override\n public boolean isAdjacent(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n return dictionary.get(vertex1).contains(vertex2) && dictionary.get(vertex2).contains(vertex1);\n } else {\n return false;\n }\n }", "@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }", "private boolean connected(DepthFirstSearch dfs, Graph G) {\n return dfs.count() == G.V();\r\n }", "public boolean containsEdge(V head, V tail);", "boolean contains(Edge edge);", "@Test\n\tpublic void edgesTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tList<Vertex> vertices1 = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_1.addVertices(vertices1);\n\t\tgraph.addEdge(edge_0);\n\t\tgraph.addEdge(edge_1);\n\t\tassertEquals(2, graph.edges().size());\n\t\tassertTrue(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.edges().contains(edge_1));\n\t}", "public static <N, E extends Edge<N>> boolean isWeaklyConnected(final Graph<N, E> graph)\n\t{\n\t\tif( graph instanceof WeakConnectivityOptimizedGraph )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn ((WeakConnectivityOptimizedGraph)graph).isWeaklyConnected();\n\t\t\t}\n\t\t\tcatch(UnsupportedOperationException caught)\n\t\t\t{\n\t\t\t\t// if it is not supported, lets handle it as if it was not\n\t\t\t\t// optimized\n\t\t\t}\n\t\t}\n\n\t\tfinal List<N> remainingNodes = new ArrayList<N>(graph.getNodes());\n\t\twhile( remainingNodes.size() >= 2 )\n\t\t{\n\t\t\tfinal N fromNode = remainingNodes.get(0);\n\t\t\tremainingNodes.remove(0);\n\t\t\tfor(final N toNode : remainingNodes)\n\t\t\t\tif( (toNode != fromNode) && (!Topography.isWeaklyConnected(graph, toNode, fromNode)) )\n\t\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean isSymmetricLink(Entity source, Entity target)\r\n\t{\r\n\t\treturn (directedGraph.findEdge(source, target) != null)\r\n\t\t\t\t&& (directedGraph.findEdge(target, source) != null);\r\n\t}", "private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }", "@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }", "public boolean hasEdge(String from, String to) {\n Vertex v1 = mVertices.get(from);\n Vertex v2 = mVertices.get(to);\n if (v1 == null || v2 == null) return false;\n return mAdjList.get(v1).contains(v2);\n }", "protected boolean tryToConnectNode(IWeightedGraph<GraphNode, WeightedEdge> graph, GraphNode node,\r\n\t\t\tQueue<GraphNode> nodesToWorkOn) {\r\n\t\tboolean connected = false;\r\n\r\n\t\tfor (GraphNode otherNodeInGraph : graph.getVertices()) {\r\n\t\t\t// End nodes can not have a edge towards another node and the target\r\n\t\t\t// node must not be itself. Also there must not already be an edge\r\n\t\t\t// in the graph.\r\n\t\t\t// && !graph.containsEdge(node, nodeInGraph) has to be added\r\n\t\t\t// or loops occur which lead to a crash. This leads to the case\r\n\t\t\t// where no\r\n\t\t\t// alternative routes are being stored inside the pathsToThisNode\r\n\t\t\t// list. This is because of the use of a Queue, which loses the\r\n\t\t\t// memory of which nodes were already connected.\r\n\t\t\tif (!node.equals(otherNodeInGraph) && !this.startNode.equals(otherNodeInGraph)\r\n\t\t\t\t\t&& !graph.containsEdge(node, otherNodeInGraph)) {\r\n\r\n\t\t\t\t// Every saved path to this node is checked if any of these\r\n\t\t\t\t// produce a suitable effect set regarding the preconditions of\r\n\t\t\t\t// the current node.\r\n\t\t\t\tfor (WeightedPath<GraphNode, WeightedEdge> pathToListNode : node.pathsToThisNode) {\r\n\t\t\t\t\tif (areAllPreconditionsMet(otherNodeInGraph.preconditions, node.getEffectState(pathToListNode))) {\r\n\t\t\t\t\t\tconnected = true;\r\n\r\n\t\t\t\t\t\taddEgdeWithWeigth(graph, node, otherNodeInGraph, new WeightedEdge(),\r\n\t\t\t\t\t\t\t\tnode.action.generateCost(this.goapUnit));\r\n\r\n\t\t\t\t\t\totherNodeInGraph.addGraphPath(pathToListNode,\r\n\t\t\t\t\t\t\t\taddNodeToGraphPath(graph, pathToListNode, otherNodeInGraph));\r\n\r\n\t\t\t\t\t\tnodesToWorkOn.add(otherNodeInGraph);\r\n\r\n\t\t\t\t\t\t// break; // TODO: Possible Change: If enabled then only\r\n\t\t\t\t\t\t// one Path from the currently checked node is\r\n\t\t\t\t\t\t// transferred to another node. All other possible Paths\r\n\t\t\t\t\t\t// will not be considered and not checked.\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 connected;\r\n\t}", "public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }", "public boolean connectsVertex(V v);", "public boolean hasPath(Graph graph) {\n\t\tif (!isNonZeroDegreeVerticesConnected(graph)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// (2) number of odd vertices has to be between zero to two\n\t\tint vertices = graph.countVertices();\n\t\tint odd = 0;\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\t// counting number of odd vertices\n\t\t\tif (((graph.getNeighbours(i).length & 1) == 1)) {\n\t\t\t\todd++;\n\t\t\t}\n\t\t}\n\n\t\tif (odd <= 2) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\r\n void test_insert_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n }\r\n\r\n }", "private boolean hasPath(GraphNode origin, GraphNode destination) {\n if (origin.node.getName().equals(outputNode.getName()) || destination.node.getName().equals(inputNode.getName()))\n return false;\n\n Queue<GraphNode> queue = new LinkedList<GraphNode>();\n queue.offer(origin);\n\n while(!queue.isEmpty()) {\n GraphNode current = queue.poll();\n if (current == destination) {\n return true;\n }\n else {\n for (GraphEdge e : current.to) {\n queue.offer(e.to);\n }\n }\n }\n return false;\n }", "@Override\r\n\tpublic boolean containsMovieConnection(String actor1, String actor2)\r\n\t{\r\n\t\tActor act1 = new Actor(actor1);\r\n\t\tActor act2 = new Actor(actor2);\r\n\t\t\r\n\t\tif(graph.containsEdge(act1,act2 ))\r\n\t\t{\r\n\t\t\treturn true;\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected boolean hasConnection(int start, int end) {\n\t\tfor (Gene g : genes.values()) {\n\t\t\tif (g.start == start && g.end == end)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public final void connectIfNotFound(N n1, E edge, N n2) {\n if (!isConnected(n1, edge, n2)) {\n connect(n1, edge, n2);\n }\n }", "@Test \r\n void insert_two_vertexs_then_create_edge(){\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }", "@Override\n\tpublic boolean equals(Object other)\n\t{\n\t\tif (!(other instanceof Graph))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tGraph<N, ET> otherGraph = (Graph<N, ET>) other;\n\t\tList<N> otherNodeList = otherGraph.getNodeList();\n\t\tint thisNodeSize = nodeList.size();\n\t\tif (thisNodeSize != otherNodeList.size())\n\t\t{\n\t\t\t//\t\t\tSystem.err.println(\"Not equal node count\");\n\t\t\treturn false;\n\t\t}\n\t\t// (potentially wasteful, but defensive copy)\n\t\totherNodeList = new ArrayList<N>(otherNodeList);\n\t\tif (otherNodeList.retainAll(nodeList))\n\t\t{\n\t\t\t// Some nodes are not identical\n\t\t\t//\t\t\tSystem.err.println(\"Not equal node list\");\n\t\t\t//\t\t\tSystem.err.println(nodeList);\n\t\t\t//\t\t\tSystem.err.println(otherNodeList);\n\t\t\treturn false;\n\t\t}\n\t\t// Here, the node lists are identical...\n\t\tList<ET> otherEdgeList = otherGraph.getEdgeList();\n\t\tint thisEdgeSize = edgeList.size();\n\t\tif (thisEdgeSize != otherEdgeList.size())\n\t\t{\n\t\t\t//\t\t\tSystem.err.println(\"Not equal edge count\");\n\t\t\treturn false;\n\t\t}\n\t\t// (potentially wasteful, but defensive copy)\n\t\totherEdgeList = new ArrayList<ET>(otherEdgeList);\n\t\tif (otherEdgeList.retainAll(edgeList))\n\t\t{\n\t\t\t// Other Graph contains extra edges\n\t\t\t//\t\t\tSystem.err.println(\"not equal edge retain\");\n\t\t\t//\t\t\tSystem.err.println(edgeList);\n\t\t\t//\t\t\tSystem.err.println(otherEdgeList);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;", "@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }", "public abstract boolean addEdge(Node node1, Node node2, int weight);", "public boolean isDirected(Position ep) throws InvalidPositionException;", "public boolean isConnectedWith(Shapes shape){\n if(this.endShapes.length == 2){\n if(endShapes[0].equals(shape) || endShapes[1].equals(shape)){\n return true;\n }\n return false; \n }else{\n return false;\n }\n }", "private static boolean compareEdges(S2Point a0, S2Point a1, S2Point b0, S2Point b1) {\n if (a1.lessThan(a0)) {\n S2Point temp = a0;\n a0 = a1;\n a1 = temp;\n }\n if (b1.lessThan(b0)) {\n S2Point temp = b0;\n b0 = b1;\n b1 = temp;\n }\n return a0.lessThan(b0) || (a0.equalsPoint(b0) && b0.lessThan(b1));\n }", "@Test\r\n public void testAreAdjacent() {\r\n System.out.println(\"areAdjacent\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1, v2, edgeElement);\r\n\r\n Object result = instance.areAdjacent(v1, v2);\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n }", "public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }" ]
[ "0.73590183", "0.7291389", "0.6944598", "0.69328403", "0.6922876", "0.6902349", "0.6740398", "0.6709522", "0.66992974", "0.6686229", "0.6676074", "0.6656443", "0.6634948", "0.6580686", "0.65613794", "0.65441525", "0.6539624", "0.6525597", "0.6519768", "0.64835274", "0.6469383", "0.64532495", "0.644972", "0.64370763", "0.64266133", "0.6398767", "0.63928056", "0.6375407", "0.6374263", "0.6371095", "0.6348087", "0.6328329", "0.63113314", "0.63077116", "0.630646", "0.62973", "0.62709236", "0.62530136", "0.62463504", "0.62451994", "0.6233344", "0.6227972", "0.6222812", "0.6217931", "0.62082505", "0.61562943", "0.61315304", "0.61161196", "0.61042607", "0.6086923", "0.60818636", "0.6078707", "0.6062205", "0.6058942", "0.60572803", "0.60407734", "0.6036218", "0.6034139", "0.6033658", "0.6031477", "0.6020392", "0.6020392", "0.6016493", "0.6009583", "0.6005081", "0.599507", "0.5980903", "0.59790134", "0.59781164", "0.5970508", "0.59644365", "0.5939264", "0.593578", "0.59229034", "0.5916201", "0.5894593", "0.5892632", "0.589205", "0.5886459", "0.5883738", "0.58771026", "0.5872689", "0.58611596", "0.5858389", "0.5846322", "0.58132255", "0.581285", "0.5812036", "0.580418", "0.58028734", "0.57852894", "0.5777534", "0.5773396", "0.57531697", "0.5752846", "0.57512814", "0.57468", "0.57448524", "0.57375747", "0.5734878" ]
0.6985535
2
Checks whether two nodes in the graph are connected via a directed edge with the given value.
public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isConnected(N n1, E e, N n2);", "public boolean isConnectedTo(A e) {\n\t\n\t\tif (g == null) return false;\n\t\t\n\t\tfor (Object o: g.getEdges()) {\n\t\t\t\n\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().getValue().equals(e)) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isConnected(String node1, String node2) {\r\n\r\n Set<String> adjacent = map.get(node1);\r\n if (adjacent == null) {\r\n return false; // boolean method should return a value; if adjacent node is null then the method return false\r\n }\r\n return adjacent.contains(node2); // if there exist adjacent node then returns adjacency list contains node2 \r\n }", "public abstract boolean hasEdge(int from, int to);", "public static boolean connected(Graph grafo) {\r\n\t\tint numVertices = grafo.getVertexNumber();\r\n\t\tSet<Vertice> verticesVisitados = new HashSet<Vertice>(); // sem repeticoes\r\n\t\tfor (Aresta aresta : grafo.getArestas()) {\r\n\t\t\tverticesVisitados.add(aresta.getV1());\r\n\t\t\tverticesVisitados.add(aresta.getV2());\r\n\t\t}\r\n\r\n\t\treturn numVertices == verticesVisitados.size();\r\n\t}", "public boolean isConnectedTo(Node<A> n) {\n\t\t\n\t\tif (g == null) return false;\n\t\t\n\t\tif (g.contains(n)){\n\t\t\t\n\t\t\tfor (Object o: g.getEdges()) {\n\t\t\t\t\n\t\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}", "public abstract boolean isConnectedInDirection(N n1, N n2);", "public abstract boolean isConnected(N n1, N n2);", "boolean isConnected(int a, int b) {\n\t\tint nodea = getRoot(a); //logN\r\n\t\tint nodeb = getRoot(b); //logN\r\n\t\tSystem.out\r\n\t\t\t\t.println(a + \" and \" + b + \" CONNECTED?: \" + (nodea == nodeb));\r\n\t\treturn nodea == nodeb;\r\n\t}", "public boolean hasEdge(int node1, int node2)\n{\n\tNode s=(Node)this.getNodes().get(node1);\n return s.hasNi(node2);\n\t\n}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\r\n public boolean isConnected(V start, V destination) {\r\n return !shortestPath(start, destination).isEmpty();\r\n }", "public boolean containsEdge(V source, V target);", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean connectsVertex(V v);", "default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public static boolean verifyGraph(Graph<V, DefaultEdge> g)\n {\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n if (v.color == -1)\n {\n System.out.println(\"Did not color vertex \" + v.getID());\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n for (V neighbor : neighbors)\n {\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n return false;\n }\n if (!verifyColor(g, v))\n {\n System.out.println(\"check neighbors of \" + v.getID());\n List<V> neighbors = Graphs.neighborListOf(g, v);\n for (V neighbor : neighbors)\n {\n if (v.color == neighbor.color)\n {\n System.out.println(\"Vertex \" + v.getID() + \" color: \" + v.color);\n System.out.println(\"neighbor \" + neighbor.getID() + \" color: \" + neighbor.color);\n }\n }\n return false;\n }\n }\n return true;\n }", "public static void main(String[] args) {\n graph.addEdge(\"Mumbai\",\"Warangal\");\n graph.addEdge(\"Warangal\",\"Pennsylvania\");\n graph.addEdge(\"Pennsylvania\",\"California\");\n //graph.addEdge(\"Montevideo\",\"Jameka\");\n\n\n String sourceNode = \"Pennsylvania\";\n\n if(graph.isGraphConnected(sourceNode)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }", "public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }", "public boolean connected(int first, int second) {\n return find(first) == find(second);\n }", "public abstract boolean isUsing(Edge graphEdge);", "public boolean hasEdge(T beg, T end);", "private void checkConnection( SquareNode a , SquareNode b ) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tSquareEdge edgeA = a.edges[i];\n\t\t\tif( edgeA == null )\n\t\t\t\tcontinue;\n\n\t\t\tSquareNode common = edgeA.destination(a);\n\t\t\tint commonToA = edgeA.destinationSide(a);\n\t\t\tint commonToB = CircularIndex.addOffset(commonToA,1,4);\n\n\t\t\tSquareEdge edgeB = common.edges[commonToB];\n\t\t\tif( edgeB != null && edgeB.destination(common) == b ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tfail(\"Failed\");\n\t}", "@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean isEdge(Node node) {\n for (Node n: nodes){\n if(!node.equals(n)) {\n for(Edge e:n.getEdges()){\n if(e.getDestination().equals(node)) {\n return true;\n }\n }\n }\n }\n return false;\n }", "boolean canConnect(IAgriIrrigationNode other, Direction from);", "public boolean hasEdge(T begin, T end);", "public boolean isAdjacentTo(final Vertex other){\n\t\tboolean result = false;\n\t\tif(getNeighbours().contains(other))\n\t\t\tresult = true;\n\t\treturn result;\n\t}", "public boolean validateConnection(CellStorage from, CellStorage to) {\r\n\t\tHashMapConnectedNodes nodeFrom = null;\r\n\t\tHashMapConnectedNodes nodeTo = null;\r\n\t\tif (hshMConnectedNodes.size() == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor (int counter = 0; counter < hshMConnectedNodes.size(); counter++) {\r\n\t\t\tif (hshMConnectedNodes.get(counter).searchNode(from))\r\n\t\t\t\tnodeFrom = hshMConnectedNodes.get(counter);\r\n\t\t\tif (hshMConnectedNodes.get(counter).searchNode(to))\r\n\t\t\t\tnodeTo = hshMConnectedNodes.get(counter);\r\n\t\t}\r\n\t\tif (nodeFrom == null || nodeTo == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "public boolean connectsVertices(Collection<V> vs);", "public boolean isEdge(int source, int destination){\n return edges[source].contains(new Edge(source, destination));\n }", "public boolean isEdge (T vertex1, T vertex2){\n int i1 = vertexIndex(vertex1);\n int i2 = vertexIndex(vertex2);\n if (i1 != NOT_FOUND && i2 != NOT_FOUND && edges[i1][i2] > 0){\n return true;\n }\n return false;\n }", "public boolean hasEdge(Node k){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == k){\n return true;\n }\n }\n return false;\n }", "public boolean areAdjacent(Node u, Node v) throws GraphException\n\t{\n\t\tif (u.getName() >= nodeList.length || v.getName() >= nodeList.length ||\n\t\t\t\tnodeList[u.getName()] == null || nodeList[v.getName()] == null)\n\t\t\tthrow new GraphException(\"Node not found.\");\n\t\t\n\t\tif (adjMatrix[u.getName()][v.getName()] == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "@Override\r\n public boolean edgeExists(Vertex v1, Vertex v2) {\r\n return adjacencyList.get(v1).contains(v2); //checking if the list of adjacent vertices contains v2\r\n }", "public boolean isAdjacent(int from, int to) {\n//your code here\n// LinkedList<Edge> list = adjLists[from];\n// for (Edge a : list) {\n// if(a.from()==from&&a.to()==to){\n// return true;\n// }\n// };\n// return false;\n return pathExists(from, to);\n }", "public static <T> boolean routeBetween2NodesDFS(MyGraph<T> graph, MyNode<T> start, MyNode<T> end) {\n if (start == end) return true;\n\n return dfs(start, new Predicate<MyNode<T>>() {\n @Override\n public boolean test(MyNode<T> t) {\n return t == end;\n }\n });\n }", "@GuardedBy(\"sfg\")\n\tpublic boolean canGoTo(StateVertex source, StateVertex target) {\n\t\tsynchronized (sfg) {\n\t\t\treturn sfg.containsEdge(source, target) || sfg.containsEdge(target, source);\n\t\t}\n\t}", "protected boolean connects(R r1, R r2) {\n\t\t\treturn getPreviousOrSame(getLower(r1)).compareTo(getUpper(r2)) <= 0 ||\n\t\t\t\tgetPreviousOrSame(getLower(r2)).compareTo(getUpper(r1)) <= 0;\n\t\t}", "public boolean isEdge(int source, int dest) {\r\n return edges[source].contains(new Edge(source, dest));\r\n }", "public boolean hasEdge(String id1, String id2)\n\t{\n\t\treturn nodes.containsKey(id1) && getNode(id1).hasEdge(id2);\n\t}", "private boolean hasANeighbour(Graph<V, E> g, Set<V> set, V v)\n {\n return set.stream().anyMatch(s -> g.containsEdge(s, v));\n }", "public boolean hasEdge(K u, K v)\n {\n return adjMaps.get(u).containsKey(v);\n }", "public boolean hasEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean connected(Station station1, Station station2) {\n if (station1.id() >= links.length || station2.id() >= links.length) {\n return station1.id() == station2.id();\n }\n return links[station1.id()] == links[station2.id()];\n }", "public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }", "public boolean isAdjacent(String label1, String label2)\n\t{\n\t\tboolean found = false;\n\t\ttry {\n\t\t\tDSAGraphVertex temp, vx1 = getVertex(label1);\n\t\t\tDSALinkedList adjList = vx1.getAdjacent();\n\t\t\tIterator<DSAGraphVertex> itr = adjList.iterator(); // - Maybe needs to check instance?\n\t\t\tif(!adjList.isEmpty()) // if list is not empty\n\t\t\t{\n\t\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t\t{\n\t\t\t\t\ttemp = itr.next();\n\t\t\t\t\tif(temp.getLabel().equals(label2))\n\t\t\t\t\t{\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Handles exception thrown by getVertex()\n\t\t\tfound = false;\n\t\t}\n\t\treturn found;\n\t}", "public static <T> boolean routeBetween2NodesBFS(MyGraph<T> graph, MyNode<T> start, MyNode<T> end) {\n if (start == end) return true;\n LinkedList<MyNode<T>> queue = new LinkedList<>();\n queue.add(start);\n while (!queue.isEmpty()) {\n MyNode<T> u = queue.removeFirst();\n if (u != null) {\n for (MyNode<T> node : u.getAdjacent()) {\n if (node.getState() == State.Unvisited) {\n if (node == end) {\n return true;\n } else {\n node.setState(State.Visiting);\n queue.add(node);\n }\n }\n }\n\n }\n }\n return false;\n }", "public boolean addConnection(GraphNode nodeA, GraphNode nodeB){\n nodeA.addAdjacent(nodeB);\n nodeB.addAdjacent(nodeA);\n if(nodeA.getAdjacent().contains(nodeB) && nodeB.getAdjacent().contains(nodeA))\n return true;\n else\n return false;\n }", "protected boolean hasConnection(int start, int end) {\n\t\tfor (Gene g : genes.values()) {\n\t\t\tif (g.start == start && g.end == end)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasEdge(Node source, Node destination) {\n LinkedList<Edge> edges = source.getEdges();\n for (Edge edge : edges) {\n if (edge.getDestination() == destination) {\n return true;\n }\n }\n return false;\n }", "boolean isDirected();", "public boolean hasEdge (E vertex1, E vertex2) throws IllegalArgumentException\n {\n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n \n Node node = adjacencySequences[index1];\n boolean hasEdge = false;\n while (!hasEdge && node != null)\n {\n if (node.neighbourIndex == index2)\n hasEdge = true;\n else\n node = node.nextNode;\n }\n\n return hasEdge;\n }", "public abstract boolean getEdge(Point a, Point b);", "boolean containsEdge(V v, V w);", "@Test \r\n void create_edge_between_to_nonexisted_vertexes() {\r\n graph.addEdge(\"A\", \"B\");\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!adjacentA.contains(\"B\")) { \r\n fail();\r\n }\r\n if(adjacentB.contains(\"A\")) { \r\n fail();\r\n }\r\n }", "@Override\n public boolean hasEdge(V from, V to)\n {\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n if (!contains(from)){\n return false;\n }\n else{\n Iterator graphIterator = graph.entrySet().iterator();\n Map.Entry graphElement = (Map.Entry) graphIterator.next();\n V vert = (V) graphElement.getKey();\n while (graphIterator.hasNext() && vert != from){\n graphElement = (Map.Entry) graphIterator.next();\n vert = (V)graphElement.getKey();\n }\n\t ArrayList <V> edges = graph.get(vert);\n\t return edges.contains(to);\n\t }\n }", "public boolean equals(Object obj){\r\n\t\tDirectedEdge edge=(DirectedEdge)obj;\r\n\t\tif (source.equals(edge.getSouceNode() )&& \r\n\t\t\ttarget.equals(edge.getTargetNode()))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "private static boolean edgeConnectsTwoMachines(int rootOne, int rootTwo, Set<Integer> machines,\n\t\t\tSet<Integer> rootsLeadingToMachines) {\n\t\tboolean rootOne_leadsToMachine = rootsLeadingToMachines.contains(rootOne);\n\t\tboolean rootTwo_leadsToMachine = rootsLeadingToMachines.contains(rootTwo);\n\t\tboolean rootOne_isMachine = machines.contains(rootOne);\n\t\tboolean rootTwo_isMachine = machines.contains(rootTwo);\n\n\t\treturn (rootOne_leadsToMachine || rootOne_isMachine) && (rootTwo_leadsToMachine || rootTwo_isMachine);\n\t}", "public abstract boolean isUsing(Long graphNode);", "@Override\r\n\tpublic boolean containsMovieConnection(String actor1, String actor2)\r\n\t{\r\n\t\tActor act1 = new Actor(actor1);\r\n\t\tActor act2 = new Actor(actor2);\r\n\t\t\r\n\t\tif(graph.containsEdge(act1,act2 ))\r\n\t\t{\r\n\t\t\treturn true;\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean reachable(Vertex start, Vertex end){\n\t\tSet<Vertex> reach = this.post(start); \n\t\treturn reach.contains(end);\n\t}", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "public static <V> boolean isGraphAcyclic(Graph<V> graph) {\n V[] arrayValores = graph.getValuesAsArray();\n if (arrayValores.length > 1) { // Un grafo con solo un vertice no puede tener ciclos.\n Set<V> conjuntoRevisados = new LinkedListSet<>();\n return profPrimeroCiclos(graph, arrayValores[0], null, conjuntoRevisados);\n }\n return false;\n }", "public boolean isAdjacent(int from, int to) {\r\n LinkedList<Edge> testList = myAdjLists[from];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == to) {\r\n \t\treturn true;\r\n \t}\r\n \tcounter++;\r\n }\r\n return false;\r\n }", "private Boolean isReachable(String C1, String C2) {\n \tif (adjacencyList.get(C2) == null) {\n \t\treturn false;\n \t}\n \tfor (String child : adjacencyList.get(C2)) {\n \t\tif (child.equals(C1)) {\n \t\t\treturn true;\n \t\t} else if ( isReachable(C1, child ) ) {\n \t\t\treturn true;\n \t\t}\n \t}\n \treturn false;\n }", "public boolean isAdjacent(int from, int to) {\n //your code here\n \tfor (Edge e : myAdjLists[from]) {\n \t\tif (e.to() == to) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }", "@Override\n public boolean isAdjacent(E vertex1, E vertex2) {\n if (vertex1 != null\n && vertex2 != null\n && vertex1 != vertex2\n && dictionary.containsKey(vertex1)\n && dictionary.containsKey(vertex2)) {\n return dictionary.get(vertex1).contains(vertex2) && dictionary.get(vertex2).contains(vertex1);\n } else {\n return false;\n }\n }", "private boolean connected(DepthFirstSearch dfs, Graph G) {\n return dfs.count() == G.V();\r\n }", "@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }", "public void testContainsEdge() {\n System.out.println(\"containsEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n } else {\n Assert.assertTrue(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }\n\n }", "public boolean containsEdge(E edge);", "@Override\r\n public boolean equals(Object o) {\r\n GraphNode n = (GraphNode) o;\r\n if (n != null && n.getX() == getX() && n.getY() == getY())\r\n return true;\r\n return false;\r\n }", "private boolean hasANonneighbourInX(Graph<V, E> g, V v, Set<V> X)\n {\n return X.stream().anyMatch(x -> !g.containsEdge(v, x));\n }", "public int checkEdgeDirection(Object src, Object dest)\n\t{\t\t\n\t\tif(this.map.get(src).contains(dest) && !this.map.get(dest).contains(src))\n\t\t\treturn 1;\n\t\telse if(this.map.get(src).contains(dest) && this.map.get(dest).contains(src))\n\t\t\treturn 2;\n\t\treturn 0;\n\t}", "public boolean isConnected() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\t\tint count = 0;\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (count > 1)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }", "protected boolean tryToConnectNode(IWeightedGraph<GraphNode, WeightedEdge> graph, GraphNode node,\r\n\t\t\tQueue<GraphNode> nodesToWorkOn) {\r\n\t\tboolean connected = false;\r\n\r\n\t\tfor (GraphNode otherNodeInGraph : graph.getVertices()) {\r\n\t\t\t// End nodes can not have a edge towards another node and the target\r\n\t\t\t// node must not be itself. Also there must not already be an edge\r\n\t\t\t// in the graph.\r\n\t\t\t// && !graph.containsEdge(node, nodeInGraph) has to be added\r\n\t\t\t// or loops occur which lead to a crash. This leads to the case\r\n\t\t\t// where no\r\n\t\t\t// alternative routes are being stored inside the pathsToThisNode\r\n\t\t\t// list. This is because of the use of a Queue, which loses the\r\n\t\t\t// memory of which nodes were already connected.\r\n\t\t\tif (!node.equals(otherNodeInGraph) && !this.startNode.equals(otherNodeInGraph)\r\n\t\t\t\t\t&& !graph.containsEdge(node, otherNodeInGraph)) {\r\n\r\n\t\t\t\t// Every saved path to this node is checked if any of these\r\n\t\t\t\t// produce a suitable effect set regarding the preconditions of\r\n\t\t\t\t// the current node.\r\n\t\t\t\tfor (WeightedPath<GraphNode, WeightedEdge> pathToListNode : node.pathsToThisNode) {\r\n\t\t\t\t\tif (areAllPreconditionsMet(otherNodeInGraph.preconditions, node.getEffectState(pathToListNode))) {\r\n\t\t\t\t\t\tconnected = true;\r\n\r\n\t\t\t\t\t\taddEgdeWithWeigth(graph, node, otherNodeInGraph, new WeightedEdge(),\r\n\t\t\t\t\t\t\t\tnode.action.generateCost(this.goapUnit));\r\n\r\n\t\t\t\t\t\totherNodeInGraph.addGraphPath(pathToListNode,\r\n\t\t\t\t\t\t\t\taddNodeToGraphPath(graph, pathToListNode, otherNodeInGraph));\r\n\r\n\t\t\t\t\t\tnodesToWorkOn.add(otherNodeInGraph);\r\n\r\n\t\t\t\t\t\t// break; // TODO: Possible Change: If enabled then only\r\n\t\t\t\t\t\t// one Path from the currently checked node is\r\n\t\t\t\t\t\t// transferred to another node. All other possible Paths\r\n\t\t\t\t\t\t// will not be considered and not checked.\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 connected;\r\n\t}", "public boolean isConnectedWith(Shapes shape){\n if(this.endShapes.length == 2){\n if(endShapes[0].equals(shape) || endShapes[1].equals(shape)){\n return true;\n }\n return false; \n }else{\n return false;\n }\n }", "public boolean containsEdge(V head, V tail);", "@Override\n\t\tpublic boolean equals(Object o){\n\t\t\tEdge other = (Edge) o;\n\t\t\tif((other.src.equals(this.src) && other.dest.equals(other.dest))\n\t\t\t\t\t|| (other.dest.equals(this.src) && other.src.equals(this.dest))){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public static boolean cycleInGraph(int[][] edges) {\n int numberOfNodes = edges.length;\n int[] colors = new int[numberOfNodes]; // By default, 0 (WHITE)\n\n for (int i = 0; i < numberOfNodes; i++) {\n\n if (colors[i] != WHITE) // If already visited/finished.\n continue;\n\n boolean isCycle = traverseAndMarkColor(edges, i, colors);\n\n if (isCycle)\n return true;\n }\n return false;\n }", "@Test\r\n public void testAreAdjacent() {\r\n System.out.println(\"areAdjacent\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1, v2, edgeElement);\r\n\r\n Object result = instance.areAdjacent(v1, v2);\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n }", "public boolean hasEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean connected(Path p1,Path p2){\n\t\t// Checks if p1 and p2 are connected\n\t\tif(p1.getExit()==p2.getPos()&&p1.getPos()==p2.getEntry())\n\t\t\t// If the exit of the first tile is equal to the position of the second tile\n\t\t\t// AND if the entrance of the second tile is equal to the position of the first tile\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\t\n\t}", "public boolean isDirected();", "public boolean isDirected();", "@Override\r\n\tpublic boolean isSymmetricLink(Entity source, Entity target)\r\n\t{\r\n\t\treturn (directedGraph.findEdge(source, target) != null)\r\n\t\t\t\t&& (directedGraph.findEdge(target, source) != null);\r\n\t}", "public boolean hasEdge(String from, String to) {\n Vertex v1 = mVertices.get(from);\n Vertex v2 = mVertices.get(to);\n if (v1 == null || v2 == null) return false;\n return mAdjList.get(v1).contains(v2);\n }", "public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;", "@Test\r\n void test_insert_same_edge_twice() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"B\");\r\n if (graph.size() != 1) {\r\n fail();\r\n }\r\n if (!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")) {\r\n fail();\r\n }\r\n\r\n }", "@Test\n void test08_getAllAdjacentVertices() {\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"a\", \"c\"); // add two edges\n\n List<String> check = new ArrayList<>();\n check.add(\"b\");\n check.add(\"c\"); // create mock up adjacent list\n\n if (!check.equals(graph.getAdjacentVerticesOf(\"a\"))) { // checks if both are same\n fail(\"graph didn't record adjacent vertices correctly\");\n }\n }", "@Test\n public void notConnectedDueToRestrictions() {\n int sourceNorth = graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10).getEdge();\n int sourceSouth = graph.edge(0, 3).setDistance(2).set(speedEnc, 10, 10).getEdge();\n int targetNorth = graph.edge(1, 2).setDistance(3).set(speedEnc, 10, 10).getEdge();\n int targetSouth = graph.edge(3, 2).setDistance(4).set(speedEnc, 10, 10).getEdge();\n\n assertPath(calcPath(0, 2, sourceNorth, targetNorth), 0.4, 4, 400, nodes(0, 1, 2));\n assertNotFound(calcPath(0, 2, sourceNorth, targetSouth));\n assertNotFound(calcPath(0, 2, sourceSouth, targetNorth));\n assertPath(calcPath(0, 2, sourceSouth, targetSouth), 0.6, 6, 600, nodes(0, 3, 2));\n }", "private boolean isReachable(String current, String destination) {\n if (current.equals(destination)) {\n return true;\n } else if (visited.contains(current) || graph.get(current) == null) {\n return false;\n }\n\n // similar to dfs\n visited.add(current);\n for (Object vertex : graph.get(current)) {\n if (isReachable((String) vertex, destination))\n return true;\n }\n\n return false;\n }", "public boolean isEdge(int i, int j) {\n\t\n\treturn\n\t\t((Linkable)Network.node[i].getProtocol(protocolID)\n\t\t).contains(Network.node[j]) &&\n\t\tNetwork.node[j].isUp() &&\n\t\tNetwork.node[i].isUp();\n}", "private static boolean isCyclic(Node<Integer> graph) {\r\n\t\tif (graph == null || graph.adjNodes.size() == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tStack<Node<Integer>> recursiveStack = new Stack<Node<Integer>>();\r\n\t\trecursiveStack.add(graph);\r\n\t\tgraph.isVisited = true;\r\n\r\n\t\twhile (!recursiveStack.isEmpty()) {\r\n\t\t\tNode<Integer> temp = recursiveStack.pop();\r\n\r\n\t\t\tfor (int i = 0; i < temp.adjNodes.size(); i++) {\r\n\t\t\t\tif (temp.adjNodes.get(i).isVisited) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\trecursiveStack.push(temp.adjNodes.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isInEdge(int width, int height, Position position);", "public boolean isEdge(int s,int d) throws Exception\r\n\t{\r\n\t\tif(s>=0&&s<n&&d>=0&&d<n)\r\n\t\t{\r\n\t\t\tLinkedList l=g.get(s);\r\n\t\t\tNode temp=l.getHead();\r\n\t\t\twhile(temp!=null)\r\n\t\t\t{\r\n\t\t\t\tif(temp.getData()==g.get(d).getHead().getData())\r\n\t\t\t\t{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ttemp=temp.getNext();\t\t\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new Exception(\"Vertex is not present\");\r\n\t}" ]
[ "0.6582158", "0.65211505", "0.6508783", "0.6506281", "0.64694184", "0.6441131", "0.6437776", "0.6373637", "0.63668007", "0.636585", "0.6314122", "0.62654346", "0.62174463", "0.62046766", "0.6189634", "0.61831003", "0.618143", "0.61486053", "0.6139392", "0.6132998", "0.6120272", "0.61136", "0.60706776", "0.6063669", "0.60606426", "0.6055099", "0.59837824", "0.5974863", "0.5966687", "0.5962182", "0.5949064", "0.58867675", "0.58700913", "0.5867001", "0.58460546", "0.5841738", "0.5837995", "0.58378994", "0.58327675", "0.58315486", "0.58058417", "0.5794589", "0.5793221", "0.57911587", "0.579011", "0.57853866", "0.5785371", "0.5749776", "0.5749071", "0.57488567", "0.5718881", "0.57160175", "0.57157844", "0.5708255", "0.5660015", "0.5636979", "0.56306064", "0.5630291", "0.562777", "0.56235313", "0.5622704", "0.5618482", "0.56097215", "0.5608605", "0.5603797", "0.5602614", "0.5593013", "0.5563184", "0.55543494", "0.5548801", "0.55411154", "0.5538342", "0.5526872", "0.55219203", "0.55196923", "0.55143976", "0.5510444", "0.5508995", "0.5505946", "0.54866505", "0.54607135", "0.5457265", "0.5456389", "0.54506725", "0.5446069", "0.5445115", "0.5441863", "0.5437552", "0.5437552", "0.54350555", "0.54249823", "0.5424416", "0.54155517", "0.5404197", "0.5400039", "0.5397134", "0.53828275", "0.53783375", "0.5374942", "0.5368389" ]
0.7669619
0
A generic directed graph node.
public static interface DiGraphNode<N, E> extends GraphNode<N, E> { public List<? extends DiGraphEdge<N, E>> getOutEdges(); public List<? extends DiGraphEdge<N, E>> getInEdges(); /** Returns whether a priority has been set. */ boolean hasPriority(); /** * Returns a nonnegative integer priority which can be used to order nodes. * * <p>Throws if a priority has not been set. */ int getPriority(); /** Sets a node priority, must be non-negative. */ void setPriority(int priority); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Node getNode();", "public abstract GraphNode<N, E> createNode(N value);", "public interface DirectedGraph {\n\n /**\n * Set a graph label\n * @param label a graph label\n */\n void setGraphLabel(String label);\n\n /**\n * @return the graph label\n */\n String getGraphLabel();\n\n /**\n * Add a node in graph\n * @param node\n * @throws IllegalArgumentException if node is negative\n */\n void addNode(int node);\n\n /**\n * Associating metadata to node\n * @param node the node id\n * @param key the metadata key\n * @param value the metadata value\n */\n void addNodeMetadata(int node, String key, String value);\n\n /**\n * Get the value of the metadata associated with the given node\n * @param node the node to get metadata for\n * @param key the metadata key\n * @return the value or null if not found\n */\n String getNodeMetadataValue(int node, String key);\n\n /**\n * @return the node given the label or -1 if not found\n */\n int getNodeFromMetadata(String metadata);\n\n /**\n * Add an edge in graph from tail to head and return its index\n * @param tail predecessor node\n * @param head successor node\n * @return the edge id or -1 if already exists\n */\n int addEdge(int tail, int head);\n\n /**\n * Set an edge label\n * @param edge a edge id\n * @param label a node label\n */\n void setEdgeLabel(int edge, String label);\n\n /**\n * @return the edge label\n */\n String getEdgeLabel(int edge);\n\n /**\n * @return an array of graph nodes\n */\n int[] getNodes();\n\n /**\n * @return an array of graph edges\n */\n int[] getEdges();\n\n /**\n * @return the edge id from end points or -1 if not found\n */\n int getEdge(int tail, int head);\n\n /**\n * Get the incoming and outcoming edges for the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getEdgesIncidentTo(int... nodes);\n\n /**\n * Get the incoming edges to the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getInEdges(int... nodes);\n\n /**\n * Get the outcoming edges from the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getOutEdges(int... nodes);\n\n /**\n * @return the tail node of the given edge or -1 if not found\n */\n int getTailNode(int edge);\n\n /**\n * @return the head node of the given edge or -1 if not found\n */\n int getHeadNode(int edge);\n\n /**\n * @return true if node belongs to graph else false\n */\n boolean containsNode(int node);\n\n /**\n * @return true if edge belongs to graph else false\n */\n boolean containsEdge(int edge);\n\n /**\n * @return true if tail -> head edge belongs to graph else false\n */\n boolean containsEdge(int tail, int head);\n\n /**\n * @return ancestors of the given node\n */\n int[] getAncestors(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node, int maxDepth);\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n boolean isAncestorOf(int queryAncestor, int queryDescendant);\n\n /**\n * @return the predecessors of the given node\n */\n int[] getPredecessors(int node);\n\n /**\n * @return the successors of the given node\n */\n int[] getSuccessors(int node);\n\n /**\n * @return the number of head ends adjacent to the given node\n */\n int getInDegree(int node);\n\n /**\n * @return the number of tail ends adjacent to the given node\n */\n int getOutDegree(int node);\n\n /**\n * @return the sources (indegree = 0) of the graph\n */\n int[] getSources();\n\n /**\n * @return the sinks (outdegree = 0) of the graph\n */\n int[] getSinks();\n\n /**\n * @return the subgraph of this graph composed of given nodes\n */\n DirectedGraph calcSubgraph(int... nodes);\n\n /**\n * @return the total number of graph nodes\n */\n default int countNodes() {\n\n return getNodes().length;\n }\n\n /**\n * @return the total number of graph edges\n */\n default int countEdges() {\n\n return getEdges().length;\n }\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n default boolean isDescendantOf(int queryDescendant, int queryAncestor) {\n\n return isAncestorOf(queryAncestor, queryDescendant);\n }\n\n default boolean isSource(int node) {\n return getInDegree(node) == 0 && getOutDegree(node) > 0;\n }\n\n default boolean isSink(int node) {\n return getInDegree(node) > 0 && getOutDegree(node) == 0;\n }\n\n /**\n * The height of a rooted tree is the length of the longest downward path to a leaf from the root.\n *\n * @return the longest path from the root or -1 if it is not a tree\n */\n default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }\n\n class NotATreeException extends Exception {\n\n public NotATreeException() {\n\n super(\"not a tree\");\n }\n }\n\n class NotATreeMultipleRootsException extends NotATreeException {\n\n private final int[] roots;\n\n public NotATreeMultipleRootsException(int[] roots) {\n\n super();\n this.roots = roots;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", roots=\" + Arrays.toString(this.roots);\n }\n }\n\n class CycleDetectedException extends NotATreeException {\n\n private final TIntList path;\n\n public CycleDetectedException(TIntList path) {\n\n super();\n\n this.path = path;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", path=\" + this.path;\n }\n }\n}", "public GraphNode(D data) {\n successors = new ArrayList<>();\n this.data = data;\n }", "Node getNode();", "public Node getNode();", "protected GraphNode() {\n }", "protected GraphNode() {\n }", "Node(Graph graph, String id, Object data) {\n\t\t// the node data can be null\n\t\tValidate.notNull(graph, \"The given graph is null\");\n\t\tValidate.notNull(id, \"The given node id is null\");\n\n\t\tthis.graph = graph;\n\t\tthis.id = id;\n\t\tthis.data = data;\n\t}", "public static interface DiGraphEdge<N, E> extends GraphEdge<N, E> {\n\n public DiGraphNode<N, E> getSource();\n\n public DiGraphNode<N, E> getDestination();\n\n }", "public Node(D d){\n\t\tdata = d;\n\t\tnext = null;\n\t}", "@Override\n public boolean link(T dataX, T dataY) throws NodeNotFoundException { return link(dataX, dataY, 1.0); }", "public interface Graph<V> {\n\t/** Return the number of vertices in the graph */\n\tpublic int getSize();\n\n\t/** Return the vertices in the graph */\n\tpublic java.util.List<V> getVertices();\n\n\t/** Return the object for the specified vertex index */\n\tpublic V getVertex(int index);\n\n\t/** Return the index for the specified vertex object */\n\tpublic int getIndex(V v);\n\n\t/** Return the neighbors of vertex with the specified index */\n\tpublic java.util.List<Integer> getNeighbors(int index);\n\n\t/** Return the degree for a specified vertex */\n\tpublic int getDegree(int v);\n\n\t/** Return the adjacency matrix */\n\tpublic int[][] getAdjacencyMatrix();\n\n\t/** Print the adjacency matrix */\n\tpublic void printAdjacencyMatrix();\n\n\t/** Print the edges */\n\tpublic void printEdges();\n\n\t/** Obtain a depth-first search tree */\n\tpublic AbstractGraph<V>.Tree dfs(int v);\n\n\t/** Obtain a breadth-first search tree */\n\tpublic AbstractGraph<V>.Tree bfs(int v);\n\n\t/**\n\t * Return a Hamiltonian path from the specified vertex Return null if the\n\t * graph does not contain a Hamiltonian path\n\t */\n\tpublic java.util.List<Integer> getHamiltonianPath(V vertex);\n\n\t/**\n\t * Return a Hamiltonian path from the specified vertex label Return null if\n\t * the graph does not contain a Hamiltonian path\n\t */\n\tpublic java.util.List<Integer> getHamiltonianPath(int inexe);\n}", "public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}", "@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}", "public Node(D d, Node<D> n){\n\t\tdata = d;\n\t\tnext = n;\n\t}", "public interface Graph<V> {\n /**\n * F??gt neuen Knoten zum Graph dazu.\n * @param v Knoten\n * @return true, falls Knoten noch nicht vorhanden war.\n */\n boolean addVertex(V v);\n\n /**\n * F??gt neue Kante (mit Gewicht 1) zum Graph dazu.\n * @param v Startknoten\n * @param w Zielknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist oder Knoten identisch sind.\n * @return true, falls Kante noch nicht vorhanden war.\n */\n boolean addEdge(V v, V w);\n\n /**\n * F??gt neue Kante mit Gewicht weight zum Graph dazu.\n * @param v Startknoten\n * @param w Zielknoten\n * @param weight Gewicht\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist oder Knoten identisch sind.\n * @return true, falls Kante noch nicht vorhanden war.\n */\n boolean addEdge(V v, V w, double weight);\n\n /**\n * Pr??ft ob Knoten v im Graph vorhanden ist.\n * @param v Knoten\n * @return true, falls Knoten vorhanden ist.\n */\n boolean containsVertex(V v);\n\n /**\n * Pr??ft ob Kante im Graph vorhanden ist.\n * @param v Startknoten\n * @param w Endknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist.\n * @return true, falls Kante vorhanden ist.\n */\n boolean containsEdge(V v, V w);\n \n /**\n * Liefert Gewicht der Kante zur??ck.\n * @param v Startknoten\n * @param w Endknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist.\n * @return Gewicht, falls Kante existiert, sonst 0.\n */\n double getWeight(V v, V w);\n\n /**\n * Liefert Anzahl der Knoten im Graph zur??ck.\n * @return Knotenzahl.\n */\n int getNumberOfVertexes();\n\n /**\n * Liefert Anzahl der Kanten im Graph zur??ck.\n * @return Kantenzahl.\n */\n int getNumberOfEdges();\n\n /**\n * Liefert Liste aller Knoten im Graph zur??ck.\n * @return Knotenliste\n */\n List<V> getVertexList();\n \n /**\n * Liefert Liste aller Kanten im Graph zur??ck.\n * @return Kantenliste.\n */\n List<Edge<V>> getEdgeList();\n\n /**\n * Liefert eine Liste aller adjazenter Knoten zu v.\n * Genauer: g.getAdjacentVertexList(v) liefert eine Liste aller Knoten w,\n * wobei (v, w) eine Kante des Graphen g ist.\n * @param v Knoten\n * @throws IllegalArgumentException falls Knoten v\n * nicht im Graph vorhanden ist.\n * @return Knotenliste\n */\n List<V> getAdjacentVertexList(V v);\n\n /**\n * Liefert eine Liste aller inzidenten Kanten.\n * Genauer: g.getIncidentEdgeList(v) liefert\n * eine Liste aller Kanten im Graphen g mit v als Startknoten.\n * @param v Knoten\n * @throws IllegalArgumentException falls Knoten v\n * nicht im Graph vorhanden ist.\n * @return Kantenliste\n */\n List<Edge<V>> getIncidentEdgeList(V v);\n}", "TNode createTNode();", "abstract Shape nodeShape(String node, Graphics2D g2d);", "interface Node<K, V> {\n /** Returns the key of current node */\n K getKey();\n /** Returns the value of current node */\n V getValue();\n }", "public Node(T data) {this.data = data;}", "public interface DiGraph< VKeyT, VDataT, EDataT > {\n\n // Methods to build the graph\n\n /**\n * Add a vertex to the graph. If the graph already contains a vertex\n * with the given key the old data will be replaced by the new data.\n *\n * @param key the key that identifies the vertex.\n * @param data the data to be associated with the vertex.\n */\n\n public void addVertex( VKeyT key, VDataT data );\n\n /**\n * Add an edge to the graph starting at the vertex identified by\n * fromKey and ending at the vertex identified by toKey. If either of\n * the vertices do not exist a NoSuchVertexException will be thrown.\n * If the graph already contains this edge, the old data will be replaced\n * by the new data.\n *\n * @param fromKey the key associated with the starting vertex of the edge.\n * @param toKey the key associated with the ending vertex of the edge.\n * @param data the data to be associated with the edge.\n *\n * @exception NoSuchVertexException if either end point is not a\n * key associated with a vertex in the graph.\n */\n\n public void addEdge( VKeyT fromKey, VKeyT toKey, EDataT data )\n throws NoSuchVertexException;\n\n // Operations on edges\n\n /**\n * Return true if the edge defined by the given vertices is an\n * edge in the graph. False will be returned if the edge is not\n * in the graph. A NoSuchVertexException will be thrown if either\n * of the vertices do not exist.\n *\n * @param fromKey the key of the vetex where the edge starts.\n * @param toKey the key of the vertex where the edge ends.\n *\n * @return true if the edge defined by the given vertices is in\n * the graph and false otherwise.\n *\n * @exception NoSuchVertexException if either end point is not a\n * key associated with a vertex in the graph.\n */\n\n public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;\n\n /**\n * Return a reference to the data associated with the edge that is \n * defined by the given end points. Null will be returned if the \n * edge is not in the graph. Note that a return value of null does\n * not necessarily imply that the edge is not in the graph. It may\n * be the case that the data associated with the edge is null. A \n * NoSuchVertexException will be thrown if either of the end points \n * do not exist.\n *\n * @param fromKey the key of the vertex where the edge starts.\n * @param toKey the key of the vertex where the edge ends.\n *\n * @return a reference to the data associated with the edge defined by\n * the specified end points. Null is returned if the edge \n * is not in the graph.\n *\n * @exception NoSuchVertexException if either end point is not a\n * key associated with a vertex in the graph.\n */\n\n public EDataT getEdgeData( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;\n\n // Operations on vertices\n\n /**\n * Returns true if the graph contains a vertex with the associated\n * key.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return true if the key is associated with a vertex in the graph\n * and false otherwise.\n */\n\n public boolean isVertex( VKeyT key );\n\n /**\n * Return a reference to the data associated with the vertex \n * identified by the key. A NoSuchVertexException will be thrown\n * if the key is not associated with a vertex in the graph.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return the data associated with the vertex that is identifed by the\n * key.\n *\n * @exception NoSuchVertexException if the key is not associated\n * with a vertex in the graph.\n */\n\n public VDataT getVertexData( VKeyT key ) throws NoSuchVertexException;\n\n /**\n * Returns a count of the number of vertices in the graph.\n *\n * @return the count of the number of vertices in this graph\n */\n\n public int numVertices();\n\n /**\n * Return the in degree of the vertex that is associated with the\n * given key. Negative 1 is returned if the vertex cannot be found.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return the in degree of the vertex associated with the key or\n * -1 if the vertex is not in the graph.\n */\n\n public int inDegree( VKeyT key );\n\n /**\n * Return the out degree of the vertex that is associated with the\n * given key. Negative 1 is returned if the vertex cannot be found.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return the out degree of the vertex associated with the key or\n * -1 if the vertex is not in the graph.\n */\n\n public int outDegree( VKeyT key );\n\n /**\n * Returns a collection containing the data associated with the\n * neighbors of the vertex identified by the specified key.\n * The collection will be empty if there are no neighbors. A\n * NoSuchVertexException will be thrown if the key is not associated\n * with a vertex in the graph.\n *\n * @param key the key associated with the vertex whose neighbors we\n * wish to obtain.\n *\n * @return a collection containing the data associated with the neighbors\n * of the vertex with the given key. The collection will be\n * empty if the vertex does not have any neighbors.\n *\n * @exception NoSuchVertexException if the key is not associated\n * with a vertex in the graph.\n */\n\n public Collection< VDataT > neighborData( VKeyT key )\n throws NoSuchVertexException;\n\n /**\n * Returns a collection containing the keys associated with the\n * neighbors of the vertex identified by the specified key.\n * The collection will be empty if there are no neighbors. A\n * NoSuchVertexException will be thrown if the key is not associated\n * with a vertex in the graph.\n *\n * @param key the key associated with the vertex whose neighbors we\n * wish to obtain.\n *\n * @return a collection containing the keys associated with the neighbors\n * of the vertex with the given key. The collection will be\n * empty if the vertex does not have any neighbors.\n *\n * @exception NoSuchVertexException if the key is not associated with\n * a vertex in the graph.\n */\n\n public Collection< VKeyT > neighborKeys( VKeyT key )\n throws NoSuchVertexException;\n\n // Utility\n\n /**\n * Returns a collection containing the data associated with all of\n * the vertices in the graph.\n *\n * @return a collection containing the data associated with the\n * vertices in the graph.\n */\n\n public Collection< VDataT > vertexData();\n\n /**\n * Returns a collection containing the keys associated with all of\n * the vertices in the graph.\n *\n * @return a collection containing the keys associated with the\n * vertices in the graph.\n */\n\n public Collection< VKeyT > vertexKeys();\n\n /**\n * Return a collection containing all of the data associated with the\n * edges in the graph.\n *\n * @return a collection containing the data associated with the edges\n * in this graph.\n */\n \n public Collection< EDataT > edgeData();\n\n /**\n * Remove all vertices and edges from the graph.\n */\n\n public void clear();\n\n}", "public Node(){}", "public void nodeAdded(GraphEvent e);", "public interface IDirectedAcyclicGraph<T> extends Serializable {\n\n /**\n * Adds an edge to the graph.\n *\n * @param from the starting point.\n * @param to the ending point.\n * @return true if the edge was actually added (i.e. not present and didn't\n * create a cycle)\n * @throws NullPointerException if from or to is null\n */\n boolean add(T from, T to) throws NullPointerException;\n\n /**\n * Returns all the nodes that can be reached following the directed edges\n * starting from the selected node. It is guaranteed that the elements are\n * partially ordered by increasing distance from the selected node. If the\n * starting point is not a node in the graph, an empty iterable is returned.\n *\n * @param start the starting point.\n * @return an iterable with all the nodes that can be reached from the\n * starting node.\n * @throws NullPointerException if start is null.\n */\n Iterable<T> followNode(T start) throws NullPointerException;\n\n /**\n * Returns the selected node, followed by all the nodes that can be reached\n * following the directed edges starting from the selected node. It is\n * guaranteed that the elements are partially ordered by increasing distance\n * from the selected node. If the starting point is not a node in the graph,\n * an iterable containing only the starting node is returned.\n *\n * @param start the starting point.\n * @return an iterable which starts with the selected node and is followed\n * by all the connected nodes.\n * @throws NullPointerException if start is null.\n */\n Iterable<T> followNodeAndSelef(T start) throws NullPointerException;\n\n}", "public AbstractGraphExtended(int numV, boolean directed) {\r\n super(numV, directed);\r\n }", "public AbstractNode() {\n this.incomingEdges = new ArrayList<E>();\n this.outgoingEdges = new ArrayList<E>();\n }", "public interface Node extends TreeComponent {\n /**\n * The types of decision tree nodes available.\n */\n enum NodeType {\n Internal,\n Leaf\n }\n\n /**\n * Gets the type of this node.\n * @return The type of node.\n */\n NodeType getType();\n\n void print();\n\n String getClassLabel(DataTuple tuple);\n}", "protected SceneGraphObject createNode() {\n\tthrow new SGIORuntimeException(\"createNode() not implemented in class \"+this.getClass().getName());\n }", "public NetworkNode(String id, String title, String label, String name, String type) {\n super();\n this.id = id;\n this.title = title;\n this.label = label;\n this.name = name;\n this.group = type;\n this.type = type;\n }", "public interface GraphADT<T>\r\n{\r\n\tpublic void initializeGraph();\r\n\r\n\tpublic boolean isEmptyGraph();\r\n\r\n\tpublic boolean isFullGraph();\r\n\r\n\tpublic void createGraph(T newItem) throws StackOverflowException;\r\n\r\n\tpublic T print() throws StackUnderflowException;\r\n\r\n\tpublic void remove() throws StackUnderflowException;\r\n\r\n}", "public interface GNode{\n\n\tpublic String getName();\n\tpublic GNode[] getChildren();\n\tpublic ArrayList<GNode> walkGraph(GNode parent);\n\tpublic ArrayList<ArrayList<GNode>> paths(GNode parent);\n\n}", "public DSAGraphNode(String inLabel, E inValue)\n {\n label = inLabel;\n value = inValue;\n links = new DSALinkedList<DSAGraphNode<E>>();\n visited = false;\n edgeList = new DSALinkedList<DSAGraphEdge<E>>();\n distanceFromSource = Double.MAX_VALUE;\n previous = null;\n }", "public interface BinaryNode<T> { }", "public String addNode(PlainGraph graph, String nodeName, String label) {\n Map<String, PlainNode> nodeMap = graphNodeMap.get(graph);\n if (!nodeMap.containsKey(nodeName)) {\n PlainNode node = graph.addNode();\n\n // if a label is given add it as an edge\n if (label != null) {\n if (!label.contains(\":\")) {\n // if the label does not contain \":\" then 'type:' should be added\n label = String.format(\"%s:%s\", TYPE, label);\n }\n graph.addEdge(node, label, node);\n }\n\n nodeMap.put(nodeName, node);\n }\n return nodeName;\n }", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public interface Node {\n public int arityOfOperation();\n public String getText(int depth) throws CalculationException;\n public double getResult() throws CalculationException;\n public boolean isReachable(int depth);\n public List<Node> getAdjacentNodes();\n public String getTitle();\n public void setDepth(int depth);\n}", "public interface Graph\n{\n int getNumV();\n boolean isDirected();\n void insert(Edge edge);\n boolean isEdge(int source, int dest);\n Edge getEdge(int source, int dest);\n Iterator<Edge> edgeIterator(int source);\n}", "public T caseGraphicalNode(GraphicalNode object) {\n\t\treturn null;\n\t}", "public Node(Edge edge) {\n this.edge = edge;\n }", "public AStarNode(Node node)\n \t{\n \t\tthis.node = node;\n \t}", "public VISNode() {\n this.model = new VISNodeModel();\n }", "Node(T data)\n\t{\n\t\tthis.data=data;\n\t\tthis.next=null;\n\t}", "Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}", "public DNode(String s) {\n\t\tString[] parts = s.split(\" @ \");\n\t\tString[] params = parts[0].split(\", \");\n\t\tthis.key = Integer.parseInt(params[0]);\n\t\tthis.location = new Point3D(params[1]);\n\t\tthis.weight = Double.parseDouble(params[2]);\n\t\tthis.info = params[3];\n\t\tthis.tag = Integer.parseInt(params[4]);\n\n\t\tif (parts.length > 1) {\n\t\t\tString[] edges = parts[1].split(\" # \");\n\t\t\tfor (String string : edges) {\n\t\t\t\tDEdge e = new DEdge(string);\n\t\t\t\tif (e.getSrc() == getKey())\n\t\t\t\t\tput(e.getDest(), e);\n\t\t\t\telse\n\t\t\t\t\tthrow new RuntimeException(\"Edge src is \" + e.getSrc() + \" but source node key is \" + getKey());\n\t\t\t}\n\t\t}\n\t}", "public Node(E data, Node<E> link) {\r\n\t\tthis.data = data;\r\n\t\tthis.link = link;\r\n\t\tthis.counter = 0;\r\n\t}", "public interface SinkNode extends AbstractNode {\r\n}", "public Node(T data){\n this.data = data;\n }", "public abstract int getNodeType();", "public interface Node {\n\n\tLong getClsId();\n\n\tNode getParent();\n\n\tvoid setParent(Node p);\n\n\tNode[] getChildrenArray();\n\n\tList<Node> getChildrenList();\n\n\tvoid resetChildren(Node[] children);\n\n\tObject getValue(int attr);\n\n\tObject setValue(int attr, Object value);\n\n\tlong getLongValue(int attr);\n\n\tInteger getId();\n}", "public Node(String name) {\n this.name = name;\n }", "public Node(T value) {\n this.value = value;\n }", "public Node(T data) {\n\n this.data = data;\n\n\n }", "public interface Edge<NodeType extends Comparable<NodeType>,\n WeightType extends Comparable<WeightType>> \n\textends Comparable<Edge<NodeType,WeightType>> {\n\n\t/**\n\t * @return The description of the edge.\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * @param desc The description of the edge.\n\t */\n\tpublic void setDescription(String desc);\n\n\t/**\n\t * @return The source node of this edge.\n\t */\n\tpublic NodeType getSourceNode();\n\n\t/**\n\t * @return The target node of this edge.\n\t */\n\tpublic NodeType getTargetNode();\n\n\t/**\n\t * @return The weight of this edge.\n\t */\n\tpublic WeightType getWeight();\n}", "NodeId getNodeId();", "@Override\n public String toString() {\n return \"GraphModelNode: \" + getText(); //$NON-NLS-1$\n }", "public interface Graph {\n\n\t/**\n\t * Method to add the edge from start to end to the graph.\n\t * Adding self-loops is not allowed.\n\t * @param start start vertex\n\t * @param end end vertex\n\t */\n\tpublic void addEdge(int start, int end);\n\n\t/**\n\t * Method to add the edge with the given weight to the graph from start to end.\n\t * Adding self-loops is not allowed.\n\t * @param start number of start vertex\n\t * @param end number of end vertex\n\t * @param weight weight of edge\n\t */\n\tpublic void addEdge(int start, int end, double weight);\n\n\t/**\n\t * Method to add a vertex to the graph.\n\t */\n\tpublic void addVertex();\n\t\n\t/**\n\t * Method to add multiple vertices to the graph.\n\t * @param n number of vertices to add\n\t */\n\tpublic void addVertices(int n);\n\n\t/**\n\t * Returns all neighbors of the given vertex v (all vertices i with {i,v} in E or (i,v) or (v,i) in E).\n\t * @param v vertex whose neighbors shall be returned\n\t * @return List of vertices adjacent to v\n\t */\n\tpublic List<Integer> getNeighbors(int v);\n\n\t/**\n\t * Returns a list containing all predecessors of v. In an undirected graph all neighbors are returned.\n\t * @param v vertex id\n\t * @return list containing all predecessors of v\n\t */\n\tpublic List<Integer> getPredecessors(int v);\n\n\t/**\n\t * Returns a list containing all successors v. In an undirected graph all neighbors are returned.\n\t * @param v vertex id\n\t * @return list containing all edges starting in v\n\t */\n\tpublic List<Integer> getSuccessors(int v);\n\n\t/**\n\t * Method to get the number of vertices.\n\t * @return number of vertices\n\t */\n\tpublic int getVertexCount();\n\n\t/**\n\t * Method to get the weight of the edge {start, end} / the arc (start, end).\n\t * @param start start vertex of edge / arc\n\t * @param end end vertex of edge / arc\n\t * @return Double.POSITIVE_INFINITY, if the edge does not exist, c_{start, end} otherwise\n\t */\n\tpublic double getEdgeWeight(int start, int end);\n\n\t/**\n\t * Method to test whether the graph contains the edge {start, end} / the arc (start, end).\n\t * @param start start vertex of the edge\n\t * @param end end vertex of the edge\n\t */\n\tpublic boolean hasEdge(int start, int end);\n\n\t/**\n\t * Method to remove an edge from the graph, defined by the vertices start and end.\n\t * @param start start vertex of the edge\n\t * @param end end vertex of the edge\n\t */\n\tpublic void removeEdge(int start, int end);\n\n\t/**\n\t * Method to remove the last vertex from the graph.\n\t */\n\tpublic void removeVertex();\n\n\t/**\n\t * Returns whether the graph is weighted.\n\t * A graph is weighted if an edge with weight different from 1.0 has been added to the graph.\n\t * @return true if the graph is weighted\n\t */\n\tpublic boolean isWeighted();\n\n\t/**\n\t * Returns whether the graph is directed.\n\t * @return true if the graph is directed\n\t */\n\tpublic boolean isDirected();\n\n}", "DoubleNode(int d) {\n\t data = d; }", "Node(TNode i, Node n){\t\t\t//A function to create a Node\n\t\telement = i;\t\t\t\t\n\t\tnext = n;\n\t}", "public Node(final String id) {\n super();\n this.id = id;\n }", "entities.Torrent.NodeId getNode();", "entities.Torrent.NodeId getNode();", "public UnmodifiableDirectedGraph(DirectedGraph<V, E> g)\n {\n super(g);\n }", "Node(String d) {\n data = d;\n }", "Node(int d) {\n data = d;\n left = null;\n right = null;\n }", "public interface INode\n{\n // read/write forces and integration\n void resetForce();\n double getForce();\n double step(double interval);\n void addForce(XY force);\n\n // read/write position\n void setPos(XY pos);\n @NotNull\n XY getPos();\n\n // read-only connections\n boolean connects(INode n);\n boolean connectsForwards(INode to);\n boolean connectsBackwards(INode from);\n Collection<DirectedEdge> getConnections();\n Collection<DirectedEdge> getInConnections();\n Collection<DirectedEdge> getOutConnections();\n DirectedEdge getConnectionTo(INode node);\n DirectedEdge getConnectionFrom(INode from);\n\n // other read-only properties\n String longName();\n String getCodes();\n String getTemplate();\n double getRad();\n\n // misc\n String print(int tab, boolean full);\n\n // indices created and read-back for handy data access when relaxing\n void setIdx(int i);\n int getIdx();\n\n // colour for pretty drawing\n int getColour();\n void setColour(int c);\n\n // name (currently writable for showing door <-> key relations etc\n String getName();\n void setName(String s);\n\n // access the geometry-layout object for this node...\n GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();\n}", "public MyNode(Station station){\r\n this.station=station;\r\n this.neighbors=new LinkedList<MyNode>();\r\n }", "public interface ObjectGraph {\n\n\t\n\t/**\n\t * As in neo4j, starts a new transaction and associates it with the current thread.\n\t * @return a transaction from NeoService.\n\t */\n\tTransaction beginTx();\n\n\t/**\n\t * Mirror a java object within the neo4j graph. Only fields annotated with {@code}neo\n\t * will be considered.\n\t * @param o\n\t */\n\t<A> void persist(A... o);\n\n\t/**\n\t * removes all data representing an object from the graph.\n\t * \n\t * @param o an object retrieved from this {@link ObjectGraph}\n\t */\n\tvoid delete(Object... o);\n\t\n\t\n\t/**\n\t * Looks up a neo4j graph node using it's java object\n\t * mirror. \n\t * @param o an object retrieved from this {@link ObjectGraph}\n\t * @return neo4j node represented by o\n\t */\n\tNode get(Object o);\n\t\n\t/**\n\t * Looks up all instances of {@code}type in the graph.\n\t * \n\t * @param type a type previously stored in the graph\n\t * @return a Collection of {@code}type instances.\n\t */\n\t<T> Collection<T> get(Class<T> type);\n\n\t/**\n\t * Type safe lookup of object given it's neo4j nodeid.\n\t * Your domain classes may use {@link Nodeid#id()} to discover\n\t * their neo4j nodeid. \n\t * \n\t * @param t\n\t * @param key neo4j node id.\n\t * @return\n\t */\n\t<T> T get(Class<T> t, long key);\n\n\t\n\t/**\n\t * Return an object represented by <code>node</code> provided\n\t * the node was created by jo4neo.\n\t * \n\t * @param node\n\t * @return an object that mirrors node.\n\t */\n\tObject get(Node node);\n\t\n\t/**\n\t * Looks up the node representation of a given \n\t * uri. This method may update your graph if no node\n\t * was previously allocated for the uri.\n\t * \n\t * @return the node representation of uri.\n\t */\n\tNode get(URI uri);\n\n\n\t/**\n\t * Unmarshal a collections of nodes into objects.\n\t * \n\t */\n\t<T> Collection<T> get(Class<T> type, Iterable<Node> nodes);\n\n\t/**\n\t * Closes this ObjectGraph after which it will be unavailable \n\t * for use. Calling close is necessary, and should be called even\n\t * if the application is halted suddenly. ObjectGraph's maintain \n\t * a lucene index which may become corrupt without proper shutdown.\n\t * \n\t */\n\tvoid close();\n\n\t/**\n\t * Begin fluent interface find. <code>a</code> should be \n\t * a newly constructed instance as it's contents will be modified/initialized\n\t * by this call.\n\t * <pre>\n\t * <code>\n\t * Customer customer = new Customer();\n\t * customer = graph.find(customer).where(customer.id).is(123).result();\n\t * </code>\n\t * </pre>\n\t * \n\t * @param a\n\t * @return\n\t */\n\t<A> Where<A> find(A a);\n\n\t/**\n\t * Counts child entities without loading objects into memory. This is preferable to \n\t * using Collection.size(), which would load the full collection into memory.\n\t * <pre>\n\t * <code>\n\t * Customer customer = new Customer();\n\t * customer = graph.find(customer).where(customer.id).is(123).result();\n\t * long numOrders = graph.count(customer.orders);\n\t * </code>\n\t * </pre>\n\t * \n\t * @param values a collection value from a jo4neo annotated field.\n\t * @return\n\t */\n\tlong count(Collection<? extends Object> values);\n\n\t/**\n\t * Returns a collection of entities added since <code>d</code>.\n\t * Type <code>t</code> must be annotated with {@link Timeline}\n\t * \n\t * @see Timeline\n\t * \n\t */\n\t<T> Collection<T> getAddedSince(Class<T> t, Date d);\n\n\t/**\n\t * Returns a collection of entities added bewteen dates from and to.\n\t * Type <code>t</code> must be annotated with {@link Timeline}.\n\t * \n\t * @see Timeline\n\t */\n\t<T> Collection<T> getAddedBetween(Class<T> t, Date from,\n\t\t\tDate to);\n\n\t\n\t/**\n\t * Returns up to <code>max</code> most recently added instances of type <code>t</code>\n\t * \n\t * @param max limit the number of instances returned\n\t * @see neo#recency()\n\t */\n\t<T> Collection<T> getMostRecent(Class<T> t, int max);\n\t\n\t\n\t<T> T getSingle(Class<T> t, String indexname, Object value);\n\t\n\t<T> Collection<T> get(Class<T> t, String indexname, Object value);\n\t\n\t<T> Collection<T> fullTextQuery(Class<T> t, String indexname, Object value);\n\n}", "public ListNode(E d, ListNode<E> node)\n { \n nextNode = node;\n data = d;\n }", "OperationNode getNode();", "private void link(DefaultDirectedGraph<FStream, IndexedEdge<FStream>> G, FStream node, FStream n) {\n\t\tif (!G.containsVertex(n)) {\n\t\t\tG.addVertex(n);\n\t\t}\n\t\t\n\t\tindex_counter += 1;\n\t\tIndexedEdge<FStream> e = new IndexedEdge<FStream>(node, n, index_counter);\n\t\tG.addEdge(node, n, e);\n\t}", "public interface Graph<V>\n{\n /**\n * Adds the specified vertex to this graph. The given vertex will not be\n * added to this graph if this graph contains the vertex. In other words\n * this graph does not allow duplicate vertices. The way this graph\n * concludes if the specified vertex is a duplicate is through the equals\n * convention. For example <code>element.equals(vertex)</code>.\n *\n * <p>This method will return false if the given vertex is <code>null\n * </code></p>.\n * \n * @param vertex the vertex to add to this graph.\n *\n * @return <tt>true</tt> of the specified vertex is added to this\n * graph; otherwise <tt>false</tt>.\n */\n public boolean addVertex(V vertex);\n\n /**\n * Removes the specified vertex from this graph if the vertex actually\n * exists in this graph. Any edges that are connected to the given\n * vertex will also be removed from this graph. If the specified vertex\n * is not contained within this graph then the graph is unchanged and this\n * operation return <tt>false</tt>; otherwise <tt>true</tt>.\n *\n * <p>This method will return false if the given vertex is <code>null\n * </code></p>.\n * \n * @param vertex the vertex to remove from this graph.\n * \n * @return <tt>true</tt> if the given vertex is removed; otherwise <tt>\n * false</false>\n */\n public boolean removeVertex(V vertex);\n\n /**\n * Gets the set of vertices contained within this graph. The set is\n * an unmodifiable view so modifications to the set do not affect this\n * graph's internal set of vertices. \n *\n * @return a read-only view of the vertices contained withing this graph.\n */\n public Set<V> getVertices();\n\n /**\n * Checks if this graph contains the specified vertex. If the given\n * vertex is present in this graph, this operation returns <tt>true</tt>\n * ;otherwise <tt>false</tt>. The way this graph concludes if the\n * specified vertex is a present is through the equals convention. For\n * example <code>element.equals(vertex)</code>.\n *\n * <p>This method will return false if the given vertex is <code>null\n * </code></p>.\n * \n * @param vertex the vertex to verify is present within this graph.\n * \n * @return <tt>true</tt> if the specified vertex is present in this graph;\n * otherwise <tt>false</tt>.\n */\n public boolean containsVertex(V vertex);\n\n /**\n * Adds an edge (based on the specified vertices) to this graph. The edge\n * will not be added to this graph if this graph already contains an edge\n * between the specified vertices. In other words this graph does not allow\n * duplicate edges.\n * \n * <p>This method will return false if any of the given vertices are\n * <code>null</code></p>.\n *\n * @param source the source vertex for the edge to add to this graph.\n * @param target the target vertex for the edge to add to this graph.\n *\n * @return <tt>true</tt> of the edge is added to this graph; otherwise\n * <tt>false</tt>.\n */\n public Edge<V> addEdge(V source, V target);\n\n /**\n * Removes the edge (based on the given vertices) from this graph if the\n * edge actually exists in this graph. If the specified vertices are not\n * contained within this graph then the graph is unchanged and this\n * operation returns <tt>false</tt>; otherwise <tt>true</tt>.\n *\n * <p>This method will return false if any of the given vertices are\n * <code>null</code></p>.\n *\n * @param source the source vertex for the edge to remove.\n * @param target the target vertex for the edge to remove.\n *\n * @return <tt>true</tt> if the edge that contains the specified vertices\n * is removed; otherwise <tt>\n * false</false>\n */\n public boolean removeEdge(V source, V target);\n\n /**\n * Gets the edge connected by the given source and target vertices. If\n * either of the specified vertices are not present in this graph, then\n * this operation returns null. If any of the specified vertices are\n * <code>null</code> then <code>null</code> is returned.\n *\n * <p>The order of vertices in the resulting edge is not guaranteed if this\n * graph is an undirected graph.</p> \n *\n * @param source the source vertex for the edge to lookup in this graph.\n * @param target the target vertex for the edge to lookup in this graph.\n *\n * @return an edge that connects the specified vertices.\n */\n public Edge<V> getEdge(V source, V target);\n\n /**\n * Gets a set of edges connected to the specified vertex that are contained\n * within this graph. The set is an unmodifiable view so modifications to\n * the set do not affect this graph's internal set of edges.\n *\n * @param vertex the vertex connected to the set of edges to lookup.\n * \n * @return a read-only view of the edges connected to the given vertex that\n * are withing this graph.\n */\n public Set<Edge<V>> getEdges(V vertex);\n\n /**\n * Gets the set of edges contained within this graph. The set is\n * an unmodifiable view so modifications to the set do not affect this\n * graph's internal set of edges.\n *\n * @return a read-only view of the edges contained withing this graph.\n */\n public Set<Edge<V>> edgeSet();\n\n /**\n * Checks if this graph contains an edge based on the specified vertices.\n * If either of the given vertices are not present in this graph, this\n * operation returns <tt>false</tt>. Both specified vertices have to exists\n * in this graph and have a defined edge in order for this method to return\n * <tt>true</tt>.\n *\n * <p>This method will return false if any of the given vertices are\n * <code>null</code></p>.\n *\n * @param source the source vertex for the edge to verify is present within\n * this graph.\n * @param target the target vertex for the edge to verify is present within \n * this graph.\n *\n * @return <tt>true</tt> if the edge is present in this graph; otherwise\n * <tt>false</tt>.\n */\n public boolean containsEdge(V source, V target);\n\n /**\n * Checks if this graph contains the specified edge. If the given edge is\n * not present in this graph, this operation returns <tt>false</tt>.\n *\n * <p>This method will return false if the given edge is <code>null</code>\n * </p>.\n *\n * @param edge the edge to verify is present within this graph.\n *\n * @return <tt>true</tt> if the specified edge is present in this graph;\n * otherwise <tt>false</tt>.\n */\n public boolean containsEdge(Edge<V> edge);\n\n /**\n *\n * @return\n */\n public Set<V> breadthFirstSearch();\n\n /**\n *\n * @return\n */\n public Set<V> depthFirstSearch();\n\n /**\n * \n * @return\n */\n public Set<Edge<V>> minSpanningTree();\n}", "public Node(T data) {\r\n this.data = data;\r\n }", "Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }", "public node(String ID) {\n\t\t// TODO Auto-generated constructor stub\n\t\tname = ID;\n\t\tcomment_centrality = -1;\n\t\tlike_centrality = -1;\n\t}", "@SuppressWarnings({\"WeakerAccess\", \"unused\"})\npublic interface DiGraph_Interface {\n /*\n Interface: A DIGRAPH will provide this collection of operations:\n\n addNode\n in: unique id number of the node (0 or greater)\n string for name\n you might want to generate the unique number automatically\n but this operation allows you to specify any integer\n both id number and label must be unique\n return: boolean\n returns false if node number is not unique, or less than 0\n returns false if label is not unique (or is null)\n returns true if node is successfully added\n addEdge\n in: unique id number for the new edge,\n label of source node,\n label of destination node,\n weight for new edge (use 1 by default)\n label for the new edge (allow null)\n return: boolean\n returns false if edge number is not unique or less than 0\n returns false if source node is not in graph\n returns false if destination node is not in graph\n returns false is there already is an edge between these 2 nodes\n returns true if edge is successfully added\n\n delNode\n in: string\n label for the node to remove\n out: boolean\n return false if the node does not exist\n return true if the node is found and successfully removed\n delEdge\n in: string label for source node\n string label for destination node\n out: boolean\n return false if the edge does not exist\n return true if the edge is found and successfully removed\n numNodes\n in: nothing\n return: integer 0 or greater\n reports how many nodes are in the graph\n numEdges\n in: nothing\n return: integer 0 or greater\n reports how many edges are in the graph\n topoSort:\n in: nothing\n return: array of node labels (strings)\n if there is no topo sort (a cycle) return null for the array\n if there is a topo sort, return an array containing the node\n labels in order\n */\n\n // ADT operations\n\n boolean addNode(long idNum, String label);\n boolean addEdge(long idNum, String sLabel, String dLabel, long weight, String eLabel);\n boolean delNode(String label);\n boolean delEdge(String sLabel, String dLabel);\n long numNodes();\n long numEdges();\n String[] topoSort();\n}", "public DoublyLinkedNode(E data) {\n this(null, null, data);\n }", "@Override\r\n public void connectDirected(T value, T neighbor) {\r\n Vertex<T> v = vertices.get(value);\r\n Vertex<T> n = vertices.get(neighbor);\r\n v.addNeighbor(n);\r\n }", "public Node(Integer number){\n this.number = number;\n this.edges = new ArrayList<Edge>();\n }", "public MultiGraph(boolean directed) {\r\n\t\tsuper(directed ? Type.DIRECTED : Type.UNDIRECTED);\r\n\t}", "public Node<T> darTope();", "public Node getNode (){\n if (_node == null){\n Label label = new Label(_value);\n label.setFont(DEFAULT_FONT);\n _node = label;\n }\n return _node;\n }", "@Override\n\tpublic void putNode(N node) {\n\t\t\n\t}", "private GraphNode findGraphNode(T nodeId)\n {\n return nodeList.get(nodeId);\n }", "public SimpleNodeLabel() {\n super();\n }", "public abstract TreeNode getNode(int i);", "public Node(Node<D> n) {\n\t\tdata = n.getData();\n\t\tnext = n.getNext();\n\t}", "public NetworkNode getNetworkNode(Integer id);", "Node(long id, String label) {\n this.id = id;\n this.label = label;\n\n inEdges = new HashMap<>();\n outEdges = new HashMap<>();\n }", "protected AbstractTreeAdjacencyGraph()\n\t{\n\t\tsuper();\n\t}", "public interface IGraph {\n\t// Adds a new edge between 'from' and 'to' nodes with a cost obeying the\n\t// triangle in-equality\n\tpublic IEdge addEdge(String from, String to, Double cost);\n\t\n\t// Returns a node, creates if not exists, corresponding to the label\n\tpublic INode addOrGetNode(String label);\n\t\n\t// Returns a list of all nodes present in the graph\n\tpublic List<INode> getAllNodes();\n\t\n\t// Returns a list of all edges present in the graph\n\tpublic List<IEdge> getAllEdges();\n\t\n\t// Joins two graphs that operate on the same cost interval and \n\t// disjoint sets of nodes\n\tpublic void joinGraph(IGraph graph);\n\t\n\t// Returns the maximum cost allowed for the edges\n\tpublic Double getCostInterval();\n\t\n\t// Returns a Path with cost between 'from' and 'to' nodes\n\tpublic String getPath(String from, String to, String pathAlgo);\n}", "N getNode(int id);", "public Node getNode(Character charId) {\n return graph.get(charId);\n }", "public abstract <T extends INode<T>> String nodeToString(int nodeId, T node, boolean isInitial, boolean isTerminal);", "NodeConnection createNodeConnection();", "public void create(NetworkNode networkNode);", "public interface NodeRoot extends RootVertex<Node> {\n\n\tpublic static final String TYPE = \"nodes\";\n\n\t/**\n\t * Create a new node.\n\t * \n\t * @param user\n\t * User that is used to set creator and editor references\n\t * @param container\n\t * Schema version that should be used when creating the node\n\t * @param project\n\t * Project to which the node should be assigned to\n\t * @return Created node\n\t */\n\tdefault Node create(HibUser user, HibSchemaVersion container, HibProject project) {\n\t\treturn create(user, container, project, null);\n\t}\n\n\t/**\n\t * Create a new node.\n\t * \n\t * @param user\n\t * User that is used to set creator and editor references\n\t * @param container\n\t * Schema version that should be used when creating the node\n\t * @param project\n\t * Project to which the node should be assigned to\n\t * @param uuid\n\t * Optional uuid\n\t * @return Created node\n\t */\n\tNode create(HibUser user, HibSchemaVersion container, HibProject project, String uuid);\n\n}" ]
[ "0.68134344", "0.6725307", "0.6657897", "0.64515734", "0.64292634", "0.6365775", "0.63344336", "0.63344336", "0.6234595", "0.61761564", "0.61573434", "0.6145779", "0.61043394", "0.6102411", "0.60768837", "0.6064285", "0.60604405", "0.6017786", "0.6016498", "0.5980538", "0.59774274", "0.5976107", "0.59756815", "0.59624666", "0.5951762", "0.5951366", "0.5934174", "0.59266657", "0.59262353", "0.5914931", "0.5914879", "0.5903797", "0.5897445", "0.5888688", "0.5888672", "0.58873546", "0.58873546", "0.58873546", "0.58873546", "0.5864325", "0.5840568", "0.58355075", "0.58296096", "0.5785525", "0.57803506", "0.57783425", "0.5772302", "0.5771456", "0.57691884", "0.575331", "0.575122", "0.5736774", "0.572754", "0.57193625", "0.57174677", "0.5705012", "0.5692459", "0.569118", "0.56894183", "0.5684358", "0.56841815", "0.5672387", "0.56699175", "0.56683165", "0.56683165", "0.5667046", "0.5664698", "0.56602824", "0.56568205", "0.5656255", "0.56531316", "0.5648693", "0.5643252", "0.56414837", "0.5630248", "0.5629407", "0.5629209", "0.56226397", "0.56211215", "0.5614641", "0.56130034", "0.5608458", "0.5598488", "0.5596421", "0.5589328", "0.5589067", "0.55872", "0.5584925", "0.558151", "0.5578338", "0.5574069", "0.5572569", "0.5572469", "0.5570482", "0.55675954", "0.5566207", "0.55639434", "0.55595386", "0.55519396", "0.5548831" ]
0.70225644
0
Returns whether a priority has been set.
boolean hasPriority();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetPriority() {\n return EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);\n }", "public boolean isSetPriority() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);\n }", "public boolean getPriority() {\n\t\treturn priority;\n\t}", "public boolean getPriority() {\n\t\treturn priority;\n\t}", "public boolean isPriority()\r\n/* 49: */ {\r\n/* 50:47 */ return false;\r\n/* 51: */ }", "public boolean isReportedDefault() {\n if (\"3\".equals(originalPriority.getId())) {\n return true;\n }\n\n return false;\n }", "public boolean isSetSchedulingPolicy() {\n return this.schedulingPolicy != null;\n }", "@Contract(pure = true)\r\n public boolean isGreaterThan(@NotNull Priority priority) {\r\n return !isLessThan(priority) && this != priority;\r\n }", "public boolean isSetAssignOrderCount() {\n return __isset_bit_vector.get(__ASSIGNORDERCOUNT_ISSET_ID);\n }", "boolean isDefaultPriorityClass(@NotNull PriorityClass priorityClass);", "@JsonIgnore\n public boolean isPreemptibleSet() {\n return isSet.contains(\"preemptible\");\n }", "boolean isPersonalPriorityClass(@NotNull PriorityClass priorityClass);", "public boolean isSetIsSetSchedulingPolicy() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISSETSCHEDULINGPOLICY_ISSET_ID);\n }", "public boolean isSetPopularity() {\n return EncodingUtils.testBit(__isset_bitfield, __POPULARITY_ISSET_ID);\n }", "public boolean isReportedSevere() {\n if (\"1\".equals(originalPriority.getId()) || \"2\".equals(originalPriority.getId())) {\n return true;\n }\n\n return false;\n }", "@Override\r\n\tpublic boolean isAllHit() {\r\n\t\treturn priorityElements.isEmpty();\r\n\t}", "public abstract boolean setPriority(int priority);", "public boolean isSetProcStat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PROCSTAT$16) != 0;\n }\n }", "public boolean isSetOrderSubmitStatus() {\n return this.orderSubmitStatus != null;\n }", "public boolean isSetShouldPrepaymentFee() {\n return EncodingUtils.testBit(__isset_bitfield, __SHOULDPREPAYMENTFEE_ISSET_ID);\n }", "public boolean isSetScore() {\n return __isset_bit_vector.get(__SCORE_ISSET_ID);\n }", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN)\n public static boolean isValidNotificationPriority(int priority) {\n return (priority >= Notification.PRIORITY_MIN && priority <= Notification.PRIORITY_MAX);\n }", "public boolean isSetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PRF$26) != 0;\r\n }\r\n }", "public void setPriority(boolean priority){\n\t\tthis.priority = priority;\n\t}", "@Override\n public boolean hasMessageAvailable() {\n return !priorityQueue.isEmpty() && priorityQueue.peekN1() <= clock.millis();\n }", "public boolean getIsPMReviewed() {\n if (review != null) {\n return review.isPMReviewed();\n } else {\n return false;\n }\n }", "public void setPriority(boolean priority) {\n this.priority = priority;\n }", "public void setPriority(Boolean priority) {\n\t\tthis.priority = priority;\n\t}", "boolean isSetProbables();", "public boolean isSetPreRepayAmt() {\n return EncodingUtils.testBit(__isset_bitfield, __PREREPAYAMT_ISSET_ID);\n }", "@java.lang.Override\n public boolean hasPrimaryImpact() {\n return primaryImpact_ != null;\n }", "public boolean isReportedNonSevere() {\n if (\"4\".equals(originalPriority.getId()) || \"5\".equals(originalPriority.getId())) {\n return true;\n }\n\n return false;\n }", "public boolean isSetRequirement() {\n return this.requirement != null;\n }", "public boolean isSetImportance() {\n return EncodingUtils.testBit(__isset_bitfield, __IMPORTANCE_ISSET_ID);\n }", "public boolean isSetIs_preaggregation() {\n return EncodingUtils.testBit(__isset_bitfield, __IS_PREAGGREGATION_ISSET_ID);\n }", "public boolean hasPrimaryImpact() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "public boolean isSetProcessCount() {\n return EncodingUtils.testBit(__isset_bitfield, __PROCESSCOUNT_ISSET_ID);\n }", "public boolean isSetSalary_top() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SALARY_TOP_ISSET_ID);\n }", "public boolean isSetPresent()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PRESENT$0) != 0;\n }\n }", "public boolean isSetRequires()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(REQUIRES$28) != null;\r\n }\r\n }", "public boolean isSetIsComparation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ISCOMPARATION$2) != null;\n }\n }", "public boolean isSetStatusPsw() {\n\t\treturn org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUSPSW_ISSET_ID);\n\t}", "public boolean isSetOrder() {\n return EncodingUtils.testBit(__isset_bitfield, __ORDER_ISSET_ID);\n }", "public boolean isSetLaunchCount() {\n return EncodingUtils.testBit(__isset_bitfield, __LAUNCHCOUNT_ISSET_ID);\n }", "public boolean hasActivePokemon() {\n return activePokemonBuilder_ != null || activePokemon_ != null;\n }", "boolean hasCondition();", "public boolean isSetExperience_above() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPERIENCE_ABOVE_ISSET_ID);\n }", "public boolean isSetExperience() {\n return this.experience != null;\n }", "public boolean isSetHouseProperyCondition() {\n return this.houseProperyCondition != null;\n }", "public static boolean hasPriority(String userInput) {\n String[] components = userInput.split(\"/priority \");\n return components.length > 1;\n }", "public boolean isSetNotifySequence() {\n return EncodingUtils.testBit(__isset_bitfield, __NOTIFYSEQUENCE_ISSET_ID);\n }", "public boolean isPaid(){\n return this.totalPaid>=this.getGrandTotal();\n }", "public boolean hasSeverity() {\n return fieldSetFlags()[2];\n }", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "public boolean isSatisfied() {\r\n\t\tif (isParked() == true || wasParked() == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isSetTpg()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(TPG$30) != 0;\r\n }\r\n }", "public boolean isPrimary() {\n return this.placement.isIsPtlp();\n }", "public boolean isSetNumPoliza() {\r\n return this.numPoliza != null;\r\n }", "public boolean isSetProcess_ID() {\r\n return this.Process_ID != null;\r\n }", "public boolean isSatisfied() {\n\t\treturn satisfied().isSatisfied();\n\t}", "public boolean isSetPid() {\n return EncodingUtils.testBit(__isset_bitfield, __PID_ISSET_ID);\n }", "public boolean isSetPid() {\n return EncodingUtils.testBit(__isset_bitfield, __PID_ISSET_ID);\n }", "public boolean isSetMinHitCount() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MINHITCOUNT_ISSET_ID);\r\n }", "public boolean isSetProducerid() {\n return __isset_bit_vector.get(__PRODUCERID_ISSET_ID);\n }", "public boolean isSettled()\n {\n synchronized (_amqpConnection)\n {\n return _delivery.isSettled() || ((_delivery instanceof DeliveryImpl && ((DeliveryImpl)_delivery).remotelySettled()));\n }\n }", "public boolean isPresent(T t) {\n\t\treturn multiSet.containsKey(t);\n\t}", "public boolean isAssigned() {\n boolean assigned;\n IDecisionVariable var = getVariable();\n if (null != var) {\n assigned = AssignmentState.UNDEFINED != var.getState();\n } else {\n assigned = false;\n }\n return assigned;\n }", "public boolean isPresent() {\n return exists();\n }", "protected static synchronized boolean isPresent() {\n if (m_Present == null) {\n try {\n SizeOfAgent.fullSizeOf(new Integer(1));\n m_Present = true;\n } catch (Throwable t) {\n m_Present = false;\n }\n }\n\n return m_Present;\n }", "public Boolean isPSMSetScore() {\n return false;\n }", "public boolean canBeActivated(Player p) {\n if (p == null) throw new IllegalArgumentException(\"Argument is null\");\n int i;\n boolean retValue;\n\n retValue = true;\n for (i = 0; i < requirements.length && retValue; i++) {\n retValue = requirements[i].checkRequirement(p);\n }\n return retValue;\n }", "public boolean isSetStatusQuest() {\n\t\treturn org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUSQUEST_ISSET_ID);\n\t}", "public boolean isSetTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(TITLE$2) != null;\n }\n }", "public boolean isSetQueue() {\n return this.queue != null;\n }", "public boolean hasBonusHP() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isSetPId() {\n return EncodingUtils.testBit(__isset_bitfield, __PID_ISSET_ID);\n }", "public boolean isSetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PIR$12) != 0;\r\n }\r\n }", "public boolean isPresent() {\n\t\treturn present;\n\t}", "@NotNull\r\n public Priority getPriority() {\r\n return priority;\r\n }", "public boolean isPresent() {\r\n\t\treturn value != null;\r\n\t}", "public int getPriority() {\n\t\treturn getSettings().getInt(\"priority\");\n\t}", "public boolean hasBonusHP() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isSetDesc()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(DESC$10) != null;\r\n }\r\n }", "public boolean isSetPublisher() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PUBLISHER_ISSET_ID);\n }", "@Contract(pure = true)\r\n public abstract boolean isLessThan(@NotNull Priority priority);", "public boolean is_set_status() {\n return this.status != null;\n }", "public boolean isProcessed() {\n\t\tObject oo = get_Value(\"Processed\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public boolean isProcessed() {\n\t\tObject oo = get_Value(\"Processed\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public BigDecimal getPriority() {\n\t\treturn priority;\n\t}", "public int priority()\n\t{\n\t\treturn priority;\n\t}", "public boolean isSetProcess_Name() {\r\n return this.Process_Name != null;\r\n }", "public boolean hasPop() {\n return pop_ != null;\n }", "public boolean isSetSleeping() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEEPING_ISSET_ID);\n }", "public boolean isSetTotal_bonus() {\n return this.total_bonus != null;\n }", "public double getPriority() {\n\t\treturn priority;\n\t}", "public boolean hasPendingQuestions() {\r\n try {\r\n Task[] tasks = getTasks();\r\n if (tasks == null || tasks.length == 0)\r\n return false;\r\n \r\n for (int i = 0; i < tasks.length; i++) {\r\n if (tasks[i].getPendingQuestions() != null\r\n && tasks[i].getPendingQuestions().length > 0)\r\n return true;\r\n }\r\n \r\n return false;\r\n } catch (ProcessManagerException pme) {\r\n return false;\r\n }\r\n }", "public boolean isSetBuycardate() {\n return this.buycardate != null;\n }", "public boolean isSetOverdraft() {\n return EncodingUtils.testBit(__isset_bitfield, __OVERDRAFT_ISSET_ID);\n }" ]
[ "0.8242238", "0.8211453", "0.69749355", "0.69749355", "0.67121005", "0.63831246", "0.63096136", "0.6192075", "0.61433417", "0.61405987", "0.6089644", "0.6057054", "0.60357916", "0.6007829", "0.5998231", "0.5986581", "0.5973681", "0.58702415", "0.58694917", "0.58515286", "0.58451575", "0.5837599", "0.5834824", "0.58184415", "0.58078206", "0.58018047", "0.57975745", "0.5761896", "0.57453644", "0.57135236", "0.56992745", "0.56964463", "0.5695636", "0.5695183", "0.5635217", "0.5620258", "0.56199497", "0.5615188", "0.5605383", "0.5592199", "0.5574636", "0.55672663", "0.5560174", "0.55529535", "0.55451405", "0.5544369", "0.554343", "0.5527545", "0.55269367", "0.5512474", "0.54802215", "0.54700613", "0.54690474", "0.54667175", "0.54619145", "0.5455911", "0.5435279", "0.5430069", "0.5426573", "0.5408648", "0.54038304", "0.54038304", "0.5402291", "0.5399464", "0.5398731", "0.5398636", "0.5395906", "0.53945965", "0.5390739", "0.53891045", "0.53880215", "0.53832096", "0.5382895", "0.5382723", "0.5381667", "0.5381275", "0.5376102", "0.53735095", "0.537264", "0.537003", "0.5369045", "0.53681535", "0.5357842", "0.53514296", "0.53510237", "0.53481424", "0.53442067", "0.53442067", "0.53430146", "0.534227", "0.5341227", "0.5332943", "0.53292054", "0.53272575", "0.5321518", "0.53184557", "0.5317613", "0.53159523" ]
0.7675001
4
Returns a nonnegative integer priority which can be used to order nodes. Throws if a priority has not been set.
int getPriority();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int priority()\n\t{\n\t\treturn priority;\n\t}", "int getPriority( int priority );", "public Integer getPriority() {\n return priority;\n }", "public Integer getPriority() {\n return priority;\n }", "public Integer getPriority() {\n return priority;\n }", "public int getPriority(){\n\t\t\n\t\treturn this.priority;\n\t}", "public int getPriority(){\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int priority(){\n return 0; //TODO codavaj!!\n }", "public int getPriority() {\n\t\tInteger prop = (Integer) getObject(\"priority\");\n\t\tif (prop != null) {\n\t\t\treturn prop;\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"The Task doesn't have its priority set\");\n\t\t}\n\t}", "public int getPriority()\n\t{\n\t\treturn mPriority;\n\t}", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority();", "public int getPriority();", "public int getPriority() {\n return this.mPriority;\n }", "public int getPriority()\n {\n return priority;\n }", "public int getPriority() {\n return this.priority;\n }", "public int getPriority() {\n\t\treturn getSettings().getInt(\"priority\");\n\t}", "int priority();", "int priority();", "public abstract int priority();", "@NotNull\r\n public Priority getPriority() {\r\n return priority;\r\n }", "public Priority getPriority();", "public String getPriority() {\r\n return priority;\r\n }", "public int getPriority() \n {\n return priority;\n }", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "public String getPriority() {\n\t\treturn (String) get_Value(\"Priority\");\n\t}", "public int getPriority() \n {\n return priority;\n }", "public String getPriority() {\n return priority;\n }", "default byte getPriority() {\n\t\treturn 0;\n\t}", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "@Stub\n\tpublic int getPriority()\n\t{\n\t\treturn PRIO_DEFAULT;\n\t}", "public double getPriority() {\n\t\treturn priority;\n\t}", "public Priority getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority(){\n return priority;\n }", "@java.lang.Override\n public com.google.cloud.recommender.v1.Recommendation.Priority getPriority() {\n com.google.cloud.recommender.v1.Recommendation.Priority result =\n com.google.cloud.recommender.v1.Recommendation.Priority.forNumber(priority_);\n return result == null\n ? com.google.cloud.recommender.v1.Recommendation.Priority.UNRECOGNIZED\n : result;\n }", "public abstract int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "public BigDecimal getPriority() {\n\t\treturn priority;\n\t}", "public final String getPriority() {\n return this.priority;\n }", "String getSpecifiedPriority();", "@java.lang.Override\n public com.google.cloud.recommender.v1.Recommendation.Priority getPriority() {\n com.google.cloud.recommender.v1.Recommendation.Priority result =\n com.google.cloud.recommender.v1.Recommendation.Priority.forNumber(priority_);\n return result == null\n ? com.google.cloud.recommender.v1.Recommendation.Priority.UNRECOGNIZED\n : result;\n }", "public java.lang.Object getPriority() {\n return priority;\n }", "@java.lang.Override\n public int getPriority() {\n return priority_;\n }", "public Priority getPriority() {\r\n return this.priority;\r\n }", "@Override\r\n\tpublic int getPriority() throws NotesApiException {\n\t\treturn 0;\r\n\t}", "public int getPriority()\n\t{\n\treturn level;\n\t}", "@java.lang.Override\n public int getPriority() {\n return priority_;\n }", "String getPriority();", "String getPriority();", "String getPriority();", "public int getPriority() {\r\n return (isNMI?-0x10000:0) + (icr << 8) + interruptNumber;\r\n }", "public Priority getPriority() ;", "@Override\n public int getPriority() {\n return priority;\n }", "@Override\n public int getPriority() {\n return priority;\n }", "public void setPriority(int value) {\n this.priority = value;\n }", "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(String priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "public int getPriority()\n {\n long dt = getSafeTimeMillis();\n\n // calculate \"age\" - how old is the statement\n long cMillisAge = dt - m_dtCreated;\n\n // calculate \"recentness\" - when was the statement last used\n long cMillisDormant = dt - m_dtLastUse;\n\n // calculate \"frequency\" - how often is the statement used\n int cUses = m_cUses;\n double dflRate = (cMillisAge == 0 ? 1 : cMillisAge)\n / (cUses == 0 ? 1 : cUses);\n\n // combine the measurements into a priority\n double dflRateScore = Math.log(Math.max(dflRate , 100.0) / 100.0 );\n double dflDormantScore = Math.log(Math.max(cMillisDormant, 1000L) / 1000.0);\n int nPriority = (int) (dflRateScore + dflDormantScore) / 2;\n\n return Math.max(0, Math.min(10, nPriority));\n }", "int getPriorityOrder();", "com.nhcsys.webservices.getmessages.getmessagestypes.v1.PriorityType xgetPriority();", "@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "public boolean getPriority() {\n\t\treturn priority;\n\t}", "public boolean getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority()\r\n\t\t{\r\n\t\t\treturn 25;\r\n\t\t}", "public String getPriority() {\n\t\treturn ticketPriority;\n\t}", "public int getPriority(){\n return 2;\n }", "default int getPriority() {\n return 0;\n }", "public char getPriority() {\r\n\t\treturn priority;\r\n\t}", "public int getEffectivePriority() {\n Lib.assertTrue(Machine.interrupt().disabled());\n\n\n return getWinningPriority();\n }", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public int topPriority() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).priority;\n\t\t\n\t\t}\n\t}", "@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int setPriority(int priority) {\n\t\treturn 0;\r\n\t}", "public RequestPriority getPriority() {\n return mPriority;\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}" ]
[ "0.75713944", "0.7497062", "0.7484751", "0.748089", "0.748089", "0.7475192", "0.74291795", "0.7401932", "0.7401932", "0.7401932", "0.7401932", "0.7395223", "0.73865193", "0.7376829", "0.7366506", "0.7366506", "0.7366506", "0.7366506", "0.7366506", "0.7366506", "0.734816", "0.73465985", "0.7291012", "0.7291012", "0.7278536", "0.7253235", "0.7250753", "0.72475713", "0.7227618", "0.7227618", "0.7141524", "0.71174765", "0.71089834", "0.7084319", "0.707839", "0.7067987", "0.7047101", "0.7025112", "0.70177615", "0.7007239", "0.69992214", "0.6970921", "0.69681513", "0.6943018", "0.6934677", "0.6929195", "0.69194204", "0.69194204", "0.69194204", "0.6915694", "0.6913584", "0.6883908", "0.6881189", "0.6818385", "0.68065625", "0.6798353", "0.6790784", "0.6788012", "0.67676616", "0.6762629", "0.6762629", "0.6762629", "0.67577875", "0.6748648", "0.6745973", "0.6745973", "0.672732", "0.67053235", "0.665808", "0.665808", "0.6628615", "0.66188365", "0.6597787", "0.6582112", "0.6576807", "0.6571649", "0.6563439", "0.6528034", "0.6528034", "0.6457102", "0.64536923", "0.64479434", "0.6446083", "0.6439465", "0.6429939", "0.6428314", "0.6421553", "0.64118046", "0.6408633", "0.6408633", "0.64035785", "0.6399759", "0.6397889" ]
0.7352333
27
Sets a node priority, must be nonnegative.
void setPriority(int priority);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "public void setPriority(Priority priority);", "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 setPriority(int value) {\n this.priority = value;\n }", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "public void setPriority(int data) {\n priority = data;\n }", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "public void setPriority(int priority){\n this.priority = priority;\n }", "public void setPriority(int r) {\n priority = r;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public abstract boolean setPriority(int priority);", "public void setPriority(double priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "public void changePriority(T item, int priority) {\n \t\t// TODO Complete this method!\n \t\tNode toAdd = new Node(item, priority);\n \t\tsetNode(getNode2(item), toAdd);\n \t\t\n \t}", "@Override\r\n\tpublic int setPriority(int priority) {\n\t\treturn 0;\r\n\t}", "public void setPriority(int newPriority)throws Exception{\n\t\t\n\t\tif (newPriority >= 0){\n\t\t\tthis.priority = newPriority;\n\t\t\tString txt = Integer.toString(newPriority);\n\t\t\toverWriteLine(\"Priority\", txt);\n\t\t}\n\t\n\t}", "public void setPriority(int newPriority) {\n\t\tpriority = newPriority;\n\t}", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(int v) \n {\n \n if (this.priority != v)\n {\n this.priority = v;\n setModified(true);\n }\n \n \n }", "public void setPriority(java.lang.Object priority) {\n this.priority = priority;\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 public void setPriorityValue(int priorityValue) {\n priority = priorityValue;\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 void setPriority( int priority )\n\t{\n\t\tmPriority = priority;\n\t\t\n\t\tmUpdated = true;\n\t}", "public final void setPriority(java.lang.String priority)\r\n\t{\r\n\t\tsetPriority(getContext(), priority);\r\n\t}", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "@IcalProperty(pindex = PropertyInfoIndex.PRIORITY,\n eventProperty = true,\n todoProperty = true\n )\n public void setPriority(final Integer val) {\n priority = val;\n }", "public void setPriority(int priority) {\r\n\t\t\r\n\t\tif (defaultMode != null) {\r\n\t\t\tdefaultMode.setPriority(priority);\r\n\t\t} else {\r\n\t\t\tsendWarning(\r\n\t\t\t\t\t\"Trying set the priority of a Transition that \"\r\n\t\t\t\t\t\t\t+ \"possibly has multiple modes\",\r\n\t\t\t\t\t\"Transition: \" + getName(),\r\n\t\t\t\t\t\"Method setPriority(int priority) of class Transition is only to be \"\r\n\t\t\t\t\t\t\t+ \"used on Transitions that only have a single mode and are\"\r\n\t\t\t\t\t\t\t+ \" constructed as such\",\r\n\t\t\t\t\t\"Use setPriority(int priority) on the specific TransitionModes instead\");\r\n\t\t}\r\n\t}", "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 }", "@Override\r\n\tpublic void setPriority(int arg0) throws NotesApiException {\n\r\n\t}", "public void setPriority(BigDecimal priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(String arg) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.PRIORITY.toString(), arg);\n\t}", "public Builder setPriority(int value) {\n\n priority_ = value;\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\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 }", "public void setPriority(Boolean priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(@NotNull Priority priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(boolean priority){\n\t\tthis.priority = priority;\n\t}", "public void setPriority(@EntityInstance int i, @IntRange(from = 0, to = 7) int priority) {\n nSetPriority(mNativeObject, i, priority);\n }", "public void setPriority(String arg, String compcode) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.PRIORITY.toString(), arg, compcode);\n\t}", "public void setPriority(int priority) {\n \t\tif ((Thread.MIN_PRIORITY <= priority) && (priority <= Thread.MAX_PRIORITY)) {\n \t\t\tthis.priority = priority;\n \t\t} else {\n \t\t\tthrow new IllegalArgumentException(NLS.bind(HttpMsg.HTTP_INVALID_VALUE_RANGE_EXCEPTION, new Object[] {new Integer(Thread.MIN_PRIORITY), new Integer(Thread.MAX_PRIORITY)}));\n \t\t}\n \t}", "public void setPriority(boolean priority) {\n this.priority = priority;\n }", "public Builder setPriorityValue(int value) {\n priority_ = value;\n bitField0_ |= 0x00000040;\n onChanged();\n return this;\n }", "public void setPriority( int priority , int telObsCompIndex )\n\t{\n\t\t_avTable.set( ATTR_PRIORITY , priority , telObsCompIndex ) ;\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 void updatePriority(){\n\t\tpriority = (int) priority / 2;\n\t}", "public void setPriority(String priority){\r\n\t\tDropDown.setExtJsComboValue(driver, driver.findElement(By.xpath(PRIORITY_XPATH)).getAttribute(\"id\"), priority);\r\n\t}", "void xsetPriority(\n com.nhcsys.webservices.getmessages.getmessagestypes.v1.PriorityType priority);", "public final void setPriority(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String priority)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Priority.toString(), priority);\r\n\t}", "@JsonProperty(\"priority\")\r\n @JacksonXmlProperty(localName = \"priority\", isAttribute = true)\r\n public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public void setPriority (int level)\n\t{\n\tthis.level = level;\n\n\tif (level == 1)\n\tpriority = \"Critical\";\n\tif (level == 2)\n\tpriority = \"Very Important\";\n\tif (level == 3)\n\tpriority = \"Normal\";\n\tif (level == 4)\n\tpriority = \"Low\";\n\tif (level == 5)\n\tpriority = \"Not Important\";\n\t}", "public void setPriorNode(Node<T> prior) {\n\t\t\titsPrior = prior;\n }", "public void setPriority(String priority) {\n this.priority = priority == null ? null : priority.trim();\n }", "@Generated\n @Selector(\"setLoadingPriority:\")\n public native void setLoadingPriority(double value);", "@JsonSetter(\"priority\")\r\n public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(@RequestPriority int priority) {\n this.priority = priority;\n }", "public Node(int value, int priority)\n\t\t{\n\t\t\tthis.value = value;\n\t\t\tthis.priority = priority;\n\t\t\tthis.next = null;\n\t\t}", "public void setPriority(BugPriority newPriority)\n\t{\n\t\tpriority = newPriority;\n\t\tdateModified = new Date();\n\t}", "public void setPriority(RequestPriority priority) {\n mPriority = priority;\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}", "public void setPriorityGroup(int num)\n\t{\n\t\tsetGroup(_Prefix + HardZone.PRIORITY.toString(), num);\n\t}", "public Node (Person data, Priority priority) {\r\n\t\tthis.priorityLevel = priority;\r\n\t\tthis.data = data;\r\n\t}", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:28.362 -0500\", hash_original_method = \"7C8E9A670D06C8AE48DAFFA12CDF6628\", hash_generated_method = \"A7B8E145FAF4202F5F2BD51F427460A3\")\n \n void setPriority(int newPriority){\n \taddTaint(newPriority);\n }", "void setLowNode(Node n){\n low = n;\n }", "void changePriority(int x, int p){\n priorities[x] = p;\n }", "public void insert(int nodeId, int priority) {\n // FILL IN CODE\n\n }", "@NonNull\n @Override\n public SliceActionImpl setPriority(@IntRange(from = 0) int priority) {\n mPriority = priority;\n return this;\n }", "public void setPriority(String priority) {\n\t\tthis.ticketPriority = priority;\n\t}", "public Node(int value, int priority, Node next)\n\t\t{\n\t\t\tthis.value = value;\n\t\t\tthis.priority = priority;\n\t\t\tthis.next = next;\n\t\t}", "public Node(Object data,int priority) {\n this.priority = priority;\n this.data = data;\n }", "public void setPnode(Node<T1> pNode) {\r\n\t\tthis.pnode = pNode;\r\n\t\tcheckRep();\r\n\t}", "public void setSrvPriorityValue(YangUInt32 srvPriorityValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"srv-priority\",\n srvPriorityValue,\n childrenNames());\n }", "void setNode(String path, Node node)\n throws ProcessingException;", "private void setPrioElement(PrioElement pPrioElement, String pName, int pPriority) throws Exception {\r\n\t\tif (pPrioElement != null) {\r\n\t\t\tpPrioElement.setName(pName);\r\n\t\t\tpPrioElement.setPriority(pPriority);\r\n\t\t} else throw new Exception(\"04; sPriE,Edi\");\r\n\t}", "public void changePriority(int newpriority, int element) {\n\t\tif(newpriority<0 || isPresent(element)==false) {\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\tint index= location.get(element);\n\t\t\tint oldP= heap.get(index).priority;\n\t\t\tPair p= new Pair(newpriority,element);\n\t\t\theap.add(index,p);\n\t\t\tif (oldP < newpriority) {\n\t\t\t\tpushDown(index);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpercolateUp(index);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public ToDoBuilder changePriority(String priority) throws IllegalArgumentException{\n if (!priority.equals(\"?\") && !priority.equals(\"null\")) {\n this.priority = Integer.parseInt(priority);\n }\n return this;\n }", "public IssueBuilderAbstract priority(Integer priority){\n if(priority > 0 && priority <= 10)\n fieldPriority = priority;\n else fieldPriority = -1;\n return this;\n }", "public void setLT(TreeNode node)\r\n\t\t{\r\n\t\t\tthis.lThan = node;\r\n\t\t}", "public void setPriorityOrder(int num, boolean bool)\n\t{\n\t\tsetOrder(_Prefix + HardZone.PRIORITY.toString(), num, bool);\n\t}", "public void setWIPriority(java.lang.String newWIPriority) {\n\twiPriority = newWIPriority;\n}", "public void setp(Node n) {\n\t\tp = n;\n\t}", "@Override\n public boolean setPriority(BluetoothDevice bluetoothDevice, int n) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(Stub.DESCRIPTOR);\n boolean bl = true;\n if (bluetoothDevice != null) {\n parcel.writeInt(1);\n bluetoothDevice.writeToParcel(parcel, 0);\n } else {\n parcel.writeInt(0);\n }\n parcel.writeInt(n);\n if (!this.mRemote.transact(10, parcel, parcel2, 0) && Stub.getDefaultImpl() != null) {\n bl = Stub.getDefaultImpl().setPriority(bluetoothDevice, n);\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n parcel2.readException();\n n = parcel2.readInt();\n if (n == 0) {\n bl = false;\n }\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n catch (Throwable throwable) {\n parcel2.recycle();\n parcel.recycle();\n throw throwable;\n }\n }", "public Node setTopNode(Node node);", "public void setPriority(String arg[]) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.PRIORITY.toString(), arg);\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 }", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Set Threshold Probability\")\n public void setThreshold() {\n if(Tools.getGlobalTime()!=0){\n JOptionPane.showMessageDialog(null, \"You can change this probability only when the simulation start\",\"Alert\", JOptionPane.INFORMATION_MESSAGE);\n return;\n }\n String answer = JOptionPane.showInputDialog(null, \"Set the probability that a node can be selected to run.\");\n // Show an information message\n try{\n double k = Double.parseDouble(answer);\n Iterator<Node> it = Tools.getNodeList().iterator();\n while(it.hasNext()){\n Node n = it.next();\n if(n.getClass() == MSNode.class){\n MSNode n1 = (MSNode)n;\n n1.setThresholdProbability(k);\n }\n if(n.getClass() == MS2Node.class){\n MS2Node n1 = (MS2Node)n;\n n1.setThresholdProbability(k);\n }\n }\n JOptionPane.showMessageDialog(null, \"Well done you have set this value:\"+k,\"Notice\", JOptionPane.INFORMATION_MESSAGE);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null, \"You must insert a valid double \", \"Alert\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "public void setNodeA(int x){\n this.nodeA = x;\n }", "public void setSrvPriorityValue(long srvPriorityValue) throws JNCException {\n setSrvPriorityValue(new YangUInt32(srvPriorityValue));\n }", "public void setNode(int _data ) {\r\n\t\t\tdata = _data;\r\n\t\t}", "public void setRank(int value);", "private void setPrio(){\n if (opPrio==null){\n opPrio=new HashMap();\n //from low to high\n Integer prio;\n prio=new Integer(1);\n opPrio.put(new Integer(LexAnn.TT_LOR),prio);\n prio=new Integer(2);\n opPrio.put(new Integer(LexAnn.TT_LAND),prio);\n prio=new Integer(5);\n opPrio.put(new Integer(LexAnn.TT_LEQ),prio);\n opPrio.put(new Integer(LexAnn.TT_LNEQ),prio);\n opPrio.put(new Integer(LexAnn.TT_LGR),prio);\n opPrio.put(new Integer(LexAnn.TT_LGRE),prio);\n opPrio.put(new Integer(LexAnn.TT_LLS),prio);\n opPrio.put(new Integer(LexAnn.TT_LLSE),prio);\n prio=new Integer(10);\n opPrio.put(new Integer(LexAnn.TT_PLUS),prio);\n opPrio.put(new Integer(LexAnn.TT_MINUS),prio);\n prio=new Integer(20);\n opPrio.put(new Integer(LexAnn.TT_MULT),prio);\n opPrio.put(new Integer(LexAnn.TT_DIV),prio);\n opPrio.put(new Integer(LexAnn.TT_MOD),prio);\n }\n }", "public void changePriority(E e, P p) throws NoSuchElementException;", "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}", "private void setNode(DefaultMutableTreeNode node){\n\t\t\n\t\tthis.node = node;\n\t\t\n\t}", "public void insert(T item, int priority) {\n \t\tNode toInsert = new Node(item, priority);\n \t\tsetNode(indexOfLeastPriority, toInsert);\n \t\tbubbleUp(indexOfLeastPriority);\n \t\tindexOfLeastPriority++;\n \t}", "public RegionCreator priority(int priority)\n\t{\n\t\tthis.priority = priority;\n\t\treturn this;\n\t}", "public abstract void increasedPriority(int elementId, float oldRank, float newRank);", "public void setGT(TreeNode node)\r\n\t\t{\r\n\t\t\tthis.gThan = node;\r\n\t\t}", "public void setRank(int num)\r\n {\r\n //Check if the new rank is less than 0 before setting the new rank \r\n if(num < 0)\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING:You cannot assign a negative time\");\r\n }\r\n else \r\n {\r\n this.rank = num;\r\n }//end if\r\n }" ]
[ "0.69807166", "0.6960399", "0.6931398", "0.69264877", "0.67895985", "0.67502075", "0.6748812", "0.6733384", "0.67199767", "0.6707588", "0.6707588", "0.6699782", "0.66942036", "0.6677424", "0.666814", "0.66230434", "0.6611988", "0.6610274", "0.65995765", "0.6590068", "0.6541787", "0.6518711", "0.65138173", "0.65033317", "0.642826", "0.63878363", "0.63454276", "0.63365203", "0.633176", "0.6323574", "0.6310931", "0.624882", "0.62276834", "0.6197224", "0.6193942", "0.6162577", "0.6162471", "0.6116701", "0.611485", "0.6112327", "0.60673374", "0.60441214", "0.60037845", "0.59981036", "0.5970965", "0.5969708", "0.59450006", "0.5933831", "0.5900735", "0.5868184", "0.58531374", "0.5852929", "0.5841558", "0.583313", "0.58265543", "0.58056206", "0.57909024", "0.5781705", "0.57662135", "0.5747072", "0.5736636", "0.57311684", "0.57250476", "0.5703962", "0.57020235", "0.5649445", "0.56426686", "0.56350034", "0.5595422", "0.55948555", "0.55674964", "0.55365616", "0.54954475", "0.5476814", "0.5475592", "0.54717886", "0.5439021", "0.5417244", "0.5406023", "0.54033184", "0.53878915", "0.53792095", "0.5374965", "0.53648275", "0.5364551", "0.53544086", "0.5341253", "0.53132474", "0.5311623", "0.530777", "0.5290578", "0.52843046", "0.5279696", "0.51699495", "0.5157062", "0.51558864", "0.5149993", "0.5142573", "0.5112166" ]
0.74455076
1
A generic directed graph edge.
public static interface DiGraphEdge<N, E> extends GraphEdge<N, E> { public DiGraphNode<N, E> getSource(); public DiGraphNode<N, E> getDestination(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Edge createEdge(Vertex src, Vertex tgt, boolean directed);", "public interface Edge<NodeType extends Comparable<NodeType>,\n WeightType extends Comparable<WeightType>> \n\textends Comparable<Edge<NodeType,WeightType>> {\n\n\t/**\n\t * @return The description of the edge.\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * @param desc The description of the edge.\n\t */\n\tpublic void setDescription(String desc);\n\n\t/**\n\t * @return The source node of this edge.\n\t */\n\tpublic NodeType getSourceNode();\n\n\t/**\n\t * @return The target node of this edge.\n\t */\n\tpublic NodeType getTargetNode();\n\n\t/**\n\t * @return The weight of this edge.\n\t */\n\tpublic WeightType getWeight();\n}", "public Edge<E, V> getUnderlyingEdge();", "public Edge<V> getEdge(V source, V target);", "Edge getEdge();", "E getEdge(int id);", "public Enumeration directedEdges();", "public interface Edge\n extends Comparable\n{\n Vertex getV0 ();\n Vertex getV1 ();\n Object getWeight ();\n boolean isDirected ();\n Vertex getMate (Vertex vertex);\n}", "public Edge<V> addEdge(V source, V target);", "public static GraphEdge createGraphEdgeForEdge() {\n GraphEdge graphEdge = new GraphEdge();\n\n for (int i = 0; i < 2; i++) {\n GraphNode childNode = new GraphNode();\n childNode.setPosition(AccuracyTestHelper.createPoint(20 * i, 10));\n childNode.setSize(AccuracyTestHelper.createDimension(40, 12));\n graphEdge.addContained(childNode);\n }\n graphEdge.addWaypoint(AccuracyTestHelper.createDiagramInterchangePoint(100, 100));\n graphEdge.addWaypoint(AccuracyTestHelper.createDiagramInterchangePoint(250, 200));\n\n // create a Relationship\n Relationship relationship = new IncludeImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(relationship);\n\n graphEdge.setSemanticModel(semanticModel);\n\n return graphEdge;\n }", "@Test\n public void testEdge() {\n Edge<Integer, String> target = new Edge<>(1, 2, \"hello\");\n assertNotNull(target);\n assertEquals(Integer.valueOf(1), target.getFrom());\n assertEquals(Integer.valueOf(2), target.getTo());\n }", "public void treeEdge(Edge e) {}", "public abstract boolean addEdge(Node node1, Node node2, int weight);", "public abstract void addEdge(Point p, Direction dir);", "public interface GraphInterface<V, E extends EdgeInterface<V>> {\n\n\t/**\n\t * Adds a vertex to the graph\n\t * \n\t * @param vertex\n\t * to add to the graph\n\t * \n\t * @return true is vertex was successfully added.\n\t */\n\tpublic boolean addVertex(V vertex);\n\n\t/**\n\t * Adds all vertices in the collection\n\t * \n\t * @param vertices vertices to add\n\t * \n\t * @return true is all vertices were successfully added.\n\t */\n\tpublic boolean addVertices(Collection<? extends V> vertices);\n\n\t/**\n\t * adds all vertices in the array.\n\t * \n\t * @param vs\n\t * Vertices to add\n\t * @return true is all vertices were successfully added.\n\t */\n\t@SuppressWarnings(\"unchecked\")\n\tpublic boolean addVertices(V... vs);\n\n\t/**\n\t * Removes a vertex from the graph\n\t * \n\t * @param vertex\n\t * to remove from the graph\n\t * @return true if the vertex was successfully removed from the graph\n\t */\n\tpublic boolean removeVertex(V vertex);\n\n\t/**\n\t * Remove a set of vertices\n\t * \n\t * @param vertices\n\t * Set of vertices to remove\n\t * \n\t * @return true if all vertices were successfully removed\n\t */\n\tpublic boolean removeVertices(Collection<? extends V> vertices);\n\n\t/**\n\t * Gets the set of vertices of the graph\n\t * \n\t * @return set of vertices in the graph\n\t */\n\tpublic Set<V> getVertices();\n\n\t/**\n\t * Adds an edge to the graph\n\t * \n\t * @param tail\n\t * Tail of the edge\n\t * @param head\n\t * Head of the edge\n\t * @return the new edge\n\t */\n\tpublic E addEdge(V tail, V head);\n\n\t/**\n\t * Gets all edge incident to a given vertex\n\t * \n\t * @param tail\n\t * tail of the edge\n\t * @return Set of all edge incident to a given vertex\n\t */\n\tpublic Set<E> getEdges(V tail);\n\n\t/**\n\t * Gets all edges from the tail to the head\n\t * \n\t * @param tail\n\t * tail of the edge\n\t * @param head\n\t * head of the edge\n\t * @return Set of all edge between tail and head.\n\t */\n\tpublic Set<E> getEdges(V tail, V head);\n\n\t/**\n\t * Get the Edges of the graph\n\t * \n\t * @return Set of edges\n\t */\n\tpublic Set<E> getEdges();\n\t\n\t/**\n\t * Performs the given action for each element of\n\t * the Iterable until all elements have been\n\t * processed or the action throws an exception. \n\t * \n\t * @param comsumer \n\t */\n\tpublic void forEachVertex(Consumer<V> comsumer);\n\t\n\t/**\n\t * Performs the given action for each element of \n\t * the Iterable until all elements have been \n\t * processed or the action throws an exception. \n\t * \n\t * @param consumer\n\t */\n\tpublic void forEachEdge(Consumer<E> consumer);\n\n\t/**\n\t * Removes a set of edges\n\t * \n\t * @param edges\n\t * Set of edges to remove\n\t * @return true if all edges were removed successfully\n\t */\n\tpublic boolean removeEdges(Collection<? extends E> edges);\n\n\t/**\n\t * Removes an edge from the graph\n\t * \n\t * @param edge\n\t * to remove\n\t * @return true if the edge was successfully removed.\n\t */\n\tpublic boolean removeEdge(E edge);\n\n\t/**\n\t * Removes all edge from the graph between tail and head\n\t * \n\t * @param tail\n\t * tail of the edge to remove\n\t * @param head\n\t * head of the edge to remove\n\t * \n\t * @return true if the edge was successfully removed.\n\t */\n\tpublic boolean removeEdge(V tail, V head);\n\n\t/**\n\t * Removes all edge incident with a vertex\n\t * \n\t * @param tail\n\t * tail of the edge\n\t * \n\t * @return true if all edges were deleted incident to a vertex\n\t */\n\tpublic boolean removeEdge(V tail);\n\n\t/**\n\t * Removes all edges from the graph\n\t * \n\t * @return true if all edges were removed\n\t */\n\tpublic boolean resetEdges();\n\n\t/**\n\t * Gets the {@link org.gt4j.annas.graph.EdgeFactory} used by the graph\n\t * \n\t * @return EdgeFactory used by the graph\n\t */\n\tpublic EdgeFactory<V, E> getEdgeFactory();\n\n\t/**\n\t * Checks if the graph contains an edge between two vertices\n\t * \n\t * @param head head of edge\n\t * @param tail tail of edge\n\t * @return true if the edge is in the graph\n\t */\n\tpublic boolean containsEdge(V head, V tail);\n\n\t/**\n\t * Checks if a vertex is in the graph\n\t * \n\t * @param edge edge \n\t * @return true if the edge is in the graph\n\t */\n\tpublic boolean containsEdge(E edge);\n\n\t/**\n\t * Checks if a vertex is in the graph\n\t * \n\t * @param vertex vertex to check\n\t * @return true if the vertex is in the graph\n\t */\n\tpublic boolean containsVertex(V vertex);\n\n\t/**\n\t * Number of edges contained within the graph\n\t * \n\t * @return number of edges in the graph\n\t */\n\tpublic int getSize();\n\n\t/**\n\t * Number of vertices contained within the graph\n\t * \n\t * @return number of vertices in the graph\n\t */\n\tpublic int getOrder();\n\n\t/**\n\t * Degree of vertex (Out degree for directed graphs)\n\t * \n\t * @param vertex vertex to get degree of\n\t * @return degree of the given vertex\n\t */\n\tpublic int getDegree(V vertex);\n\n\t/**\n\t * Get current {@link org.gt4j.annas.graph.GraphObserver}\n\t * \n\t * @return GraphObserver\n\t */\n\tpublic GraphObserver<V, E> getObserver();\n\n\t/**\n\t * Set the {@link org.gt4j.annas.graph.GraphObserver}\n\t * \n\t * @param GO graph observer\n\t */\n\tpublic void setObserver(GraphObserver<V, E> GO);\n\n\t/**\n\t * Gets edge class\n\t * \n\t * @return edge class\n\t */\n\tpublic Class<?> getEdgeClass();\n\n\t/**\n\t * Returns if the graph is directed\n\t * \n\t * @return true if the graph is directed\n\t */\n\tpublic boolean isDirected();\n}", "void addEdge(int x, int y);", "void add(Edge edge);", "boolean addEdge(E edge);", "public interface GraphEdge extends org.omg.uml.diagraminterchange.GraphElement {\n /**\n * Returns the value of attribute waypoints.\n * @return Value of waypoints attribute.\n */\n public java.util.List getWaypoints();\n /**\n * Returns the value of reference anchor.\n * @return Value of reference anchor.\n */\n public java.util.List getAnchor();\n}", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge getEdge(int index);", "LabeledEdge getLabeledEdge();", "@DisplayName(\"Add directed edge\")\n @Test\n public void testAddEdgeDirected() {\n graph.addEdge(new Edge(3, 4));\n List<Integer> l = new ArrayList<>();\n l.add(2);\n l.add(4);\n Assertions.assertArrayEquals(l.toArray(), graph.getNeighbours(3).toArray());\n }", "public interface Edge\n{\n\t/**\n\t * Returns the node that the <i>head</i> of the head\n\t * is connected to.\n\t * @return The head Node.\n\t */\n\tpublic Node getHeadNode();\n\n\t/**\n\t * Returns the node that the <i>tail</i> of the edge\n\t * is connected to.\n\t * @return The tail Node.\n\t */\n\tpublic Node getTailNode();\n\n\t/**\n\t * Allows an object to be associated with the <code>Edge</code>\n\t * @param o The object to be set as the userObject\n\t */\n\tpublic void setUserObject(Object o);\n\n\t/**\n\t * Gets the userObject, previously set with <code>setUserObject(Object o)</code>\n\t * @return The userObject, or <code>null</code> if no object has been set.\n\t */\n\tpublic Object getUserObject();\n\n\t/**\n\t * Causes any information in the path that represents the <code>Egde</code>\n\t * to be cleared, such as origin location and any control points.\n\t */\n\tpublic void resetPath();\n\n\t/**\n\t * Sets the location of the start of the path that represents\n\t * the <code>Edge</code>.\n\t * @param x The horizontal location.\n\t * @param y The vertical location.\n\t */\n\tpublic void setPathOrigin(int x, int y);\n\n\t/**\n\t * Extends the <code>Edge</code> using the following control points to\n\t * form a Bezier curve extension to the end point (x3, y3).\n\t * @param x1 Horizontal location of control point 1\n\t * @param y1 Vertical location of control point 1\n\t * @param x2 Horizontal location of control point 2\n\t * @param y2 Vertical location of control point 2\n\t * @param x3 Horizontal location of the end point.\n\t * @param y3 Vertical location of the end point.\n\t */\n\tpublic void pathTo(int x1, int y1, int x2, int y2, int x3, int y3);\n\n\t/**\n\t * Extends the <code>Edge</code> to the specified location using\n\t * a straight line.\n\t * @param x The horizontal location of the end point.\n\t * @param y The vertical location of the end point.\n\t */\n\tpublic void pathTo(int x, int y);\n\n\t/**\n\t * Sets the <code>Edge's</code> arrowhead.\n\t * @param baseX The x location of the centre of the arrowhead baseline.\n\t * @param baseY The y location of the centre of the arrowhead tip.\n\t * @param tipX The x location of the tip of the arrowhead.\n\t * @param tipY The y location of the tip of the arrowhead.\n\t */\n\tpublic void setArrowHead(int baseX, int baseY, int tipX, int tipY);\n\n\t/**\n\t * Sets the <code>Edge's</code> arrowtail\n\t * @param baseX The x location of the centre of the arrowhead baseline.\n\t * @param baseY The y location of the centre of the arrowhead tip.\n\t * @param tipX The x location of the tip of the arrowhead.\n\t * @param tipY The y location of the tip of the arrowhead.\n\t */\n\tpublic void setArrowTail(int baseX, int baseY, int tipX, int tipY);\n\n\t/**\n\t * Sets the <code>Edge</code>'s label position.\n\t * @param x The horizontal location (in pixels).\n\t * @param y The vertical location (in pixels).\n\t */\n\tpublic void setLabelPosition(int x, int y);\n\n\t/**\n\t * Retrieves the position of the <code>Edge's</code> label.\n\t * @return A <code>Point</code> containing the position of\n\t * the label.\n\t */\n\tpublic Point getLabelPosition();\n\n\t/**\n\t * Gets the <code>Shape</code> that represents the <code>Edge</code>.\n\t * @return The <code>Shape</code> of the <code>Edge</code>.\n\t */\n\tpublic Shape getShape();\n\n\t/**\n\t * Gets the direction of the <code>Edge</code>. This is one of the\n\t * predefined direction from the <code>GraphModel</code> interface.\n\t * @return The direction of the <code>Edge</code>.\n\t */\n\tpublic int getDirection();\n\n\n}", "void addEdge(int source, int destination, int weight);", "public interface Graph\n{\n int getNumV();\n boolean isDirected();\n void insert(Edge edge);\n boolean isEdge(int source, int dest);\n Edge getEdge(int source, int dest);\n Iterator<Edge> edgeIterator(int source);\n}", "public void addEdge(Node from, Node to);", "public interface DirectedGraph {\n\n /**\n * Set a graph label\n * @param label a graph label\n */\n void setGraphLabel(String label);\n\n /**\n * @return the graph label\n */\n String getGraphLabel();\n\n /**\n * Add a node in graph\n * @param node\n * @throws IllegalArgumentException if node is negative\n */\n void addNode(int node);\n\n /**\n * Associating metadata to node\n * @param node the node id\n * @param key the metadata key\n * @param value the metadata value\n */\n void addNodeMetadata(int node, String key, String value);\n\n /**\n * Get the value of the metadata associated with the given node\n * @param node the node to get metadata for\n * @param key the metadata key\n * @return the value or null if not found\n */\n String getNodeMetadataValue(int node, String key);\n\n /**\n * @return the node given the label or -1 if not found\n */\n int getNodeFromMetadata(String metadata);\n\n /**\n * Add an edge in graph from tail to head and return its index\n * @param tail predecessor node\n * @param head successor node\n * @return the edge id or -1 if already exists\n */\n int addEdge(int tail, int head);\n\n /**\n * Set an edge label\n * @param edge a edge id\n * @param label a node label\n */\n void setEdgeLabel(int edge, String label);\n\n /**\n * @return the edge label\n */\n String getEdgeLabel(int edge);\n\n /**\n * @return an array of graph nodes\n */\n int[] getNodes();\n\n /**\n * @return an array of graph edges\n */\n int[] getEdges();\n\n /**\n * @return the edge id from end points or -1 if not found\n */\n int getEdge(int tail, int head);\n\n /**\n * Get the incoming and outcoming edges for the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getEdgesIncidentTo(int... nodes);\n\n /**\n * Get the incoming edges to the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getInEdges(int... nodes);\n\n /**\n * Get the outcoming edges from the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getOutEdges(int... nodes);\n\n /**\n * @return the tail node of the given edge or -1 if not found\n */\n int getTailNode(int edge);\n\n /**\n * @return the head node of the given edge or -1 if not found\n */\n int getHeadNode(int edge);\n\n /**\n * @return true if node belongs to graph else false\n */\n boolean containsNode(int node);\n\n /**\n * @return true if edge belongs to graph else false\n */\n boolean containsEdge(int edge);\n\n /**\n * @return true if tail -> head edge belongs to graph else false\n */\n boolean containsEdge(int tail, int head);\n\n /**\n * @return ancestors of the given node\n */\n int[] getAncestors(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node, int maxDepth);\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n boolean isAncestorOf(int queryAncestor, int queryDescendant);\n\n /**\n * @return the predecessors of the given node\n */\n int[] getPredecessors(int node);\n\n /**\n * @return the successors of the given node\n */\n int[] getSuccessors(int node);\n\n /**\n * @return the number of head ends adjacent to the given node\n */\n int getInDegree(int node);\n\n /**\n * @return the number of tail ends adjacent to the given node\n */\n int getOutDegree(int node);\n\n /**\n * @return the sources (indegree = 0) of the graph\n */\n int[] getSources();\n\n /**\n * @return the sinks (outdegree = 0) of the graph\n */\n int[] getSinks();\n\n /**\n * @return the subgraph of this graph composed of given nodes\n */\n DirectedGraph calcSubgraph(int... nodes);\n\n /**\n * @return the total number of graph nodes\n */\n default int countNodes() {\n\n return getNodes().length;\n }\n\n /**\n * @return the total number of graph edges\n */\n default int countEdges() {\n\n return getEdges().length;\n }\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n default boolean isDescendantOf(int queryDescendant, int queryAncestor) {\n\n return isAncestorOf(queryAncestor, queryDescendant);\n }\n\n default boolean isSource(int node) {\n return getInDegree(node) == 0 && getOutDegree(node) > 0;\n }\n\n default boolean isSink(int node) {\n return getInDegree(node) > 0 && getOutDegree(node) == 0;\n }\n\n /**\n * The height of a rooted tree is the length of the longest downward path to a leaf from the root.\n *\n * @return the longest path from the root or -1 if it is not a tree\n */\n default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }\n\n class NotATreeException extends Exception {\n\n public NotATreeException() {\n\n super(\"not a tree\");\n }\n }\n\n class NotATreeMultipleRootsException extends NotATreeException {\n\n private final int[] roots;\n\n public NotATreeMultipleRootsException(int[] roots) {\n\n super();\n this.roots = roots;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", roots=\" + Arrays.toString(this.roots);\n }\n }\n\n class CycleDetectedException extends NotATreeException {\n\n private final TIntList path;\n\n public CycleDetectedException(TIntList path) {\n\n super();\n\n this.path = path;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", path=\" + this.path;\n }\n }\n}", "public Node(Edge edge) {\n this.edge = edge;\n }", "@Override\n public edge_data getEdge(int src, int dest) {\n if (!nodes.containsKey(src)) return null;\n node_data sourceNode = nodes.get(src);\n return ((NodeData) sourceNode).getEdge(dest);\n }", "public interface DiGraph< VKeyT, VDataT, EDataT > {\n\n // Methods to build the graph\n\n /**\n * Add a vertex to the graph. If the graph already contains a vertex\n * with the given key the old data will be replaced by the new data.\n *\n * @param key the key that identifies the vertex.\n * @param data the data to be associated with the vertex.\n */\n\n public void addVertex( VKeyT key, VDataT data );\n\n /**\n * Add an edge to the graph starting at the vertex identified by\n * fromKey and ending at the vertex identified by toKey. If either of\n * the vertices do not exist a NoSuchVertexException will be thrown.\n * If the graph already contains this edge, the old data will be replaced\n * by the new data.\n *\n * @param fromKey the key associated with the starting vertex of the edge.\n * @param toKey the key associated with the ending vertex of the edge.\n * @param data the data to be associated with the edge.\n *\n * @exception NoSuchVertexException if either end point is not a\n * key associated with a vertex in the graph.\n */\n\n public void addEdge( VKeyT fromKey, VKeyT toKey, EDataT data )\n throws NoSuchVertexException;\n\n // Operations on edges\n\n /**\n * Return true if the edge defined by the given vertices is an\n * edge in the graph. False will be returned if the edge is not\n * in the graph. A NoSuchVertexException will be thrown if either\n * of the vertices do not exist.\n *\n * @param fromKey the key of the vetex where the edge starts.\n * @param toKey the key of the vertex where the edge ends.\n *\n * @return true if the edge defined by the given vertices is in\n * the graph and false otherwise.\n *\n * @exception NoSuchVertexException if either end point is not a\n * key associated with a vertex in the graph.\n */\n\n public boolean isEdge( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;\n\n /**\n * Return a reference to the data associated with the edge that is \n * defined by the given end points. Null will be returned if the \n * edge is not in the graph. Note that a return value of null does\n * not necessarily imply that the edge is not in the graph. It may\n * be the case that the data associated with the edge is null. A \n * NoSuchVertexException will be thrown if either of the end points \n * do not exist.\n *\n * @param fromKey the key of the vertex where the edge starts.\n * @param toKey the key of the vertex where the edge ends.\n *\n * @return a reference to the data associated with the edge defined by\n * the specified end points. Null is returned if the edge \n * is not in the graph.\n *\n * @exception NoSuchVertexException if either end point is not a\n * key associated with a vertex in the graph.\n */\n\n public EDataT getEdgeData( VKeyT fromKey, VKeyT toKey )\n throws NoSuchVertexException;\n\n // Operations on vertices\n\n /**\n * Returns true if the graph contains a vertex with the associated\n * key.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return true if the key is associated with a vertex in the graph\n * and false otherwise.\n */\n\n public boolean isVertex( VKeyT key );\n\n /**\n * Return a reference to the data associated with the vertex \n * identified by the key. A NoSuchVertexException will be thrown\n * if the key is not associated with a vertex in the graph.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return the data associated with the vertex that is identifed by the\n * key.\n *\n * @exception NoSuchVertexException if the key is not associated\n * with a vertex in the graph.\n */\n\n public VDataT getVertexData( VKeyT key ) throws NoSuchVertexException;\n\n /**\n * Returns a count of the number of vertices in the graph.\n *\n * @return the count of the number of vertices in this graph\n */\n\n public int numVertices();\n\n /**\n * Return the in degree of the vertex that is associated with the\n * given key. Negative 1 is returned if the vertex cannot be found.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return the in degree of the vertex associated with the key or\n * -1 if the vertex is not in the graph.\n */\n\n public int inDegree( VKeyT key );\n\n /**\n * Return the out degree of the vertex that is associated with the\n * given key. Negative 1 is returned if the vertex cannot be found.\n *\n * @param key the key of the vertex being looked for.\n *\n * @return the out degree of the vertex associated with the key or\n * -1 if the vertex is not in the graph.\n */\n\n public int outDegree( VKeyT key );\n\n /**\n * Returns a collection containing the data associated with the\n * neighbors of the vertex identified by the specified key.\n * The collection will be empty if there are no neighbors. A\n * NoSuchVertexException will be thrown if the key is not associated\n * with a vertex in the graph.\n *\n * @param key the key associated with the vertex whose neighbors we\n * wish to obtain.\n *\n * @return a collection containing the data associated with the neighbors\n * of the vertex with the given key. The collection will be\n * empty if the vertex does not have any neighbors.\n *\n * @exception NoSuchVertexException if the key is not associated\n * with a vertex in the graph.\n */\n\n public Collection< VDataT > neighborData( VKeyT key )\n throws NoSuchVertexException;\n\n /**\n * Returns a collection containing the keys associated with the\n * neighbors of the vertex identified by the specified key.\n * The collection will be empty if there are no neighbors. A\n * NoSuchVertexException will be thrown if the key is not associated\n * with a vertex in the graph.\n *\n * @param key the key associated with the vertex whose neighbors we\n * wish to obtain.\n *\n * @return a collection containing the keys associated with the neighbors\n * of the vertex with the given key. The collection will be\n * empty if the vertex does not have any neighbors.\n *\n * @exception NoSuchVertexException if the key is not associated with\n * a vertex in the graph.\n */\n\n public Collection< VKeyT > neighborKeys( VKeyT key )\n throws NoSuchVertexException;\n\n // Utility\n\n /**\n * Returns a collection containing the data associated with all of\n * the vertices in the graph.\n *\n * @return a collection containing the data associated with the\n * vertices in the graph.\n */\n\n public Collection< VDataT > vertexData();\n\n /**\n * Returns a collection containing the keys associated with all of\n * the vertices in the graph.\n *\n * @return a collection containing the keys associated with the\n * vertices in the graph.\n */\n\n public Collection< VKeyT > vertexKeys();\n\n /**\n * Return a collection containing all of the data associated with the\n * edges in the graph.\n *\n * @return a collection containing the data associated with the edges\n * in this graph.\n */\n \n public Collection< EDataT > edgeData();\n\n /**\n * Remove all vertices and edges from the graph.\n */\n\n public void clear();\n\n}", "@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}", "public void drawEdges(IEdgeDrawerGraph graph);", "public String descriptor() {\n\t\treturn \"edge\";\n\t}", "public abstract boolean putEdge(Edge incomingEdge);", "private SumoEdge getEdge(String id) {\n\t\treturn idToEdge.get(id);\n\t}", "public Edge getEdge(String edgeTypeName, Node source, Node dest)\r\n {\r\n\treturn source.getEdge(edgeTypeName, dest);\r\n }", "public interface Vertex<V extends Vertex<V, E>, E extends Edge<V, E>> {\n\n /**\n * Getter for the vertex's neighbors.\n *\n * @return A set of edges, representing all the edge of neighbors to the\n * vertex.\n */\n Set<E> getForwardNeighbors();\n\n Set<E> getBackwardNeighbors();\n\n /**\n * Getter for the ID of the vertex.\n *\n * @return A string, representing the ID of the vertex.\n */\n String getID();\n\n\n /**\n * Get edge that will be used in best path to get to this node\n * @return best edge\n */\n E getBestIncoming();\n\n /**\n * set edge that will be used in best path to get to this node\n * @return best edge\n */\n void setBestIncoming(E edge);\n\n}", "Edge(Node from,Node to, int length){\n this.source=from;\n this.destination=to;\n this.weight=length;\n }", "public EdgeImpl(Vertex sourceVertex, Vertex targetVertex, Graph graph) {\n this.sourceVertex = sourceVertex;\n this.targetVertex = targetVertex;\n this.graph = graph;\n }", "public T caseGraphicalEdge(GraphicalEdge object) {\n\t\treturn null;\n\t}", "public void addEdge( EdgeIntf edge ) throws Exception {\r\n DirectedEdge dEdge = ( DirectedEdge ) edge;\r\n Vertex fromVertex = dEdge.getSource();\r\n Vertex toVertex = dEdge.getSink();\r\n\r\n if( !isPath( toVertex, fromVertex ))\r\n super.addEdge( dEdge );\r\n else\r\n throw new CycleException();\r\n }", "public E addEdge(V tail, V head);", "protected void processEdge(Edge e) {\n\t}", "public interface IRoutableEdge<N extends INode> extends IEdge<N> {\n /**\n * Set the shape of the path taken for the edge\n * @param route path\n */\n void setRoute(Shape route);\n}", "public void addEdge(E e){\n\t\tedges.add(e);\n\t}", "public boolean addEdge(T begin, T end, int weight);", "public interface EdgeInt<E> extends DecorablePosition<E> {\n\n}", "public static interface DiGraphNode<N, E> extends GraphNode<N, E> {\n\n public List<? extends DiGraphEdge<N, E>> getOutEdges();\n\n public List<? extends DiGraphEdge<N, E>> getInEdges();\n\n /** Returns whether a priority has been set. */\n boolean hasPriority();\n\n /**\n * Returns a nonnegative integer priority which can be used to order nodes.\n *\n * <p>Throws if a priority has not been set.\n */\n int getPriority();\n\n /** Sets a node priority, must be non-negative. */\n void setPriority(int priority);\n }", "public abstract GraphEdge<N, E> getFirstEdge(N n1, N n2);", "public abstract List<? extends GraphEdge<N, E>> getEdges();", "public Edge() {}", "String getIdEdge();", "public IEdge<?> getEdge() {\n\t\treturn this.edge;\n\t}", "public Edge edgeAt( int index ) {\r\n return (Edge)edges.elementAt(index);\r\n }", "public interface IHyperEdge<V extends IVertex> extends IGObject {\n /**\n * Add vertex to the edge\n *\n * @param v Vertex to add\n * @return Vertex added to the edge, <code>null</code> upon failure\n */\n public V addVertex(V v);\n\n /**\n * Add collection of vertices to the edge\n *\n * @param vs Collection of vertices to add\n * @return Collection of vertices added to the edge, <code>null</code> if no vertex was added\n */\n public Collection<V> addVertices(Collection<V> vs);\n\n /**\n * Remove vertex from the edge\n *\n * @param v Vertex to remove\n * @return Vertex that was removed, <code>null</code> upon failure\n */\n public V removeVertex(V v);\n\n /**\n * Remove collection of vertices from the edge\n *\n * @param vs Collection of vertices to remove\n * @return Collection of vertices removed from the edge, <code>null</code> if no vertex was removed\n */\n public Collection<V> removeVertices(Collection<V> vs);\n\n /**\n * Check if the edge connects vertex\n *\n * @param v Vertex to check\n * @return <code>true</code> if the edge connects vertex, <code>false<code> otherwise\n */\n public boolean connectsVertex(V v);\n\n /**\n * Check if the edge connects vertices\n *\n * @param v Collection of vertices to check\n * @return <code>true</code> if the edge connects all the vertices, <code>false<code> otherwise\n */\n public boolean connectsVertices(Collection<V> vs);\n\n /**\n * Get other vertices than the one proposed\n *\n * @param v Vertex proposed\n * @return Collection of other vertices of the edge\n */\n public Collection<V> getOtherVertices(V v);\n\n /**\n * Get other vertices than the ones in the collection proposed\n *\n * @param vs Collection of vertices proposed\n * @return Collection of other vertices of the edge\n */\n public Collection<V> getOtherVertices(Collection<V> vs);\n\n\n /**\n * Get vertices of the edge\n *\n * @return Collection of the edge vertices\n */\n public Collection<V> getVertices();\n\n /**\n * Destroy the edge, unlink from the graph\n */\n public void destroy();\n}", "public edge_data getEdge(int nodeKey) {\n return this.neighborEdges.get(nodeKey);\n }", "public Edge(String graphId, String id, short direction) throws DisJException {\n\t this(graphId, id, direction, null, null);\n\t}", "public Edge(T node_1, T node_2,S label) {\n\t\tparent = node_1;\n\t\tchild = node_2;\n\t\tl = label;\n\t\tcheckRep();\n\t}", "public abstract boolean getEdge(Point a, Point b);", "public Edge(Node source, Node sink) {\n\t\tsuper();\n\t\t_source = source;\n\t\t_sink = sink;\n\t}", "public SimpleEdge getEdge() {\n return edge;\n }", "public abstract void connect(N n1, E edge, N n2);", "@DisplayName(\"Has edge\")\n @Test\n public void testHasEdge() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n Assertions.assertTrue(graph.hasEdge(new Edge(0, 1)));\n }", "public boolean addEdge(T beg, T end);", "public void drawUndirectedEdge(String label1, String label2) {\n }", "void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;", "@Test\n\tvoid testAddEdge() {\n\t\tgeo_location ge = new GeoLoc(0,1,2);\n\t\tnode_data n0 =new NodeData(0,ge);\n\t\tgeo_location ge1 = new GeoLoc(0,6,2);\n\t\tnode_data n1 =new NodeData(2,ge1);\n\t\tgraph.addNode(n0);\n\t\tgraph.addNode(n1);\n\t\tedge_data e = new EdgeData(0, 2, 20);\n\t\tgraph.connect(0, 2, 20);\n\t\tedge_data actual = graph.getEdge(0, 2);\n\t\tedge_data expected = e;\n\t\tassertEquals(expected.getSrc(), actual.getSrc());\n\t\tassertEquals(expected.getDest(), actual.getDest());\n\t\tassertEquals(expected.getWeight(), actual.getWeight());\n\t}", "EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }", "public Enumeration undirectedEdges();", "public void addEdge(int start, int end, double weight);", "public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }", "public void addEdge(int start, int end);", "@DisplayName(\"Add undirected edge\")\n @Test\n public void testAddEdgeUndirected() {\n graph.addEdge(new Edge(3, 4));\n List<Integer> l0 = new ArrayList<>();\n l0.add(0);\n List<Integer> l1 = new ArrayList<>();\n l1.add(4);\n Assertions.assertEquals(l0.get(0), graph.getNeighbours(4).get(0));\n Assertions.assertEquals(l1.get(0), graph.getNeighbours(0).get(0));\n }", "private Edge(String graphId, String id, short direction, Node start, Node end)\n\t\t\tthrows DisJException {\n\t\tthis(graphId, id, true, direction, IConstants.MSGFLOW_FIFO_TYPE, IConstants.MSGDELAY_LOCAL_FIXED,\n\t\t\t\tIConstants.MSGDELAY_SEED_DEFAULT, start, end);\n\t}", "public double getEdge()\n {\n return this.edge;\n }", "public void addEdge(DirectedEdge e) \n {\n int v = e.from();\n adj[v].add(e);\n E++;\n }", "@Override\n\tpublic edge_data getEdge(int src, int dest) {\n\t\tif(Nodes.containsKey(src) && Nodes.containsKey(dest) && Edges.get(src).containsKey(dest)) {\n\t\t\treturn Edges.get(src).get(dest);\n\t\t}\n\t\treturn null;\n\t}", "public void setEdge(IEdge<?> edge) {\n\t\tthis.edge = edge;\n\t}", "public void addEdge(Integer id, UNode n1, UNode n2, String edge)\r\n {\r\n UEdge e = new UEdge(id, n1, n2, edge);\r\n n1.addOutEdge(e);\r\n n2.addInEdge(e);\r\n uEdges.put (id, e);\r\n }", "public Edge(Edge other) {\n __isset_bitfield = other.__isset_bitfield;\n this.vertexOrigin = other.vertexOrigin;\n this.vertexDestiny = other.vertexDestiny;\n if (other.isSetDescription()) {\n this.description = other.description;\n }\n this.weight = other.weight;\n this.isDirected = other.isDirected;\n }", "protected void addEdge(CyEdge edge, LayoutNode v1, LayoutNode v2) {\n\tLayoutEdge newEdge = new LayoutEdge(edge, v1, v2);\n\tupdateWeights(newEdge);\n\tedgeList.add(newEdge);\n }", "public Edge(Node source, Node sink, Object weight) {\n\t\tthis(source, sink);\n\t\tsetWeight(weight);\n\t}", "public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }", "public Edge(int id) {\r\n\t\tsuper();\r\n\t\tthis.id = id;\r\n\t}", "protected Edge getEdge() {\r\n\t\treturn (Edge)getModel();\r\n\t}", "public EdgeImpl(Vertex sourceVertex, Vertex targetVertex, double edgeWeight, Graph graph) {\n this.sourceVertex = sourceVertex;\n this.targetVertex = targetVertex;\n this.edgeWeight = edgeWeight;\n this.graph = graph;\n }", "public void testAddEdgeEdge( ) {\n init( );\n\n try {\n m_g1.addEdge( m_eLoop ); // loops not allowed\n assertFalse( );\n }\n catch( IllegalArgumentException e ) {\n assertTrue( );\n }\n\n try {\n m_g3.addEdge( null );\n assertFalse( ); // NPE\n }\n catch( NullPointerException e ) {\n assertTrue( );\n }\n\n Edge e = m_eFactory.createEdge( m_v2, m_v1 );\n\n try {\n m_g1.addEdge( e ); // no such vertex in graph\n assertFalse( );\n }\n catch( IllegalArgumentException ile ) {\n assertTrue( );\n }\n\n assertEquals( false, m_g2.addEdge( e ) );\n assertEquals( false, m_g3.addEdge( e ) );\n assertEquals( true, m_g4.addEdge( e ) );\n }", "public IEdge addEdge(String from, String to, Double cost);", "public T caseEdge(Edge object) {\n\t\treturn null;\n\t}", "public Edge(Node from, Node to, int weight) {\n this.from = from;\n this.to = to;\n this.weight = weight;\n }", "public Edge(DomainClass source, DomainClass target, EdgeType type, Direction direction) {\n this.source = source;\n this.target = target;\n this.type = type;\n this.direction = direction;\n }", "public:\n Graph(int V); // Constructor\n void addEdge(int v, int w);", "private EdgeType getEdgeType()\r\n\t{\r\n\t return edgeType;\r\n\t}", "public abstract List<? extends GraphEdge<N, E>> getEdges(N n1, N n2);", "@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }", "void addDirectedEdge(final Node first, final Node second)\n {\n if ( first == second )\n {\n return;\n }\n else if (first.connectedNodes.contains(second))\n return;\n else\n first.connectedNodes.add(second);\n }", "public void addEdge(Edge e){\n edgeList.add(e);\n }", "public Enumeration edges();", "private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}", "public DirectedEdge(Graph g, Vertex v1, Vertex v2){\n\t\tsuper(g, v1, v2);\n\t\tthis.source = v1;\n\t}" ]
[ "0.7310592", "0.7252605", "0.7146868", "0.68928576", "0.6869475", "0.68614244", "0.66802025", "0.66536057", "0.6613309", "0.6557706", "0.6499943", "0.6496203", "0.64456546", "0.63840103", "0.63807946", "0.6334212", "0.63214666", "0.63193727", "0.63118213", "0.63036394", "0.62912816", "0.62910324", "0.62748235", "0.6232785", "0.6229242", "0.62083477", "0.6207274", "0.6192343", "0.6191275", "0.6190719", "0.6182119", "0.61795765", "0.6160348", "0.61565197", "0.6154528", "0.6152715", "0.6132273", "0.6122429", "0.61169004", "0.6115723", "0.6081833", "0.6075046", "0.6071384", "0.60599995", "0.60552514", "0.60543054", "0.60497266", "0.6049155", "0.60329515", "0.60094273", "0.6008544", "0.5998601", "0.59878296", "0.5974354", "0.5968411", "0.59672374", "0.59622663", "0.59569776", "0.595137", "0.59451497", "0.59326875", "0.59107745", "0.59092987", "0.5901666", "0.5897946", "0.5890448", "0.5885572", "0.5878176", "0.5877678", "0.58501214", "0.5848382", "0.5846798", "0.58387727", "0.58366", "0.5826458", "0.58218926", "0.58180404", "0.5812764", "0.58086264", "0.5797888", "0.57931703", "0.5791049", "0.57905954", "0.57860535", "0.57840765", "0.578184", "0.5776561", "0.5772118", "0.5769444", "0.5766514", "0.57640845", "0.5758596", "0.57579166", "0.5755305", "0.57524264", "0.57486236", "0.57461494", "0.57453215", "0.57447934", "0.57395434" ]
0.74264145
0
Create a new match statement.
public Match(final Expr expr, final List<MatchAbstractBranch> branchList) { this.expr = expr; this.branchList = branchList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Match createMatch();", "public Match( ) {\n\n }", "public Match(){\n this(-1, null, 0, 0, null, null);\n }", "public abstract Match match();", "public static void matchMaker()\n {\n \n }", "private OFMatch construct_match() throws IllegalArgumentException \n {\n List<String> match_string_as_list = new ArrayList<String>();\n if (ingress_port != null)\n {\n match_string_as_list.add(\n OFMatch.STR_IN_PORT + \"=\" + ingress_port);\n }\n \n if (src_mac_address != null)\n {\n match_string_as_list.add(\n OFMatch.STR_DL_SRC + \"=\" + src_mac_address);\n }\n\n if (dst_mac_address != null)\n {\n match_string_as_list.add(\n OFMatch.STR_DL_DST + \"=\" + dst_mac_address);\n }\n\n if (vlan_id != null)\n {\n match_string_as_list.add(\n OFMatch.STR_DL_VLAN + \"=\" + vlan_id);\n }\n\n if (vlan_priority != null)\n {\n match_string_as_list.add(\n OFMatch.STR_DL_VLAN_PCP + \"=\" + vlan_priority);\n }\n\n if (ether_type != null)\n {\n match_string_as_list.add(\n OFMatch.STR_DL_TYPE + \"=\" + ether_type);\n }\n\n if (tos_bits != null)\n {\n match_string_as_list.add(\n OFMatch.STR_NW_TOS + \"=\" + tos_bits);\n }\n\n if (protocol != null)\n {\n match_string_as_list.add(\n OFMatch.STR_NW_PROTO + \"=\" + protocol);\n }\n\n if (ip_src != null)\n {\n match_string_as_list.add(\n OFMatch.STR_NW_SRC + \"=\" + ip_src);\n }\n\n if (ip_dst != null)\n {\n match_string_as_list.add(\n OFMatch.STR_NW_DST + \"=\" + ip_dst);\n }\n \n if (src_port != null)\n {\n match_string_as_list.add(\n OFMatch.STR_TP_SRC + \"=\" + src_port);\n }\n\n if (dst_port != null)\n {\n match_string_as_list.add(\n OFMatch.STR_TP_DST + \"=\" + dst_port);\n }\n\n StringBuffer match_string = new StringBuffer();\n for (int i = 0; i < match_string_as_list.size(); ++i)\n {\n match_string.append(match_string_as_list.get(i));\n if (i != (match_string_as_list.size() - 1))\n match_string.append(\",\");\n }\n\n OFMatch match = new OFMatch();\n match.fromString(match_string.toString());\n return match;\n }", "StatementRule createStatementRule();", "Match getResultMatch();", "CaseStatement createCaseStatement();", "abstract UrlPatternMatcher create( String pattern );", "RegExConstraint createRegExConstraint();", "CaseStmtRule createCaseStmtRule();", "public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n TokenPattern res = automaton.match(buffer, ignoreCase);\n\n if (res != null) {\n match.update(res.getPattern().length(), res);\n }\n }", "private Matcher() {\n super(querySpecification());\n }", "private SingleMatch matchBuilder() {\n\t\treturn new SingleMatch(currentMatchSettings.getSequenceLength(), currentMatchSettings.getAttempts(),\n\t\t\t\tcurrentMatchSettings.getGameViewFactory(), currentMatchSettings.getBreakerFactory(),\n\t\t\t\tcurrentMatchSettings.getMakerFactory());\n\t}", "@Override\n public Matcher matches(LexerToken[] lexerTokens, Builder builder){\n return new Matcher(this,lexerTokens,builder);\n }", "Statement createStatement();", "Statement createStatement();", "Statement createStatement();", "public void createMatchList()\r\n {\r\n theMatchList = new MatchList();\r\n }", "protected LogParserMatch() {\n\t}", "public void setMatchOperation(String matchOperation) {\n this.matchOperation = matchOperation;\n }", "public RegularExpression() {\n }", "void matchStart();", "public void setMatch(OFMatch mt) {\n\t\tthis.match = mt;\r\n\t}", "protected DomainMatcher createDomainMatcher() {\r\n\t\treturn new RegisteredConstraintLinkMatcher();\r\n\t}", "public static DuplicateNameMatch newEmptyMatch() {\r\n return new Mutable(null, null);\r\n }", "protected NativeSearchQuery createBasicMatchQuery(String fieldName, String value) {\n MatchQueryBuilder queryBuilder = createMatchQueryBuilder(fieldName, value);\n return new NativeSearchQueryBuilder().withQuery(queryBuilder).build();\n }", "public Match(T t1, T t2, boolean edit)\r\n\t{\r\n\t\tthis(t1, t2, edit, -1);\r\n\t}", "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "public void addMatch(Match match) {\n\t\tmatch.setCreateDate(new Date());\r\n\t\tmatchDao.add(match);\r\n\t}", "public static <T extends Term> Matcher<T> matchingTerm(T ast)\n {\n return new TermMatcher<T>(ast);\n }", "public Match(String subgraph) {\r\n\t\tsuper();\r\n\t\tthis.subgraph = subgraph;\r\n\t\tthis.variables = new ArrayList<Variable>();\r\n\t}", "public void setMatched(String matched) {\r\n\t\tthis.matched = matched;\r\n\t}", "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}", "public void match(SequiturSymbol newD,SequiturSymbol matching){\n \n Rule rule;\n SequiturSymbol first,second;\n \n if (matching.p.isGuard() && \n matching.n.n.isGuard()){\n \n // reuse an existing rule\n \n rule = ((Guard)matching.p).r;\n newD.substitute(rule);\n }else{\n \n // create a new rule\n \n rule = new Rule();\n \n try{\n first = (SequiturSymbol)newD.clone();\n second = (SequiturSymbol)newD.n.clone();\n rule.theGuard.n = first;\n first.p = rule.theGuard;\n first.n = second;\n second.p = first;\n second.n = rule.theGuard;\n rule.theGuard.p = second;\n\n matching.substitute(rule);\n newD.substitute(rule);\n\n // Bug fix (21.8.2012): moved the following line\n // to occur after substitutions (see sequitur_simple.cc)\n \n theDigrams.put(first,first);\n }catch (CloneNotSupportedException c){\n c.printStackTrace();\n }\n }\n \n // Check for an underused rule.\n \n if (rule.first().isNonTerminal() && (((NonTerminal)rule.first()).r.count == 1))\n ((NonTerminal)rule.first()).expand();\n }", "public GrandChildOfStringMatch() {}", "Match getMatches();", "public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n\n for (int i = 0; i < regExps.length; i++) {\n int length = regExps[i].match(buffer);\n if (length > 0) {\n match.update(length, patterns[i]);\n }\n }\n }", "public static VehicleSlowsDownMeasurements.Match newEmptyMatch() {\n return new Mutable(null, null, null);\n }", "public void addMatch() {\n totalMatches ++;\n }", "private Token(TokenType type, Range range, Range textRange, String id, String match) {\r\n \t\t\tsuper();\r\n \t\t\tthis.type = type;\r\n \t\t\tthis.range = range;\r\n \t\t\tthis.textRange = textRange == null ? range : textRange;\r\n \t\t\tthis.id = id;\r\n //\t\t\tthis.match = match;\r\n \t\t}", "public NaiveStringMatcher(String pattern) {\n super(pattern);\n }", "public BodyMatchesRegexAnalyzer(BodyRegexProperties properties) {\n super(properties);\n this.pattern = Pattern.compile(properties.getPattern());\n }", "public static <T extends Term> Matcher<T> matchingTerm(String ast)\n {\n return new TermMatcher<T>(ast);\n }", "public abstract void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException;", "Match getPartialMatch();", "public static OngoingReadingWithoutWhere optionalMatch(PatternElement... pattern) {\n\n\t\treturn Statement.builder().optionalMatch(pattern);\n\t}", "private void setCurrentMatch(SingleMatch newMatch) {\n\t\tcurrentMatch = newMatch;\n\t}", "AliasStatement createAliasStatement();", "public MatchAdaptator(Context context, List<Match> matchs) {\n super(context, 0, matchs);\n }", "void setPartialMatch(Match partialMatch);", "public BooleanMatcher(boolean matches) {\n this.matches = matches;\n }", "MatchController createMatchController();", "private void setupNewMatch() {\n\t\tif (!startupSettings.getKeepMatchStartSettings()) {\n\t\t\tcurrentMatchSettings.setMakerFactory(startView.setupMaker(globalSettings.getMakers()));\n\t\t\tcurrentMatchSettings.setBreakerFactory(startView.setupBreaker(globalSettings.getBreakers()));\n\t\t\tcurrentMatchSettings.resetLengthAttempts();\n\t\t\tif (startView.askNewLengthsAndAttempts()) {\n\t\t\t\tcurrentMatchSettings\n\t\t\t\t\t\t.setAttempts(startView.askNewAttempts(currentMatchSettings.getLowTresholdAttempts()));\n\t\t\t\tcurrentMatchSettings.setSequenceLength(startView.askNewLength(\n\t\t\t\t\t\tcurrentMatchSettings.getLowTresholdLength(), currentMatchSettings.getHighTresholdLength()));\n\t\t\t}\n\t\t}\n\t\tsetCurrentMatch(this.matchBuilder());\n\t}", "public Match createMatch(Integer creatorUserId, Integer opponentUserId)\n\t{\n\t\tMatch newMatch = new Match();\n\n\t\tnewMatch.setCreationTimestamp(new Date());\n\t\tnewMatch.setVictorUser(null);\n\t\ttry\n\t\t{\n\t\t\tnewMatch.setCreatorUser(userDao.queryForId(creatorUserId.toString()));\n\t\t\tnewMatch.setOpponentUser(userDao.queryForId(opponentUserId.toString()));\n\t\t\tnewMatch.setMatchStatus(matchStatusDao.queryForId(Constants.MATCH_STATUS_PENDING));\n\t\t\tmatchDao.create(newMatch);\n\t\t}\n\t\tcatch (SQLException sqle)\n\t\t{\n\t\t\tlogger.error(sqle);\n\t\t\treturn null;\n\t\t}\n\t\treturn newMatch;\n\t}", "public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n automaton.match(buffer, match);\n }", "private JBurgPatternMatcher()\n\t{\n\t}", "public Match createMatchFromPacket(IOFSwitch sw, OFPort inPort, FloodlightContext cntx) {\n Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD);\n VlanVid vlan = VlanVid.ofVlan(eth.getVlanID());\n MacAddress srcMac = eth.getSourceMACAddress();\n MacAddress dstMac = eth.getDestinationMACAddress();\n\n Match.Builder mb = sw.getOFFactory().buildMatch();\n mb.setExact(MatchField.IN_PORT, inPort);\n\n if (FLOWMOD_DEFAULT_MATCH_MAC) {\n mb.setExact(MatchField.ETH_SRC, srcMac).setExact(MatchField.ETH_DST, dstMac);\n }\n\n if (FLOWMOD_DEFAULT_MATCH_VLAN) {\n if (!vlan.equals(VlanVid.ZERO)) {\n mb.setExact(MatchField.VLAN_VID, OFVlanVidMatch.ofVlanVid(vlan));\n }\n }\n\n // TODO Detect switch type and match to create hardware-implemented flow\n if (eth.getEtherType() == EthType.IPv4) { /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t * shallow check for\n\t\t\t\t\t\t\t\t\t\t\t\t\t * equality is okay for\n\t\t\t\t\t\t\t\t\t\t\t\t\t * EthType\n\t\t\t\t\t\t\t\t\t\t\t\t\t */\n IPv4 ip = (IPv4) eth.getPayload();\n IPv4Address srcIp = ip.getSourceAddress();\n IPv4Address dstIp = ip.getDestinationAddress();\n\n if (FLOWMOD_DEFAULT_MATCH_IP_ADDR) {\n mb.setExact(MatchField.ETH_TYPE, EthType.IPv4).setExact(MatchField.IPV4_SRC, srcIp)\n .setExact(MatchField.IPV4_DST, dstIp);\n }\n\n if (FLOWMOD_DEFAULT_MATCH_TRANSPORT) {\n\t\t\t\t/*\n\t\t\t\t * Take care of the ethertype if not included earlier, since\n\t\t\t\t * it's a prerequisite for transport ports.\n\t\t\t\t */\n if (!FLOWMOD_DEFAULT_MATCH_IP_ADDR) {\n mb.setExact(MatchField.ETH_TYPE, EthType.IPv4);\n }\n\n if (ip.getProtocol().equals(IpProtocol.TCP)) {\n TCP tcp = (TCP) ip.getPayload();\n mb.setExact(MatchField.IP_PROTO, IpProtocol.TCP).setExact(MatchField.TCP_SRC, tcp.getSourcePort())\n .setExact(MatchField.TCP_DST, tcp.getDestinationPort());\n } else if (ip.getProtocol().equals(IpProtocol.UDP)) {\n UDP udp = (UDP) ip.getPayload();\n mb.setExact(MatchField.IP_PROTO, IpProtocol.UDP).setExact(MatchField.UDP_SRC, udp.getSourcePort())\n .setExact(MatchField.UDP_DST, udp.getDestinationPort());\n }\n }\n } else if (eth.getEtherType() == EthType.ARP) { /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * shallow check for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * equality is okay for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * EthType\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\n mb.setExact(MatchField.ETH_TYPE, EthType.ARP);\n }\n\n return mb.build();\n }", "protected abstract Matcher<? super ExpressionTree> specializedMatcher();", "public void setMatched(boolean matched) {\r\n this.matched = matched;\r\n }", "RepeatStatement createRepeatStatement();", "public PlayerMatches(String player1, String player2) {\n this.player1 = player1;\n this.player2 = player2;\n }", "private DMatch(Builder builder) {\n super(builder);\n }", "ExprRule createExprRule();", "public Matcher(List<String> lines, int lineOffset, HashMap<String, List<MatchOffset>> matchMap) {\n this.lines = lines;\n this.lineOffset = lineOffset;\n this.matchMap = matchMap;\n }", "void setCompleteMatch(Match completeMatch);", "public T casePatternStatement(PatternStatement object) {\n\t\treturn null;\n\t}", "Expression createExpression();", "public MMExptTupleMatcher() {\n this.conceptMatcher = new kb.matching.SynonymConceptMatcher();\n // Need to set synonyms right here\n }", "private ParseTree parseNewDotSomething() {\n SourcePosition start = getTreeStartLocation();\n eat(TokenType.NEW);\n eat(TokenType.PERIOD);\n eatPredefinedString(\"target\");\n return new NewTargetExpressionTree(getTreeLocation(start));\n }", "public Matchdata()\n {\n }", "private void startMatch() {\n game = new Match(players.get(0), players.get(1), \"Nueva Partida\");\n showMatch();\n state = 1;\n }", "public static JBurgPatternMatcher matchOperator(String pattern_op)\n {\n JBurgPatternMatcher result = new JBurgPatternMatcher();\n\t\tresult.operator = pattern_op;\n\t\treturn result;\n }", "public final JavaliParser.newExpr_return newExpr() throws RecognitionException {\n\t\tJavaliParser.newExpr_return retval = new JavaliParser.newExpr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken kw=null;\n\t\tToken id=null;\n\t\tToken Identifier79=null;\n\t\tToken char_literal80=null;\n\t\tToken char_literal81=null;\n\t\tToken char_literal82=null;\n\t\tToken char_literal84=null;\n\t\tToken char_literal85=null;\n\t\tToken char_literal87=null;\n\t\tParserRuleReturnScope pt =null;\n\t\tParserRuleReturnScope simpleExpr83 =null;\n\t\tParserRuleReturnScope simpleExpr86 =null;\n\n\t\tObject kw_tree=null;\n\t\tObject id_tree=null;\n\t\tObject Identifier79_tree=null;\n\t\tObject char_literal80_tree=null;\n\t\tObject char_literal81_tree=null;\n\t\tObject char_literal82_tree=null;\n\t\tObject char_literal84_tree=null;\n\t\tObject char_literal85_tree=null;\n\t\tObject char_literal87_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_93=new RewriteRuleTokenStream(adaptor,\"token 93\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,\"token 84\");\n\t\tRewriteRuleTokenStream stream_85=new RewriteRuleTokenStream(adaptor,\"token 85\");\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_primitiveType=new RewriteRuleSubtreeStream(adaptor,\"rule primitiveType\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:408:2: (kw= 'new' Identifier '(' ')' -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier ) |kw= 'new' id= Identifier '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr ) |kw= 'new' pt= primitiveType '[' simpleExpr ']' -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr ) )\n\t\t\tint alt24=3;\n\t\t\tint LA24_0 = input.LA(1);\n\t\t\tif ( (LA24_0==93) ) {\n\t\t\t\tint LA24_1 = input.LA(2);\n\t\t\t\tif ( (LA24_1==Identifier) ) {\n\t\t\t\t\tint LA24_2 = input.LA(3);\n\t\t\t\t\tif ( (LA24_2==69) ) {\n\t\t\t\t\t\talt24=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA24_2==84) ) {\n\t\t\t\t\t\talt24=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 2, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA24_1==86||LA24_1==90||LA24_1==92) ) {\n\t\t\t\t\talt24=3;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 24, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 24, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt24) {\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:408:4: kw= 'new' Identifier '(' ')'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1369); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tIdentifier79=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1371); \n\t\t\t\t\tstream_Identifier.add(Identifier79);\n\n\t\t\t\t\tchar_literal80=(Token)match(input,69,FOLLOW_69_in_newExpr1373); \n\t\t\t\t\tstream_69.add(char_literal80);\n\n\t\t\t\t\tchar_literal81=(Token)match(input,70,FOLLOW_70_in_newExpr1375); \n\t\t\t\t\tstream_70.add(char_literal81);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: 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_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// 409:3: -> ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\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:409:6: ^( NewObject[$kw, \\\"NewObject\\\"] Identifier )\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(NewObject, kw, \"NewObject\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\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\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:410:4: kw= 'new' id= Identifier '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1395); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tid=(Token)match(input,Identifier,FOLLOW_Identifier_in_newExpr1399); \n\t\t\t\t\tstream_Identifier.add(id);\n\n\t\t\t\t\tchar_literal82=(Token)match(input,84,FOLLOW_84_in_newExpr1401); \n\t\t\t\t\tstream_84.add(char_literal82);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1403);\n\t\t\t\t\tsimpleExpr83=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr83.getTree());\n\t\t\t\t\tchar_literal84=(Token)match(input,85,FOLLOW_85_in_newExpr1405); \n\t\t\t\t\tstream_85.add(char_literal84);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: 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_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// 411:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\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:411:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$id, $id.text + \\\"[]\\\"] simpleExpr )\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(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, id, (id!=null?id.getText():null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.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\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:412:4: kw= 'new' pt= primitiveType '[' simpleExpr ']'\n\t\t\t\t\t{\n\t\t\t\t\tkw=(Token)match(input,93,FOLLOW_93_in_newExpr1428); \n\t\t\t\t\tstream_93.add(kw);\n\n\t\t\t\t\tpushFollow(FOLLOW_primitiveType_in_newExpr1432);\n\t\t\t\t\tpt=primitiveType();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_primitiveType.add(pt.getTree());\n\t\t\t\t\tchar_literal85=(Token)match(input,84,FOLLOW_84_in_newExpr1434); \n\t\t\t\t\tstream_84.add(char_literal85);\n\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_newExpr1436);\n\t\t\t\t\tsimpleExpr86=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(simpleExpr86.getTree());\n\t\t\t\t\tchar_literal87=(Token)match(input,85,FOLLOW_85_in_newExpr1438); \n\t\t\t\t\tstream_85.add(char_literal87);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: simpleExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: 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_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// 413:3: -> ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\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:413:6: ^( NewArray[$kw, \\\"NewArray\\\"] Identifier[$pt.start, $pt.text + \\\"[]\\\"] simpleExpr )\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(NewArray, kw, \"NewArray\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, (Object)adaptor.create(Identifier, (pt!=null?(pt.start):null), (pt!=null?input.toString(pt.start,pt.stop):null) + \"[]\"));\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_simpleExpr.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\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}", "private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }", "public static Node match(Parser parser) throws BuildException {\n\n Lexeme var = parser.match(LexemeType.VAR);\n Node variables = IdentifierList.match(parser);\n\n if (parser.check(LexemeType.EQUALS)) {\n Lexeme equals = parser.advance();\n return VariableDeclarationNode.createVariableDeclaration(var, variables, ExpressionList.match(parser));\n\n }\n\n return VariableDeclarationNode.createVariableDeclaration(var, variables);\n\n }", "public RegexPatternBuilder (String regex)\n {\n this.regex = regex;\n }", "public static RubyClass createMatchDataClass(Ruby runtime) {\n RubyClass matchDataClass = runtime.defineClass(\"MatchData\", runtime.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);\n runtime.defineGlobalConstant(\"MatchingData\", matchDataClass);\n \n CallbackFactory callbackFactory = runtime.callbackFactory(RubyMatchData.class);\n \n matchDataClass.defineFastMethod(\"captures\", callbackFactory.getFastMethod(\"captures\"));\n matchDataClass.defineFastMethod(\"inspect\", callbackFactory.getFastMethod(\"inspect\"));\n matchDataClass.defineFastMethod(\"size\", callbackFactory.getFastMethod(\"size\"));\n matchDataClass.defineFastMethod(\"length\", callbackFactory.getFastMethod(\"size\"));\n matchDataClass.defineFastMethod(\"offset\", callbackFactory.getFastMethod(\"offset\", RubyFixnum.class));\n matchDataClass.defineFastMethod(\"begin\", callbackFactory.getFastMethod(\"begin\", RubyFixnum.class));\n matchDataClass.defineFastMethod(\"end\", callbackFactory.getFastMethod(\"end\", RubyFixnum.class));\n matchDataClass.defineFastMethod(\"to_a\", callbackFactory.getFastMethod(\"to_a\"));\n matchDataClass.defineFastMethod(\"[]\", callbackFactory.getFastOptMethod(\"aref\"));\n matchDataClass.defineFastMethod(\"pre_match\", callbackFactory.getFastMethod(\"pre_match\"));\n matchDataClass.defineFastMethod(\"post_match\", callbackFactory.getFastMethod(\"post_match\"));\n matchDataClass.defineFastMethod(\"to_s\", callbackFactory.getFastMethod(\"to_s\"));\n matchDataClass.defineFastMethod(\"string\", callbackFactory.getFastMethod(\"string\"));\n \n matchDataClass.getMetaClass().undefineMethod(\"new\");\n \n return matchDataClass;\n }", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public Cond newCond() {\n return new Cond();\n }", "public PatternBuilderResult build(String specification) throws PatternBuilderException {\n StringBuilder patternStringBuilder = new StringBuilder();\n Matcher captureTokenMatcher = pattern.matcher(specification);\n List<String> locations = new ArrayList<>();\n\n int charLoc = 0;\n while(captureTokenMatcher.find()) {\n String match = captureTokenMatcher.group(1);\n\n String regexReplacement = genRegex(captureTokenMatcher.end(), match, specification);\n String literalReplacement = escapeLiteralRegexChars(specification.substring(charLoc, captureTokenMatcher.start()));\n\n patternStringBuilder\n .append(literalReplacement)\n .append(regexReplacement);\n\n locations.add(match);\n\n charLoc = captureTokenMatcher.end();\n\n\n }\n\n patternStringBuilder\n .append(escapeLiteralRegexChars(specification.substring(charLoc, specification.length())));\n\n return new PatternBuilderResult(\n compilePattern(patternStringBuilder.toString()),\n ensureUniqueIndex(locations));\n\n }", "CmdRule createCmdRule();", "public Pattern buildPattern ()\n {\n int flags = 0;\n if ( this.canonicalEquivalence ) flags += Pattern.CANON_EQ;\n if ( this.caseInsensitive ) flags += Pattern.CASE_INSENSITIVE;\n if ( this.comments ) flags += Pattern.COMMENTS;\n if ( this.dotall ) flags += Pattern.DOTALL;\n if ( this.multiline ) flags += Pattern.MULTILINE;\n if ( this.unicodeCase ) flags += Pattern.UNICODE_CASE;\n if ( this.unixLines ) flags += Pattern.UNIX_LINES;\n return Pattern.compile(this.regex, flags);\n }", "public static NonpositiveRequiredCapabilityMatch newEmptyMatch() {\r\n return new Mutable(null, null, null, null);\r\n }", "public abstract Search create(String search, SearchBuilder builder);", "protected abstract Regex pattern();", "public T caseNewExpression(NewExpression object)\n {\n return null;\n }", "protected DebugRuleElementMatch() {/* intentionally empty block */}", "public MatchEvent(Match source) {\n super(source);\n }", "public String getMatchOperation() {\n return matchOperation;\n }", "@Override\n\tpublic void visit(Matches arg0) {\n\t\t\n\t}", "public static MatchInputTeleOpFragment newInstance() {\n\t return new MatchInputTeleOpFragment();\n\t}", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "public static Match termToStatement(final Term term) throws TermConversionException {\n if (term.size() != 2 || ! (term.lastMember() instanceof SetlList)) {\n throw new TermConversionException(\"malformed \" + FUNCTIONAL_CHARACTER);\n } else {\n final Expr expr = TermConverter.valueToExpr(term.firstMember());\n final SetlList branches = (SetlList) term.lastMember();\n final List<MatchAbstractBranch> branchList = new ArrayList<MatchAbstractBranch>(branches.size());\n for (final Value v : branches) {\n branchList.add(MatchAbstractBranch.valueToMatchAbstractBranch(v));\n }\n return new Match(expr, branchList);\n }\n }", "@Override\n\tpublic void visit(Matches arg0) {\n\n\t}", "public Match(T t1, T t2, boolean edit, int matchNumber)\r\n\t{\r\n\t\t\r\n\t\tif (t1.getName().equals(ByeMatchException.BYE_MATCH_NAME))\r\n\t\t{\r\n\t\t\tisByeMatch = true;\r\n\t\t\tteam1 = t2;\r\n\t\t\tteam2 = t1;\r\n\t\t}\r\n\t\telse if (t2.getName().equals(ByeMatchException.BYE_MATCH_NAME))\r\n\t\t{\r\n\t\t\tisByeMatch = true;\r\n\t\t\tteam1 = t1;\r\n\t\t\tteam2 = t2;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tisByeMatch = false;\r\n\t\t\tteam1 = t1;\r\n\t\t\tteam2 = t2;\r\n\t\t}\r\n\t\tscore1 = 0;\r\n\t\tscore2 = 0;\r\n\t\teditableMatch = edit;\r\n\t\tmatchNum = matchNumber;\r\n\t\tname = null;\r\n\t}" ]
[ "0.74053955", "0.6330564", "0.61226237", "0.60491234", "0.5922575", "0.5883325", "0.5854743", "0.57337433", "0.56358624", "0.55596167", "0.5501918", "0.5493746", "0.5465383", "0.54083365", "0.5373455", "0.53277344", "0.529744", "0.529744", "0.529744", "0.52734333", "0.52558935", "0.52465045", "0.52212477", "0.5220718", "0.5208679", "0.5190846", "0.51859605", "0.51560134", "0.51429904", "0.5130956", "0.5105709", "0.50841117", "0.5078056", "0.50521064", "0.5028643", "0.5023241", "0.50140315", "0.5003854", "0.4984927", "0.49798375", "0.49716792", "0.4938438", "0.49158537", "0.48970625", "0.4882177", "0.4881081", "0.48747784", "0.48645484", "0.48641795", "0.48608372", "0.48577002", "0.4857567", "0.48549893", "0.48537534", "0.48297873", "0.48248535", "0.48239154", "0.48173046", "0.47990987", "0.47701773", "0.47436932", "0.47368842", "0.4727089", "0.47158545", "0.47147578", "0.47080907", "0.468052", "0.4674651", "0.46664906", "0.46552262", "0.46485096", "0.4641487", "0.4637558", "0.46337795", "0.46329254", "0.46298558", "0.46288967", "0.46254677", "0.46205565", "0.46197733", "0.46103814", "0.46103814", "0.46103814", "0.46087202", "0.4607214", "0.46019778", "0.45934176", "0.45919043", "0.45868626", "0.4586307", "0.45845988", "0.45546314", "0.45524937", "0.45523012", "0.45482624", "0.4547481", "0.45474145", "0.45440826", "0.45402044", "0.4539989" ]
0.48267856
55
Convert a term representing a Match statement into such a statement.
public static Match termToStatement(final Term term) throws TermConversionException { if (term.size() != 2 || ! (term.lastMember() instanceof SetlList)) { throw new TermConversionException("malformed " + FUNCTIONAL_CHARACTER); } else { final Expr expr = TermConverter.valueToExpr(term.firstMember()); final SetlList branches = (SetlList) term.lastMember(); final List<MatchAbstractBranch> branchList = new ArrayList<MatchAbstractBranch>(branches.size()); for (final Value v : branches) { branchList.add(MatchAbstractBranch.valueToMatchAbstractBranch(v)); } return new Match(expr, branchList); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }", "@Override\r\n\tpublic String inverseTranslateTerm(String term)\r\n\t{\r\n\t\tStringBuilder sb = new StringBuilder(term.length());\r\n\t\tMatcher matcher = s_termPattern.matcher(term);\r\n\t\tint start = 0;\r\n\t\twhile (matcher.find(start))\r\n\t\t{\r\n\t\t\t// Parse a Prolog term\r\n\t\t\tString symbol = matcher.group();\r\n\t\t\t\r\n\t\t\tif (matcher.group(\"quotedConst\") != null)\r\n\t\t\t{\r\n\t\t\t\tsb.append(inverseTranslateQuotedConst(symbol));\r\n\t\t\t}\r\n\t\t\telse if (matcher.group(\"var\") != null)\r\n\t\t\t{\r\n\t\t\t\tsb.append(inverseTranslateVariable(symbol));\r\n\t\t\t}\r\n\t\t\telse if (matcher.group(\"unquotedConst\") != null)\r\n\t\t\t{\r\n\t\t\t\tsb.append(inverseTranslateUnquotedConst(symbol));\r\n\t\t\t}\r\n\t\t\telse if (matcher.group(\"number\") != null)\r\n\t\t\t{\r\n\t\t\t\tsb.append(inverseTranslateNumber(symbol));\r\n\t\t\t}\r\n\t\t\telse if (matcher.group(\"string\") != null)\r\n\t\t\t{\r\n\t\t\t\tsb.append(inverseTranslateString(symbol));\r\n\t\t\t}\r\n\t\t\telse if (matcher.group(\"list\") != null)\r\n\t\t\t{\r\n\t\t\t\tsb.append(inverseTranslateList(symbol));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new TranslatorException(\"Unable to parse answer term: \" + term);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstart = matcher.end();\r\n\t\t\ttry {\r\n\t\t\t\t// Parse connectors between terms\r\n\t\t\t\tchar c = term.charAt(start);\r\n\t\t\t\tif (c == ',')\r\n\t\t\t\t\tsb.append(' ');\r\n\t\t\t\telse if (c == '(')\r\n\t\t\t\t\tsb.append(c);\r\n\t\t\t\telse if (c == ')')\r\n\t\t\t\t{\r\n\t\t\t\t\tdo\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsb.append(c);\r\n\t\t\t\t\t\tc = term.charAt(++start);\r\n\t\t\t\t\t} while (c == ')');\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new TranslatorException(\"Unable to parse answer term: \" + term);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (IndexOutOfBoundsException e)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (start != term.length())\r\n\t\t{\r\n\t\t\tthrow new TranslatorException(\"Unable to parse answer term: \" + term);\r\n\t\t}\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t}", "public String convertStatement (String oraStatement);", "public String convertStatement (String oraStatement);", "private String tokenToGrammar(Token v) {\n\n if(v.getChVals().equals(\"$\")){\n return \"$\";\n }\n\n String type = v.getType();\n\n if(type.equals(\"keyword\")) {\n type = v.getChVals();\n }\n\n switch (type) {\n case \"begin\":\n return \"b\";\n case \"halt\":\n return \"t\";\n case \"cat\":\n return \"c\";\n case \"mouse\":\n return \"m\";\n case \"clockwise\":\n return \"l\";\n case \"move\":\n return \"o\";\n case \"north\":\n return \"n\";\n case \"south\":\n return \"s\";\n case \"east\":\n return \"e\";\n case \"west\":\n return \"w\";\n case \"hole\":\n return \"h\";\n case \"repeat\":\n return \"r\";\n case \"size\":\n return \"z\";\n case \"end\":\n return \"d\";\n case \"integer\":\n return \"i\";\n case \"variable\":\n return \"v\";\n default:\n return type;\n }\n }", "public static StringBuilder prettyPrintMatch(IStrategoTerm match, StringBuilder b) {\n switch(SPTUtil.consName(match)) {\n case ANNO_CONS:\n // Anno(Match, [AnnoMatch, ...])\n prettyPrintMatch(match.getSubterm(0), b).append(\"{\");\n prettyPrintListOfMatches((IStrategoList) match.getSubterm(1), \", \", b);\n b.append('}');\n return b;\n case LIST_CONS:\n // List([Match, ...])\n b.append('[');\n prettyPrintListOfMatches((IStrategoList) match.getSubterm(0), \", \", b);\n b.append(']');\n return b;\n case APPL_CONS:\n // Appl(\"ConsName\", [KidMatch, ...])\n b.append(TermUtils.toJavaString(match.getSubterm(0))).append('(');\n prettyPrintListOfMatches((IStrategoList) match.getSubterm(1), \", \", b);\n b.append(')');\n return b;\n case TUPLE_CONS:\n // Tuple([KidMatch, ...])\n b.append('(');\n prettyPrintListOfMatches((IStrategoList) match.getSubterm(0), \", \", b);\n b.append(')');\n return b;\n case INT_CONS:\n // Int(\"n\")\n b.append(TermUtils.toJavaString(match.getSubterm(0)));\n return b;\n case STRING_CONS:\n // String(\"some string\")\n b.append(StringUtils.escape(TermUtils.toJavaStringAt(match, 0)));\n return b;\n case WLD_CONS:\n b.append('_');\n return b;\n default:\n logger.warn(\"Can't pretty print the pattern {}\", match);\n throw new IllegalArgumentException(String.format(\"Can't pretty print the pattern %s.\", match));\n }\n }", "public static <T extends Term> Matcher<T> matchingTerm(T ast)\n {\n return new TermMatcher<T>(ast);\n }", "public T caseTerm(Term object)\n {\n return null;\n }", "public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }", "public static <T extends Term> Matcher<T> matchingTerm(String ast)\n {\n return new TermMatcher<T>(ast);\n }", "Match createMatch();", "public Concept termToConcept(Term term) {\r\n return nameToConcept(term.getName());\r\n }", "@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}", "public void setMatch(OFMatch mt) {\n\t\tthis.match = mt;\r\n\t}", "public void setTerm(Expression term) {\n this.term = term;\n }", "public static String prettyPrintMatch(IStrategoTerm match) {\n return prettyPrintMatch(match, new StringBuilder()).toString();\n }", "Match getResultMatch();", "private Term parseTerm(final boolean required) throws ParseException {\n return parseAssign(required);\n }", "@Override\n\tpublic String visitTerm(MicroParser.TermContext ctx) {\n\t\tString prefix = visit(ctx.factor_prefix());\n\t\tString termExpr = prefix + visit(ctx.factor());\n\t\t//System.out.println(\"in term :\"+termExpr);\n\t\t//System.out.println(\"in term, prefix is:\"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return termExpr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = termExpr.split(\"/|\\\\*\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> mulops = new ArrayList<Character>();\n\t \n\t //create a list of mulops\n\t for(int i=0;i<termExpr.length();i++) {\n\t \tif(termExpr.charAt(i)=='*' || termExpr.charAt(i)=='/')\n\t \t\tmulops.add(termExpr.charAt(i));\n\t }\n\t //create a list of operands \n\t for(String i:ids) \n\t \toperands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t //System.out.println(\"in term op1 op2: \"+op1 +\" \" + op2);\n\t temp = new Temporary(type);\n \tresult = temp.fullName;\n \ttempList.addT(temp);\n\t //System.out.println(\"in term result: \"+result);\n\t if(mulops.get(0)=='*') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"MULT\", op1, op2, result));\n\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t \toperands.remove(0); operands.remove(0); mulops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"DIV\", op1, op2, result));\n\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t \toperands.remove(0); operands.remove(0); mulops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t //System.out.println(\"AFTER IF\");\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(mulops.get(0)=='*') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"MULT\", op1, op2, result));\n\t\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t\t \tmulops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"DIV\", op1, op2, result));\n\t\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t\t \tmulops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result;\n\t\t\n\t}", "private static Term rewriteTerm(Map<Term, Term> steps, Term term, Term subterm, Map<Variable, Term> sub, Term subtermSubstitute) {\n subtermSubstitute = subtermSubstitute.applySubstitution(sub);\n\n // Create the new term by substituting subterm in term by subtermSubstitute\n Term newTerm = term.substitute(subterm, subtermSubstitute);\n\n // Add this step to steps\n if (steps != null && !steps.containsKey(newTerm)) {\n steps.put(newTerm, term);\n }\n\n return newTerm;\n }", "public T caseTERM(TERM object)\n {\n return null;\n }", "String highlightTerm(String term);", "@Override\n\t\tpublic Object fromTerm(Term term, TypeDomain target, Jpc jpc) {\n\t\t\tObject converted = null;\n\t\t\tboolean converterFound = false;\n\t\t\tTerm unifiedTerm = null;\n\t\t\tif (JpcConverterManager.isValidConvertableTerm(term)) {\n\t\t\t\tString converterVarName = JpcPreferences.JPC_VAR_PREFIX + \"Converter\";\n\t\t\t\tQuery query = embeddedEngine.query(new Compound(JpcConverterManager.FROM_TERM_CONVERTER_FUNCTOR_NAME, asList(term, var(converterVarName))));\n\t\t\t\twhile (query.hasNext()) {\n\t\t\t\t\tSolution solution = query.next();\n\t\t\t\t\tunifiedTerm = term.replaceVariables(solution);\n\t\t\t\t\tunifiedTerm = unifiedTerm.compile(true);\n\t\t\t\t\tConversionFunction converter = (ConversionFunction) ((JRef) solution.get(converterVarName)).getReferent();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconverted = new InterTypeConverterEvaluator(conversionGoal(unifiedTerm, target), jpc).apply(converter);\n\t\t\t\t\t\tconverterFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} catch (DelegateConversionException e) {} //just try with the next converter.\n\t\t\t\t}\n\t\t\t\tquery.close();\n\t\t\t}\n\t\t\tif (!converterFound) {\n\t\t\t\tthrow new DelegateConversionException(conversionGoal(term, target));\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tterm.unify(unifiedTerm);\n\t\t\t\t} catch (UncompiledTermException e) {\n\t\t\t\t\t//just ignore the exception if the original term is not compiled.\n\t\t\t\t}\n\t\t\t\treturn converted;\n\t\t\t}\n\t\t}", "public abstract Match match();", "public void setMatchOperation(String matchOperation) {\n this.matchOperation = matchOperation;\n }", "private double parseTerm() {\n double value = parseFactor();\n while (true) {\n if (token.getType().equals(Token.Type.DIVIDE)) { // division\n token = lexer.getNextToken();\n value /= parseFactor();\n } else if (token.getType().equals(Token.Type.MULTIPLY)|| \n \t\t token.getType().equals(Token.Type.LPAREN)|| \n \t \t token.getType().equals(Token.Type.SQRT)|| \n \t\t token.getType().equals(Token.Type.NUMBER)) { // multiplication\n if (token.getType().equals(Token.Type.MULTIPLY)) {\n \ttoken=lexer.getNextToken();\n }\n value *= parseFactor();\n } else {\n return value;\n }\n }\n\t}", "public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n TokenPattern res = automaton.match(buffer, ignoreCase);\n\n if (res != null) {\n match.update(res.getPattern().length(), res);\n }\n }", "public T caseExprString(ExprString object)\n {\n return null;\n }", "private String processStatement() {\n StringBuilder result = new StringBuilder();\n //If the line is an instantiation or assignment statement\n if(line.contains(\"=\")) {\n //We get the parts of string before and after the '=' sign.\n String[] parts = line.split(\"=\");\n //Now we get the first and second part in separate strings.\n String firstPart = parts[0].trim();\n String secondPart = parts[1].trim();\n //Remove unnecessary spaces from the first part of the line.\n firstPart = removeUnnecessarySpaces(firstPart);\n //Split the parts further into single words.\n String[] firstPartWords = firstPart.split(\"\\\\s+\");\n\n //Now, process the first part of the line\n for(int i=0; i<firstPartWords.length; i++) {\n String word = firstPartWords[i];\n //Boolean value to check if this word is the last word\n boolean isLast = i==firstPartWords.length-1;\n //Now process each word\n processWordInFirstPart(word, result, isLast);\n }\n\n //Boolean value to check if this statement has anything to\n //do with objects. If secondPart contains 'new'.\n boolean relatedWithObject = secondPart.contains(\"new \");\n //Now adjust the value of secondPart for assigning.\n secondPart = secondPart.replace(\"new\", \"\");\n secondPart = secondPart.trim();\n\n //Now we have the result after processing the first part of\n //this statement.\n //If there are no spaces in the firstPart string, then this\n //is an assignment statement.\n if(firstPart.indexOf(' ')==-1) {\n if(relatedWithObject) {\n //If the second part of the string contains square and not round\n //brackets, this is not an object but an array.\n if(!secondPart.contains(\"(\") && secondPart.contains(\"[\"))\n result.insert(0,\"The array \").append(\" is initialized to value \").\n append(secondPart);\n //Else, this is obviously an object.\n else\n result.insert(0, \"The object \").append(\" is initialized to value \").\n append(secondPart);\n }\n else {\n //Now, we format the assignment statement.\n //Since there can be more than one assignments in the same\n //line, we add all the parts.\n //Here, \\u2190 is the left arrow in UTF-8.\n char arrow = '\\u2190';\n parts = line.split(\"\\\\s+\");\n result = new StringBuilder();\n for(String part : parts) {\n if(part.equals(\"=\")) {\n result.append(arrow).append(\" \");\n }\n else {\n result.append(part).append(\" \");\n }\n }\n }\n }\n //If this statement is not an assignment statement, then this\n //is an initialization statement.\n else {\n if(relatedWithObject) {\n result.append(\" is created with value \").append(secondPart).append(\".\");\n }\n //If the second part (the value) has something to do\n //with arrays, and not objects.\n else if(hasArrayAsMajorValue(secondPart)) {\n //Then process the second part according to array values.\n result.append(\" is instantiated to value in \").append(processArrayValue(secondPart));\n }\n else {\n result.append(\" is instantiated to value \").append(secondPart).append(\".\");\n }\n }\n }\n //If line does not contain \"=\" sign.\n else {\n //Incrementing statement.\n if(line.contains(\"++\")) {\n int index = line.indexOf('+');\n String variable = line.substring(0,index);\n result.append(\"Variable \").append(variable).append(\" is Incremented.\");\n }\n //Decrementing statement.\n else if(line.contains(\"--\")) {\n int index = line.indexOf('-');\n String variable = line.substring(0,index);\n result.append(\"Variable \").append(variable).append(\" is Decremented.\");\n }\n //If line has a dot operator, it means this line calls a function.\n else if(line.contains(\".\")) {\n String[] parts = line.split(\"\\\\.\");\n String object = parts[0].trim();\n String method = parts[1].trim();\n result.append(\"The function \").append(method).append(\" from object \").\n append(object).append(\" is called.\");\n if(parts.length>2) {\n result = new StringBuilder();\n result.append(removeUnnecessarySpaces(line)).append(\" is performed respectively.\");\n }\n }\n //If the line contains a bracket, it is calling a member method.\n else if(line.contains(\"(\")) {\n result.append(\"The member method \").append(line).append(\" is called.\");\n }\n else {\n String[] words = line.split(\"\\\\s+\");\n for(int i=0; i<words.length; i++) {\n String word = words[i];\n boolean isLast = i==words.length-1;\n processWordInFirstPart(word, result, isLast);\n }\n result.append(\" is declared.\");\n }\n }\n return result.toString();\n }", "void setCompleteMatch(Match completeMatch);", "public List<Stmt> convertToStmtList(Term... terms) {\n List<Stmt> stmts = new ArrayList<Stmt> (terms.length);\n for (Term term : terms) {\n if (term instanceof Expr) {\n term = xnf.Eval(term.position(), (Expr) term);\n } else if (!(term instanceof Stmt)) {\n throw new IllegalArgumentException(\"Invalid argument type: \"+term.getClass());\n }\n stmts.add((Stmt) term);\n }\n return stmts;\n }", "public T casebooleanTerm(booleanTerm object)\n {\n return null;\n }", "public T caseRealLitExpr(RealLitExpr object) {\n\t\treturn null;\n\t}", "public void visit(Literal literal) {}", "public T caseTerminalExpression(TerminalExpression object)\n {\n return null;\n }", "public abstract WordEntry autoTranslate(String text, String to);", "public Vector mapTerm(String term) throws TermNotFoundException {\n int i = termIndex.get(term);\n\n if (i == -1) {\n throw new TermNotFoundException(term);\n }\n\n return new DenseVector(Uk[i]);\n }", "public T caseLiteral(Literal object)\n {\n return null;\n }", "public void match(SequiturSymbol newD,SequiturSymbol matching){\n \n Rule rule;\n SequiturSymbol first,second;\n \n if (matching.p.isGuard() && \n matching.n.n.isGuard()){\n \n // reuse an existing rule\n \n rule = ((Guard)matching.p).r;\n newD.substitute(rule);\n }else{\n \n // create a new rule\n \n rule = new Rule();\n \n try{\n first = (SequiturSymbol)newD.clone();\n second = (SequiturSymbol)newD.n.clone();\n rule.theGuard.n = first;\n first.p = rule.theGuard;\n first.n = second;\n second.p = first;\n second.n = rule.theGuard;\n rule.theGuard.p = second;\n\n matching.substitute(rule);\n newD.substitute(rule);\n\n // Bug fix (21.8.2012): moved the following line\n // to occur after substitutions (see sequitur_simple.cc)\n \n theDigrams.put(first,first);\n }catch (CloneNotSupportedException c){\n c.printStackTrace();\n }\n }\n \n // Check for an underused rule.\n \n if (rule.first().isNonTerminal() && (((NonTerminal)rule.first()).r.count == 1))\n ((NonTerminal)rule.first()).expand();\n }", "private void setCurrentMatch(SingleMatch newMatch) {\n\t\tcurrentMatch = newMatch;\n\t}", "public void substitute(Rule r){\n \n\tr.addIndex(this.originalPosition);\n\t \n\tthis.cleanUp();\n this.n.cleanUp();\n \n NonTerminal nt = new NonTerminal(r);\n nt.originalPosition = this.originalPosition;\n this.p.insertAfter(nt);\n if (!p.check())\n p.n.check();\n }", "public T caseLiteralExpCS(LiteralExpCS object) {\r\n return null;\r\n }", "public T caseStringLiteral(StringLiteral object)\n {\n return null;\n }", "public T caseStringLiteral(StringLiteral object)\n {\n return null;\n }", "public ImmutableTerm convertIntoImmutableTerm(Term term) {\n if (term instanceof Function) {\n if (term instanceof Expression) {\n Expression expression = (Expression) term;\n return termFactory.getImmutableExpression(expression);\n } else {\n Function functionalTerm = (Function) term;\n\n if (functionalTerm.getFunctionSymbol() instanceof FunctionSymbol)\n return termFactory.getImmutableFunctionalTerm(\n (FunctionSymbol) functionalTerm.getFunctionSymbol(),\n convertTerms(functionalTerm));\n else\n throw new NotAFunctionSymbolException(term + \" is not using a FunctionSymbol but a \"\n + functionalTerm.getFunctionSymbol().getClass());\n }\n }\n /*\n * Other terms (constant and variable) are immutable.\n */\n return (ImmutableTerm) term;\n }", "public abstract WordEntry manualTranslate(String text, String from, String to);", "public T caseExpression_String(Expression_String object)\r\n {\r\n return null;\r\n }", "@Override\n\t\t\tprotected Type convert(String text) {\n\t\t\t\tType t = null;\n\t\t\t\ttry {\n\t\t\t\t\t// return null if the types do not match the\n\t\t\t\t\t// original\n\t\t\t\t\tt = Type.getType(text);\n\t\t\t\t\tif (t == null || !match(t, original)) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {}\n\t\t\t\treturn t;\n\t\t\t}", "public Element compileTerm() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\n\t\tElement termParent = document.createElement(\"term\");\n\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\ttokenType = jTokenizer.tokenType();\n\n\t\t// Case 1: ( expression )\n\n\t\tif (token.equals(\"(\")) {\n\t\t\t// (\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t\t// exp\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t// )\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t}\n\n\t\t// Case 2: unaryOp term\n\t\telse if (token.matches(\"\\\\-|~\")) {\n\n\t\t\t// unary op\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tString op = jTokenizer.returnTokenVal();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t\n\t\t\t//Since it is postfix, the term comes first\n\t\t\t\n\t\t\t// term\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileTerm());\n\n\t\t\t// appending the op\n\t\t\tif (op.equals(\"~\")) {\n\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t} else {\n\t\t\t\twriter.writeArithmetic(\"neg\");\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Any constant or keyword\n\t\telse if (tokenType.matches(\"keyword|integerConstant|stringConstant\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t//pushing an integer constant\n\t\t\tif (tokenType.equals(\"integerConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", Integer.parseInt(token));\t\n\t\t\t}\n\t\t\t//For string, have to iterate along the length of the string and call string.append\n\t\t\telse if (tokenType.equals(\"stringConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", token.length());\n\t\t\t\twriter.writeCall(\"String.new\", 1);\n\n\t\t\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\t\t\twriter.writePush(\"constant\", (int) token.charAt(i));\n\t\t\t\t\twriter.writeCall(\"String.appendChar\", 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t\t//Pushing the keyword onto the stack, depending on what it is\n\t\t\telse if (tokenType.equals(\"keyword\")) {\n\t\t\t\tif (token.equals(\"true\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t\t} else if (token.equals(\"this\")) {\n\t\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\t} else if (token.equals(\"false\") || token.equals(\"null\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Variable, Variable[expression] or subroutineCall\n\t\telse if (tokenType.equals(\"identifier\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\tvarName = jTokenizer.returnTokenVal();\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.returnTokenVal();\n\n\t\t\t// Case 1: Array dereferencing\n\t\t\tif (token.equals(\"[\")) {\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// push base id\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\n\t\t\t\t// Exp\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t\t// ]\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// base + offset\n\t\t\t\twriter.writeArithmetic(\"add\");\n\n\t\t\t\t// pop into that\n\t\t\t\twriter.writePop(\"pointer\", 1);\n\t\t\t\t// push value into stack\n\t\t\t\twriter.writePush(\"that\", 0);\n\t\t\t}\n\n\t\t\t// Case 2: variable/class.subroutine call\n\t\t\telse if (token.equals(\".\")) {\n\n\t\t\t\tboolean method = false;\n\n\t\t\t\t// .\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// subroutine name\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tString subName = jTokenizer.returnTokenVal();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\tString firstName = varName;\n\t\t\t\t//Similar to the compileDo method, have to distinguish between\n\t\t\t\t//method and function\n\t\t\t\tif (symTable.lookup(firstName) != null) {\n\t\t\t\t\tmethod = true;\n\t\t\t\t\twriter.writePush(symTable.lookup(firstName).kind, symTable.lookup(firstName).index);\n\t\t\t\t\tvarName = symTable.lookup(firstName).type;\n\t\t\t\t}\n\t\t\t\t// expressionList\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement compileExpression = compileExpressionList();\n\t\t\t\tint nArgs = compileExpression.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(compileExpression);\n\n\t\t\t\t// Checking if method or function\n\t\t\t\tif (method) {\n\t\t\t\t\tnArgs++;\n\t\t\t\t}\n\t\t\t\twriter.writeCall(varName + \".\" + subName, nArgs);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\t\t\t}\n\n\t\t\t// Case 3: function call\n\t\t\telse if (token.equals(\"(\")) {\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// expression list\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement node = compileExpressionList();\n\t\t\t\tint nArgs = node.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(node);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// Writing the VML for a method call\n\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\twriter.writeCall(className + \".\" + varName, ++nArgs);\n\t\t\t}\n\t\t\t// Case 4: Variable name.\n\t\t\telse {\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t}\n\t\t}\n\t\treturn termParent;\n\t}", "public T caseStringLiteralExpCS(StringLiteralExpCS object) {\r\n return null;\r\n }", "public T caseNamedLiteralExpCS(NamedLiteralExpCS object) {\r\n return null;\r\n }", "public T caseEXPRESSION(EXPRESSION object)\n {\n return null;\n }", "public void parseTerm(Tokenizer t) {\n\n // parse the fac node\n this.fac.parseFac(t);\n\n // check selection\n if(t.currentToken().equals(\"*\")) {\n\n // Chomp \"*\" token\n t.nextToken();\n\n // update selection\n this.selection = 2;\n\n // parse term node\n this.term = new TermNode();\n this.term.parseTerm(t);\n\n }\n\n }", "private Token(TokenType type, Range range, Range textRange, String id, String match) {\r\n \t\t\tsuper();\r\n \t\t\tthis.type = type;\r\n \t\t\tthis.range = range;\r\n \t\t\tthis.textRange = textRange == null ? range : textRange;\r\n \t\t\tthis.id = id;\r\n //\t\t\tthis.match = match;\r\n \t\t}", "public T casePatternStatement(PatternStatement object) {\n\t\treturn null;\n\t}", "public T caseClause(Clause object)\n {\n return null;\n }", "protected abstract CommandMatch<?, ?> resolve(InvocationMatch<T> match);", "public SuggestedTerm(String term, int editDistance){\n this.term = term;\n this.editDistance = editDistance;\n }", "private Delta _parseCharacter(Matcher matcher)\n {\n switch(matcher.group(4))\n {\n case \"u\": return Delta.Up();\n case \"d\": return Delta.Down();\n case \"l\": return Delta.Left();\n case \"r\": return Delta.Right();\n }\n\n return null;\n }", "private double processTerm() throws ParsingException {\n double result = processFactor();\n\n while (true) {\n if (tryCaptureChar('*')) {\n result *= processFactor();\n } else if (tryCaptureChar('/')) {\n result /= processFactor();\n } else {\n break;\n }\n }\n\n return result;\n }", "public T caseLetExpCS(LetExpCS object) {\r\n return null;\r\n }", "public String visit(ExpressionTerm n, String s) {\n n.f1.accept(this, null);\n return null;\n }", "SingleTerm(Term t)\n {\n term = t;\n }", "public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}", "public String toMatchedString() {\n\t\t// concantenate the unit display Strings together\n\t\t// to form the display String for the whole InputTerm.\n\t\tStringBuilder displayBuf = new StringBuilder();\n\t\tfor(InputTermUnit<V> unit : this.units) {\n\t\t\tdisplayBuf.append(unit.toString());\n\t\t}\n\n\t\treturn displayBuf.toString();\n\t}", "public T caseLiftStatement(LiftStatement object) {\n\t\treturn null;\n\t}", "public abstract PlayerMove toPlayerMove(Player player, Match match);", "protected Evaluable parseTerm() throws ParsingException {\n Evaluable factor = parseFactor();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \"*/%\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable factor2 = parseFactor();\n\n factor = new OperatorCallExpr(new Evaluable[] { factor, factor2 }, op);\n }\n\n return factor;\n }", "protected Query newTermQuery(Term term, float boost) {\n Query q = new TermQuery(term);\n if (boost == DEFAULT_BOOST) {\n return q;\n }\n return new BoostQuery(q, boost);\n }", "public String getMatchOperation() {\n return matchOperation;\n }", "public T caseRegexValidationRuleDeclaration(RegexValidationRuleDeclaration object)\n {\n return null;\n }", "private void constructTerm(String s) {\r\n int coefficient;\r\n int power;\r\n String regexPattern =\r\n \"([+-]?)([1-9]\\\\d*|0{1})([x]{1})(\\\\^{1})([1-9]\\\\d*|0{1})|([+-]?)([1-9]\\\\d*|0{1})\";\r\n Pattern p = Pattern.compile(regexPattern);\r\n Matcher m = p.matcher(s);\r\n if (!m.matches()) {\r\n throw new IllegalArgumentException(\"Illegal term, cannot be created\");\r\n }\r\n if (m.group(1) != null) {\r\n coefficient = Integer.parseInt(m.group(1).concat(m.group(2)));\r\n power = Integer.parseInt(m.group(5));\r\n addTerm(coefficient, power);\r\n } else if (m.group(6) != null) {\r\n coefficient = Integer.parseInt(m.group(6).concat(m.group(7)));\r\n power = 0;\r\n addTerm(coefficient, power);\r\n }\r\n }", "static public Rule parse(OrchestraSystem catalog, String rule, \r\n\t\t\tMap<String,RelationContext> locals) throws ParseException, RelationNotFoundException {\r\n\t\tHolder<Integer> counter = new Holder<Integer>(0);\r\n\t\tPositionedString str = new PositionedString(rule);\r\n\t\tstr.skipWhitespace();\r\n\t\tUntypedAtom h = UntypedAtom.parse(str, counter);\r\n\t\tboolean negateHead = false;\r\n\t\tif (h.getName().startsWith(\"NOT_\")) {\r\n\t\t\th.setName(h.getName().substring(4));\r\n\t\t\tnegateHead = true;\r\n\t\t}\r\n\r\n\t\tstr.skipWhitespace();\r\n\t\tif (!str.skipString(\":-\")) {\r\n\t\t\tcomplain(str, \"':-'\");\r\n\t\t}\r\n\t\tstr.skipWhitespace();\r\n\t\tArrayList<Atom> body = new ArrayList<Atom>();\r\n\t\tboolean first = true;\r\n\t\tstr.skipWhitespace();\r\n\t\twhile (str.inRange()) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tif (!str.skipString(\",\")) {\r\n\t\t\t\t\tcomplain(str, \"','\");\r\n\t\t\t\t}\r\n\t\t\t\tstr.skipWhitespace();\r\n\t\t\t}\r\n\t\t\tUntypedAtom b = UntypedAtom.parse(str, counter);\r\n\t\t\tboolean isNegated = false;\r\n\t\t\tif (b.getName().startsWith(\"NOT_\")) {\r\n\t\t\t\tisNegated = true;\r\n\t\t\t\tb.setName(b.getName().substring(4));\r\n\t\t\t}\r\n\t\t\tAtom n = b.getTyped(catalog, locals);\r\n\t\t\tn.setNeg(isNegated);\r\n\t\t\tbody.add(n);\r\n\t\t\tstr.skipWhitespace();\r\n\t\t}\r\n\t\tAtom th;\r\n\t\ttry {\r\n\t\t\tth = h.getTyped(catalog, locals);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tth = h.getTyped(body);\r\n\t\t\t// Add this as a local view definition\r\n\t\t\tif (!locals.containsKey(th.getRelationContext().toString()))\r\n\t\t\t\tlocals.put(th.getRelationContext().toString(), th.getRelationContext());\r\n\t\t} catch (RelationNotFoundException e) {\r\n\t\t\tth = h.getTyped(body);\r\n\t\t\t// Add this as a local view definition\r\n\t\t\tif (!locals.containsKey(th.getRelationContext().toString()))\r\n\t\t\t\tlocals.put(th.getRelationContext().toString(), th.getRelationContext());\r\n\t\t}\r\n\t\tth.setNeg(negateHead);\r\n\r\n\t\treturn new Rule(th, body, null, catalog.getMappingDb().getBuiltInSchemas());\r\n\t}", "public Match( ) {\n\n }", "public T caseLatchedStatement(LatchedStatement object) {\n\t\treturn null;\n\t}", "public T caseStatement(Statement object)\n {\n return null;\n }", "public T caseStatement(Statement object)\n {\n return null;\n }", "private static Term toTerm(ByteBuffer value)\n {\n return new Constants.Value(value);\n }", "@Override\n public Node visit(final Term term) {\n if (!term.isGenerated()) {\n\n if (isReverseCompoundTriggerWord(term)) {\n termsToDelete.add(term);\n } else {\n decompound(term);\n compound(term);\n }\n\n previousTerms.add(term);\n }\n\n return term;\n }", "public T caseText(Text object) {\n\t\treturn null;\n\t}", "private MatchOperation getMatchOperation(String field, Operation operation, Object... value) {\n switch (operation) {\n case EQ:\n return match(Criteria.where(field).is(value[0]));\n case IN:\n return match(Criteria.where(field).in((List) value[0]));\n case GT:\n return match(Criteria.where(field).gt(value[0]));\n case LT:\n return match(Criteria.where(field).lt(value[0]));\n case NOT:\n return match(Criteria.where(field).ne(value[0]));\n case GTE:\n return match(Criteria.where(field).gte(value[0]));\n case LTE:\n return match(Criteria.where(field).lte(value[0]));\n case CONTAINS:\n return match(Criteria.where(field).regex(\".*\" + value[0] + \".*\"));\n case BTW:\n RangeCriteria range = (RangeCriteria) value[0];\n\n return match(\n Criteria.where(field)\n .gte(((BigDecimal) range.getMin()).doubleValue())\n .lte(((BigDecimal) range.getMax()).doubleValue()));\n\n default:\n return null;\n }\n }", "public Token toToken(String s);", "private void parseTerm() throws IOException {\r\n\t\tString line;\r\n\t\tTerm newTerm = new Term();\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.id = line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"name:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.name=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"namespace:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.namespace=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\telse if(line.startsWith(\"def:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.def=nocomment(line.substring(colon+1));\r\n\t\t\t\tterms.addTerm(newTerm);\r\n\t\t\t\tif (newTerm.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addVertex(newTerm);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"TERM WAS NOT ADDED, NO NAMESPACE!\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public T caseRelationalExpression(RelationalExpression object)\n {\n return null;\n }", "public T caseExpr(Expr object) {\n\t\treturn null;\n\t}", "@Override\n public String visit(MoveStmt n) {\n String _ret = null;\n String r1 = this.reg[n.f1.f0.which];\n int which = n.f2.f0.which;\n if (which == 0) {\n /* 0 MOVE r1 HALLOCATE SimpleExp */\n this.save_a0v0(r1);\n n.f2.accept(this);\n Global.outputString += \"move $\" + r1 + \", $v0\\n\";\n this.load_a0v0(r1);\n } else {\n /* 1 MOVE r1 Operator Reg SimpleExp */\n /* 2 MOVE r1 SimpleExp */\n this.moveReg = r1;\n n.f2.accept(this);\n this.moveReg = null;\n }\n return _ret;\n }", "Token match(Kind... kinds) throws SyntaxException {\r\n\t\tToken tmp = t;\r\n\t\tif (isKind(kinds)) {\r\n\t\t\tconsume();\r\n\t\t\treturn tmp;\r\n\t\t}\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor (Kind kind1 : kinds) {\r\n\t\t\tsb.append(kind1).append(kind1).append(\" \");\r\n\t\t}\r\n\t\terror(kinds);\r\n\t\treturn null; // unreachable\r\n\t}", "public void caseARegExp(ARegExp node)\n {\n Iterator<PConcat> iter = node.getConcats().iterator();\n iter.next().apply(this);\n\n // further PConcat nodes are unioned (| operator) together\n while (iter.hasNext()) {\n buffer.append('|');\n iter.next().apply(this);\n }\n }", "public T caseText(Text object)\n {\n return null;\n }", "@Test\n public void testFromWithTernaryFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from (isFull ? $cheesery : $market) ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from (isFull ? $cheesery : $market)\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "public void match(ReaderBuffer buffer, TokenMatch match)\n throws IOException {\n automaton.match(buffer, match);\n }", "Match getCompleteMatch();", "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 Match(String subgraph) {\r\n\t\tsuper();\r\n\t\tthis.subgraph = subgraph;\r\n\t\tthis.variables = new ArrayList<Variable>();\r\n\t}", "@Nullable\n String getMatch() {\n if (getAnchorType() == STRING_LITERAL || getAnchorType() == CHAR_LITERAL) {\n // Remove quotes inserted by parboiled for completion suggestions\n String fullToken = _anchor.getLabel();\n if (fullToken.length() >= 2) { // remove surrounding quotes\n fullToken = fullToken.substring(1, fullToken.length() - 1);\n }\n return fullToken;\n }\n return null;\n }", "B highlightExpression(String highlightExpression);", "Expr term() throws IOException {\n\t\tExpr e = unary();\n\t\twhile (look.tag == '*' || look.tag == '/') {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Arith(tok, e, unary());\n\t\t}\n\t\treturn e;\n\t}", "T transform(String line);", "public T caseSynchStatement(SynchStatement object) {\n\t\treturn null;\n\t}", "public void addResponseToResult(String term){\n\t\tResult result = this.getResult();\n\t\tif(result==null){\n\t\t\tresult = new Result();\n\t\t\tresult.setResponse(term);\n\t\t\tthis.setResult(result);\n\t\t}\n\t\telse{\n\t\t\tString s = result.getResponse();\n\t\t\ts += \",\" + term;\n\t\t\tresult.setResponse(s);\n\t\t}\t\n\t}" ]
[ "0.54279906", "0.535434", "0.53062344", "0.53062344", "0.52202964", "0.5170521", "0.5073644", "0.4996289", "0.49805248", "0.4970792", "0.49673203", "0.49210307", "0.48798126", "0.48785532", "0.48565736", "0.4771485", "0.47559136", "0.47022745", "0.46958062", "0.46513322", "0.46347395", "0.46333772", "0.4617557", "0.45890087", "0.4513248", "0.44590333", "0.44558567", "0.44523504", "0.44389647", "0.4438403", "0.44327977", "0.44078255", "0.440498", "0.4403184", "0.4403074", "0.44003406", "0.43990186", "0.43656635", "0.43641126", "0.4359868", "0.43554828", "0.4348685", "0.43437514", "0.43437514", "0.43370888", "0.43164182", "0.43120977", "0.43099725", "0.430693", "0.43043888", "0.43042397", "0.42962924", "0.42810535", "0.42778018", "0.42741948", "0.42508033", "0.42390683", "0.42390525", "0.42164695", "0.42022192", "0.4202189", "0.4185638", "0.4184083", "0.4182949", "0.41747582", "0.41740486", "0.41606423", "0.4154645", "0.41520664", "0.41511437", "0.415041", "0.4143539", "0.4142631", "0.41330573", "0.41311446", "0.41279387", "0.41279387", "0.411582", "0.41089553", "0.40921903", "0.40884525", "0.4088171", "0.40875617", "0.4087208", "0.40804455", "0.4073384", "0.40729448", "0.4072322", "0.40714785", "0.4059645", "0.40545025", "0.40482837", "0.40448353", "0.40424246", "0.4039945", "0.4039201", "0.40306732", "0.40292913", "0.40264338", "0.40213907" ]
0.6605722
0
ref, no class info, is required
public ValueOrRef readRef(Element element) { String ref = element.getTextContent(); ValueOrRef defaultValueOrRef = DefaultValueOrRef.ref(null, ref, true); return defaultValueOrRef; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ref() {\n\n\t}", "java.lang.String getRef();", "@Override\r\n\tpublic Ref getRef() {\n\t\treturn ref;\r\n\t}", "public String getRef() {\n return ref;\n }", "Symbol getRef();", "public abstract T ref(ID id);", "public void setReference(Reference ref)\n {\n this.ref = ref;\n }", "public String getReference();", "public String getReference();", "String getReference();", "String getReference();", "@Override\n String getClassRef() {\n return this.classNode.name;\n }", "private Ref handleRef() throws XMLStreamException{\n String name = reader.getAttributeValue(0);\n nextTag();\n nextTag();\n return new Ref(definedGrammar, name);\n }", "public ReferenceHelper getReferenceHelper();", "protected abstract String getRefName();", "public Reference() {\n super();\n }", "Object getConref();", "Reference owner();", "FunctionArgument getRef();", "@Override\n public String getReferenceInfo()\n {\n return \"\";\n }", "Variable getRefers();", "void setRef(java.lang.String ref);", "public String getRef(){\r\n\t\treturn this.getAttribute(\"ref\").getValue();\r\n\t}", "Object getRefid();", "Object visitReference(ReferenceNode node, Object state);", "public boolean canBeReferencedByIDREF() {\n/* 171 */ return false;\n/* */ }", "public String reference(Object obj) {\n return null;\n }", "public abstract Value getReferenceValue();", "public String getRefType() {\n return refType;\n }", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "protected URIReferenceImpl makeRefImpl(URIReference ref) {\n return (ref instanceof URIReferenceImpl) ? (URIReferenceImpl)ref : new URIReferenceImpl(ref.getURI());\n }", "void getReference(Configuration c)\n {\n c_ref= c;\n }", "RefClass getOwnerClass();", "boolean hasRef();", "protected LibReference() {\n\t}", "public abstract Reference getReference() throws NamingException ;", "public GHFrom getRef() {\n return ref;\n }", "String getReferenceType();", "private CodeRef() {\n }", "public abstract byte getReferenceKind();", "public String getReference() {\n return reference;\n }", "public abstract double getReference();", "public abstract double getReference();", "public ObjectReference getObject();", "ReferenceLink createReferenceLink();", "public T getRefer() {\n return refer;\n }", "public T caseRef(Ref object) {\r\n\t\treturn null;\r\n\t}", "public void setReference (SoftReference ref)\r\n {\r\n _reference = ref;\r\n }", "public final String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "public String getReference() {\n return reference;\n }", "ReferenceRealization createReferenceRealization();", "public void hiliteByReference(String ref) {\n\t}", "PSObject getTypeReference();", "public void setRefId (int refId)\n {\n this.refId = refId;\n }", "public LiveRef(int paramInt) {\n/* 74 */ this(new ObjID(), paramInt);\n/* */ }", "ComponentRefType createComponentRefType();", "VariableRef createVariableRef();", "String getISOPref();", "@Override\n\tpublic void bankInfo(T ref) {\t// act as an add(Object ref) method\n\t\tSystem.out.println(ref);\n\t}", "public INamedReference<IEntity> getEntityRef();", "public abstract String getRefKey();", "public void setReference(String reference);", "public LiveRef(ObjID paramObjID, int paramInt, RMIClientSocketFactory paramRMIClientSocketFactory, RMIServerSocketFactory paramRMIServerSocketFactory) {\n/* 103 */ this(paramObjID, TCPEndpoint.getLocalEndpoint(paramInt, paramRMIClientSocketFactory, paramRMIServerSocketFactory), true);\n/* */ }", "void bankInfo(T ref);", "public T caseReUsableRef(ReUsableRef object) {\r\n\t\treturn null;\r\n\t}", "final Reference<ComputedImage> reference() {\n return reference;\n }", "String getObjectRefName();", "public Object elGetReference(Object bean);", "public void methodReferences() {\n\t\t// Write sample for below\n\n\t\t// Static method\n\t\t// Instance method on parameter objects\n\t\t// Instance method\n\t\t// Constructor\n\t}", "public LiveRef(ObjID paramObjID, int paramInt) {\n/* 93 */ this(paramObjID, TCPEndpoint.getLocalEndpoint(paramInt), true);\n/* */ }", "protected String xCB() { return WhiteStilettoAliasRefCB.class.getName(); }", "void writeReference(Object obj);", "@Nullable\n String getRef();", "boolean isSetRef();", "VarRef createVarRef();", "public abstract R createReference(T type, Object value);", "public java.lang.String getReference() {\n return reference;\n }", "public void setRefnum(java.lang.String refnum) {\n this.refnum = refnum;\n }", "ServiceReferenceProxy getServiceReference();", "ReferenceEmbed createReferenceEmbed();", "public SoftReference getReference ()\r\n {\r\n return _reference;\r\n }", "public ReferenceType(Name name) {\n super(name.line, name.byteOffset);\n this.name = name;\n }", "public VectorN xref0 ();", "public void setReferenceId(String refid) {\n this.refid = refid;\n }", "private cat.footoredo.mx.ir.Variable ref (Entity entity) {\n return new cat.footoredo.mx.ir.Variable(varType(entity.getType()), entity);\n }", "public final boolean isReference() {\n \treturn !isPrimitive();\n }", "public String getReferenceId() {\n return refid;\n }", "@Override\n public final boolean isReferenceType() {\n return true;\n }", "@Override\r\n\tpublic int getInt(Ref ref) {\n\t\treturn 0;\r\n\t}", "public Node getReference() {\n return this.reference;\n }", "public LiveRef(int paramInt, RMIClientSocketFactory paramRMIClientSocketFactory, RMIServerSocketFactory paramRMIServerSocketFactory) {\n/* 85 */ this(new ObjID(), paramInt, paramRMIClientSocketFactory, paramRMIServerSocketFactory);\n/* */ }", "public String getREFERENCE() {\r\n return REFERENCE;\r\n }", "public long getRefId() {\n return refId;\n }", "org.apache.xmlbeans.XmlToken xgetRef();", "public interface Generic extends Reference\n{\n}", "public interface ReferenceHolder {\n\n /**\n * Sets the text.\n *\n * @param text the new text\n */\n void setText(String text);\n\n /**\n * Gets the current text.\n *\n * @return Returns the text.\n */\n String getText();\n\n /**\n * Gets the current {@link Diagram}.\n *\n * @return Returns the diagram.\n */\n Diagram getDiagram();\n\n /**\n * Sets the reference {@link Diagram}.\n *\n * @param reference the new reference\n */\n void setReference(Diagram reference);\n\n /**\n * Gets the reference {@link Diagram}.\n *\n * @return Returns the reference.\n */\n Diagram getReference();\n\n /**\n * Adds a {@link PropertyChangeListener}.\n *\n * @param listener the listener to add\n */\n void addPropertyChangeListener(PropertyChangeListener listener);\n\n}", "public String getRef(){\n return this.filenameWithoutExtension + \".\" + this.index;\n }", "protected void removeReference()\n {\n }", "public interface ClassifierClass extends javax.jmi.reflect.RefClass {\n}" ]
[ "0.76872253", "0.7136362", "0.70882446", "0.68540895", "0.68127126", "0.6806154", "0.6793857", "0.66277343", "0.66277343", "0.6594209", "0.6594209", "0.65676564", "0.64835", "0.64705753", "0.6466073", "0.64650655", "0.64342517", "0.6331316", "0.6322728", "0.63025224", "0.6299835", "0.6272791", "0.6256715", "0.62508494", "0.6247915", "0.623911", "0.6238541", "0.6221383", "0.62003666", "0.61815655", "0.6171655", "0.6169004", "0.61650735", "0.61604047", "0.6152979", "0.61443394", "0.61048514", "0.60919964", "0.60912377", "0.6084232", "0.60726655", "0.6045212", "0.6045212", "0.6041952", "0.6034637", "0.5994152", "0.59727436", "0.5955328", "0.59468883", "0.5924609", "0.5924609", "0.5924609", "0.5916218", "0.58843684", "0.586393", "0.58439803", "0.58406353", "0.58349884", "0.58256316", "0.5818776", "0.5818158", "0.58172345", "0.5811238", "0.58056694", "0.5800682", "0.5788429", "0.5778577", "0.5774607", "0.5769856", "0.5766113", "0.5758498", "0.5757351", "0.5756827", "0.5751842", "0.5742691", "0.57395744", "0.5734003", "0.5723502", "0.5721443", "0.57134455", "0.5712957", "0.5709762", "0.57081485", "0.56904405", "0.5687202", "0.5678491", "0.56758034", "0.567573", "0.5672838", "0.56719565", "0.5664299", "0.566038", "0.56506497", "0.5650128", "0.56474787", "0.56396693", "0.56377375", "0.5635861", "0.56326425", "0.56300706", "0.5629203" ]
0.0
-1
plainValue, no class info
public ValueOrRef readValue(Element element) { String value = element.getTextContent(); ValueOrRef defaultValueOrRef = DefaultValueOrRef.plainValue(null, value); return defaultValueOrRef; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getRawValue();", "Object value();", "public T getRawValue(){\n return mValue;\n }", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "Object getValueFrom();", "public Object getValue() { return _value; }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "@Override\n public Object getValue()\n {\n return value;\n }", "T value();", "public Object getValue() { return this.value; }", "public abstract Value getValue();", "public S getValue() { return value; }", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "T getValue();", "private Value() {\n\t}", "public V getValue();", "public Value(){}", "@Override\n public N value() {\n return value;\n }", "public T getValue();", "ValueType getValue();", "protected Value() {\n flags = 0;\n num = null;\n str = null;\n object_labels = getters = setters = null;\n excluded_strings = included_strings = null;\n functionPartitions = null;\n functionTypeSignatures = null;\n var = null;\n hashcode = 0;\n }", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public Value() {}", "@Override\n\t\tpublic V getValue() {\n\t\t\treturn v;\n\t\t}", "public T value() {\n\t\treturn value;\n\t}", "public Object getValue()\n {\n\treturn value;\n }", "public Object getValue(){\n \treturn this.value;\n }", "public abstract T getValue();", "public abstract T getValue();", "public Object getInternalValue()\n {\n return m_internalValue;\n }", "public Object getValue()\n {\n return value;\n }", "org.apache.calcite.avatica.proto.Common.TypedValue getValue();", "public abstract V getValue();", "public BwValue mkValue() {\n\t\treturn new BwValue(this.sT);\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn null;\n\t}", "protected T getValue0() {\n\t\treturn value;\n\t}", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "String value();", "String value();", "public final Object getValue()\n {\n return m_Value;\n }", "V getValue();", "V getValue();", "V getValue();", "public abstract Any value();", "String getValue()\n {\n return value.toString();\n }", "public Object getValue() {\r\n return value;\r\n }", "public String getValue () { return value; }", "@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}", "public abstract O value();", "public Object objectValue();", "public T getValue() {\r\n return value;\r\n }", "public interface Value {\n\t}", "public abstract String valueAsText();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public T getValue()\n {\n return value;\n }", "public T getValue() \n\t{\n\t\treturn value;\n\t}", "public Object getValue() {\r\n return oValue;\r\n }", "public String getValue() { return value; }", "@Override\n public String getValue() {\n return this.value.toString();\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "@Override\n public String getValue() {\n return value;\n }", "public Object getValue() {\n Object o = null; \n if (type == \"string\") { o = svalue; }\n if (type == \"int\" ) { o = ivalue; }\n return o;\n }", "@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}", "protected V getValue() {\n return this.value;\n }", "@Override\n public String asText() {\n return value;\n }" ]
[ "0.7674081", "0.7531805", "0.7477044", "0.7412968", "0.7412968", "0.7412968", "0.7412968", "0.7412968", "0.73920643", "0.73920643", "0.73920643", "0.73920643", "0.73920643", "0.73920643", "0.73920643", "0.7306109", "0.7306109", "0.7306109", "0.7233871", "0.71550125", "0.71323556", "0.7094895", "0.7082444", "0.7034021", "0.70329356", "0.7031945", "0.7016303", "0.6932598", "0.6932598", "0.6932598", "0.6932598", "0.6932598", "0.6932598", "0.69074094", "0.68993735", "0.68936914", "0.6891036", "0.68877363", "0.6871951", "0.6867754", "0.6867213", "0.6851486", "0.68484604", "0.684542", "0.6839069", "0.6814302", "0.6797666", "0.6797666", "0.67874", "0.6777848", "0.67754775", "0.67701924", "0.67627525", "0.6748617", "0.6748092", "0.6743013", "0.6743013", "0.6743013", "0.6743013", "0.6743013", "0.6743013", "0.6741679", "0.6741679", "0.6729999", "0.6725954", "0.6725954", "0.6725954", "0.67228633", "0.6721486", "0.67139685", "0.67003065", "0.6692819", "0.6688601", "0.6673397", "0.66693234", "0.666816", "0.66664463", "0.66529936", "0.66529936", "0.66529936", "0.66529936", "0.66529936", "0.66529936", "0.66529936", "0.66529936", "0.66529936", "0.6646975", "0.66407293", "0.6638932", "0.6629847", "0.6626384", "0.66240525", "0.66240525", "0.66240525", "0.66240525", "0.66240525", "0.6623495", "0.6616799", "0.6604586", "0.6601098", "0.66005635" ]
0.0
-1
Declaracion de metodos Metodos CRUD
public void registrarAdministrador() throws IOException { //asignamos al usuario la imagen de perfil default usuarioView.setUsuarioFotoRuta(getPathDefaultUsuario()); usuarioView.setUsuarioFotoNombre(getNameDefaultUsuario()); //Se genera un login y un pass aleatorio que se le envia al proveedor MD5 md = new MD5(); GenerarPassword pass = new GenerarPassword(); SendEmail email = new SendEmail(); password = pass.generarPass(6);//Generamos pass aleatorio //Encriptamos las contraseñas usuarioView.setUsuarioPassword(md.getMD5(password));//Se encripta la contreseña usuarioView.setUsuarioRememberToken(md.getMD5(password)); //el metodo recibe los atributos, agrega al atributo ciudad del objeto usuario un objeto correspondiente, //de la misma forma comprueba el rol y lo asocia, por ultimo persiste el usuario en la base de datos usuarioView.setSmsCiudad(ciudadDao.consultarCiudad(usuarioView.getSmsCiudad()));//Asociamos una ciudad a un usuario usuarioView.setSmsRol(rolDao.consultarRol(usuarioView.getSmsRol()));//Asociamos un rol a un usuario usuarioView.setUsuarioEstadoUsuario(1);//Asignamos un estado de cuenta usuarioView.setSmsNacionalidad(nacionalidadDao.consultarNacionalidad(usuarioView.getSmsNacionalidad())); //registramos el usuario y recargamos la lista de clientes usuarioDao.registrarUsuario(usuarioView); usuariosListView = adminDao.consultarUsuariosAdministradores(); //Enviar correo email.sendEmailAdministradorBienvenida(usuarioView, password); //limpiamos objetos usuarioView = new SmsUsuario(); password = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JanelaTipoContato() {\r\n initComponents();\r\n try {\r\n\r\n List<TipoContato> tipoContatos = (List<TipoContato>) (Object) tipoContatoDao.pesquisarTodos();\r\n adicionarListaTipoContatosTabela(tipoContatos);\r\n } catch (Exception exception) {\r\n }\r\n }", "public crud_empleados() {\n initComponents();\n txt_usuario1.setEditable(false);\n Mostrar();\n \n\n\n }", "@Override\n\tpublic List<Materia> recuperarTodo() throws DataAccessException {\n\t\treturn null;\n\t}", "public interface CRUDProduto {\r\n \r\n public boolean save(Produto produto);\r\n\r\n public boolean update(Produto produto);\r\n\r\n public boolean delete(Produto produto);\r\n\r\n public Produto get(long id);\r\n\r\n public List<Produto> getAll();\r\n}", "protected MedicoDao() {\n super(Medico.class);\n }", "public MainMedico(Medico m) {\n initComponents();\n createTable(m);\n }", "public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }", "public void mostrarDados() {\n txtId.setText(\"\" + lista.get(indice).getId());\n txtNome.setText(lista.get(indice).getNome());\n txtEmail.setText(lista.get(indice).getEmail());\n txtSenha.setText(lista.get(indice).getSenha());\n preencheTabela();\n }", "private void creerMethode() {\n if (estValide()) {\n methode = new Methode();\n methode.setNom(textFieldNom.getText());\n methode.setVisibilite(comboBoxVisibilite.getValue());\n methode.setType(comboBoxType.getValue());\n ArrayList<Parametre> temp = new ArrayList<>();\n for (Parametre parametre : parametreListView.getItems())\n temp.add(parametre);\n methode.setParametres(temp);\n close();\n }\n }", "private RepositorioOrdemServicoHBM() {\n\n\t}", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\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 }", "public FrmDatosMiembro(int Id, String nombres, String apellidos,\n String usuario, String cedula, String rol){\n \n initComponents();;\n ID = Id;\n this.TxtNombres.setText(nombres);\n this.TxtApellidos.setText(apellidos);\n this.TxtUsuario.setText(usuario);\n this.TxtCedula.setText(cedula);\n \n llenarComboBox();\n tipoMiembro(rol);\n }", "@Override\n\tpublic void mostrarDados() {\n\t\t\n\t}", "public void datos_elegidos(){\n\n\n }", "public CadastrarMarcasModelos() {\n initComponents();\n }", "public TipoInformazioniController() {\n\n\t}", "public CRUD_form() {\n initComponents();\n DbCon.getConnection(\"jdbc:mysql://localhost:3306/test\", \"root\", \"rishi\");\n }", "public Index() {\n EntityManager emgr = new BeanBase().getEntityManager();\n this.listaUltimasEntradas = new BeanBaseJWiki().getUltimosCincoArticulosSmall();\n this.listaExistenciasFallidas = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=2\").getResultList();\n this.listaExistenciasMantenimiento = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=3\").getResultList();\n this.listaEquiposFallidos = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=2\").getResultList();\n this.listaEquiposMantenimiento = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=3\").getResultList();\n\n Calendar cal = Calendar.getInstance(); \n this.listaReservasHoy = new BeanBaseJCanon().getReservasMismoDia(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.YEAR));\n\n }", "public AtendimentoServicoDao() {\r\n super(AtendimentoServico.class);\r\n }", "public DataManage() {\r\n\t\tsuper();\r\n\t}", "public telaCadastro() {\n initComponents();\n populaTabela();\n }", "public PacienteModel() {\r\n this.codigo = new SimpleIntegerProperty();\r\n this.nome = new SimpleStringProperty();\r\n this.nascimento = new SimpleStringProperty();\r\n this.endereco = new SimpleStringProperty();\r\n this.telefone = new SimpleStringProperty();\r\n this.cep = new SimpleStringProperty();\r\n this.documento = new SimpleStringProperty();\r\n this.sexo = new SimpleStringProperty();\r\n this.data_cliente = new SimpleStringProperty();\r\n this.tipo = new SimpleStringProperty();\r\n this.email = new SimpleStringProperty();\r\n this.obs = new SimpleStringProperty();\r\n this.status = new SimpleBooleanProperty();\r\n }", "public meseros() {\n initComponents();\n }", "public Tecnico(){\r\n\t\tthis.matricula = 0;\r\n\t\tthis.nome = \"NULL\";\r\n\t\tthis.email = \"NULL\";\r\n\t\tthis.telefone = \"TELEFONE\";\r\n\t\tlistaDeServicos = new ArrayList<Servico>();\r\n\t}", "private void habilitarCamposModif() {\n\n listarPromotoresModif();\n //limpiarListaCrear();\n }", "@GetMapping(\"/mapeamentos\")\n @Timed\n public List<Mapeamento> getAllMapeamentos() {\n log.debug(\"REST request to get all Mapeamentos\");\n return mapeamentoRepository.findAll();\n }", "public Modello() {\r\n super();\r\n initComponents();\r\n setModalita(APPEND_QUERY);\r\n setFrameTable(tabModello);\r\n setNomeTabella(\"vmodello\");\r\n tMarcaDescrizione.setEnabled(false);\r\n }", "List<Medicine> getAllMedicines();", "@Dao\npublic interface MembreDAO {\n @Query(\"SELECT * FROM membres WHERE id_membre =:membreID\")\n Flowable<Membre> getUserById(String membreID);\n\n @Query(\"SELECT * FROM membres\")\n Flowable<List<Membre>> getAllUsers();\n\n @Insert\n void insertUser(Membre... membres);\n\n @Update\n void UpdateUser(Membre... membres);\n\n @Delete\n void DeleteUser(Membre membre);\n\n @Query(\"DELETE FROM membres\")\n void deleteAllUsers();\n}", "public static void main(String[] args) {\n int op;\r\n int opM;\r\n int opP;\r\n int opA;\r\n int opR;\r\n\r\n //Instanciando clases controladores para acceder a sus constrcutores (CRUD)\r\n ControladorMamifero mamiferoCon = new ControladorMamifero();\r\n ControladorPez pezCon = new ControladorPez();\r\n ControladorAve aveCon = new ControladorAve();\r\n\r\n do {\r\n\r\n System.out.println(\" ►► Menu ◄◄\");\r\n System.out.println(\"1. CRUD> Mamifero\");\r\n System.out.println(\"2. CRUD> Pez\");\r\n System.out.println(\"3. CRUD> Ave\");\r\n System.out.println(\"4. CRUD> Reptil\");\r\n System.out.println(\"5. SALIR \");\r\n\r\n Scanner leer = new Scanner(System.in);\r\n op = leer.nextInt();\r\n\r\n switch (op) {\r\n\r\n case 1: //crud de mamifero\r\n do {\r\n System.out.println(\" ►► Mamifero ◄◄\");\r\n System.out.println(\"1. CREATE \");\r\n System.out.println(\"2. READ \");\r\n System.out.println(\"3. UPDATE \");\r\n System.out.println(\"4. DELETE \");\r\n System.out.println(\"5. LIST \");\r\n System.out.println(\"6. REGRESAR \");\r\n\r\n opM = leer.nextInt();\r\n\r\n switch (opM) {\r\n //Creamos un objeto \"mamifero\".\r\n case 1:\r\n //Creo objeto de la clase ControladorMamifero para \r\n Mamifero mamifero = new Mamifero();\r\n //Asignamos valores\r\n System.out.println(\" CREATE \");\r\n System.out.println(\" Ingresar nombre\");\r\n mamifero.setNombre(leer.nextLine());\r\n mamifero.setNombre(leer.nextLine());\r\n System.out.println(\" Ingresar el tipo de animal\");\r\n mamifero.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingresar el sexo\");\r\n mamifero.setSexo(leer.nextLine());\r\n\r\n System.out.println(\" Ingresar cantidad de patas\");\r\n mamifero.setCantPatas(leer.nextInt());\r\n System.out.println(\" Ingresar cantidad de mamas\");\r\n mamifero.setCantMamas(leer.nextInt());\r\n System.out.println(\" Ingresar el tiempo de gestacion\");\r\n mamifero.setTiempoGest(leer.nextLine());\r\n mamifero.setTiempoGest(leer.nextLine());\r\n System.out.println(\" Ingresar el peso en kilos\");\r\n mamifero.setPeso(leer.nextDouble());\r\n\r\n //llamamos al metodo create en la clase Controlador.\r\n mamiferoCon.create(mamifero);\r\n System.out.println(\" Se ha creado un mamifero \"\r\n + mamifero.getNombre() + \" con el codigo: \" + mamifero.getCodigo());\r\n break;\r\n\r\n //Leemos el objeto creado anteriormente \"mamifero\" mediante el nombre.\r\n case 2:\r\n //Read mamifero\r\n System.out.println(\" \");\r\n System.out.println(\" READ \");\r\n System.out.println(\"Ingresar codigo del mamifero\");\r\n int cod2 = leer.nextInt();\r\n\r\n System.out.println(\" \");\r\n System.out.println(mamiferoCon.read(cod2));\r\n\r\n break;\r\n\r\n //Actualizamos el objeto pidiendo el nombre; el codigo se mantiene. \r\n case 3:\r\n //update mamifero\r\n System.out.println(\" UPDATE \");\r\n Mamifero mamiferoU = new Mamifero();\r\n System.out.println(\"Ingresar codigo del mamifero a modificar \");\r\n mamiferoU.setCodigo(leer.nextInt());\r\n mamiferoCon.update(mamiferoU);\r\n\r\n System.out.println(\"Ingresar nombre:\");\r\n mamiferoU.setNombre(leer.nextLine());\r\n mamiferoU.setNombre(leer.nextLine());\r\n System.out.println(\" Ingresar el tipo de animal\");\r\n mamiferoU.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingresar el sexo\");\r\n mamiferoU.setSexo(leer.nextLine());\r\n\r\n System.out.println(\" Ingresar cantidad de patas\");\r\n mamiferoU.setCantPatas(leer.nextInt());\r\n System.out.println(\" Ingresar cantidad de mamas\");\r\n mamiferoU.setCantMamas(leer.nextInt());\r\n System.out.println(\" Ingresar el tiempo en meses de gestacion\");\r\n mamiferoU.setTiempoGest(leer.nextLine());\r\n mamiferoU.setTiempoGest(leer.nextLine());\r\n System.out.println(\" Ingresar el peso en kilos\");\r\n mamiferoU.setPeso(leer.nextDouble());\r\n\r\n //llama al metodo update de la clase ControladorAuto.\r\n mamiferoCon.update(mamiferoU);\r\n System.out.println(\"Se han actualizado los datos del mamifero de codigo \"\r\n + mamiferoU.getCodigo());\r\n\r\n break;\r\n\r\n //Elimina un objeto y lo buscamos mediante el codigo;\r\n case 4:\r\n //delete mamifero\r\n //Mamifero mamiferoD = new Mamifero();\r\n System.out.println(\" DELETE \");\r\n System.out.println(\" Ingrese el nombre del mamifero a eliminar \");\r\n int cod = leer.nextInt();\r\n //lllama al metodo elimnar de la clase ControladorAuto\r\n mamiferoCon.delete(cod);\r\n System.out.println(\"Se a eliminado el mamifero \" + \" del codigo \" + cod);\r\n\r\n break;\r\n\r\n //Lista todos los objetos en el mismo orden que fueron creados anteriormente. \r\n case 5:\r\n //listar mamiferos creados\r\n System.out.println(\" LISTAR \");\r\n System.out.println(\" Desea listar 1.Si 2.No\");\r\n int lis = leer.nextInt();\r\n //mamifero.listar(leer.nextInt());\r\n mamiferoCon.listar(lis);\r\n\r\n break;\r\n\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"Continuar en la clase Mamifero = 1.SI / 2.NO\");\r\n opM = leer.nextInt();\r\n\r\n } while (opM != 2);\r\n break;\r\n\r\n //Clase HIJA 2 interface HASHSET y CRUD.\r\n case 2:\r\n do {\r\n System.out.println(\" ►► Pez ◄◄\");\r\n System.out.println(\"1. CREATE \");\r\n System.out.println(\"2. READ \");\r\n System.out.println(\"3. UPDATE \");\r\n System.out.println(\"4. DELETE \");\r\n System.out.println(\"5. LIST \");\r\n System.out.println(\"6. REGRESAR \");\r\n\r\n opP = leer.nextInt();\r\n switch (opP) {\r\n case 1: //create pez\r\n Pez pez = new Pez();\r\n System.out.println(\" CREANDO...\");\r\n System.out.println(\" Ingrese nombre\");\r\n pez.setNombre(leer.nextLine());\r\n pez.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n pez.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingrese el sexo\");\r\n pez.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese el tipo de pez\");\r\n pez.setTipoPez(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de esqueleto \");\r\n pez.setTipoEsqueleto(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n pez.setTamaño(leer.nextDouble());\r\n System.out.println(\"Ingrese el peso\");\r\n pez.setPeso(leer.nextDouble());\r\n\r\n pezCon.create(pez);\r\n System.out.println(\" Se ha creado el pez \" + pez.getNombre()\r\n + \" con codigo \" + pez.getCodigo());\r\n\r\n break;\r\n case 2: //read pez\r\n System.out.println(\" \");\r\n System.out.println(\" LEYENDO... \");\r\n System.out.println(\"Ingrese el codigo del pez\");\r\n int cod = leer.nextInt();\r\n\r\n System.out.println(\" \");\r\n //Imprimiendo el objeto \r\n System.out.println(pezCon.read(cod));\r\n\r\n break;\r\n case 3://update pez\r\n Pez pezU = new Pez();\r\n System.out.println(\" \");\r\n System.out.println(\" Ingrese el codigo del pez a modificar\");\r\n pezU.setCodigo(leer.nextInt());\r\n\r\n pezCon.update(pezU);\r\n\r\n System.out.println(\" ACTUALIZANDO...\");\r\n System.out.println(\" Ingrese nombre\");\r\n pezU.setNombre(leer.nextLine());\r\n pezU.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n pezU.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingrese el sexo\");\r\n pezU.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese el tipo de pez\");\r\n pezU.setTipoPez(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de esqueleto \");\r\n pezU.setTipoEsqueleto(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n pezU.setTamaño(leer.nextDouble());\r\n System.out.println(\"Ingrese el peso\");\r\n pezU.setPeso(leer.nextDouble());\r\n\r\n System.out.println(\" Los datos se han actualizado correctamente\");\r\n\r\n break;\r\n case 4://delete pez\r\n\r\n Pez pezD = new Pez();\r\n System.out.println(\" ELIMINANDO...\");\r\n System.out.println(\" Ingrese el codigo\");\r\n pezD.setCodigo(leer.nextInt());\r\n\r\n pezCon.delete(pezD);\r\n System.out.println(\" Se ha eliminado el pez de codigo \" + pezD.getCodigo());\r\n\r\n break;\r\n case 5://list pez\r\n System.out.println(\" LISTANDO...\");\r\n pezCon.imprimir();\r\n\r\n break;\r\n\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\" Continuar en la clase PEZ= 1.Si 2.No\");\r\n opP = leer.nextInt();\r\n } while (opP != 2);\r\n break;\r\n\r\n case 3: //CRUD de la clase hija 3 y ademas el CRUD\r\n do {\r\n System.out.println(\" ►► Ave ◄◄\");\r\n System.out.println(\"1. CREATE \");\r\n System.out.println(\"2. READ \");\r\n System.out.println(\"3. UPDATE \");\r\n System.out.println(\"4. DELETE \");\r\n System.out.println(\"5. LIST \");\r\n System.out.println(\"6. REGRESAR \");\r\n\r\n opA = leer.nextInt();\r\n\r\n switch (opA) {\r\n case 1://create ave\r\n Ave ave = new Ave();\r\n System.out.println(\" CREANDO...\");\r\n System.out.println(\" Ingrese el nombre\");\r\n ave.setNombre(leer.nextLine());\r\n ave.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n ave.setTipoAnimal(leer.nextLine());\r\n System.out.println(\"Ingrese el sexo\");\r\n ave.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese color de plumaje\");\r\n ave.setColorPlumaje(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de ave\");\r\n ave.setTipoAve(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n ave.setTamaño(leer.nextInt());\r\n System.out.println(\"Ingrese el tiempo de gestacion\");\r\n ave.setTiempoGest(leer.nextLine());\r\n ave.setTiempoGest(leer.nextLine());\r\n\r\n aveCon.create(ave);\r\n System.out.println(\"Se ha creado el ave \" + ave.getNombre()\r\n + \" con el codigo\" + ave.getCodigo());\r\n\r\n break;\r\n\r\n case 2://read ave\r\n System.out.println(\" \");\r\n System.out.println(\"LEYENDO...\");\r\n System.out.println(\" Ingrese el codigo del ave\");\r\n int codA = leer.nextInt();\r\n\r\n System.out.println(aveCon.read(codA));\r\n break;\r\n\r\n case 3://update ave\r\n Ave aveU = new Ave();\r\n System.out.println(\" \");\r\n System.out.println(\" Ingrese el nombre del ave a modificar\");\r\n aveU.setNombre(leer.nextLine());\r\n aveU.setNombre(leer.nextLine());\r\n \r\n aveCon.update(aveU);\r\n\r\n System.out.println(\" ACTUALIZANDO...\");\r\n System.out.println(\" Ingrese el nombre\");\r\n aveU.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n aveU.setTipoAnimal(leer.nextLine());\r\n System.out.println(\"Ingrese el sexo\");\r\n aveU.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese color de plumaje\");\r\n aveU.setColorPlumaje(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de ave\");\r\n aveU.setTipoAve(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n aveU.setTamaño(leer.nextInt());\r\n System.out.println(\"Ingrese el tiempo de gestacion\");\r\n aveU.setTiempoGest(leer.nextLine());\r\n aveU.setTiempoGest(leer.nextLine());\r\n \r\n aveCon.update(aveU);\r\n\r\n System.out.println(\"Se han actualizado los datos correctamente\");\r\n break;\r\n\r\n case 4://delete ave\r\n Ave aveD = new Ave();\r\n System.out.println(\" \");\r\n System.out.println(\"ELIMINANDO...\");\r\n System.out.println(\"Ingrese el codigo del ave\");\r\n aveD.setCodigo(leer.nextInt());\r\n\r\n aveCon.delete(aveD);\r\n System.out.println(\" Se ha eliminado el ave de codigo \" + aveD.getCodigo());\r\n break;\r\n\r\n case 5://list todos los objetos creados.\r\n System.out.println(\" LISTANDO...\");\r\n aveCon.imprimir();\r\n break;\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\" Continuar en la clase Ave= 1.Si 2.No\");\r\n opA = leer.nextInt();\r\n } while (opA != 2);\r\n\r\n //case 4:\r\n }\r\n\r\n } while (op != 5);\r\n\r\n }", "public interface ICommandeDao {\n public List<Commande> findAllCommandes();\n\n public Commande findCommandeById(int idCommande);\n\n public List<Commande> findCommandeByIdProduit(Integer idProduit);\n \n public List<Commande> findCommandeByIdUtilisateur(Integer idUtilisateur);\n\n public Commande createCommande(Commande commande);\n\n public Commande updateCommande(Commande commande);\n\n public boolean deleteCommande(Commande commande);\n}", "public interface IngredientListReadWriteModel extends BaseReadWriteModel,ICustomListViewModel,IngredientListReadModel {\n\n void setMealName(String mealName);\n void setEditableIngredientPosition(int pos);\n boolean checkMealName();\n void saveMeal();\n void newActiveIngredient();\n IMeal getActiveMeal();\n}", "List<O> obtenertodos() throws DAOException;", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public DescritoresDAO() {\n\t\t\n\t}", "public frmAdministracion() {\n initComponents();\n skin();\n DaoAdministracion da = new DaoAdministracion();\n da.setAdministracion(txtMedioAdministracion.getText());\n tblAdministracion.setModel(da.listar());\n\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 }", "@Dao\npublic interface MentorDAO {\n @Insert\n void insertMentor(Mentor mentor);\n\n @Update\n void updateMentor(Mentor mentor);\n\n @Delete\n void deleteMentor(Mentor mentor);\n\n @Query(\"SELECT * FROM Mentors\")\n LiveData<List<Mentor>> getAllMentors();\n\n\n @Query(\"SELECT * FROM Mentors WHERE MentorId = :mentorId\")\n Mentor getMentorById(int mentorId);\n\n @Query(\"SELECT * FROM Mentors WHERE CourseId = :courseId\")\n LiveData<List<Mentor>> getMentorsByCourseId(int courseId);\n}", "public interface MembreService {\n\n Membre create(Membre membre);\n Membre update(Membre membre);\n Membre findByNom(String nom);\n Membre findByPrenom(String nom);\n Membre findByAdresse(String adresse);\n Membre findByCni(String numeroCni);\n List<Membre> findAll();\n void delete(Long Id);\n\n}", "public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }", "@Override\r\npublic int create(Detalle_pedido d) {\n\treturn detalle_pedidoDao.create(d);\r\n}", "public ManagedRegistroSolicitudMateriales() {\n }", "public Datos(){\n }", "public AgregarAlumnoAdmin() {\n initComponents();\n }", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\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}", "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 populaNoticiaCat()\n {\n NoticiaCat n1 = new NoticiaCat(\"Avisos\", \"Help\");\n noticiaCatDAO.insert(n1);\n NoticiaCat n2 = new NoticiaCat(\"Noticias\", \"Document Notes\");\n noticiaCatDAO.insert(n2);\n NoticiaCat n3 = new NoticiaCat(\"Dicas\", \"Tag\");\n noticiaCatDAO.insert(n3);\n }", "Tablero consultarTablero();", "public interface TipoDao {\r\n\r\n /**\r\n * Inserta un nuevo registro en la tabla Tipos.\r\n */\r\n public TipoPk insert(Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Actualiza un unico registro en la tabla Tipos.\r\n */\r\n public void update(TipoPk pk, Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Elimina un unico registro en la tabla Tipos.\r\n */\r\n public void delete(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un unico registro en la tabla Tipos que conicida con la\r\n * primary-key especificada.\r\n */\r\n public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el criterio\r\n * 'id_tipo = :idTipo'.\r\n */\r\n public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el\r\n * criterio 'nombre_tipo LIKE %:nombre%'.\r\n */\r\n public Tipo[] findByName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el\r\n * criterio 'nombre_tipo = :nombre'.\r\n */\r\n public Tipo findByFullName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todas las filas de la tabla Tipos.\r\n */\r\n public Tipo[] findAll() throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con la\r\n * sentencia SQL especificada arbitrariamente\r\n */\r\n public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el WHERE\r\n * SQL especificado arbitrariamente\r\n */\r\n public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Sets the value of maxRows\r\n */\r\n public void setMaxRows(int maxRows);\r\n\r\n /**\r\n * Gets the value of maxRows\r\n */\r\n public int getMaxRows();\r\n\r\n /**\r\n * Retorna la conexión actual del usuario\r\n * \r\n * @return Connection\r\n */\r\n public Connection getUserConn();\r\n\r\n /**\r\n * Setea la conexión a usar con la BD\r\n * \r\n * @param userConn\r\n */\r\n public void setUserConn(Connection userConn);\r\n\r\n}", "@FXML\n private void populaTabela(){\n ObservableList<Medico> medicos = observableArrayList(medicoDAO.read());\n medicoNome.setCellValueFactory(new PropertyValueFactory<>(\"nome\"));\n medicoCrm.setCellValueFactory(new PropertyValueFactory<>(\"crm\"));\n medicoEspecialidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeEspecialidade\"));\n tabelaMedicos.setItems(FXCollections.observableArrayList(medicos));\n }", "public CrearPedidos() {\n initComponents();\n }", "public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }", "protected RespostaFormularioPreenchido() {\n // for ORM\n }", "protected abstract MetaDao metaDao();", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jTextFieldNama = new javax.swing.JTextField();\n jTextFieldId = new javax.swing.JTextField();\n jTextFieldAlamat = new javax.swing.JTextField();\n jTextFieldPekerjaan = new javax.swing.JTextField();\n jButtonCreate = new javax.swing.JButton();\n jButtonRead = new javax.swing.JButton();\n jButtonUpdate = new javax.swing.JButton();\n jButtonDelete = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTableCrud = new javax.swing.JTable();\n jTextFieldCari = new javax.swing.JTextField();\n jButtonCari = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n\n jLabel1.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel1.setText(\"Latihan CRUD\");\n\n jLabel2.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel2.setText(\"ID :\");\n\n jLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel3.setText(\"Nama :\");\n\n jLabel4.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel4.setText(\"Alamat :\");\n\n jLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel5.setText(\"Pekerjaan :\");\n\n jButtonCreate.setText(\"Create\");\n jButtonCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCreateActionPerformed(evt);\n }\n });\n\n jButtonRead.setText(\"Read\");\n jButtonRead.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonReadActionPerformed(evt);\n }\n });\n\n jButtonUpdate.setText(\"Update\");\n jButtonUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonUpdateActionPerformed(evt);\n }\n });\n\n jButtonDelete.setText(\"Delete\");\n\n jTableCrud.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jTableCrud.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTableCrudMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTableCrud);\n\n jTextFieldCari.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldCariActionPerformed(evt);\n }\n });\n\n jButtonCari.setText(\"Cari\");\n jButtonCari.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonCariActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Cari berdasarkan nama..\");\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(291, 291, 291)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(119, 139, Short.MAX_VALUE)\n .addComponent(jButtonCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButtonRead, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButtonUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButtonDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(133, 133, 133))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldNama, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldId, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldAlamat, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldPekerjaan, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addComponent(jScrollPane1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextFieldCari, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonCari, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(27, 27, 27))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(14, 14, 14)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldCari, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonCari))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldNama, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldAlamat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldPekerjaan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonCreate)\n .addComponent(jButtonUpdate)\n .addComponent(jButtonRead)\n .addComponent(jButtonDelete))\n .addGap(20, 20, 20))\n );\n\n pack();\n }", "protected void agregarUbicacion(){\n\n\n\n }", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "@Override\n public List<Complex> findAllMetaData() throws PersistentException {\n ComplexDao complexDao = transaction.createDao(ComplexDao.class);\n List<Complex> complexes = complexDao.readComplex();\n readTrainerLogin(complexes);\n readVisitorLogin(complexes);\n return complexes;\n }", "public Unidadmedida() {\r\n\t}", "private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\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}", "private void mostrarDatosInterfaz() {\n\t\tif (this.opcion == CREAR) {\n\t\t\tthis.campoTextoNombreUsuario.setUserData(\"\");\n\t\t\tthis.campoTextoNombreUsuario.setDisable(false);\n\t\t\tthis.campoContrasena.setUserData(\"\");\n\t\t\tthis.campoContrasena.setDisable(false);\n\t\t\tthis.campoCorreo.setUserData(\"\");\n\t\t\tthis.campoCorreo.setDisable(false);\n\t\t\tthis.comboGrupoUsuario.getSelectionModel().select(\"\");\n\t\t\tthis.comboGrupoUsuario.setDisable(false);\n\t\t\tthis.comboStatus.getSelectionModel().select(\"\");\n\t\t\tthis.comboStatus.setDisable(false);\n\t\t\tthis.comboEmpleados.setDisable(false);\n\t\t} else if (this.opcion == EDITAR) {\n\t\t\tthis.campoTextoNombreUsuario.setText(this.usuario.getUsuario());\n\t\t\tthis.campoTextoNombreUsuario.setDisable(true);\n\t\t\tthis.campoContrasena.setText(this.usuario.getContrasena());\n\t\t\tthis.campoContrasena.setDisable(false);\n\t\t\tthis.campoCorreo.setText(this.usuario.getCorreoElectronico());\n\t\t\tthis.campoCorreo.setDisable(false);\n\t\t\tthis.comboGrupoUsuario.setValue(this.usuario.getNombreGrupoUsuario());\n\t\t\tthis.comboGrupoUsuario.setDisable(false);\n\t\t\tthis.comboStatus.setValue(this.usuario.getDescripcionStatus());\n\t\t\tthis.comboStatus.setDisable(false);\n\t\t\tthis.comboEmpleados.setValue(this.usuario.getNombreEmpleado());\n\t\t\tthis.comboEmpleados.setDisable(false);\n\t\t} else if (this.opcion == VER) {\n\t\t\tthis.campoTextoNombreUsuario.setText(this.usuario.getUsuario());\n\t\t\tthis.campoTextoNombreUsuario.setDisable(true);\n\t\t\tthis.campoContrasena.setText(this.usuario.getContrasena());\n\t\t\tthis.campoContrasena.setDisable(true);\n\t\t\tthis.campoCorreo.setText(this.usuario.getCorreoElectronico());\n\t\t\tthis.campoCorreo.setDisable(true);\n\t\t\tthis.comboGrupoUsuario.setValue(this.usuario.getNombreGrupoUsuario());\n\t\t\tthis.comboGrupoUsuario.setDisable(true);\n\t\t\tthis.comboStatus.setValue(this.usuario.getDescripcionStatus());\n\t\t\tthis.comboStatus.setDisable(true);\n\t\t\tthis.comboEmpleados.setValue(this.usuario.getNombreEmpleado());\n\t\t\tthis.comboEmpleados.setDisable(true);\n\t\t}//FIN IF ELSE\n\t}", "@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}", "public PacienteModel(int codigo, String nome, String nascimento, String endereco, String telefone, String cep, String documento, String sexo, String data_cliente, String tipo, String email, String obs) {\r\n this.codigo = new SimpleIntegerProperty(codigo);\r\n this.nome = new SimpleStringProperty(nome);\r\n this.nascimento = new SimpleStringProperty(nascimento);\r\n this.endereco = new SimpleStringProperty(endereco);\r\n this.telefone = new SimpleStringProperty(telefone);\r\n this.cep = new SimpleStringProperty(cep);\r\n this.documento = new SimpleStringProperty(documento);\r\n this.sexo = new SimpleStringProperty(sexo);\r\n this.data_cliente = new SimpleStringProperty(data_cliente);\r\n this.tipo = new SimpleStringProperty(tipo);\r\n this.email = new SimpleStringProperty(email);\r\n this.obs = new SimpleStringProperty(obs);\r\n /*Apenas inicio ele*/\r\n this.status = new SimpleBooleanProperty();\r\n }", "@Override\n\tpublic DAOIncidencias CrearInformesMedicos() {\n\t\treturn null;\n\t}", "private void populaObjetivoCat()\n {\n objetivoCatDAO.insert(new ObjetivoCat(\"Hipertrofia\", \"weight\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Saude\", \"apple\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Emagrecer\", \"gloves\"));\n }", "public PanelAdministrarMarcas() {\n initComponents();\n cargarTabla();\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}", "public ViewDetallesPagos () {\r\n\r\n }", "public PacienteModel(int codigo, String nome, String nascimento, String endereco, String telefone, String cep, String documento, String sexo, String data_cliente, String tipo, String email, String obs,boolean status) {\r\n this.codigo = new SimpleIntegerProperty(codigo);\r\n this.nome = new SimpleStringProperty(nome);\r\n this.nascimento = new SimpleStringProperty(nascimento);\r\n this.endereco = new SimpleStringProperty(endereco);\r\n this.telefone = new SimpleStringProperty(telefone);\r\n this.cep = new SimpleStringProperty(cep);\r\n this.documento = new SimpleStringProperty(documento);\r\n this.sexo = new SimpleStringProperty(sexo);\r\n this.data_cliente = new SimpleStringProperty(data_cliente);\r\n this.tipo = new SimpleStringProperty(tipo);\r\n this.email = new SimpleStringProperty(email);\r\n this.obs = new SimpleStringProperty(obs);\r\n this.status = new SimpleBooleanProperty(status);\r\n }", "@Test\n public void deberiaMostrarListaDeCtaMayor() {\n log.debug(\"Debiera mostrar lista de ctaMayor\");\n Ejercicio ejercicio = new Ejercicio(\"test\", \"A\");\n currentSession().save(ejercicio);\n assertNotNull(ejercicio);\n log.debug(\"ejercicio >>\" + ejercicio);\n for (int i = 0; i < 20; i++) {\n CuentaMayor ctaMayor = new CuentaMayor(\"test\" + i, \"test\");\n currentSession().save(ctaMayor);\n assertNotNull(ctaMayor);\n log.debug(\"ctaMayor>>\" + ctaMayor);\n }\n\n Map<String, Object> params = null;\n Map result = instance.lista(params);\n assertNotNull(result.get(\"ctaMayores\"));\n assertNotNull(result.get(\"cantidad\"));\n\n assertEquals(10, ((List<Empresa>) result.get(\"ctaMayores\")).size());\n assertEquals(20, ((Long) result.get(\"cantidad\")).intValue());\n }", "public List<PerfilTO> buscarTodos();", "public ControllerAdministrarTrabajadores() {\r\n }", "public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }", "public ConsultaMedica() {\n super();\n }", "public GrupoCrearEditarBackingMB() {\n\t\tsuper();\n\t\tthis.dto = new GrupoDTO();\n\t}", "@FXML\n public void newMedico() {\n new MedicoPaneCadastroController().abrirJanela(\"./View/MedicoPaneCadastro.fxml\", \"Novo Médico\", null);\n populaTabela();\n\n }", "public interface TipoActividadDAO {\n \n /**\n * Funció que engloba les funcións que s'utilitzen per crear tipus d'activitat\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String callCrear(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Verifica que no existeixi un tipus amb el mateix nom\n * @param tipoAct\n * @return int\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Inserta un tipus d'activitat en la base de dades\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Agafa els tipus d'activitats que esten actius\n * @return List de TipoActividad\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException;\n \n /**\n * Agafa tots els tipus d'activitats \n * @return List de TipoActividad\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract List<TipoActividad> getTiposActividadAdm() throws PersistenceException, ClassNotFoundException;\n \n /**\n * Seleccionar el tipo de actividad d'una actividad\n * @param activity\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String getTipoByAct(Actividad activity) throws PersistenceException, ClassNotFoundException;\n\n /**\n * Guarda la sessió del tipus d'activitat\n * @param tipoAct\n * @param pagina\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract void guardarSession(TipoActividad tipoAct, String pagina) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Funció que engloba les funcións per editar un tipus d'activitat\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String callEditar(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Funció que permet editar el Tipus d'activitat\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String editarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\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 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 lectManage() {\n initComponents();\n tableComponents();\n viewSchedule();\n }", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "public interface ServicoDao extends EntidadeDao<Servico> {\n Long contarTotalServicos();\n Long contarServicosStatus(StatusServico statusServico);\n @Override\n List<Servico> listar();\n\n List<Servico> listarServicos();\n public List<Servico> listarMeusServicos(Long id);\n public List<Servico> listarServicosEmAberto();\n Long servicoPorSetor(Long id);\n Servico BuscarPorId(Long id);\n void salvarLogServico(LogServico logServico);\n\n public void verificarConlusaoEAtualizar(Long id);\n\n Long meusServicos();\n Long contarPorSetor(Long id);\n List<Object[]> contarDeAteDataPorSetorDESC(LocalDate dtDe, LocalDate dtAte);\n List<Object[]> contarAPartirDePorSetorDESC(LocalDate dtDe);\n List<Object[]> contarAteDataPorSetorDESC(LocalDate dtAte);\n List<Object[]> contarDeAteDataDESC(LocalDate dtDe, LocalDate dtAte);\n List<Servico> filtrarDeAteDataPorSetorDESC(Long id, LocalDate dtDe, LocalDate dtAte);\n List<Servico> filtrarAPartirDePorSetorDESC(Long id, LocalDate dtDe);\n List<Servico> filtrarAteDataPorSetorDESC(Long id, LocalDate dtAte);\n List<Servico> filtrarDeAteDataDESC(LocalDate dtDe, LocalDate dtAte);\n\n List<Servico> filtrarMaisRecentesPorSetor(Long id);\n}", "public List<Medecin> listAllMedecin(){\n return this.medecinRepository.findAll();\n }", "DataModel createDataModel();", "public interface ViewTambahTeman {\n void saveData(Teman teman);\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 }", "@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}", "public CrudBook() {\n initComponents();\n loadTable();\n btnAdd.setEnabled(true);\n btnDelete.setEnabled(false);\n btnModify.setEnabled(false);\n }", "public void Ordenamiento() {\n\n\t}", "public registro() {\n initComponents();\n }", "public Medico() {\r\n\t\tsuper();\r\n\t codmedico = \"\";\r\n\t\tespecialidad = null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ItemMedicamentoEntity> listaTodos(){\r\n\r\n\t\treturn this.entityManager.createQuery(\"SELECT * FROM ItemMedicamentoEntity ORDER BY codigo\").getResultList();\r\n\t}", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "@Dao\n@TypeConverters({DateConverter.class})\npublic interface DAO {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insert(DatabaseModel databaseModels);\n\n @Query(\"Select *from todoitem\")\n LiveData<List<DatabaseModel>> getAllTask();\n\n @Query(\"Select * from todoitem where id = :id\")\n LiveData<DatabaseModel> getTaskById(int id);\n\n @Query(\"Select * from todoitem where tag = :tag\")\n LiveData<List<DatabaseModel>> getTaskByTag(String tag);\n\n @Query(\"Select * from todoitem where priority = :priority\")\n LiveData<List<DatabaseModel>> getTaskByPriority(String priority);\n\n @Query(\"Select * from todoitem where isTaskDone = :isDone\")\n LiveData<List<DatabaseModel>> getTaskByStatus(Boolean isDone);\n\n @Query(\"Delete from todoitem where id = :id\")\n void deleteById(int id);\n\n @Delete\n void delete(DatabaseModel databaseModel);\n\n\n}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public CrudRolUsuario(Context context){\n db = Conexion.obtenerBaseDatosLectura(context , null );\n }" ]
[ "0.64706504", "0.6195466", "0.61720973", "0.6128519", "0.599518", "0.5866762", "0.58098704", "0.57937616", "0.5772344", "0.5735212", "0.5734489", "0.5721649", "0.571512", "0.5709663", "0.5699933", "0.5652049", "0.56464005", "0.56309646", "0.5606052", "0.55974567", "0.5594383", "0.55924356", "0.55843943", "0.5578387", "0.55505884", "0.5536862", "0.5535539", "0.55223", "0.55209297", "0.5520053", "0.55125964", "0.55124325", "0.55058044", "0.550479", "0.55042386", "0.55019426", "0.550057", "0.54984355", "0.5493745", "0.54866743", "0.54856735", "0.54801136", "0.5478633", "0.5475181", "0.5468456", "0.54668784", "0.54661465", "0.5465671", "0.5463839", "0.54495245", "0.5444138", "0.54432726", "0.5442536", "0.5441403", "0.54380953", "0.54371315", "0.5432205", "0.54295737", "0.54264057", "0.5426398", "0.54259515", "0.54246116", "0.54209673", "0.54054", "0.54025", "0.5400423", "0.5396924", "0.5395621", "0.53941965", "0.5390473", "0.539038", "0.5389999", "0.5385343", "0.5383637", "0.5382998", "0.5381895", "0.53817123", "0.53802645", "0.53765434", "0.53736746", "0.5373203", "0.537211", "0.5370463", "0.53641045", "0.5363734", "0.53617525", "0.53548473", "0.5352156", "0.5347474", "0.53455937", "0.53451455", "0.5344409", "0.53432465", "0.53408486", "0.5338277", "0.5335831", "0.5331936", "0.5330307", "0.5327262", "0.53249794", "0.5321271" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean registerEmployDetails(String firstName, String lastName, String userName, String password) { boolean flag = false; log.info("Impl form values called"+firstName+lastName+userName+password); try { resourceResolver = resolverFactory.getServiceResourceResolver(getSubServiceMap()); session = resourceResolver.adaptTo(Session.class); //adapt method is used to convert any type of object, here we are converting resourceResolver object into session object. log.info("register session ****" + session); resource = resourceResolver.getResource(resourcePath); //create Random numbers java.util.Random r = new java.util.Random(); int low = 1; int high = 100; int result = r.nextInt(high-low)+low; log.info("result=="+result); String numberValues = "employees" + result; Node node = resource.adaptTo(Node.class); //converting resource object into node if (node != null) { Node empRoot = node.addNode(numberValues, "nt:unstructured"); //addNode is a predefined method; empRoot.setProperty("FirstName", firstName); empRoot.setProperty("LastName", lastName); empRoot.setProperty("UserName", userName); empRoot.setProperty("Password", password); session.save(); flag = true; } } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } finally { if (session != null) { session.logout(); } } return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean employLogin(String userName, String password) { boolean flag = false; log.info("username ="+userName+"password ="+password); try { resourceResolver = resolverFactory.getServiceResourceResolver(getSubServiceMap()); session = resourceResolver.adaptTo(Session.class); log.info("login session ****" + session); resource = resourceResolver.getResource(resourcePath); Node node = resource.adaptTo(Node.class); NodeIterator nodeItr = node.getNodes(); //getting nodes which is created in above register method while (nodeItr.hasNext()) { Node cNode = nodeItr.nextNode(); String username = cNode.getProperty("UserName").getValue().getString(); String pwd = cNode.getProperty("Password").getValue().getString(); Map<String, String> map = new HashMap<String, String>(); map.put("usn", username); map.put("pswd", pwd); if (map.containsValue(userName) && map.containsValue(password)) { log.info("login ok"); flag = true; break; } else { log.info("failed to login"); flag = false; } } } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } return flag; }
{ "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
This method is used for ACCESSING SYSTEM USER by storing into serviceMap Object
private Map<String, Object> getSubServiceMap() { log.info("*****Inside getSubservice method **"); Map<String, Object> serviceMap = null; try { serviceMap = new HashMap<String, Object>(); serviceMap.put(ResourceResolverFactory.SUBSERVICE, "sam"); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); StringWriter errors = new StringWriter(); e.printStackTrace(new PrintWriter(errors)); log.info("errors ***" + errors.toString()); } log.info("*****getSubservice Method End**"); return serviceMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface UserService {\n\n //创建一个用户\n public void createUser(Sysuser sysuser);\n //修改用户信息\n public void saveUser(Sysuser sysuser);\n\n //根据传入的用户信息查询用户主要用户名和密码,返回list<map>\n public List<Map<String,Object>> signIn(Sysuser sysuser);\n\n //根据传入的用户信息查询用户主要用户名和密码,返回list<Sysuser>\n public List<Sysuser> getUserInfo1(Sysuser Sysuser);\n\n //修改密码\n public int modifyPassword(Map<String, Object> params);\n\n //修改头像\n public int modifyPhoto(String userId, String photoPath, String userType);\n\n //根据用户ID查询用户\n public Sysuser getUserInfoFromId(String userId);\n\n //设置用户是否可登陆后台\n public int setUserConsole(int userId,int state);\n\n //设置用户是否可登陆前台\n public int setUserFront(int userId,int state);\n\n}", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "@Override\n\tpublic void GetServerUser() {\n\n\t}", "public interface SysUserService {\n String getHelloWords();\n\n void addSysUser(SysUser user);\n\n SysUser getUserById(String id);\n\n SysUser getUserByLoginName(String sysUserLoginName);\n}", "void setUser(OSecurityUser user);", "public abstract String getUser() throws DataServiceException;", "public interface SysUserService extends Service<SysUser> {\n void sysUserAdd(SysUser sysUser,String userId) throws Exception;\n void sysUserUpdate(SysUser sysUser,String userId);\n String checkSysUsername(String sysUsername);\n\n /**\n * 通过 username 查询 a_sys_user 表中是否含有 username , 若无对应的 username ,则给出相应的提示。 2018/05/19 11:07 rk\n * @param username\n * @return\n */\n String checkUsername(String username);\n\n /**\n * 实现登录功能\n * @param username\n * @param password\n * @return\n */\n SysUser sysUserLogin(String username, String password);\n\n /**\n * 根据username查询role_id 在a_user_role表中查询\n * @param username\n * @return\n */\n // String queryRoleId(String username);\n List<String> queryRoleId(String username);\n\n /**\n * 通过 username 删除用户数据\n * @param username\n */\n void deleteUserByUsername(String username);\n\n /**\n * 模糊匹配,查询 a_sys_user \n * @param username\n * @param name\n * @param user_type\n * @param org_code\n * @param is_ok\n * @return\n */\n List<SysUser> selectByFiveParameter(String username, String name, String user_type, String org_code, String is_ok);\n\n}", "public interface SysUserService {\n List<String> getAllUrl();\n\n /**\n * 获取角色名称\n *\n * @param url\n * @return\n */\n List<String> getRoleNameByUrl(String url);\n\n /**\n * 根据loginName获取用户角色\n *\n * @param loginName\n * @return\n */\n List<SysUserRole> getRoleByLoginName(String loginName);\n\n /**\n * 根据Id获取SysUser\n *\n * @param userId\n * @return\n */\n SysUser getSysUserById(Integer userId);\n\n /**\n * 根据role_id获取roleName\n *\n * @param roleId\n * @return\n */\n String getRoleNameById(Integer roleId);\n\n /**\n * 根据登录信息获取用户\n *\n * @param loginName\n * @param userPassword\n * @return\n */\n SysUser getSysUser(String loginName, String userPassword);\n\n String queryRole();\n}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "ApplicationUser getUser();", "public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}", "public interface SysUserService {\n\n /**\n * 新增用户\n * @param SysUser\n * @return\n */\n SysUser addSysUser(SysUser SysUser);\n\n /**\n * 根据用户名查询用户\n * @param username\n * @return\n */\n SysUser findUserByUserName(String username);\n\n /**\n * 根据用户姓名查询用户\n * @param name\n * @return\n */\n SysUser findUserByName(String name);\n\n /**\n * 根据id获取用户\n * @param userId\n * @return\n */\n SysUser findUserByUserId(Integer userId);\n\n /**\n * 根据id删除用户\n * @param userId\n */\n void delete(Integer userId);\n\n /**\n * 分页查询用户\n * @param userName 用户名\n * @param page\n * @param rows\n * @return\n */\n List<SysUser> getUsers(String userName, Integer page, Integer rows);\n\n /**\n * 根据用户名查询数量\n * @param userName\n * @return\n */\n Integer getUsersCount(String userName);\n\n /**\n * 根据用户id查询用户\n * @param userId\n * @return\n */\n SysUser getUserById(Integer userId);\n\n /**\n * 更新用户信息\n * @param user\n */\n void update(SysUser user);\n\n /**\n * 修改登录密码\n * @param userId\n * @param newPassword\n */\n void modifyPassword(int userId, String newPassword);\n\n /**\n * 根据用户id获取用户密码\n * @param userId\n * @return\n */\n String getPassword(int userId);\n}", "@Override\n\tpublic Map<String, Object> getUserInfo(Map<String, Object> map) {\n\t\tString sql=\"select * from tp_users where userId=:userId\";\n\t\treturn joaSimpleDao.queryForList(sql, map).get(0);\n\t}", "@Override\n\tpublic String getSystemUser(String token) {\n\t\treturn null;\n\t}", "@RequestMapping(\"openService\")\n\t@ResponseBody\n\tpublic Map<String,Object> openService(HttpServletRequest request, HttpServletResponse response, Long systemId) {\n\t\tLong orgLoginId = (Long)request.getSession().getAttribute(\"orgLoginId\");\n\t\treturn userService.openService(orgLoginId, systemId);\n\t}", "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 getUserInfo() {\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n\tpublic UserInfoVO inquireUserInfoService(String userName) {\n\t\tuserInfo.setUserName(userName);\n\t\treturn userInfo.convertToVO();\n\t}", "public void grantAdminOnIndividualToSystemUser(Individual i, SystemUser user);", "public void save(SystemUser user);", "@PostAuthorize(\"hasRole('ADMINISTRATOR') OR \"\r\n \t\t\t+ \"(hasRole('EMPLOYEE') AND \"\r\n \t\t\t+ \"(returnObject.type.typeLabel == 'CUSTOMERLEGAL' OR \"\r\n \t\t\t+ \"returnObject.type.typeLabel == 'CUSTOMERINDIVIDUAL')) OR \"\r\n \t\t\t+ \"isAnonymous() OR returnObject.username == principal.username\")\r\n \tpublic SystemUserDTO getSystemUserByUsername(String username);", "@Override\n\tpublic SysUser getById(SysUser b) throws Exception {\n\t\treturn null;\n\t}", "public User getCurrentUserInformation() throws ServiceProxyException { \n \n //get the authenticated user information (you cannot yet get the information of other users)\n String uri = USER_INFO_RELATIVE_URL +\"/~\";\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Get user information for URI: \"+uri, this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n \n //prepare REST call\n MCSRequest requestObject = new MCSRequest(this.getMbe().getMbeConfiguration());\n requestObject.setConnectionName(this.getMbe().getMbeConfiguration().getMafRestConnectionName());\n requestObject.setHttpMethod(com.oracle.maf.sample.mcs.shared.mafrest.MCSRequest.HttpMethod.GET); \n\n requestObject.setRequestURI(uri);\n \n HashMap<String,String> httpHeaders = new HashMap<String,String>();\n //httpHeaders.put(HeaderConstants.ORACLE_MOBILE_BACKEND_ID,this.getMbe().getMbeConfiguration().getMobileBackendIdentifier());\n \n requestObject.setHttpHeaders(httpHeaders);\n //no payload needed for GET request\n requestObject.setPayload(\"\");\n\n try {\n MCSResponse mcsResponse = MCSRestClient.sendForStringResponse(requestObject);\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Successfully queried user information from MCS. Response Code: \"+mcsResponse.getHttpStatusCode()+\" Response Message: \"+mcsResponse.getMessage(), this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n \n //handle request success\n if (mcsResponse != null && mcsResponse.getHttpStatusCode() == STATUS_RESPONSE_OK) { \n User userObject = new User(); \n JSONObject jsonObject = new JSONObject((String) mcsResponse.getMessage()); \n populateUserObjectFromJsonObject(userObject, jsonObject); \n return userObject; \n } else if (mcsResponse != null){\n //if there is a mcsResponse, we pass it to the client to analyze the problem\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Returning onError because of MCS application error with Status Code: \"+mcsResponse.getHttpStatusCode()\n +\" and message: \"+mcsResponse.getMessage(), this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n throw new ServiceProxyException(mcsResponse.getHttpStatusCode(), (String) mcsResponse.getMessage(), mcsResponse.getHeaders());\n }\n } catch (Exception e) {\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Exception thrown. Class: \"+e.getClass().getSimpleName()+\", Message=\"+e.getMessage(), this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Delegating to exception handler\", this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n handleExceptions(e,uri); \n }\n //should not get here\n return null;\n }", "public interface SysUserService {\n\n void saveUser(SysUser sysUser);\n\n void updateUser(SysUser sysUser);\n\n void deleteUser(String id);\n\n SysUser queryUserById(String id);\n\n List<SysUser> queryUserList(SysUser sysUser);\n\n PageInfo<SysUser> queryUserListPaged(SysUser user, Integer page, Integer pageSize);\n\n SysUser queryUserByIdCustom(String id);\n\n void saveUserTransactional(SysUser user);\n}", "public interface UserService {\n\n public SysUser findByUserName();\n}", "public interface IUserService {\n\n String SERVICE_NAME = \"com.water.db.service.impl.UserServiceImpl\";\n\n /**\n * @author Zhang Miaojie\n * @description 登录授权\n * @time 2016-08-15\n */\n Map<String,Object> findUserByNameAndPwd(String username, String pwd);\n\n /**\n * @author Meng Sheng\n * @description 根据用户的ID查询用户\n * @time 2016-08-25\n * @param userId;\n */\n Map<String,Object> findUserByUserId(int userId);\n\n /**\n * @author Zhang Miaojie\n * @description 根据用户的手机号码查找用户\n * @time 2016-08-16\n */\n boolean findUserByTelphone(String tel_phone);\n\n Map<String,Object> findUserByTel(String tel_phone);\n\n /**\n * @author Zhang Miaojie\n * @description 用户注册\n * @time 2016-08-16\n */\n boolean saveUser(Map<String, Object> userMap);\n\n /**\n * @author Zhang Miaojie\n * @description 记录用户登录信息\n * @time 2016-08-17\n */\n void recordLoginLog(int userId);\n\n /**\n * @author Zhang Miaojie\n * @description 更新用户的密码\n * @time 2016-08-16\n * @return\n */\n boolean updatePwdByTelphone(String tel_phone, String pwd);\n\n /**\n * @author Zhang Miaojie\n * @descrition 根据账号和密码查找是否存在用户\n * @time 2016/09/06\n */\n Map<String,Object> findEmpInfoByUserNameAndPwd(String username,String password);\n\n /**\n * @author Zhang Miaojie\n * @descrition 添加后台管理员的信息\n * @time 2016/09/08\n */\n boolean addEmpInfo(EmpInfo empInfo);\n\n /**\n * @author Zhang Miaojie\n * @descrition 查询员工列表信息\n * @time 2016/09/09\n */\n List<Map<String,Object>> findEmpInfoList();\n\n /**\n * @author Zhang Miaojie\n * @descrition 删除员工信息\n * @time 2016/09/09\n */\n boolean deleteEmpInfoById(int itemId);\n\n /**\n * @author Zhang Miaojie\n * @descrition 添加权限信息\n * @time 2016/09/12\n */\n boolean addPopem(String role_name, String role_flag);\n\n /**根据条件来查询*/\n List<Map<String,Object>> findTelphoneByCondition(String telPhone);\n\n /**添加投标记录*/\n boolean addRebate(User2BidInfo user2BidInfo);\n\n /**修改账号总额*/\n Map<String,Object> findUserLogByUid(int userId);\n\n /**添加用户邀请码*/\n boolean updateUserInviteCodeByUid(String inviteCode, int userId);\n}", "String registerUserWithGetCurrentSession(User user);", "private void loggedInUser() {\n\t\t\n\t}", "@Override\n\tpublic java.lang.String getUserUuid()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn _dictData.getUserUuid();\n\t}", "public User getUserData();", "public void setasstMgr(String asstMgr) throws InfrastructureException, BusinessException {\n\t\tUserVO user = null;\n\n\t}", "private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}", "public User getLoggedUser();", "public Object getUserObject();", "public interface AccountService {\n\tpublic Long getUserId(String name);\n\tpublic MessageSystem getMessageSystem();\n}", "public void setLoggedUser(CustomEmployee user) {\n loggedUser = user;\n }", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "public interface UserInfoService extends IService {\n String getUserId();\n String getUserToken();\n}", "public UserService getUserService() {\n return userService;\n }", "public interface UserService {\n HashMap<String,Object> get(String id);\n\n HashMap<String,Object> getUserByName(String name);\n\n HashMap<String,Object> verifyAccessToken(String accessToken);\n\n int genUserToken(String name, String token);\n\n int changePwd(String id, String newPasswordCiphertext);\n}", "@Override\n\tpublic void setUser(String sessionId, UserInfo userInfo) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"setUser\");\n//\t\tif (!isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tUserPayload payload = new UserPayload();\n\t\t\n//\t\tUserInfo payload = new UserInfo();\n\t\tpayload.setCellPhone(userInfo.getCellPhone());\n\t\tpayload.setDisplayName(userInfo.getDisplayName());\n\t\tpayload.setEmail(userInfo.getEmail());\n\t\tpayload.setIdNumber(userInfo.getIdNumber());\n\t\t\n\t\t//user name cannot modified in cloud service\n//\t\tpayload.setUserName(userInfo.getUserName());\n\t\t\n\t\tUserSetRequest request = new UserSetRequest();\n\t\trequest.setSessionId(sessionId);\n\t\trequest.setPayload(payload);\n\t\ttry {\n\t\t\tcloudSecurityManager.setUser(request);\n\t\t\t\n\t\t\tUserInfo savedUserInfo = userInfoDao.getUserInfoByToken(sessionId);\n\t\t\tif (savedUserInfo != null) {\n\t\t\t\tsavedUserInfo.setCellPhone(userInfo.getCellPhone());\n\t\t\t\tsavedUserInfo.setDisplayName(userInfo.getDisplayName());\n\t\t\t\tsavedUserInfo.setEmail(userInfo.getEmail());\n\t\t\t\tsavedUserInfo.setIdNumber(userInfo.getIdNumber());\n\t\t\t\tuserInfoDao.saveUserInfo(savedUserInfo);\n\t\t\t}\n\t\t} catch (CloudException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new HFModuleException(e.getErrorCode(), e.getMessage());\n\t\t}\n\t\t\n//\t\tJSONObject req = new JSONObject();\n//\t\tJSONObject pl = new JSONObject();\n//\t\ttry {\n//\n//\t\t\tif (info.getDisplayName() != null)\n//\t\t\t\tpl.put(\"displayName\", info.getDisplayName());\n//\t\t\tif (info.getUserName() != null)\n//\t\t\t\tpl.put(\"userName\", info.getUserName());\n//\t\t\tif (info.getPassword() != null)\n//\t\t\t\tpl.put(\"password\", info.getPassword());\n//\t\t\tif (info.getCellPhone() != null)\n//\t\t\t\tpl.put(\"cellPhone\", info.getCellPhone());\n//\t\t\tif (info.getEmail() != null)\n//\t\t\t\tpl.put(\"email\", info.getEmail());\n//\t\t\tif (info.getIdNumber() != null)\n//\t\t\t\tpl.put(\"idNumber\", info.getIdNumber());\n//\n//\t\t\treq.put(\"CID\", 10221);\n//\t\t\treq.put(\"SID\", getsid());\n//\t\t\treq.put(\"PL\", pl);\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req.toString());\n//\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") != 1) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\n//\t\t} catch (JSONException e) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\"can not set user\");\n//\t\t}\n\t}", "public abstract String getUser();", "java.lang.String getUser();", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "public UserLocalService getUserLocalService() {\n return userLocalService;\n }", "User getUserInformation(Long user_id);", "public void initUser(LfwSessionBean sbean)\n/* */ throws PortalServiceException\n/* */ {\n/* 307 */ IPtPageQryService qry = PortalServiceUtil.getPageQryService();\n/* 308 */ PtSessionBean sb = (PtSessionBean)sbean;\n/* 309 */ IUserVO user = sb.getUser();\n/* */ \n/* 311 */ String origPkorg = user.getPk_org();\n/* 312 */ CpUserVO uservo = (CpUserVO)user.getUser();\n/* */ \n/* */ \n/* */ \n/* 316 */ if ((LfwUserShareUtil.isNeedShareUser) && (StringUtils.isNotEmpty(sbean.getPk_unit())) && (StringUtils.isNotEmpty(user.getPk_group())) && (!sbean.getPk_unit().equals(user.getPk_group()))) {\n/* 317 */ uservo.setPk_org(sbean.getPk_unit());\n/* */ }\n/* 319 */ PtPageVO[] pageVOs = qry.getPagesByUser(user);\n/* 320 */ uservo.setPk_org(origPkorg);\n/* */ \n/* 322 */ if ((pageVOs == null) || (pageVOs.length == 0))\n/* 323 */ throw new PortalServerRuntimeException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000024\"));\n/* 324 */ pageVOs = PortalPageDataWrap.filterPagesByUserType(pageVOs, sb.getUser_type());\n/* 325 */ if ((pageVOs == null) || (pageVOs.length == 0))\n/* 326 */ throw new PortalServerRuntimeException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000025\"));\n/* 327 */ List<Page> pageList = PortalPageDataWrap.praseUserPages(pageVOs);\n/* 328 */ if (pageList.isEmpty())\n/* 329 */ throw new PortalServerRuntimeException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000026\"));\n/* 330 */ Map<String, Page> pagesCache = PortalPageDataWrap.praseUserPages((Page[])pageList.toArray(new Page[0]));\n/* 331 */ PortalCacheManager.getUserPageCache().clear();\n/* 332 */ PortalCacheManager.getUserPageCache().putAll(pagesCache);\n/* */ }", "@Override\n public java.lang.String getUserUuid()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _usersCatastropheOrgs.getUserUuid();\n }", "public interface UserService {\n public Map<String, List<User>> getRespUsers();\n\n public boolean checkLogin(String login);\n\n public User loginUser(String login, String password);\n\n public void saveNewUser(User user, String pass);\n}", "@Test\n public void testSysUser() {\n\n SysUser user = sysUserService.findByUsername(\"admin\");\n System.out.println(\"user: \" + user);\n }", "public interface UserService {\n\n SysUser getUser(String username);\n\n BootstrapTable list(SearchVo search);\n\n ResultVo saveOrUpdate(SysUser user, BigDecimal roleId);\n\n SysUser getUserById(BigDecimal id);\n\n ResultVo delete(BigDecimal id);\n}", "public interface UserManagerService {\r\n public Staff_info getStaffInfo(Map<String,Object> params);\r\n\r\n public Page<Staff_info> getUserPageList(Map<String,Object> params);\r\n\r\n public void addUserInfo(Map<String,Object> params);\r\n public void updUserInfo(Map<String,Object> params);\r\n\r\n public void delUser(Map<String,Object> params);\r\n\r\n public List<Staff_info> moblieSelect();\r\n\r\n}", "public interface UserInfoService extends Service<UserInfo> {\n float getHistoryRate(int userId, int day);\n\n String getEncryPhotoUrl(int userId);\n String getEncryPayPassword(String payPasswor);\n int selectByIdAndPayPassword(String userId,String payPassword);\n int computeAge(String IdNO);\n String computeSex(String IdNo);\n UserInfo anonymousUserInfo(UserInfo userInfo);\n\n List<UserInfo> findFriendByUserId(String userId);\n\n List<UserInfo> findIsAddingFriend(String userId);\n\n Boolean lockPayPassword(int uid);\n\n ErrorEnum addLockPayPassword(int uid);\n\n List<LikePeopleJoinUserInfoVo> findLikePeople(String userId);\n\n}", "public interface SysOfficeMService {\n\n String getOfficeIdByUser();\n}", "public String getUser(){\n \treturn user;\n }", "public com.liferay.portal.service.UserService getUserService() {\n return userService;\n }", "public com.liferay.portal.service.UserService getUserService() {\n return userService;\n }", "public com.liferay.portal.service.UserService getUserService() {\n return userService;\n }", "User getCurrentLoggedInUser();", "@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}", "private User getUser() {\r\n\t\tUserService userService = UserServiceFactory.getUserService();\r\n\t\treturn userService.getCurrentUser();\r\n\t}", "@Override\r\n\tpublic User queryUserByUsername(String userName,String psswd) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"userService\");\r\n\t\t\r\n\t\treturn userMapper.selectUserByUserName(userName,psswd);\r\n\t}", "public interface UserAuthorityService extends AbstractService<UserAuthority, Long> {\n\n void grantNormalAuth(Long userId);\n}", "public interface UserService {\n\n //查询所有用户\n public List<User> selectUserList();\n //根据权限查询用户列表\n public List<User> selectUserListByType(int type);\n //更改用户信息(包括权限)\n public boolean updateUser(User user);\n\n public User selectUserByUserId(String userId);\n}", "public String _setuser(b4a.HotelAppTP.types._user _u) throws Exception{\n_types._currentuser.username = _u.username;\n //BA.debugLineNum = 168;BA.debugLine=\"Types.currentuser.password = u.password\";\n_types._currentuser.password = _u.password;\n //BA.debugLineNum = 169;BA.debugLine=\"Types.currentuser.available = u.available\";\n_types._currentuser.available = _u.available;\n //BA.debugLineNum = 170;BA.debugLine=\"Types.currentuser.ID = u.ID\";\n_types._currentuser.ID = _u.ID;\n //BA.debugLineNum = 171;BA.debugLine=\"Types.currentuser.TypeOfWorker = u.TypeOfWorker\";\n_types._currentuser.TypeOfWorker = _u.TypeOfWorker;\n //BA.debugLineNum = 172;BA.debugLine=\"Types.currentuser.CurrentTaskID = u.CurrentTaskID\";\n_types._currentuser.CurrentTaskID = _u.CurrentTaskID;\n //BA.debugLineNum = 173;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public String getUser()\n {\n return _user;\n }", "private void getUserNamePwd() {\n\n try {\n // get Application Connection ID\n LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();\n userName = lgCtx.getBackendUser();\n pwd = lgCtx.getBackendPassword();\n appConnID = LogonCore.getInstance().getLogonContext()\n .getConnId();\n } catch (LogonCoreException e) {\n LogManager.writeLogError(Constants.device_reg_failed_txt, e);\n }\n }", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}", "private HpcSystemAccountLocator() {}", "public interface IUserService extends BaseService<User> {\n\n /**\n * 通过手机号 查询用户所有基础字段\n * @param phone\n * @return\n */\n User getUserByPhone(String phone);\n\n /**\n * 获取该用户下的分销列表\n * @param userId\n * @return\n */\n Map<String,List<DistributionUser>> getDistributionUser(String userId,Integer pageNO,Integer pageSize);\n\n /**\n * 通过邀请码查询用户\n * @param shareCode 邀请码\n * @return\n */\n User getUserByShareCode(String shareCode);\n\n /**\n * 统计昨日数据\n * 积分(score)、欢喜券(bigDecimal)、单元总量(暂无)、转化率(parities)\n * @return\n */\n Map<String,Object> countLastDay();\n\n /**\n * 后台通过/拒绝申请成为代理商\n * @param userId 用户ID\n * @param status 1 通过 2 拒绝通过\n */\n void setAgent(String userId,Integer status) throws Exception;\n\n /**\n * 后台用户列表\n * @param pages\n * @param map\n * @return\n */\n Pages<User> list(Pages pages, Map<String ,Object> map);\n}", "public Map<Object, Object> getUserMap() {\n\t\treturn userMap;\n\t}", "boolean isSystemUser() throws RepositoryException;", "@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }", "private void initUser() {\n\t}", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "@Override\n\tpublic List<UserManageEntity> getUserInfo(Map<String, Object> param) {\n\t\treturn userManageDao.getUserInfo(param);\n\t}", "@Override\n\tpublic java.lang.String getUserUuid()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn _scienceApp.getUserUuid();\n\t}", "UmType getUserManager();", "public interface UserService {\n\n User login(User user);\n\n /**\n * 用户列表\n *\n * @param user\n * @param pageHelper\n * @return\n */\n List<User> userGrid(User user, PageHelper pageHelper);\n\n /**\n * 保存或者更新\n *\n * @param user\n */\n void saveOrUpdate(User user) throws Exception;\n\n /**\n * 通过主键list集合删除\n *\n * @param list\n */\n void delete(List<String> list);\n\n /**\n * 加载男女管理员\n *\n * @return\n */\n List<Map<String, Object>> userMaleAndFemale();\n}", "@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }", "public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }", "public void setUserMap(Map<Object, Object> userMap) {\n\t\tthis.userMap = userMap;\n\t}", "public interface UserService extends UserDetailsService{\n\n\t/**\n\t * save method is used save record in user table\n\t * \n\t * @param userEntity.\n\t * @return UserEntity\n\t */\n public UserEntity save(UserEntity userEntity); \n\t\n /**\n * getByName method is used to retrieve userId from userName. \n * \n * @param userName\n * @return UUID\n */\n public UserQueryEntity getByName(String userName);\n \n}", "public List getOwnerUsersList(Map map) {\n\t String currentUser = UserUtil.getCurrentPrincipalUser();\r\n\t\t List ls = (List)map.get(currentUser);\r\n//\t\t System.out.println(\"map.size()\"+currentUser) ;\r\n//\t\t System.out.println(map.size()) ;\r\n\t\treturn ls;\r\n\t}", "@Override\n public void success(Object object, Response response) {\n mStorage.save(mSystemUser);\n mServiceGen.release();\n }", "@Override\n public UserAccount run() throws APIException {\n final Map<String, String> QUERY_PARAMS = new HashMap<>();\n QUERY_PARAMS.put(\"fields\", UserAccount.ALL_USER_ACCOUNT_FIELDS);\n UserAccount userAccount = mService.getCurrentUserAccount(QUERY_PARAMS);\n\n // Second, we need to get SystemInfo about server.\n SystemInfo systemInfo = mService.getSystemInfo();\n\n // if we got here, it means http\n // request was executed successfully\n\n /* save user credentials */\n Session session = new Session(mServerUrl, mCredentials);\n SessionManager.getInstance().put(session);\n\n /* save user account details */\n mUserAccountHandler.put(userAccount);\n\n /* get server time zone and save it */\n TimeZone serverTimeZone = systemInfo.getServerDate()\n .getZone().toTimeZone();\n mLastUpdatedPreferences.setServerTimeZone(serverTimeZone);\n return userAccount;\n }", "private void setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) {\n\t\t// Set the authentication\n\t\tauthComponent.setCurrentUser(userName);\n\n\t\t// Set up the user information\n\t\tUserTransaction tx = transactionService.getUserTransaction();\n\t\tNodeRef homeSpaceRef = null;\n\t\tUser user;\n\t\ttry {\n\t\t\ttx.begin();\n\t\t\tuser = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));\n\t\t\thomeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);\n\t\t\tif(homeSpaceRef == null) {\n\t\t\t\tlogger.warn(\"Home Folder is null for user '\"+userName+\"', using company_home.\");\n\t\t\t\thomeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());\n\t\t\t}\n\t\t\tuser.setHomeSpaceId(homeSpaceRef.getId());\n\t\t\ttx.commit();\n\t\t} catch (Throwable ex) {\n\t\t\tlogger.error(ex);\n\n\t\t\ttry {\n\t\t\t\ttx.rollback();\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tlogger.error(\"Failed to rollback transaction\", ex2);\n\t\t\t}\n\n\t\t\tif (ex instanceof RuntimeException) {\n\t\t\t\tthrow (RuntimeException) ex;\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Failed to set authenticated user\", ex);\n\t\t\t}\n\t\t}\n\n\t\t// Store the user\n\t\thttpSess.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);\n\t\thttpSess.setAttribute(LoginBean.LOGIN_EXTERNAL_AUTH, Boolean.TRUE);\n\n\t\t// Set the current locale from the Accept-Lanaguage header if available\n\t\tLocale userLocale = parseAcceptLanguageHeader(req, m_languages);\n\n\t\tif (userLocale != null) {\n\t\t\thttpSess.setAttribute(LOCALE, userLocale);\n\t\t\thttpSess.removeAttribute(MESSAGE_BUNDLE);\n\t\t}\n\n\t\t// Set the locale using the session\n\t\tI18NUtil.setLocale(Application.getLanguage(httpSess));\n\n\t}", "public com.liferay.portal.kernel.service.UserService getUserService() {\n\t\treturn userService;\n\t}", "public interface UserService {\n\n public User getUserInfoByUsername(String username) throws Exception;\n\n public User getUserInfoFromSession(HttpSession session) throws Exception;\n\n /**\n * 用户注册逻辑\n *\n * @param user\n */\n// public Response merge(User user);\n\n /**\n * 用户获取逻辑\n *\n * @param id\n * @return\n */\n public Response getUserById(String id);\n\n\n /**\n * 获取用户列表\n *\n * @yhxm 用户姓名\n * @dlzh 登录账号\n * @bhxj 包含下级(1 是;2 否;)\n * @jgbh 机构编号\n */\n public Response selectNextLev(String yhxm, String dlzh, String bhxj, String jgbh, int pageindex, int pagesize);\n\n /**\n * 删除\n *\n * @param user_id\n * @throws Exception\n */\n public Response delete(String user_id, String tempId);\n\n public Response getRolesByBmbh(String bmbh);\n\n public Response getSysUserRoles(String type);\n\n public Response getSysUserRolesByID(String roleId);\n\n /**\n * 重置密码\n *\n * @param user_id\n */\n public Response ResetPasswd(int user_id);\n\n /**\n * 功能描述:根据用户名获取用户权限列表\n * 作者:齐遥遥\n * 时间:2017-10-17\n *\n * @param loginname\n * @return\n */\n public Response getUserRoles(String loginname);\n\n /**\n * 功能描述:根据用户名获取用户菜单列表\n * 作者:齐遥遥\n * 时间:2017-10-17\n *\n * @param loginname\n * @return\n */\n public Response getUserMenus(String loginname);\n\n /**\n * 功能描述:根据用户名获取用户信息\n * 作者:齐遥遥\n * 时间:2017-10-18\n *\n * @param loginname\n * @return\n */\n public Response getUserByLoginname(String loginname);\n\n public Response updatePassword(String loginname, String password, String newPassword);\n\n\n public String getUserInfo(String user_id);\n\n //修改用户密码\n boolean updatePwd(Map map)throws Exception;\n\n //用户个人中心信息显示补充查询\n Map getUserInfor(String loginname,String bmbh)throws Exception;\n\n Response addUser(SysUser user);\n\n Response update(SysUser user);\n}", "public interface ISysPrjUserService extends IBaseService<SysPrjUser> {\n List<SysUser> getPrjUserByPrjId(String prjId);\n}", "public interface UserService {\n String getViewUserName(User user);\n}", "public interface UserService {\r\n\r\n //注册方法\r\n Integer register(UserForm userForm) throws IOException;\r\n\r\n //登录\r\n UserDTO login(String userName, String userPassword);\r\n\r\n //检查用户名是否有效(str可以是用户名也可以是手机号。对应的type是username和userPhone)\r\n Integer checkValid(String str, String type);\r\n\r\n //获取用户登录信息\r\n UserDTO getUserInfo(String userPhone);\r\n\r\n //忘记密码获取问题\r\n String getQuestion(String userPhone);\r\n\r\n //提交问题答案(返回一个token)\r\n String checkAnswer(String userPhone, String userQuestion, String userAnswer);\r\n\r\n //忘记密码的重设密码\r\n Integer forgetResetPassword(String userPhone, String newPassword, String forgetToken);\r\n\r\n //登录状态中重设密码\r\n Integer resetPassword(String oldPassword, String newPassword, UserDTO userDTO);\r\n\r\n //登录状态更新个人信息\r\n Integer updateInformation(UserDTO userDTO,String userName, String userMail,String userPhone,String userQuestion,String userAnswer);\r\n\r\n //获取当前登录用户的详细信息,并强制登录\r\n UserForm getInformation(UserDTO userDTO);\r\n\r\n //退出登录\r\n Integer logout();\r\n\r\n //管理员查询用户列表\r\n List<UserInfo> list();\r\n\r\n //添加收货地址\r\n Shipping createShipping(ShippingForm shippingForm, String userId);\r\n\r\n //更新收货地址\r\n Shipping updateShipping(ShippingForm shippingForm, String shippingId, String userId);\r\n\r\n //查看收货地址\r\n Shipping shippingDetail(String shippingId);\r\n\r\n //查看收货地址列表\r\n List<Shipping> shippingList(String userId);\r\n\r\n //删除收货地址\r\n void deleteShipping(String shippingId);\r\n\r\n}", "User getUser(String userName) throws InstanceNotFoundException;", "public interface SysUserService {\n public SysUserModel getByID(String id);\n}", "@RequestMapping(value = \"/json/usersystem/\",method = RequestMethod.GET,headers = \"Accept= application/json\")\n\tpublic @ResponseBody ResponseEntity<String> findSystemUser(@RequestParam(\"userId\") String activeDirectoryUserId) {\n\n\t\tCollection<UserCompanySystemDto> userCompanySystemCol = FrameworkFactory.getInstancia().getSecurityService().findSystemByUser(activeDirectoryUserId);\n\t\t\n\t\tMinifiedSystemData minifiedSystemData = new MinifiedSystemData();\n\t\tif(CollectionUtils.isNotEmpty(userCompanySystemCol)){\n\t\t\tfor(UserCompanySystemDto userCompanySystem: userCompanySystemCol){\n\t\t\t\tStringBuilder stringSystem =new StringBuilder();\n\t\t\t\t\n\t\t\t\t/*stringSystem.append(\"Id Sistema :\"+ userCompanySystem.getCompanySystemDto().getSystemDto().getSystemId());\n\t\t\t\tstringSystem.append(\"Nombre Sistema :\"+ userCompanySystem.getCompanySystemDto().getSystemDto().getSystemName());\n\t\t\t\tstringSystem.append(\"Alias Sistema :\"+ userCompanySystem.getCompanySystemDto().getSystemDto().getAlias());\n\t\t\t\tstringSystem.append(\"Url Sistema :\"+userCompanySystem.getCompanySystemDto().getSystemDto().getSystemTarget());\n\t\t\t\tstringSystem.append(\"Contexto Sistema :\"+userCompanySystem.getCompanySystemDto().getSystemDto().getContextpath());\n\t\t\t\tstringSystem.append(\"DefaultInitPage Sistema :\"+userCompanySystem.getCompanySystemDto().getSystemDto().getDefaultInitPage());\n\t\t\t\t//Metodo para anadir el nombre del sistema, la url, defaultinitpage en el objeto gson\n\t\t\t\tminifiedSystemData.addMinSystemData(userCompanySystem.getCompanySystemDto().getSystemDto().getSystemId(),\n\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getSystemName(),\n\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getAlias(), \n\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getSystemTarget(), \n\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getContextpath(),\n\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getDefaultInitPage());\n\t\t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tString contextpathSystem = userCompanySystem.getCompanySystemDto().getSystemDto().getContextpath();\n\t\t\t\tString sysDefaultInitPage = userCompanySystem.getCompanySystemDto().getSystemDto().getDefaultInitPage() == null ? \"gdt.jsf\":userCompanySystem.getCompanySystemDto().getSystemDto().getDefaultInitPage();\n\t\t\t\tMap<String, String> mapSystem = null;\n\t\t\t\t\n\t\t\t\tif(StringUtils.equals(SicWSMessages.getString(\"ec.com.smx.sic.webservices.url.alternative.active\"), \"1\")){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmapSystem = StringPropertryParameterUtil.getInstance().getConfiguredSystemPropertries(SicWSMessages.getString(\"ec.com.smx.sic.webservices.url.alternative.system.id\"));\n\t\t\t\t\t\t\n\t\t\t\t\t\tcontextpathSystem = mapSystem.get(userCompanySystem.getCompanySystemDto().getId().getSystemId());\n\t\t\t\t\t} catch (MissingResourceException e) {\n\t\t\t\t\t\tLogFramework.getLogger().error(e.getLocalizedMessage());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLogFramework.getLogger().error(e.getLocalizedMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tstringSystem.append(\"\\n*****************MAX GDT**************\\n\");\n\t\t\t\tstringSystem.append(\"Nombre Sistema :\"+ userCompanySystem.getCompanySystemDto().getSystemDto().getSystemName());\n\t\t\t\tstringSystem.append(\"\\nAlias Sistema :\"+ userCompanySystem.getCompanySystemDto().getSystemDto().getAlias());\n\t\t\t\tstringSystem.append(\"\\nUrl Sistema :\"+userCompanySystem.getCompanySystemDto().getSystemDto().getSystemTarget());\n\t\t\t\tstringSystem.append(\"\\nContexto Sistema :\"+contextpathSystem);\n\t\t\t\tstringSystem.append(\"\\nDefaultInitPage Sistema :\"+sysDefaultInitPage);\n\t\t\t\t\n\t\t\t\tif(StringUtils.isNotEmpty(contextpathSystem)){\n\t\t\t\t\tminifiedSystemData.addMinSystemData(userCompanySystem.getCompanySystemDto().getSystemDto().getSystemId(),\n\t\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getSystemName(),\n\t\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getAlias(), \n\t\t\t\t\t\t\tuserCompanySystem.getCompanySystemDto().getSystemDto().getSystemTarget(), \n\t\t\t\t\t\t\tcontextpathSystem ,\n\t\t\t\t\t\t\tsysDefaultInitPage);\n\t\t\t\t}else{\n\t\t\t\t\tLogFramework.getLogger().warn(\"El sistema con ID ....{}.... no tiene una ruta de contexto valido y no se agregara a la lista\", userCompanySystem.getCompanySystemDto().getId().getSystemId());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLogFramework.getLogger().info(stringSystem.toString());\n\t\t\t}\n\t\t}\n\t\t//Gson, escapar caracteres HTML\n\t\tGson gson = new GsonBuilder().disableHtmlEscaping().create();\n\t\tHttpHeaders responseHeaders = new HttpHeaders();\n\t\tresponseHeaders.add(\"Content-Type\", \"text/html; charset=utf-8\");\n\t\t//Si la respuesta para las solicitudes HTTP si se ejecutaron con exito. status 200\n\t\t\n\t\treturn new ResponseEntity<String>(gson.toJson(minifiedSystemData),responseHeaders,HttpStatus.OK);\n\t}" ]
[ "0.64785653", "0.62813133", "0.62813133", "0.62813133", "0.6276285", "0.62637407", "0.61862594", "0.60558736", "0.6053232", "0.6051097", "0.5999697", "0.59900767", "0.59847844", "0.59737116", "0.5967755", "0.5954098", "0.5938163", "0.5905109", "0.5898415", "0.5892178", "0.5873674", "0.58661413", "0.5862956", "0.5813187", "0.5811616", "0.58024585", "0.5767981", "0.576732", "0.5753924", "0.57427955", "0.57320577", "0.5716635", "0.5702036", "0.56883776", "0.56822264", "0.5676642", "0.56646705", "0.56590074", "0.565655", "0.56557375", "0.5653153", "0.56513935", "0.5650947", "0.5645245", "0.56431144", "0.56330436", "0.563089", "0.5609217", "0.5607858", "0.56025696", "0.56003267", "0.5598589", "0.55976146", "0.5596974", "0.55936456", "0.5590931", "0.55896485", "0.5578017", "0.5576147", "0.5573355", "0.5573355", "0.5573355", "0.55682844", "0.556681", "0.5565767", "0.5565079", "0.5563694", "0.55633545", "0.5562718", "0.5559894", "0.55560493", "0.5543858", "0.5531604", "0.55291975", "0.55184525", "0.55169785", "0.5516935", "0.55139", "0.550989", "0.550989", "0.550989", "0.5509712", "0.5507621", "0.5503143", "0.5502755", "0.5501916", "0.5495833", "0.54886574", "0.5488377", "0.5486539", "0.54848725", "0.54814357", "0.5479015", "0.5478447", "0.5475371", "0.547351", "0.5473404", "0.54723895", "0.547145", "0.5467906", "0.54652905" ]
0.0
-1
TODO Autogenerated method stub
@Override public NodeOprations getNodeProperties() { NodeOprations bean=null; try { log.info("entered into impl......."); //resourceResolver=resolverFactory.getServiceResourceResolver(getSubServiceMap()); //resource=resourceResolver.getResource(resourcePath); //log.info("resource---------------"+resource); //Node node=resource.adaptTo(Node.class); resourceResolver = resolverFactory.getResourceResolver(getSubServiceMap()); resource = resourceResolver.getResource(resourcePath); log.info(" resource................+ resource"); Node node = resource.adaptTo(Node.class); String firstName=node.getProperty("firstName").getValue().getString(); log.info("fname--------------"+firstName); String lastName=node.getProperty("lastName").getValue().getString(); log.info("lastname--------------"+lastName); String username=node.getProperty("userName").getValue().getString(); log.info("username--------------"+username); String password=node.getProperty("password").getValue().getString(); log.info("pwd--------------"+password); bean=new NodeOprations(); bean.setFirstName(firstName); bean.setLastName(lastName); bean.setUserName(username); bean.setPassword(password); } catch (Exception e) { // TODO: handle exception } return bean; }
{ "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
/ perform the smell function and return the smell value
public int smell() { synchronized (this) { Node[][] AllHexNode = new Node[world.worldArray.length][world.worldArray[0].length]; int HexAmount = 0; for (int i = 0; i < world.worldArray.length; i++) for (int j = 0; j < world.worldArray[0].length; j++) { if (world.isValidHex(i, j)) { AllHexNode[i][j] = new Node(i, j, Integer.MAX_VALUE, -1, -1); HexAmount++; } } PriorityQueue<Node> frontier = new PriorityQueue<Node>(HexAmount, new Node(c, r, 0, 0, 0)); // Place the six hex around it first if (world.isValidHex(c, r + 1)) if (world.worldArray[c][r + 1] instanceof EmptySpace || world.worldArray[c][r + 1] instanceof Food) { if (direction == 0) { AllHexNode[c][r + 1].setddd(0, 0, 0); frontier.add(AllHexNode[c][r + 1]); } if (direction == 1) { AllHexNode[c][r + 1].setddd(1, 0, 5); frontier.add(AllHexNode[c][r + 1]); } if (direction == 2) { AllHexNode[c][r + 1].setddd(2, 0, 4); frontier.add(AllHexNode[c][r + 1]); } if (direction == 3) { AllHexNode[c][r + 1].setddd(3, 0, 3); frontier.add(AllHexNode[c][r + 1]); } if (direction == 4) { AllHexNode[c][r + 1].setddd(2, 0, 2); frontier.add(AllHexNode[c][r + 1]); } if (direction == 5) { AllHexNode[c][r + 1].setddd(1, 0, 1); frontier.add(AllHexNode[c][r + 1]); } } if (world.isValidHex(c + 1, r + 1)) if (world.worldArray[c + 1][r + 1] instanceof EmptySpace || world.worldArray[c + 1][r + 1] instanceof Food) { if (direction == 0) { AllHexNode[c + 1][r + 1].setddd(1, 1, 1); frontier.add(AllHexNode[c + 1][r + 1]); } if (direction == 1) { AllHexNode[c + 1][r + 1].setddd(0, 1, 0); frontier.add(AllHexNode[c + 1][r + 1]); } if (direction == 2) { AllHexNode[c + 1][r + 1].setddd(1, 1, 5); frontier.add(AllHexNode[c + 1][r + 1]); } if (direction == 3) { AllHexNode[c + 1][r + 1].setddd(2, 1, 4); frontier.add(AllHexNode[c + 1][r + 1]); } if (direction == 4) { AllHexNode[c + 1][r + 1].setddd(3, 1, 3); frontier.add(AllHexNode[c + 1][r + 1]); } if (direction == 5) { AllHexNode[c + 1][r + 1].setddd(2, 1, 2); frontier.add(AllHexNode[c + 1][r + 1]); } } if (world.isValidHex(c + 1, r)) if (world.worldArray[c + 1][r] instanceof EmptySpace || world.worldArray[c + 1][r] instanceof Food) { if (direction == 0) { AllHexNode[c + 1][r].setddd(2, 2, 2); frontier.add(AllHexNode[c + 1][r]); } if (direction == 1) { AllHexNode[c + 1][r].setddd(1, 2, 1); frontier.add(AllHexNode[c + 1][r]); } if (direction == 2) { AllHexNode[c + 1][r].setddd(0, 2, 0); frontier.add(AllHexNode[c + 1][r]); } if (direction == 3) { AllHexNode[c + 1][r].setddd(1, 2, 5); frontier.add(AllHexNode[c + 1][r]); } if (direction == 4) { AllHexNode[c + 1][r].setddd(2, 2, 4); frontier.add(AllHexNode[c + 1][r]); } if (direction == 5) { AllHexNode[c + 1][r].setddd(3, 2, 3); frontier.add(AllHexNode[c + 1][r]); } } if (world.isValidHex(c, r - 1)) if (world.worldArray[c][r - 1] instanceof EmptySpace || world.worldArray[c][r - 1] instanceof Food) { if (direction == 0) { AllHexNode[c][r - 1].setddd(3, 3, 3); frontier.add(AllHexNode[c][r - 1]); } if (direction == 1) { AllHexNode[c][r - 1].setddd(2, 3, 2); frontier.add(AllHexNode[c][r - 1]); } if (direction == 2) { AllHexNode[c][r - 1].setddd(1, 3, 1); frontier.add(AllHexNode[c][r - 1]); } if (direction == 3) { AllHexNode[c][r - 1].setddd(0, 3, 0); frontier.add(AllHexNode[c][r - 1]); } if (direction == 4) { AllHexNode[c][r - 1].setddd(1, 3, 5); frontier.add(AllHexNode[c][r - 1]); } if (direction == 5) { AllHexNode[c][r - 1].setddd(2, 3, 4); frontier.add(AllHexNode[c][r - 1]); } } if (world.isValidHex(c - 1, r - 1)) if (world.worldArray[c - 1][r - 1] instanceof EmptySpace || world.worldArray[c - 1][r - 1] instanceof Food) { if (direction == 0) { AllHexNode[c - 1][r - 1].setddd(2, 4, 4); frontier.add(AllHexNode[c - 1][r - 1]); } if (direction == 1) { AllHexNode[c - 1][r - 1].setddd(3, 4, 3); frontier.add(AllHexNode[c - 1][r - 1]); } if (direction == 2) { AllHexNode[c - 1][r - 1].setddd(2, 4, 2); frontier.add(AllHexNode[c - 1][r - 1]); } if (direction == 3) { AllHexNode[c - 1][r - 1].setddd(1, 4, 1); frontier.add(AllHexNode[c - 1][r - 1]); } if (direction == 4) { AllHexNode[c - 1][r - 1].setddd(0, 4, 0); frontier.add(AllHexNode[c - 1][r - 1]); } if (direction == 5) { AllHexNode[c - 1][r - 1].setddd(1, 4, 5); frontier.add(AllHexNode[c - 1][r - 1]); } } if (world.isValidHex(c - 1, r)) if (world.worldArray[c - 1][r] instanceof EmptySpace || world.worldArray[c - 1][r] instanceof Food) { if (direction == 0) { AllHexNode[c - 1][r].setddd(1, 5, 5); frontier.add(AllHexNode[c - 1][r]); } if (direction == 1) { AllHexNode[c - 1][r].setddd(2, 5, 4); frontier.add(AllHexNode[c - 1][r]); } if (direction == 2) { AllHexNode[c - 1][r].setddd(3, 5, 3); frontier.add(AllHexNode[c - 1][r]); } if (direction == 3) { AllHexNode[c - 1][r].setddd(2, 5, 2); frontier.add(AllHexNode[c - 1][r]); } if (direction == 4) { AllHexNode[c - 1][r].setddd(1, 5, 1); frontier.add(AllHexNode[c - 1][r]); } if (direction == 5) { AllHexNode[c - 1][r].setddd(0, 5, 0); frontier.add(AllHexNode[c - 1][r]); } } while (!frontier.isEmpty()) { Node v = frontier.poll(); // extracts element with smallest // v.dist on the queue if (world.worldArray[v.col][v.row] instanceof Food) { return v.distance * 1000 + v.directionResult; } if (world.isValidHex(v.col, v.row + 1)) if (world.worldArray[v.col][v.row + 1] instanceof EmptySpace || world.worldArray[v.col][v.row + 1] instanceof Food) { if (v.direction == 0) if (AllHexNode[v.col][v.row + 1].distance > v.distance + 1 && v.distance + 1 <= 10) { AllHexNode[v.col][v.row + 1].setddd(v.distance + 1, 0, v.directionResult); frontier.add(AllHexNode[v.col][v.row + 1]); } if (v.direction == 1) if (AllHexNode[v.col][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col][v.row + 1].setddd(v.distance + 2, 0, v.directionResult); frontier.add(AllHexNode[v.col][v.row + 1]); } if (v.direction == 5) if (AllHexNode[v.col][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col][v.row + 1].setddd(v.distance + 2, 0, v.directionResult); frontier.add(AllHexNode[v.col][v.row + 1]); } } if (world.isValidHex(v.col + 1, v.row + 1)) if (world.worldArray[v.col + 1][v.row + 1] instanceof EmptySpace || world.worldArray[v.col + 1][v.row + 1] instanceof Food) { if (v.direction == 0) if (AllHexNode[v.col + 1][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col + 1][v.row + 1].setddd(v.distance + 2, 1, v.directionResult); frontier.add(AllHexNode[v.col + 1][v.row + 1]); } if (v.direction == 1) if (AllHexNode[v.col + 1][v.row + 1].distance > v.distance + 1 && v.distance + 1 <= 10) { AllHexNode[v.col + 1][v.row + 1].setddd(v.distance + 1, 1, v.directionResult); frontier.add(AllHexNode[v.col + 1][v.row + 1]); } if (v.direction == 2) if (AllHexNode[v.col + 1][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col + 1][v.row + 1].setddd(v.distance + 2, 1, v.directionResult); frontier.add(AllHexNode[v.col + 1][v.row + 1]); } } if (world.isValidHex(v.col + 1, v.row)) if (world.worldArray[v.col + 1][v.row] instanceof EmptySpace || world.worldArray[v.col + 1][v.row] instanceof Food) { if (v.direction == 1) if (AllHexNode[v.col + 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col + 1][v.row].setddd(v.distance + 2, 2, v.directionResult); frontier.add(AllHexNode[v.col + 1][v.row]); } if (v.direction == 2) if (AllHexNode[v.col + 1][v.row].distance > v.distance + 1 && v.distance + 1 <= 10) { AllHexNode[v.col + 1][v.row].setddd(v.distance + 1, 2, v.directionResult); frontier.add(AllHexNode[v.col + 1][v.row]); } if (v.direction == 3) if (AllHexNode[v.col + 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col + 1][v.row].setddd(v.distance + 2, 2, v.directionResult); frontier.add(AllHexNode[v.col + 1][v.row]); } } if (world.isValidHex(v.col, v.row - 1)) if (world.worldArray[v.col][v.row - 1] instanceof EmptySpace || world.worldArray[v.col][v.row - 1] instanceof Food) { if (v.direction == 2) if (AllHexNode[v.col][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col][v.row - 1].setddd(v.distance + 2, 3, v.directionResult); frontier.add(AllHexNode[v.col][v.row - 1]); } if (v.direction == 3) if (AllHexNode[v.col][v.row - 1].distance > v.distance + 1 && v.distance + 1 <= 10) { AllHexNode[v.col][v.row - 1].setddd(v.distance + 1, 3, v.directionResult); frontier.add(AllHexNode[v.col][v.row - 1]); } if (v.direction == 4) if (AllHexNode[v.col][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col][v.row - 1].setddd(v.distance + 2, 3, v.directionResult); frontier.add(AllHexNode[v.col][v.row - 1]); } } if (world.isValidHex(v.col - 1, v.row - 1)) if (world.worldArray[v.col - 1][v.row - 1] instanceof EmptySpace || world.worldArray[v.col - 1][v.row - 1] instanceof Food) { if (v.direction == 3) if (AllHexNode[v.col - 1][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col - 1][v.row - 1].setddd(v.distance + 2, 4, v.directionResult); frontier.add(AllHexNode[v.col - 1][v.row - 1]); } if (v.direction == 4) if (AllHexNode[v.col - 1][v.row - 1].distance > v.distance + 1 && v.distance + 1 <= 10) { AllHexNode[v.col - 1][v.row - 1].setddd(v.distance + 1, 4, v.directionResult); frontier.add(AllHexNode[v.col - 1][v.row - 1]); } if (v.direction == 5) if (AllHexNode[v.col - 1][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col - 1][v.row - 1].setddd(v.distance + 2, 4, v.directionResult); frontier.add(AllHexNode[v.col - 1][v.row - 1]); } } if (world.isValidHex(v.col - 1, v.row)) if (world.worldArray[v.col - 1][v.row] instanceof EmptySpace || world.worldArray[v.col - 1][v.row] instanceof Food) { if (v.direction == 0) if (AllHexNode[v.col - 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col - 1][v.row].setddd(v.distance + 2, 5, v.directionResult); frontier.add(AllHexNode[v.col - 1][v.row]); } if (v.direction == 4) if (AllHexNode[v.col - 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) { AllHexNode[v.col - 1][v.row].setddd(v.distance + 2, 5, v.directionResult); frontier.add(AllHexNode[v.col - 1][v.row]); } if (v.direction == 5) if (AllHexNode[v.col - 1][v.row].distance > v.distance + 1 && v.distance + 1 <= 10) { AllHexNode[v.col - 1][v.row].setddd(v.distance + 1, 5, v.directionResult); frontier.add(AllHexNode[v.col - 1][v.row]); } } } return 1000000; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void smell() {\n\t\t\n\t}", "abstract int pregnancy();", "private void smell() {\n try {\n this.console.println(MapControl.checkSmell(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private int heavyAttack() {\n return attack(6, 2);\n }", "@Override\n public void computeSatisfaction() {\n\n }", "AttackResult smartAttack();", "public abstract void apply() throws ContradictionException;", "public Object call() {\n if (_needWarmup) {\n warmup(); \n _needWarmup = false;\n }\n else {\n run();\n _needWarmup = true;\n }\n return null;\n }", "@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}", "protected abstract SoyValue compute();", "int getResultMonster();", "public int getToughness();", "public void woke(){\n\n //TODO\n\n }", "public abstract int simulate();", "@Override\n public String call() throws Exception {\n if (!iAmSpecial) {\n blocker.await();\n }\n ran = true;\n return result;\n }", "public abstract String check() throws Exception;", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "public void smelt() {\n if (this.canSmelt()) {\n ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.items[0]);\n if (this.items[1] == null) {\n this.items[1] = itemstack.copy();\n } else if (this.items[1].getItem() == itemstack.getItem()) {\n this.items[1].stackSize += itemstack.stackSize; // Forge BugFix:\n // Results may\n // have multiple\n // items\n }\n\n --this.items[0].stackSize;\n\n if (this.items[0].stackSize <= 0) {\n this.items[0] = null;\n }\n // TODO: Enable after update\n //energy.extractEnergy(1600, false);\n }\n }", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}", "@Override\n // TODO implement call() for expert mode using minimax\n public Integer call() throws Exception {\n Integer val = 0;\n Thread.sleep(150);\n return val;\n }", "double getMissChance();", "public abstract Integer gethourNeed();", "@Override\r\n public boolean sanityCheck(final Serializable individual,\r\n final Serializable staticState) {\r\n if (this.m_use)\r\n return this.m_func.sanityCheck(individual, staticState);\r\n return super.sanityCheck(individual, staticState);\r\n }", "public void getDanger(){\r\n\t\r\n\tif(isnow>0){ //is it snow?\r\n\t\t// There is snow, we set all spread indexes to 0\r\n\t\tset_AllSpreadIndexToZero();\r\n\t\t\r\n\t\tadjust_BUI();\r\n\t}else {\r\n\t\t\t//There is no snow on the ground we will compute the spread indexes and fire load\r\n\r\n\t\t\t//Calculate Fine fuel moisture\r\n\t\t\tcal_FineFuelMoisture();\r\n\t\t\t\r\n\t\t\t//calculate the drying factor for the day\r\n\t\t\tcal_DryFactor();\r\n\t\t\t\r\n\t\t\t// adjust fine fuel moist\t\t\r\n\t\t\tadjust_FineFuelMoisture();\r\n\t\t}\r\n\t\r\n\tif (precip>0.1){ // is it rain?\r\n\t\t//There is rain (precipitation >0.1 inch), we must reduce the build up index (BUO) by \r\n\t\t//an amount equal to rain fall\r\n\t\tadjust_BUI();\r\n\t}else{\r\n\t\t//After correct for rain, if any, we are ready to add today's dring factor to obtain the \r\n\t\t//current build up index\r\n\t\tincrease_BUIBYDryingFactor();\r\n\t\t\r\n\t\t//we will adjust the grass index for heavy fuel lags. The result will be the timber spread index\r\n\t\t//The adjusted fuel moisture, ADFM, Adjusted for heavy fuels, will now be computed.\r\n\t\tcal_AdjustedFuelMoist();\r\n\t\t\r\n\t\tif (ADFM>33){\r\n\t\t\tset_AllSpreadIndexToOne();\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//whether wind>14? and calculate grass and timber spread index\r\n\t\t\t\tcal_GrassAndTimber();\r\n\t\t\t\t//Both BUI and Timber spread index are not 0?\r\n\t\t\t\tif (!((TIMBER==0)&(BUO==0))){\r\n\t\t\t\t\tcal_FireLoadRating();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n}", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public Object good() {\n\t\treturn \"hyo\";\n\t}", "int definePassingScore(Speciality speciality) throws LogicException;", "public int logic1()\r\n\t{\r\n\t\tint changesMade = 0;\r\n\r\n\t\t\r\n\t\treturn changesMade;\r\n\t\t\t\t\t\r\n\t}", "void check();", "void check();", "protected abstract void work();", "@Override\n\tpublic Void call() throws Exception {\n\t\tlong money = ThreadLocalRandom.current().nextLong(0,21);\n\t\tUtility.p(callType + \" processing \" + money);\n\t\ttry {\n\t\tswitch ( callType ){\n\t\tcase myAccountYourAccount:\n\t\t\tlock.transferMoneyBad(myAccount,yourAccount,money);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tbreak;\n\t\tcase yourAccountMyAccount:\n\t\t\tlock.transferMoneyBad(yourAccount,myAccount,money);\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tbreak;\n\t\tcase myAccountYourAccountHash:\n\t\t\tlock.transferMoney(myAccount,yourAccount,money);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tbreak;\n\t\tcase yourAccountMyAccountHash:\n\t\t\tlock.transferMoney(yourAccount,myAccount,money);\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tUtility.p(\"illegal type:\" + callType);\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn null;\n\t}finally {\n\t\tUtility.p(\"exiting\");\n\t}\n\t}", "private static int returnItself(int itself, int dummy) {\r\n return itself;\r\n }", "protected abstract T criterion(Result r);", "public abstract int calculate(int a, int b);", "static void perform_ret(String passed){\n\t\tint type = type_of_ret(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\treturn_unconditionally(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public double getUtility(double consumption);", "void breach();", "public abstract void mutate();", "protected abstract float _getGrowthChance();", "public int Check(){\n return 6;\n }", "public void solution() {\n\t\t\n\t}", "@Override\n public Boolean call() throws Exception {\n return this.state22();\n }", "AttackResult userAttack();", "abstract int nextTry(String guess);", "public int logic2()\r\n\t{\r\n\t\tint changesMade = 0;\r\n\t\t\t\r\n\t\treturn changesMade;\r\n\t}", "protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "abstract public T doSomething();", "public int storrelse();", "public void processThought(Thought thought);", "public String run() {\r\n // Check if ironCurtain is available to use and GreedyIronCurtain is available\r\n if (myself.ironCurtainAvailable && myself.energy >= 120 && checkGreedyIronCurtain()) {\r\n return buildIC();\r\n } else if (myself.isIronCurtainActive && canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n // Check if GreedyWinRate is available\r\n if (checkGreedyWinRate() && checkGreedyEnergy() && canBuy(ENERGY)) {\r\n return buildEnergy();\r\n }\r\n // Check if there is an attack..\r\n else if (myTotal.get(3) > 0 || myTotal.get(0) > 0) {\r\n // Check if GreedyDefense is available\r\n if (canBuy(DEFENSE) && checkGreedyDefense()) \r\n return defendRow();\r\n else if (canBuy(ATTACK)) return buildTurret();\r\n return doNothingCommand();\r\n } \r\n // Check if GreedyEnergy is available\r\n else if (checkGreedyEnergy() && canBuy(ENERGY)) {\r\n return buildEnergy();\r\n } \r\n // Just Attack if there is no greedy or do nothing if there is no energy\r\n else if (canBuy(ATTACK)) {\r\n return buildTurret();\r\n } else {\r\n return doNothingCommand();\r\n }\r\n }\r\n }", "public void addSmell(String smell, boolean value) {\n\t\tgetCode_Smells().put(smell, value);\n\t}", "public abstract int mo9754s();", "void apply() throws Exception;", "abstract public boolean performNextAttack();", "boolean doSomething() {\n\t\treturn true;\n\t}", "public static byte calcShldUse(L2Character attacker, L2Character target, L2Skill skill, boolean sendSysMsg)\n\t{\n\t\tif (skill != null && (skill.ignoreShield() || skill.isMagic()))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\tL2Item item = target.getSecondaryWeaponItem();\n\t\tif (item == null || !(item instanceof L2Armor) || ((L2Armor) item).getItemType() == L2ArmorType.SIGIL)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\tdouble shldRate = target.calcStat(Stats.SHIELD_RATE, 0, attacker, null) * BaseStats.DEX.calcBonus(target);\n\t\tif (shldRate == 0.0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\tint degreeside = (int) target.calcStat(Stats.SHIELD_DEFENCE_ANGLE, 120, null, null);\n\t\tif (degreeside < 360 && !target.isFacing(attacker, degreeside))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Tenkai custom: Make shields way less effective on non-sigel awakened classes\n\t\t/*if (target instanceof L2PcInstance\n\t\t\t\t&& ((L2PcInstance)target).getClassId() > 139)\n\t\t\tshldRate *= 0.1;*/\n\n\t\tbyte result = SHIELD_DEFENSE_FAILED;\n\t\t// if attacker use bow and target wear shield, shield block rate is multiplied by 1.3 (30%)\n\t\tL2Weapon at_weapon = attacker.getActiveWeaponItem();\n\t\tif (at_weapon != null && at_weapon.getItemType() == L2WeaponType.BOW)\n\t\t{\n\t\t\tshldRate *= 1.3;\n\t\t}\n\n\t\tint rnd = Rnd.get(100);\n\t\tif (shldRate * (Config.ALT_PERFECT_SHLD_BLOCK / 100.0) > rnd)\n\t\t{\n\t\t\tresult = SHIELD_DEFENSE_PERFECT_BLOCK;\n\t\t}\n\t\telse if (shldRate > rnd)\n\t\t{\n\t\t\tresult = SHIELD_DEFENSE_SUCCEED;\n\t\t}\n\n\t\tif (sendSysMsg && target instanceof L2PcInstance)\n\t\t{\n\t\t\tL2PcInstance enemy = (L2PcInstance) target;\n\t\t\tswitch (result)\n\t\t\t{\n\t\t\t\tcase SHIELD_DEFENSE_SUCCEED:\n\t\t\t\t\tenemy.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SHIELD_DEFENCE_SUCCESSFULL));\n\t\t\t\t\tbreak;\n\t\t\t\tcase SHIELD_DEFENSE_PERFECT_BLOCK:\n\t\t\t\t\tenemy.sendPacket(SystemMessage\n\t\t\t\t\t\t\t.getSystemMessage(SystemMessageId.YOUR_EXCELLENT_SHIELD_DEFENSE_WAS_A_SUCCESS));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (result >= 1)\n\t\t{\n\t\t\t// ON_SHIELD_BLOCK\n\t\t\tif (target.getChanceSkills() != null)\n\t\t\t{\n\t\t\t\ttarget.getChanceSkills().onBlock(target);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\r\n\t\tpublic int threat() {\n\t\t\treturn state.getThreat();\r\n\t\t}", "public void smeltItem()\n {\n if (this.canSmelt())\n {\n ItemStack var1 = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);\n\n if (this.furnaceItemStacks[2] == null)\n {\n this.furnaceItemStacks[2] = var1.copy();\n }\n else if (this.furnaceItemStacks[2].isItemEqual(var1))\n {\n ++this.furnaceItemStacks[2].stackSize;\n }\n\n --this.furnaceItemStacks[0].stackSize;\n\n if (this.furnaceItemStacks[0].stackSize <= 0)\n {\n this.furnaceItemStacks[0] = null;\n }\n }\n }", "@Override\n\tpublic Result optimise(Scenario scenario) {\n\t\t// Check if all receivers have coverage. If they have we have our solution.\n\t\tif (signalCalculator.fullCoverage(scenario.transmitters, scenario.receivers)) {\n\t\t\treturn new Result(scenario.transmitters);\n\t\t}\n\t\t\n\t\t// Get the list of possibleBoost we could apply to the transmitters to get extra coverage\n\t\tList<Boost> possibleBoosts = PossibleBoosts(scenario);\n\t\t// Find the boost with the best (extra power)/(extra coverage) ratio\n\t\tBoost cheapestBoost = possibleBoosts\n\t\t\t\t.stream()\n\t\t\t\t.min((b1, b2) -> Double.compare(b1.boostPerCoverage(), b2.boostPerCoverage()))\n\t\t\t\t.get();\n\t\t// Create a new list of transmitters with the found cheapestBoost applied\n\t\tList<Transmitter> newTransmitters = scenario.transmitters\n\t\t\t\t.stream()\n\t\t\t\t.map(t -> \n\t\t\t\t\tt.id == cheapestBoost.transmitter.id ? \n\t\t\t\t\tnew Transmitter(t.id, t.location, t.power + cheapestBoost.boost) : \n\t\t\t\t\tnew Transmitter(t.id, t.location, t.power)\n\t\t\t\t)\n\t\t\t\t.collect(Collectors.toList());\n\t\t// Create the new scenario with the new list of transmitters\n\t\tScenario newScenario = new Scenario(newTransmitters, scenario.receivers);\n\t\t// Call optimise function with the new scenario to find the next best scenario\n\t\treturn optimise(newScenario);\n\t}", "public static void makeDamageCalculation (SummonedMonster AttackingMonster, SummonedMonster GuardingMonster) {\r\n AttackingMonster.canStillAttackThisTurn = false; // Just in case this might be missed somewhere, erase its one attack per turn, because now there is no turning back.\r\n AttMonster.rememberPropertiesOfMonster(AttackingMonster);\r\n GuardMonster.rememberPropertiesOfMonster(GuardingMonster);\r\n // get the 2 relevant values for the attack calculation\r\n int relevantAttValue = AttackingMonster.att;\r\n int releventGuardingValue = GuardingMonster.relevantValue();\r\n // get some relevant properties of the involved monsters\r\n boolean attackingMonsterIndestructible = AttackingMonster.isIndestructibleByBattle();\r\n boolean attackingMonsterImmuneWhileWinning = AttackingMonster.isImmuneWhileWinning();\r\n boolean attackingMonsterImmune = AttackingMonster.isImmune();\r\n boolean attackingMonsterBanishes = AttackingMonster.isBanishingOpposingMonster(GuardingMonster);\r\n boolean attackingMonsterBanishesBoth = AttackingMonster.isBanishingBothMonsters(GuardingMonster);\r\n \r\n boolean guardingMonsterIndestructible = GuardingMonster.isIndestructibleByBattle();\r\n boolean guardingMonsterImmuneWhileWinning = GuardingMonster.isImmuneWhileWinning();\r\n boolean guardingMonsterImmune = GuardingMonster.isImmune();\r\n boolean guardingMonsterBanishes = GuardingMonster.isBanishingOpposingMonster(AttackingMonster);\r\n boolean guardingMonsterBanishesBoth = GuardingMonster.isBanishingBothMonsters(AttackingMonster);\r\n // let monsters clash here\r\n if (relevantAttValue == releventGuardingValue) {\r\n if (relevantAttValue==0) {\r\n YuGiOhJi.informationDialog(\"Nothing happens, because of zero attack.\", \"\");\r\n endAttack(false);\r\n }\r\n else {\r\n if (GuardingMonster.isInAttackMode) { // usually both monsters kill each other\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else if (guardingMonsterBanishesBoth) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n else {\r\n if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n }\r\n if (!guardingMonsterIndestructible && attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, false);\r\n }\r\n else if (guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(true, false); // suicide effect of attacking monster\r\n }\r\n else if (!guardingMonsterIndestructible && !attackingMonsterIndestructible) {\r\n possibleSuicideEffect(false, true); // double kill here\r\n }\r\n else { // if both are indestructible, none of them has a suicide effect\r\n endDamageStep(false); // here both survive\r\n }\r\n } // else nothing happens\r\n }\r\n }\r\n else if (relevantAttValue > releventGuardingValue) { // here the attacking monster usually kills the guarding one\r\n // look if attacking monster is either piercing by itself or copies Lance or Holy Lance\r\n boolean isEffectivelyPiercing = (AttackingMonster.hasPiercingDamageAbility() && !guardingMonsterImmune);\r\n boolean isContinuingGame = true;\r\n if (GuardingMonster.isInAttackMode || isEffectivelyPiercing) {\r\n isContinuingGame = isDealingBattleDamageAndContinuingGame(false, relevantAttValue-releventGuardingValue, GuardingMonster.isPlayersMonster);\r\n } // else no damage\r\n if (isContinuingGame) {\r\n if (guardingMonsterBanishesBoth) { // definitely banishes itself\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n if (!attackingMonsterImmuneWhileWinning && !attackingMonsterImmune) { // banishes opponent only, if it not immune against it\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!guardingMonsterIndestructible) {\r\n if (attackingMonsterBanishes && !guardingMonsterImmune) {\r\n banishingDialogBigBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).killMonster();\r\n }\r\n possibleSuicideEffect(false, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n else { // here: relevantAttValue < releventGuardingValue\r\n // rare case in which attacker gets the damage\r\n boolean isContinuingGame = isDealingBattleDamageAndContinuingGame(false, releventGuardingValue-relevantAttValue, AttackingMonster.isPlayersMonster);\r\n if (isContinuingGame) {\r\n if (GuardingMonster.isInAttackMode) {\r\n if (attackingMonsterBanishesBoth) {\r\n banishingDialogBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n if (!guardingMonsterImmuneWhileWinning && !guardingMonsterImmune) {\r\n banishingDialogBanisher(GuardingMonster);\r\n getNthSummonedMonster(GuardingMonster.sumMonsterNumber, GuardingMonster.isPlayersMonster).banishMonster();\r\n }\r\n }\r\n else if (!attackingMonsterIndestructible) {\r\n if (guardingMonsterBanishes && !attackingMonsterImmune) {\r\n banishingDialogBigBanisher(AttackingMonster);\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).banishMonster();\r\n }\r\n else {\r\n getNthSummonedMonster(AttackingMonster.sumMonsterNumber, AttackingMonster.isPlayersMonster).killMonster();\r\n }\r\n }\r\n possibleSuicideEffect(true, false);\r\n }\r\n else {\r\n endDamageStep(false);\r\n }\r\n }\r\n }\r\n \r\n }", "public static double calcMagicDam(L2CubicInstance attacker, L2Character target, L2Skill skill, boolean mcrit, byte shld)\n\t{\n\t\tdouble mAtk = attacker.getMAtk();\n\t\tfinal boolean isPvP = target instanceof L2Playable;\n\t\tfinal boolean isPvE = target instanceof L2Attackable;\n\t\tdouble mDef = target.getMDef(attacker.getOwner(), skill);\n\n\t\tswitch (shld)\n\t\t{\n\t\t\tcase SHIELD_DEFENSE_SUCCEED:\n\t\t\t\tmDef += target.getShldDef(); // kamael\n\t\t\t\tbreak;\n\t\t\tcase SHIELD_DEFENSE_PERFECT_BLOCK: // perfect block\n\t\t\t\treturn 1;\n\t\t}\n\n\t\tdouble damage = 91 * Math.sqrt(mAtk) * skill.getPower(isPvP, isPvE) / mDef;\n\t\tL2PcInstance owner = attacker.getOwner();\n\t\t// Failure calculation\n\t\tif (Config.ALT_GAME_MAGICFAILURES && !calcMagicSuccess(owner, target, skill))\n\t\t{\n\t\t\tif (target.getLevel() - skill.getMagicLevel() > 9)\n\t\t\t{\n\t\t\t\tSystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_RESISTED_YOUR_S2);\n\t\t\t\tsm.addCharName(target);\n\t\t\t\tsm.addSkillName(skill);\n\t\t\t\towner.sendPacket(sm);\n\n\t\t\t\tdamage = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (skill.getSkillType() == L2SkillType.DRAIN)\n\t\t\t\t{\n\t\t\t\t\towner.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DRAIN_HALF_SUCCESFUL));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\towner.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ATTACK_FAILED));\n\t\t\t\t}\n\n\t\t\t\tdamage /= 2;\n\t\t\t}\n\n\t\t\tif (target instanceof L2PcInstance)\n\t\t\t{\n\t\t\t\tif (skill.getSkillType() == L2SkillType.DRAIN)\n\t\t\t\t{\n\t\t\t\t\tSystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.RESISTED_C1_DRAIN);\n\t\t\t\t\tsm.addCharName(owner);\n\t\t\t\t\ttarget.sendPacket(sm);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.RESISTED_C1_MAGIC);\n\t\t\t\t\tsm.addCharName(owner);\n\t\t\t\t\ttarget.sendPacket(sm);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (mcrit)\n\t\t{\n\t\t\tdamage *= 3;\n\t\t}\n\n\t\t// CT2.3 general magic vuln\n\t\tdamage *= target.calcStat(Stats.MAGIC_DAMAGE_VULN, 1, null, null);\n\n\t\tdamage *= calcElemental(owner, target, skill);\n\n\t\tif (target instanceof L2Attackable)\n\t\t{\n\t\t\tif (!target.isRaid() && !target.isRaidMinion() && target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY &&\n\t\t\t\t\tattacker.getOwner() != null && target.getLevel() - attacker.getOwner().getLevel() >= 2)\n\t\t\t{\n\t\t\t\tint lvlDiff = target.getLevel() - attacker.getOwner().getLevel() - 1;\n\t\t\t\tif (lvlDiff > Config.NPC_SKILL_DMG_PENALTY.size())\n\t\t\t\t{\n\t\t\t\t\tdamage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdamage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn damage;\n\t}", "private int lightAttack() {\n return attack(9, 0);\n }", "AttackResult randomAttack();", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "private static double getBonus(double unitsMade,double workAmount) {\n\n if (workAmount == 1) {\n\n if (unitsMade > 250) {\n\n return unitsMade * 0.10;\n }\n return 0;\n }\n else if (workAmount == 2) {\n\n if (unitsMade > 700) {\n\n return unitsMade * 0.10;\n }\n return 0;\n }\n\n return 0;\n }", "public void doSomething() {\n \n }", "Habit getPassedHabit();", "public int water(){\n //TODO\n }", "public abstract void calculate();", "@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }", "void check() throws YangException;", "private double individualEvaluation() {\n\t\t//System.out.println(\"indE\"+ myValues.get(myAction.getPurpose()).getStrength(null));\n\t\treturn myValues.get(myAction.getPurpose()).getStrength(null);\n\t}", "void work();", "private static void smelt(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addSmelting(input, output, 0.45F);\r\n\t}", "public static double evaluateSurvivability(Board b, int team) {\n Optional<Leader> ol = b.getPlayer(team).getLeader();\n if (ol.isEmpty()) {\n return 0;\n }\n Leader l = ol.get();\n if (l.health <= 0) { // if dead\n return -99999 + l.health; // u dont want to be dead\n }\n int shield = l.finalStats.get(Stat.SHIELD);\n Supplier<Stream<Minion>> attackingMinions = () -> b.getMinions(team * -1, true, true);\n // TODO add if can attack check\n // TODO factor in damage limiting effects like durandal\n int potentialDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int potentialLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttack)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * (m.finalStats.get(Stat.ATTACKS_PER_TURN) - m.attacksThisTurn))\n .reduce(0, Integer::sum);\n int threatenDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int threatenLeaderDamage = attackingMinions.get()\n .filter(Minion::canAttackEventually)\n .filter(Minion::attackLeaderConditions)\n .map(m -> m.finalStats.get(Stat.ATTACK) * m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n int attackers = attackingMinions.get()\n .map(m -> m.finalStats.get(Stat.ATTACKS_PER_TURN))\n .reduce(0, Integer::sum);\n List<Minion> defendingMinons = b.getMinions(team, false, true)\n .filter(m -> m.finalStats.get(Stat.WARD) > 0)\n .collect(Collectors.toList());\n int leaderhp = l.health + shield;\n int ehp = defendingMinons.stream()\n .map(m -> m.health)\n .reduce(leaderhp, Integer::sum);\n long defenders = defendingMinons.size();\n if (shield > 0) {\n defenders++;\n }\n if (b.getCurrentPlayerTurn() != team) {\n threatenDamage = potentialDamage;\n threatenLeaderDamage = potentialLeaderDamage;\n }\n // if there are more defenders than attacks, then minions shouldn't be\n // able to touch face\n if (defenders >= attackers) {\n ehp = Math.max(ehp - threatenDamage, leaderhp);\n } else {\n ehp = Math.max(ehp - threatenDamage, leaderhp - threatenLeaderDamage);\n if (ehp <= 0) {\n if (team == b.getCurrentPlayerTurn()) {\n // they're threatening lethal if i dont do anything\n return -30 + ehp;\n } else {\n // they have lethal, i am ded\n return -60 + ehp;\n }\n }\n }\n return 6 * Math.log(ehp);\n }", "public void doSomething(){\n return;\n }", "public void think() {\n\t\t\n\t}", "int waterfall();", "public abstract int mo12585RY(int i);", "static void perform_stc(String passed){\n\t\tint type = type_of_stc(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tstc_with_car(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "protected BigDecimal reword(){\n\t\tif(getNowAct() == 0){\n\t\t\treturn(rewordBuy());\n\t\t}\n\t\t//keep\n\t\telse if(getNowAct() == 1){\n\t\t\treturn(rewordWait());\n\t\t}\n\t\t//sell\n\t\telse if(getNowAct() == 2){\n\t\t\treturn(rewordSell());\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"getNowAct : \" + getNowAct() + \"\\nerror occur.\");\n\t\t\tSystem.exit(2);\n\t\t\treturn(null);\n\t\t}\n\t}", "Result evaluate();", "protected abstract Object doCalculations();", "public abstract int getBonus();", "protected abstract boolean useReasoner();", "boolean getPossiblyBad();", "public int thunderclap();", "public boolean getIsPeaceful()\r\n/* 29: */ {\r\n/* 30:49 */ return this.isPeaceful;\r\n/* 31: */ }", "public abstract Value<T> run() throws Exception;", "public abstract void\n bypassValidation_();", "Faucet startWashingHands(String person);", "public void findMutual(){\n\n }", "@Override\n protected void runReturnAnnotationHandler() {\n checkContainsAny(MSG_RETURN_VALUE_WITH_NONNULL_BY_DEFAULT,\n NullnessAnnotation.RETURN_VALUES_ARE_NONNULL_BY_DEFAULT);\n checkContainsAny(MSG_RETURN_VALUE_WITH_NULLABLE,\n NullnessAnnotation.NULLABLE);\n checkContainsAll(MSG_CONTRADICTING_RETURN_VALUE_ANNOTATIONS, NullnessAnnotation.NONNULL,\n NullnessAnnotation.CHECK_FOR_NULL);\n checkContainsAll(MSG_OVERRIDDEN_METHOD_WITH_CHECK_RETURN_VALUE,\n NullnessAnnotation.CHECK_RETURN_VALUE, NullnessAnnotation.OVERRIDE);\n checkRedundancyDueToClassLevelAnnotation(MSG_REDUNDANT_NONNULL_BY_DEFAULT_ANNOTATION,\n NullnessAnnotation.PARAMETERS_ARE_NONNULL_BY_DEFAULT);\n checkRedundancyDueToClassLevelAnnotation(MSG_REDUNDANT_NULLABLE_BY_DEFAULT_ANNOTATION,\n NullnessAnnotation.PARAMETERS_ARE_NULLABLE_BY_DEFAULT);\n\n final DetailAST ast = getAst();\n if (isVoid(ast)) {\n checkContainsAny(MSG_VOID_WITH_CHECK_RETURN_VALUE_ANNOTATION,\n NullnessAnnotation.CHECK_RETURN_VALUE);\n }\n if (isPrimitiveType(ast)) {\n checkContainsAny(MSG_PRIMITIVES_WITH_NULLNESS_ANNOTATION,\n NullnessAnnotation.CHECK_FOR_NULL, NullnessAnnotation.NONNULL,\n NullnessAnnotation.NULLABLE);\n }\n else {\n final NullnessAnnotation annotation = getParentMethodOrClassAnnotation(\n NullnessAnnotation.RETURN_VALUES_ARE_NONNULL_BY_DEFAULT);\n final boolean returnValuesAreNonnullByDefault = annotation\n == NullnessAnnotation.RETURN_VALUES_ARE_NONNULL_BY_DEFAULT;\n final boolean isMethodOverridden = isMethodOverridden();\n\n if (returnValuesAreNonnullByDefault) {\n if (!isMethodOverridden) {\n checkContainsAny(MSG_REDUNDANT_NONNULL_RETURN_ANNOTATION,\n NullnessAnnotation.NONNULL);\n }\n }\n else {\n checkContainsNone(MSG_RETURN_WITHOUT_NULLNESS_ANNOTATION,\n NullnessAnnotation.CHECK_FOR_NULL, NullnessAnnotation.NONNULL,\n NullnessAnnotation.OVERRIDE);\n }\n\n if (isMethodOverridden && !allowOverridingReturnValue) {\n checkContainsAny(MSG_OVERRIDDEN_METHODS_ALLOW_ONLY_NONNULL,\n NullnessAnnotation.CHECK_FOR_NULL, NullnessAnnotation.NULLABLE);\n }\n\n if (isMethodOverridden) {\n checkContainsAny(MSG_NEED_TO_INHERIT_PARAM_ANNOTATIONS,\n NullnessAnnotation.PARAMETERS_ARE_NONNULL_BY_DEFAULT);\n }\n }\n }", "protected void warmupImpl(M newValue) {\n\n }", "public abstract int calculateOutput();", "public NAryTree apply(NAryTree tree, Random rng) {\n\t\tif (rng.nextDouble() > chanceOfRandomMutation) {\n\t\t\t//DO A SMART MUTATION\n\t\t\tNAryTree mutatedTree;\n\t\t\tboolean changed = false;\n\t\t\tint nrTries = 0;\n\t\t\tTreeMutationAbstract mutator;\n\t\t\tdo {\n\t\t\t\tmutator = getSmartMutatorForChance(rng.nextDouble() * totalChanceSmart);\n\n\t\t\t\tmutatedTree = mutator.mutate(tree);\n\n\t\t\t\tchanged = mutator.changedAtLastCall();\n\t\t\t\tnrTries++;\n\n\t\t\t\tthis.locationOfLastChange = mutator.locationOfLastChange;\n\t\t\t\tthis.typeOfChange = mutator.typeOfChange;\n\n\t\t\t\t//FIXME problem with the smart mutator, it always says that the individual changed, even when it didn't.\n\t\t\t\tif (nrTries > 2 && changed == false) {\n\t\t\t\t\t//Going dumb... We tried to be smart long enough\n\t\t\t\t\treturn applyDumb(tree, rng);\n\t\t\t\t}\n\t\t\t} while (!changed);\n\n\t\t\tassert mutatedTree.isConsistent();\n\t\t\treturn mutatedTree;\n\t\t} else {\n\t\t\t//DELEGATE TO DUMB COORDINATOR\n\t\t\treturn applyDumb(tree, rng);\n\t\t}\n\t}", "@Override\r\n public FlowState call() {\r\n // TODO: We should not need? to pass the flowState because this flow is already known (reapplying same values???)\r\n FlowState flowState = getFlowState();\r\n if ( flowState == null ) {\r\n throw new FlowException(\"No flowState with id:\", getExistingFlowStateLookupKey());\r\n } else {\r\n return getFlowManagementWithCheck().continueFlowState(getExistingFlowStateLookupKey(), true, this.getInitialFlowState());\r\n }\r\n }", "static void perform_cmc(String passed){\n\t\tint type = type_of_cmc(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcmc_with_car(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "synchronized int attemptSteal(ActivityRecord[] tmp, WorkerContext context,\n StealStrategy s, StealPool pool, ConstellationIdentifier src,\n int size, boolean local) {\n if (src.equals(identifier)) {\n logger.error(\"INTERAL ERROR: attemp steal from self!\",\n new Throwable());\n return 0;\n }\n\n if (!pool.overlap(wrapper.belongsTo())) {\n logger.info(\"attemptSteal: wrong pool!\");\n return 0;\n }\n\n // First steal from the activities that I cannot run myself.\n int offset = wrongContext.steal(context, s, tmp, 0, size);\n if (logger.isDebugEnabled() && !local) {\n logger.debug(\"Stole \" + offset + \" jobs from wrongContext of \"\n + identifier.id + \", size = \" + wrongContext.size());\n }\n\n if (local) {\n\n // Only peers from our own constellation are allowed to steal\n // restricted or stolen jobs.\n if (offset < size) {\n offset += restrictedWrongContext.steal(context, s, tmp, offset,\n size - offset);\n }\n\n if (offset < size) {\n offset += restricted.steal(context, s, tmp, offset,\n size - offset);\n }\n\n if (offset < size) {\n offset += stolen.steal(context, s, tmp, offset, size - offset);\n }\n }\n\n // Anyone may steal a fresh job\n if (offset < size) {\n int n = fresh.steal(context, s, tmp, offset, size - offset);\n offset += n;\n if (logger.isDebugEnabled() && !local) {\n logger.debug(\"Stole \" + n + \" jobs from fresh, size = \"\n + fresh.size());\n }\n\n }\n\n if (offset == 0) {\n // steal failed, no activities stolen\n return 0;\n }\n\n // Success. Trim if necessary\n if (offset != size) {\n tmp = trim(tmp, offset);\n }\n\n // System.out.println(\"ST: \" + identifier + \" returning \" + offset +\n // \" stolen jobs to \" + src);\n\n // Next, remove activities from lookup, and mark and register them as\n // relocated or stolen/exported\n registerLeavingActivities(tmp, offset, src, local);\n\n return offset;\n }" ]
[ "0.7323529", "0.57905924", "0.5664483", "0.56606686", "0.55043143", "0.54481447", "0.5437854", "0.54238105", "0.54170215", "0.537562", "0.5362012", "0.53315395", "0.5330569", "0.52922463", "0.5249874", "0.52430815", "0.52409726", "0.52349484", "0.5230487", "0.52260435", "0.5214375", "0.52033806", "0.5188892", "0.51375645", "0.50755644", "0.50659007", "0.5048547", "0.5047736", "0.50455564", "0.50455564", "0.50408643", "0.5031767", "0.5021161", "0.5017051", "0.5013271", "0.49922994", "0.4988788", "0.49871913", "0.4980879", "0.4980662", "0.49791774", "0.49788094", "0.4976718", "0.49606332", "0.4958932", "0.49343467", "0.49215022", "0.49197766", "0.49129358", "0.49065816", "0.49055496", "0.4888479", "0.48830009", "0.48819363", "0.4879405", "0.48771742", "0.48749357", "0.48646587", "0.48639598", "0.48615935", "0.48615286", "0.48613346", "0.48586923", "0.4855782", "0.48519993", "0.4849388", "0.48468", "0.4845549", "0.4845128", "0.48385414", "0.48359454", "0.4829081", "0.48247766", "0.4824123", "0.48226434", "0.482229", "0.4821273", "0.4815192", "0.48110953", "0.48104247", "0.48097345", "0.48074475", "0.48051718", "0.48022556", "0.4801651", "0.4801273", "0.47972804", "0.47949535", "0.47831878", "0.47770113", "0.47722775", "0.4768969", "0.47656846", "0.47627085", "0.47607183", "0.47549945", "0.47507152", "0.4749432", "0.47471932", "0.47456822", "0.47441632" ]
0.0
-1
A 25% chance to mutate once by calling the helper method, 6.25% to mutate twice, etc.
public void mutate() { synchronized (this) { Random rand = new Random(); int mutate = rand.nextInt(4); while (mutate == 0) { mutateHelper(); mutate = rand.nextInt(4); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(500, 800);\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "void mutate() {\r\n\t\tif (Math.random() < TSP.p_mutate) {\r\n\t\t\t// randomly flip two cities\r\n\t\t\trndSwapTwo();\r\n\t\t\tthis.distance = distance();\r\n\t\t}\r\n\t}", "public NAryTree apply(NAryTree tree, Random rng) {\n\t\tif (rng.nextDouble() > chanceOfRandomMutation) {\n\t\t\t//DO A SMART MUTATION\n\t\t\tNAryTree mutatedTree;\n\t\t\tboolean changed = false;\n\t\t\tint nrTries = 0;\n\t\t\tTreeMutationAbstract mutator;\n\t\t\tdo {\n\t\t\t\tmutator = getSmartMutatorForChance(rng.nextDouble() * totalChanceSmart);\n\n\t\t\t\tmutatedTree = mutator.mutate(tree);\n\n\t\t\t\tchanged = mutator.changedAtLastCall();\n\t\t\t\tnrTries++;\n\n\t\t\t\tthis.locationOfLastChange = mutator.locationOfLastChange;\n\t\t\t\tthis.typeOfChange = mutator.typeOfChange;\n\n\t\t\t\t//FIXME problem with the smart mutator, it always says that the individual changed, even when it didn't.\n\t\t\t\tif (nrTries > 2 && changed == false) {\n\t\t\t\t\t//Going dumb... We tried to be smart long enough\n\t\t\t\t\treturn applyDumb(tree, rng);\n\t\t\t\t}\n\t\t\t} while (!changed);\n\n\t\t\tassert mutatedTree.isConsistent();\n\t\t\treturn mutatedTree;\n\t\t} else {\n\t\t\t//DELEGATE TO DUMB COORDINATOR\n\t\t\treturn applyDumb(tree, rng);\n\t\t}\n\t}", "public void jitter() {\n // jitter +- 20% of the value\n double amount = 0.20;\n double change = 1.0 - amount + (Evolve.getRandomNumber() * amount * 2); \n value *= change;\n }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "@Override\r\n\tpublic void doTimeStep() {\n\t\tthis.run(Critter.getRandomInt(8));\r\n\t}", "void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public void growLiving(){\n living += Math.round(Math.random());\n living -= Math.round(Math.random());\n \n if(living > 100){\n living = 100;\n }\n \n if(living < 0){\n living = 0;\n }\n }", "public Specimen mutate(Specimen specimen) {\n\t\tMap<String, Double> weights = WeightUtil.extractWeights(specimen.getWeights());\n\n\t\t// Now, with a certain probabiliy mutate each weight.\n\t\tfor (Map.Entry<String, Double> entry : weights.entrySet()) {\n\t\t\tif (random.nextDouble() <= mutateProbability) {\n\t\t\t\tentry.setValue(mutate(entry.getValue()));\n\t\t\t}\n\t\t}\n\n\t\t// Create a new specimen.\n\t\treturn new Specimen(specimen.getName(), generation, WeightUtil.createWeights(weights));\n\t}", "public static void setMutationProbability(double value) { mutationProbability = value; }", "void doDummyComputation() {\n\t\tlong dummyValue = 0;\n\t\t// We use a random number and a subsequent check to avoid smart\n\t\t// compilers\n\t\tRandom rand = new Random();\n\t\tint seed = rand.nextInt(10) + 1;\n\t\tfor (int i = 0; i < 10000000; i++) {\n\t\t\tdummyValue = 10 + ((31 * (dummyValue + seed)) % 1234567);\n\t\t}\n\t\tif (dummyValue < 10) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"This never happens, but let's pretend the value matters to avoid this being complied away.\");\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(50);\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}", "public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}", "private double genMultiplier() {\n return (random.nextInt(81) + 60)/100.0;\n }", "public Boolean IsNormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //5%\n if (k <= 5) {\n normally++;\n return true;\n }\n return false;\n }", "float genChance();", "public void defaultMutate(EvolutionState state, int thread)\n {\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n\n MersenneTwisterFast rng = state.random[thread];\n for(int x = 0; x < genome.length; x++)\n if (rng.nextBoolean(s.mutationProbability(x)))\n {\n float old = genome[x].getValue();\n for(int retries = 0; retries < s.duplicateRetries(x) + 1; retries++)\n {\n switch(s.mutationType(x))\n {\n case FloatVectorSpecies.C_GAUSS_MUTATION:\n gaussianMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_POLYNOMIAL_MUTATION:\n polynomialMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_RESET_MUTATION:\n floatResetMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_INTEGER_RESET_MUTATION:\n integerResetMutation(state, rng, s, x);\n break;\n case FloatVectorSpecies.C_INTEGER_RANDOM_WALK_MUTATION:\n integerRandomWalkMutation(state, rng, s, x);\n break;\n default:\n state.output.fatal(\"In FloatVectorIndividual.defaultMutate, default case occurred when it shouldn't have\");\n break;\n }\n if (genome[x].getValue() != old) break;\n // else genome[x] = old; // try again\n }\n }\n }", "private static int randomCycleCap() {\n int newValue = 0;\n int iterations = 3;\n Random bombRandGen = new Random();\n\n for (int i = 0; i <= iterations; i++) {\n newValue += bombRandGen.nextInt(4);\n }\n\n return newValue;\n }", "public void mutate() {\n if (this.offspring != null) {\n for (int i = 0; i < this.offspring.size(); i++) {\n\n if (Defines.probMutate > Math.random()) {\n // OK, choose two genes to switch\n int nGene1 = Defines.randNum(0, Defines.chromosomeSize - 1);\n int nGene2 = nGene1;\n // Make sure gene2 is not the same gene as gene1\n while (nGene2 == nGene1) {\n nGene2 = Defines.randNum(0, Defines.chromosomeSize - 1);\n }\n\n // Switch two genes\n String temp = this.offspring.get(i).getGene(nGene1);\n\n this.offspring.get(i).setGene(nGene1, this.offspring.get(i).getGene(nGene2));\n this.offspring.get(i).setGene(nGene2, temp);\n }\n // Regenerate the chromosome\n ChromosomeGenerator chromoGen = new ChromosomeGenerator();\n chromoGen.update(this.offspring.get(i));\n }\n\n }\n\n }", "private static void mating() {\n\t\tint getRand = 0;\n\t\tint parentA = 0;\n\t\tint parentB = 0;\n\t\tint newIndex1 = 0;\n\t\tint newIndex2 = 0;\n\t\tChromosome newChromo1 = null;\n\t\tChromosome newChromo2 = null;\n\n\t\tfor (int i = 0; i < OFFSPRING_PER_GENERATION; i++) {\n\t\t\tparentA = chooseParent();\n\t\t\t// Test probability of mating.\n\t\t\tgetRand = getRandomNumber(0, 100);\n\t\t\tif (getRand <= MATING_PROBABILITY * 100) {\n\t\t\t\tparentB = chooseParent(parentA);\n\t\t\t\tnewChromo1 = new Chromosome();\n\t\t\t\tnewChromo2 = new Chromosome();\n\t\t\t\tpopulation.add(newChromo1);\n\t\t\t\tnewIndex1 = population.indexOf(newChromo1);\n\t\t\t\tpopulation.add(newChromo2);\n\t\t\t\tnewIndex2 = population.indexOf(newChromo2);\n\n\t\t\t\t// Choose either, or both of these:\n\t\t\t\tpartiallyMappedCrossover(parentA, parentB, newIndex1, newIndex2);\n\t\t\t\t// positionBasedCrossover(parentA, parentB, newIndex1, newIndex2);\n\n\t\t\t\tif (childCount - 1 == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex1, 1);\n\t\t\t\t} else if (childCount == nextMutation) {\n\t\t\t\t\texchangeMutation(newIndex2, 1);\n\t\t\t\t}\n\n\t\t\t\tpopulation.get(newIndex1).computeConflicts();\n\t\t\t\tpopulation.get(newIndex2).computeConflicts();\n\n\t\t\t\tchildCount += 2;\n\n\t\t\t\t// Schedule next mutation.\n\t\t\t\tif (childCount % (int) Math.round(1.0 / MUTATION_RATE) == 0) {\n\t\t\t\t\tnextMutation = childCount + getRandomNumber(0, (int) Math.round(1.0 / MUTATION_RATE));\n\t\t\t\t}\n\t\t\t}\n\t\t} // i\n\t\treturn;\n\t}", "private static int addRandomScore() {\n Random ran = new Random();\n return ran.nextInt(201) + 400;\n }", "public void growSocial(){\n social += Math.round(Math.random());\n social -= Math.round(Math.random());\n \n if(social > 100){\n social = 100;\n }\n \n if(social < 0){\n social = 0;\n }\n }", "@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }", "double getMissChance();", "private static int benchmarkedMethod() {\n return 3;\n }", "void move()\n {\n Random rand = new Random();\n int moveOrNot = rand.nextInt(2);//50% chance\n if(moveOrNot == 1)\n super.move();\n }", "private int[] mutationSingleMove(int[] mutant) {\n\t\tint pairPoint1 = rand.nextInt(mutant.length);\n\t\tint newBin = mutant[pairPoint1];\n\t\twhile (newBin == mutant[pairPoint1]) {\n\t\t\tnewBin = rand.nextInt(binCount);\n\t\t}\n\t\tmutant[pairPoint1] = newBin; //swap to a different bucket\n\t\treturn mutant;\n\t}", "private int roulette()\r\n {\r\n\treturn spinTheWheel();\r\n }", "protected abstract float _getGrowthChance();", "public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }", "SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "@Override\n public void run() {\n if (random.nextInt(10) == 0)\n addPowerUp(random.nextInt(256));\n }", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "@Test\n public void ifMyPetIsPlayingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(3));\n }", "public void doSomeRandomization() {\n\t\tlbOp.setSelectedKey(\"+\");\n\t\tRandom random = new Random(System.currentTimeMillis());\n\t\tinpValue1.setNumber((double)random.nextInt(1000));\n\t\tinpValue2.setNumber((double)random.nextInt(1000));\n\t\tcalculate();\n\t}", "public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }", "public void 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 }", "@Override\n\t public Node apply(Node gen) {\n\t\t gen = gen.clone(null);\n\t\t int n = gen.weight();\n\t\t int m = (int)(Math.random()*n);\n\t\t Node mutate_node = gen.get(m);\n\t\t int x = (int)(Math.random()*codes.length);\n\t\t mutate_node.oper = codes[x];\n\t\t return gen;\n\t }", "@Test\n public void ifMyPetIsSleepingIncreaseInitialValueBy2() {\n underTest.tick(2);\n int actualSleepLevel = underTest.getSleepLevel();\n assertThat(actualSleepLevel, is(10));\n }", "@Override\r\n\tpublic int computeNextVal(boolean prediction) {\n\t\treturn (int) (Math.random()*10)%3;\r\n\t}", "public static void increaseDifficaulty() {\r\n\t\tif (Enemy._timerTicker > 5)\r\n\t\t\tEnemy._timerTicker -= 2;\r\n\t\tif (Player._timerTicker < 100)\r\n\t\t\tPlayer._timerTicker += 2;\r\n\t}", "private void simulateUpdate(int input) {\n gameState += input * 1.25;\n gameState %= 20;\n }", "static char mutateBaseWithProb(char base, double p)\n\t{\n\t\tif(rand.nextDouble() < p)\n\t\t{\n\t\t\tint baseAsInt = baseToInt(base);\n\t\t\tchar newBase = intToBase((baseAsInt + rand.nextInt(3) + 1)%4);\n\t\t\tif(Character.isLowerCase(base))\n\t\t\t{\n\t\t\t\tnewBase += 'a' - 'A';\n\t\t\t}\n\t\t\treturn newBase;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn base;\n\t\t}\n\t}", "private void randomizePowers(EliteMobProperties eliteMobProperties) {\n\n if (hasCustomPowers) return;\n if (eliteMobTier < 1) return;\n\n int availableDefensivePowers = 0;\n int availableOffensivePowers = 0;\n int availableMiscellaneousPowers = 0;\n int availableMajorPowers = 0;\n\n if (eliteMobTier >= 1) availableDefensivePowers = 1;\n if (eliteMobTier >= 2) availableOffensivePowers = 1;\n if (eliteMobTier >= 3) availableMiscellaneousPowers = 1;\n if (eliteMobTier >= 4) availableMajorPowers = 1;\n if (eliteMobTier >= 5) availableDefensivePowers = 2;\n if (eliteMobTier >= 6) availableOffensivePowers = 2;\n if (eliteMobTier >= 7) availableMiscellaneousPowers = 2;\n if (eliteMobTier >= 8) availableMajorPowers = 2;\n\n //apply defensive powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidDefensivePowers().clone(), availableDefensivePowers);\n\n //apply offensive powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidOffensivePowers().clone(), availableOffensivePowers);\n\n //apply miscellaneous powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidMiscellaneousPowers().clone(), availableMiscellaneousPowers);\n\n //apply major powers\n applyPowers((HashSet<ElitePower>) eliteMobProperties.getValidMajorPowers().clone(), availableMajorPowers);\n\n MinorPowerPowerStance minorPowerStanceMath = new MinorPowerPowerStance(this);\n MajorPowerPowerStance majorPowerPowerStance = new MajorPowerPowerStance(this);\n\n }", "public void changeSpeed() {\n Random gen = new Random();\n speedX += gen.nextInt(3);\n speedY += gen.nextInt(3);\n }", "private int randomWeight()\n {\n return dice.nextInt(1000000);\n }", "void mining() {\n //COMPUTE ALL DATA HERE\n if (random.nextBoolean()) {\n black_toner = black_toner + random.nextInt(variation);\n black_drum = black_drum + random.nextInt(variation / 2);\n total_printed_black = total_printed_black + random.nextInt(variation);\n } else {\n black_toner = black_toner - random.nextInt(variation);\n black_drum = black_drum - random.nextInt(variation / 2);\n total_printed_black = total_printed_black - random.nextInt(variation);\n }\n\n if (black_toner <= 0) {\n black_toner = 100;\n }\n if (black_drum <= 0) {\n black_drum = 100;\n }\n if (total_printed_black <= 0) {\n total_printed_black = 100;\n }\n }", "default void setRandomModifier(double value, int duration){\n Random random = new Random();\n Modifier.ModifierType[] modifierTypes = Modifier.ModifierType.values();\n Modifier.ModifierType randomType = modifierTypes[random.nextInt(modifierTypes.length)];\n Modifier randomModifier = new Modifier(randomType, value, duration);\n this.setModifier(randomModifier);\n }", "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_Genotype.set(mutationIndex);\n //if (mutationIndex > 28) System.out.println(this.getSolutionRepresentationFor());\n }", "private int randomHelper() {\n\t\tRandom rand = new Random();\n\t\tint randomNum = rand.nextInt((10000 - 1) + 1) + 1;\n\t\treturn randomNum;\n\t}", "public void mutate(NeuralPlayer p)\n\t{\n\t\tdouble[] genome = NetworkCODEC.networkToArray(p.net);\n\t\tRandom g = new Random();\n\t\tfor (int i = 0; i< genome.length; i++)\n\t\t{\n\t\t\tif (g.nextDouble() <= mutationPer)\n\t\t\t\tgenome[i] = randomNum(g) + genome[i];\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome, p.net);\n\t}", "private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}", "@Test\n public void ifMyPetIsDrinkingIncreaseInitialValueBy() {\n underTest.tick(1);\n int actualThirstLevel = underTest.getThirstLevel();\n assertThat(actualThirstLevel, is(5));\n\n\n }", "private void changeDelay() {\n delay = ((int) (Math.random() * 10000) + 1000) / MAX_FRAMES;\n }", "public Critter1() {\r\n\t\tnumberSpawned = 0;\r\n\t\twhile (fearfullness < 50) {//at minimum fearfullness is 50%\r\n\t\t\tfearfullness = getRandomInt(100);\r\n\t\t}\r\n\t}", "public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }", "public float getChance()\n {\n return 1.0f;\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 }", "private void random() {\n\n\t}", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public static void handleEffectChances() {\n for (int i=0 ; i<5 ; i++) {\n effectChances.set(i, effectChances.get(i)+((int) Math.ceil(((double)stageCount)/5))*2);\n }\n }", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "@Override\n public int attack() {\n return new Random().nextInt(5);\n }", "public int getRandom() {\r\n if ((itemSize / nextIndexInCache) < 0.25) {\r\n rebuildCache();\r\n }\r\n while (true) {\r\n int i = random.nextInt(nextIndexInCache);\r\n int v = cache[i];\r\n if (contains(v)) {\r\n return v;\r\n }\r\n }\r\n }", "@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 }", "public static Double[] mutate(Double[] genotype) {\n\t\tRandom random = new Random();\n\t\tint position = random.nextInt(variableNum);\n\t\tgenotype[position]+=((Math.random()-0.5)*mutateVal);\n\t\tif(genotype[position] > maxValue) genotype[position] = maxValue;\n\t\tif(genotype[position] < minValue) genotype[position] = minValue;\n\t\treturn genotype;\n\t}", "public void specialize()\n {\n\tdef -= 200;\n\tdmg += 0.5;\n\tcounter += 1;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public static void updateMacheps() {\n MACHEPS = 1;\n do {\n MACHEPS /= 2;\n } while (1 + MACHEPS / 2 != 1);\n }", "public static double random() {\r\n return uniform();\r\n }", "public abstract int getRandomDamage();", "public float getSpawningChance()\n {\n return 0.1F;\n }", "public synchronized int setPassengerWeight(){\n return random.nextInt((100-40)+1)+40;\n }", "@Override\r\n\tprotected void updateProbAndRoll(int numDoubles, double multiplier, boolean rollAgain) {\n\t\taddToEndProb(multiplier);\r\n\t}", "void randomize() {\r\n\t\trandomize(1, this.length());\r\n\t}", "private boolean isConstantSeedForAllIterations(Method method) {\n if (testCaseRandomnessOverride != null)\n return true;\n \n Repeat repeat;\n if ((repeat = method.getAnnotation(Repeat.class)) != null) {\n return repeat.useConstantSeed();\n }\n if ((repeat = suiteClass.getAnnotation(Repeat.class)) != null) {\n return repeat.useConstantSeed();\n }\n \n return false;\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}", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "public void speckle() {\n\t\tint r = (height / res) - 1;\n\t\tint c = (width / res);\n\t\tfor (int i = 0; i < c; i++)\t\t{\n\t\t\tint x = rng.nextInt(25);\t\t\t\n\t\t\tif (x == 0) { // 1/25 chance of changing bottom row pixel to black\t \n\t\t\t\tvalues[r][i] = color1;\t\t\t\t\n\t\t\t}\n\t\t\telse if (x == 1) { // 1/25 chance of changing bottom row pixel to white\n\t\t\t\tvalues[r][i] = color2;\n\t\t\t}\n\t\t\t// 23/25 chance of leaving bottom pixel alone\n\t\t}\n\t}", "public void randomAuto() {\r\n\r\n Bitmap imageViewBitmap = _imageView.getDrawingCache();\r\n //if the bitmap is null, don't do anything\r\n if (imageViewBitmap == null) {\r\n return;\r\n }\r\n for(int i = 0; i < 1000; i++){\r\n randHelper();\r\n }\r\n invalidate();\r\n }", "private int newSpeed() {\n //makes a random speed for the ball in (-50,-15)U(15,50)\n int n = r.nextInt(71) - 35;\n if (n < 0) {\n n = n - 15;\n } else {\n n = n + 15;\n }\n return n;\n }", "public void step() {\n // method 1 of Temperature randomness\n enPrice = 1.1 * enPrice;\n\n TempChange = Temperature * (0.1 * (1 - 2 * r.nextDouble()));\n // method 2 of Temperature\n// TempChange = temperature_list.get(count);\n// count+=1;\n\n Temperature += TempChange;\n year_num+=1;\n }", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "@Override\n public void update(float price) {\n float newPriceForBidding = Math.round(price + (Math.random() * 100) + (Math.random() * 100));\n display(newPriceForBidding);\n }", "public void specialize(){\n\tdefense *= .6;\n\tattRating *= 1.4;\n\tif ( attRating > 2.0){\n\t attRating = 2.0;\n\t}\n }", "public static double probabilityTwoSixes() {\n int count = 0;\n int amount = 0;\n for (int i = 0; i < 10000; i++) {\n amount = 0;\n for (int j = 0; j < 12; j++) {\n if ((int) (Math.random() * 6) + 1 == 6)\n amount++;\n if (amount == 2) {\n count++;\n break; }\n }\n }\n return ((double) count / (double) 10000) * 100;\n }", "public void cheat() {\r\n\t\t\t\tnourriture += population*10;\r\n\t\t\t\tarmee += population/2;\r\n\t\t\t\tpopulation += armee*tailleArmee;\r\n\t\t\t}", "public void buyIncreaseSafeTime() {\n this.increaseSafeTime++;\n }", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }", "public int increaseDefense () {\n return 3;\n }", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }" ]
[ "0.6484642", "0.63608915", "0.6201108", "0.6197484", "0.6021557", "0.5908211", "0.5898058", "0.5873883", "0.58296067", "0.5824832", "0.58144635", "0.5810416", "0.5728519", "0.5717035", "0.57110256", "0.56882167", "0.5684224", "0.5682234", "0.5658831", "0.56543165", "0.5649751", "0.5649341", "0.5635883", "0.56146973", "0.56089413", "0.55963266", "0.55817944", "0.55709416", "0.5565384", "0.55627406", "0.5551784", "0.5549724", "0.5544021", "0.5539345", "0.55368143", "0.5533381", "0.5530661", "0.55239475", "0.55079836", "0.5506552", "0.550231", "0.54905576", "0.54852116", "0.5466065", "0.54518044", "0.5450126", "0.54485", "0.54446805", "0.5442585", "0.5439855", "0.54371613", "0.54289764", "0.54241765", "0.5419647", "0.54137313", "0.5382053", "0.5380045", "0.5377762", "0.5373593", "0.5369549", "0.5364321", "0.5360107", "0.53531116", "0.53473836", "0.53470904", "0.5344208", "0.53277475", "0.53228724", "0.53059596", "0.5296964", "0.52945334", "0.5293995", "0.52925116", "0.5290894", "0.5279136", "0.5279005", "0.527732", "0.5275989", "0.5271295", "0.5269872", "0.5267809", "0.52664703", "0.5250998", "0.5246102", "0.52425605", "0.5242201", "0.52405065", "0.5236226", "0.5233891", "0.52285343", "0.5224637", "0.5222023", "0.5221563", "0.5220496", "0.5217912", "0.5216241", "0.5208205", "0.5204978", "0.52048236", "0.5202949" ]
0.75884783
0
copied from main.java from A4
private void mutateHelper() { synchronized (this) { Random rand = new Random(); int mutateType = rand.nextInt(5); if (rules.size() >= 14) { mutateType = rand.nextInt(6); } int index = rand.nextInt(rules.size()); Mutation m = null; switch (mutateType) { case 0: m = MutationFactory.getDuplicate(); m.addRules(rules.root); m.mutate(index); break; case 1: m = MutationFactory.getInsert(); m.addRules(rules.root); m.mutate(index); break; case 5: m = MutationFactory.getRemove(); m.addRules(rules.root); m.mutate(index); break; case 3: m = MutationFactory.getReplace(); m.addRules(rules.root); m.mutate(index); break; case 4: m = MutationFactory.getSwap(); m.addRules(rules.root); m.mutate(index); break; case 2: m = MutationFactory.getTransform(); m.addRules(rules.root); m.mutate(index); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args)\r\t{", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "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)\r\n {\n \r\n \r\n }", "public static void main(String args[]){\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main (String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String args[])\r\n {\n }", "public static void main(String[] args) {\t\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\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 \n \n \n \n }", "public static void main(String args[]){\n\t\t\n\t\n\t}", "static public void main(String[] args){\n IA ia = new UberComponent(); IA ia2 = (IA) ia; ia2.SayHello(\",\");\n //--------------------- Check For Symmetry\n IB ia3 = (IB) ia; ia2 = (IA) ia3; ia2.SayHello(\",\"); ia3.SayHello2(\",\");\n //----------- Check For Transitivity\n IC ia4 = (IC) ia3; IA ia5 = (IA) ia4; ia5.SayHello(\",\"); a4.SayHello3(\"m\");\n }", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args){\n\t\t\r\n\t}", "public static void main(String[] args) {\t}", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main(String args[]){\n\t\t\r\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\t\t\n\t\t\n\t}", "public static void main(String[] args)\r\n {\r\n \r\n \r\n \r\n }", "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}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n \n\t\t}", "public void mo4359a() {\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}", "static void main(String[] args)\n {\n }", "public static void main() {\n \n }", "public static void main(String[] args) {\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(String args[]){\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}", "static void main(String[] args) {\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\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\r\n\t}" ]
[ "0.67683566", "0.6490455", "0.64878756", "0.6481974", "0.6475537", "0.6429796", "0.6429796", "0.6429796", "0.6429796", "0.6429796", "0.6429796", "0.6428261", "0.6420936", "0.63850486", "0.63850486", "0.63825125", "0.6381185", "0.6375376", "0.6375376", "0.63710076", "0.63710076", "0.636946", "0.6369169", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.63676614", "0.6364667", "0.6357528", "0.63456917", "0.6340823", "0.6335183", "0.63323635", "0.6326202", "0.63253593", "0.63237226", "0.6318717", "0.6317016", "0.6310983", "0.6310983", "0.6306964", "0.6304906", "0.6304906", "0.6304906", "0.6304906", "0.63014346", "0.6299704", "0.62947905", "0.6293015", "0.629138", "0.6291301", "0.6274872", "0.6274786", "0.6272808", "0.62702984", "0.62532055", "0.62494504", "0.62494504", "0.62494504", "0.62494504", "0.6248364", "0.6245321", "0.623667", "0.623667", "0.623667", "0.623667", "0.623667", "0.623667", "0.623667", "0.623667", "0.623667", "0.62363833", "0.62362385", "0.6233823", "0.6233823", "0.6233823", "0.6233823" ]
0.0
-1
/////////////////////////////////////////////////// PRIVATE METHODS /////////////////////////////////////////////////// IsConnected
private boolean isConnected() { return (this.serverConnection!=null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "protected abstract boolean isConnected();", "@Override\n public boolean isConnected()\n {\n return connected;\n }", "public boolean isConnected()\n {\n return isConnected;\n }", "@Override\n public boolean isConnected() {\n return connected;\n }", "boolean isConnected() {\n \t\tif (fConnected == null)\n \t\t\treturn false;\n \t\treturn !fConnected.isEmpty();\n \t}", "public boolean isConnected(){\n return isConnected;\n }", "public static boolean isConnected()\r\n\t{\r\n\t\t return Globals.connected ;\r\n\t}", "public boolean isConnected() {\n if (mState == STATE_CONNECTED) {\n return true;\n }\n return false;\n }", "public boolean isConnected() {\n return isConnected;\n }", "public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}", "public boolean isConnected() {\n \t\treturn connected;\n \t}", "@Override\r\n\tpublic boolean isConnected() {\n\t\treturn false;\r\n\t}", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "public boolean isConnected() {\n\t\tif (m == null) return false;\n\t\telse return true;\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}", "public boolean isConnected() {\r\n\treturn connected;\r\n }", "public static boolean isConnected() {\n return (getCon() != null);\n }", "public boolean isConnected() {\n return mConnected;\n }", "public boolean isConnected()\n {\n return connected;\n }", "public boolean isConnected(){\n return connected;\n }", "@Override\n public boolean isConnected() {\n boolean result = false;\n synchronized (CONN_SYNC) {\n result = ((system != null) && system.isConnected());\n }\n return result;\n }", "public static boolean isConnected() { return irc != null && irc.isConnected(); }", "public boolean isConnected() {\n\t\treturn conn != null;\n\t}", "public boolean isConnected() {\r\n return connected;\r\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected() {\n\t\treturn this.isConnected;\n\t}", "private boolean isConnected() {\n if (skylinkConnection != null) {\n return skylinkConnection.isConnected();\n }\n return false;\n }", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected()\n {\n return connectionId != GatewayProcess.NO_CONNECTION_ID;\n }", "public boolean getIsConnected() {\n return isConnected;\n }", "public static boolean hasConnected() {\n return sHasConnected;\n }", "public boolean isConnected() {\r\n\t\treturn backend != null;\r\n\t}", "public static boolean isConnected() {\r\n\t\treturn dfl != null;\r\n\t}", "public boolean isConnected() {\n HiLog.info(LOG_LABEL, \"isConnected: %{public}b\", new Object[]{Boolean.valueOf(this.mIsConnected)});\n return this.mIsConnected;\n }", "public boolean isConnecting ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _roboCOM!=null;\r\n\t\t}\r\n\t}", "public boolean isConnected() {\n return mConnectionSocket.isConnected() && !mConnectionSocket.isClosed();\n }", "public boolean isConnected() {\n return dataChannel != null && dataChannel.isConnected();\n }", "protected boolean isConnected() {\n\t\tif (channel == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn channel.isOpen();\n\t\t}\n\t}", "public final boolean isConnected() {\n\t\t// retornamos si existe una conexion\n\t\treturn this.getConnection() != null;\n\t}", "public boolean isConnected() {\n return connectionSocket.isConnected();\n }", "public boolean isConnected() {\n if (client == null) {\n return false;\n }\n return client.isConnected();\n }", "public boolean isConnected() {\n\t\treturn sock != null;\n\t}", "public Boolean getConnected() { return this.connected; }", "public boolean isConnecting() {\n if (mState == STATE_CONNECTING) {\n return true;\n }\n return false;\n }", "boolean supportsConnects();", "public boolean isConnected() {\n return (this.bluetoothSocket != null);\n }", "public boolean isConnected() {\n return (this.session != null && this.session.isConnected());\n }", "public boolean isConnected() {\n PublishSubscriber<T> c = state.current;\n return c.connected && !c.done && !c.isDisposed();\n }", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "protected synchronized boolean checkConnectivity() {\n return this.connect();\n }", "public boolean isConnected() {\n\t\treturn isCreated() && mqttClient.isConnected();\n\t}", "public boolean isConnected() {\n\t\t\treturn (m_soundManager instanceof RemoteSoundManager);\n\t\t}", "@Override\n public void testIfConnected() {\n }", "boolean hasDisconnect();", "public boolean isConnected() {\n \tContext context = this.getApplicationContext();\n \t/** Create, if not exists, the preference GraviolaMOB. */\n SharedPreferences settings = context.getSharedPreferences(\"GraviolaMOB\", MODE_PRIVATE);\n /** Check the preference connectivity and return false if is not set. */\n return settings.getBoolean(\"connectivity\", false);\n }", "public boolean isConnected() {\n\t\tfinal String METHOD = \"isConnected\";\n\t\tboolean connected = false;\n\t\tif (mqttAsyncClient != null) {\n\t\t\tconnected = mqttAsyncClient.isConnected();\n\t\t} else if (mqttClient != null) {\n\t\t\tconnected = mqttClient.isConnected();\n\t\t}\n\t\tLoggerUtility.log(Level.FINEST, CLASS_NAME, METHOD, \"Connected(\" + connected + \")\");\n\t\treturn connected;\n\t}", "public boolean isConnected() {\n boolean status = false;\n try {\n status = connection != null && !connection.isClosed();\n } catch (SQLException ex) {\n LOGGER.log(Level.SEVERE, \"Unable to check connection status: {0}\", ex);\n }\n\n return status;\n }", "private boolean isConnected() {\n if (mStarted && mClient != null && !mClient.isConnected()) {\n Log.e(LOG_TAG, \"MQTT Client not connected.\");\n if (DEBUG) {\n\tLog.e(LOG_TAG, \"isConnected[mStarted:\" + mStarted + \", mClient:\" + mClient + \"]\");\n }\n }\n\n return mClient != null && (mStarted && mClient.isConnected());\n }", "public boolean isConnected() {\n return (chord != null);\n }", "private Boolean isConnected() {\r\n ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\r\n Boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\r\n return isConnected;\r\n }", "public boolean isConnecting() {\n PublishSubscriber<T> c = state.current;\n return c.connecting && !c.connected && !c.done && !c.isDisposed();\n }", "public boolean isConnected(){\r\n return (id!=-1 && matlabEng!=null); \r\n }", "public boolean isConnectedToRemoteDevice() {\n return mConnectionManager.isConnected();\n }", "public boolean isConnected() {\n return metricDB.isConnected();\n }", "public boolean connectionActive() {\n\t\tif (socketConnection == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn socketConnection.isConnected();\n\t\t}\n\t}", "@Override\r\n public boolean reconnect()\r\n {\n return state.isConnected();\r\n }", "public boolean isConnected() {\n ConnectivityManager manager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo info = manager.getActiveNetworkInfo();\n if (info != null && info.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "boolean hasAvailableConnection();", "private void updateConnectedState() {\n NetworkInfo activeNetworkInfo = this.mConnectivityManager.getActiveNetworkInfo();\n this.mIsNetworkConnected = activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean CheckConnected() {\n return (tcp.Status() == TCP._CONNECTED);\n }", "public boolean isNetworkConnected() {\n NetworkInfo networkInfo = this.mNetInfo;\n return networkInfo != null && networkInfo.isConnectedOrConnecting();\n }", "private void checkConnection(){\n NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();\n\n // if activeNetwork is not null, and a network connection is detected,\n // isConnected is true\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n // prepare output to indicate connection status\n String message = isConnected ? \"Connection Detected!\" : \"No Connection Detected!\";\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public Boolean connected() {\n return this.connected;\n }", "public boolean isConnected() {\n\t\treturn juraMqttClient != null && juraMqttClient.isConnected();\n\t}", "@Override\n public boolean isConnected()\n {\n // hacky, but should work\n return motor.getFirmwareString() != null;\n }", "public boolean isConnectable(){\n\t\tif((System.currentTimeMillis() - this.lastTry) > retryBackoff){\n\t\t\tthis.lastTry = System.currentTimeMillis();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "void connected();", "public boolean ConnectionCheck(){\n ConnectivityManager cm =\n (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n return isConnected;\n }" ]
[ "0.90619093", "0.90619093", "0.90619093", "0.90619093", "0.90619093", "0.89359653", "0.89359653", "0.89359653", "0.89359653", "0.89359653", "0.89359653", "0.89359653", "0.89359653", "0.8900192", "0.8371113", "0.8337778", "0.83101916", "0.8289558", "0.82398", "0.8233209", "0.8214118", "0.8206405", "0.81773746", "0.81655097", "0.8165214", "0.8158757", "0.81430215", "0.8134716", "0.8134716", "0.81193006", "0.8099147", "0.8096606", "0.80831194", "0.806317", "0.8052619", "0.8044295", "0.80243635", "0.80202836", "0.80047655", "0.80047655", "0.79917806", "0.7984448", "0.798172", "0.798172", "0.7974923", "0.7974923", "0.7974923", "0.7974923", "0.7974923", "0.7966123", "0.79360986", "0.79282653", "0.7905412", "0.78923935", "0.78691286", "0.78531563", "0.7840323", "0.78336865", "0.7831672", "0.7787882", "0.77663904", "0.7764856", "0.772402", "0.77126974", "0.7700245", "0.768976", "0.7641857", "0.7632311", "0.7555052", "0.7546499", "0.7546499", "0.7542921", "0.75175047", "0.75090784", "0.74771905", "0.74573654", "0.74541044", "0.7452369", "0.74424875", "0.744029", "0.74091566", "0.7406202", "0.73697007", "0.73682874", "0.73430824", "0.73419714", "0.7341127", "0.7311292", "0.73104674", "0.72916245", "0.7286858", "0.7266868", "0.72636145", "0.72606224", "0.7225848", "0.72235507", "0.72075933", "0.718661", "0.7186314", "0.7165522" ]
0.7750974
62
Genera evento di notifica
private synchronized void notifyAlert(Event ObjEvent,String StrMessage) { // Variabili locali List<WireRecord> ObjWireRecords; Map<String, TypedValue<?>> ObjWireValues; // Manda il messaggio in log con il giusto livello di severity switch (ObjEvent) { case DATA_EVENT: return; case CONNECT_EVENT: logger.info(StrMessage); break; case DISCONNECT_EVENT: logger.warn(StrMessage); break; case WARNING_EVENT: logger.warn(StrMessage); break; case ERROR_EVENT: logger.error(StrMessage); break; } // Se la notifica dell'alert non Ŕ disabilitata emette wire record if (this.actualConfiguration.Alerting) { // Prepara le proprietÓ dell'evento ObjWireValues = new HashMap<>(); ObjWireValues.put("id", TypedValues.newStringValue(this.actualConfiguration.DeviceId)); ObjWireValues.put("host", TypedValues.newStringValue(this.actualConfiguration.Host)); ObjWireValues.put("port", TypedValues.newIntegerValue(this.actualConfiguration.Port)); ObjWireValues.put("eventId", TypedValues.newIntegerValue(ObjEvent.id)); ObjWireValues.put("event", TypedValues.newStringValue(ObjEvent.description)); // Se si tratta di alert di warning o di errore if ((ObjEvent==Event.WARNING_EVENT)||(ObjEvent==Event.ERROR_EVENT)) { ObjWireValues.put("message", TypedValues.newStringValue(StrMessage)); } // Se c'Ŕ un enrichment per gli alert lo aggiunge if (this.actualConfiguration.AlertEnrichment.size()>0) { ObjWireValues.putAll(this.actualConfiguration.AlertEnrichment); } ObjWireRecords = new ArrayList<>(); ObjWireRecords.add(new WireRecord(ObjWireValues)); // Notifica evento this.wireSupport.emit(ObjWireRecords); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "private void createEvents() {\n\t}", "BasicEvents createBasicEvents();", "public void crear_un_evento_recurrente_para_el_dia_de_hoy() {\n\t\t\n\t}", "private UIEvent generateModifyEvent(){\n List<DataAttribut> dataAttributeList = new ArrayList<>();\n for(int i = 0; i< attributModel.size(); i++){\n String attribut = attributModel.elementAt(i);\n dataAttributeList.add(new DataAttribut(attribut));\n }\n //Erstellen des geänderten Produktdatums und des Events\n DataProduktDatum proposal = new DataProduktDatum(name.getText(), new DataId(id.getText()), dataAttributeList, verweise.getText());\n UIModifyProduktDatumEvent modifyEvent = new UIModifyProduktDatumEvent(dataId, proposal);\n return modifyEvent;\n }", "private void createNotification(FoodEvents event) {\n Context context = getBaseContext();\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_launcher).setContentTitle(event.getTitle())\n .setContentText(event.getDescription());\n Intent resultIntent = new Intent(this, EventDetails.class);\n resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n resultIntent.putExtra(EventDetails.EXTRA_EVENT, event);\n PendingIntent resultPendingIntent = PendingIntent.getActivity(getBaseContext(), 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT, null);\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(MESSAGE_NOTIFICATION_ID, mBuilder.build());\n notifyMyWatch(event);\n }", "@Override\n\tpublic void handleEvent(Event event) {\n\t\t\n\t\tSystem.out.println(\"NOMBRE EVENTO RECIBIDO : \" + event.getProperty(\"TITLE\"));\n\t\tSystem.out.println(\"RECIBIDO EVENTO \"+event.getTopic() + \"en tiempo = \" + event.getProperty(\"TIME\")+\"\");\n\t\tSystem.out.println(\"PROPERTIES LUZ = \"+ event.getProperty(\"LUZ\") +\"\");\n\t\tString luz = (String) event.getProperty(\"LUZ\");\n\t\tSystem.out.println(\"MI STRING DE LUZ VALOR =\"+ luz);\n\t\t\n\t\tboolean favs_recibidos_emisor_evento = false;\n\t\t\n\t\tif(luz.equals(\"true\")){\n\t\t\tfavs_recibidos_emisor_evento = true;\n\t\t}else if(luz.equals(\"false\")){\n\t\t favs_recibidos_emisor_evento = false;\n\t\t}else{\n\t\t\tSystem.out.println(\"VALOR RARO EN LUZ PROPERTIES ¿?¿???¿??¿?¿?¿?\");\n\t\t}\n\t\t\n\t//favs_recibidos_emisor_evento = (boolean) event.getProperty(\"LUZ\");\n\n\t\tif(favs_recibidos_emisor_evento == true){\n\t\t\tSystem.out.println(\"Se recibio el evento con LUZ = TRUE\");\n\t\t\t\n\t\t\t//LED ,, LED.ENCENDER\n\t\t\tLeds tuiter_on = new Leds();\n\t\t\t//azul 59 131 189\n\t\t\ttuiter_on.setColorPlug(59,'r');\n\t\t\ttuiter_on.setColorPlug(131,'g');\n\t\t\ttuiter_on.setColorPlug(189.0,'b');\n\t\t\tdouble rold,gold,bold;\n\t\t\trold = tuiter_on.getColorPLug('r');\n\t\t\tgold = tuiter_on.getColorPLug('g');\n\t\t\tbold = tuiter_on.getColorPLug('b');\n\t\t\tSystem.out.println(\"ENCIENDO LED TUITER ------> AZUL \");\n\t\t\ttuiter_on.EncenderRGB2(0, 59, 131, 189, tuiter_on.getIntensidad());\n\t\t\ttry {\n\t\t\t\tThread.currentThread().sleep(2500);\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\t\t\ttuiter_on.EncenderRGB2(0, rold, gold, bold, tuiter_on.getIntensidad());\n\n\n\n\t\t}else if(favs_recibidos_emisor_evento == false){\n\t\t\tSystem.out.println(\" SE HA RECIBIDO EL EVENTO CON LUZ = FALSE , NO CAMBIOS\");\n\t\t}else{\n\t\t\tSystem.out.println(\" SE HA RECIBIDO EL EVENTO CON LUZ = ¿?¿?¿? --> EXCEPCION \");\n\t\t}\n\t\t\n\t}", "public interface Notice extends Event\n\t{\n\t\tpublic static final String TOPIC_ID = \"aether.notice.topic.id\";\n\t}", "public void notificar(String event) {\n\t\toutPoint.notificar(event);\n\t}", "public void MostrarNotificacion(Boolean estado, int cancelar){\n //hora del evento\n long hora = System.currentTimeMillis();\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID);\n builder.setSmallIcon(R.drawable.ic_launcher_background);\n builder.setContentTitle(\"Titulo\");\n builder.setContentText(\"Cuerpo\");\n builder.setWhen(hora);\n builder.setPriority(NotificationCompat.PRIORITY_DEFAULT);\n\n //para poner la notificacion permanente\n builder.setOngoing(estado);\n\n //construir la notificacion\n NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(getApplicationContext());\n notificationManagerCompat.notify(NOTIFICACION_ID, builder.build());\n\n //para quitar la notificacion\n notificationManagerCompat.cancel(cancelar);\n\n\n\n }", "public void TopDreiEvent();", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "public String getEventName();", "public void consulterEvent() {\n\t\t\n\t}", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusActivo());\n\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}", "public interface RehaTPEventListener extends EventListener {\npublic void rehaTPEventOccurred(RehaTPEvent evt );\n/*public void RehaTPEventOccurred(TerminFenster evt );\npublic void RehaTPEventOccurred(Container evt );\npublic void RehaTPEventOccurred(Object evt );\npublic void RehaTPEventOccurred(SystemLookAndFeel evt );\n*/\n}", "public void generateRandomEvents();", "public interface ISemanticEventListener {\n\n\t/**\n\t * Notifies this listener that a semantic event has happened.\n\t * @param event - the semantic event\n\t */\n\tvoid notify(IUISemanticEvent event);\n \n\t////////////////////////////////////////////////////////////////////////////\n\t//\n\t// Meta events\n\t//\n\t////////////////////////////////////////////////////////////////////////////\n\n\t//TODO: maybe these meta-notifications should not have there own methods?\n\t\n /**\n * Notifies this listener that event recording has started.\n */\n void notifyStart();\n \n /**\n * Notifies this listener that event recording has stopped.\n */\n void notifyStop();\n\n /**\n * Notifies this listener that the event stream is to be written.\n */\n void notifyWrite();\n \n /**\n * Notifies this listener that root display has been disposed (effectively, recording is terminated).\n */ \n void notifyDispose();\n\n\t/**\n\t * Notifies this listener that the event stream is to be flushed and restarted.\n\t */\n\tvoid notifyRestart();\n\n\t/**\n\t * Notifies this listener that the event stream is to be paused.\n\t */\n\tvoid notifyPause();\n\t\n\t/**\n\t * Notifies this listener that an error occured during recording.\n\t * @param event - the error event\n\t */\n\tvoid notifyError(RecorderErrorEvent event);\n\n\t/**\n\t * Notifies this listener that a trace event was sent during recording.\n\t * @param event - the trace event\n\t */\n\tvoid notifyTrace(RecorderTraceEvent event);\n\n\t/**\n\t * Notifies this listener that a hook added vent was sent during recording.\n\t * @param hookName \n\t */\n\tvoid notifyAssertionHookAdded(String hookName);\n\t\n\t/**\n\t * Notifies that Recorder Controller was started and listens on specific port \n\t * @param port the port number that this controller started listen on\n\t */\n\tpublic void notifyControllerStart(int port);\n\t\n\t/**\n\t * Notifies this listener that Display instance was not found in the application process\n\t */\n\tpublic void notifyDisplayNotFound();\n\n\t/**\n\t * Notifies the listener that spy mode has been toggled.\n\t */\n\tvoid notifySpyModeToggle();\n}", "@Override\n\tpublic void ActOnNotification(String message) {\n\t \tSystem.out.println(\"Sending Event\");\n\t}", "public Notifica(){}", "public void SimAdded(AddSimEvento event);", "void onHisNotify();", "@EventName(\"targetCreated\")\n EventListener onTargetCreated(EventHandler<TargetCreated> eventListener);", "private void createEvents() {\n\t\tbtnRetour.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t\tDashboard_Preteur dashboard_Preteur = new Dashboard_Preteur(currentPreteur);\r\n\t\t\t\tdashboard_Preteur.setVisible(true);\r\n\t\t\t\tdashboard_Preteur.setResizable(false);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "void templateNotify(TeampleAlarmMessage message);", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "public abstract interface ObjectDetailSettingsListener\n extends EventListener\n{\n public static final Topic<ObjectDetailSettingsListener> TOPIC = Topic.create(\"Object Detail Settings\", ObjectDetailSettingsListener.class);\n\n public abstract void displayDetailsChanged();\n}", "Event () {\n // Nothing to do here.\n }", "@EventName(\"targetInfoChanged\")\n EventListener onTargetInfoChanged(EventHandler<TargetInfoChanged> eventListener);", "public void onDocumentoSubidoEventListener(DocumentoSubidoEvent event){}", "public void operationsEventNotification(OperationsEvent oe) throws RemoteException;", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "java.lang.String getEventType();", "private void generateNotification(int type , Geofence current) {\n\t\t\n\t\tLog.i(\"LOC TRAN \" , \" \" + type + \" \" + current.getRequestId());\n }", "@Override\r\n\tpublic void startNewEvent(int t) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tthis.newEvent(\"Ernest\", \"action\", t);\r\n\t}", "private void notifyAutomatically(){\n System.out.println(\"Notificando automaticamente...\");\n }", "void onNewEvent(Event event);", "private void createEvents() {\n\t\taddBtn.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbuildOutput();\n\t\t\t}\n\t\t});\n\t}", "@KafkaListener(topics = TW_SERVICE_TEMPLATE_EXAMPLE_TOPIC, containerFactory = EXAMPLE_CUSTOM_LISTENER)\n public void process(TemplateEvent event) {\n log.info(event.toString());\n }", "private void noti1(){\n\t\t/*Contenido de notificacion*/\n\t\tNotification notificacion = new Notification( \n R.drawable.metrans_logo,\n \"Metrans inicializando... Bienvenido\",\n System.currentTimeMillis() );\n\t\t/*Fin de contenido de la notificacion*/\n\t\tPendingIntent intencionPendiente = PendingIntent.getActivity(\n\t\t this, 0, new Intent(this, MainActivity.class), 0);\n\t\tnotificacion.setLatestEventInfo(this, \"Somos tan chingones\",\n\t\t \"que tenemos notificaciones aqui\", intencionPendiente);\n\t\n\t\t nm1.notify(ID_NOTIFICACION_CREAR, notificacion); //Enviamos la notificacion al status bar\n\t\tnotificacion.defaults |= Notification.DEFAULT_VIBRATE; //Agregando algo de vibracion... Espero y funcione\n\t\t\n\t}", "@Override\n\t\tprotected void onEvent(DivRepEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void N2O_TEMP_ObjectEvent(Interface.N2O_TEMP_ObjectEvent e, String data) {\n\t\t\n\t}", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public Event createNotify(Address resource, String event);", "public interface Notification {\n /**\n * Method to generate and draw notification message\n * @param task it's task for notification message\n */\n void notifyMessage(Task task);\n}", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "public Evento getEvento() { \n\t\t Evento evento = new Evento();\n\t\t List<Prenda> Lprendas = new ArrayList<Prenda>();\n\t\t Sugerencia sug = new Sugerencia();\n\t Prenda prend = new Prenda();\n Categoria categoria = new Categoria();\n\n categoria.setCodCategoria(1);\n categoria.setDescripcion(\"Zapatillas\");\n TipoPrenda tp = new TipoPrenda();\n tp.setDescripcion(\"lalal\");\n tp.setCategoria(categoria);\n tp.setCodTipoPrenda(1);\n \n \n Guardarropa guard = new Guardarropa();\n guard.setCompartido(false);\n guard.setDescripcion(\"guardarropa\");\n guard.setId(0); \n prend.setGuardarropa(guard);\n prend.setColorPrimario(\"rojo\");\n prend.setTipoPrenda(tp);\n prend.setColorSecundario(\"azul\");\n prend.setDescripcion(\"prenda 1\");\n prend.setNumeroDeCapa(EnumCapa.Primera);\n \tfor( int i = 0 ; i <= 4; i++) {\n prend.setCodPrenda(i);\n\t\t\tLprendas.add(prend);\t\t\t\n\t\t}\n \tsug.setIdSugerencia(1);\n \tsug.setMaxCapaInferior(0);\n \tsug.setMaxCapaSuperior(2);\t\n \tsug.setUsuario(new Usuario());\n \tsug.setListaPrendasSugeridas(Lprendas);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n\n \t return evento;\n\t }", "private void mostrarNotificacion(String title, String body)\r\n {\r\n Intent intent = new Intent(this, MainActivity.class);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);\r\n\r\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\r\n .setSmallIcon(R.mipmap.ic_launcher)\r\n .setContentTitle(title)\r\n .setContentText(body)\r\n .setAutoCancel(true)\r\n .setSound(soundUri)\r\n .setContentIntent(pendingIntent);\r\n\r\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\r\n notificationManager.notify(0/*ID de l notificación*/, notificationBuilder.build());\r\n }", "@Override\r\n\tpublic void Update() {\n\t\tSystem.out.println(name+\",¹Ø±ÕNBA£¬¼ÌÐø¹¤×÷£¡\"+abstractNotify.getAction());\r\n\t}", "String getEventType();", "@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}", "Event getEvent();", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "@Override\n public void onEvent(EMNotifierEvent event) {\n\n }", "@Override\n public void onCustomEvent(CustomEvent customEvent) {\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.737 -0400\", hash_original_method = \"92AD08E60042E3A3AB4EAFAA413A4446\", hash_generated_method = \"98747B73D26BF7E8C67C5D40BBA28F1C\")\n \npublic static String signalPoll() {\n return doStringCommand(\"SIGNAL_POLL\");\n }", "EventType getEvent();", "private void addEvents() {\n\t mlv.getMapNotesOverlay().addEventListener(new NoteSelectedListener()\n {\n\t \t\n\t\t\t@Override\n\t\t\tpublic void handleNoteSelectedEvent(EventObject e, Group gr) {\n\t\t\t\t//We have to go to gallery because the user has select a (groups) note\n\t\t\t\tselectedGroup = gr;\n\t\t\t\tonClick(mlv);\n\t\t\t}\n \t\n });\t\t\t\t\n\t\t\n\t}", "@Override\r\n public void notifyEvent(ControllerEvent event) {\n \r\n }", "public void notificate() {\nSystem.out.println(\"Comman for all\");\r\n\t}", "public void setEventName(String name);", "private void handleActionNotificaFertilizzante(Intent input) {\n Intent intent = new Intent(this, DettagliPiantaUtente.class).setAction(ACTION_NOTIFICA_FERTILIZZANTE);\n intent.putExtras(input);\n intent.putExtra(\"fromNotificationService\", true);\n long[] pattern = {0, 300, 0};\n PendingIntent pi = PendingIntent.getActivity(this, idPossesso, intent, 0);\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.fmn_logo)\n .setContentTitle(\"Concima \" + nomeAssegnato)\n .setContentText(\"La tua pianta ha bisogno di essere concimata!\")\n .setVibrate(pattern)\n .setAutoCancel(true);\n\n mBuilder.setContentIntent(pi);\n mBuilder.setDefaults(Notification.DEFAULT_SOUND);\n NotificationManager mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(idPossesso, mBuilder.build());\n }", "public interface MarkHotProductListener {\n\n public void setMarkHotProduct(int posi,String isHot);\n}", "@Override\n public void notify(Object event){\n }", "public static void buildDemoNotification(Context context) {\n int eventId = 0;\n String eventTitle = \"Demo title\";\n String eventLocation = \"Mountain View\";\n\n int notificationId = 001;\n // Build intent for notification content\n Intent viewIntent = new Intent(context, ViewEventActivity.class);\n viewIntent.putExtra(EXTRA_EVENT_ID, eventId);\n PendingIntent viewPendingIntent =\n PendingIntent.getActivity(context, 0, viewIntent, 0);\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(context)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(eventTitle)\n .setContentText(eventLocation)\n .setContentIntent(viewPendingIntent);\n\n // Get an instance of the NotificationManager service\n NotificationManagerCompat notificationManager =\n NotificationManagerCompat.from(context);\n\n // Build the notification and issues it with notification manager.\n notificationManager.notify(notificationId, notificationBuilder.build());\n }", "public AutoEvents() {\n super();\n _autoEventList = new ArrayList();\n }", "public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}", "private void handleActionNotificaAcqua(Intent input) {\n Intent intent = new Intent(this, DettagliPiantaUtente.class).setAction(ACTION_NOTIFICA_ACQUA);\n intent.putExtras(input);\n intent.putExtra(\"fromNotificationService\", true);\n Log.v(TAG, \"nomi: \" + intent.getStringExtra(DettagliPiantaUtente.NOME_ASSEGNATO) + \", \" + intent.getStringExtra(DettagliPiantaUtente.NOME_GENERALE) + \", \" +\n \"id: \" + intent.getIntExtra(DettagliPiantaUtente.ID, -1));\n long[] pattern = {0, 300, 0};\n //PendingIntent pi = PendingIntent.getActivity(this, idPossesso, intent, 0);\n\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n // Adds the back stack\n stackBuilder.addParentStack(DettagliPiantaUtente.class);\n // Adds the Intent to the top of the stack\n stackBuilder.addNextIntent(intent);\n // Gets a PendingIntent containing the entire back stack\n PendingIntent pi =\n stackBuilder.getPendingIntent(idPossesso, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.fmn_logo)\n .setContentTitle(\"Innaffia \" + nomeAssegnato)\n .setContentText(\"La tua pianta ha bisogno di essere innaffiata!\")\n .setVibrate(pattern)\n .setAutoCancel(true);\n\n mBuilder.setContentIntent(pi);\n mBuilder.setDefaults(Notification.DEFAULT_SOUND);\n NotificationManager mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);\n mNotificationManager.notify(idPossesso, mBuilder.build());\n }", "@Override\n public void definitionListItem(SinkEventAttributes attributes)\n {\n }", "@Override\n public void title(SinkEventAttributes attributes)\n {\n }", "private static void generateNotification(Context context, Bundle bundle) {\n\t\tint icon = R.drawable.icon;\n\t\tlong when = System.currentTimeMillis();\n\t\tString message = bundle.getString(\"message\");\n\t\tNotificationManager notificationManager = (NotificationManager) context\n\t\t\t\t.getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tNotification notification = new Notification(icon, message, when);\n\t\tString title = context.getString(R.string.app_name);\n\t\tIntent notificationIntent = new Intent(context, NetasDemoActivity.class);\n\n\t\tnotificationIntent.putExtras(bundle);\n\n\t\t// set intent so it does not start a new activity\n\t\tnotificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP\n\t\t\t\t| Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tPendingIntent intent = PendingIntent.getActivity(context, 0,\n\t\t\t\tnotificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\t\tnotification.defaults |= Notification.DEFAULT_SOUND\n\t\t\t\t| notification.DEFAULT_LIGHTS | notification.DEFAULT_VIBRATE;\n\t\t// long[] vibrate = {0,100,200,300};\n\t\t// notification.vibrate = vibrate;\n\t\tnotification.setLatestEventInfo(context, title, message, intent);\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL\n\t\t\t\t| Notification.FLAG_SHOW_LIGHTS;\n\t\tnotification.ledOnMS = 1000; // light on in milliseconds\n\t\tnotification.ledOffMS = 4000; // light off in milliseconds\n\t\tnotificationManager.notify(0, notification);\n\t}", "public void showTriggered();", "@Override\n public void onTangoEvent(TangoEvent event) {\n }", "@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusInactivo());\n\t\t//\t\t\t\tEL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\tif (sTransaccion.validarAnalistaEnRequerimientos(analista)){\n//\t\t\t\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusInactivo());\n//\t\t\t\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n//\t\t\t\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n//\t\t\t\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n//\t\t\t\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n//\t\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\t\telse\n//\t\t\t\t\t\t\t\t\t\t\tmostrarMensaje(\"Informacion\", \"No se Puede eliminar el analista, esta asignado a un requerimiento que esta activo\", Messagebox.EXCLAMATION, null, null, null);\n//\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "EventUse createEventUse();", "BasicEvent createBasicEvent();", "@Override\n protected void initializeEventList()\n {\n }", "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "void addEventPowerUp(DefaultPowerUp powerUp);", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "protected abstract void event(String type, long entity1, long entity2,\n long entity3, boolean added);", "public interface ChoosableEvent extends Event{\n\n void chooseAnswer(String answer, String username);\n}", "private void sendEvent(Map<String, String> info, String eventType) {\n ServiceReference ref = bundleContext.getServiceReference(EventAdmin.class.getName());\n if (ref != null) {\n EventAdmin eventAdmin = (EventAdmin) bundleContext.getService(ref);\n\n Dictionary<String, Object> properties = new Hashtable<>();\n properties.put(Constants.DISCOVERY_EVENT_TYPE, eventType);\n properties.put(Constants.DISCOVERY_INFO, info);\n\n Event reportGeneratedEvent = new Event(Constants.DISCOVERY_EVENT, properties);\n\n eventAdmin.sendEvent(reportGeneratedEvent);\n\n }\n\n }", "@Override\n protected void initEventAndData() {\n }", "public void notifyJoueurActif();", "@Override\r\n\tpublic void implementEvent() {\r\n\r\n\t\t//currently the only option because FAMILY_CONTACTS won't become ContactEvents.\r\n\t\t//FAMILY_CONTACTS will stay inside AgentEvents.\r\n\t\tif (info.contactType == ContactType.RANDOM_CONTACT) {\r\n\t\t\tplace.locals().contact(personToContact, info);\r\n\t\t} else {\r\n\t\t\tthrow new RuntimeException(\"currently OffNodeContactEvents should be RANDOM_CONTACTS\");\r\n\t\t}\r\n\t}", "private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "Message buidMessage(CommandEvent event);", "public static void main(String[] args) {\n IEventoDAO eventoDAO = DAOFactory.getInstance().getEventoDAO();\r\n EventoTO eventoReceptor = new EventoTO(\"Nuevo evento\", \"Nueva descripcion\");\r\n\r\n boolean respuesta = eventoDAO.crearEvento(eventoReceptor);\r\n if(respuesta){\r\n System.out.println(\"Evento creado\");\r\n }\r\n else{\r\n System.out.println(\"Evento no creado\");\r\n }\r\n \r\n \r\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "void onEvent (ZyniEvent event, Object ... params);", "StartEvent createStartEvent();" ]
[ "0.68658334", "0.65037996", "0.62535566", "0.62172556", "0.6209054", "0.61416477", "0.59602135", "0.5953649", "0.5951951", "0.59467846", "0.59289235", "0.5906532", "0.58600956", "0.5846872", "0.5845612", "0.57944447", "0.57770115", "0.5771619", "0.5734962", "0.5733557", "0.57164556", "0.5707589", "0.5696594", "0.56927824", "0.5689032", "0.56586844", "0.56241083", "0.5622991", "0.562266", "0.56188965", "0.56117463", "0.5611452", "0.5609334", "0.559929", "0.5595498", "0.5579027", "0.5571927", "0.5568727", "0.5561309", "0.5560882", "0.5554209", "0.5540798", "0.55344385", "0.55299187", "0.5528854", "0.5523926", "0.55138934", "0.5512338", "0.5512338", "0.55021703", "0.55020946", "0.5490973", "0.54879016", "0.54879016", "0.54778343", "0.54771316", "0.54595524", "0.54578435", "0.5448409", "0.54479706", "0.544459", "0.5438996", "0.5436885", "0.54312503", "0.5429402", "0.5421835", "0.54157394", "0.5413343", "0.5412653", "0.5408893", "0.5406527", "0.54030406", "0.5398962", "0.53965026", "0.539522", "0.5392987", "0.53824085", "0.53816384", "0.5381511", "0.53802675", "0.5376678", "0.5374085", "0.5373239", "0.53718007", "0.53662723", "0.5366069", "0.5347529", "0.5345903", "0.534123", "0.5340176", "0.533734", "0.53358024", "0.53346235", "0.53310806", "0.53269315", "0.5324856", "0.5321986", "0.53199583", "0.5319184", "0.5316631", "0.5316538" ]
0.0
-1
/////////////////////////////////////////////////// TIMER CALLBACK ///////////////////////////////////////////////////
@Override public void run() { // Inizializza nome thread Thread.currentThread().setName("Timer"); // Richiama procedura di gestione aggiornamento configurazione update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TimerStatus onTimer();", "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }", "Timer getTimer();", "public void onTimerEvent();", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "void startUpdateTimer();", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "public static void initTimer(){\r\n\t\ttimer = new Timer();\r\n\t timer.scheduleAtFixedRate(new TimerTask() {\r\n\t public void run() {\r\n\t \t//se o player coletar todas os lixos, o tempo para\r\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }\r\n\t\t}, 1000, 1000);\r\n\t}", "public void timer() {\r\n date.setTime(System.currentTimeMillis());\r\n calendarG.setTime(date);\r\n hours = calendarG.get(Calendar.HOUR_OF_DAY);\r\n minutes = calendarG.get(Calendar.MINUTE);\r\n seconds = calendarG.get(Calendar.SECOND);\r\n //Gdx.app.debug(\"Clock\", hours + \":\" + minutes + \":\" + seconds);\r\n\r\n buffTimer();\r\n dayNightCycle(false);\r\n }", "private void initTimer(){\r\n\t\ttimer = new Timer() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t};\r\n\t}", "protected void timer_tick(ActionEvent e) {\n\t\thour = time / 3600;\r\n\t\tminute = time % 3600 / 60;\r\n\t\tsecond = time % 3600 % 60;\r\n\t\tlblCountDown.setText(\"剩余时间:\" + stringTime(hour) + \":\" + stringTime(minute) + \":\" + stringTime(second));\r\n\t\tif (time == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t\ttimeOut();\r\n\t\t}\r\n\t\ttime--;\r\n\t}", "Timer(int tempTotalTime) {\n totalTime = tempTotalTime;\n }", "private static void timerTest3() {\n\t\tTimer timer = new Timer();\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(\"timertest3\");\n\n\t\t\t}\n\t\t}, 2000, 1000);\n\n\t}", "public void countTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t}", "private static void timerTest1() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(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(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}\n\t\t}, 2000);\n\n\t}", "public abstract void startInitTimer();", "public void run()\r\n {\n \tm_Handler.sendEmptyMessage(JMSG_TIMER);\r\n }", "private void startTime()\n {\n timer.start();\n }", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "@Override\n public void run() {\n if (timerValidFlag)\n gSeconds++;\n Message message = new Message();\n message.what = 1;\n handler.sendMessage(message);\n }", "private static void timerTest2() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(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\tif (count < 5) {\n\t\t\t\t\tSystem.out.println(\"timertest2\" + \" \" + ++count);\n\t\t\t\t} else {\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 2000, 1000);\n\n\t}", "public void timerCallBack() {\r\n\t\tif (!ConfigManager.IS_MUSIC) {\r\n\t\t\tmusicBtn.setCurrentTileIndex(1);\r\n\t\t}\r\n\t\tif (!ConfigManager.IS_SOUND) {\r\n\t\t\tsoundBtn.setCurrentTileIndex(1);\r\n\t\t}\r\n\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (bgSettingSpr.isVisible()) {\r\n\t\t\tif (isSetting) {\r\n\t\t\t\tif (!musicBtn.isVisible()) {\r\n\t\t\t\t\tshowSettingButton(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tbgSettingSpr.setVisible(false);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tbgSettingSpr.setVisible(false);\r\n\t\t\tsettingBtn.setCurrentTileIndex(0);\r\n\r\n\t\t\tif (musicBtn.isVisible()) {\r\n\t\t\t\tshowSettingButton(false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public Timer getOverallTimer();", "@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 }", "public void timer()\n {\n if(exists == true)\n { \n if(counter < 500) \n { \n counter++; \n } \n else \n { \n Greenfoot.setWorld(new Test()); \n exists = false; \n } \n } \n }", "public void timer()\n {\n timer += .1; \n }", "private void runTimer() {\n\n // Handler\n final Handler handler = new Handler();\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n if (playingTimeRunning) {\n playingSecs++;\n }\n\n handler.postDelayed(this, 1000);\n }\n });\n\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}", "private String doTimers(int i, String[] args)\r\n {\n return null;\r\n }", "public void setTimer() {\n\t\t\n\t}", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "@Override\r\n public void timePassed() {\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "public void tick()\r\n\t{\r\n\t\tduration = (int) (((Sys.getTime() - lastCall) * resolution) / Sys\r\n\t\t\t\t.getTimerResolution());\r\n\t\tlastCall = Sys.getTime();\r\n\t}", "private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_TIME));\n \t}", "public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}", "@Override\r\n\tprotected void initEvent() {\n\t\ttimer = new Timer(1000, new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttimer_tick(e);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "@Override // se crea una clase anonima donde se implementa el metodo run porque Timer task implementa la interfaz runnable\r\n public void run() {\r\n System.out.println(\"Tarea realizada en: \" + new Date() + \" nombre del Thread: \"\r\n + Thread.currentThread().getName()); //retorna el nombre del hilo actual\r\n System.out.println(\"Finaliza el tiempo\");\r\n timer.cancel(); // termina este timer descartando cualquier tarea programada actual\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest3\");\n\n\t\t\t}", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "void update(int seconds);", "public void timer()\n{\n textSize(13);\n controlP5.getController(\"time\").setValue(runtimes);\n line(400, 748, 1192, 748);\n fill(255,0,0);\n for (int i =0; i<25; i++)\n {\n line(400+i*33, 743, 400+i*33, 753);\n text(i, 395 +i*33, 768);\n }\n if ((runtimes < 1 || runtimes > 28800) && s == true)\n {\n //origint = 0;\n runtimes = 1;\n //pausets = 0;\n runtimep = 0;\n } else if (runtimes > 0 && runtimes < 28800 && s == true)\n {\n runtimep = runtimes;\n runtimes = runtimes + speed;\n }\n timeh= runtimes/1200;\n timem= (runtimes%1200)/20;\n}", "public void start() {timer.start();}", "protected abstract ACATimer receiveAt(Port p_, Object evt_, double time_);", "public void act() \n {\n updateTimerDisplay();\n if(timeCounter < 3600){\n timeCounter++;\n \n }else{\n timeElapsed++;\n timeCounter = 0;\n }\n checkHighScore();\n checkRegScore();\n\n }", "private void incrementShutdownTimer() {\t\r\n\t\tshutdownTime = Calendar.getInstance();\r\n\t\tshutdownTime.add(Calendar.SECOND, TIMEOUT_SECONDS);\r\n\t}", "protected void processTimer(){\n if(timer != null){\n timer.cancel();\n timer = null;\n }\n // Verificamos si el partido esta en progreso\n if(match.status == Match.STATUS_PENDING || match.status == Match.STATUS_ENDED){\n return;\n }\n // Creamos temporizador 90 * 60 * 1000 = 5.400.000\n timer = new CountDownTimer(5400000, 1000) {\n @Override\n public void onTick(long l) {\n // Calcular los segundos que pasaron\n long seconds = (new Date().getTime() - matchDayLong) / 1000;\n // Calcular los minutos del partido\n long minutes = seconds / 60;\n //long minutes = TimeUnit.MILLISECONDS.toMinutes(uptime);\n if(minutes < 0){\n minutes = 0;\n seconds = 0;\n statusMedium.setText(\"PT\");\n }if(minutes > 45 && minutes < 60){\n minutes = 45;\n seconds = 60;\n }else if(minutes > 90){\n minutes = 90;\n seconds = 60;\n statusMedium.setText(\"ST\");\n }else if(minutes >= 60){\n minutes -= 15;\n statusMedium.setText(\"ST\");\n }else{\n statusMedium.setText(\"PT\");\n }\n\n statusTime.setText(String.format(\"%02d:%02d\", minutes, (seconds%60)));\n }\n\n @Override\n public void onFinish() {\n\n }\n }.start();\n }", "public void timePassed(double dt) {\n\n }", "public void timePassed(double dt) {\n\n }", "private float resetTimer() {\r\n final float COUNTDOWNTIME = 10;\r\n return COUNTDOWNTIME;\r\n }", "long getTimerPref();", "RampDownTimer getRampDownTimer();", "@Override\n public void timePassed() {\n }", "public void updateTimerDisplay(){\n int seconds = timeCounter / 60;\n setImage(new GreenfootImage(\"Time: \"+timeElapsed + \": \" + seconds, 24, Color.BLACK, Color.WHITE));\n }", "private void TimerMethod() {\n this.runOnUiThread(Timer_Tick);\n }", "public void timePassed() {\r\n\r\n }", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "public void timePassed() {\r\n }", "public void timePassed() {\r\n }", "@Test\n public void testInc(){\n CountDownTimer s1 = new CountDownTimer(1, 49, 30);\n \tfor(int i = 0; i < 15000; i++){\n \t\ts1.inc();\n }\n assertEquals(s1.toString(), \"5:59:30\");\n }", "private void countTime()\n {\n time--;\n showTime();\n if (time == 0)\n {\n showEndMessage();\n Greenfoot.stop();\n }\n }", "public void timePassed() { }", "@Override\n\tpublic void run() {\n\n\t\tint loop = 0;\n\n\t\tdo {\n\t\t\tthis.onCallTeam.setCountTimer(loop);\n\t\t\tloop++;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t\tSystem.out.println(\"Interrupted\");\n\t\t\t}\n\t\t} while (loop != 900);// 15 minutes\n\n\t}", "protected abstract ACATimer receive(Port p_, Object evt_, double duration_);", "public void makeTimer(){\n\t\n\t\tframeIndex = 0;\n\t\n\t\t//Create a new interpolator\n\t\tInterpolator lint = new Interpolator();\n\t\n\t\t//interpolate between all of the key frames in the list to fill the array\n\t\tframes = lint.makeFrames(keyFrameList);\n\t\n\t\t//timer delay is set in milliseconds, so 1000/fps gives delay per frame\n\t\tint delay = 1000/fps; \n\t\n\t\n\t\tActionListener taskPerformer = new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tif(frameIndex == frames.length){ frameIndex = 0;}\n\n\t\t\t\tframes[frameIndex].display();\n\t\t\t\tframes[frameIndex].clearDisplay();\n\t\t\t\tframeIndex++;\n\t\t\t}\n\t\t};\n\n\t\ttimer = new Timer(delay, taskPerformer);\t\n\t}", "public void startCount() {\n //meetodi k�ivitamisel nullime tunnid, minutid, sekundid:\n secondsPassed = 0;\n minutePassed = 0;\n hoursPassed = 0;\n if (task != null)\n return;\n task = new TimerTask() {\n @Override\n public void run() {//aeg l�ks!\n secondsPassed++; //loeme sekundid\n if (secondsPassed == 60) {//kui on l�binud 60 sek, nullime muutujat\n secondsPassed = 0;\n minutePassed++;//kui on l�binud 60 sek, suurendame minutid 1 v�rra\n }\n if (minutePassed == 60) {//kui on l�binud 60 min, nullime muutujat\n minutePassed = 0;\n hoursPassed++;//kui on l�binud 60 min, suurendame tunnid 1 v�rra\n }\n //kirjutame aeg �les\n String seconds = Integer.toString(secondsPassed);\n String minutes = Integer.toString(minutePassed);\n String hours = Integer.toString(hoursPassed);\n\n if (secondsPassed <= 9) {\n //kuni 10 kirjutame 0 ette\n seconds = \"0\" + Integer.toString(secondsPassed);\n }\n if (minutePassed <= 9) {\n //kuni 10 kirjutame 0 ette\n minutes = \"0\" + Integer.toString(minutePassed);\n }\n if (hoursPassed <= 9) {\n //kuni 10 kirjutame null ettte\n hours = \"0\" + Integer.toString(hoursPassed);\n }\n\n\n time = (hours + \":\" + minutes + \":\" + seconds);//aeg formaadis 00:00:00\n getTime();//edastame aeg meetodile getTime\n\n }\n\n };\n myTimer.scheduleAtFixedRate(task, 0, 1000);//timer k�ivitub kohe ja t��tab sekundite t�psusega\n\n }", "private void printTimer(){\n\t\tFrame++;\n\t\tif(isFrame()){\n\t\t\tSystem.out.println(Frame + \" updates/frames in the \" + second + \"th second\");\n\t\t\tsecond++;\n\t\t\tFrame=1;\n\t\t}\n\t}", "public void timePassed(double dt) {\r\n // Currently- nothing\r\n }", "private void runTimer(GameData gameData) {\r\n countdown -= gameData.getDelta();\r\n }", "void hp_counter()\n {\n T=new Timer();\n T.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //decrement the HP by delay of a second\n if(hp_value>0) {\n redball.setText(hp_value + \"\");\n hp_value--;\n }\n //you have lost and the game will reset\n else if(hp_value<=0)\n {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(lost);\n toast.show();\n //\n resetValues();\n }\n }\n });\n }\n }, 1000, 1000);\n\n }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tThread.sleep(this.timerTime);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.timerFinished = true;\n\t}", "public TimerDisplay()\n {\n timeElapsed = 0;\n }", "public void clock(double period);", "protected abstract ACATimer sendAt(Port p_, Object evt_, double time_);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest4\");\n\n\t\t\t}", "private void onPingingTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n try\r\n {\r\n myConnectionManipulatorLock.lock();\r\n try\r\n {\r\n // Send the ping message.\r\n myUnderlyingOutputChannel.sendMessage(myPreserializedPingMessage);\r\n\r\n // Schedule the next ping.\r\n myPingingTimer.change(myPingFrequency);\r\n }\r\n finally\r\n {\r\n myConnectionManipulatorLock.unlock();\r\n }\r\n }\r\n catch (Exception err)\r\n {\r\n // The sending of the ping message failed - the connection is broken.\r\n cleanAfterConnection(true, true);\r\n }\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }", "public void run() {\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttimer_tick(e);\r\n\t\t\t}", "public void startMiniTimer() {\n long millisInFuture = 10000;\r\n long countDownInterval = 1000;\r\n phaseTwoTimer = new CountDownTimer(millisInFuture, countDownInterval) {\r\n public void onTick(long millisUntilFinished) {\r\n long millis = millisUntilFinished;\r\n\r\n // notifications for time\r\n if (millis <= 10000 && millis > 9001) {\r\n Toast.makeText(getActivity(), \"10\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 9000 && millis >= 8001) {\r\n Toast.makeText(getActivity(), \"9\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 8000 && millis >= 7001) {\r\n Toast.makeText(getActivity(), \"8\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 7000 && millis >= 6001) {\r\n Toast.makeText(getActivity(), \"7\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 6000 && millis >= 5001) {\r\n Toast.makeText(getActivity(), \"6\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 5000 && millis >= 4001) {\r\n Toast.makeText(getActivity(), \"5\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 4000 && millis >= 3001) {\r\n Toast.makeText(getActivity(), \"4\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 3000 && millis >= 2001) {\r\n Toast.makeText(getActivity(), \"3\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 2000 && millis >= 1001) {\r\n Toast.makeText(getActivity(), \"2\", Toast.LENGTH_LONG).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"1\", Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n\r\n public void onFinish() {\r\n Toast.makeText(getActivity(), \"PHASE 2\", Toast.LENGTH_LONG).show(); // entering phase 2\r\n phase = 2;\r\n initTimer(rootView);\r\n drawNewBoards();\r\n }\r\n }.start();\r\n }", "public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n updatePlayerHealthUI();\n }\n }, delay, period);\n }", "public static double ParaTimer(){\n return (System.nanoTime() - timer)/(1000000000.);\n }", "public void updateTimer() {\n this.machineCounter.setTimerValue(Config.MACHINE_TIMER);\n }", "public void clockChange(int time);", "@Override\r\n public void run() {\n d2++;\r\n if (d2 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP2_EXPIRE});\r\n }\r\n }", "@Override\r\n public void update(long timePassed) {\n\r\n }", "public void actionPerformed(ActionEvent e) {\n PerformTimerTask();\n }", "static void loopcomp () {\r\n\t\tint t40k= timer(8000,40000); \r\n\t\tint t1k= timer(8000,1000); \r\n\t\tSystem.out.println(\"Total number of loops for printing every 40k loops = \" + t40k);\r\n\t\tSystem.out.println(\"Total number of loops for printing every 1k loops = \"+ t1k);\r\n\t}", "public abstract void startLoadTimer();", "public void timeChanged( int newTime );", "void stopUpdateTimer();", "@Override\r\n public void run() {\n d1++;\r\n if (d1 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP1_EXPIRE});\r\n }\r\n if (d1 == 10) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP1_EXPIRE_N});\r\n }\r\n }", "public void timePassed() {\n }", "public void timePassed() {\n }", "public void drawTimer(Graphics art)\n\t{\n\t\tcounter++;\n\t\tif(counter % 60 == 0)\n\t\t{\n\t\t\tseconds++;\n\t\t}\n\t\tart.drawString(\"Time =\"+seconds, 50, 120);\n\t}", "@Override\r\n public void run() {\n d7++;\r\n if (d7 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP7_EXPIRE});\r\n }\r\n }", "private void updateTime() {\n timer.update();\n frametime = timer.getTimePerFrame();\n }", "void updateIdleTime(int T);" ]
[ "0.7435775", "0.7309502", "0.71939075", "0.7185545", "0.71830195", "0.7156643", "0.6916592", "0.6899537", "0.67578566", "0.67310953", "0.67248315", "0.6672487", "0.665966", "0.6654921", "0.66350853", "0.6572843", "0.6571679", "0.65641797", "0.6551256", "0.65399414", "0.6526466", "0.6517087", "0.6504368", "0.64944583", "0.6487514", "0.64837193", "0.64807093", "0.6479938", "0.6478262", "0.6466797", "0.6454865", "0.64437675", "0.6439433", "0.64370424", "0.64370424", "0.64338416", "0.6433316", "0.6431878", "0.643049", "0.6421583", "0.6421133", "0.6416443", "0.64159095", "0.64016855", "0.64014894", "0.6398927", "0.63878375", "0.638224", "0.6371699", "0.6366723", "0.63664484", "0.63664484", "0.63539326", "0.6344923", "0.63353914", "0.6329833", "0.63026214", "0.62954426", "0.6285577", "0.62790775", "0.62745047", "0.62745047", "0.62735987", "0.62711716", "0.6268316", "0.62628806", "0.62582505", "0.624256", "0.6237388", "0.6237029", "0.62335265", "0.62218165", "0.6214958", "0.62120247", "0.62092173", "0.6200618", "0.61983776", "0.61963105", "0.6194994", "0.61847585", "0.6170251", "0.61675245", "0.61619073", "0.61591136", "0.6155857", "0.6149868", "0.614264", "0.6138372", "0.6129674", "0.6125234", "0.6121416", "0.61149323", "0.6114667", "0.61143947", "0.6103674", "0.6103674", "0.6099477", "0.60947376", "0.60680276", "0.6067359" ]
0.6090843
98
/////////////////////////////////////////////////// J60870 CALLBACK ///////////////////////////////////////////////////
@Override public void newASdu(ASdu ObjASDU) { // Inizializza nome thread Thread.currentThread().setName("Receiver"); // Variabili locali int IntIOA; boolean BolIOA; List<WireRecord> ObjWireRecords; InformationObject[] ObjInformationObjects; Map<String, TypedValue<?>> ObjWireValues; Map<String, TypedValue<?>> ObjCommonValues; // Esegue logging logger.info("Received ASDU [tcp://"+this.actualConfiguration.Host+":"+this.actualConfiguration.Port+"]"); // Acquisisce puntatore agli information object ObjInformationObjects = ObjASDU.getInformationObjects(); // Se l'ASDU non contiene oggetti genera warning ed esce if ((ObjInformationObjects==null)||(ObjInformationObjects.length==0)) { notifyAlert(Event.WARNING_EVENT,"Received ASDU cannot be decoded. Reason: empty"); return; } // Prepara le proprietÓ di testata dell'ASDU condivise da tutti gli information objects ObjCommonValues = new HashMap<>(); ObjCommonValues.put("id", TypedValues.newStringValue(this.actualConfiguration.DeviceId)); ObjCommonValues.put("host", TypedValues.newStringValue(this.actualConfiguration.Host)); ObjCommonValues.put("port", TypedValues.newIntegerValue(this.actualConfiguration.Port)); ObjCommonValues.put("eventId", TypedValues.newIntegerValue(Event.DATA_EVENT.id)); ObjCommonValues.put("event", TypedValues.newStringValue(Event.DATA_EVENT.description)); ObjCommonValues.put("type", TypedValues.newStringValue(ObjASDU.getTypeIdentification().name())); ObjCommonValues.put("test", TypedValues.newStringValue(ObjASDU.isTestFrame()?("y"):("n"))); ObjCommonValues.put("cot", TypedValues.newStringValue(ObjASDU.getCauseOfTransmission().name())); ObjCommonValues.put("oa", TypedValues.newIntegerValue(ObjASDU.getOriginatorAddress())); ObjCommonValues.put("ca", TypedValues.newIntegerValue(ObjASDU.getCommonAddress())); // Crea un wirerecord per ciascun oggetto ObjWireRecords = new ArrayList<>(); // Ciclo di scansione di tutti gli information object for (InformationObject ObjInformationObject : ObjInformationObjects) { // Aggiorna lo IOA condiviso da tutti gli information element IntIOA = ObjInformationObject.getInformationObjectAddress(); // Verifica se lo IOA Ŕ matchato da una regola di enrichment BolIOA = this.actualConfiguration.MatchingEnrichment.containsKey(IntIOA); // Se l'IOA non matcha ed Ŕ attivo il filtro sull'enrichment esegue, altrimenti procede if (!BolIOA&&this.actualConfiguration.Filtering) { // Esegue logging logger.debug("Discarded ASDU [tcp://"+this.actualConfiguration.Host+":"+this.actualConfiguration.Port+"/IOA="+String.valueOf(IntIOA)+"]"); } else { // Inizializza un nuovo wirerecord con le proprietÓ comuni ObjWireValues = new HashMap<>(); ObjWireValues.putAll(ObjCommonValues); ObjWireValues.put("ioa", TypedValues.newIntegerValue(IntIOA)); // Se l'IOA matcha con regola di enrichment aggiunge metriche, altrimenti aggiunge quelle di default if (BolIOA) { ObjWireValues.putAll(this.actualConfiguration.MatchingEnrichment.get(IntIOA)); } else if (this.actualConfiguration.DefaultEnrichment.size()>0) { ObjWireValues.putAll(this.actualConfiguration.DefaultEnrichment); } // Ciclo di scansione di tutti gli information element for (InformationElement[] ObjInformationElementSet : ObjInformationObject.getInformationElements()) { // Decodifica l'information element in base al tipo di ASDU e aggiunge record alla lista try { Iec104Decoder.decode(ObjASDU.getTypeIdentification(), ObjInformationElementSet, ObjWireValues); ObjWireRecords.add(new WireRecord(ObjWireValues)); } catch (Exception e) { notifyAlert(Event.WARNING_EVENT,"Received ASDU cannot be decoded. Reason: "+e.getMessage()); } } } } // Se ci sono record da trasmettere procede if (ObjWireRecords.size()>0) { this.wireSupport.emit(ObjWireRecords); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void callback() {\n }", "@Override\n\tpublic void onCallback() {\n\t\t\n\t}", "public void callback();", "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "@Override\n\tpublic void callback() {\n\t}", "protected void javaCallback() {\n\t}", "public void mo55177a() {\n this.f1456a.onSuccess();\n }", "int callback(int num_msg, Pointer msg, Pointer resp, Pointer _ptr);", "void processCallback (ZyniMsg msg);", "boolean callback(Pointer hWnd, Pointer arg);", "@Override\n\t\t\t\t\t\t\tpublic void callback(HBCIPassport passport, int reason, String msg,\n\t\t\t\t\t\t\t\t\tint datatype, StringBuffer retData) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "void onCallback(String gekozenWoord);", "public void mo42330e() {\n this.f36205a.onComplete();\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void callback(int position) {\n\n\t\t\t\t\t\t\t\t\t}", "public void mo42329d() {\n this.f36205a.onComplete();\n }", "public void mo1533b() {\n C2201w.m8373a(\"Photo TransferData success!\", 1);\n }", "public void\t\tnotifyUCallbackListeners();", "public void mo1531a() {\n C2201w.m8373a(\"Photo TransferData start!\", 1);\n }", "@Override\n public void onCallBack(int pos) {\n }", "public void mo6081a() {\n }", "void onVadCallback(int result);", "public void mo21781F() {\n }", "public void\t\tnotifyUCallbackListener(URBIEvent event);", "void mo3194r();", "public void mo29010a() {\n if (this.f19137e != null && !mo29013c() && getCallback() != null) {\n this.f19137e.start();\n }\n }", "void mo60893b();", "void mo88524c();", "@Override\n public void onSuccess(Object msg) {\n LogUtil.log(\"游戏初始化成功=\"+msg);\n\n if(msg!=null){\n isInit =true;\n activateCallback();\n }\n\n\n\n\n }", "void mo57278c();", "@Override\n public void onSuccess() {\n if (callback != null) {\n callback.run();\n }\n }", "@Override\n public void onSuccess() {\n if (callback != null) {\n callback.run();\n }\n }", "void m8368b();", "@Override\n\t\t\t\t\tpublic void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n\t\t\t\t\t\tLog.i(\"tag\", \"onComplete\"+arg2.toString());\t\n\t\t\t\t\t\tLog.i(\"tag\", \"onComplete\");\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void onSuccess(String result, int callbackflag) {\n\n\t}", "void mo21070b();", "void mo21072c();", "public void\t\tnotifyUCallbackListener(URBIEvent event)\n\t{\n\t\tUCallbackListener listener=null;\n\t\ttry {\n\t\t\tlistener = (UCallbackListener)tab.get(event.getTag());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t\tif (listener != null)\n\t\t\t{\n\t\t\t\tlistener.actionPerformed(event);\n\t\t\t}\n\t\telse if (event.getTimestamp() != 0)\n\t\t\tSystem.out.println(\"[\" + event.getTimestamp() + \":\" + event.getTag() + \"] \" + event.getCmd());\n\t}", "public abstract void callback(Instruction instruction);", "public void onCompletion(Runnable callback)\n/* */ {\n/* 158 */ this.completionCallback = callback;\n/* */ }", "@Override\n\t\t\t\t\tpublic void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mo10681a() {\n if (MultiPhotoFrameMainActivity.this._handler != null) {\n MultiPhotoFrameMainActivity.this._handler.post(new Runnable() {\n public void run() {\n C2331d.m10114a((Activity) MultiPhotoFrameMainActivity.this, C2328a.WAIT_PROCESSING, (Bundle) null);\n }\n });\n }\n }", "public synchronized void m29983k() {\n if (this.f23294u.isEmpty()) {\n if (this.f23286B == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (this.f23286B.f23372f == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeat \");\n }\n m29967a(-1, this.f23286B);\n if ((f23266a > 0 && f23266a % 3 == 0) || f23266a == 2) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7056i.m30212h(C6973b.m29776f());\n }\n });\n }\n }\n m29985m();\n C6860a.m29257b(C6973b.m29776f());\n C7059f.m30231a(C6973b.m29776f()).mo34155a();\n m29980i();\n if (XGPushConfig.isLocationEnable(C6973b.m29776f())) {\n if (f23264F == 0) {\n f23264F = C7055h.m30167a(C6973b.m29776f(), Constants.LOC_REPORT_TIME, 0);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23264F == 0 || Math.abs(currentTimeMillis - f23264F) > ((long) f23281p)) {\n final JSONObject reportLocationJson = CustomDeviceInfos.getReportLocationJson(C6973b.m29776f());\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7046a.m30130b(C6973b.m29776f(), \"location\", reportLocationJson);\n }\n });\n f23264F = currentTimeMillis;\n C7055h.m30171b(C6973b.m29776f(), Constants.LOC_REPORT_TIME, currentTimeMillis);\n }\n }\n }", "void mo67924c();", "@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}", "void mo72113b();", "void mo12638c();", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }", "@Override\n\tpublic void messageBusErrorCallback() {\n\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\n\t\t\t\t\t}", "public interface GpsBandCallBack extends ISyncDataCallback {\n\n public void onGetGpsInfo(GpsSummaryInfo info);\n public void onEphemerisProgressQurey(int progress, String file_name);\n public void onEphemerisProgressReset();\n public void onEphemerisUpdateSuccess();\n public void onCrcCheckResult(int status);\n// public String getEphemerisFilePath();\n\n\n}", "public interface FlightTrackingCallbackHandler extends Remote {\n\n /*\n * Callback cuando el vuelo fue asignado a una pista\n */\n void onRunwayAssignment(final String flightId, final String destination, final String runway, final long flightsAhead)\n throws RemoteException;\n\n /*\n * Callback cuando el vuelo cambió su posicion en la cola de espera de la pista\n */\n void onQueuePositionUpdate(final String flightId, final String destination, final String runway, final long flightsAhead)\n throws RemoteException;\n\n /*\n * Callback cuando el vuelo despego\n */\n void onDeparture(final String flightId, final String destination, final String runway)\n throws RemoteException;\n\n /*\n * Callback para eliminar el handler de callbacks\n */\n void endProcess()\n throws RemoteException;\n}", "void mo80457c();", "public void mo115190b() {\n }", "public CallbackHandler() {\r\n // TODO Auto-generated constructor stub\r\n }", "@Override\n\t\tpublic void onFinish() {\n\t\t}", "public final void mo33861a() {\n try {\n ((C1996s) this.f375e.f403e.mo34152b()).mo34232b(this.f375e.f401c, C1795ar.m336c(this.f371a, this.f372b), C1795ar.m341e(), (C1998u) new C1792ao(this.f375e, this.f373c, this.f371a, this.f372b, this.f374d));\n } catch (RemoteException e) {\n C1795ar.f399a.mo34140a((Throwable) e, \"notifyModuleCompleted\", new Object[0]);\n }\n }", "public void onSuccess(Boolean arg0) {\n\t\t\t\t\t\tMessageBox.info(\"Hotovo\",\"plán v době svátků odebrán\",null);\n\t\t\t\t\t}", "public void endCallback(){\n inProgress = false;\n desInit();\n }", "private void m33489a() {\n Action<String> aVar = f26277a;\n if (aVar != null) {\n aVar.mo21403a(this.f26281e);\n }\n f26277a = null;\n f26278b = null;\n finish();\n }", "@Override\n\tpublic void callback(Object o) {}", "@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\n\t\t\t\t\t\t\t\t\t\t}", "private void eventhandler() {\n\r\n\t}", "public static abstract interface M0_callbackPtr {\n\n public abstract int handler();\n }", "public interface ExecuteScriptCallback extends CallbackBase {\n\n /**\n * Override this method with the code you want to run after executing script service\n *\n * @param data Result to script\n * @param e NCMBException from NIFTY Cloud mobile backend\n */\n void done(byte[] data, NCMBException e);\n}", "public void mo10682b() {\n if (MultiPhotoFrameMainActivity.this._handler != null) {\n MultiPhotoFrameMainActivity.this._handler.post(new Runnable() {\n public void run() {\n C2331d.m10100a((Activity) MultiPhotoFrameMainActivity.this);\n C2331d.m10114a((Activity) MultiPhotoFrameMainActivity.this, C2328a.SaveCompleteDlg, (Bundle) null);\n }\n });\n }\n }", "public void mo8811a() {\n C3720a.this._cameraUtil.mo6032a((Runnable) new Runnable() {\n public void run() {\n C2331d.m10114a((Activity) C3720a.this, C2328a.ON_PROGRESS, (Bundle) null);\n }\n });\n }", "void mo80455b();", "public native void initNativeCallback();", "public void mo21785J() {\n }", "void mo72114c();", "private void onOK() {\n OKDisposalProcess();\n }", "public abstract void callback(VixHandle handle, int eventType, \n\t\tVixHandle moreEventInfo, Object clientData);", "public void m1172c(MDResultCallback mDResultCallback) {\n if (mDResultCallback == null) {\n C3490e3.m666f(\"Missing listener, however, method will run regardless\");\n }\n }", "void mo7353b();", "@Override\n\t\tpublic void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n\t\t\tLog.i(\"tag\", \"onComplete\");\n\t\t\t\n\t\t\t\n\t\t}", "void mo7441d(C0933b bVar);", "EventCallbackHandler getCallbackHandler();", "public void mo21791P() {\n }", "void mo119582b();", "public void mo7206b() {\n this.f2975f.mo7325a();\n }", "public interface UHFCallbackLiatener {\n void refreshSettingCallBack(ReaderSetting readerSetting);\n void onInventoryTagCallBack(RXInventoryTag tag);\n void onInventoryTagEndCallBack(RXInventoryTag.RXInventoryTagEnd tagEnd);\n void onOperationTagCallBack(RXOperationTag tag);\n}", "void onComplete();", "@Override\r\n public void onFinish() {\n }", "@Override\n public void onSuccess(Void aVoid) {\n }", "@Override\n public void onSuccess(Void aVoid) {\n }", "@Override\n public void onSuccess(Void aVoid) {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "public void a(final IUmengInAppMessageCallback iUmengInAppMessageCallback) {\n c();\n com.umeng.message.common.d.a(new Runnable() {\n public void run() {\n UInAppMessage uInAppMessage;\n UMLog.mutlInfo(d.f81246a, 2, \"get splash message begin\");\n try {\n JSONObject sendRequest = JUtrack.sendRequest(d.this.b(), MsgConstant.SPLASH_MSG_ENDPOINT);\n if (sendRequest != null && TextUtils.equals(sendRequest.getString(\"success\"), \"ok\")) {\n UMLog.mutlInfo(d.f81246a, 2, \"get splash message success\" + sendRequest);\n JSONObject jSONObject = sendRequest.getJSONObject(\"data\");\n InAppMessageManager.f81177b = jSONObject.getInt(\"pduration\") * PushConstants.PUSHSERVICE_INFO_SENDMESSAGE_BY_NOTIFICATIONSERVICE;\n InAppMessageManager.f81178c = jSONObject.getInt(\"sduration\") * PushConstants.PUSHSERVICE_INFO_SENDMESSAGE_BY_NOTIFICATIONSERVICE;\n iUmengInAppMessageCallback.onSplashMessage(new UInAppMessage(jSONObject.getJSONObject(\"launch\")));\n InAppMessageManager.getInstance(d.this.f81249b).c();\n } else if (sendRequest == null || !TextUtils.equals(sendRequest.getString(\"success\"), \"fail\") || !TextUtils.equals(sendRequest.getString(\"error\"), \"no message\")) {\n iUmengInAppMessageCallback.onSplashMessage(null);\n } else {\n String e2 = InAppMessageManager.getInstance(d.this.f81249b).e();\n if (!TextUtils.isEmpty(e2)) {\n try {\n uInAppMessage = new UInAppMessage(new JSONObject(e2));\n } catch (JSONException unused) {\n uInAppMessage = null;\n }\n if (uInAppMessage != null) {\n InAppMessageManager.getInstance(d.this.f81249b).a(new File(h.d(d.this.f81249b, uInAppMessage.msg_id)));\n InAppMessageManager.getInstance(d.this.f81249b).a((UInAppMessage) null);\n }\n }\n }\n } catch (Exception unused2) {\n iUmengInAppMessageCallback.onSplashMessage(null);\n }\n }\n });\n }" ]
[ "0.6881214", "0.67587626", "0.67220986", "0.6628263", "0.66062975", "0.65874976", "0.6455183", "0.6215186", "0.61600816", "0.60870755", "0.60352623", "0.59904087", "0.5988581", "0.59775496", "0.59447825", "0.59412813", "0.58529836", "0.5848295", "0.58174247", "0.58123463", "0.5811382", "0.57872003", "0.57852054", "0.5775591", "0.57742155", "0.5770252", "0.57432044", "0.57097673", "0.57062006", "0.56947327", "0.56947327", "0.56905544", "0.56886953", "0.5685542", "0.56787515", "0.56774545", "0.567594", "0.5669486", "0.56671435", "0.5665034", "0.5648869", "0.56465805", "0.5646176", "0.5645316", "0.5644104", "0.5643147", "0.56361395", "0.56361395", "0.56330484", "0.563271", "0.5620741", "0.5616039", "0.5608014", "0.5591644", "0.5590382", "0.5586948", "0.55703545", "0.556644", "0.55519164", "0.5551909", "0.55498296", "0.55483305", "0.55463517", "0.5545916", "0.55450445", "0.5542929", "0.5536558", "0.55313915", "0.55286616", "0.55273414", "0.55166686", "0.55156785", "0.55153966", "0.5509558", "0.55088764", "0.54996765", "0.54995763", "0.5496047", "0.54959154", "0.5494155", "0.5491084", "0.548361", "0.5482782", "0.5482695", "0.54786795", "0.5471646", "0.5471646", "0.5471646", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5468734", "0.5466218" ]
0.0
-1
/ Song Default Constructor Sideeffects: Assigns some default ensemble, title and and year of your choosing ASSIGNMENT: Create the first Song constructor
Song() { mEnsemble = ensemble; mTitle = "Strawberry Fields"; mYearReleased = 1969; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Song(String t, String alb, String art, String y){\n title = t;\n album = alb;\n artist = art;\n year = y; \n }", "public Song(String name, String artist, String album, String year) {\n this.name = name;\n this.artist = artist;\n this.album = album;\n this.year = year;\n }", "public Song(\n String title,\n String artist,\n String year,\n String genre,\n double heardPercentCS,\n double heardPercentMath,\n double heardPercentEng,\n double heardPercentOther,\n double heardPercentSE,\n double heardPercentNE,\n double heardPercentUS,\n double heardPercentOut,\n double heardPercentMusic,\n double heardPercentSports,\n double heardPercentReading,\n double heardPercentArt,\n double likePercentCS,\n double likePercentMath,\n double likePercentEng,\n double likePercentOther,\n double likePercentSE,\n double likePercentNE,\n double likePercentUS,\n double likePercentOut,\n double likePercentMusic,\n double likePercentSports,\n double likePercentReading,\n double likePercentArt) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n this.heardPercentCS = heardPercentCS;\n this.heardPercentMath = heardPercentMath;\n this.heardPercentEng = heardPercentEng;\n this.heardPercentOther = heardPercentOther;\n this.heardPercentSE = heardPercentSE;\n this.heardPercentNE = heardPercentNE;\n this.heardPercentUS = heardPercentUS;\n this.heardPercentOut = heardPercentOut;\n this.heardPercentMusic = heardPercentMusic;\n this.heardPercentSports = heardPercentSports;\n this.heardPercentReading = heardPercentReading;\n this.heardPercentArt = heardPercentArt;\n this.likePercentCS = likePercentCS;\n this.likePercentMath = likePercentMath;\n this.likePercentEng = likePercentEng;\n this.likePercentOther = likePercentOther;\n this.likePercentSE = likePercentSE;\n this.likePercentNE = likePercentNE;\n this.likePercentUS = likePercentUS;\n this.likePercentOut = likePercentOut;\n this.likePercentMusic = likePercentMusic;\n this.likePercentSports = likePercentSports;\n this.likePercentReading = likePercentReading;\n this.likePercentArt = likePercentArt;\n }", "public Song() {}", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "Song(Ensemble pEnsemble, String pTitle) {\n\t\tthis.mEnsemble = pEnsemble;\n\t\tthis.mTitle = pTitle;\n\t\tmYearReleased = 0;\n\t}", "public Song(String title, String artist, String year, String genre) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n heardPercentCS = 0.;\n heardPercentMath = 0.;\n heardPercentEng = 0.;\n heardPercentOther = 0.;\n heardPercentSE = 0.;\n heardPercentNE = 0.;\n heardPercentUS = 0.;\n heardPercentOut = 0.;\n heardPercentMusic = 0.;\n heardPercentSports = 0.;\n heardPercentReading = 0.;\n heardPercentArt = 0.;\n }", "public Songs() {\n }", "public Song(String artist, String title) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = 0;\r\n\t\tthis.seconds = 0;\r\n\t}", "public Publication(String title, int year)\n {\n // this is the constructor that iniates the variables \n name = title;\n yr = year;\n }", "public Media(String title, String year){\n\t\tthis.title = title;\n\t\tthis.year = year;\n\t}", "public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }", "public SoundTrack(String title, String artist, String language){\n this.artist = artist; // assigns passed variable to instance variable\n this.language = language; // assigns passed variable to instance variable\n this.title = title; // assigns passed variable to instance variable\n }", "public SongRecord(){\n\t}", "public Series (String t, String s){\n title = t;\n studio = s;\n rating = \"PG\";\n}", "public CD(String song1, String song2, String song3, String song4, String song5) {\n songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n songs.add(song3);\n songs.add(song4);\n songs.add(song5);\n currentindex = songs.size();\n }", "public Science(String name, String publisher) // a constructor, has name, publisher\r\n\t{\r\n\t\tsuper(name); // calls parent constructor\r\n\t\tthis.publisher = publisher; // stores publisher value in science publisher member\r\n\t}", "public Song(Song s) {\r\n\t\tthis.title = getTitle();\r\n\t\tthis.artist = getArtist();\r\n\t\tthis.minutes = getMinutes();\r\n\t\tthis.seconds = getSeconds();\r\n\t\ts = new Song(this.title, this.artist, this.minutes, this.seconds);\r\n\t}", "public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}", "public SongArray(){\n }", "public Series( String t, String s, String r){\n title = t;\n studio = s;\n rating = r;\n}", "public SeriesModel(String title, int startYear, int endYear) {\n\t\tsuper(title, startYear, endYear);\n\t}", "public Song(String title, String artist, String genre) {\n\t\tthis.setTitle(title);\n\t\tthis.setArtist(artist);\n\t\tthis.setGenre(genre);\n\t}", "public Library(String n, int i) { \r\n super(n);\r\n id = i;\r\n albums = new HashSet<Album>();\r\n\r\n }", "public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}", "public Art() {\n this.artist = \"Michelangelo\";\n this.timePeriod = 1510;\n this.aesthetic = \"High Renaissance\";\n this.size = \"Enormous\";\n }", "public Book(String title, String genre)\n {\n bookTitle = title;\n bookGenre = genre;\n }", "public MyPod()\n {\n color = \"black\";\n memory = 4;\n \n songLibrary[0] = new Song();\n songLibrary[1] = new Song();\n songLibrary[2] = new Song();\n \n \n \n }", "public Playlist(String titel, ArrayList<Nummer> albumNummers) {\n this.titel = titel;\n this.albumNummers = albumNummers;\n this.berekenDuur();\n }", "Book(String t, String a, String g){\n\t\ttitle = t;\n\t\tauthor = a;\n\t\tgenre = g;\n\t\ttags = new ArrayList <String>();\n\t}", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "public Sound(String theSong)\n\t{\n\t\tminim = new Minim(new PApplet());\n\t\tthis.theSong = theSong;\n\t\tcanPlay = true;\n\t\tswitch (theSong)\n\t\t{\n\t\tcase \"SG1\":\n\t\t\tsong = minim.loadFile(\"assets/shotgunCock1.wav\");\n\t\t\tbreak;\n\t\tcase \"SG2\":\n\t\t\tsong = minim.loadFile(\"assets/shotgunCock2.wav\");\n\t\t\tbreak;\n\t\tcase \"ARFire\":\n\t\t\tsong = minim.loadFile(\"assets/M4Fire.mp3\");\n\t\t\tbreak;\n\t\tcase \"click\":\n\t\t\tsong = minim.loadFile(\"assets/gunClick.mp3\");\n\t\t\tbreak;\n\t\tcase \"clipIn\":\n\t\t\tsong = minim.loadFile(\"assets/clipIn.mp3\");\n\t\t\tbreak;\n\t\tcase \"clipOut\":\n\t\t\tsong = minim.loadFile(\"assets/clipOut.mp3\");\n\t\t\tbreak;\n\t\tcase \"chamberOut\":\n\t\t\tsong = minim.loadFile(\"assets/ARChamberOut.mp3\");\n\t\t\tbreak;\n\t\tcase \"chamberIn\":\n\t\t\tsong = minim.loadFile(\"assets/ARChamberIn.mp3\");\n\t\t\tbreak;\t\t\n\t\tcase \"shell\":\n\t\t\tsong = minim.loadFile(\"assets/shellFall.mp3\");\n\t\t\tbreak;\n\t\tcase \"SGFire\":\n\t\t\tsong = minim.loadFile(\"assets/SGBlast.mp3\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsong = null;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public Song(String title, String artistName, String genre, int rating, Time time){\n\t\tthis.title=title;\n\t\tthis.artistName=artistName;\n\t\tthis.genre=genre;\n\t\tthis.rating=rating;\n\t\tthis.time=time;\n\t}", "public Artist(String firstName, String lastName, Date firstRelease) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.firstRelease = firstRelease;\n }", "public Albums(String title, int copiesAvailable, String artist, String songs) {\n\t\tsuper (title, copiesAvailable);\n\t\tthis.artist = artist;\n\t\tthis.songs = songs;\n\t}", "public Playlist(String titel) {\n this.titel = titel;\n }", "private Song(String path) {\n\t\tthis.filepath = path + \"\";\n\t\tAudioFileFormat baseFileFormat;\n\t\tClassLoader classloader = Thread.currentThread().getContextClassLoader();\n\t\tInputStream is = classloader.getResourceAsStream(path);\n\t\ttry {\n\t\t\tbaseFileFormat = new MpegAudioFileReader().getAudioFileFormat(is);\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tMap properties = baseFileFormat.properties();\n\t\t\tlong duration = (long) properties.get(\"duration\");\n\t\t\tthis.length = (int) duration / 1000;\n\t\t\tthis.author = (String) properties.get(\"author\");\n\t\t\tthis.name = (String) properties.get(\"title\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Couldn't read the detailed informations for song:\" + path);\n\t\t}\n\t\tFile tempfile = new File(path);\n\t\tthis.displayname = tempfile.getName();\n\t\tif (this.author != null && !this.author.equals(\"\") && this.name != null && !this.name.equals(\"\"))\n\t\t\tthis.displayname = this.author + \" - \" + this.name;\n\t}", "public MusicModel() {\n this(90000);\n }", "public Song(String artist, String title, int minutes, int seconds) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = minutes;\r\n\t\tthis.seconds = seconds;\r\n\t}", "public AddSong(String title) {\n id = title;\n initComponents();\n }", "public Book(Author[] authors, int copyrightYear, double edition, Genre genre, String title) {\n super(title);\n this.authors = authors;\n this.copyrightYear = copyrightYear;\n this.edition = edition;\n this.genre = genre;\n this.bookID = generateUniqueID();\n this.rackNo = generateRackID();\n }", "public Book () {\n\t\tsuper ();\n\t\t_title = \"\";\n\t\t_text = \"\";\n\t\t_publisher = null;\n\t\t_oid = 0;\n\t\t_author = null;\n\t\t_Isbn = \"\";\n\t}", "public Book(Author[] authors, int copyrightYear, double edition, Genre genre, String title) {\n super(title);\n this.authors = authors;\n this.copyrightYear = copyrightYear;\n this.edition = edition;\n this.genre = genre;\n bookID = generateUniqueID();\n rackNo = generateRackID();\n }", "public MusicPlayer() {\n\t\t// initialize all instance variables\n\t\tplaylist = new BinaryHeapA(new Song[0]);\n\t\tfavoritelist = new BinaryHeapA(new Song[0]);\n\t\tisPlaylist = true;\n\t\tsortOrder = 0;\n\t\tisPlaying = false;\n\t\tcurrentSongIndex = 0;\n\t\trepeat = true;\n\t\tshuffle = false;\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tshuffleSongIndex = -1;\n\t}", "public Song(String pFilePath, String pTitle, String pArtist, String pTime)\t{\n\t\tassert pFilePath != null && pTitle != null && pArtist != null && pTime != null;\n\t\tif (isValidCreate(pFilePath)&&(isValidExtension(pFilePath))) {\n\t\t\taFilePath = pFilePath;\n\t\t\taTitle = pTitle;\n\t\t\taArtist = pArtist;\n\t\t\taTime = pTime;\n\t\t} else {\n\t\t\tthrow new InvalidPathException(pFilePath,\"Song does not exist on the OS\\n\");\n\t\t}\n\t}", "public AlbumSeriesRecord() {\n super(AlbumSeries.ALBUM_SERIES);\n }", "public Sequence(String title) { this(title, new Vector<Step>(), \"\"); }", "public Song(String name, int duration)\r\n\t{\r\n\t\tsetName(name);\r\n\t\tsetDuration(duration);\r\n\t}", "public Playlist(String name){\n this.name = name;\n this.duration = new Time(0, 0);\n this.playSongs = new Song[MAX_SONGS_PLAYLIST];\n \n }", "public Series () {\n super();\n this.price = RandomFill.generateNumber(5,15);\n this.listSeason = RandomFill.generateListSeason();\n }", "public static void main(String[] args) {\n double[] weighs1 = {90,10,0,0,0,0}; \r\n Song S1 = new Song(\"Wonderwall\", \"Oasis\", weighs1); \r\n \r\n double[] weighs2 = {80,10,10,0,0,0}; \r\n Song S2 = new Song(\"Don't look back in anger\", \"Oasis\", weighs2); \r\n \r\n double[] weighs3 = {50,20,10,0,20,0}; \r\n Song S3 = new Song(\"Money\", \"Pink Floyd\", weighs3); \r\n \r\n double[] weighs4 = {30,10,30,30,0,0}; \r\n Song S4 = new Song(\"Catholic girls\", \"Frank Zappa\", weighs4); \r\n \r\n double[] weighs5 = {80,0,20,0,0,0}; \r\n Song S5 = new Song(\"Stairway to heaven\", \"Led Zeppelin\", weighs5); \r\n \r\n double[] weighs6 = {100,0,0,0,0,0}; \r\n Song S6 = new Song(\"Perfect strangers\", \"Deep Purple\", weighs6); \r\n \r\n double[] weighs7 = {10,80,10,0,0,0}; \r\n Song S7 = new Song(\"Purple rain\", \"Prince\", weighs7); \r\n \r\n double[] weighs8 = {100,0,0,0,0,0}; \r\n Song S8 = new Song(\"Back in black\", \"AC DC\", weighs8); \r\n \r\n double[] weighs9 = {0,0,100,0,0,0}; \r\n Song S9 = new Song(\"The thrill is gone\", \"BB King\", weighs9); \r\n \r\n double[] weighs10 = {0,0,60,40,0,0}; \r\n Song S10 = new Song(\"I'd rather go blind\", \"Etta James\", weighs10); \r\n \r\n double[] weighs11 = {40,20,40,0,0,0}; \r\n Song S11 = new Song(\"With or without you\", \"U2\", weighs11); \r\n \r\n double[] weighs12 = {40,10,30,10,10,0}; \r\n Song S12 = new Song(\"Heroes\", \"David Bowie\", weighs12); \r\n \r\n double[] weighs13 = {90,0,10,0,0,0}; \r\n Song S13 = new Song(\"Free bird\", \"Lynyrd Skynyrd\", weighs13); \r\n \r\n double[] weighs14 = {50,30,20,0,0,0}; \r\n Song S14 = new Song(\"Always\", \"Bon Jovi\",weighs14); \r\n \r\n double[] weighs15 = {40,60,0,0,0,0}; \r\n Song S15 = new Song(\"Happy when it rains\", \"The Jesus and Mary Chain\", weighs15); \r\n \r\n Song[] songsadded = {S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15}; //table with songs created\r\n \r\n RadioStation radiostation1 = new RadioStation(songsadded); //create InternetRadio station that includes all songs \r\n System.out.println(\"RadioStation playlist\");\r\n radiostation1.getSimilar(\"Heroes\"); //create song playlist according to Eukleidia distance\r\n \r\n\r\n \r\n \r\n Song[] songsadded1 = {S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15}; //table with songs created\r\n ManhattanRadioStation manhattanradiostation1 = new ManhattanRadioStation(songsadded1); //create ManhattanRadio station that includes all songs\r\n System.out.println(\"Manhattan RadioStation playlist\");\r\n manhattanradiostation1.getSimilar(\"Heroes\"); //create song playlist according to Manhattan distance\r\n\r\n \r\n \r\n \r\n }", "public Album(String albumName, String bandName) { \n\t\ttitle = albumName;\n\t\tband = bandName;\n\t}", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "@Ignore(\"Function written without GUI for JUnit Testing\")\r\n public Song AddSongTest(String SongTitle, String SongArtist, String SongDuration, String SongFile,HashST<String,Song> songs) {\r\n String empty = \"\";\r\n String fileformat = \"([a-zA-Z0-9\\\\s_\\\\\\\\.\\\\-\\\\(\\\\):])+(.avi|.mp4|.mkv|.mov)$\";\r\n\r\n if (SongTitle.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongArtist.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (SongDuration.equalsIgnoreCase(empty)) {\r\n return null;\r\n\r\n } else if ((!intCheck(SongDuration)) || (SongDuration.equalsIgnoreCase(\"0\"))) {\r\n return null;\r\n\r\n } else if (SongFile.equalsIgnoreCase(empty)) {\r\n return null;\r\n } else if (!SongFile.matches(fileformat)) {\r\n return null;\r\n }\r\n\r\n int b = Integer.parseInt(SongDuration);\r\n\r\n if(songs.get(SongTitle.toLowerCase())==null) {\r\n Song addsong = new Song(SongTitle, SongArtist, b, SongFile);\r\n return addsong;\r\n }\r\n else {\r\n return null;\r\n }\r\n\r\n\r\n }", "public Song(String songAddress) {\n\t\t\tthis.songAddress = songAddress;\n\t\t}", "public Songs(String songName, String singer, String singerUrl, String bgimage, String avatar, String keyMp3, String mp3Url, String songUrl, String fileName, int isUserLocal) {\n super();\n this.songName = songName;\n this.singer = singer;\n this.singerUrl = singerUrl;\n this.bgimage = bgimage;\n this.avatar = avatar;\n this.keyMp3 = keyMp3;\n this.mp3Url = mp3Url;\n this.songUrl = songUrl;\n this.fileName = fileName;\n this.isUserLocal = isUserLocal;\n }", "private static Book createFirstBookTest() {\n var book = new Book();\n book.setOriginalPriceNumber(1760);\n book.setDescription(\"52ヘルツのクジラとは―他の鯨が聞き取れない高い周波数で鳴く\");\n book.setCategory(\"トップページ > 本・コミック > 文芸 > 文芸(日本) > 現代小説 \");\n return book;\n }", "public BasicInfoSong(int id, String title) {\n this.id = id;\n this.title = title;\n }", "public MusicCollection(String name,Song... songs)\n {\n this.songs = new ArrayList<Song>();\n for(Song tempSong : songs) {\n if ( !this.songs.contains(tempSong) )\n this.songs.add(tempSong);\n else\n System.out.println(\"this file is already in this collection.\");\n }\n player = new MusicPlayer();\n this.name = name;\n }", "public Film() {\n\t}", "public Artist(String name, Genre mainGenre) {\n this.name = name;\n this.cataloue = new ArrayList<Record>();\n this.mainGenre = mainGenre;\n }", "public Book(String t, String a) {\n\t\ttitle = t;\n\t\tauthor = a;\n\t}", "public Music(String...files){\n musicFiles = new ArrayList<AudioFile>();\n for(String file: files){\n musicFiles.add(new AudioFile(file));\n }\n }", "public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }", "public Album(String album, String bandName, int stock) {\n\t\ttitle = album;\n\t\tband = bandName;\n\t\tnumStocked = stock;\n\t}", "public Playlist()\n\t{\n\t\tthis(\"UNTITLED\");\n\t}", "public PlayList() {\n\t\tthis.name = \"Untitled\";\n\t\tsongList = new ArrayList<Song>();\n\t}", "public void setUp() {\n list = new LinkedList<Song>();\n Song song1 = new Song(\"James\", \"Rock\", 2019, \"three\");\n Song song2 = new Song(\"Jason\", \"Hip-Hop\", 2000, \"one\");\n Song song3 = new Song(\"Hayley\", \"R&B\", 2011, \"two\");\n list.add(song1);\n list.add(song2);\n list.add(song3);\n sorter = new Sorter(list);\n }", "public Film(String title, Date releaseDate, int length){\n this.title = title;\n this.releaseDate = releaseDate;\n this.length = length;\n }", "public Book() {\n\t\t// Default constructor\n\t}", "public Album() {\n }", "public Movie(String name, int year)\n\t{\n\t\tthis.name = name;\n\t\tthis.year = year;\n\t\tpeopleAct = new ArrayList<CastMember>(10);\n\t}", "@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }", "public SeriesModel(String title, LinkedHashMap<String, Episode> episodes) {\n\t\tsuper(title, episodes);\n\t}", "public Book(int book_id, String title, String author, int year, int edition, String publisher, String isbn,\n String cover, String condition, int price, String notes) {\n\tsuper();\n\tthis.book_id = book_id;\n\tthis.title = title;\n\tthis.author = author;\n\tthis.year = year;\n\tthis.edition = edition;\n\tthis.publisher = publisher;\n\tthis.isbn = isbn;\n\tthis.cover = cover;\n\tthis.condition = condition;\n\tthis.price = price;\n\tthis.notes = notes;\n}", "protected Book() {\n this.title = \"Init\";\n this.author = \"Init\";\n this.bookCategories = new HashSet<>(10);\n }", "public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }", "public Publication(\n final String id, final String title, final short publicationYear) {\n super();\n Objects.requireNonNull(id, \"null id\");\n Objects.requireNonNull(title, \"null title\");\n // FIXME test year\n this.id = id;\n this.title = title;\n this.publicationYear = publicationYear;\n authors = new LinkedHashMap<Author, Author>();\n referenceToOther = new HashMap<Publication, Publication>();\n referenceToThis = new HashMap<Publication, Publication>();\n }", "public Library() {\n books = new Book[0];\n numBooks = 0;\n }", "public Movie()\n {\n // initialise instance variables\n name = \"\";\n director = \"\";\n fileSize = 0;\n duration = 0;\n }", "public Source(String name, String description, String story, double mass, \n String itemtype, String itemname, String itemdescription, String itemstory, \n double itemmass, double itemnutrition) \n {\n super(name, description, story, mass);\n this.itemtype = itemtype;\n \n this.itemname = itemname;\n this.itemdescription = itemdescription;\n this.itemstory = itemstory; \n this.itemmass = itemmass;\n this.itemnutrition = itemnutrition;\n \n //creates item of the type itemtype, which is specified upon creation of the source\n if(itemtype.equals(\"Drink\")) {new Drink(itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Food\")) {new Food (itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Item\")) {item = new Item (itemname, itemdescription, itemstory, itemmass);} \n }", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}", "public Library() {\n\t\t//TO-DO\n\t\tchar[] alphabet = {'Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A'};\n\t\t\n\t\tfor (int i = 0; i < alphabet.length; i ++) { \n\t\t\tshelves.addFirst(new ArrayList<Book>(), alphabet[i]);\n\t\t}\n\t\thead = shelves.head;\n\t\t//System.out.print(head);\n\t\t//System.out.print(shelves);\n\t}", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Playlist(ArrayList<Nummer> albumNummers) {\n this.albumNummers = albumNummers;\n }", "public Topic( String title )\n {\n activation = 0;\n label = title;\n associations = new String[100];\n numAssocs = 0;\n response1 = \"\";\n response2 = \"\";\n response3 = \"\";\n probability1 = -1;\n probability2 = -1;\n probability3 = -1;\n generator = new Random();\n }", "public ArbolSplay() {\n super();\n }", "void create(Artist artist);", "public ConcreteYear(int year) {\r\n if (year > 0) {\r\n this.year = year;\r\n }\r\n }", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName,\r\n\t\t\tAttributes attributes) throws SAXException {\n\t\ttagName = localName;\r\n\t\t\r\n\t\tif(tagName.equals(\"song_elt\")){\r\n\t\t\tmp3 = new DownloadMp3Model();//为每一首歌实例化对象\r\n\t\t\ti = 1;\r\n\t\t}\r\n\r\n\t}", "public Sad() {\n }", "public void setUp() {\n burr = new Song(\"Hannibal Burress\", \"rap\", 2018, \"Morpheus Rap\");\n }", "public Movie(String title, int releaseYear, String[] genres) {\n\t\tsuper();\n\t\tthis.title = title;\n\t\tthis.releaseYear = releaseYear;\n\t\tthis.genres = genres;\n\t\tthis.left = this.right = null;\n\t}", "public Track() {\r\n }", "public CD(int id,String name, String singer, int numberOfSongs, double price) {\r\n\t\tsuper();\r\n\t\tthis.id = id;\r\n\t\tthis.name = name;\r\n\t\tthis.singer = singer;\r\n\t\tthis.numberOfSongs = numberOfSongs;\r\n\t\tthis.price = price;\r\n\t}", "public Title()\r\n {\r\n startTag=\"TITLE\";\r\n endTag=\"/TITLE\"; \r\n }", "public MusicFilter(List<Music> songs)\n {\n this.songs = songs;\n }", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public Book(final String title) {\n this.title = title;\n }" ]
[ "0.7683121", "0.72916085", "0.7280287", "0.71176183", "0.69928724", "0.69662595", "0.6918706", "0.6768057", "0.6713673", "0.66041845", "0.6588576", "0.64939755", "0.64742404", "0.64246815", "0.6412756", "0.64009684", "0.6313904", "0.6305716", "0.621665", "0.6192354", "0.61827207", "0.6160293", "0.61574525", "0.6027326", "0.6012451", "0.5951408", "0.59340656", "0.5930193", "0.59287363", "0.5928614", "0.5918517", "0.59121424", "0.5908033", "0.5876529", "0.5869446", "0.58636117", "0.5857589", "0.58452874", "0.5825569", "0.58225924", "0.5796783", "0.57794976", "0.57792455", "0.57775784", "0.57450944", "0.5722196", "0.57217944", "0.5718268", "0.57117075", "0.5691452", "0.56716365", "0.5652693", "0.5637468", "0.5620395", "0.5615675", "0.56040263", "0.55867857", "0.5580338", "0.5568194", "0.5561433", "0.5531556", "0.5507884", "0.55015355", "0.5484212", "0.54565316", "0.543938", "0.5414565", "0.54056567", "0.5403533", "0.53814375", "0.5379977", "0.5376949", "0.5375483", "0.53661424", "0.5364643", "0.5360275", "0.53558946", "0.5353467", "0.5351401", "0.5341302", "0.5330295", "0.5328059", "0.53214025", "0.5319325", "0.53152686", "0.5312994", "0.52925014", "0.52895397", "0.52879274", "0.5275241", "0.52736706", "0.52734303", "0.5257924", "0.52524877", "0.5250359", "0.5247124", "0.52406263", "0.5237801", "0.5234989", "0.5222871" ]
0.77253085
0
/ Song Sideeffects: Sets the year of release to 0
Song(Ensemble pEnsemble, String pTitle) { this.mEnsemble = pEnsemble; this.mTitle = pTitle; mYearReleased = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setYear(int _year) { year = _year; }", "public void setOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setYear (int yr) {\n year = yr;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(int value) {\r\n this.year = value;\r\n }", "public void setYear(int value) {\n\tthis.year = value;\n }", "public void setYear(int year) {\n\tthis.year = year;\n}", "public void setYear(int year)\n {\n this.year = year;\n }", "public void setYear(int year) {\r\n this.year = year;\r\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(int year)\r\n\t{\r\n\t\tthis.year = year;\r\n\t}", "public void setYear(int year) {\n this.year = year;\n }", "public void setDocumentYear(int documentYear);", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(int y){\n\t\tyear = y ; \n\t}", "public void addOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.add(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setYear(int year) \n\t{\n\t\tthis.year = year;\n\t}", "public void setYear(short value) {\r\n this.year = value;\r\n }", "public void setYear(short value) {\n this.year = value;\n }", "public static final int getReleaseYear() { return 2019; }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "@Override\n\tpublic void setYear(int year) {\n\t\t_esfShooterAffiliationChrono.setYear(year);\n\t}", "public void setYear(String year)\r\n {\r\n this.year = year; \r\n }", "public void setOriginalReleaseYear( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public void addYear(){\n\t\tyearAdd++;\n\t}", "@Override\n\tpublic void oneYearAgo(int year) {\n\n\t}", "public void removeOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public static void setOriginalReleaseYear(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public void addOriginalReleaseYear( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public static void addOriginalReleaseYear(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.add(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setYear(final int year) {\n\t\tthis.year = year;\n\t}", "public void setYear(int Year) {\n\t this.year= Year;\n\t}", "Builder addCopyrightYear(Number value);", "public void setYear(String year) {\n this.year = year;\n }", "public void setYear(String year) {\n this.year = year;\n }", "public void setYear(int year) {\n\t\tthis.date.setYear(year);\n\t}", "public int getYearReleased(){\n\t\treturn this.YEAR_RELEASED;\n\t}", "public int getYear() { return year; }", "public int getYear() { return year; }", "public void setPrevYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()-1);\n\n\t}", "public void removeAllOriginalReleaseYear() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALRELEASEYEAR);\r\n\t}", "public short getYear() {\n return year;\n }", "public void removeOriginalReleaseYear( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public short getYear() {\n return year;\n }", "public YearToCentury() // defining method YearToCentury\r\n\t{\r\n\t\tyear =0; // value of year =0\r\n\t}", "public static void setOriginalReleaseYear( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public static void removeOriginalReleaseYear(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.remove(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "public int getYear(){\r\n\t\treturn year;\r\n\t}", "public void setYear(String year) {\n\t\tthis.year = year;\n\t}", "public static void addOriginalReleaseYear( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public int getYear() {\r\n return year;\r\n }", "@Override\n\tpublic int getYear() {\n\t\treturn year;\n\t}", "public YearCitation(Date mostRecentVersion) {\n\t\tthis.mostRecentVersion = mostRecentVersion; \n\t\tyearFormat = new SimpleDateFormat(\"yyyy\");\n\t}", "public int getYear() {\r\n return year;\r\n }", "public int getYear() {\n\t return year;\n\t}", "public int getYear(){\n\t\treturn year; \n\t}", "public double getYear() {\n return year;\n }", "public int getYear() {\n\treturn year;\n }", "public int getYear() {\n return year;\n }", "public ConcreteYear(int year) {\r\n if (year > 0) {\r\n this.year = year;\r\n }\r\n }", "public int getYear(){\n\t\treturn year;\n\t}", "public int getYear () {\n return year;\n }", "public int getDocumentYear();", "public void setYears(int years) {\n this.years = years;\n }", "public int getYear()\n {\n return year;\n }", "@Override\n\tpublic void setYear(int year) throws RARException {\n\t\tthis.year = year;\n\t}", "public void setRecordingYear(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGYEAR, value);\r\n\t}", "public short getYear() {\r\n return year;\r\n }", "public int getYear() {\n return year;\n }", "public int getYear() {\n\treturn year;\n}", "public void setYear(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setYear(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setYear(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setYear(int):void\");\n }", "public int getYear() {\r\n\t\treturn year;\r\n\t}", "public final native double setFullYear(int year) /*-{\n this.setFullYear(year);\n return this.getTime();\n }-*/;", "public int getYear() {\r\n return this.year;\r\n }", "public void setYear(String value) {\n setAttributeInternal(YEAR, value);\n }", "public static void removeOriginalReleaseYear( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public int getYear() {\n return year;\n }", "public int getYear() {\n\t\treturn year;\n\t}", "public void addYear(int year) {\n if (month < 0) {\n subtractYear(year);\n return;\n }\n\n this.year += year;\n }", "Builder addCopyrightYear(String value);", "public int getYear(){\n\t return this.year;\n }", "public void setRecordingYear( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGYEAR, value);\r\n\t}", "int getYear();", "public short getYear() {\n return year;\n }", "public int getYear() {\n\t\treturn year; \n\t}", "Year createYear();", "public int getYear() \n\t{\n\t\treturn year;\n\t}", "public EventsCalendarYear() {\n initYear();\n }", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}" ]
[ "0.7410243", "0.71517175", "0.71176904", "0.70299536", "0.7029233", "0.7002897", "0.6996608", "0.698491", "0.69730926", "0.696296", "0.693195", "0.6922829", "0.6916096", "0.6908021", "0.6908021", "0.6908021", "0.68996733", "0.68563116", "0.6830355", "0.6802644", "0.67922926", "0.67846686", "0.6779908", "0.6779908", "0.6776508", "0.6763749", "0.67532617", "0.67433244", "0.67433244", "0.67433244", "0.67405", "0.67405", "0.67245924", "0.6702493", "0.67000395", "0.6682741", "0.66760856", "0.659883", "0.65973055", "0.6593797", "0.65847343", "0.65834725", "0.65834725", "0.65716076", "0.65673506", "0.6559507", "0.6559507", "0.6551539", "0.655026", "0.65375644", "0.64645624", "0.6453771", "0.6444322", "0.64431226", "0.6423846", "0.64207566", "0.64207566", "0.64207566", "0.6411866", "0.64078265", "0.63990515", "0.63898945", "0.6377582", "0.6359464", "0.6357028", "0.63506", "0.6349886", "0.63480383", "0.6341093", "0.63410705", "0.63356996", "0.63338035", "0.6326022", "0.63252425", "0.6319589", "0.6309934", "0.63087004", "0.6300756", "0.62981725", "0.6285584", "0.62842256", "0.6281771", "0.6275413", "0.6272376", "0.62714636", "0.6263811", "0.6259609", "0.6259093", "0.62497795", "0.6248302", "0.62325287", "0.6220889", "0.6220672", "0.6216839", "0.62162405", "0.6214453", "0.6195045", "0.61829656", "0.6182957", "0.61767423", "0.61767423" ]
0.0
-1
Display the earthquake title in the UI
private void updateUi(ArrayList<Book> books) { ListView booksList = (ListView) activity.findViewById(R.id.books_list); BookAdapter adapter = new BookAdapter(activity, books); booksList.setAdapter(adapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IDisplayString getTitle();", "void showTitle(String title);", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _scienceApp.getTitle();\n\t}", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "public void updateTitle(WebAddress newLocation) {\n webAddress = newLocation;\n setTitle(\"Weather - \" \n + webAddress.getCapitalizedCity() + \", \" \n + webAddress.getCapitalizedCountry());\n }", "@Override\r\n public String getTitle() {\n return title;\r\n }", "public String getTitle() {\n\t\tString displayInput = input;\n\t\tString organTitle = (focusedOrgan==null || focusedOrgan==\"\")? \"\" : \" in <em>\" + DatabaseHomepageBean.getOrganName(focusedOrgan) + \"</em>\";\n\t\treturn \"Result of <em>\" + query + \"</em> query for <em> \" + displayInput + \"</em>\" + organTitle;\n//\t\treturn \"Gene Query\";\n\t}", "public String getTitle()\n {\n return \"Test XY Data\";\n }", "@Override\r\n public String getTitle() {\r\n return title;\r\n }", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "public String getTitle();", "String title();", "String title();", "@Override\n public String getTitle() {\n return getName();\n }", "@Override\r\n\tpublic String getTitle() {\n\t\treturn title;\r\n\t}", "public void printTitle()\n {\n System.out.println(title);\n }", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "@Override\r\n\tpublic String getShowTitle() {\n\t\treturn getQymc();\r\n\t}", "@Override\n public void show() {\n Label title = new Label(\"Hall of Fame\", new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n title.setPosition(MENU_WIDTH / 2 - title.getWidth() / 2, MENU_HEIGHT / 1.9f + 3*title.getHeight());\n stage.addActor(title);\n }", "@Override\n public String getTitle() {\n return title;\n }", "@Override\r\n\tpublic void getTitle() {\n\t\t\r\n\t}", "@Override\n \tpublic String toString() {\n \t\treturn title;\n \t}", "public String getTitle() { return title; }", "public java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "protected abstract String title ();", "@Override\n public void title()\n {\n }", "public String getTitle()\n {\n return name;\n }", "@Override\n public String toString() {\n return getTitle();\n }", "@Override\n public String toString() {\n return title;\n }", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _esfTournament.getTitle();\n\t}", "@Override\r\n\tpublic String getName() {\r\n\t\treturn this.title;\r\n\t}", "public String getTitle() { return this.title; }", "private Widget getTitle(DatabaseObject databaseObject) {\n HorizontalPanel titlePanel = new HorizontalPanel();\n titlePanel.setStyleName(\"elv-Details-Title\");\n try{\n ImageResource img = InstanceTypeIconProvider.getItemIcon(databaseObject.getSchemaClass());\n String helpTitle = databaseObject.getSchemaClass().name;\n HTMLPanel helpContent = new HTMLPanel(InstanceTypeExplanation.getExplanation(databaseObject.getSchemaClass()));\n titlePanel.add(new HelpPopupImage(img, helpTitle, helpContent));\n }catch (Exception e){\n// e.printStackTrace();\n Console.error(getClass() + \": \" + e.getMessage());\n //ToDo: Enough?\n }\n HTMLPanel title = new HTMLPanel(databaseObject.getDisplayName());\n title.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);\n titlePanel.add(title);\n\n return titlePanel;\n }", "private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}", "public String getAtitle() {\n return atitle;\n }", "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "public String getTitle()\r\n\t{\r\n\t\treturn TITLE;\r\n\t}", "public String getTitle()\n {\n return title;\n }", "public abstract String getTitle();", "public abstract String getTitle();", "public abstract String getTitle();", "public abstract String getTitle();", "public String getTitlePopup() {\n/* 136 */ return getCOSObject().getString(COSName.T);\n/* */ }", "@Override\n public String getDemandTitle() {\n return title;\n }", "@Override\n public void title_()\n {\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String title()\n\t{\n\t\treturn title;\n\t}", "public String getTitle() {\n return \"\";\n }", "public String getTitle() {\n \t\treturn title;\n \t}", "private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}", "public String toString() {\r\n return this.title + \" by \" + this.artist;\r\n }", "static String title()\n {\n return \"POKEMON DON'T GO\\n\";\n }", "String getTitle() {\r\n return title;\r\n }", "@Override\r\n\t\tpublic String getTitle()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "private String addTitle(StringBuilder finalText) {\n\t\t// One Parameter: DisplayName\n\t\tMainController.titleName = parameters[0];\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|title:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "public abstract CharSequence getTitle();", "public String getTitle()\n {\n return title;\n }", "public String getTitle()\n {\n return title;\n }" ]
[ "0.663121", "0.64804155", "0.64747614", "0.6472824", "0.631792", "0.6279561", "0.62479764", "0.62427247", "0.6228086", "0.6222048", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.6216627", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.62139916", "0.61963964", "0.61963964", "0.61962384", "0.6192564", "0.6189135", "0.6178021", "0.6160088", "0.6154889", "0.6146896", "0.6140789", "0.612276", "0.61090916", "0.6090516", "0.60759807", "0.60759807", "0.60759807", "0.60759807", "0.60759807", "0.6070308", "0.6056144", "0.60558623", "0.6049574", "0.60431194", "0.60404915", "0.6032016", "0.601908", "0.6018385", "0.6017396", "0.5988901", "0.5981359", "0.59522635", "0.5948218", "0.5943747", "0.5943747", "0.5943747", "0.5943747", "0.5938879", "0.59276205", "0.5923862", "0.5920282", "0.5920282", "0.5919873", "0.5919851", "0.59049445", "0.59039265", "0.5902658", "0.5900014", "0.5890802", "0.5887121", "0.58790994", "0.58790994", "0.58790994", "0.58790994", "0.58790994", "0.5876433", "0.5873498", "0.58721244", "0.58721244" ]
0.0
-1
Returns new URL object from the given string URL.
private URL createUrl(String stringUrl) { URL url = null; try { url = new URL(stringUrl); } catch (MalformedURLException exception) { Log.e(LOG_TAG, "Error with creating URL", exception); return null; } return url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static URL stringToUrl(String stringUrl) throws MalformedURLException{\r\n\t\treturn new URL(stringUrl);\r\n\t}", "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 }", "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 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 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 }", "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 }", "protected URL stringToURL(String urlString){\n try{\n URL url = new URL(urlString);\n return url;\n }catch(MalformedURLException e){\n e.printStackTrace();\n }\n return null;\n }", "private static URL convertStringToURL(String url) {\n try {\n return new URL(url);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"String could not be converted into URL object\");\n e.printStackTrace();\n return null;\n }\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 static URL convertToUrl(String urlStr) {\n try {\n URL url = new URL(urlStr);\n URI uri = new URI(url.getProtocol(), url.getUserInfo(),\n url.getHost(), url.getPort(), url.getPath(),\n url.getQuery(), url.getRef());\n url = uri.toURL();\n return url;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\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 }", "@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 }", "public static URL createURL(String stringURL, final Context context) {\n URL url = null;\n try {\n url = new URL(stringURL);\n } catch (MalformedURLException e) {\n //use a handler to create a toast on the UI thread\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(context, \"Error: Check URL is valid.\", Toast.LENGTH_SHORT)\n .show();\n }\n });\n Log.e(LOG_TAG, \"Error: Check URL is valid.\", e);\n }\n return url;\n }", "public static URL buildurl(String url1)\n {\n URL url = null;\n try\n {\n url = new URL(url1.toString());\n\n }\n catch(MalformedURLException e)\n {\n e.printStackTrace();\n }\n return url;\n }", "Object create(URL url) throws IOException, SAXException, ParserConfigurationException;", "public Link(String url) {\n try {\n uri = new URL(fix(url)).toURI();\n } catch (Exception e) {\n uri = URI.create(\"\");\n }\n }", "private static URL createURL(String requestedUrl) {\n URL url = null;\n try {\n url = new URL(requestedUrl);\n } catch (MalformedURLException e) {\n Log.e(TAG, \"createdUrl: Problem building URL\", e);\n }\n return url;\n }", "public static URL createURL(String encodedURL) throws MalformedURLException, URISyntaxException {\n\n /* The encoded URL is transformed to an URL representation */\n URL anURL = new URL(encodedURL);\n\n /* And the URL is validated on its syntax */\n anURL.toURI();\n\n return anURL;\n }", "private URL getUrl(String url) {\n URL requestUrl = null;\n try {\n requestUrl = new URL(url);\n } catch (MalformedURLException e) {\n LOG.severe(\"Error forming Url for GET request\");\n LOG.severe(e.toString());\n }\n return requestUrl;\n }", "public static DIDURL valueOf(String url) throws MalformedDIDURLException {\n\t\treturn (url == null || url.isEmpty()) ? null : new DIDURL(url);\n\t}", "private static URL generateUrl(String requestedUrlString) {\n URL url = null;\n\n try {\n url = new URL(requestedUrlString);\n } catch (MalformedURLException e) {\n Log.e(LOG_TAG, \"Error creating a URL object : generateURL() block\", e);\n }\n return url;\n }", "java.net.URL getUrl();", "public static String formURL(String url)\n\t{\n\t\tString newurl;\n\t\tif (url.contains(\"http://\") || url.contains(\"https://\"))\n\t\t{\n\t\t\tnewurl = url;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewurl = \"http://\" + url;\n\t\t}\n\t\treturn newurl;\n\t}", "URL toURL() throws IOException;", "public UrlInfo(String urlString) throws IOException {\n URL url = new URL(urlString);\n this.urlConnection = url.openConnection();\n }", "public Uri getUrl() {\n return Uri.parse(urlString);\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n url_ = value;\n onChanged();\n return this;\n }", "public static DIDURL valueOf(DID context, String url) throws MalformedDIDURLException {\n\t\treturn (url == null || url.isEmpty()) ? null : new DIDURL(context, url);\n\t}", "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}", "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}", "public Builder setUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n url_ = value;\n onChanged();\n return this;\n }", "public Address interpretUrl(String url);", "@Override\n\tpublic URL getURL(String uri) throws MalformedURLException {\n\t\tif (uri.length() == 0) {\n\t\t\tthrow new MalformedURLException(\"Empty URI\");\n\t\t}\n\t\tURL url;\n\t\tif (uri.indexOf(\"://\") < 0) {\n\t\t\turl = new URL(getBaseURL(), uri);\n\t\t} else {\n\t\t\turl = new URL(uri);\n\t\t}\n\t\treturn url;\n\t}", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public URL getURL(String path) throws MalformedURLException {\n\t\treturn new URL(this.urlBase.getProtocol(), this.urlBase.getHost(), this.urlBase.getPort(), this.urlBase.getFile() + path);\n\t}", "Builder addUrl(URL value);", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\n }", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\n }", "@NotNull public Builder url(@NotNull String url) {\n putValue(\"url\", url);\n return this;\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/* */ }", "void setUrl(String url) {\n this.url = Uri.parse(url);\n }", "public DIDURL(String url) throws MalformedDIDURLException {\n\t\tthis(null, url);\n\t}", "URL getUrl();", "Uri getUrl();", "private URL createURL() {\n try {\n Log.d(\"URL\", \"create\");\n String urlString = \"http://cs262.cs.calvin.edu:8084/cs262dCleaningCrew/task/cjp27\";\n return new URL(urlString);\n } catch (Exception e) {\n Toast.makeText(this, getString(R.string.connection_error), Toast.LENGTH_SHORT).show();\n }\n\n return null;\n }", "private static final URL getURL(String url) throws ResourceManagerServiceClientCreationException {\r\n ArgumentChecker.checkNullOrEmpty(url, \"WSDL URL\");\r\n\r\n try {\r\n return new URL(url);\r\n } catch (MalformedURLException e) {\r\n throw new ResourceManagerServiceClientCreationException(\"Error while creating URL.\", e);\r\n }\r\n }", "public DIDURL(DID context, String url) throws MalformedDIDURLException {\n\t\tParser parser = new Parser();\n\t\tparser.parse(context, url);\n\t}", "public static String getValidUrl(String url){\n String result = null;\n if(url.startsWith(\"http://\")){\n result = url;\n }\n else if(url.startsWith(\"/\")){\n result = \"http://www.chenshiyu.com\" + url;\n }\n return result;\n }", "public URL standardizeURL(URL startingURL);", "public Contact url(final String url) {\n this.url = url;\n return this;\n }", "@Nonnull public URL buildURL() throws MalformedURLException {\n installTrustStore();\n \n if (disableNameChecking) {\n final HostnameVerifier allHostsValid = new HostnameVerifier() {\n public boolean verify(final String hostname, final SSLSession session) {\n return true;\n }\n }; \n HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid); \n }\n \n final StringBuilder builder = new StringBuilder(getURL());\n if (getPath() != null) {\n builder.append(getPath());\n }\n\n return new URL(doBuildURL(builder).toString());\n }", "public Builder setUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setUrl(value);\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n copyOnWrite();\n instance.setUrl(value);\n return this;\n }", "private void processUrl (String stringUrl)\n\t{\n\t\tURL correctUrl=null;\n\t\t// we need the URL\n\t\t// we first try to convert it directly\n\t\ttry {\n\t\t\tcorrectUrl=new URL(stringUrl);\n\t\t} catch (MalformedURLException e) {System.out.println(\"Not found : \"+stringUrl);return;}\n\n\t\tallInformation.getNemo().addJcamp(stringUrl);\n\t}", "public String nextURL()\n {\n if (empty())\n return null;\n int start = position;\n if (!consume(\"url(\"))\n return null;\n\n skipWhitespace();\n\n String url = nextCSSString();\n if (url == null)\n url = nextLegacyURL(); // legacy quote-less url(...). Called a <url-token> in the CSS3 spec.\n\n if (url == null) {\n position = start;\n return null;\n }\n\n skipWhitespace();\n\n if (empty() || consume(\")\"))\n return url;\n\n position = start;\n return null;\n }", "public final GetHTTP setUrl(final String url) {\n properties.put(URL_PROPERTY, url);\n return this;\n }", "public Builder setUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n url_ = value;\n onChanged();\n return this;\n }", "public static Constraints.Validator<String> url() {\n return new UrlValidator();\n }", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "public static DIDURL valueOf(String context, String url) throws MalformedDIDURLException {\n\t\treturn (url == null || url.isEmpty()) ? null : new DIDURL(DID.valueOf(context), url);\n\t}", "interface UrlModifier {\n\n String createUrl(String url);\n\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n url_ = value;\n onChanged();\n return this;\n }", "public Builder setUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n url_ = value;\n onChanged();\n return this;\n }", "public UrlInfo(URL url) throws IOException {\n this.urlConnection = url.openConnection();\n }", "public static WebFragment newInstance(String url) {\n WebFragment fragment = new WebFragment();\n Bundle args = new Bundle();\n args.putString(ARG_URL, url);\n fragment.setArguments(args);\n return fragment;\n }", "@Deprecated\r\n\tpublic static URI create(String uriString) {\r\n\t\treturn new URIImpl(uriString);\r\n\t}", "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 static URL normalize(URL url) {\n if (url.getProtocol().equals(\"file\")) {\n try {\n File f = new File(cleanup(url.getFile()));\n if(f.exists())\n return f.toURL();\n } catch (Exception e) {}\n }\n return url;\n }", "protected abstract String getPublicUrl(URL url);", "public void setURL(String url);", "Builder addUrl(String value);", "public static String decodeURL(String url) {\n\t\tint len = url.length();\n\t\tbyte[] bytes = new byte[len];\n\t\tint size = 0;\n\t\tboolean simple = true;\n\n\t\tfor (int i = 0; i < len; ++i) {\n\n\t\t\tbyte b = (byte) url.charAt(i);\n\n\t\t\tif (b == '+') {\n\t\t\t\tsimple = false;\n\t\t\t\tb = ' ';\n\t\t\t} else if (b == '%') {\n\t\t\t\tsimple = false;\n\n\t\t\t\ti += 2;\n\n\t\t\t\tif (i >= len)\n\t\t\t\t\tbreak;\n\n\t\t\t\tb = getByte(url.charAt(i - 1), url.charAt(i));\n\t\t\t}\n\n\t\t\tbytes[size++] = b;\n\t\t}\n\n\t\tString result = xmiCharset.decode(ByteBuffer.wrap(bytes, 0, size))\n\t\t\t.toString();\n\n\t\tif (simple && result.equals(url))\n\t\t\tresult = url; // reuse the input string\n\n\t\treturn result;\n\t}", "@Override\n public Url splitUrl(String Url) {\n\n Url regexSplitUrl = null;\n\n try {\n Matcher matcher = SPLIT_PATTERN.matcher(Url);\n matcher.find();\n String scheme = matcher.group(2);\n String address = matcher.group(4); // host/port\n String host = address.contains(\":\") ? address.split(\":\")[0] : address; // check if the address contains a colon,\n String port = address.contains(\":\") ? address.split(\":\")[1] : \"None\"; // then define a port, otherwise \"None\".\n String path = matcher.group(5);\n String params = matcher.group(7);\n\n regexSplitUrl = new Url(scheme, host, port, path, params);\n\n } catch (Exception exc) {\n System.out.println(\"Error parsing URL, using regular expressions : \" + exc);\n }\n\n return regexSplitUrl;\n }", "public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}", "private static URL m23464a(Context context, String str) {\n try {\n return new URL(str);\n } catch (MalformedURLException e) {\n C5376d dVar = C5376d.EXCEPTION;\n StringBuilder sb = new StringBuilder();\n sb.append(\"OMSDK: can't create URL - \");\n sb.append(str);\n C5378f.m23016a(context, dVar, sb.toString(), e.getMessage(), \"\");\n return null;\n }\n }", "private static String getHostURL(String url) {\n URI uri = URI.create(url);\n int port = uri.getPort();\n if (port == -1) {\n return uri.getScheme() + \"://\" + uri.getHost() + \"/\";\n } else {\n return uri.getScheme() + \"://\" + uri.getHost() + \":\" + uri.getPort() + \"/\";\n }\n }", "public HttpRequest(String urlString) throws IOException {\r\n this(new URL(urlString));\r\n }", "public void setUrl(Uri url) {\n this.urlString = url.toString();\n }", "public Builder withUrl(final String url) {\n this.url = url;\n return this;\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 }", "URI createURI();", "public static String canonicalize(String urlString) {\r\n String result = null;\r\n try {\r\n URL url = new URL(urlString.toLowerCase());\r\n result = url.getProtocol() + \"://\" + url.getHost() + url.getPath();\r\n } catch (MalformedURLException e) {\r\n System.out.println(\"Malformed url: \" + urlString);\r\n }\r\n return result;\r\n }", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000001;\n url_ = value;\n }", "void first_normalize_url(String rawurl, PointerByReference ptr);", "private void setUrl(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000002;\n url_ = value;\n }", "public static String normalize(String url) {\n try {\n URL absoluteUrl = new URL(url);\n return new URL(\n absoluteUrl.getProtocol(), \n absoluteUrl.getHost(), \n absoluteUrl.getPort(),\n absoluteUrl.getPath())\n .toString();\n } catch (Exception ex) {\n return null;\n }\n }", "public static URL adjustURL(URL resource) throws MalformedURLException {\n \t\tString urlStr = resource.getFile();\n \t\tif (urlStr.startsWith(\"file://\"))\n \t\t\turlStr.replaceFirst(\"file://localhost\", \"file://\");\n \t\telse\n \t\t\turlStr = \"file:///\" + urlStr;\n \t\treturn new URL(urlStr);\n \t}", "public SitoWeb(URL u) throws UrlNonValidoException {\r\n\t\tsuper();\r\n\t\tif(u == null)\r\n\t\t\tthrow new UrlNonValidoException(\"URL in input non valido.\");\r\n\t\tthis.urlBase = new URL(u.getProtocollo(), u.getHostname(), \"/\");\t\t\r\n\t}", "private String createUrlWithPort(String gadgetUrl) {\n try {\n URL origUrl = new URL(gadgetUrl);\n URL urlWithPort = null;\n String origHost = origUrl.getHost();\n if (origUrl.getPort() <= 0 && origHost != null && origHost.length() != 0\n && !STAR.equals(origHost)) {\n if (origUrl.getProtocol().equalsIgnoreCase(HTTP)) {\n urlWithPort = new URL(origUrl.getProtocol(), origUrl.getHost(), HTTP_PORT, origUrl.getFile());\n }\n else if (origUrl.getProtocol().equalsIgnoreCase(HTTPS)) {\n urlWithPort = new URL(origUrl.getProtocol(), origUrl.getHost(), HTTPS_PORT, origUrl.getFile());\n }\n return urlWithPort == null ? origUrl.toString() : urlWithPort.toString();\n } else {\n return origUrl.toString();\n }\n } catch (MalformedURLException e) {\n return gadgetUrl;\n }\n }", "public void setURL(String _url) { url = _url; }", "public void setURL(String URL) {\n mURL = URL;\n }", "public Builder url(String url) {\n this.url = url;\n return this;\n }", "public static String formatUrl(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n return url;\n }", "public java.lang.String getUrl() {\n java.lang.Object ref = url_;\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 if (bs.isValidUtf8()) {\n url_ = s;\n }\n return s;\n }\n }", "public void setURL(java.lang.String URL) {\n this.URL = URL;\n }", "public void setUrl(String url);", "public void setUrl(String url);" ]
[ "0.7393641", "0.7377555", "0.72374487", "0.72127926", "0.72127926", "0.7199948", "0.71360546", "0.7127599", "0.7083861", "0.7062112", "0.6744751", "0.6743828", "0.66651833", "0.66642255", "0.6656008", "0.65968347", "0.65944374", "0.6502286", "0.6437796", "0.6249654", "0.6206515", "0.62002295", "0.6198042", "0.61806655", "0.61793405", "0.6163879", "0.61597943", "0.6035313", "0.6024617", "0.6008209", "0.59874547", "0.5977536", "0.59614736", "0.59396523", "0.5923475", "0.5916422", "0.58862287", "0.5860938", "0.5859579", "0.5820158", "0.5820158", "0.5820158", "0.5819239", "0.57768077", "0.5745533", "0.5714898", "0.5704882", "0.56835806", "0.5617606", "0.5593678", "0.5579826", "0.5570189", "0.55561507", "0.55263865", "0.5518558", "0.5518558", "0.5481301", "0.54733163", "0.5454788", "0.5451682", "0.54491556", "0.54283047", "0.5423483", "0.5418334", "0.5404623", "0.5404623", "0.5400999", "0.5397365", "0.5396172", "0.5394644", "0.5393348", "0.53863436", "0.53857046", "0.5378471", "0.53608453", "0.53303856", "0.53292537", "0.5326472", "0.52972186", "0.5277771", "0.5276453", "0.52755547", "0.52755404", "0.5274123", "0.52687466", "0.5262623", "0.5257424", "0.52497023", "0.5246465", "0.5246082", "0.5232393", "0.5225007", "0.5219916", "0.52142954", "0.52124816", "0.52028036", "0.5181898", "0.51812947", "0.51754075", "0.51754075" ]
0.7281861
2
Make an HTTP request to the given URL and return a String as the response.
private String makeHttpRequest(URL url) throws IOException { String jsonResponse = ""; HttpURLConnection urlConnection = null; InputStream inputStream = null; try { urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod("GET"); urlConnection.setReadTimeout(10000 /* milliseconds */); urlConnection.setConnectTimeout(15000 /* milliseconds */); urlConnection.connect(); if (urlConnection.getResponseCode() == 200) { inputStream = urlConnection.getInputStream(); jsonResponse = readFromStream(inputStream); return jsonResponse; } } catch (IOException e) { Log.e(LOG_TAG, "Problem Http Request", e); } catch (Exception e) { Log.e(LOG_TAG, "Problem Http Request", e); } finally { if (urlConnection != null) { urlConnection.disconnect(); } if (inputStream != null) { // function must handle java.io.IOException here inputStream.close(); } } return jsonResponse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}", "public static String GET(String url)\t{\t\t\t\t\n\t\tInputStream inputStream = null;\t\t\t\t\t\t\t\n\t\tString result = \"\";\t\t\t\t\t\t\t\n\t\ttry\t{\t\t\t\t\t\t\n\t\t\t// create HttpClient\t\t\t\t\t\t\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\t\t\t\t\t\t\n\n\t\t\t// make GET request to the given URL\t\t\t\t\t\t\n\t\t\tHttpResponse httpResponse = httpClient.execute(new HttpGet(url));\t\t\t\t\t\t\n\n\t\t\t// receive response as inputStream\t\t\t\t\t\t\n\t\t\tinputStream = httpResponse.getEntity().getContent();\t\t\t\t\t\t\t\t\n\n\t\t\t// convert inputstream to string\t\t\t\t\t\t\t\t\n\t\t\tif(inputStream != null)\t\t\t{\t\t\t\t\t\n\t\t\t\tresult = convertInputStreamToString(inputStream);\t\t\t\t\t\t\t\t\n\t\t\t}\telse\t{\t\t\t\t\t\t\n\t\t\t\tresult = \"Did not work!\";\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t}catch (Exception e)\t{\t\t\t\t\t\n\t\t\tLog.d(\"InputStream\", e.getLocalizedMessage());\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\n\n\t\treturn result;\t\t\t\t\t\t\t\n\t}", "public String receive(String URL)\n {\n try\n {\n HttpGet httpGet = new HttpGet(URL);\n return EntityUtils.toString(HttpClients.createDefault().execute(httpGet).getEntity());\n }catch(IOException e) \n {\n System.out.println(\"Error requesting string from \" + URL);\n }\n return \"\";\n }", "public static String httpGet(String url) throws Exception {\r\n \t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\tHttpResponse response = null;\r\n \t\tString responseString = null;\r\n \t\tHttpUriRequest request = new HttpGet(url);\r\n \t\trequest.setHeader(\"Accept-Encoding\", \"gzip\");\r\n \t\trequest.setHeader(\"User-Agent\", \"gzip\");\r\n\t\tresponse = client.execute(request);\r\n \t\tif (response.getStatusLine().getStatusCode() != 200) {\r\n \t\t\tthrow new HttpException(\"Server error: \"\r\n \t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n \t\t} else {\r\n \t\t\tresponseString = parseResponse(response);\r\n \r\n \t\t}\r\n \t\treturn responseString;\r\n \t}", "public static String getHTTP(String urlToRead) throws Exception {\n // reference: https://stackoverflow.com/questions/34691175/how-to-send-httprequest-and-get-json-response-in-android/34691486\n HttpClient httpclient = new DefaultHttpClient();\n HttpGet httpget = new HttpGet(urlToRead);\n\n HttpResponse response = httpclient.execute(httpget);\n\n if (response.getStatusLine().getStatusCode() == 200) {\n String server_response = EntityUtils.toString(response.getEntity());\n return server_response;\n } else {\n System.out.println(\"no response from server\");\n }\n return \"\";\n }", "private static String getURL(String url) {\r\n\t\t//fixup the url\r\n\t\tURL address;\r\n\t\ttry {\r\n\t\t\taddress = new URL(url);\r\n\t\t}\r\n\t\tcatch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\t\t\r\n\t\t//make the hookup\r\n\t\tHttpURLConnection con;\r\n\t\ttry {\r\n\t\t\tcon = (HttpURLConnection) address.openConnection();\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\r\n\t\t// optional default is GET\r\n\t\ttry {\r\n\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t}\r\n\t\tcatch (ProtocolException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\r\n\t\t//this executes the get? - maybe check with wireshark if ever important\r\n//\t\tint responseCode = 0; \r\n//\t\ttry {\r\n//\t\t\tresponseCode = con.getResponseCode();\r\n//\t\t}\r\n//\t\tcatch(IOException e) {\r\n//\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n//\t\t\treturn new String();\r\n//\t\t}\r\n\t\t\r\n\t\t//TODO handle bad response codes\r\n\r\n\t\t//read the response\r\n\t\tStringBuffer response = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\tString inputLine = new String();\r\n\t\r\n\t\t\t//grab each line from the response\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tresponse.append(inputLine);\r\n\t\t\t}\r\n\t\t\t//fix dangling\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\t\t\r\n\t\t//convert to a string\r\n\t\treturn response.toString();\r\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n // if the url is null, return the response early;\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code \" + urlConnection.getResponseCode());\n }\n\n } catch (IOException e) {\n // TODO: Handle the exception\n Log.e(LOG_TAG, \"Problem retrieving from the url\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static Response doGetRequest(String url) throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException, KeyManagementException {\n try {\n Request request = new Request.Builder()\n .url(url).addHeader(\"Content-Type\", \"text/plain\")\n .build();\n Response response = client.newCall(request).execute();\n return response;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public String getResponseFromUrl(String url) {\r\n\t\tString res = \"\";\r\n\t\tBufferedReader in = null;\r\n\t\ttry {\r\n\t\t\tHttpClient client = new DefaultHttpClient();\r\n\t\t\tHttpGet request = new HttpGet();\r\n\t\t\trequest.setURI(new URI(url));\r\n\t\t\tHttpResponse response = client.execute(request);\r\n\t\t\tin = new BufferedReader(new InputStreamReader(response.getEntity()\r\n\t\t\t\t\t.getContent()));\r\n\t\t\tStringBuffer sb = new StringBuffer(\"\");\r\n\t\t\tString line = \"\";\r\n\t\t\tString NL = System.getProperty(\"line.separator\");\r\n\t\t\twhile ((line = in.readLine()) != null) {\r\n\t\t\t\tsb.append(line + NL);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tres = sb.toString();\r\n\t\t\t//System.out.println(res);\r\n\t\t\t\r\n\t\t\treturn res;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (in != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tin.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the earthquake JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }", "public String callGET(String urlStr) {\n StringBuilder strB = new StringBuilder();\n this.LOGGER.debug(\"urlStr: {}\" + urlStr);\n \n try {\n URL url = new URL(urlStr);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(this.STR_GET);\n conn.setRequestProperty(this.STR_ACCEPT, this.STR_APPLICATION_HTML);\n\n if (conn.getResponseCode() != this.RET_OK) {\n throw new RuntimeException(\"Failed with HTTP error code: \" + conn.getResponseCode());\n }\n\n BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\n String output;\n while ((output = br.readLine()) != null) {\n strB.append(output);\n }\n\n conn.disconnect();\n }\n catch (MalformedURLException exc) {\n exc.printStackTrace(System.err);\n }\n catch (IOException exc) {\n exc.printStackTrace(System.err);\n }\n \n System.out.println(\"Output from Server .... \\n\");\n System.out.println(strB.toString());\n \n return strB.toString();\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }", "public static String getResponseContent(URL url) throws IOException {\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n String encoding = conn.getContentEncoding();\n if (encoding == null) {\n encoding = \"UTF-8\";\n }\n int responseCode = conn.getResponseCode();\n InputStream stream;\n if (responseCode != HttpURLConnection.HTTP_OK) {\n stream = conn.getErrorStream();\n } else {\n stream = conn.getInputStream();\n }\n try {\n return IOUtils.toString(stream, encoding);\n }\n finally {\n stream.close();\n }\n }", "public String openHttp2String(URL url) throws IOException {\r\n return EntityUtils.toString(openHttpEntity(url), Charset.forName(\"UTF-8\"));\r\n }", "public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}", "private String getContentStringFromURL(URL url) {\n\n HttpURLConnection con = null;\n //Versuch der Verbindung\n try {\n con = (HttpURLConnection) url.openConnection();\n\n\n // Optional\n con.setRequestMethod(\"GET\");\n\n // HTTP-Status-Code\n int responseCode = con.getResponseCode();\n //System.out.println(\"\\nSending 'GET' request to URL : \" + url);\n //System.out.println(\"Response Code : \" + responseCode);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n //Einlesen der Antwort\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n //Antwort wird in einen String gewandelt und zurück geliefert\n return response.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public static Response request(String urlString) {\n HttpURLConnection urlConnection = null;\n InputStream in = null;\n try {\n URL url = new URL(urlString);\n urlConnection = (HttpURLConnection)url.openConnection();\n urlConnection.setConnectTimeout(CONNECT_TIMEOUT);\n urlConnection.setReadTimeout(READ_TIMEOUT);;\n // prefer json to text\n urlConnection.setRequestProperty(\"Accept\", \"application/json,text/plain;q=0.2\");\n in = urlConnection.getInputStream();\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String line = null;\n StringBuilder sb = new StringBuilder();\n while ((line = br.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n int statusCode = urlConnection.getResponseCode();\n String result = sb.toString().trim();\n if (statusCode == INTERNAL_SERVER_ERROR) {\n JSONObject errorObj = JSON.parseObject(result);\n if (errorObj.containsKey(\"errorMsg\")) {\n return new Response(errorObj.getString(\"errorMsg\"), false);\n }\n return new Response(result, false);\n }\n return new Response(result);\n } catch (IOException e) {\n return new Response(e.getMessage(), false);\n } finally {\n IOUtils.close(in);\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n }", "public static String httpRequest(String requestUrl){\r\n\t\t\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\ttry{\r\n\t\t\tURL url = new URL (requestUrl);\r\n\t\t\tHttpURLConnection httpUrlConn = (HttpURLConnection)url.openConnection();\r\n\t\t\thttpUrlConn.setDoInput(true);\r\n\t\t\thttpUrlConn.setDoOutput(false);\r\n\t\t\thttpUrlConn.setUseCaches(false);\r\n\t\t\t\r\n\t\t\thttpUrlConn.setRequestMethod(\"GET\");\r\n\t\t\thttpUrlConn.connect();\r\n\t\t\t\r\n\t\t\t//transfer the inputStream returned into string\r\n\t\t\tInputStream inputStream = httpUrlConn.getInputStream();\r\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(inputStream,\"utf-8\");\r\n\t\t\tBufferedReader bufferedReader = new BufferedReader(inputStreamReader);\r\n\t\t\t\r\n\t\t\tString str = null;\r\n\t\t\twhile((str=bufferedReader.readLine())!=null){\r\n\t\t\t\t\r\n\t\t\t\tbuffer.append(str);\r\n\t\t\t}\r\n\t\t\tbufferedReader.close();\r\n\t\t\tinputStreamReader.close();\r\n\t\t\tinputStream.close();\r\n\t\t\tinputStream=null;\r\n\t\t\thttpUrlConn.disconnect();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn buffer.toString();\r\n\t\t\r\n\t}", "public static String getUrlContentAsJsonString(String url) throws Exception {\n// HttpClient httpClient = new HttpClient();\n// httpClient.getParams().setSoTimeout(1500);\n// GetMethod gm = new GetMethod(url);\n// gm.setRequestHeader(\"accept\", \"application/json\"); // needed for spatial portal JSON web services\n// gm.setFollowRedirects(true);\n// httpClient.executeMethod(gm);\n// String content = gm.getResponseBodyAsString();\n\n HttpClient httpClient = new HttpClient();\n // DM: set this to HTTP/1.0\n httpClient.getParams().setParameter(\"http.protocol.version\", HttpVersion.HTTP_1_0);\n httpClient.getParams().setSoTimeout(10000);\n logger.debug(\"Retrieving the following URL: \" + url);\n GetMethod gm = new GetMethod(url);\n gm.setRequestHeader(\"Accept\", \"application/json\"); // needed for spatial portal JSON web services\n gm.setFollowRedirects(true);\n httpClient.executeMethod(gm);\n String responseString = gm.getResponseBodyAsString();\n if(logger.isDebugEnabled()){\n logger.debug(\"Response: \" + responseString);\n }\n return responseString;\n }", "public String requestContent(String urlStr) {\n String result = null;\n HttpURLConnection urlConnection;\n try {\n URL url = new URL(urlStr);\n urlConnection = (HttpURLConnection) url.openConnection();\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n try {\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n result = convertStreamToString(in);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n return result;\n }", "public static String executeGet(String targetURL) {\t\n\t\t HttpURLConnection connection = null; \n\t\t try {\n\t\t //Create connection\n\t\t URL url = new URL(targetURL);\n\t\t connection = (HttpURLConnection)url.openConnection();\n\t\t connection.setRequestMethod(\"GET\");\n\t\t connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\t\t connection.setRequestProperty(\"Content-Language\", \"en-US\"); \n\n\t\t connection.setUseCaches(false);\n\t\t connection.setDoOutput(true);\n\n\n\t\t //Get Response \n\t\t InputStream is = connection.getInputStream();\n\t\t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n\t\t StringBuilder response = new StringBuilder(); // or StringBuffer if not Java 5+ \n\t\t String line;\n\t\t while((line = rd.readLine()) != null) {\n\t\t response.append(line);\n\t\t response.append('\\r');\n\t\t }\n\t\t rd.close();\n\t\t return response.toString();\n\t\t } catch (Exception e) {\n\t\t return e.getMessage();\n\t\t } finally {\n\t\t if(connection != null) {\n\t\t connection.disconnect(); \n\t\t }\n\t\t }\n\t\t}", "public static String GET(String urlString) {\n\t\ttry {\n\t\t\tURL url = new URL(urlString);\n\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\tconn.connect();\n\t\t\tInputStream inputStream = conn.getInputStream();\n\t\t\treturn convertInputStreamToString(inputStream);\n\t\t} catch (MalformedURLException e) {\n\t\t\t// e.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public static String getContentFromUrl(URL url) throws Exception {\n HttpGet httpget = new HttpGet(url.toURI());\n DefaultHttpClient httpclient = new DefaultHttpClient();\n log.info(\"Executing request \" + httpget.getRequestLine());\n HttpResponse response = httpclient.execute(httpget);\n int statusCode = response.getStatusLine().getStatusCode();\n log.info(\"Response is with status code \" + statusCode);\n Header[] errorHeaders = response.getHeaders(\"X-Exception\");\n log.warning(\"Error headers are: \" + Arrays.toString(errorHeaders));\n String content = EntityUtils.toString(response.getEntity());\n log.info(\"Content is: \" + content);\n return content;\n }", "public static String makeHTTPRequest(URL url, Context context) throws IOException {\n // If the url is empty, return early\n String jsonResponse = null;\n if (url == null) {\n return jsonResponse;\n }\n final Context mContext = context;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful, the response code should be 200. Read the input stream and\n // parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromInputStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n //use a handler to create a toast on the UI thread\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(mContext, \"Error: Issue with fetching JSON results from Guardian API.\", Toast\n .LENGTH_SHORT)\n .show();\n }\n });\n\n Log.e(LOG_TAG, \"Error: Issue with fetching JSON results from Guardian API. \", e);\n } finally {\n // Close connection\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n // Close stream\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "private static String executeRequest(String url) throws IOException {\n\n\t\tLog.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t\n\t\tSocket s = new Socket(IP, PORT);\n\t\tPrintStream ps = new PrintStream(s.getOutputStream());\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"PS OPENED\");\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(\n\t\t\t\ts.getInputStream()));\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"BR OPENED\");\n\t\tps.println(url);\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"URL PRNTED\");\n\t\tString response = r.readLine();\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"RESPONSE: \" + response);\n\t\treturn response;\n\n\t\t// boolean unsuccessful = true;\n\t\t// int tries = 0;\n\t\t// String response = \"\";\n\t\t// while(unsuccessful && tries != 3){\n\t\t// unsuccessful = false;\n\t\t// URL requestUrl = new URL(url);\n\t\t// HttpsURLConnection connection = (HttpsURLConnection)\n\t\t// requestUrl.openConnection();\n\t\t// try{\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t// connection.setRequestMethod(\"GET\");\n\t\t// connection.getResponseCode();\n\t\t//\n\t\t// //connection.\n\t\t//\n\t\t// connection.connect();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t// //Needs error checking on connection\n\t\t//\n\t\t// InputStream in = new\n\t\t// BufferedInputStream(connection.getInputStream());\n\t\t// BufferedReader reader = new BufferedReader(new\n\t\t// InputStreamReader(in));\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\t// String line;\n\t\t//\n\t\t// //reads response in and appends it to buffer\n\t\t// do{\n\t\t// line = reader.readLine();\n\t\t// buffer.append(line);\n\t\t// }while (line != null);\n\t\t//\n\t\t// //disconnects the HttpURLConnection so other requests can be made\n\t\t// connection.disconnect();\n\t\t// //Log.d(RiotJsonRequest.class.getSimpleName() , \"RECEIVED: \" +\n\t\t// buffer.toString());\n\t\t// response = buffer.toString();\n\t\t// }catch(Exception e){\n\t\t// String code = Integer.toString(connection.getResponseCode());\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , \"CODE: \" + code);\n\t\t// if(code.equals(\"404\")){\n\t\t// return code;\n\t\t// }\n\t\t// unsuccessful = true;\n\t\t// tries++;\n\t\t// connection.disconnect();\n\t\t// connection = null;\n\t\t// requestUrl = null;\n\t\t// try {\n\t\t// Thread.sleep(1000);\n\t\t// } catch (InterruptedException e1) {\n\t\t// e1.printStackTrace();\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t// return response;\n\t}", "private String getUrlContents(String theUrl) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(theUrl);\n URLConnection urlConnection = url.openConnection();\n //reads the response\n BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()), 8);\n String line;\n while ((line = br.readLine()) != null) {\n content.append(line + \"\\n\");\n }\n br.close();\n }catch (Exception e) {\n //error occured, usually network related\n e.printStackTrace();\n }\n return content.toString();\n }", "public String makeServiceCall(String reqUrl) {\n String response = null;\n try {\n URL url = new URL(reqUrl);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n // read the response\n InputStream in = new BufferedInputStream(conn.getInputStream());\n response = convertStreamToString(in);\n } catch (MalformedURLException e) {\n Log.e(TAG, \"MalformedURLException: \" + e.getMessage());\n } catch (ProtocolException e) {\n Log.e(TAG, \"ProtocolException: \" + e.getMessage());\n } catch (IOException e) {\n Log.e(TAG, \"IOException: \" + e.getMessage());\n } catch (Exception e) {\n Log.e(TAG, \"Exception: \" + e.getMessage());\n }\n return response;\n }", "@Override\n\tpublic InputStream doGet(String url) {\n\t\tInputStream in = null;\n\t\tHttpGet getRequest = new HttpGet(url);\n\t\tgetRequest.addHeader(\"charset\", HTTP.UTF_8);\n\t\tHttpClient client = new DefaultHttpClient();\n\t\tclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 6000);\n\t\tclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 8000);\n\t\tHttpResponse response = null;\n\t\ttry {\n\t\t\tresponse = client.execute(getRequest);\n\t\t\tif(null != response && response.getStatusLine().getStatusCode() == HttpStatus.SC_OK){\n\t\t\t\tin = response.getEntity().getContent();\n\t\t\t}\n\t\t} catch (ClientProtocolException 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\treturn in;\n\t}", "private static String load(final String url) throws IOException {\n\t\tHttpURLConnection conn =\n\t\t\t(HttpURLConnection) new URL(url).openConnection();\n\n\t\tconn.setDoInput(true);\n\t\tconn.setDoOutput(false);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.connect();\n\n\t\tint respCode = conn.getResponseCode();\n\t\tif (respCode != HttpURLConnection.HTTP_OK) {\n\t\t\tthrow new IOException(conn.getResponseMessage());\n\t\t}\n\n\t\tString contentType =\n\t\t\tconn.getHeaderField(\"Content-Type\").toUpperCase(Locale.ENGLISH);\n\t\tString csName = DEFAULT_CHARSET;\n\t\tint csPos = contentType.lastIndexOf(\"CHARSET=\");\n\t\tif (csPos != -1) {\n\t\t\tcsName = contentType.substring(csPos + \"CHARSET=\".length()).trim();\n\t\t}\n\t\tCharset charset = Charset.forName(csName);\n\n\t\tInputStream is = conn.getInputStream();\n\t\tif (is == null) {\n\t\t\tthrow new IOException(\"No input stream\");\n\t\t}\n\t\tInputStreamReader isr = new InputStreamReader(is, charset);\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tint c;\n\t\t\twhile ((c = isr.read()) != -1) {\n\t\t\t\tsb.appendCodePoint(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tisr.close();\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }", "private static String getResponseContent(RequestURL request)\n\t\t\tthrows GPlaceServiceException {\n\t\tStringBuilder response = new StringBuilder();\n\t\tHttpURLConnection conn = null;\n\n\t\ttry {\n\t\t\tURL url = new URL(request.toString());\n\t\t\tconn = (HttpURLConnection) url.openConnection();\n\t\t\tInputStreamReader in = new InputStreamReader(conn.getInputStream());\n\t\t\tint read;\n\t\t\tchar[] buff = new char[1024];\n\t\t\twhile ((read = in.read(buff)) != -1) {\n\t\t\t\tresponse.append(buff, 0, read);\n\t\t\t}\n\t\t\treturn response.toString();\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new GPlaceServiceException(\n\t\t\t\t\t\"Could not request PlacesAPI because the URL is malformed\",\n\t\t\t\t\te);\n\t\t} catch (IOException e) {\n\t\t\tthrow new GPlaceServiceException(\n\t\t\t\t\t\"Could not request PlacesAPI because there happened an error during data transmission\");\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.disconnect();\n\t\t\t}\n\t\t}\n\t}", "String getRequest(String url);", "public String sendGetSecure(String url)\n\t{\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL https_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpsURLConnection secure_connection = (HttpsURLConnection)https_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n\t}", "public String GET(String uri) {\n String retVal = \"\";\n try {\n request = HttpRequest.newBuilder()\n .GET()\n .uri(new URI(uri))\n .build();\n\n response = HttpClient.newBuilder()\n .build()\n .send(request, HttpResponse.BodyHandlers.ofString());\n\n retVal = response.body().toString();\n }\n catch (Exception e) {\n // correctly handles the exception according to framework\n // for this case, just returns an empty string\n }\n return retVal;\n }", "private String downloadUrl(String myUrl) throws IOException {\n InputStream is = null;\n\n try {\n URL url = new URL(myUrl);\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 //int response = conn.getResponseCode();\n //Log.d(\"JSON\", \"The response is: \" + response);\n is = conn.getInputStream();\n\n // Convert the InputStream into a string\n return readIt(is);\n\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n //Si la URL es null se devuelve inediatamente.\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(100000 /* Milisegundos.*/);\n urlConnection.setConnectTimeout(100000 /* Milisegundos.*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Si la request se realiza correctamente (código de respuesta 200) se lee el input\n // stream y se le hace parse a la respuesta.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error de conexión: \" + urlConnection.getResponseCode());\n }\n // Aquí simplemente hacemos catch a la IOException.\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problema obteniendo los datos en JSON del servidor\", e);\n // Independientemente de que se lance una exception o no en el bloque finally se realiza\n // una desconexión (o se \"cierra\" como en el caso del inputStream) para poder reusarlo.\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n // Se devuelve como resultado el JsonResponse que albergará la String inputStream.\n return jsonResponse;\n }", "public static String callURL(String myURL) {\n StringBuilder sb = new StringBuilder();\n URLConnection urlConn;\n InputStreamReader in = null;\n try {\n URL url = new URL(myURL);\n urlConn = url.openConnection();\n if (urlConn != null)\n urlConn.setReadTimeout(60 * 1000);\n if (urlConn != null && urlConn.getInputStream() != null) {\n in = new InputStreamReader(urlConn.getInputStream(),\n Charset.defaultCharset());\n BufferedReader bufferedReader = new BufferedReader(in);\n if (bufferedReader != null) {\n int cp;\n while ((cp = bufferedReader.read()) != -1) {\n sb.append((char) cp);\n }\n bufferedReader.close();\n }\n }\n in.close();\n } catch (Exception e) {\n throw new RuntimeException(\"Exception while calling URL:\" + myURL, e);\n }\n\n return sb.toString();\n }", "public static CharSequence GetHttpResponse(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tURLConnection connection = url.openConnection();\n\t\tif (!(connection instanceof HttpURLConnection)) {\n\t\t\tthrow new IOException(\"Not an HTTP connection\");\n\t\t}\n\t\tHttpURLConnection httpConnection = (HttpURLConnection) connection;\n\t\tint responseCode = httpConnection.getResponseCode();\n\t\tif (responseCode != HttpURLConnection.HTTP_OK) {\n\t\t\tString responseMessage = httpConnection.getResponseMessage();\n\t\t\tthrow new IOException(\"HTTP response code: \" + responseCode + \" \" + responseMessage);\n\t\t}\n\t\tInputStream inputStream = httpConnection.getInputStream();\n\t\tBufferedReader reader = null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new InputStreamReader(inputStream));\n\t\t\tint contentLength = httpConnection.getContentLength();\n\t\t\t// Some services does not include a proper Content-Length in the response:\n\t\t\tStringBuilder result = (contentLength > 0) ? new StringBuilder(contentLength) : new StringBuilder();\n\t\t\twhile (true) {\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tif (line == null) break;\n\t\t\t\tresult.append(line);\n\t\t\t}\n\t\t\treturn result;\n\t\t} finally {\n\t\t\tif (reader != null) reader.close();\n\t\t}\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // if url null, return\n if(url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection= (HttpURLConnection)url.openConnection();\n urlConnection.setReadTimeout(10000/*milliseconds*/);\n urlConnection.setConnectTimeout(15000/*milliseconds*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n Log.v(LOG_TAG,\"Network request made\");\n\n // if the request was successful(response code 200)\n //then read the input stream and parse the output\n if(urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n }\n else{\n Log.e(LOG_TAG,\"Error Response code: \" + urlConnection.getResponseCode());\n }\n }\n catch (IOException e) {\n Log.e(LOG_TAG,\"Problem retrieving the earthquake JSON results\",e);\n }\n finally {\n if(urlConnection != null) {\n urlConnection.disconnect();\n }\n if(inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static String postHTTP(String urlToRead) throws IOException {\n //reference: https://stackoverflow.com/a/19912858\n HttpClient httpclient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(urlToRead);\n\n HttpResponse response = httpclient.execute(httpPost);\n\n if (response.getStatusLine().getStatusCode() == 200) {\n String server_response = EntityUtils.toString(response.getEntity());\n return server_response;\n } else {\n System.out.println(\"no response from server\");\n }\n return \"\";\n }", "private String downloadURL(String url) {\n\t\ttry {\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpGet request = new HttpGet(url);\n\t\t\t// Get the response\n\t\t\tResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t\t\tString response_str = client.execute(request, responseHandler);\n\t\t\treturn response_str;\n\n\t\t\t// Makes sure that the InputStream is closed after the app is\n\t\t\t// finished using it.\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"WL\", \"Error\");\n\t\t\te.printStackTrace();\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "public static String getResponseFromURL(String urlString, String method) {\n StringBuilder inline = new StringBuilder();\n try {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(method);\n conn.connect();\n int responseCode = conn.getResponseCode();\n\n if (responseCode != 200) {\n throw new RuntimeException(\"ResponseCode :\" + responseCode);\n } else {\n Scanner sc = new Scanner(url.openStream());\n while (sc.hasNext()) {\n inline.append(sc.nextLine());\n }\n sc.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return inline.toString();\n }", "public static String downloadContent(String url) throws IOException {\n URL website = new URL(url);\n URLConnection connection = website.openConnection();\n BufferedReader in = new BufferedReader(\n new InputStreamReader(\n connection.getInputStream()));\n\n StringBuilder response = new StringBuilder();\n String inputLine;\n\n while ((inputLine = in.readLine()) != null)\n response.append(inputLine);\n\n in.close();\n\n return response.toString();\n }", "private Optional<String> executeHttpGet(String url) {\n CloseableHttpClient httpClient = getHttpClient();\n HttpUriRequest httpRequest = new HttpGet(url);\n try {\n HttpResponse httpResponse = httpClient.execute(httpRequest);\n int statusCode = httpResponse.getStatusLine().getStatusCode();\n if (statusCode == 200) {\n return Optional.of(EntityUtils.toString(httpResponse.getEntity()));\n } else if (statusCode == 404) {\n return Optional.empty();\n } else {\n throw new DataRetrievalFailureException(\"Unexpected status code\");\n }\n } catch (IOException ex) {\n throw new DataRetrievalFailureException(\"HTTP request failed\");\n }\n }", "private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private String sendGetRequest() throws IOException {\n\t\tString inline = \"\";\n\t\tURL url = new URL(COUNTRYAPI);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.connect();\n\t\tint responsecode = conn.getResponseCode();\n\t\tif (responsecode != 200) {\n\t\t\tthrow new RuntimeException(\"HttpResponseCode: \" + responsecode);\n\t\t} else {\n\t\t\tScanner sc = new Scanner(url.openStream());\n\t\t\twhile (sc.hasNext()) {\n\t\t\t\tinline += sc.nextLine();\n\t\t\t}\n\t\t\tsc.close();\n\t\t}\n\t\treturn inline.toString();\n\t}", "public String getURL(String url) {\n\t\tString resultado =\"\";\n\t\tHttpClient c = new DefaultHttpClient();\n\t\tHttpGet get = new HttpGet(url);\n\t\tHttpResponse response = null;\n\t\ttry {\n\t\t\tresponse = c.execute(get);\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tresultado = EntityUtils.toString(response.getEntity());\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "private synchronized String execute(final HttpUriRequest request) {\n request.setParams(params);\n\n // Set the request's headers\n for (Entry<String, String> header : headers.entrySet()) {\n request.setHeader(header.getKey(), header.getValue());\n }\n\n // Execute the request and get it's content\n HttpResponse response;\n String content;\n try {\n\n // Execute the request\n response = getClient().execute(request);\n\n // Get the response content\n content = EntityUtils.toString(response.getEntity(), charset);\n } catch (IOException e) {\n throw new JsogClientException(\"Get request failed.\", e);\n }\n\n // Check the response code\n StatusLine sl = response.getStatusLine();\n if (sl.getStatusCode() != 200) {\n throw new Non200ResponseCodeException(\n sl.getStatusCode(),\n sl.getReasonPhrase(),\n content);\n }\n\n return content;\n }", "static String sendGET(String GET_URL) throws IOException, JSONException {\n\t\t// Check URL is valid or not.\n\t\tif (isValidURL(GET_URL)) {\n\t\t\ttry {\n\t\t\t\tURL obj = new URL(GET_URL);\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\t\tcon.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t\t\tint responseCode = con.getResponseCode();\n\t\t\t\tSystem.out.println(\"GET Response Code :: \" + responseCode);\n\t\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\t\t\tString inputLine;\n\t\t\t\t\tStringBuffer response = new StringBuffer();\n\n\t\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\t// Convert to json object and get specified data from it. Then you can print if the response is json type.\n\t\t\t\t\tString list = getList(response.toString());\n\t\t\t\t\tSystem.out.println(list);\n\t\t\t\t\t// print result\n\t\t\t\t\tSystem.out.println(response.toString());\n\t\t\t\t\treturn \"GET request worked\"; // Added for testing.\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t\t\t\treturn \"GET request not worked\";\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\treturn \"URL is valid but connection could not be established.\";\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"URL is valid but connection could not be established.\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"URL is not valid.\";\n\t\t}\n\t}", "private String downloadURL(String myurl) {\n\t\ttry {\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpGet request = new HttpGet(myurl);\n\t\t\t// Get the response\n\t\t\tResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t\t\tString response_str = client.execute(request, responseHandler);\n\t\t\treturn response_str;\n\n\t\t\t// Makes sure that the InputStream is closed after the app is\n\t\t\t// finished using it.\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"WL\", \"Error\");\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "public String get(String urlStr) throws IOException {\n URL url = new URL(urlStr);\n String str;\n\n long t0 = System.currentTimeMillis();\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), \"UTF-8\"), 8 * 1024)) {\n str = reader.lines().collect(Collectors.joining());\n }\n\n if (LOGGER.isDebugEnabled()) {\n long t1 = System.currentTimeMillis();\n LOGGER.debug(\"Pulling from {} took {} ms.\", urlStr, t1 - t0);\n }\n\n return str.toString();\n }", "private static String useAPI(String urlString) throws IOException {\n String inline = \"\";\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n int responsecode = conn.getResponseCode();\n if(responsecode == 200) {\n Scanner sc = new Scanner(url.openStream());\n while(sc.hasNext()) {\n inline += sc.nextLine();\n }\n sc.close();\n conn.disconnect();\n return inline;\n }\n conn.disconnect();\n return \"[]\";\n }", "private String downloadUrl(String myurl) throws IOException {\n InputStream is = null;\n // Only display the first 500 characters of the retrieved\n // web page content.\n int len = 500;\n\n try {\n URL url = new URL(myurl);\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 int response = conn.getResponseCode();\n Log.d(\"network\", \"The response is: \" + response);\n is = conn.getInputStream();\n\n // Convert the InputStream into a string\n String contentAsString = convertStreamToString(is);\n return contentAsString;\n\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "String postRequest(String url);", "private String getRequest(String requestUrl) throws IOException {\n URL url = new URL(requestUrl);\n \n Log.d(TAG, \"Opening URL \" + url.toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setDoInput(true);\n urlConnection.connect();\n String response = streamToString(urlConnection.getInputStream());\n \n return response;\n }", "public void GetCall(String url) throws ClientProtocolException, IOException {\n\t\tCloseableHttpClient httpclient=HttpClients.createDefault();\n\t\tHttpGet httpget=new HttpGet(url);\n\t//lohith\n\t\tCloseableHttpResponse closeablehttpresponse=httpclient.execute(httpget);\n\t\tint responsestatuscode=closeablehttpresponse.getStatusLine().getStatusCode();\n\t\tSystem.out.println(\"responsestatuscode: \"+responsestatuscode);\n\t\t\n\t\tString response=EntityUtils.toString(closeablehttpresponse.getEntity(),\"UTF-8\");\n\t\tSystem.out.println(\"ClientResponse: \"+response);\n\t\tJSONObject jsonobject= new JSONObject(response);\n\t\t\n\t\tSystem.out.println(\"jsonobject: \"+jsonobject);\n\t\t\n\t\t\n\t}", "public ServiceResponse getRequest(String url) throws IOException {\n HttpClient client = HttpClientBuilder.create().build();\n HttpGet request = new HttpGet(url);\n HttpResponse httpResponse = client.execute(request);\n ServiceResponse response = new ServiceResponse(httpResponse.getStatusLine().getStatusCode());\n response.setReader(new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent())));\n return response;\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\r\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\r\n try {\r\n InputStream in = urlConnection.getInputStream();\r\n\r\n Scanner scanner = new Scanner(in);\r\n scanner.useDelimiter(\"\\\\A\");\r\n\r\n boolean hasInput = scanner.hasNext();\r\n if (hasInput) {\r\n return scanner.next();\r\n } else {\r\n return null;\r\n }\r\n } finally {\r\n urlConnection.disconnect();\r\n }\r\n }", "static String getResponseFromHttpUrl(URL url) throws IOException {\n String jsonReturn = \"\";\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(CONNECTION_TIMEOUT); //connection is closed after 7 seconds\n\n try {\n InputStream inputStream = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(inputStream);\n scanner.useDelimiter(\"\\\\A\");\n\n if(!scanner.hasNext()){\n return null;\n }\n\n while(scanner.hasNext()){\n jsonReturn = jsonReturn.concat(scanner.next());\n }\n return jsonReturn;\n\n } catch (Exception e){\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n return null;\n }", "private HttpResponse executeHttpGet(String apiUrl) throws OAuthMessageSignerException,\r\n\t\t\tOAuthExpectationFailedException, OAuthCommunicationException, IOException {\r\n\t\tHttpGet httprequest = new HttpGet(apiUrl);\r\n\t\tgetOAuthConsumer().sign(httprequest);\r\n\t\tHttpClient client = new DefaultHttpClient();\r\n\t\tHttpResponse httpresponse = client.execute(httprequest);\r\n\t\tint statusCode = httpresponse.getStatusLine().getStatusCode();\r\n\t\tSystem.out.println(statusCode + \":\" + httpresponse.getStatusLine().getReasonPhrase());\r\n\t\treturn httpresponse;\r\n\t}", "@Nullable\n public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getFile(String url) {\n final String USER_AGENT = \"Mozilla/5.0\";\n\n StringBuilder response = null;\n try {\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\n // request method\n con.setRequestMethod(\"GET\");\n\n //add request header\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n System.out.println(\"Sending 'GET' request to URL : \" + url);\n System.out.println(\"Response Code : \" + responseCode);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n response = new StringBuilder();\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine).append(\"\\n\");\n }\n in.close();\n return response.toString();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "String wget(String url);", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "private static String makeHttpRequest(URL newsUrl) throws IOException{\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (newsUrl == null) {\n //returns no data\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n //Create the connection\n try {\n urlConnection = (HttpURLConnection) newsUrl.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n //Establish an HTTP connection with the server\n urlConnection.connect();\n\n //Test to see what response we get\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200){\n //Valid connection\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(TAG, \"makeHttpRequest: Error Code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e){\n Log.e(TAG, \"makeHttpRequest: Problem retrieving the news JSON results\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null){\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public String getContentFromUrl(String strUrl) throws IOException {\n String content = \"\";\n URL url = null;\n HttpURLConnection httpURLConnection = null;\n url = new URL(strUrl);\n httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setRequestMethod(Constants.METHOD_GET);\n httpURLConnection.setConnectTimeout(Constants.CONNECTION_TIME_OUT);\n httpURLConnection.setReadTimeout(Constants.READ_INPUT_TIME_OUT);\n httpURLConnection.setDoInput(true);\n httpURLConnection.connect();\n int responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n content = parserResultFromContent(httpURLConnection.getInputStream());\n }\n return content;\n }", "public static String get(String endpointURL) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n okhttp3.Request request = new Request.Builder().url(HOST + endpointURL).build();\n try {\n return client.newCall(request).execute().body().string();\n } catch (IOException e) {\n return \"error\";\n }\n }", "public String makeNetworkCall(String s) {\n\n try {\n URL url = new URL(s);\n\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n\n httpURLConnection.setRequestMethod(\"GET\");\n\n httpURLConnection.setConnectTimeout(3000);\n\n InputStream is = httpURLConnection.getInputStream();\n\n Scanner scanner = new Scanner(is);\n\n //This allows the scanner to read the entire file content in one go\n scanner.useDelimiter(\"\\\\A\");\n\n String result = \"\";\n\n if (scanner.hasNext()) {\n result = scanner.next();\n }\n\n return result;\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.e(\"TAG\", \"makeNetworkCall: Incorrect URL : \" + s);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return \"Some unexpected error occurred!\";\n\n }", "String getResponse();", "private static String facebookGetMethod(String url){\r\n System.out.println(\"@executing facebookGetMethod():\" + url);\r\n String responseStr = null;\r\n \r\n try {\r\n HttpGet loginGet = new HttpGet(url);\r\n HttpResponse response = httpClient.execute(loginGet);\r\n HttpEntity entity = response.getEntity();\r\n \r\n System.out.println(\"facebookGetMethod: \" + response.getStatusLine());\r\n if (entity != null) {\r\n responseStr = EntityUtils.toString(entity);\r\n entity.consumeContent();\r\n }\r\n \r\n int statusCode = response.getStatusLine().getStatusCode();\r\n\r\n /**\r\n * @fixme I am not sure if 200 is the only code that \r\n * means \"success\"\r\n */\r\n if(statusCode != 200){\r\n //error occured\r\n System.out.println(\"Error Occured! Status Code = \" + statusCode);\r\n responseStr = null;\r\n }\r\n System.out.println(\"Get Method done(\" + statusCode+\"), response string length: \" + (responseStr==null? 0:responseStr.length()));\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return responseStr;\r\n }", "public String fetch(String aURL, String aEncoding) {\n return webFetch2(aURL, aEncoding); \n }", "private String baseFetchRequest(URL url) {\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n\n try {\n // Create the request to OpenWeatherMap, and open the connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Read the input stream into a String\n InputStream inputStream = urlConnection.getInputStream();\n StringBuffer buffer = new StringBuffer();\n if (inputStream == null) {\n // Nothing to do.\n return null;\n }\n reader = new BufferedReader(new InputStreamReader(inputStream));\n\n String line;\n while ((line = reader.readLine()) != null) {\n // Since it's JSON, adding a newline isn't necessary (it won't affect parsing)\n // But it does make debugging a *lot* easier if you print out the completed\n // buffer for debugging.\n buffer.append(line + \"\\n\");\n }\n\n if (buffer.length() == 0) {\n // Stream was empty. No point in parsing.\n return null;\n }\n return buffer.toString();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error \", e);\n return null;\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (reader != null) {\n try {\n reader.close();\n } catch (final IOException e) {\n Log.e(LOG_TAG, \"Error closing stream\", e);\n }\n }\n }\n }", "private String executeRequest(String url) throws Exception {\n\t\t//final String METHODNAME = \"executeRequest\";\n\t\tString responseString = null;\n\t\t\n\t\tHttpURLConnection conn = null;\n\t\ttry{\n\t\t\tif(url != null){\n\t\t\t\tURL jsonURL = new URL(url);\n\t\t\t\tconn = (HttpURLConnection)jsonURL.openConnection();\n\t\t\t\tconn.setConnectTimeout(2000);\n\t\t\t\tconn.setReadTimeout(2000);\n\t\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\t\t\n\t\t\t\tInputStream in = new BufferedInputStream(conn.getInputStream());\n\t\t\t\tresponseString = org.apache.commons.io.IOUtils.toString(in, \"UTF-8\");\n\t\t\t}\n\t\t}\n\t\tcatch(IOException io){\n\t\t\tio.printStackTrace();\n\t\t\tlog.severe(\"Failed calling json service IO Error: \" + url + \" - \" + io.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Failed calling json service: \" + url + \" - \" + e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.disconnect();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn responseString;\n\t}", "protected String fetchJSON(String requestedUrl) throws IOException {\n Log.d(this.TAG, \"Hitting URL \" + requestedUrl);\n URL url = new URL(requestedUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n /* TODO: Set connection headers (User-agent, etc) */\n\n int status = connection.getResponseCode();\n if (status != HttpURLConnection.HTTP_OK) {\n throw new IOException(\"Bad URL: \" + requestedUrl);\n }\n\n InputStream in = connection.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line);\n }\n\n connection.disconnect();\n return stringBuilder.toString();\n }", "public static String getContentString(HttpURLConnection con) throws IOException{\n\n //Read the http response from the url\n BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()));\n String response = \"\", inputLine;\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n return response;\n }", "WebResponse getResponse(String url) {\n try {\n ServletUnitClient client = container.newClient();\n return client.getResponse(url);\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Failed to get response on \" + url + \". Error: \" + e.getMessage());\n }\n return null;\n }", "public static String getText(String url)\n {\n try {\n\t URL website = new URL(url);\n\t URLConnection connection = website.openConnection();\n\t BufferedReader in = new BufferedReader(\n\t new InputStreamReader(\n\t connection.getInputStream()));\n\t\n\t StringBuilder response = new StringBuilder();\n\t String inputLine = \"\";\n\t while ((inputLine = in.readLine()) != null) \n\t \tresponse.append(inputLine);\n\n\t\t\tin.close();\n\t\t\t\n\t return response.toString();\n\t\t} catch (IOException e) {\n\t\t\tDebug.Error(e.getMessage());\n\t\t}\n return \"\";\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "public String connectAndGetPage(String url) throws IOException {\n URL page = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) page.openConnection();\n conn.connect();\n InputStreamReader in = new InputStreamReader((InputStream) conn.getContent());\n BufferedReader buff = new BufferedReader(in);\n String line;\n StringBuilder sb = new StringBuilder(\"\");\n while ((line = buff.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n return sb.toString();\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 static String requestURL(String url) {\n return \"\";\n }", "java.lang.String getResponse();", "public static String get(String url, Map<String, String> params,\n Map<String, String> headers) {\n AsyncHttpClient.BoundRequestBuilder builder = asyncHttpClient.prepareGet(url);\n builder.setBodyEncoding(DEFAULT_CHARSET);\n useCookie(builder);\n if (params != null && !params.isEmpty()) {\n Set<String> keys = params.keySet();\n for (String key : keys) {\n builder.addQueryParam(key, params.get(key));\n }\n }\n if (headers != null && !headers.isEmpty()) {\n Set<String> keys = headers.keySet();\n for (String key : keys) {\n builder.addHeader(key, headers.get(key));\n }\n }\n Future<Response> f = builder.execute();\n String body = null;\n try {\n Response asd = f.get();\n body = f.get().getResponseBody(DEFAULT_CHARSET);\n addCookie(f.get().getCookies());\n } catch (Exception e) {\n logger.error(LogUtil.builder().method(\"Get Request(the result is String)\").msg(\"error,url={}\").build(), url, e);\n }\n return body;\n }", "private String sendRequest(String requestUrl) throws Exception {\n\t\t \n\t\tURL url = new URL(requestUrl);\n\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n\t\tconnection.setRequestMethod(\"GET\");\n\t\tconnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0\");\n \n\t\tBufferedReader in = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(connection.getInputStream(), \"UTF-8\"));\n\t\t\n\t\tString responseCode = Integer.toString(connection.getResponseCode());\n\t\tif(responseCode.startsWith(\"2\")){\n\t\t\tString inputLine;\n\t\t\tStringBuffer response = new StringBuffer();\n \n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tresponse.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\t\t\tconnection.disconnect();\n\t\t\treturn response.toString();\n \t} else {\n \t\tSystem.out.println(\"Unable to connect to \"+requestUrl+\n \t\t\". Please check whether the instance is up and also the security group settings\"); \n\t\t\tconnection.disconnect();\n \t\treturn null;\n\t \t} \n\t}", "private static HttpResponse sendGet() throws Exception {\n // Create the Call using the URL\n HttpGet http = new HttpGet(url);\n // Set the credentials set earlier into the headers\n Header header = new BasicScheme(StandardCharsets.UTF_8).authenticate(creds, http, null);\n // Set the header into the HTTP request\n http.addHeader(header);\n // Print the response\n return httpClient.execute(http);\n }", "public static DownloadResponse Download(String url)\n\t\t\tthrows MalformedURLException, IOException {\n\t\tStringBuffer response = new StringBuffer();\n\n\t\tHttpURLConnection con = (HttpURLConnection) (new URL(url))\n\t\t\t\t.openConnection();\n\n\t\t// optional default is GET\n\t\tcon.setRequestMethod(\"GET\");\n\n\t\t// add request header. Required. Otherwise would lead to 404 Error,\n\t\tcon.setRequestProperty(\"X-Requested-With\", \"XMLHttpRequest\");\n\n\t\tint responseCode = con.getResponseCode();\n\t\tif (responseCode != 200)\n\t\t\tthrow new IllegalStateException(\"Response Code: \" + responseCode);\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tcon.getInputStream()));\n\n\t\tString inputLine;\n\n\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\tresponse.append(inputLine + \"\\n\");\n\t\t}\n\t\tin.close();\n\t\t\t\t\n\t\tDownloadResponse r = new DownloadResponse();\n\t\tr.setHtml(response.toString());\n\t\tr.setUrl(con.getURL().toString());\n\n\t\treturn r;\n\t}", "public String fetch(String uri) throws Exception {\n\n // Http Client marries together a request and response.\n HttpClient httpClient = new DefaultHttpClient();\n\n // what URI do we want to receive?\n HttpGet httpGet = new HttpGet(uri);\n\n // handle the response\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n\n // access the URI and get back the return data.\n String returnData = null;\n\n returnData = httpClient.execute(httpGet, responseHandler);\n\n // return data\n return returnData;\n }", "private static InputStream getHttpConnection(String urlString)\n throws IOException {\n InputStream stream = null;\n URL url = new URL(urlString);\n URLConnection connection = url.openConnection();\n\n try {\n HttpURLConnection httpConnection = (HttpURLConnection) connection;\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.connect();\n\n if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = httpConnection.getInputStream();\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return stream;\n }", "private String getResponseFromHttpUrl(URL url) throws IOException {\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.addRequestProperty(\"Authorization\",\"Bearer JVNDXWXVDDQN2IJUJJY7NQXCPS23M7DX\");\n try{\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n boolean hasInput = scanner.hasNext();\n if(hasInput){\n return scanner.next();\n }else{\n return null;\n }\n }finally {\n urlConnection.disconnect();\n }\n }", "private static InputStream performNetworkRequest(URL url) {\n if (url == null) {\n Log.e(LOG_TAG, \"Provided URL is null, exiting method early\");\n return null;\n }\n\n HttpURLConnection connection = null;\n InputStream responseStream = null;\n\n try {\n connection = (HttpURLConnection) url.openConnection();\n connection.setConnectTimeout(10000);\n connection.setReadTimeout(90000);\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n int responseCode = connection.getResponseCode();\n if (responseCode != 200) {\n Log.e(LOG_TAG, \"Response code different from expected code 200. Received code: \" + responseCode + \", exiting method early\");\n return null;\n }\n responseStream = connection.getInputStream();\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem occured while performing network request\");\n e.printStackTrace();\n }\n return responseStream;\n }", "@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}" ]
[ "0.7588554", "0.74719566", "0.73666817", "0.7298077", "0.71523833", "0.71420467", "0.700661", "0.69952714", "0.6898827", "0.6898273", "0.6897492", "0.68913054", "0.68853784", "0.6879528", "0.6840855", "0.68196535", "0.6812248", "0.6811214", "0.67705256", "0.6765857", "0.67496765", "0.6727757", "0.66923004", "0.66871786", "0.66736525", "0.6670441", "0.666631", "0.66634923", "0.6659065", "0.6651319", "0.6632393", "0.6589966", "0.65783644", "0.6563137", "0.6519369", "0.6518065", "0.6501501", "0.6494681", "0.64843625", "0.64681494", "0.6464897", "0.6451718", "0.6443582", "0.6443204", "0.64273816", "0.6336187", "0.6328966", "0.6322889", "0.6320278", "0.6314835", "0.6301716", "0.62864685", "0.6249262", "0.6247447", "0.6241298", "0.62372005", "0.6230454", "0.6227323", "0.62252843", "0.6213613", "0.6211998", "0.6166159", "0.6150378", "0.6138559", "0.6124272", "0.6124207", "0.6117977", "0.61100477", "0.6110008", "0.6110008", "0.6110008", "0.6110008", "0.6097019", "0.609652", "0.60945445", "0.608679", "0.6081359", "0.60804415", "0.6075861", "0.6039653", "0.60260737", "0.6024897", "0.6011178", "0.6005319", "0.5989295", "0.598921", "0.5988698", "0.59844875", "0.5973533", "0.59620273", "0.5958141", "0.59419155", "0.5932293", "0.5910894", "0.59065723", "0.590521", "0.58897", "0.5881166", "0.58703125", "0.5869512" ]
0.691461
8
TODO Autogenerated method stub
@Override public boolean shouldOverrideUrlLoading(WebView view, String url) { return super.shouldOverrideUrlLoading(view, url); }
{ "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
Exercise API functions on the hashtable argument
private void doAPITest(Map<Object,Object> table) { int size = table.size(); Object key, value; Map<Object,Object> clone = cloneMap(table); // retrieve values using values() Collection<Object> values = table.values(); // retrieve keys using keySet() Set<Object> keySet = table.keySet(); Object[] keySetArray = keySet.toArray(); int step = 1 + random.nextInt(5); for (int i=0; i<keySetArray.length; i=i+step) { key = keySetArray[i]; // retrieve value value = table.get(key); // assert value is in the table assertTrue(table.containsValue(value)); /* * assertTrue(table.contains(value)); // Removed as not supported by the Map interface, and identical to containsValue * if value is a wrapped key then check it's equal * to the key */ if (value instanceof CustomValue) { assertEquals(key, ((CustomValue)value).key); } // count how many occurrences of this value there are int occurrences = numberOccurrences(values, value); // find the Map.Entry Set<Map.Entry<Object, Object>> entrySet = table.entrySet(); Iterator<Map.Entry<Object, Object>> entrySetIterator = entrySet.iterator(); Map.Entry<Object,Object> entry = null; do { entry = entrySetIterator.next(); } while (!entry.getKey().equals(key)); // remove from table in different ways switch (i % 3) { case 0: table.remove(key); break; case 1: keySet.remove(key); break; default: entrySet.remove(entry); } // assert key is no longer in the table assertFalse(table.containsKey(key)); // assert key is no longer in the keyset assertFalse(keySet.contains(key)); // assert key is no longer in the entrySet assertFalse(entrySet.contains(entry)); // assert that there's one fewer of this value in the hashtable assertEquals(occurrences, numberOccurrences(values, value) + 1); // re-insert key table.put(key, value); // assert key is in the table assertTrue(table.containsKey(key)); // assert key is in the keyset assertTrue(keySet.contains(key)); // assert EntrySet is same size assertEquals(size, entrySet.size()); } // test hashtable is the same size assertEquals(size, table.size()); // test keySet is expected size assertEquals(size, keySet.size()); // retrieve keys using keys() Iterator<?> keys = table.keySet().iterator(); // remove a subset of elements from the table. store in a map int counter = table.size() / 4; Map<Object,Object> map = new HashMap<Object, Object>(); while (keys.hasNext() && counter-- >= 0) { key = keys.next(); value = table.get(key); map.put(key, value); keys.remove(); // removes the most recent retrieved element } // re-add the elements using putAll table.putAll(map); // test equal to copy assertEquals(clone, table); // clear the copy clone.clear(); // assert size of clone is zero assertEquals(0, clone.size()); // assert size of original is the same assertEquals(size, table.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tHashtable h = new Hashtable();\n\t\th.put(\"A\", \"Test\");//h.put(key, value);\n\t\th.put(\"B\", \"Hello\");\n\t\th.put(\"C\", \"World\");\n\t\tSystem.out.println(h.size());\n\t\t\n\t\th.put(1, 100);//put to insert data\n\t\th.put(2, 200);\n\t\th.put(3, 300);\n\t\th.put(4, 400);\n\t\tSystem.out.println(h.size());\n\t\t\n\t\tSystem.out.println(h.get(2));\n\t\tSystem.out.println(h.get(\"C\"));\n\t\t\n\t\t//to restrict type it could take\n\t\tHashtable<Integer,String> h1 = new Hashtable<Integer,String>();\n\t\th1.put(10, \"Cute\");\n\t\tSystem.out.println(h1.get(10));\n\t}", "public void add2Hash( Hashtable h, String source ) {\n \n AstCursor c = new AstCursor();\n \n for ( c.FirstElement( this ); c.MoreElement(); c.NextElement() ) {\n Es es = ( Es ) c.node;\n es.add2Hash( h, source );\n }\n }", "@org.junit.jupiter.api.Test\n void get() {\n HashTable hashTable = new HashTable();\n // Intentamos coger un valor inexistente\n assertNull(hashTable.get(\"0\"));\n System.out.println(hashTable);\n\n // Pedimos un elemento que no exista en la LinkedList\n assertNull(hashTable.get(\"58\"));\n System.out.println(hashTable);\n // Pedimos un elemento existente\n hashTable.put(\"1\",\"Paquito\");\n assertEquals(\"Paquito\", hashTable.get(\"1\"));\n System.out.println(hashTable);\n // Pedimos un valor que ha colisionado y existe en la LinkedList\n hashTable.put(\"34\",\"Willyrex\");\n assertEquals(\"Willyrex\", hashTable.get(\"34\"));\n System.out.println(hashTable);\n }", "public static void main(String[] args) {\n\t\tHashtable ht1 = new Hashtable();\n\t\tht1.put(1, 10);\n\t\tht1.put(\"Ap\", \"Apple\");\n\t\tht1.put('c', 'x');\n\t\tht1.put(12.34, 56.78);\n\t\tht1.put(true, false);\n\t\tht1.put(2, \"Banana\");\n\t\tht1.put(\"AB\", 22.33);\t\t\n\n\t\tSet keys = ht1.keySet();\n\t\tfor(Object key : keys)\n\t\t{\n\t\t\tSystem.out.println(ht1.get(key));\n\t\t}\n\t\t\n\t\t// We can restrict the data type using Wrapper classes\n\t\tHashtable<Integer, String> ht2 = new Hashtable<Integer, String>();\n\t\tht2.put(1, \"apple\");\n\t\tht2.put(20, \"banana\");\n\t\tSystem.out.println(ht2.get(1));\n\t\tSystem.out.println(ht2.get(20));\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tHashtable h = new Hashtable();\n\t\t\n\t\th.put(1, 30);\n\t\th.put(2, 60);\n\t\th.put(\"class\", \"11th\");\n\t\th.put(\"name\", \"password\");\n\t\th.put(67, \"fail\");\n\t\t\n\t\tSystem.out.println(\"The size of the hashtable is \" + h.size());\n\t\t\n\t\tHashtable emp = new Hashtable();\n\t\t\n\t\temp = (Hashtable)h.clone();\n\t\t\n\t\tSystem.out.print(emp + \" \");\n\t\t\n\t\t\n\t\t// 2.Hashtable with generic data type of key and value pair\n\t\tHashtable <Integer, Integer> h1 = new Hashtable <Integer, Integer> ();\n\t\t\n\t\th1.put(1, 10);\n\t\th1.put(2, 20);\n\t\th1.put(3,30);\n\t\th1.put(4,40);\n\t\t\n Hashtable emp1 = new Hashtable();\n\t\t\n\t\temp1 = (Hashtable)h1.clone();\n\t\t\n\t\tSystem.out.print(emp1 + \" \");\n\t\t\n //3. To display only values by using enumeration \n\t\t\n\t\tHashtable h2 = new Hashtable(); \n \n\t\th2.put(3, \"Geeks\"); \n h2.put(2, \"forGeeks\"); \n h2.put(1, \"isBest\"); \n \n // create enumeration \n Enumeration e = h2.elements(); \n \n System.out.println(\"display values:\"); \n \n while (e.hasMoreElements()) \n { \n System.out.println(e.nextElement());\n \n } \n\tSystem.out.println(\"***************************\");\t\n\t\n\t\n }", "public BVHashtable(Hashtable hashtable)\n {\n super(hashtable);\n }", "public static void main(String[] args)\n {\n Hashtable<String, Integer> ht = new Hashtable<>();\n\n // Add elements to the hashtable\n ht.put(\"Palak\", 10);\n ht.put(\"Soumya\", 30);\n ht.put(\"Kalash\", 20);\n\n // Print size and content\n System.out.println(\"Size of map is:- \" + ht.size());\n System.out.println(ht);\n\n // Check if a key is present and if\n // present, print value\n if (ht.containsKey(\"Palak\")) {\n Integer a = ht.get(\"Palak\");\n System.out.println(\"value for key\" + \" \\\"Palak\\\" is:- \" + a);\n }\n }", "private String a(String paramString, HashMap paramHashMap)\n {\n }", "void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);", "private static void LessonHash() {\n\n System.out.println(\"---Hash Table---\");\n\n Hashtable<Integer, String> oopPrinciples = new Hashtable<>();\n oopPrinciples.put(1, \"Inheritance\");\n oopPrinciples.put(2, \"Polymorphism\");\n oopPrinciples.put(3, \"Abstraction\");\n oopPrinciples.put(4, \"Encapsulation\");\n //oopPrinciples.put(5, null); // throws null pointer execption\n\n //Single output from hashtable\n System.out.println(oopPrinciples.get(3));\n\n //All values\n for(Integer key : oopPrinciples.keySet()) {\n System.out.println(oopPrinciples.get(key));\n };\n System.out.println(\"----------------\");\n\n // Key-Value Pairs / Value List\n /*\n Hash Map\n 1.) Does allow null for either key or value\n 2.) unsynchronized, not thread safe, but performance is better\n */\n\n System.out.println(\"---Hash Map---\");\n\n HashMap<Integer, String> oopPrinciples2 = new HashMap<>();\n oopPrinciples2.put(1, \"Inheritance\");\n oopPrinciples2.put(2, \"Polymorphism\");\n oopPrinciples2.put(3, \"Abstraction\");\n oopPrinciples2.put(4, \"Encapsulation\");\n oopPrinciples2.put(5, null);\n\n //Single output from hashtable\n System.out.println(oopPrinciples2.get(3));\n\n //All values\n for(Integer key : oopPrinciples.keySet()) {\n System.out.println(oopPrinciples.get(key));\n };\n System.out.println(\"----------------\");\n\n // Key-Value Pairs / Value List\n /*\n Hash Set\n 1.) Built in mechanism for duplicates\n 2.) used for when you wanna maintain unique list\n */\n\n System.out.println(\"---Hash Set---\");\n\n HashSet<String> oopPrinciples3 = new HashSet<>();\n oopPrinciples3.add(\"Inheritance\");\n oopPrinciples3.add(\"Polymorphism\");\n oopPrinciples3.add(\"Abstraction\");\n oopPrinciples3.add(\"Encapsulation\");\n\n //Single output from hashtable\n System.out.println(oopPrinciples3);\n\n //All values\n for(String s : oopPrinciples3) {\n System.out.println(s);\n }\n\n if(oopPrinciples.contains(\"Inheritance\")) {\n System.out.println(\"Value does exist!\");\n } else {\n System.out.println(\"Value does not exist!\");\n }\n\n System.out.println(\"----------------\");\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\tHashtable h1= new Hashtable();\n\t\th1.put(1,\"Tom\");\n\t\th1.put(2,\"Jerry\");\n\t\th1.put(3,\"Harry\");\n\t\t//create Clone/Shallow copy\n\t\tHashtable h2= new Hashtable();\n\t\th2=(Hashtable)h1.clone();\n\t\th1.clear();\n\t\t\n\t\tSystem.out.println(\"The value from h1:\"+ h1);\n\t\tSystem.out.println(\"The value from h2:\"+ h2);\n\t\t\n\t\t//Contains value\n\t\t\n\t\tHashtable h3=new Hashtable();\n\t\th3.put(\"A\", \"Selenium\");\n\t\th3.put(\"B\", \"Sahi\");\n\t\th3.put(\"C\", \"RFT\");\n\t\t\n\t\tif(h3.containsValue(\"Sahi\")){\n\t\t\tSystem.out.println(\"yes calue is present\");\n\t\t}\n\t\t\n\t\t//Print all the key and value of the Hashtable\n\t\tEnumeration e=h3.elements();\n\t\tSystem.out.println(\"Print values from h3\");\n\t\twhile(e.hasMoreElements()){\n\t\t\tSystem.out.print(e.nextElement());\n\t\t}\n\t\t// Print using entryset\n\t\tSet s=h3.entrySet();\n\t\tSystem.out.println(s);\n\t\t\n\t\t//check both hastable are equal or not\n\t\tHashtable h4=new Hashtable();\n\t\th4.put(\"A\", \"Selenium\");\n\t\th4.put(\"B\", \"Sahi\");\n\t\th4.put(\"C\", \"RFT\");\n\t\t\n\t\tif(h3.equals(h4)){\n\t\t\tSystem.out.println(\"Yes h3 and h4 are equal\");\n\t\t}\n\t\t\n\t\t//get key \n\t\tSystem.out.println(h4.get(\"A\"));\n\t\t\n\t\t//Hashcode value of hashtable\n\t\tSystem.out.println(h3.hashCode());\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n Map<Integer, String> ht = new Hashtable<>();\n \n // hash = 7, so, (7 & 0x7FFFFFFF) % 11 => 7 % 11 => 7. So, it stores the element in 7th index bucket location\n ht.put(7, \"aa\"); \n ht.put(11, \"ba\");\n ht.put(1, \"ad\");\n ht.put(15, \"sa\");\n ht.put(20, \"rea\");\n \n // hash = 18, so, (18 & 0x7FFFFFFF) % 11 => 18 % 11 => 7. So, it stores the element in 7th index bucket location.\n // But we already have one element then this new element will have next pointer variable. It will point to the element whcih already exists.\n // Then this new element will be placed in the 7th index.\n ht.put(18, \"ewa\");\n\n // When we iterate the elements it will iterate from top to bottom and right to left only.\n // Same index we have a possibility of multiple elements. So, it will read it from right to left.\n System.out.println(ht);\n }", "private void createHashtable()\n {\n int numLanguages = languages.length;\n mapping = new Hashtable(numLanguages, 1.0f);\n for (int i = 0; i < numLanguages; i++)\n mapping.put(languages[i], values[i]);\n }", "public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tHashtable hashtableObj = new Hashtable();\r\n\t\thashtableObj.put(new CustomKey(5), \"A\");\r\n\t\thashtableObj.put(new CustomKey(2), \"B\");\r\n\t\thashtableObj.put(new CustomKey(6), \"C\");\r\n\t\thashtableObj.put(new CustomKey(15), \"D\");\r\n\t\thashtableObj.put(new CustomKey(23), \"E\");\r\n\t\thashtableObj.put(new CustomKey(16), \"F\");\r\n//\t\thashtableObj.put(\"Bas\", null); //java.lang.NullPointerException\r\n\t\tSystem.out.println(hashtableObj); // hashcode ret value is i =>{6=C, 16=F, 5=A, 15=D, 2=B, 23=E} based on size of Hashtable is 11 and (i %11)\r\n\t\t\t\t\t\t\t\t\t\t// if the return value of hashCode is (i %9) then outputs is => {16=F, 15=D, 6=C, 23=E, 5=A, 2=B}\r\n\t}", "public void applyParameters(java.util.Hashtable target);", "public static void main(String[] args) {\n\t\tHashtable<String, Integer> myHashTable = new Hashtable<String, Integer>();\n\n\t\tmyHashTable.put(\"Wheel\", 4); // Store value 4 In key = Legs\n\t\tmyHashTable.put(\"Headlights\", 2); // Store value 2 In key = Eyes\n\t\tmyHashTable.put(\"Steering Wheel\", 1); // Store value 1 In key = Mouth\n\n\t\t// Accessing hash table values using keys.\n\t\tSystem.out.println(\"A car has \" + myHashTable.get(\"Wheel\") + \" wheels.\");\n\t\tSystem.out.println(\"A car has \" + myHashTable.get(\"Headlights\") +\" headlights.\");\n\t\tSystem.out.println(\"A car has \" + myHashTable.get(\"Steering Wheel\") + \" steering wheel.\");\n\t}", "public void testLookups() throws Exception {\n // value equality\n result = eval(\"key = 'a'; hash = {key => 'one'}; hash.store('a', 'two'); puts hash[key]\");\n assertEquals(\"two\", result);\n result = eval(\"key = [1,2]; hash = {key => 'one'}; hash[[1,2]] = 'two'; puts hash[key]\");\n assertEquals(\"two\", result);\n result = eval(\"key = :a; hash = {key => 'one'}; hash[:a] = 'two'; puts hash[key]\");\n assertEquals(\"two\", result);\n result = eval(\"key = 1234; hash = {key => 'one'}; hash[1234] = 'two'; puts hash[key]\");\n assertEquals(\"two\", result);\n result = eval(\"key = 12.4; hash = {key => 'one'}; hash[12.4] = 'two'; puts hash[key]\");\n assertEquals(\"two\", result);\n result = eval(\"key = 19223372036854775807; hash = {key => 'one'}; hash[19223372036854775807] = 'two'; puts hash[key]\");\n assertEquals(\"two\", result);\n // identity equality\n result = eval(\"key = /a/; hash = {key => 'one'}; hash[/a/] = 'two'; puts hash[key]\");\n assertEquals(\"one\", result);\n result = eval(\"key = (1..3); hash = {key => 'one'}; hash[(1..3)] = 'two'; puts hash[key]\");\n assertEquals(\"two\", result);\n }", "public void mo9224a(HashMap<String, String> hashMap) {\n }", "public static void main(String[] args) {\n\t\tHashMap<String,Integer> map=new HashMap<>();\n\t\tmap.put(null, 11);\n\t\tmap.put(null, 222);\n\t\t\n\t\tHashtable<String, Integer> table=new Hashtable<>();\n\t\t//table.put(null, 11);\n\t\tSystem.out.println(table);\n\t\tSystem.out.println(map);\n\t\tSystem.out.println(\"Hello\");\n\t\t\n\t\tString s1 = \"abc\";\n\t\tString s2 = \"abc\";\n\t\tSystem.out.println(\"s1 == s2 is:\" + s1 == s2);\n\n\t}", "public static void main(String[] args) {\n\t\tHashtable<Integer,String> i=new Hashtable<Integer,String>();\n\t\t // Initialization of Hashtable\n\t\ti.put(1,\"COA\"); // Inserting the elements\n\t\ti.put(2,\"DBMS\");\n\t\ti.put(3,\"ADS\");\n\t\ti.put(4,\"ADJ\");\n\t\t// print mappings\n\t\tSystem.out.println(\"Mappings of hashtable : \"+i);\n\n\t}", "@org.junit.Test\n public void get() throws Exception {\n assertEquals(null, hashTable.get(\"savon\"));\n assertEquals(\"camp\", hashTable.get(\"math\"));\n hashTable.put(\"math\", \"club\");\n assertEquals(\"club\", hashTable.get(\"math\"));\n }", "public final void mo18090a(Hashtable hashtable) {\n HashMap hashMap = new HashMap();\n for (Entry entry : hashtable.entrySet()) {\n String str = (String) f3784a.get(entry.getKey());\n if (str == null) {\n str = (String) entry.getKey();\n }\n this.f3787e.f3806b.remove(str);\n hashMap.put(str, entry.getValue());\n }\n this.f3788f.f3806b = hashMap;\n setChanged();\n }", "void setHashMap();", "public static void main(String[] args) {\n\n HashMap<String, Integer> hm = new HashMap<>();\n\n hm.put(\"Lion\", 1);\n hm.put(\"Tiger\", 2);\n hm.put(\"Elephant\", 3);\n hm.put(\"Cat\", 4);\n hm.put(\"Dog\", 5);\n\n System.out.println(returnValue(hm));\n\n }", "public static void main(String[] args) {\n HashTableChained hashtable = new HashTableChained();\n int i = 1;\n while (i <= 50) {\n int rando = (int) Math.random() * 1000;\n hashtable.insert(new Integer(rando), \"TestVal\");\n i++;\n }\n hashtable.insert(\"Robby\", \"This is the one.\");\n while (i <= 1000) {\n int rando = (int) Math.random() * 1000;\n hashtable.insert(new Integer(rando), \"TestVal\");\n i++;\n }\n System.out.println(hashtable.size());\n System.out.println(hashtable.find(\"Robby\").value());\n }", "public static void main(String[] args) {\n Hashtable<String, String> hm = new Hashtable<String, String>();\n\n hm.put(\"007\", \"���dz�\");\n // hm.put(null, \"����\"); // NullPointerException\n // hm.put(null, \"����\");\n // hm.put(\"9527\", null); // NullPointerException\n\n System.out.println(hm);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\t Hashtable<String, String> hm = new Hashtable<String, String>();\r\n\t //add key-value pair to Hashtable\r\n\t hm.put(\"first\", \"FIRST INSERTED\");\r\n\t hm.put(\"second\", \"SECOND INSERTED\");\r\n\t hm.put(\"third\",\"THIRD INSERTED\");\r\n\t // hm.put(null,null); Throw run time error - NullPointer Exception\r\n\t Iterator it = (Iterator) hm.keys();\r\n\t System.out.println(\"My Hashtable content:\");\r\n\t System.out.println(hm); // Display the contents by key wise reverse order\r\n\t //Checking Keys\r\n\t if(hm.containsKey(\"first\")){\r\n\t System.out.println(\"The Hashtable contains key first\");\r\n\t } else {\r\n\t System.out.println(\"The Hashtable does not contains key first\");\r\n\t }\r\n\t // Checking Value \r\n\t if(hm.containsValue(\"SECOND INSERTED\")){\r\n\t System.out.println(\"The Hashtable contains value SECOND INSERTED\");\r\n\t } else {\r\n\t System.out.println(\"The Hashtable does not contains value SECOND INSERTED\");\r\n\t }\r\n\t //Clearing Items\r\n\t \r\n\t System.out.println(\"Clearing Hashtable:\");\r\n\t hm.clear();\r\n\t System.out.println(\"Content After clear:\");\r\n\t System.out.println(hm);}", "public static void main(String[] args)\n\t{\n\t\t\n\t\tHashMap<String, Integer> map=new HashMap<String, Integer>(); // creating hashmap\n\t\t\n\t\tmap.put(\"Vishal\",12276); // adding object\n\t\tmap.put(\"Rashmi\",12277);\n\t\tmap.put(\"Shubhangi\",12278);\n\t\tmap.put(null,12279); // allowed null key so give value\n\t\t\n\t//\tSystem.out.println(map.get(\"Rashmi\")); \n\t//\tSystem.out.println(map.get(null)); \n\t\t\n\t\tSet<String> set =map.keySet(); // fetching all the value of key\n\t\t\n\t\tfor(String s:set)\n\t\t{\n\t\t\tSystem.out.println(map.get(s)); // iterating key..\n\t\t}\n\t\t\n\t\tSystem.out.println(\"--------------------\");\n\t\t\n\t\tHashtable<String, String> map2 = new Hashtable<String, String>();\n\t\t\n\t\tmap2.put(\"Firstname\", \"Vishal\");\n\t\tmap2.put(\"Lastname\",\"Pandey\");\n\t\t//map2.put(null,\"test\"); // will not allowed null key so give null pointer exception error.\n\t\t\n\t\tSystem.out.println(map2.get(null));\n\t\t\n\n\t}", "public static void main(String[] args) \n\t { \n\t\t \n\t//\t ScrabbleCheater11 cheat = new ScrabbleCheater11();\n\t//\t Dictionary11 dict = new Dictionary11(1,\"C:\\\\words\\\\words-279k.txt\");\n\t \n\t\t MyHashTable11 htable = new MyHashTable11(7591,\"src/lab11_scrabble/wordsList_collins2019.txt\"); \n\t \t\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"against\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"against\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"against\");\n\t \n\t \tSystem.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"airport\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"airport\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"airport\");\n\t \t\n\t \tSystem.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"between\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"between\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"between\");\n\n\t \tSystem.out.println();\n\t\t System.out.print(\"All the words in the bucket where the word \"+ \"\\\"married\\\"\" + \" is located: \");\n\t\t System.out.println();htable.getWordsFromSameBucket(\"married\");\n\t\t System.out.println();\n\t\t System.out.println();\n\t\t htable.findPermutation(\"married\");\n\t\t \n\t\t System.out.println();\n\t \tSystem.out.print(\"All the words in the bucket where the word \"+ \" \\\"ashbdap\\\" \" + \" is located: \");\n\t \tSystem.out.println();\n\t \thtable.getWordsFromSameBucket(\"ashbdap\");\n\t \tSystem.out.println();\n\t \tSystem.out.println();\n\t \thtable.findPermutation(\"ashbdap\");\n\t \t\n\t \t//test remove and size()\n\t \tSystem.out.println(htable.remove(\"speaned\"));\n\t \tSystem.out.println(htable.get(\"speaned\"));\n\t \tSystem.out.println(htable.size());\n\t }", "@Override\r\n\tpublic void displayHashTable()\r\n\t{\r\n\t\tSystem.out.println(hm.toString());\r\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tHashtable<Temp, String> h = new Hashtable<>();\r\n\t\th.put(new Temp(1), \"A\");\r\n\t\th.put(new Temp(25), \"B\");\r\n\t\th.put(new Temp(30), \"C\");\r\n\t\th.put(new Temp(10), \"D\");\r\n\t\tSystem.out.println(h);\r\n\t\t//{30=C, 10=D, 25=B, 1=A}---when hashcode returns i\r\n\t\t//{25=B, 30=C, 1=A, 10=D}---when hashcode returns i%9\r\n\t\t\r\n\t\t//constructor with initial capacity\r\n\t\t//here if hashcode exceeds 4 then, modules of 5 is done. \r\n\t\tHashtable<Temp1, String> h1 = new Hashtable<>(5);\r\n\t\th1.put(new Temp1(1), \"A\");\r\n\t\th1.put(new Temp1(25), \"B\");\r\n\t\th1.put(new Temp1(30), \"C\");\r\n\t\th1.put(new Temp1(10), \"D\");\r\n\t\tSystem.out.println(h1);\r\n\t\t//{25=B, 10=D, 1=A, 30=C}\r\n\t\t\r\n\t\t//constructor using initial capacity and fill ratio.\r\n\t\tHashtable<Temp1, String> h2 = new Hashtable<>(5,0.4f);\r\n\t\th2.put(new Temp1(1), \"A\");\r\n\t\th2.put(new Temp1(25), \"B\");\r\n\t\th2.put(new Temp1(30), \"C\");\r\n\t\th2.put(new Temp1(10), \"D\");\r\n\t\tSystem.out.println(h2);\r\n\t\t//{30=C, 1=A, 10=D, 25=B}\r\n\t\t//{25=B, 10=D, 1=A, 30=C}\r\n\t\t\r\n\t\t//constructor using Map\r\n\t\tHashtable<Temp1, String> h3 = new Hashtable<>(h2);\r\n\t\tSystem.out.println(h3);\r\n\t}", "public abstract int doHash(T t);", "@Test\n public void testDictionaryCodeExamples() {\n logger.info(\"Beginning testDictionaryCodeExamples()...\");\n\n // Create a dictionary with some associations in it\n String[] keys = { \"charlie\", \"bravo\", \"delta\" };\n Integer[] values = { 3, 2, 4 };\n Dictionary<Integer> dictionary = new Dictionary<>(keys, values);\n logger.info(\"A dictionary of numbers: {}\", dictionary);\n\n // Add a new association\n dictionary.setValue(\"alpha\", 1);\n logger.info(\"Appended a \\\"alpha-1\\\" key-value pair: {}\", dictionary);\n\n // Sort the dictionary\n dictionary.sortElements();\n logger.info(\"The list now sorted: {}\", dictionary);\n\n // Retrieve the value for a key\n int value = dictionary.getValue(\"charlie\");\n logger.info(\"The value for key \\\"charlie\\\" is: {}\", value);\n\n // Remove an association\n dictionary.removeValue(\"charlie\");\n logger.info(\"With the value for key \\\"charlie\\\" removed: {}\", dictionary);\n\n logger.info(\"Completed testDictionaryCodeExamples().\\n\");\n }", "public static void main(String[] args)\n\t{\n\t\tSystem.out.println(\"Hash Table Testing\");\n\t\t\n\t\tMyHashTable table = new MyHashTable();\n\t\t\n\t\ttable.IncCount(\"hello\");\n\t\ttable.IncCount(\"hello\");\n\t\t\n\t\ttable.IncCount(\"world\");\n\t\ttable.IncCount(\"world\");\n\t\ttable.IncCount(\"world\");\n\t\ttable.IncCount(\"world\");\n\t\t\n\t\ttable.IncCount(\"Happy Thanksgiving!\");\n\t\ttable.IncCount(\"Happy Thanksgiving!\");\n\t\ttable.IncCount(\"Happy Thanksgiving!\");\n\t\t\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\t\n\t\ttable.IncCount(\"cool\");\n\t\t\n\t\ttable.IncCount(\"Assignment due\");\n\t\ttable.IncCount(\"Assignment due\");\n\t\t\n\t\ttable.IncCount(\"Wednesday\");\n\t\t\n\t\ttable.IncCount(\"night\");\n\t\ttable.IncCount(\"night\");\n\t\t\n\t\ttable.IncCount(\"at\");\n\t\t\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\t\n\t\tStringCount[] counts = table.GetCounts();\n\t\tString output = \"\";\n\t\t\n\t\tfor(int i = 0; i < counts.length; i++)\n\t\t{\n\t\t\tif(counts[i] != null)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"[\" + counts[i].str +\",\" + counts[i].cnt + \"], \");\n\t\t\t\toutput += \"[\" + counts[i].str +\",\" + counts[i].cnt + \"], \";\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.print(\"NULL!!!!! \" + i);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tif(output.compareTo(\"[Assignment due,2], [Food,7], [Happy Thanksgiving!,3], [TWELVE!!!,5], [Wednesday,1], [at,1], [cool,1], [hello,2], [night,2], [world,4], \") == 0)\n\t\t\tSystem.out.println(\"Success! Output is correct.\");\n\t\telse\n\t\t\tSystem.out.println(\"Failure! The output wasn't correct. Output was: \\\"\" + output +\"\\\"\");\n\t}", "private void setupKeywordHashTable() {\n \tthis.keywordHashTable = new Hashtable<>();\n\n this.keywordHashTable.put(\"begin\", \"BeginKwTK\");\n this.keywordHashTable.put(\"end\", \"EndKwTK\");\n this.keywordHashTable.put(\"loop\", \"LoopKwTK\");\n this.keywordHashTable.put(\"void\", \"VoidKwTK\");\n this.keywordHashTable.put(\"var\", \"VarKwTK\");\n this.keywordHashTable.put(\"return\", \"ReturnKwTK\");\n this.keywordHashTable.put(\"in\", \"InKwTK\");\n this.keywordHashTable.put(\"out\", \"OutKwTK\");\n this.keywordHashTable.put(\"program\", \"ProgramKwTK\");\n this.keywordHashTable.put(\"iffy\", \"IffyKwTK\");\n this.keywordHashTable.put(\"then\", \"ThenKwTK\");\n this.keywordHashTable.put(\"let\", \"LetKwTK\");\n this.keywordHashTable.put(\"data\", \"DataKwTK\");\n }", "public static void main(String[] args) {\n\t\tHashMapCreation cr = new HashMapCreation();\n\t\tHashMap<Integer , String> hp = new HashMap<Integer , String>();\n\t\thp = cr.createMap(hp, 34,\"Rahul\");\n\t\thp = cr.createMap(hp, 22,\"John\");\n\t\thp = cr.createMap(hp, 86,\"Sam\");\n\t\thp = cr.createMap(hp, 65,\"Nancy\");\n\t\thp = cr.createMap(hp, 66,\"April\");\n\t\t//cr.removeKey(hp, 22);\n\t\tString srr = cr.getValue(hp, 34);\n\t\tSystem.out.println(\"The value for key 34 is: \" + srr);\n\t\t// Display content\n\t\tfor(int key : hp.keySet())\n\t\t\tSystem.out.println(\"key and Value : \" + key +\" \" + hp.get(key));\n\t}", "public static void main(String[] args) {\n\t\n\t\tHashMapImplementation hm = new HashMapImplementation();\n\t\thm.add(5);\n\t\thm.add(6);\n\t\thm.remove(6);\n\t\tSystem.out.print(hm.containsKey(5));\n\t}", "private V put(K key, V value, Chain<K, V>[] table) {\r\n int index = key.hashCode() % table.length;\r\n if (index < 0)\r\n index += table.length;\r\n if (table[index]== null)\r\n {\r\n table[index] =new Chain<>(key,value) ;\r\n numKeys++;\r\n return null;\r\n }\r\n else if(table[index].data.equals(key))\r\n return table[index].data.setValue(value);\r\n else if (table[index].next==null)\r\n {\r\n table[index].next=new HashtableChain<>(prime);\r\n prime=previousPrime(prime-1);\r\n numKeys++;\r\n return table[index].next.put(key,value);\r\n }else\r\n return put(key,value,table[index].next.table);\r\n }", "@Test\r\n void test3(){\r\n HashDictionary D=new HashDictionary();\r\n D.set(8,9);\r\n assertEquals(D.set(8,7),9);\r\n }", "public static void main(String[] args) {\n\t\tHashMap<String, String> hm = new HashMap<String, String>();\n\t\thm.put(\"A1\", \"Distributed Software Systems\");\n\t\thm.put(\"A2\", \"Distributed Software Systems\");\n\t\t\n\t\tHashMapImplementation.hm.put(\"A1\", \"Distributed Software Systems\");\n\t\thm.put(\"A3\", \"Distributed Software Systems\");\n\t\t\n\t\tSystem.out.println(hm.hashCode());\n\t\tSystem.out.println(hm.entrySet());\n\n\t\t\n// Different ways of Iterating through a hashmap\t\t\n\t\tIterator it = hm.entrySet().iterator();\t\t// EntrySet \n\t\t\n\t\n\t\tfor(;it.hasNext();){\n\t\t\tMap.Entry<String, String> current = (Map.Entry<String, String>)it.next();\n\t\t\tSystem.out.println(current);\n\t\t}\n\t\t\n\t\tfor(Map.Entry<String, String> entry : hm.entrySet()){\n\t\t\tString key = entry.getKey();\n\t\t\tSystem.out.println(key);\n\t\t\tString value = entry.getValue();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t\t\n\t\tIterator it1 = hm.keySet().iterator(); \t// Key set\n\t\t\n\t\tfor(;it1.hasNext();){\n\t\t\tString current = (String)it1.next();\n\t\t\tSystem.out.println(current);\n\t\t}\n\t\t\n\t}", "public interface Proj04Dictionary\n{\n\t// insert(int,String)\n\t//\n\t// This function inserts a new record into the dictionary.\n\t// Any key is allowed. However, the String must always be non-null.\n\t//\n\t// This function throws IllegalArgumentException if either of the\n\t// following are true:\n\t// - key already exists in the data structure\n\t// - String is null\n\tvoid insert(int key, String data)\n\t\tthrows IllegalArgumentException;\n\n\n\t// delete(int)\n\t//\n\t// This function deletes the key from the dictionary.\n\t//\n\t// This function throws IllegalArgumentException if:\n\t// - the key does not exist in the data structure\n\tvoid delete(int key)\n\t\tthrows IllegalArgumentException;\n\n\n\t// String search(int)\n\t//\n\t// This function searches the data structure for the key. If the key\n\t// is found, then this returns the String associated with it; if the\n\t// key is not found, it returns null.\n\tString search(int key);\n\n\n\t// Integer[] getKeys()\n\t//\n\t// This function generates an exhaustive list of all keys in the\n\t// data structure, and returns them as an array. A new array may be\n\t// allocated for each call; do *NOT* reuse the same array over and\n\t// over.\n\t//\n\t// NOTE: The keys in the array are *NOT* necessarily sorted.\n\t//\n\t// IMPLEMENTATION HINT: While you must return an array at the end,\n\t// you may use some other form - such as an ArrayList - as a\n\t// temporary variable as you build the retval. \n\t// Then you can convert an ArrayList<Integer> to Integer[] with\n\t// the toArray() method.\n\tInteger[] getKeys();\n\n\t// int getSuccessor(int)\n\t//\n\t// Searches the tree for the given key, and then returns the\n\t// successor key in the data structure - that is, the next key in a\n\t// sorted list of the keys.\n\t//\n\t// This function throws IllegalArgumentException if either of the\n\t// following are true:\n\t// - the key does not exist\n\t// - the key does not have any successor\n\tint getSuccessor(int key)\n\t\tthrows IllegalArgumentException;\n}", "public interface Dictionary {\n\t/**\n\t * Adds the uniquely mappedNumber to the dictionary and would maintain the corresponding set of words\n\t * which mapped to this number as its value. \n\t * @param mappedNumber Uniquely mappedNumber to a word. Since this is the key so it becomes the first argument\n\t * @param word The corresponding word\n\t */\n\tvoid insert(String mappedNumber, String word);\n\n\t/**\n\t * Returns the set of words mapping to a number. So in the example given {@link Dictionary above}\n\t * If the argument is 2255 then the returned would value would be set BALL,CALL<br>\n\t * If there are no matching words the implementation class can chose to return null or an empty set\n\t * \n\t * @param number The number for which mapping words has to be found \n\t * @return The set of words which got converted to this number\n\t */\n\tSet<String> findMatchingWords(String number);\n\t\n\t/**\n\t * Returns no. of unique number string keys added to the dictionary. Ideally the client would need to call this only after the dictionary is completely populated\n\t * @return No. of unique number string keys added to the dictionary\n\t */\n\tint getUniqueNumbersCount();\n\n}", "public void instantiateTable(){\n hashTable = new LLNodeHash[16];\n }", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "@Before\n public void setUp() {\n hashTable = new HashTable();\n hashTable.put(\"Savon\", \"Yuliya\");\n hashTable.put(\"Blue\", \"lake\");\n hashTable.put(\"math\", \"camp\");\n }", "public static void main(String[] args) {\n Hash myHashTable = new Hash(7);\n for(int i = 0; i<15; i++){\n int a=(int)(Math.random()*100);\n System.out.print( a+\" \");\n myHashTable.insert(a);\n \n }\n myHashTable.print();\n }", "@org.junit.Test\n public void size() throws Exception {\n assertEquals(3, hashTable.size());\n hashTable.put(\"math\", \"club\");\n assertEquals(3, hashTable.size());\n hashTable.put(\"input\", \"string\");\n assertEquals(4, hashTable.size());\n }", "@Test(expected = Exception.class)\n public void test() throws Exception {\n\n new HashMap<>();\n MyHashTable2 mp = new MyHashTable2();\n mp.put(\"prem\",7);\n mp.put(\"radha\",72);\n mp.put(\"geeta\",74);\n mp.put(\"sunita\",76);\n mp.put(\"atul\",87);\n mp.put(\"rakesh\",37);\n mp.put(\"aklesh\",72);\n\n // try to add duplicate keys and test exception\n mp.put(\"aklesh\",72);\n\n\n assert 7 == mp.get(\"prem\");\n assert 72 == mp.get(\"aklesh\");\n assert 87 == mp.get(\"atul\");\n assert null == mp.get(\"noting\");\n\n System.out.println(mp.getKeySet());\n\n mp.prettyPrint();\n }", "public static void example1() {\n Group z23 = ZModPrime.getInstance(23);\r\n ProductGroup pg = ProductGroup.getInstance(z23, 10);\r\n Tuple tuple = pg.getRandomElement();\r\n\r\n // Define hash function Z23^10 -> {0,1}^256 (default SHA256)\r\n Function function = HashFunction.getInstance(pg);\r\n\r\n // Apply hash function to tuple (return finite byte array)\r\n Element hashValue = function.apply(tuple);\r\n\r\n System.out.println(function.toString());\r\n System.out.println(tuple.toString());\r\n System.out.println(hashValue.toString());\r\n }", "public static void main(String[] args)throws Exception {\n\t\t\n\t\tHashMap<String, Integer> hm = new HashMap<>(20);\n\t\t\n\t\thm.put(\"India\", 20);\n\t\thm.put(\"China\",\t 55);\n\t\thm.put(\"ini\", 78);\n\t\thm.display();\n\t\tArrayList<String> yo = hm.keyset() ;\n\t\tSystem.out.println(yo);\n\t}", "@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }", "public HashTableChained() {\r\n num_buckets = 101; //prime number close to 100\r\n hash_table = new DList[num_buckets]; \r\n }", "public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}", "public static void main(String[] args)\r\n\t{\n\t\tMap<String,String> map = new Hashtable<>(); // synchronized, slower\r\n\t\t\r\n\t\tmap.put(\"myName\", \"Bachhan\"); /* we can repeat value but we can't repeat key */\r\n\t\tmap.put(\"actor\", \"Akshay\");\r\n\t\tmap.put(\"ceo\", \"Pichai\");\r\n\t\tmap.put(\"actor\", \"Bachhan\");\r\n\t\t\r\n\t\t// store the keySet() value in Set\r\n\t\tSet<String> keys = map.keySet();\r\n\t\tfor(String key: keys){\r\n\t\t\r\n\t\tSystem.out.println(key+ \" \" +map.get(key));\r\n\t\t}\r\n\t}", "public void testIterating() throws Exception {\n assertEquals(\"[\\\"foo\\\", \\\"bar\\\"]\", eval(\"$h.each {|pair| p pair}\"));\n assertEquals(\"{\\\"foo\\\"=>\\\"bar\\\"}\", eval(\"p $h.each {|pair| }\"));\n assertTrue(eval(\"$h.each_pair {|pair| p pair}\").indexOf(\"[\\\"foo\\\", \\\"bar\\\"]\") != -1);\n assertTrue(eval(\"p $h.each_pair {|pair| }\").indexOf(\"{\\\"foo\\\"=>\\\"bar\\\"}\") != -1);\n \n assertEquals(\"\\\"foo\\\"\", eval(\"$h.each_key {|k| p k}\"));\n assertEquals(\"{\\\"foo\\\"=>\\\"bar\\\"}\", eval(\"p $h.each_key {|k| }\"));\n \n assertEquals(\"\\\"bar\\\"\", eval(\"$h.each_value {|v| p v}\"));\n assertEquals(\"{\\\"foo\\\"=>\\\"bar\\\"}\", eval(\"p $h.each_value {|v| }\"));\n }", "public static void main(String[] args) {\n\t\tString[] arr= new String[]{\"insert\", \n\t\t\t\t \"insert\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"insert\", \n\t\t\t\t \"addToValue\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"get\"};\n\t\tint[][] arr1=new int[][] {{-5,-2}, \n\t\t\t {2,4}, \n\t\t\t {-1}, \n\t\t\t {-3}, \n\t\t\t {1}, \n\t\t\t {3,-2}, \n\t\t\t {-4}, \n\t\t\t {-2}, \n\t\t\t {2}, \n\t\t\t {-8}}; \n\t\tHashMapNew vik= new HashMapNew();\n\t\tSystem.out.println(\"The answer is: \" + vik.createHashMap(arr, arr1));\n\t\t\n\t}", "@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "void put(final int hash, final int key, final int value){\r\n//System.out.println(\"put(\"+hash+\",\"+key+\",\"+value+\")\");\r\n if(key==0){\r\n hasZeroKey=true;\r\n zeroValue=value;\r\n return;\r\n }\r\n int i=(hash&hashMask)<<1;\r\n int k;\r\n while((k=data[i])!=0 && k!=key) i=(i+2)&indexMask;\r\n data[i]=key;\r\n data[i+1]=value;\r\n }", "int getHash();", "private int hash1(T key) {\n return (key.toString().charAt(0) + key.toString().length())%newTable.length;\r\n }", "public void apply (DHT dh_table) {\n\t}", "public interface Probing {\r\n\t/**\r\n\t * Get an alternate hash position\r\n\t * @param key The original key\r\n\t * @param i How many spaces are occupied already\r\n\t * @param max How many spaces are available\r\n\t * @return A new position for the key\r\n\t */\r\n\tpublic int getHash(int key, int i, int max);\r\n}", "public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}", "public static void main(String[] args) {\n\t\tHashMap<Integer, String> hm=new HashMap<>();\n\t\thm.put(25, \"Bharath\");\n\t\thm.put(50,\"Ramesh\");\n\t\thm.put(75,\"Ashish\");\n\t\tSystem.out.println(hm);\n\t\tSystem.out.println(hm.containsKey(15));\n\t\tSystem.out.println(hm.containsValue(\"Ramesh\"));\n\n\t\tTreeMap<Integer, String> tm=new TreeMap<>();\n\t\ttm.putAll(hm);\n\t\tSystem.out.println(tm);\n\t\tSystem.out.println(tm.firstKey());\n\t\tSystem.out.println(tm.lastKey()); \n\t}", "protected abstract int hashOfObject(Object key);", "public static void main(String[] args) {\n \n HashTable maylin = new HashTable(10,0.75);\n maylin.put(20, \"lol\");\n maylin.put(10, \"twerk\");\n maylin.put(10, \"bro\");\n maylin.put(30,\"rally\");\n maylin.put(40, \"eek\");\n System.out.println(maylin.isEmpty());\n System.out.println(maylin.get(30));\n System.out.println(maylin.size());\n System.out.println(maylin.get(10));\n System.out.println(\"\\n\"+maylin.remove(10));\n System.out.println(maylin.size());\n System.out.println(maylin.remove(20) +\"\"+ maylin.remove(30));\n System.out.println(maylin.size());\n \n \n maylin.clear();\n maylin.clear();\n System.out.println(\"\\n\" + maylin.remove(20));\n try {\n System.out.println(maylin.get(20));\n } catch (NoSuchElementException e) {\n System.out.println(e);\n }\n try {\n System.out.println(maylin.remove(null));\n } catch(Exception e) {\n System.out.println(e);\n }\n System.out.println(maylin.size());\n System.out.println(maylin.isEmpty());\n try {\n System.out.println(maylin.put(null, \"lmao\"));\n } catch (Exception e){\n System.out.println(e);\n }\n \n //put, clear, get, isEmpty, remove, size\n \n \n }", "public BVHashtable()\n {\n super();\n }", "public abstract int getHash();", "public interface HashTable<K, V> {\n\n void put(K key, V value);\n\n V get(K key);\n\n V remove(K key);\n\n int size();\n}", "@Test\n public void test002_Insert_And_Get() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n test.insert(3, \"4\");\n if (test.get(1) != \"2\") { //checks if get returns the correct values\n fail(\"insert or get didn't work\");\n }\n if (test.get(2) != \"3\") {\n fail(\"insert or get didn't work\");\n }\n if (test.get(3) != \"4\") {\n fail(\"insert or get didn't work\");\n }\n } catch (Exception e) {\n fail(\"Exception shouldn't be thrown\");\n }\n }", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "@Test\n\tpublic void testGiveCode1() {\n\t\n\t\t\tfloat maxLF = (float) 0.5;\n\t\t\tHTableWords h = new HTableWords(maxLF);\n\t\t\tString word = \"abc\";\n\t\t\tint hashCode = h.giveCode(word);\n\t\t\tassertTrue(hashCode == 3);\n\t}", "public static void main(String[] args) {\n\n\t\tHashMap<String,String> hm = new HashMap<String, String>();\n\t\t\n\t\thm.put(\"e\",\"a1\");\n\t\thm.put(\"b\",\"a1\");\n\t\thm.put(\"a\",\"a2\");\n\t\t \n\t\thm.put(\"a\",\"a5\");\n\t\t\n\t\tSet s = hm.entrySet();\n\t\tIterator it = s.iterator();\n\t\t\n\t\tfor(Map.Entry me : hm.entrySet())\n\t\t\tSystem.out.println(me.getKey()+\" \"+me.getValue());\n\t\t\n\t\t\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry mentry = (Map.Entry) it.next();\n\t\t\tSystem.out.println(mentry.getKey() +\" \"+mentry.getValue());\n\t\t\t\n\t\t}\n\t\t\n\tMap<String,String> thmp = \tnew TreeMap<String,String> (hm);\n\tSystem.out.println();\n\tfor(Map.Entry g : thmp.entrySet())\n\t\tSystem.out.println(g.getKey()+\" \"+g.getValue());\n\t\n\t\n\tSystem.out.println(hm.containsKey(\"a\")+\" \"+hm.containsValue(\"a5\"));\n\t\n\t\t\n\t\t\n\t\t\n\t}", "public void displayHashTable(HashTable2 hTable){\n\t\t\n\t\tSystem.out.println(\"Index \" + \"Value\");\n\t\tfor(int i=0; i < hTable.theArray.length; i++){\n\t\t\t\n\t\t\tSystem.out.println(\" \" + i + \" ==> \" + hTable.theArray[i] );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public HashEntry( AnyType e )\n {\n \tkey = e;\n }", "public static void main(String[] args) {\n\t\tinitValues();\n\t\tHashTable sizeSeven = new HashTable(7,2); //Create a hash table with a size of 7, relative prime given is 2\n\t\tHashTable sizeFiftyOne = new HashTable(51,5); //Create a hash table with a size of 51, relative prime given is 5\n\t\tHashTable sizeOneFiftyOne = new HashTable(151,25); //Create a hash table with a size of 151, relative prime given is 25\n\t\t\n\t\t//Populate the Hash Tables\n\t\tfor (int i = 0; i < values.length ; i++){\n\t\t\tsizeSeven.add(new HashableInt(values[i]));\n\t\t\tsizeFiftyOne.add(new HashableInt(values[i]));\n\t\t\tsizeOneFiftyOne.add(new HashableInt(values[i]));\n\t\t}\n\t\t\n\t\t//Print the stored values of the Hash Tables\n\t\tSystem.out.println(sizeSeven);\n\t\tSystem.out.println(sizeFiftyOne);\n\t\tSystem.out.println(sizeOneFiftyOne);\n\t\t\n\t\t//Search for 10 random numbers in each hash table, show weather the table contains the number and how many comparisons it took to find it or not\n\t\tSystem.out.println(\"Table Size:\\tSearch Value:\\tTable Contains?:\\t# Comparisons:\\t\");\n\t\tfor (int i = 0; i < values2.length; i++){\n\t\t\tSystem.out.println(sizeSeven.getSize()+\"\\t\\t\"+values2[i]+\"\\t\\t\"+sizeSeven.contains(new HashableInt(values2[i]))+\"\\t\\t\\t\"+sizeSeven.getNumberCompares());\n\t\t\tSystem.out.println(sizeFiftyOne.getSize()+\"\\t\\t\"+values2[i]+\"\\t\\t\"+sizeFiftyOne.contains(new HashableInt(values2[i]))+\"\\t\\t\\t\"+sizeFiftyOne.getNumberCompares());\n\t\t\tSystem.out.println(sizeOneFiftyOne.getSize()+\"\\t\\t\"+values2[i]+\"\\t\\t\"+sizeOneFiftyOne.contains(new HashableInt(values2[i]))+\"\\t\\t\\t\"+sizeOneFiftyOne.getNumberCompares());\n\t\t}\n\t}", "private void setupTokenHashTable() {\n this.tokenHashTable = new Hashtable<>();\n \t\n /* Identifier Token */\n this.getTokenHashTable().put(1001, \"idTK\");\n this.getTokenHashTable().put(1002, \"integerTK\");\n \t\n /* Operators and Delimiters */\n this.getTokenHashTable().put(1003, \"equalsTK\");\n this.getTokenHashTable().put(1004, \"lessThanTK\");\n this.getTokenHashTable().put(1005, \"greaterThanTK\");\n this.getTokenHashTable().put(1006, \"compareEqualTK\");\n this.getTokenHashTable().put(1007, \"colonTK\");\n this.getTokenHashTable().put(1008, \"plusTK\");\n this.getTokenHashTable().put(1009, \"minusTK\");\n this.getTokenHashTable().put(1010, \"multiplyTK\");\n this.getTokenHashTable().put(1011, \"divideTK\");\n this.getTokenHashTable().put(1012, \"modulusTK\");\n this.getTokenHashTable().put(1013, \"periodTK\");\n this.getTokenHashTable().put(1014, \"leftParenTK\");\n this.getTokenHashTable().put(1015, \"rightParenTK\");\n this.getTokenHashTable().put(1016, \"commaTK\");\n this.getTokenHashTable().put(1017, \"leftBraceTK\");\n this.getTokenHashTable().put(1018, \"rightBraceTK\");\n this.getTokenHashTable().put(1019, \"semicolonTK\");\n this.getTokenHashTable().put(1020, \"leftBracketTK\");\n this.getTokenHashTable().put(1021, \"rightBracketTK\");\n \n /* Extra Tokens */\n this.getTokenHashTable().put(1022, \"EofTK\");\n this.getTokenHashTable().put(-2, \"Invalid Character\");\n this.getTokenHashTable().put(-3, \"Invalid Comment\");\n }", "@Test\n\tpublic void testGiveCode2() {\n\t\n\t\t\tfloat maxLF = (float) 0.5;\n\t\t\tHTableWords h = new HTableWords(maxLF);\n\t\t\tString word = \"z\";\n\t\t\tint hashCode = h.giveCode(word);\n\t\t\tassertTrue(hashCode == 3);\n\t}", "@Override\n public void buildInformEntries(Hashtable<InetAddress, Vector<String>> dest) {}", "public static void main(String[] args) {\n Map<String, Set<Integer>> ms = new HashMap<>(); \n Set<Integer> s1 = new HashSet<>(Arrays.asList(1,2,3));\n Set<Integer> s2 = new HashSet<>(Arrays.asList(4,5,6));\n Set<Integer> s3 = new HashSet<>(Arrays.asList(7,8,9));\n ms.put(\"one\", s1);\n ms.put(\"two\", s2);\n ms.put(\"three\", s3);\n System.out.println(ms); \n // ch07.collections.Ch0706InterfacesVsConcrete$1\n // {one=[1, 2, 3], two=[4, 5, 6], three=[7, 8, 9]}\n\n // this is how LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>>\n // can be initially initialized\n LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>> toc =\n new LinkedHashMap<>();\n System.out.println(toc); // just using toc to get rid of eclipse warning about not using it\n \n \n\n\n\n }", "@Test\n\tpublic void testHashMap() {\n\n\t\t/*\n\t\t * Creates an empty HashMap object with default initial capacity 16 and default\n\t\t * fill ratio \"0.75\".\n\t\t */\n\t\tHashMap hm = new HashMap();\n\t\thm.put(\"evyaan\", 700);\n\t\thm.put(\"varun\", 100);\n\t\thm.put(\"dolly\", 300);\n\t\thm.put(\"vaishu\", 400);\n\t\thm.put(\"vaishu\", 300);\n\t\thm.put(null, 500);\n\t\thm.put(null, 600);\n\t\t// System.out.println(hm);\n\n\t\tCollection values = hm.values();\n//\t\tSystem.out.println(values);\n\n\t\tSet entrySet = hm.entrySet();\n\t\t// System.out.println(entrySet);\n\n\t\tIterator iterator = entrySet.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n\t\t\t// System.out.println(entry.getKey()+\":\"+entry.getValue());\n\t\t}\n\n\t}", "public void printHash(String valu){\r\n /*\r\n Put A for Arrangers\r\n V for Vocalists\r\n C for Circles\r\n */\r\n String type=\"\";\r\n Map <Integer,String>TempMap=new HashMap();\r\n switch(valu){\r\n case \"A\":\r\n type=\"Arranger's\";\r\n TempMap.putAll(ArrangersMap);\r\n break;\r\n case \"V\":\r\n type=\"Vocalists's\";\r\n TempMap.putAll(VocalistsMap);\r\n break;\r\n case \"C\":\r\n type=\"Circle's\";\r\n TempMap.putAll(CirclesMap);\r\n break; \r\n }\r\n int counter=0;\r\n List<String> values=new ArrayList<>();\r\n for(int id:TempMap.keySet()){\r\n values.add(TempMap.get(id));\r\n }\r\n TempMap.clear();\r\n Collections.sort(values,Collator.getInstance());\r\n for(String val: values){\r\n val=val.trim();\r\n TempMap.put(counter, val.trim());\r\n //System.out.println(val);\r\n counter++;\r\n }\r\n for(int id:TempMap.keySet()){\r\n System.out.println(\"The \" + type+ \" name is: \"+TempMap.get(id)+ \" The id is:\"+id);\r\n }\r\n }", "public interface IPatternMap<K, V> {\r\n\r\n\t/**\r\n\t * return a Hashtable of the entries that matche the pattern\r\n\t * @param pattern\r\n\t * @return\r\n\t */\r\n\tpublic Hashtable<K, V> getPattern(String pattern);\r\n\t\r\n\r\n\t/**\r\n\t * return a Hashtable of the entries that match the wildcard (*)\r\n\t * @param pattern\r\n\t * @return\r\n\t */\r\n\tpublic Hashtable<K, V> getWildcard(String wildcard);\r\n\r\n\r\n\r\n}", "HashTable() {\n int trueTableSize = nextPrime(tableSize);\n HT = new FlightDetails[nextPrime(trueTableSize)];\n }", "@Override\n public void buildTrapEntries(Hashtable<InetAddress, Vector<String>> dest) {}", "public static Hashtable<String, Double> fakeJobDescriptionTF() {\n job_description_tf = new Hashtable<String, Double>();\n job_description_tf.put(\"am\", (double) 1 / 7);\n job_description_tf.put(\"learning\", (double) 1 / 7);\n job_description_tf.put(\"javascript\", (double) 1 / 7);\n job_description_tf.put(\"java\", (double) 1 / 7);\n job_description_tf.put(\"is\", (double) 1 / 7);\n job_description_tf.put(\"cool\", (double) 1 / 7);\n job_description_tf.put(\"language\", (double) 1 / 7);\n job_description_tf.put(\"requirement\", (double) 0);\n job_description_tf.put(\"for\", (double) 0);\n job_description_tf.put(\"this\", (double) 0);\n job_description_tf.put(\"job\", (double) 0);\n job_description_tf.put(\"python\", (double) 0);\n job_description_tf.put(\"wonderful\", (double) 0);\n return job_description_tf;\n }", "private static java.util.Hashtable init() {\n Hashtable members = new Hashtable();\n members.put(\"fork\", FORK);\n members.put(\"lsf\", LSF);\n members.put(\"pbs\", PBS);\n members.put(\"condor\", CONDOR);\n members.put(\"sge\", SGE);\n members.put(\"ccs\", CCS);\n\n return members;\n }", "public static void main(String[] args) {\n\t\t\n\t\tHashMap<String,Integer> hash=new HashMap<String,Integer>();\n\t //ConcurrentHashMap<String, Integer> hash=new ConcurrentHashMap<String, Integer>();\n\t\thash.put(\"santosh\", 45);\n\t\thash.put(\"teja\", 44);\n\t\thash.put(\"mani\", 56);\n\t\t\n\t\tfor(Entry<String , Integer> h:hash.entrySet())\n\t\t{\n\t\t\tSystem.out.println(h);\n\t\t}\n\t\t\n\t\tfor(Integer i:hash.values())\n\t\t{\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t\n\t\tfor(String str: hash.keySet())\n\t\t{\n\t\t\tSystem.out.println(str);\n\t\t}\n\n\n\t}", "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 }", "public static void main(String[] args) {\n\n // Creation of HashTable\n Map<Integer, String> namesMap = new Hashtable<>();\n\n // Adding data into the HashTable\n namesMap.put(1, \"Sai\");\n namesMap.put(2, \"Praveen\");\n namesMap.put(3, \"Lokesh\");\n namesMap.put(4, \"Kamal\");\n namesMap.put(5, \"Vimala\");\n\n // Displaying the data of HashTable\n LoggerUtility.logInfo(namesMap.toString());\n }", "public interface HashRedisService<T> {\n\n public <T> boolean addHash(final String key, final String field, final T value);\n\n public <T> boolean addHash(final String key, final Map<String, T> filedValueMap);\n\n public <T> T getHashField(final String key, final String field);\n\n public boolean deleteHashField(final String key, final List<String> field);\n\n\n}", "private void loadHashTable(int day, HourlyForecast hourly)\n {\n switch (day)\n {\n case 1:\n {\n this.hourly.get(\"Today\").add(hourly);\n break;\n }\n case 2:\n {\n this.hourly.get(\"Tomorrow\").add(hourly);\n break;\n }\n case 3:\n {\n this.hourly.get(\"Day After Tomorrow\").add(hourly);\n break;\n }\n default:\n break;\n }\n }", "public QuantDataHashTable() {\n\t\t\n\t\tquantData = new Hashtable<String, Double>();\n\t\t\n\t}", "public static void main(String[] args) {\n\n Hashtable balance = new Hashtable();\n Enumeration names;\n String str;\n double bal;\n\n balance.put(\"Zara\", new Double(54700));\n balance.put(\"Mahnaz\", new Double(123.22));\n balance.put(\"Ayan\", new Double(1378.00));\n balance.put(\"Daisy\", new Double(99.22));\n balance.put(\"Qadir\", new Double(-19.08));\n\n names = balance.keys();\n while (names.hasMoreElements()) {\n str = (String) names.nextElement();\n System.out.println(str + \": \" + balance.get(str));\n }\n System.out.println();\n\n // Deposit 10000 into Zara's account\n bal = ((Double) balance.get(\"Zara\")).doubleValue();\n balance.put(\"Zara\", new Double(bal + 10000));\n System.out.println(\"Zara's new balance: \" + balance.get(\"Zara\"));\n }", "public static void main(String[] args) {\n countDuplicateCharacters(\"My name is Fernando\");\n\n //2. Reverse an Arraylist.\n reverseArrayList();\n\n //3. Check if a particular key exists in HashMap.\n //4. Convert keys of a map to a list.\n checkKeyAndCreateList();\n\n //5. Copy all elements of a HashSet to an Object array.\n hashToObject();\n\n //6. Get highest and lowest value stored in TreeSet\n maxAndMinValueTreeSet();\n\n //7. Sort ArrayList of Strings alphabetically.\n sortArrayList();\n\n //8. Get Set view of keys from HashTable.\n getViewsHashTable();\n\n }", "public interface ConcurrentHashTable<K, V> {\n\n /**\n * hash function for the hashMap.\n */\n int hash(final K key);\n\n /**\n * put key value into map. If already contains key in map,\n * will replace the old value by new value.\n *\n * @return V is the previous value associate with key,\n * return null if the key it not in the map previously.\n */\n V put(final K key, final V value);\n\n /**\n * get value based on input key and value.\n */\n V get(final K key);\n\n /**\n * remove the key-value entry if the key present in map.\n * @return V is the value of the key. If key not exists, return null\n */\n V remove(final K key);\n\n /**\n * remove the key-value entry if the input key-value entry present in map.\n * @return V return true if remove successfully, else return false.\n */\n boolean remove(final K key, final V value);\n\n int size();\n\n boolean isEmpty();\n\n boolean containsKey(final K key);\n\n /**\n * get value based on input key and value. If there isn't a key in map,\n * return default value\n */\n V getOrDefault(final K key, final V defaultValue);\n\n /**\n * Returns a Set view of the keys contained in this map.\n */\n Set<K> keySet();\n\n /**\n * Returns a Collection view of the values contained in this map.\n */\n Collection<V> values();\n}", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "public static void main(String[] args) {\n\t\tHashMap<String, String> hm = new HashMap<String, String>(); \n\t\thm.put(\"first\", \"Java\"); \n\t\thm.put(\"second\", \"By\"); \n\t\thm.put(\"third\", \"Kiran\"); \n\t\tSystem.out.println(hm); \n\t\tSet<String> keys = hm.keySet(); \n\t\t \n\t\t for (String key : keys) { \n\t\t\t System.out.println(\"Value of \" + key + \" is: \" + hm.get(key)); \n\t\t }\n\t}", "public static void main(String[] args) {\n\t\tHashtable<String,String> requestParameterValues = new Hashtable<String,String>();\r\n\t\tHashtable<String,String> changeRequestParameterValues = new Hashtable<String,String>();\r\n\t\tEnumeration<String> parameterNames = inRequest.getParameterNames();\r\n\t\tparameterNames = inRequest.getParameterNames();\r\n\t\t\r\n\t\twhile(parameterNames.hasMoreElements()){\r\n\t\tString parameterName = parameterNames.nextElement();\r\n\t\t\tif(parameterName != null && parameterName.startsWith(\"TrailerLoad\"))\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\tString pullID = parameterName.substring(11, parameterName.length());\r\n\t\t\t\tString[] parameterValues = inRequest.getParameterValues(parameterName);\r\n\t\t\t\tString[] tempParameterValues = new String[parameterValues.length];\r\n\t\t\t\t\tfor (int i = 0; i < parameterValues.length; i++) {\r\n\t\t\t\t\t\ttempParameterValues[i] =parameterValues[i];\r\n\t\t\t\t\t\tSystem.out.println(inRequest.getParameter(\"H\"+pullID) + \" ***\");\r\n\t\t\t\t\t\t\tString pullBasic = inRequest.getParameter(\"HTrailerLoad\"+pullID);\r\n\t\t\t\t\t\t\t//System.out.println(\" parameterName :: \" + parameterName + \" pullBasic :: \" + pullBasic );\r\n\t\t\t\t\t\t\tif ( pullBasic != null && !tempParameterValues[i].equalsIgnoreCase(pullBasic == null ? \"\" : pullBasic.toString()))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tchangeRequestParameterValues.put(parameterName, tempParameterValues[i]);\r\n\t\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//requestParameterValues.put(parameterName, tempParameterValues[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}else if(parameterName != null && !parameterName.startsWith(\"H\")&& !parameterName.startsWith(\"TrailerLoad\"))\r\n\t\t\t{\t\r\n\t\t\t\t\r\n\t\t\t\tString[] parameterValues = inRequest.getParameterValues(parameterName);\r\n\t\t\t\tString[] tempParameterValues = new String[parameterValues.length];\r\n\t\t\t\t\tfor (int i = 0; i < parameterValues.length; i++) {\r\n\t\t\t\t\t\ttempParameterValues[i] =parameterValues[i];\r\n\t\t\t\t\t\t\tString pullBasic = inRequest.getParameter(\"H\"+parameterName);\r\n\t\t\t\t\t\t\tif ( pullBasic != null && !tempParameterValues[i].equalsIgnoreCase(pullBasic == null ? \"\" : pullBasic.toString()))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tchangeRequestParameterValues.put(\"\"+parameterName, tempParameterValues[i]);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\trequestParameterValues.put(parameterName, tempParameterValues[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn changeRequestParameterValues;\r\n\t}" ]
[ "0.6330431", "0.60662645", "0.60553557", "0.60488796", "0.60269904", "0.60102403", "0.60048705", "0.5997787", "0.59772575", "0.59660304", "0.59474933", "0.5915317", "0.59111905", "0.5898475", "0.5893226", "0.5868564", "0.5851985", "0.5850839", "0.58177274", "0.5737672", "0.5732486", "0.5712402", "0.5696435", "0.56960624", "0.5676337", "0.5673055", "0.56626505", "0.56616604", "0.5655016", "0.5594492", "0.55738115", "0.55207986", "0.55146885", "0.5507792", "0.5506882", "0.54920703", "0.54544526", "0.5440783", "0.54225886", "0.54093295", "0.54021823", "0.5383283", "0.5356433", "0.5354004", "0.53527576", "0.53460664", "0.5339842", "0.5338402", "0.5335855", "0.53246367", "0.5321843", "0.5321371", "0.53192997", "0.5292109", "0.52867085", "0.5281148", "0.5255991", "0.52492017", "0.5247958", "0.52478546", "0.5246204", "0.5238395", "0.52236795", "0.5218851", "0.52185446", "0.5207066", "0.52007127", "0.519838", "0.5194618", "0.5192162", "0.5183434", "0.51758415", "0.5165038", "0.51629156", "0.51606894", "0.5159415", "0.51534945", "0.5152146", "0.51470715", "0.51456726", "0.5144476", "0.5137494", "0.5132075", "0.5130741", "0.5124191", "0.51217914", "0.512158", "0.51214445", "0.512137", "0.5118654", "0.5115489", "0.51154536", "0.51069695", "0.5096919", "0.50952643", "0.50950027", "0.5094635", "0.50836927", "0.50813156", "0.5081054" ]
0.5689896
24
Not all implementations of Map support the clone interface, so clone where possible, or do our own version of clone.
@SuppressWarnings("unchecked") Map<Object,Object> cloneMap(Map<Object,Object> toClone) { if (toClone instanceof Hashtable) { return (Map<Object, Object>)((Hashtable<?, ?>)toClone).clone(); } if (toClone instanceof HashMap) { return (Map<Object,Object>)((HashMap<Object,Object>)toClone).clone(); } if (toClone instanceof LinkedHashMap) { return (Map<Object,Object>)((LinkedHashMap<Object,Object>)toClone).clone(); } Map<Object,Object> cloned = null; if (toClone instanceof WeakHashMap) { cloned = new WeakHashMap<Object,Object>(); } else if (toClone instanceof ConcurrentHashMap){ cloned = new ConcurrentHashMap<Object,Object>(); } else { throw new RuntimeException("Unexpected subclass of Map"); } Set<Object> keys = toClone.keySet(); for (Object key: keys) { cloned.put(key, toClone.get(key)); } return cloned; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object clone() throws CloneNotSupportedException {\n/* 172 */ StrokeMap clone = (StrokeMap)super.clone();\n/* 173 */ clone.store = new TreeMap();\n/* 174 */ clone.store.putAll(this.store);\n/* */ \n/* */ \n/* 177 */ return clone;\n/* */ }", "@Override\n\tpublic MapNode clone()\n\t{\n\t\t// Create copy of this map node\n\t\tMapNode copy = (MapNode)super.clone();\n\n\t\t// Copy KV pairs\n\t\tcopy.pairs = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, AbstractNode> pair : pairs.entrySet())\n\t\t{\n\t\t\tAbstractNode value = pair.getValue().clone();\n\t\t\tcopy.pairs.put(pair.getKey(), value);\n\t\t\tvalue.setParent(copy);\n\t\t}\n\n\t\t// Return copy\n\t\treturn copy;\n\t}", "public Object clone() {\n\t\ttry {\n\t\t\tAbstractHashSet newSet = (AbstractHashSet) super.clone();\n\t\t\tnewSet.map = (DelegateAbstractHashMap) map.clone();\n\t\t\treturn newSet;\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n public Object clone() {\r\n try {\r\n OCRSet<E> newSet = (OCRSet<E>) super.clone();\r\n newSet.map = (HashMap<Integer, E>) map.clone();\r\n return newSet;\r\n } catch (CloneNotSupportedException e) {\r\n throw new InternalError();\r\n }\r\n }", "@Override\r\n public Object clone() throws CloneNotSupportedException {\r\n MRUCache<K, V> copy = null;\r\n try {\r\n copy = (MRUCache<K, V>) super.clone();\r\n } catch (CloneNotSupportedException x) {\r\n // This is impossible.\r\n }\r\n int next = 0;\r\n for (Map.Entry<K, V> pair : entrySet()) {\r\n // Optimize in case the Entry is one of our own.\r\n if (pair != null) {\r\n copy.buckets[next++].set(factory.createPair(pair.getKey(), pair.getValue()));\r\n }\r\n }\r\n return copy;\r\n }", "@Override\n public Object clone() {\n try {\n IdentificationSet<X> newSet = (IdentificationSet<X>) super.clone();\n newSet.map = (HashMap<X, Identification>) map.clone();\n return newSet;\n } catch (CloneNotSupportedException e) {\n throw new InternalError();\n }\n }", "public Scm clone()\n {\n try\n {\n Scm copy = (Scm) super.clone();\n\n if ( copy.locations != null )\n {\n copy.locations = new java.util.LinkedHashMap( copy.locations );\n }\n\n return copy;\n }\n catch ( java.lang.Exception ex )\n {\n throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()\n + \" does not support clone()\" ).initCause( ex );\n }\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tFieldCache fieldCache = (FieldCache)super.clone();\n\t\tfieldCache.cache = (HashMap<TileCoordinate, DijkstraNode>)this.cache.clone();\n\n\t\treturn fieldCache;\n\t}", "public CharCharMap clone() {\n char[] k = new char[key.length], v = new char[value.length];\n System.arraycopy(key, 0, k, 0, key.length);\n System.arraycopy(value, 0, v, 0, value.length);\n return new CharCharMap(k, v, f);\n }", "public static <K, V extends Copy<V>> Hashtable<K, V> deepCopy(Map<K, V> map) {\n Hashtable<K, V> copy = new Hashtable<K, V>();\n for (K key : map.keySet()) copy.put(key, map.get(key).copy());\n return copy;\n }", "public abstract Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public abstract Object clone() ;", "Object clone();", "Object clone();", "@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() {\n\t\tLongOpenHashSet c;\n\t\ttry {\n\t\t\tc = (LongOpenHashSet) super.clone();\n\t\t} catch (CloneNotSupportedException cantHappen) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t\tc.key = key.clone();\n\t\tc.state = state.clone();\n\t\treturn c;\n\t}", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "@Override\n public MetaContainer clone() {\n return clone(false);\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "@Override\n\tpublic Object clone() \n\t{\n\t\ttry{\n\t\t// Note all state is primitive so no need to deep copy reference types.\n\t\treturn (Tile) super.clone();\n\t\t} catch (CloneNotSupportedException e) \n\t\t{\n\t\t\t// We should not ever be here as we implement Cloneable.\n\t\t\t// It is better to deal with the exception here rather than letting\n\t\t\t// clone throw it as we would have to catch it in more places then.\n\t\t\treturn null;\n\t\t}\n\t}", "public Object clone()\n {\n ElementInsertionList clone = new ElementInsertionList();\n\n for (int i = 0; i < list.size(); i++)\n {\n clone.addElementInsertionMap((ElementInsertionMap)list.elementAt(i));\n }\n\n return clone;\n }", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "public Object clone() throws CloneNotSupportedException {\r\n super.clone();\r\n return new JMSCacheReplicator(replicatePuts, replicateUpdates,\r\n replicateUpdatesViaCopy, replicateRemovals, replicateAsync, asynchronousReplicationInterval);\r\n }", "public MapVS<K, T, V> getCopy() {\n return new MapVS(this);\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "public Object clone() throws CloneNotSupportedException {\n\t\tColeccionGenerica clonado= null;\n\t\tclonado= (ColeccionGenerica) super.clone();\n\t\tIterator<Integer> keys= clonado.coleccion.keySet().iterator();\n\t\tIterator<T> values= clonado.coleccion.values().iterator();\n\t\tclonado.coleccion.clear();\n\t\twhile (keys.hasNext() && values.hasNext()) {\n\t\t\tclonado.coleccion.put(keys.next(), values.next());\n\t\t}\n\t\treturn clonado;\n\t}", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() throws CloneNotSupportedException\n\t{\n\t\tJsonObject newArray = (JsonObject)super.clone();\n\t\tnewArray.values = (HashMap<String, Value>)values.clone();\n\t\treturn newArray;\n\t}", "public HashMap<PhoneNumber, BookEntry> cloneBook() {\n\t\tHashMap<PhoneNumber, BookEntry> clonedBook = new HashMap<>(); //Just for practice...\n\t\t//Create a Collection \n\t\tCollection<BookEntry> sourcePhoneBookValues = this.phoneBook.values(); //Based on the object instance's phoneBook field\n\t\t//Iterate through the collection and copy each entry to the cloneBook map\n\t\tfor (BookEntry currentEntry : sourcePhoneBookValues) {\n\t\t\tclonedBook.put(currentEntry.getNumber(), currentEntry);\n\t\t}\n\t\treturn clonedBook;\n\t}", "public Function clone();", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "private void copyMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (map[i][j] instanceof Player) {\n\t\t\t\t\tnewMap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Mho) {\n\t\t\t\t\tnewMap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Fence) {\n\t\t\t\t\tnewMap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "private static <K extends Comparable<K>, V>\n ImmutableSortedMap<K, SortedSet<V>>\n copyMap(Map<K, ? extends SortedSet<V>> map) {\n final ImmutableSortedMap.Builder<K, SortedSet<V>> b =\n ImmutableSortedMap.naturalOrder();\n for (Map.Entry<K, ? extends SortedSet<V>> e : map.entrySet()) {\n b.put(e.getKey(), ImmutableSortedSet.copyOf(e.getValue()));\n }\n return b.build();\n }", "public final Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"Singleton class doesn't support cloning of object.\");\n }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\n public MapPoint clone(){\n MapPoint pl = new MapPoint();\n pl.setId(this.pointId);\n pl.setX(this.pointX);\n pl.setY(this.pointY);\n pl.setTags(this.tags);\n return pl;\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }", "@Override\r\n protected Object clone() throws CloneNotSupportedException \r\n {\r\n // Se crea una nueva instancia de TSB_OAHashtable\r\n TSB_OAHashtable<K, V> t = new TSB_OAHashtable<>(this.table.length, this.load_factor);\r\n\r\n // copio todos los elementos\r\n for(Map.Entry<K, V> entry : this.entrySet()){\r\n t.put(entry.getKey(), entry.getValue());\r\n }\r\n\r\n return t;\r\n }", "public Object clone()\n {\n Object o = null;\n try\n {\n o = super.clone();\n }\n catch (CloneNotSupportedException e)\n {\n e.printStackTrace();\n }\n return o;\n}", "public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tCustomerList mylist = (CustomerList) super.clone();\n\t\ttry {\n\t\t\n\t\t\tmylist.m_prodList = (HashMap<Product,Integer>) m_prodList.clone();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Clone problem\");\n\t\t}\n\t\t\t\n\t\treturn mylist;\n\t}", "@Override\n public MultiCache clone () {\n return new MultiCache(this);\n }", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\n\t}", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\r\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Object clone() {\n/* */ try {\n/* 111 */ return super.clone();\n/* */ }\n/* 113 */ catch (CloneNotSupportedException cloneNotSupportedException) {\n/* 114 */ throw new InternalError(cloneNotSupportedException.toString(), cloneNotSupportedException);\n/* */ } \n/* */ }", "public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }", "public Object clone() throws CloneNotSupportedException {\n\tthrow new CloneNotSupportedException(\"This is a Singleton Ojbect; Buzz off\");\n }", "public static <KEY_1, KEY_2, VALUE> Map<KEY_1, Map<KEY_2, VALUE>> copyOf(\n Map<KEY_1, ? extends Map<KEY_2, VALUE>> map) {\n return new HashMap<>(Maps.transformValues(map, HashMap::new));\n }", "@Override\n\tprotected Object clone() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public static <K, V> Hashtable<K, V> copy(Map<K, V> map) {\n Hashtable<K, V> copy = new Hashtable<K, V>();\n for (K key : map.keySet()) copy.put(key, map.get(key));\n return copy;\n }", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }", "public static HashMap<String, Blob> deepcopytracked(\n HashMap<String, Blob> original) {\n HashMap<String, Blob> copy = new HashMap<String, Blob>();\n for (Map.Entry<String, Blob> entry : original.entrySet()) {\n copy.put(entry.getKey(),\n new Blob(entry.getValue()));\n }\n return copy;\n }", "public final Object clone() throws java.lang.CloneNotSupportedException {\n\t\tthrow new java.lang.CloneNotSupportedException();\n\t}", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public Mapping clone(IRSession session){\n \tMapping mapping = new Mapping(session);\n \tmapping.entities = entities;\n \tmapping.multiple = multiple;\n \tmapping.requests = requests;\n \tmapping.entityinfo = entityinfo;\n \tmapping.entitystack = entitystack;\n \tmapping.setattributes = setattributes;\n \tmapping.attribute2listPairs = attribute2listPairs;\n \tmapping.dataObjects = dataObjects;\n \tmapping.initialize();\n \treturn mapping;\n }", "@Override\r\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\t\r\n\t\treturn super.clone();\r\n\t}", "@Override\n\tpublic Object clone() throws CloneNotSupportedException {\n\treturn super.clone();\n\t}", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Object clone() {\n return this.copy();\n }", "@Override\n public Object clone() throws CloneNotSupportedException{\n return super.clone();\n }", "public Map<T, V> copyData(Map<T, V> map) {\n Map<T, V> newMap = new HashMap<>();\n for (Map.Entry<T, V> entrySet : map.entrySet()) {\n T key = entrySet.getKey();\n V value = entrySet.getValue();\n newMap.put(key, value);\n }\n return newMap;\n }", "public Object clone() throws CloneNotSupportedException\n\t{\n\t\tthrow new CloneNotSupportedException();\n\t}", "@Override\n\t\tpublic Pair clone()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Create copy of this pair\n\t\t\t\tPair copy = (Pair)super.clone();\n\n\t\t\t\t// Create copy of value\n\t\t\t\tcopy.value = value.clone();\n\n\t\t\t\t// Return copy\n\t\t\t\treturn copy;\n\t\t\t}\n\t\t\tcatch (CloneNotSupportedException e)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException(\"Unexpected exception\", e);\n\t\t\t}\n\t\t}", "static <T> T clone(T in) throws IOException {\n\t\tByteArrayOutputStream bOut = new ByteArrayOutputStream();\n\t\tMap<Long, Object> smugglerCache = new HashMap<>();\n\t\ttry (ObjectOutputStream out = new LiveObjectOutputStream(bOut, smugglerCache)) {\n\t\t\tout.writeObject(in);\n\t\t}\n\t\ttry {\n\t\t\treturn (T) new LiveObjectInputStream(\n\t\t\t\t\tnew ByteArrayInputStream(bOut.toByteArray()),\n\t\t\t\t\tsmugglerCache)\n\t\t\t\t.readObject();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new AssertionError(\"We just serialized this object a minute ago. The class cannot be missing\", e);\n\t\t}\n\t}", "protected Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Object clone() throws CloneNotSupportedException {\n\t\treturn super.clone();\n\t}", "public Object clone() throws CloneNotSupportedException{\n\t\tthrow (new CloneNotSupportedException());\n\t}", "public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException(\"clone() is not supported in \"+this.getClass().getName());\n }", "@Override\r\n @GwtIncompatible\r\n public Object clone() {\r\n try {\r\n @SuppressWarnings(\"unchecked\")\r\n PairBuilder<L, R> result = (PairBuilder<L, R>)super.clone();\r\n result.self = result;\r\n return result;\r\n } catch (CloneNotSupportedException e) {\r\n throw new InternalError(e.getMessage());\r\n }\r\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n // return super.clone(); // OR we can return the already present :: return getInstance();\n }", "public T cloneDeep();", "public Object clone() throws CloneNotSupportedException {\n // return INSTANCE\n throw new CloneNotSupportedException();\n }", "public Object clone()\n/* */ {\n/* 251 */ return new IntHashSet(this);\n/* */ }", "public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n /* Cannot happen */\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) {\n \tAttributeMap newmap =\n new AttributeMap((ElementImpl) ownerNode, null);\n newmap.hasDefaults(hasDefaults());\n newmap.cloneContent(this);\n \treturn newmap;\n }" ]
[ "0.7923331", "0.78767246", "0.74749464", "0.74373156", "0.74367756", "0.74139035", "0.6850154", "0.6799894", "0.6792416", "0.6740767", "0.67381203", "0.6656937", "0.6634195", "0.6634195", "0.6634195", "0.6634195", "0.6621002", "0.66081375", "0.66081375", "0.6588369", "0.65798134", "0.6563691", "0.65628284", "0.65349275", "0.6489264", "0.64641637", "0.64638895", "0.6440721", "0.6434539", "0.6390411", "0.63879704", "0.63787323", "0.63653296", "0.63513124", "0.6340187", "0.6331361", "0.6313346", "0.6309034", "0.62965894", "0.6293176", "0.62426573", "0.624262", "0.6236593", "0.6236593", "0.6236593", "0.6225671", "0.6212419", "0.6203768", "0.6196593", "0.61927754", "0.61924374", "0.61908734", "0.61880815", "0.61867934", "0.6180639", "0.617779", "0.6173331", "0.6173331", "0.6173331", "0.6173331", "0.6173331", "0.6173331", "0.6173331", "0.6173331", "0.6173331", "0.616452", "0.61538965", "0.6144006", "0.6132347", "0.613086", "0.61237985", "0.61233735", "0.61233735", "0.61233735", "0.6121389", "0.61079764", "0.6104328", "0.6097284", "0.6080186", "0.6079949", "0.60791415", "0.6071666", "0.6068618", "0.6067131", "0.60604775", "0.60603243", "0.6056574", "0.6055014", "0.6052211", "0.60471565", "0.60467833", "0.601167", "0.5999924", "0.5980916", "0.5973838", "0.59730816", "0.59658897", "0.59616333", "0.593238", "0.5927105" ]
0.78000003
2
setelah loading maka akan langsung berpindah ke home activity
@Override public void run() { if(id_user.equals("default")) { Intent home = new Intent(SplashScreen.this, Login.class); startActivity(home); finish(); }else{ Intent home = new Intent(SplashScreen.this, MainActivity.class); startActivity(home); finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void loadHome(){\n Intent intent = new Intent(this, NameListActivity.class);\n startActivity(intent);\n finish();\n }", "protected void onStartLoading() { forceLoad();}", "public LOADIUNG() {\n initComponents();\n \n load();\n timer.start();\n HOME home = new HOME();\n \n \n }", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//has the mainactivity show the loading screen\n\t}", "private void startLoad() {\n\t\tif (getIntent().getFlags()==8)\n\t\t{\n\t\t\ttitleTv.setText(R.string.WXYT);\n\t\tmWebView.loadUrl(UrlLib.CLI);\n\t\t}\n\t\telse if (getIntent().getFlags()==5)\n\t\t{\n\t\t\ttitleTv.setText(R.string.reservior); \n\t\t\tmWebView.loadUrl(UrlLib.CLI5);\t\n\t\t}\t\n\t\t\n\t\tmWebView.setWebViewClient(new WebViewClient() {\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#shouldOverrideUrlLoading(android\n\t\t\t * .webkit.WebView, java.lang.String)\n\t\t\t */\n\n\t\t\t@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tview.loadUrl(url);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#onPageFinished(android.webkit.WebView\n\t\t\t * , java.lang.String)\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t}\n\t\t});\n\n\t\tmWebView.setWebChromeClient(new WebChromeClient() {\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(WebView view, int newProgress) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onProgressChanged(view, newProgress);\n\t\t\t\tprogressBar.setProgress(newProgress);\n\t\t\t\tprogressBar.postInvalidate();\n\t\t\t\tif(newProgress==100)\n\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\n\t\t\t}\n\t\t});\n\n\t}", "private void loadHomeclass(){\n // selecting appropriate nav menu item\n selectNavMenu();\n\n // set toolbar title\n setToolbarTitle();\n\n // if user select the current navigation menu again, don't do anything\n // just close the navigation drawer\n if (getClass().getSimpleName()==CURRENT_TAG) {\n\n drawerLayout.closeDrawers();\n\n return;\n }\n\n\n //Closing drawer on item click\n drawerLayout.closeDrawers();\n\n // refresh toolbar menu\n invalidateOptionsMenu();\n }", "@Override\n protected void onStartLoading() {\n forceLoad();\n\n }", "@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n\r\n //이걸 제일 먼저 해야됌\r\n AppManager.getInstance().setAppManager(this);\r\n\r\n AppManager.getInstance().setSize();\r\n AppManager.getInstance().setVibeSensor();\r\n AppManager.getInstance().setPreference();\r\n AppManager.getInstance().setMoveSensor();\r\n AppManager.getInstance().setResuorces(getResources());\r\n AppManager.getInstance().set_myMediaPlayer();\r\n AppManager.getInstance().set_mySoundPool();\r\n\r\n\r\n setContentView(new LoadingCanvas(this));\r\n\r\n Handler handler = new Handler();\r\n handler.postDelayed(new Runnable() {\r\n public void run() {\r\n Intent intent = new Intent(Loading.this, SelectMenu.class);\r\n startActivity(intent);\r\n finish();\r\n }\r\n }, 3000);\r\n }", "@Override\n protected void onStartLoading() {\n\n forceLoad();\n }", "@SuppressLint({ \"SetJavaScriptEnabled\", \"InflateParams\" })\n\t@SuppressWarnings(\"deprecation\")\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tloadLocale();\n\t\tsetContentView(R.layout.activity_web);\n\t\tcf = new CommonFunctions(this);\n\t\turl \t= getIntent().getExtras().getString(\"url\",\"Empty\");\n\t\tboolean blRegister = getIntent().getExtras().getBoolean(\"IsRegister\", false);\n\t\t\n\t\tif(blRegister)\n\t\t\tloadAppBar();\n\t\telse\n\t\t\tgetActionBar().hide();\n\t\t\n//\t\tloaderDialog = new Dialog(SearchPageActivity.this, android.R.style.Theme_Translucent);\n//\t\tloaderDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n//\t\tloaderDialog.getWindow().setGravity(Gravity.TOP);\n//\t\tloaderDialog.setContentView(R.layout.dialog_loader);\n//\t\tloaderDialog.setCancelable(false);http://fuuf.caxita.ca/en http://fuuf.caxita.ca/en\n\t\t\n\t\twv1=(WebView) findViewById(R.id.wv_main);\n\t\tpbLine\t= (ProgressBar) findViewById(R.id.pb_line);\n\t\t\n\t\twv1.getSettings().setRenderPriority(RenderPriority.HIGH);\n\t\twv1.getSettings().setJavaScriptEnabled(true);\n\n\t\twv1.setWebViewClient(new WebViewClient(){\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onPageStarted(WebView view, String url, Bitmap favicon) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLog.d(\"Started\",\"Loading\");\n\t\t\t\tSystem.out.println(\"Loading url\"+url);\n\t\t\t\tloadingURL = url;\n\t\t\t\tif(url.contains(\"/Home/MyBooking/MyBooking\"))\n\t\t\t\t\tflag = false;\n\t\t\t\tif (url.equals(CommonFunctions.main_url)\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"ar\")\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"en\")\n\t\t\t\t\t\t&& flag) {\n\t\t\t\t\tview.stopLoading();\n\t\t\t\t\tfinish();\n\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this,\n\t\t\t\t\t\t\tMenuSelectionAcitivity.class);\n\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tstartActivity(home);\n\t\t\t\t}\n\t\t\t\telse if(url.equals(CommonFunctions.main_url)\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"ar\")\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"en\"))\n\t\t\t\t\tflag = true;\n//\t\t\t\t\tloaderDialog.show();\n\t\t\t\telse\n\t\t\t\t\tpbLine.setVisibility(View.VISIBLE);\n\t\t\t\tsuper.onPageStarted(view, null, favicon);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onPageFinished(final WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\n\t\t\t\tLog.d(\"Finished\",\"Loading\"+url);\n\t\t\t\tpbLine.setVisibility(View.GONE);\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic void onLoadResource(WebView view, String url) {\n\t\t\t\tsuper.onLoadResource(view, url);\n\t\t\t\tpbLine.setProgress(wv1.getProgress());\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t\twv1.loadUrl(url);\n\t\t\n\t}", "private void loadPage() {\n \t\n if (((sPref.equals(ANY)) && (wifiConnected || mobileConnected))\n || ((sPref.equals(WIFI)) && (wifiConnected))) {\n // AsyncTask subclass\n \t\n new DownloadXmlTask().execute(URL);\n } else {\n showErrorPage();\n }\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "private void onFullyLoaded() {\n info(\"onFullyLoaded()\");\n cancelProgress();\n\n //Fully loaded, start detection.\n ZiapApplication.getInstance().startDetection();\n\n Intent intent = new Intent(LoadingActivity.this, MainActivity.class);\n if (getIntent().getStringExtra(\"testname\") != null)\n intent.putExtra(\"testname\", getIntent().getStringExtra(\"testname\"));\n startActivity(intent);\n finish();\n }", "public void loadPage() {\n\t\tLog.i(TAG, \"MyGardenListActivity::LoadPage ! Nothing to do anymore here :)\");\n\t}", "@Override\n public void showLoading() {\n Log.i(Tag, \"showLoading\");\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ti=9;\n\t\t\t\thandler = new Admin2Handler();\n\n\t\t\t\tdialog = ProgressDialog.show(Admin2Home.this, \"加载中\",\n\t\t\t\t\t\t\"加载中,请稍后..\");\n\n\t\t\t\tThread workThread = new Admin2HomeThread();\n\t\t\t\tworkThread.start();\n\n\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_full_loading);\n\n getSupportActionBar().hide();\n dBase = Room.databaseBuilder(this, DBase.class, \"database\").allowMainThreadQueries().build();\n\n textViewText = (TextView) findViewById(R.id.fullloading_text);\n switch (isPage) {\n case 0:\n textViewText.setText(getString(R.string.loading_level));\n break;\n case 1:\n textViewText.setText(getString(R.string.loading_levels));\n break;\n case 2:\n textViewText.setText(getString(R.string.loading_level));\n break;\n }\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n switch (isPage) {\n case 0:\n LoadSection();\n break;\n case 1:\n LoadSections();\n break;\n case 2:\n LoadSectionGame();\n break;\n }\n }\n }, 300);\n }\n }).run();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ti=4;\n\t\t\t\thandler = new Admin2Handler();\n\n\t\t\t\tdialog = ProgressDialog.show(Admin2Home.this, \"加载中\",\n\t\t\t\t\t\t\"加载中,请稍后..\");\n\n\t\t\t\tThread workThread = new Admin2HomeThread();\n\t\t\t\tworkThread.start();\n\n\t\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tdl = ProgressDialog.show(getActivity(), \"Thông báo\", \"Loading...\",\n\t\t\t\t\ttrue, false);\n\t\t\tdl.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "public void showLoading() {\n }", "@Override\n public void onClick(View view) {\n MainActivity.loadStart = true;\n Intent intent = new Intent(WelcomeActivity.this,\n MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }", "public void loadLocale() {\n\n\t\tSystem.out.println(\"Murtuza_Nalawala\");\n\t\tString langPref = \"Language\";\n\t\tSharedPreferences prefs = getSharedPreferences(\"CommonPrefs\",\n\t\t\t\tActivity.MODE_PRIVATE);\n\t\tString language = prefs.getString(langPref, \"\");\n\t\tSystem.out.println(\"Murtuza_Nalawala_language\" + language);\n\n\t\tchangeLang(language);\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "private void restOfTheActivity() {\n if(SharedPrefUtils.hasTrunch(mSharedPreferences)){\n showTrunch();\n }\n loadUserImage();\n long lastTimeDownloaded = SharedPrefUtils.lastTimeDownloaded(mSharedPreferences);\n long timeDifference = System.currentTimeMillis() - lastTimeDownloaded;\n // Compare to MIN_TIME_BETWEEN_JSON_DOWNLOAD and act accordingly.\n if (timeDifference > MIN_TIME_BETWEEN_JSON_DOWNLOAD) {\n // show the splash screen\n mSplashScreenView.setVisibility(View.VISIBLE);\n // go get JSON from server\n downloadJSON();\n\n } else {\n // init tempView\n initTempView();\n }\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tsuper.onStart();\n\t\t\t\tshowLoadingDialogNoCancle(getResources().getString(R.string.toast2));\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tsuper.onStart();\n\t\t\t\tshowLoadingDialogNoCancle(getResources().getString(R.string.toast2));\n\t\t\t}", "void showLoading(boolean isLoading);", "public void startLoadAnim(String msg) {\n avi.smoothToShow();\n loadTv.setText(msg);\n loadTv.setVisibility(View.VISIBLE);\n loginContainer.setVisibility(View.INVISIBLE);\n }", "@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tshowLoading();\r\n\t\t}", "public void onUnFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t}\n\t\t\t\t});\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ti=10;\n\t\t\t\thandler = new Admin2Handler();\n\n\t\t\t\tdialog = ProgressDialog.show(Admin2Home.this, \"加载中\",\n\t\t\t\t\t\t\"加载中,请稍后..\");\n\n\t\t\t\tThread workThread = new Admin2HomeThread();\n\t\t\t\tworkThread.start();\n\n\t\t\t}", "public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }", "protected void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\nsetContentView(R.layout.tixian_appliction);\ninitview();\nString url1 = Url.user()+\"getContact/\";\nLoadData(url1\t,null,\"loading\");\n}", "@Override\n protected void onResume() {\n super.onResume();\n\n shouldLoadAds = true; // żeby reklamy nie pokazywały się po wyłaczeniu aplikacji - tylko do intestitialAds\n //do reklamy pełnoekranowej\n\n if ((shar.getString(SHARED_PREFERENCES_WEATHER_TODAY, \"\").equals(\"\")) && (hasPermissions(MainActivity.this, permissions))) {\n makeUrlForDownloadWeather();\n }\n // wyłaczenie czekania na gps jeśli jest podane miasto konkretne\n if (!shar.getBoolean(KEY_FOR_SHARED_PREF_SWITCH_CITY, true)) {\n //wyłaczenie text view z weating for gps sygnal po pierwszym uruchomieniu\n textViewWeatingForGPS.setVisibility(View.GONE);\n progressBarWeatingForGPS.setVisibility(View.GONE);\n } else {\n textViewWeatingForGPS.setVisibility(View.VISIBLE);\n progressBarWeatingForGPS.setVisibility(View.VISIBLE);\n }\n }", "private void initialLoad() {\n setSupportActionBar(toolbar);\n if (getSupportActionBar() != null) {\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu_black_24dp);\n }\n searchView.setActivated(true);\n searchView.setQueryHint(getResources().getString(R.string.search_text));\n searchView.onActionViewExpanded();\n searchView.setIconified(false);\n searchView.clearFocus();\n webView.getSettings().setDomStorageEnabled(true);\n webView.getSettings().setAppCacheEnabled(true);\n webView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);\n webView.getSettings().setJavaScriptEnabled(true);\n webView.setOverScrollMode(WebView.OVER_SCROLL_NEVER);\n webView.setWebViewClient(new CustomWebViewClient());\n Intent intent = getIntent();\n Uri data = intent.getData();\n if (data != null) {\n webView.loadUrl(\"https://whysurfswim.com/\" + data.getEncodedPath());\n } else {\n webView.loadUrl(\"https://whysurfswim.com/\");\n }\n }", "@Override\r\n\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onPageStarted(WebView view, String url, Bitmap favicon) {\n\t\t\t\tLog.d(\"Started\",\"Loading\");\n\t\t\t\tSystem.out.println(\"Loading url\"+url);\n\t\t\t\tloadingURL = url;\n\t\t\t\tif(url.contains(\"/Home/MyBooking/MyBooking\"))\n\t\t\t\t\tflag = false;\n\t\t\t\tif (url.equals(CommonFunctions.main_url)\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"ar\")\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"en\")\n\t\t\t\t\t\t&& flag) {\n\t\t\t\t\tview.stopLoading();\n\t\t\t\t\tfinish();\n\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this,\n\t\t\t\t\t\t\tMenuSelectionAcitivity.class);\n\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tstartActivity(home);\n\t\t\t\t}\n\t\t\t\telse if(url.equals(CommonFunctions.main_url)\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"ar\")\n\t\t\t\t\t\t|| url.equals(CommonFunctions.main_url + \"en\"))\n\t\t\t\t\tflag = true;\n//\t\t\t\t\tloaderDialog.show();\n\t\t\t\telse\n\t\t\t\t\tpbLine.setVisibility(View.VISIBLE);\n\t\t\t\tsuper.onPageStarted(view, null, favicon);\n\t\t\t}", "public void onFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t}\n\t\t\t\t});\t\n\t\t\t}", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n\t\t/* layout splashscreen dengan background gambar */\n setContentView(R.layout.activity_spalsh);\n\t/* handler untuk menjalankan splashscreen selama 5 detik lalu\n\t * membuat HomeActivity\n\t */\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent = null;\n\n mainIntent = new Intent(SpalshActivity.this,\n HomeActivity.class);\n\n SpalshActivity.this.startActivity(mainIntent);\n SpalshActivity.this.finish();\n overridePendingTransition(R.layout.fadein,R.layout.fadeout);\n\n\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "private void homemenu() \n\n{\nstartActivity (new Intent(getApplicationContext(), Home.class));\n\n\t\n}", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(MainActivity.this);\n\t\t\tpDialog.setMessage(\"Loading....\");\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "public void setLoading(boolean loading) {\n this.loading = loading;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_welecome);\n l1 = (LinearLayout) findViewById(R.id.l1);\n l2 = (LinearLayout) findViewById(R.id.l2);\n progressBar=(ProgressBar)findViewById(R.id.loadingPanel);\n progressBar.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n uptodown = AnimationUtils.loadAnimation(this,R.anim.uptodown);\n downtoup = AnimationUtils.loadAnimation(this,R.anim.downtoup);\n l1.setAnimation\n (uptodown);\n l2.setAnimation(downtoup);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n //Do any action here. Now we are moving to next page\n Intent mySuperIntent = new Intent(welecomeActivity.this, IntroApplicationActivity.class);\n startActivity(mySuperIntent);\n /* This 'finish()' is for exiting the app when back button pressed\n * from Home page which is ActivityHome\n */\n finish();\n }\n }, SPLASH_TIME);\n }", "private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n footer.setLoading();\n }\n }", "@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t\tdialog = MessageDialog.createLoadingDialog(HelpActivity.this, \"Loadding\");\n\t\t\t\tdialog.show();\n\t\t\t}", "private void setContent(){\n nama.setText(Prefs.getString(PrefsClass.NAMA, \"\"));\n// txt_msg_nama.setText(Prefs.getString(PrefsClass.NAMA,\"\"));\n\n //set foto di header navbar\n Utils.LoadImage(MainActivity.this, pb, Prefs.getString(PrefsClass.FOTO,\"\"),foto);\n addItemSpinner();\n\n setActionBarTitle(\"\");\n\n }", "@Override\r\n\t\tpublic void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n talkAlert = (TextView) findViewById(R.id.talkAlert);\n talkAlert.setText(getResources().getString(R.string.loading));\n talkAlert.setVisibility(View.VISIBLE);\n }", "public void ulang(View view) {\n finish();\n //perintah untuk intent HasilKuis ke halaman SoalKuis kembali\n Intent intent = new Intent(getApplicationContext(), SoalKuis.class);\n //untuk memulai intent\n startActivity(intent);\n }", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "@Override\n public void onLoadingStarted(String arg0, View arg1) {\n }", "public void showLoading() {\n loadingLayout.setVisibility(View.VISIBLE);\n mapView.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n }", "@Override\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\n\t\t\t\t\t}", "void onFinishedLoading();", "@Override\n\tpublic void onResume() {\n\t\tloadSettingFont();\n\n\t\t// set font cho tv Tin bai cua toi\n\t\ttv.setTypeface(mTypeface);\n\n\t\tint countData = qlb.getDataCount();\n\t\ttv.setText(\"Tin bài đã lưu: \" + countData);\n\n\t\t// hinh nen\n\t\tloadSettingBackground();\n\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onLoad() {\n\t\thandler.postDelayed(new Runnable() {\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\tcount=pagerlistener.setpage();\n//\t\t\t\t initNewDatas(count);//得到新数据\n\t\t\t\tfightermessageadapter.notifyDataSetChanged();//刷新ListView;\n\t\t\t\ttopNewsMoreLV.loadCompleted();\n\t\t\t}\n\t\t}, 2000);\n\t}", "@Override\r\n\t\tpublic void onLoadingCancelled(String arg0, View arg1) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }", "public void startLoading() {\n projects.clear();\n processContainer.setVisibility(View.VISIBLE);\n progressSpinner.setVisibility(View.VISIBLE);\n progressText.setVisibility(View.VISIBLE);\n progressText.setText(\"Getting Items...\"); // Text updated using SetProgress()\n listView.setVisibility(View.GONE);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(Integrationforkhalti.this);\n pDialog.setMessage(\"Loading Please wait...\");\n pDialog.setIndeterminate(true);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t\t}", "public void onResume() {\n super.onResume();\n UpdateLang();\n }", "void onLoaderLoading();", "private void initDatas() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setHomeButtonEnabled(true); //设置返回键可用\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n whichActivity = getIntent().getStringExtra(\"activity\");\n if(whichActivity.equals(\"new_announce_activity\")){\n toolbar.setTitle(\"农田位置\");\n }else{\n toolbar.setTitle(\"农机位置\");\n }\n WebSettings webSettings = webView.getSettings();\n //设置WebView属性,能够执行Javascript脚本\n webSettings.setJavaScriptEnabled(true);\n //设置可以访问文件\n webSettings.setAllowFileAccess(true);\n //设置支持缩放\n webSettings.setBuiltInZoomControls(true);\n //加载需要显示的网页\n webView.loadUrl(\"file:///android_asset/map_choose_point.html\");\n //设置Web视图\n webView.setWebChromeClient(new MyWebChromeClient());\n }", "private void setLoading(boolean isLoading) {\n if (isLoading) {\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n layoutLoading.setVisibility(View.VISIBLE);\n } else {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n layoutLoading.setVisibility(View.INVISIBLE);\n }\n }", "@Override\n public Void call(Long aLong) {\n if (mShowLoading) {\n mView.showLoading(true);\n }\n return null;\n }", "public void openHome() {\n connectionProgressDialog.dismiss();\n Intent i = new Intent(this, ZulipActivity.class);\n startActivity(i);\n finish();\n }", "void showLoading(boolean visible);", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n\n boolean haetaan = true;\n listOfTagTables = new String[]{\"Alkuaineet\", \"Funktionaalinenryhma\", \"Kaava\", \"Vakio\", \"Hapot\", \"aine\"};\n listOfTables = new String[]{\"Alkuaineet\", \"Funktionaalinenryhma\", \"Hapot\", \"Kaava\", \"Vakio\", \"aine\", \"yksikot\"};\n listOfReqTags = new String[]{};\n ((EditText) findViewById(R.id.edtHakuKentta)).setText(\"%\");\n int id = item.getItemId();\n if (id == R.id.front_page) {\n\n Intent myIntent = new Intent(this, MainActivity.class);\n haetaan = false;\n startActivity(myIntent);\n finish();\n\n }\n else if (id == R.id.nav_camera) {\n // Handle the camera action\n Intent myIntent = new Intent(this, MathActivity.class);\n startActivity(myIntent);\n haetaan = false;\n finish();\n } else if (id == R.id.nav_gallery) {\n\n Intent myIntent = new Intent(this, PhysicsActivity.class);\n haetaan = false;\n startActivity(myIntent);\n finish();\n\n } else if (id == R.id.nav_slideshow) {\n Intent myIntent = new Intent(this, ChemistryActivity.class);\n haetaan = false;\n startActivity(myIntent);\n finish();\n } else if (id == R.id.suosikit) {\n\n listOfReqTags = new String[]{\"suosikki\"};\n //((TextView)findViewById(R.id.txvOtsikko)).setText(getString(R.string.suosikit));\n setTitle(getString(R.string.suosikit));\n\n }else if(id==R.id.tietoa){\n\n LinearLayout contai = (LinearLayout) findViewById(R.id.lnlContainer);\n contai.removeAllViews();\n LayoutInflater inflater = LayoutInflater.from(MainActivity.this);\n View theInflatedView = inflater.inflate(R.layout.info, null);\n contai.addView(theInflatedView);\n haetaan = false;\n ((EditText) findViewById(R.id.edtHakuKentta)).setText(\"\");\n\n\n }\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n\n\n if (haetaan) {\n ((LinearLayout) findViewById(R.id.lnlContainer)).removeAllViews();\n Hae(null, false);\n ((EditText) findViewById(R.id.edtHakuKentta)).setText(\"\");\n }\n\n\n return true;\n }", "void setLoading(boolean isLoading);", "private void loadingPhase() {\n try { Thread.sleep(10000); } catch(InterruptedException e) { return; }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n }", "@Override\n protected void onResume() {\n super.onResume();\n if (connection.isOnline(this)) new LoadMeetsAsync().execute();\n fab_toolbar.hide();\n }", "@Override\n\tpublic void initView() {\n\t\tIntent intent=getIntent();\n\t\tString title=intent.getStringExtra(\"title\");\n\t\tcontext=intent.getStringExtra(\"context\");\n\t\tsetTitle(title);\n\t\tsetGone();\n\t\tsetBack();\n\t\tlist=new ArrayList<GameFighterBean>();\n\t\ttopNewsMoreLV = (LoadListViewnews) findViewById(R.id.lv_more_topnew);\n\t\txuanshou_quanbu_wu = (Button) findViewById(R.id.xuanshou_quanbu_wu);\n\t\txuanshou_quanbu_wu.setVisibility(View.VISIBLE);\n\t\tinitNetwork(context);\n\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n progressBar.show();\n getGoals();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(TalkActivity.this);\n pDialog.setMessage(getResources().getString(R.string.loading));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "protected void onPreExecute() {\n try {\n this.dialog.setMessage(getContext().getResources().getString(R.string.loading));\n this.dialog.show();\n } catch (Exception ex) {\n Log.e(null, ex);\n }\n }", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (NetworkUtil.isNetworkConnected(Meeting.this)) {\n if (id == R.id.action_home) { //메인 화면\n Intent intent = new Intent(Meeting.this, MainActivity.class);\n startActivity(intent);\n overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_right);\n finish();\n } else if (id == R.id.action_notice) { //공지사항\n Intent intent = new Intent(Meeting.this, Notice.class);\n intent.putExtra(\"idx\", psMidx); //조회 키 값을 넘겨준다\n intent.putExtra(\"id\", psMid);\n intent.putExtra(\"name\", psMname);\n intent.putExtra(\"path\", psMpath);\n intent.putExtra(\"dept\", psMdept);\n startActivityForResult(intent, 1); // Sub_Activity 호출\n overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_right);\n finish();\n } else if (id == R.id.action_member) { //직원 조회\n Intent intent = new Intent(Meeting.this, Staff.class);\n intent.putExtra(\"idx\", psMidx);\n intent.putExtra(\"id\", psMid);\n intent.putExtra(\"name\", psMname);\n intent.putExtra(\"path\", psMpath);\n intent.putExtra(\"dept\", psMdept);\n intent.putExtra(\"sTelephone\", sTelephone);\n startActivityForResult(intent, 1);\n overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_right);\n finish();\n } else if (id == R.id.action_meeting) { //회의실 예약\n Intent intent = new Intent(Meeting.this, Meeting.class);\n intent.putExtra(\"idx\", psMidx);\n intent.putExtra(\"id\", psMid);\n intent.putExtra(\"name\", psMname);\n intent.putExtra(\"path\", psMpath);\n intent.putExtra(\"dept\", psMdept);\n intent.putExtra(\"sTelephone\", sTelephone);\n startActivityForResult(intent, 1); // Sub_Activity 호출\n overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_right);\n finish();\n } else if (id == R.id.action_leave) { //휴가 조회\n Intent intent = new Intent(Meeting.this, Leave.class);\n intent.putExtra(\"idx\", psMidx);\n intent.putExtra(\"id\", psMid);\n intent.putExtra(\"name\", psMname);\n intent.putExtra(\"path\", psMpath);\n intent.putExtra(\"dept\", psMdept);\n intent.putExtra(\"sTelephone\", sTelephone);\n startActivityForResult(intent, 1);\n overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_right);\n finish();\n } else if (id == R.id.action_map) { //회사 위치\n Intent intent = new Intent(Meeting.this, Map.class);\n intent.putExtra(\"idx\", psMidx);\n intent.putExtra(\"id\", psMid);\n intent.putExtra(\"name\", psMname);\n intent.putExtra(\"path\", psMpath);\n intent.putExtra(\"dept\", psMdept);\n intent.putExtra(\"sTelephone\", sTelephone);\n startActivityForResult(intent, 1);\n overridePendingTransition(R.anim.anim_slide_in_left, R.anim.anim_slide_out_right);\n finish();\n } else {\n Log.e(\"Error\", \"예외 발생\");\n }\n }else{\n Toast.makeText(Meeting.this, R.string.network_error_chk,Toast.LENGTH_SHORT).show();\n }\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "private void CallHomePage() {\n\t\t\n\t\tfr = new FragmentCategories();\n\t\tFragmentManager fm = getFragmentManager();\n\t\tFragmentTransaction fragmentTransaction = fm.beginTransaction();\n\t\tfragmentTransaction.replace(R.id.fragment_place, fr);\n\t\tfragmentTransaction.addToBackStack(null);\n\t\tfragmentTransaction.commit();\n\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t// setContentView(R.layout.loadingnew);\n\t\t// setContentView(R.layout.loading_360);\n\t\tsetContentView(R.layout.loadingnew);\n\t\tuserID = WeiBaoApplication.getUserId();\n\t\tif (null == userID || userID.equals(\"\")) {\n\t\t\tuserID = \"0\";\n\t\t}\n\t\tFile cacheDir = new File(getFilesDir() + \"/weibao/cache\");\n\t\thttp = new KjhttpUtils(this, cacheDir);\n\t\t// for (int i = 0; i < 28; i++) {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tString initcitysuUrl;\n\t\t\tinitcitysuUrl = UrlComponent.currentWeatherGet(cityArrays[i], \"0\",\n\t\t\t\t\t\"0\");\n\t\t\thttp.getString(initcitysuUrl, 600, new DownGet() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void downget(String arg0) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tmApplication = WeiBaoApplication.getInstance();\n\t\tmCityDB = mApplication.getCityDB();\n\t\tmStartTime = System.currentTimeMillis();// 记录开始时间,\n\t\tsh = SharedPreferencesUtil.getInstance(LoadingActivity.this);\n\t\tWeiBaoApplication.getInstance().initData(mHandler);\n\t\tmLocationClient = mApplication.getLocationClient();\n\t\tmLocationClient.registerLocationListener(mLocationListener);\n\t\tinitcitys = mCityDB\n\t\t\t\t.queryBySqlReturnArrayListHashMap(\"select * from addcity\");\n\t\tif (initcitys.size() == 0) {\n\t\t\tHashMap<String, Object> cityhaHashMap = new HashMap<String, Object>();\n\t\t\tcityhaHashMap.put(\"name\", \"焦作\");\n\t\t\tcityhaHashMap.put(\"province\", \"河南\");\n\t\t\tcityhaHashMap.put(\"number\", \"101181101\");\n\t\t\tcityhaHashMap.put(\"pinyin\", \"jiaozuo\");\n\t\t\tcityhaHashMap.put(\"py\", \"jzs\");\n\t\t\tcityhaHashMap.put(\"lat\", \"35.22\");\n\t\t\tcityhaHashMap.put(\"lon\", \"113.25\");\n\t\t\tcityhaHashMap.put(\"islocation\", \"1\");\n\t\t\tinitcitys.add(cityhaHashMap);\n\t\t}\n\t\tMyLog.i(\">>>>>>>>initcitys\" + initcitys.size());\n\t\t// LocationService.sendGetLocationBroadcast(LoadingActivity.this);\n\t\tTimer timer = new Timer();\n\t\tTimerTask task1 = new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (sh.IsFirstUse()) {\n\t\t\t\t\tintent = new Intent(LoadingActivity.this,\n\t\t\t\t\t\t\tWelcomePagerActivity.class);\n\t\t\t\t\tintent.putExtra(\"bangzhu\", \"diyici\");\n\t\t\t\t\tsh.setIsFirstUse(false);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\telse if (initcitys.size() == 0) {\n\t\t\t\t\tintent = new Intent(LoadingActivity.this,\n\t\t\t\t\t\t\tEnvironmentSelectCtiyActivity.class);\n\t\t\t\t\tintent.putExtra(\"from\", \"lo\");\n\t\t\t\t\tintent.putExtra(\"load\", \"loading\");\n\t\t\t\t\tstartActivityForResult(intent, 100);\n\t\t\t\t\toverridePendingTransition(R.anim.addcity_activity_enter,\n\t\t\t\t\t\t\tR.anim.addcity_activity_enter);\n\t\t\t\t} else {\n\t\t\t\t\tintent = new Intent(LoadingActivity.this,\n\t\t\t\t\t\t\tEnvironmentMainActivity.class);\n\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\ttimer.schedule(task1, 2000);\n\n\t}", "private void loadData() {\n\n if (mIsLoading) {\n return;\n }\n\n String url = mSiteData.getUrl();\n\n if (!mIsRefreshMode) {\n //if (mMaxPage > 0 && mCurrentPage > mMaxPage) {\n // return;\n //}\n //Log.e(mTag, \"mMaxPage: \" + mMaxPage);\n\n if (mCurrentPage > 1) {\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_AKB48_TEAM8:\n url = url + \"?p=\" + mCurrentPage;\n break;\n case Config.BLOG_ID_NGT48_MANAGER:\n url = url + \"lite/?p=\" + mCurrentPage;\n break;\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n url = url + \"page-\" + mCurrentPage + \".html\";\n break;\n }\n //showToolbarProgressBar();\n }\n }\n\n String userAgent = Config.USER_AGENT_WEB;\n switch (mSiteData.getId()) {\n case Config.BLOG_ID_SKE48_SELECTED:\n case Config.BLOG_ID_NMB48_OFFICIAL:\n case Config.BLOG_ID_NGT48_MANAGER:\n case Config.BLOG_ID_NGT48_PHOTOLOG:\n userAgent = Config.USER_AGENT_MOBILE;\n break;\n }\n\n mIsLoading = true;\n\n if (!mIsFirst && !mIsRefreshMode) {\n mLoLoadingMore.setVisibility(View.VISIBLE);\n }\n\n //Log.e(mTag, url);\n requestData(url, userAgent);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_horario);\n\n this.setTitle(this.getIntent().getExtras().getString(\"nombreEstacion\"));\n tvDireccionBayovar=(TextView)findViewById(R.id.tvDireccionBayovar);\n tvDireccionVilla=(TextView)findViewById(R.id.tvDireccionVilla);\n\n LstHorariosABayovar = (ListView)findViewById(R.id.LstHorarioABayovar);\n LstHorariosAVilla = (ListView)findViewById(R.id.LstHorarioAVilla);\n\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setHomeButtonEnabled(true);\n\n cargarDatos();\n\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "private void prepareAndShowHomeScreen() {\n\t\tFraHeader header = FraHeader.newInstance(true);\n\t\theader.showBackButton(false);\n\t\tFraHomeContent homeContent = FraHomeContent.newInstance();\n\t\tFraFooter footer = FraFooter.newInstance(FooterIcons.TOP10);\n\t\tFraSearch search = FraSearch.newInstance();\n\t\tFraFont font = FraFont.newInstance();\n\t\tFraShare share = FraShare.newInstance();\n\n\t\treplaceScreenWithNavBarContentAndMenu(header, FraHeader.TAG,\n\t\t\t\thomeContent, FraHomeContent.TAG, footer, FraFooter.TAG,\n\t\t\t\tFraMenu.newInstance(), FraMenu.TAG, search, FraSearch.TAG,\n\t\t\t\tfont, FraFont.TAG, share, FraShare.TAG, false);\n\t\tprepareAndShowHomeScreen(false);\n\t\t/*\n\t\t * replaceScreenWithNavBarContentAndFooter(homeContent,\n\t\t * FraHomeContent.TAG, footer, FraFooter.TAG, false);\n\t\t */\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"\",\n\t\t\t\t\t\"Loading...\");\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tm_progDialog.setMessage(\"Loading...\");\n\t\t\tm_progDialog.setTitle(getResources().getString(R.string.app_name));\n\t\t\tm_progDialog.setCancelable(false);\n\t\t\tm_progDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tm_progDialog.setMessage(\"Loading...\");\n\t\t\tm_progDialog.setTitle(getResources().getString(R.string.app_name));\n\t\t\tm_progDialog.setCancelable(false);\n\t\t\tm_progDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tm_progDialog.setMessage(\"Loading...\");\n\t\t\tm_progDialog.setTitle(getResources().getString(R.string.app_name));\n\t\t\tm_progDialog.setCancelable(false);\n\t\t\tm_progDialog.show();\n\t\t}", "private void loadNavHeader() {\n // name, website\n txtName.setText(StoreData.LoadString(Constants.NAME,\"Anonymous\",getApplicationContext()));\n txtWebsite.setText(StoreData.LoadString(Constants.EMAIL,\"anonymous\",getApplicationContext()));\n urlProfileImg = StoreData.LoadString(Constants.IMGURL,\"\",getApplicationContext());\n // loading header background image\n Glide.with(this).load(urlNavHeaderBg)\n .crossFade()\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgNavHeaderBg);\n\n // Loading profile image\n Glide.with(this).load(urlProfileImg)\n .crossFade()\n .placeholder(R.drawable.anonymous_profile_pic)\n .error(R.drawable.anonymous_profile_pic)\n .thumbnail(0.5f)\n .bitmapTransform(new CircleTransform(this))\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgProfile);\n\n // showing dot next to notifications label\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }", "@Override\r\n\t\t\t\t\tpublic void onStart() {\n\t\t\t\t\t\tsuper.onStart();\r\n\t\t\t\t\t\tShowProgressDialog(R.string.hsc_progress);\r\n\t\t\t\t\t}" ]
[ "0.6997444", "0.69627655", "0.6776124", "0.66660047", "0.6657007", "0.6635147", "0.65938395", "0.65762144", "0.6539846", "0.6526255", "0.6512462", "0.6463345", "0.64625806", "0.6403205", "0.6371294", "0.6371294", "0.6360811", "0.63571465", "0.6357096", "0.63404197", "0.63305897", "0.63161385", "0.63131046", "0.63085073", "0.62965286", "0.62888783", "0.6284339", "0.6281074", "0.62770736", "0.626639", "0.626639", "0.62445784", "0.6238053", "0.6229284", "0.6228444", "0.622524", "0.6216158", "0.6212902", "0.6206799", "0.6198038", "0.6171574", "0.6170091", "0.6168469", "0.61665463", "0.61531305", "0.61485445", "0.6147579", "0.61444116", "0.614109", "0.61383665", "0.6135063", "0.61343026", "0.61318314", "0.6129564", "0.61225647", "0.61087114", "0.6103045", "0.6101214", "0.6100484", "0.60851866", "0.6080399", "0.6078322", "0.6075295", "0.60726696", "0.60634273", "0.60552055", "0.6037186", "0.60348374", "0.6026666", "0.60159796", "0.6015502", "0.60132504", "0.60106075", "0.60065204", "0.5996336", "0.598582", "0.59858155", "0.5984862", "0.5983807", "0.59807163", "0.59766114", "0.59658086", "0.59650475", "0.5961565", "0.5953614", "0.59515226", "0.5948339", "0.594658", "0.5943964", "0.5941592", "0.5939549", "0.593761", "0.59364283", "0.59364283", "0.59357643", "0.5929008", "0.59151685", "0.59151685", "0.59151685", "0.59102523", "0.5896524" ]
0.0
-1
join self or any node with specified meta data
public String join(NodeMeta meta) throws IOException, KeeperException, InterruptedException { return zk.create(thisPrefix + "/" + GROUP, serializer.serialize(meta), DEFAULT_ACL, CreateMode.PERSISTENT_SEQUENTIAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public List<Node> visitJoin(@NotNull XQueryParser.JoinContext ctx) {\n\t\tHashMap<String, List<Node>> hashJoin = new HashMap<String, List<Node>>();\n\t\tList<Node> result = new ArrayList<Node>();\n\t\tList<Node> left = new ArrayList<Node>(visit(ctx.query(0)));\n\t\tList<Node> right = new ArrayList<Node>(visit(ctx.query(1)));\n\t\tList<String> latt = transform(ctx.attrs(0));\n\t\tList<String> ratt = transform(ctx.attrs(1));\n\t\t\n\t\tif(latt.isEmpty()){\n\t\t\tfor(Node lnode : left){\n\t\t\t\tfor(Node rnode: right){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(lnode);\n\t\t\t\t\tchild.addAll(findChild(rnode));\n\t\t\t\t\tfor(Node childNode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childNode, true));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\tList<Node> small = left.size() < right.size() ? left : right,\n\t\t\t\tlarge = left.size() < right.size() ? right : left;\n\t\tList<String> smatt = left.size() < right.size() ? latt : ratt,\n\t\t\t\tlgatt = left.size() < right.size() ? ratt : latt;\n\t\t\n\t\t// store into hash map\n\t\tfor(Node smnode : small){\n\t\t\tString key = convertChildren(smnode, smatt);\n\t\t\tif(hashJoin.containsKey(key)){\n\t\t\t\thashJoin.get(key).add(smnode);\n\t\t\t} else hashJoin.put(key, new ArrayList<Node>(Arrays.asList(smnode)));\n\t\t}\n\t\t\n\t\t// actual join operation\n\t\tfor(Node lgnode : large){\n\t\t\tString attributes = convertChildren(lgnode, lgatt);\n\t\t\tif(hashJoin.containsKey(attributes)){\n\t\t\t\tfor(Node smnode : hashJoin.get(attributes)){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(smnode);\n\t\t\t\t\tchild.addAll(findChild(lgnode));\n\t\t\t\t\tfor(Node childnode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childnode, true));\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(container);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void join(NodeInfo info) {\n\t\taddAsPeer(info);\r\n\t\tSystem.out.println(\"Joined : \" + info.getIp() + \" \" + info.getPort());\r\n\t\t// join to obtained node\r\n\t\tString newJoinString = \"0114 JOIN \" + ip + \" \" + port;\r\n\t\tsend(newJoinString, info.getIp(), info.getPort());\r\n\t}", "public T caseJoinNode(JoinNode object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object visit(ASTJoin node, Object data) {\n\t\tint indent = (Integer) data;\n\t\t\n\t\tprintIndent(indent);\n\t\tSystem.out.println(\"join (\");\n\t\tnode.jjtGetChild(0).jjtAccept(this, indent + 2);\n\t\tSystem.out.println(\",\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, indent + 2);\n\t\tSystem.out.println(\",\");\n\t\tnode.jjtGetChild(2).jjtAccept(this, indent + 2);\n\t\tSystem.out.print(\", \");\n\t\tnode.jjtGetChild(3).jjtAccept(this, 0);\n\t\tSystem.out.println();\n\t\tprintIndent(indent);\n\t\tSystem.out.print(\")\");\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Element> execute(Node thisNode) {\n\n\t\tif (thisNode.getContactTable().size() <= level) {\n\t\t\t// TODO: reactivate next line\n\t\t\t//thisNode.getContactTable().joinLevels();\n\t\t\t// TODO: deactivcate next 2 lines\n\t\t\t//System.out.println(\"#as#dasd#\"+thisNode.getContactTable().size());\n\n\t\t\t// this optimization ensures that no redundant levels are created\n\t\t\tNode lastJoiningNode = thisNode.getContactTable().getLastJoiningNode();\n\t\t\tint newPrefix;\n\t\t\tif (lastJoiningNode != null && lastJoiningNode != joiningNode) {\n\t\t\t\tnewPrefix = Main.skipGraph.generatePrefix();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewPrefix = (prefix-1)*(-1);\n\t\t\t}\n\n\t\t\t// if prefixes are identical join on level\n\t\t\tif (newPrefix == prefix) {\n\t\t\t\tContact contact = joiningNode.thisContact();\n\t\t\t\tContactLevel newContactLevel = new ContactLevel(contact, contact, newPrefix);\n\t\t\t\tthisNode.getContactTable().addLevel(newContactLevel);\n\t\t\t\t// updates nextNode on joining node\n\t\t\t\tModifyContactsOperation setPrevOnJoining = new SetContactOperation(level, prefix, PREV, thisNode);\n\t\t\t\tModifyContactsOperation setNextOnJoining = new SetContactOperation(level, prefix, NEXT, thisNode);\n\t\t\t\tjoiningNode.execute(setPrevOnJoining);\n\t\t\t\tjoiningNode.execute(setNextOnJoining);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tContact contact = thisNode.thisContact();\n\t\t\t\tContactLevel newContactLevel = new ContactLevel(contact, contact, newPrefix);\n\t\t\t\tthisNode.getContactTable().addLevel(newContactLevel);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t// local variables\n\t\tNode nextNode = thisNode.getContactTable().getLevel(level-1).getNextContact().getNode();\n\n\t\t// node has the same prefix on this level as joining node\n\t\tif (thisNode.getContactTable().getLevel(level).getPrefix() == prefix) {\n\n\t\t\tNode prevNode = thisNode.getContactTable().getLevel(level).getPrevContact().getNode();\n\t\t\t// updates nextNode on previous node\n\t\t\tModifyContactsOperation setNextOnPrev = new SetContactOperation(level, prefix, NEXT, joiningNode);\n\t\t\tprevNode.execute(setNextOnPrev);\n\t\t\t// updates prevNode on joining node\n\t\t\tModifyContactsOperation setPrevOnJoining = new SetContactOperation(level, prefix, PREV, prevNode);\n\t\t\tjoiningNode.execute(setPrevOnJoining);\n\t\t\t// updates nextNode on joining node\n\t\t\tModifyContactsOperation setNextOnJoining = new SetContactOperation(level, prefix, NEXT, thisNode);\n\t\t\tjoiningNode.execute(setNextOnJoining);\n\t\t\t// updates prevNode on this node\n\t\t\tthisNode.getContactTable().getLevel(level).setPrevContact(joiningNode);\n\t\t}\n\t\t// node has a different prefix on this level and forwards request to the next node on this level\n\t\t// (making sure nextNode != joiningNode)\n\t\telse if (nextNode != thisNode && nextNode != joiningNode) {\n\t\t\tnextNode.execute(this);\n\t\t}\n\t\treturn null;\n\t}", "public void relate(HNode id, Object o);", "public void convertCartesianToJoin(){\n\n //Remove the nodes that are representing the cartesian products and a condition to a join operation\n canonicalTree.createStack(canonicalTree.getRootNode());\n Stack<TreeStructure.Node<String>> stack = canonicalTree.getStack();\n TreeStructure.Node<String> node;\n\n while (!stack.empty()) {\n node = stack.pop();\n //if the node is a cartesian product and it does not only hold \"X\" and then change it to join operation remove the \"X\" and add the condition!\n if(node.getNodeStatus() == CARTESIAN_NODE_STATUS && !node.getData().equalsIgnoreCase(\"X\")){\n node.setNodeData(\"⨝\" + node.getData().replace(\"X\", \" \"));\n node.setNodeStatus(JOIN_NODE_STATUS);\n }\n }\n }", "public String join() throws IOException, KeeperException, InterruptedException {\n NodeMeta meta = NodeMeta.defaultNodeMeta.with(\"sig\", NodeMeta.signature().getBytes());\n return join(meta);\n }", "public void join(Node chord);", "@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}", "abstract protected Object joinClause(Object o1, Object o2);", "public Relation join(Relation r, Condition c, String name) throws RelationException;", "private void join (Block b) {\n\t\tArrayList<Block> neighbors = getAdj(b); // All of the neighbors.\n\t\tfor (Block neighbor: neighbors) { // Iterates through all of the neighbors.\n\t\t\tif (neighbor.t == ' ') { // Important, checks if the neighbor is a wall or not.\n\t\t\t\tfor (Block member: neighbor.tree) {\n\t\t\t\t\tb.tree.add(member);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Block member : b.tree) { // Iterates through all of the members of the tree.\n\t\t\tif (member.t == ' ') member.tree = b.tree; // Sets the trees of the members to the shared tree. \n\t\t}\n\t\tb.t = ' ';\n\t}", "private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t}", "Join createJoin();", "public Value joinMeta(Value v) {\n Value r = new Value(this);\n r.flags |= v.flags & META;\n return canonicalize(r);\n }", "@Override\n public boolean supportsRootTreatTreatJoin() {\n return true;\n }", "public static void join(Node a, Node b) {\r\n a.right = b;\r\n b.left = a;\r\n }", "public void addSuccessorNode(BaseJoin node, Rete engine, WorkingMemory mem)\n\t\t\tthrows AssertException {\n if (addNode(node)) {\n\t\t\t// first, we get the memory for this node\n\t\t\tMap<?, ?> leftmem = (Map<?, ?>) mem.getBetaLeftMemory(this);\n\t\t\t// now we iterate over the entry set\n\t\t\tIterator<?> itr = leftmem.entrySet().iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tBetaMemory bmem = (BetaMemory) itr.next();\n\t\t\t\tIndex left = bmem.getIndex();\n\t\t\t\t// iterate over the matches\n Map<?, ?> rightmem = (Map<?, ?>) mem.getBetaRightMemory(this);\n\t\t\t\tIterator<?> ritr = rightmem.keySet().iterator();\n\t\t\t\twhile (ritr.hasNext()) {\n\t\t\t\t\tFact rfcts = (Fact) ritr.next();\n\t\t\t\t\t// now assert in the new join node\n\t\t\t\t\tnode.assertLeft(left.add(rfcts), engine, mem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Mapper<T, T2> relate(Customizable customizable);", "private PlanNode planMergeJoin(PlanNode current, PlanNode root) throws QueryMetadataException,\n\t\t\tTeiidComponentException {\n\t\tfloat sourceCost = NewCalculateCostUtil.computeCostForTree(current.getFirstChild(), metadata);\n\t\tCriteria crit = (Criteria)current.getProperty(NodeConstants.Info.SELECT_CRITERIA);\n\t\t\n\t\tPlannedResult plannedResult = findSubquery(crit, true);\n\t\tif (plannedResult.query == null) {\n\t\t\treturn current;\n\t\t}\n\t\tif (sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE \n\t\t\t\t&& sourceCost < RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY && !plannedResult.mergeJoin) {\n\t\t\t//TODO: see if a dependent join applies the other direction\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\tRelationalPlan originalPlan = (RelationalPlan)plannedResult.query.getProcessorPlan();\n Number originalCardinality = originalPlan.getRootNode().getEstimateNodeCardinality();\n if (!plannedResult.mergeJoin && originalCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE) {\n //TODO: this check isn't really accurate - exists and scalarsubqueries will always have cardinality 2/1\n \t//if it's currently unknown, removing criteria won't make it any better\n \treturn current;\n }\n \n Collection<GroupSymbol> leftGroups = FrameUtil.findJoinSourceNode(current).getGroups();\n\n\t\tif (!planQuery(leftGroups, false, plannedResult)) {\n\t\t\tif (plannedResult.mergeJoin && analysisRecord != null && analysisRecord.recordAnnotations()) {\n\t\t\t\tthis.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, \"Could not plan as a merge join: \" + crit, \"ignoring MJ hint\", Priority.HIGH)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\t//check if the child is already ordered. TODO: see if the ordering is compatible.\n\t\tPlanNode childSort = NodeEditor.findNodePreOrder(root, NodeConstants.Types.SORT, NodeConstants.Types.SOURCE | NodeConstants.Types.JOIN);\n\t\tif (childSort != null) {\n\t\t\tif (plannedResult.mergeJoin && analysisRecord != null && analysisRecord.recordAnnotations()) {\n\t\t\t\tthis.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, \"Could not plan as a merge join since the parent join requires a sort: \" + crit, \"ignoring MJ hint\", Priority.HIGH)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\t//add an order by, which hopefully will get pushed down\n\t\tplannedResult.query.setOrderBy(new OrderBy(plannedResult.rightExpressions).clone());\n\t\tfor (OrderByItem item : plannedResult.query.getOrderBy().getOrderByItems()) {\n\t\t\tint index = plannedResult.query.getProjectedSymbols().indexOf(item.getSymbol());\n\t\t\tif (index >= 0 && !(item.getSymbol() instanceof ElementSymbol)) {\n\t\t\t\titem.setSymbol((Expression) plannedResult.query.getProjectedSymbols().get(index).clone());\n\t\t\t}\n\t\t\titem.setExpressionPosition(index);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//clone the symbols as they may change during planning\n\t\t\tList<Expression> projectedSymbols = LanguageObject.Util.deepClone(plannedResult.query.getProjectedSymbols(), Expression.class);\n\t\t\t//NOTE: we could tap into the relationalplanner at a lower level to get this in a plan node form,\n\t\t\t//the major benefit would be to reuse the dependent join planning logic if possible.\n\t\t\tRelationalPlan subPlan = (RelationalPlan)QueryOptimizer.optimizePlan(plannedResult.query, metadata, idGenerator, capFinder, analysisRecord, context);\n\t\t\tNumber planCardinality = subPlan.getRootNode().getEstimateNodeCardinality();\n \n\t\t\tif (!plannedResult.mergeJoin) {\n\t\t\t\t//if we don't have a specific hint, then use costing\n\t if (planCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE \n\t \t\t|| planCardinality.floatValue() > 10000000\n\t \t\t|| (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() > 1000)\n\t \t\t|| (sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE && sourceCost * originalCardinality.floatValue() < planCardinality.floatValue() / (100 * Math.log(Math.max(4, sourceCost))))) {\n\t \t//bail-out if both are unknown or the new plan is too large\n\t \tif (analysisRecord != null && analysisRecord.recordDebug()) {\n\t \t\tcurrent.recordDebugAnnotation(\"cost of merge join plan was not favorable\", null, \"semi merge join will not be used\", analysisRecord, metadata); //$NON-NLS-1$ //$NON-NLS-2$\n\t \t\t\t}\n\t \treturn current;\n\t }\n\t\t\t}\n \n\t\t\t//assume dependent\n\t\t\tif ((sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() != NewCalculateCostUtil.UNKNOWN_VALUE \n\t\t\t\t\t&& planCardinality.floatValue() < sourceCost / 8) || (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() <= 1000)) {\n\t\t\t\tplannedResult.makeInd = true;\n\t\t\t}\n\t\t\t\n\t\t\t/*if (plannedResult.makeInd \n\t\t\t\t\t&& plannedResult.query.getCorrelatedReferences() == null\n\t\t\t\t\t&& !plannedResult.not\n\t\t\t\t\t&& plannedResult.leftExpressions.size() == 1) {\n \t//TODO: this should just be a dependent criteria node to avoid sorts\n }*/\n\t\t\t\n\t\t\tcurrent.recordDebugAnnotation(\"Conditions met (hint or cost)\", null, \"Converting to a semi merge join\", analysisRecord, metadata); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\n PlanNode semiJoin = NodeFactory.getNewNode(NodeConstants.Types.JOIN);\n semiJoin.addGroups(current.getGroups());\n Set<GroupSymbol> groups = GroupsUsedByElementsVisitor.getGroups(plannedResult.rightExpressions);\n semiJoin.addGroups(groups);\n semiJoin.setProperty(NodeConstants.Info.JOIN_STRATEGY, JoinStrategyType.MERGE);\n semiJoin.setProperty(NodeConstants.Info.JOIN_TYPE, plannedResult.not?JoinType.JOIN_ANTI_SEMI:JoinType.JOIN_SEMI);\n semiJoin.setProperty(NodeConstants.Info.NON_EQUI_JOIN_CRITERIA, plannedResult.nonEquiJoinCriteria);\n List<Criteria> joinCriteria = new ArrayList<Criteria>();\n joinCriteria.addAll(plannedResult.nonEquiJoinCriteria);\n for (int i = 0; i < plannedResult.leftExpressions.size(); i++) {\n \tjoinCriteria.add(new CompareCriteria((Expression)plannedResult.rightExpressions.get(i), CompareCriteria.EQ, (Expression)plannedResult.leftExpressions.get(i)));\n }\n semiJoin.setProperty(NodeConstants.Info.JOIN_CRITERIA, joinCriteria);\n //nested subqueries are possibly being promoted, so they need their references updated\n List<SymbolMap> refMaps = semiJoin.getAllReferences();\n SymbolMap parentRefs = plannedResult.query.getCorrelatedReferences();\n for (SymbolMap refs : refMaps) {\n \tfor (Map.Entry<ElementSymbol, Expression> ref : refs.asUpdatableMap().entrySet()) {\n \t Expression expr = ref.getValue();\n \t if (expr instanceof ElementSymbol) {\n\t \t Expression convertedExpr = parentRefs.getMappedExpression((ElementSymbol)expr);\n\t \t if (convertedExpr != null) {\n\t \t \tref.setValue(convertedExpr);\n\t \t }\n \t }\n \t semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(ref.getValue()));\n \t }\n }\n semiJoin.setProperty(NodeConstants.Info.LEFT_EXPRESSIONS, plannedResult.leftExpressions);\n semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(plannedResult.leftExpressions));\n semiJoin.setProperty(NodeConstants.Info.RIGHT_EXPRESSIONS, plannedResult.rightExpressions);\n semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(plannedResult.rightExpressions));\n semiJoin.setProperty(NodeConstants.Info.SORT_RIGHT, SortOption.ALREADY_SORTED);\n semiJoin.setProperty(NodeConstants.Info.OUTPUT_COLS, root.getProperty(NodeConstants.Info.OUTPUT_COLS));\n \n List childOutput = (List)current.getFirstChild().getProperty(NodeConstants.Info.OUTPUT_COLS);\n PlanNode toCorrect = root;\n while (toCorrect != current) {\n \ttoCorrect.setProperty(NodeConstants.Info.OUTPUT_COLS, childOutput);\n \ttoCorrect = toCorrect.getFirstChild();\n }\n \n PlanNode node = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);\n node.setProperty(NodeConstants.Info.PROCESSOR_PLAN, subPlan);\n node.setProperty(NodeConstants.Info.OUTPUT_COLS, projectedSymbols);\n node.setProperty(NodeConstants.Info.EST_CARDINALITY, planCardinality);\n node.addGroups(groups);\n root.addAsParent(semiJoin);\n semiJoin.addLastChild(node);\n PlanNode result = current.getParent();\n NodeEditor.removeChildNode(result, current);\n RuleImplementJoinStrategy.insertSort(semiJoin.getFirstChild(), (List<Expression>) plannedResult.leftExpressions, semiJoin, metadata, capFinder, true, context);\n if (plannedResult.makeInd && !plannedResult.not) {\n \t//TODO: would like for an enhanced sort merge with the semi dep option to avoid the sorting\n \t//this is a little different than a typical dependent join in that the right is the independent side\n \tString id = RuleChooseDependent.nextId();\n \tPlanNode dep = RuleChooseDependent.getDependentCriteriaNode(id, plannedResult.rightExpressions, plannedResult.leftExpressions, node, metadata, null, false, null);\n \tsemiJoin.getFirstChild().addAsParent(dep);\n \tsemiJoin.setProperty(NodeConstants.Info.DEPENDENT_VALUE_SOURCE, id);\n \tthis.dependent = true;\n }\n return result;\n\t\t} catch (QueryPlannerException e) {\n\t\t\t//can't be done - probably access patterns - what about dependent\n\t\t\treturn current;\n\t\t}\n\t}", "public void joinGraph(IGraph graph);", "protected void sequence_FULL_INNER_JOIN_LEFT_OUTER_RIGHT_joins(ISerializationContext context, joins semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public void combine() {\n\t\t// differences with leafNode: need to address ptrs, and need to demote parent\n\t\tif (next == null) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"combine internal:\\t\" + Arrays.toString(keys) + lastindex + \"\\t\" + Arrays.toString(next.keys) + next.lastindex);\n\t\tNode nextNode = next;\n\n\t\t// demote parent\n\t\tNode parentNode = nextNode.parentref.getNode();\n\t\tint parentIndex = nextNode.parentref.getIndex();\n\t\tlastindex += 1;\n\t\tkeys[lastindex] = parentNode.keys[parentIndex];\n\t\tptrs[lastindex] = next.ptrs[0];\n\t\tptrs[lastindex].parentref = new Reference(this, lastindex, false);\n\n\t\tparentNode.delete(parentIndex); // delete parent\n\n\t\t// transfer next sibling node's date into current node\n\t\tfor (int i = 1; i <= next.lastindex; i++) { // start from 1\n\t\t\tlastindex += 1;\n\t\t\tkeys[lastindex] = next.keys[i];\n\t\t\tptrs[lastindex] = next.ptrs[i];\n\t\t\tptrs[lastindex].parentref = new Reference(this, lastindex, false); // set parent\n\t\t}\n\t\t// connect node, delete nextNode\n\t\tNode nextNextNode = nextNode.next;\n\t\tthis.next = nextNextNode;\n\t\tif (nextNextNode != null) {\n\t\t\tnextNextNode.prev = this;\n\t\t}\n\t}", "@Override\n\tpublic void joinTransaction() {\n\t\t\n\t}", "public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }", "private void buildRowMapping() {\n final Map<String, ColumnDescriptor> targetSource = new TreeMap<>();\n\n // build a DB path .. find parent node that terminates the joint group...\n PrefetchTreeNode jointRoot = this;\n while (jointRoot.getParent() != null && !jointRoot.isDisjointPrefetch()\n && !jointRoot.isDisjointByIdPrefetch()) {\n jointRoot = jointRoot.getParent();\n }\n\n final String prefix;\n if (jointRoot != this) {\n Expression objectPath = ExpressionFactory.pathExp(getPath(jointRoot));\n ASTPath translated = (ASTPath) ((PrefetchProcessorNode) jointRoot)\n .getResolver()\n .getEntity()\n .translateToDbPath(objectPath);\n\n // make sure we do not include \"db:\" prefix\n prefix = translated.getOperand(0) + \".\";\n } else {\n prefix = \"\";\n }\n\n // find propagated keys, assuming that only one-step joins\n // share their column(s) with parent\n\n if (getParent() != null\n && !getParent().isPhantom()\n && getIncoming() != null\n && !getIncoming().getRelationship().isFlattened()) {\n\n DbRelationship r = getIncoming()\n .getRelationship()\n .getDbRelationships()\n .get(0);\n for (final DbJoin join : r.getJoins()) {\n appendColumn(targetSource, join.getTargetName(), prefix\n + join.getTargetName());\n }\n }\n\n ClassDescriptor descriptor = resolver.getDescriptor();\n\n descriptor.visitAllProperties(new PropertyVisitor() {\n\n public boolean visitAttribute(AttributeProperty property) {\n String target = property.getAttribute().getDbAttributePath();\n if(!property.getAttribute().isLazy()) {\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n\n public boolean visitToMany(ToManyProperty property) {\n return visitRelationship(property);\n }\n\n public boolean visitToOne(ToOneProperty property) {\n return visitRelationship(property);\n }\n\n private boolean visitRelationship(ArcProperty arc) {\n DbRelationship dbRel = arc.getRelationship().getDbRelationships().get(0);\n for (DbAttribute attribute : dbRel.getSourceAttributes()) {\n String target = attribute.getName();\n\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n });\n\n // append id columns ... (some may have been appended already via relationships)\n for (String pkName : descriptor.getEntity().getPrimaryKeyNames()) {\n appendColumn(targetSource, pkName, prefix + pkName);\n }\n\n // append inheritance discriminator columns...\n for (ObjAttribute column : descriptor.getDiscriminatorColumns()) {\n String target = column.getDbAttributePath();\n appendColumn(targetSource, target, prefix + target);\n }\n\n int size = targetSource.size();\n this.rowCapacity = (int) Math.ceil(size / 0.75);\n this.columns = new ColumnDescriptor[size];\n targetSource.values().toArray(columns);\n }", "private void addRelationship(String node1, String node2, String relation)\n {\n try (Session session = driver.session())\n {\n // Wrapping Cypher in an explicit transaction provides atomicity\n // and makes handling errors much easier.\n try (Transaction tx = session.beginTransaction())\n {\n tx.run(\"MATCH (j:Node {value: {x}})\\n\" +\n \"MATCH (k:Node {value: {y}})\\n\" +\n \"MERGE (j)-[r:\" + relation + \"]->(k)\", parameters(\"x\", node1, \"y\", node2));\n tx.success(); // Mark this write as successful.\n }\n }\n }", "public Join(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this._p = p;\n this._child1 = child1;\n this._child2 = child2;\n this._hj = new HashJoin();\n }", "public Relationship createRelationshipTo( Node otherNode, \n \t\tRelationshipType type );", "@Override\n public Object visit(ASTJoinList node, Object data) {\n\t\tint indent = (Integer) data;\n\t\tprintIndent(indent);\n\t\t\n\t\tSystem.out.print(\"[\");\n\t\tint numOfChild = node.jjtGetNumChildren();\n\t\tboolean first = true;\n\t\tfor (int i = 0; i < numOfChild; i++) {\n\t\t\tif (first)\n\t\t\t\tfirst = false;\n\t\t\telse\n\t\t\t\tSystem.out.print(\", \");\n\t\t\tnode.jjtGetChild(i).jjtAccept(this, data);\n\t\t}\n\t\tSystem.out.print(\"]\");\n\t return null;\n }", "public String join() {\n\t\t// A stringbuilder is an efficient way to create a new string in Java, since += makes copies.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (Node<T> current = start; current != null; current = current.next) {\n\t\t\tif (current != start) {\n\t\t\t\tsb.append(' ');\n\t\t\t}\n\t\t\tsb.append(current.value);\n\t\t}\n\t\treturn sb.toString();\n\t}", "protected abstract Object calcJoinRow();", "void addNeighbor(NodeKey key, GraphNode target, Map<String, String> attr);", "public void concatenateList (linkedList<E> M) {\n\r\n if(this.head == null){\r\n head = M.head;\r\n tail = M.tail;\r\n } else {\r\n tail.setNext(M.head);\r\n tail = M.tail;\r\n }\r\n\r\n }", "public void addJoin(String left, String right, boolean outer, int reltype) {\r\n DSJoinDescriptor d = new DSJoinDescriptor(left, right, outer, reltype);\r\n _joins.addElement(d);\r\n }", "public void join(PhoenixTransactionContext ctx);", "private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }", "@Override\n protected BackendEntry mergeEntries(BackendEntry e1, BackendEntry e2) {\n\n UltraSearchBackendEntry current = (UltraSearchBackendEntry) e1;\n UltraSearchBackendEntry next = (UltraSearchBackendEntry) e2;\n\n E.checkState(current == null || current.type().isVertex(),\n \"The current entry must be null or VERTEX\");\n E.checkState(next != null && next.type().isEdge(),\n \"The next entry must be EDGE\");\n\n if (current != null) {\n Id nextVertexId = IdGenerator.of(\n next.<String>column(HugeKeys.OWNER_VERTEX));\n if (current.id().equals(nextVertexId)) {\n current.subRow(next.row());\n return current;\n }\n }\n\n return this.wrapByVertex(next);\n }", "@Override\n public boolean link(T dataX, T dataY) throws NodeNotFoundException { return link(dataX, dataY, 1.0); }", "public ListNode join(ListNode lHead, ListNode rHead, ListNode pivot) {\n ListNode lTail = null;\n\n if (lHead != null) {\n ListNode curr = lHead;\n while (curr.next != null) {\n curr = curr.next;\n }\n lTail = curr;\n }\n\n //Left list is empty\n if (lHead == null) {\n pivot.next = rHead;\n return pivot;\n } else if (rHead == null) {\n //right list is empty\n lTail.next = pivot;\n pivot.next = null;\n return lHead;\n } else {\n lTail.next = pivot;\n pivot.next = rHead;\n\n return lHead;\n }\n }", "@Override\n public void visit(final OpLeftJoin opLeftJoin) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpLeftJoin\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpLeftJoin.create(rewriteOp2(opLeftJoin, rewriter), rewriter.getResult(), opLeftJoin.getExprs()));\n }", "public abstract DBResult getAdjacentLinks(int nodeId) throws SQLException;", "public FetchJoinInformation(String property) {\n\t\tthis(property, JoinType.LEFT);\n\t}", "private void handleJoinColumns(JsonNode propertyNode, JAnnotationUse jAnnotationUse, String annotationKey) {\n if (propertyNode.has(JpaConstants.JOIN_COLUMNS)) {\n JsonNode node = propertyNode.get(annotationKey);\n if (Objects.isNull(node)) {\n return;\n }\n\n // Create Join Column\n JAnnotationUse joinColumn = jAnnotationUse.annotationParam(annotationKey, JoinColumn.class);\n // Get name value\n if (node.has(JpaConstants.NAME)) {\n String joinColumnName = node.get(JpaConstants.NAME).asText();\n joinColumn.param(JpaConstants.NAME, joinColumnName);\n }\n // Get REFERENCED_COLUMN_NAME value and append\n if (node.has(JpaConstants.REFERENCED_COLUMN_NAME)) {\n joinColumn.param(JpaConstants.REFERENCED_COLUMN_NAME, node.get(JpaConstants.REFERENCED_COLUMN_NAME).asText());\n }\n }\n }", "void visit(final Join join);", "protected void sequence_JoinStream(ISerializationContext context, JoinStream semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "LinkRelation createLinkRelation();", "@Override\n public void map(Object key, Text value, Context context)\n throws IOException, InterruptedException {\n Map<String, String> parsed = MRDPUtils.transformXmlToMap(value.toString());\n\n String postId = parsed.get(\"PostId\");\n if (postId == null) {\n return;\n }\n\n // The foreign join key is the user ID\n outkey.set(postId);\n\n // Flag this record for the reducer and then output\n outvalue.set(\"C\" + value.toString());\n context.write(outkey, outvalue);\n }", "Optional<Node<UnderlyingData>> nextNode(Node<UnderlyingData> node);", "public final AstValidator.join_item_return join_item() throws RecognitionException {\n AstValidator.join_item_return retval = new AstValidator.join_item_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree JOIN_ITEM334=null;\n AstValidator.rel_return rel335 =null;\n\n AstValidator.join_group_by_clause_return join_group_by_clause336 =null;\n\n\n CommonTree JOIN_ITEM334_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:529:2: ( ^( JOIN_ITEM rel join_group_by_clause ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:529:4: ^( JOIN_ITEM rel join_group_by_clause )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n JOIN_ITEM334=(CommonTree)match(input,JOIN_ITEM,FOLLOW_JOIN_ITEM_in_join_item2802); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n JOIN_ITEM334_tree = (CommonTree)adaptor.dupNode(JOIN_ITEM334);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(JOIN_ITEM334_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_rel_in_join_item2804);\n rel335=rel();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, rel335.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_join_group_by_clause_in_join_item2806);\n join_group_by_clause336=join_group_by_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, join_group_by_clause336.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n if( ((join_clause_scope)join_clause_stack.peek()).arity == 0 ) {\n // For the first input\n ((join_clause_scope)join_clause_stack.peek()).arity = (join_group_by_clause336!=null?join_group_by_clause336.exprCount:0);\n } else if( (join_group_by_clause336!=null?join_group_by_clause336.exprCount:0) != ((join_clause_scope)join_clause_stack.peek()).arity ) {\n throw new ParserValidationException( input, new SourceLocation( (PigParserNode)((CommonTree)retval.start) ),\n \"The arity of the join columns do not match.\" );\n }\n }\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public void traverseIncludeSelf(INext<T> next){\n if(next==null){\n return;\n }\n traverse(this,next,true);\n }", "Node<K, V> wrapNode(Node<K, V> node) throws IOException;", "@Override\n protected DataSet<GraphHead> computeNewGraphHeads() {\n return firstCollection.getGraphHeads()\n .union(secondCollection.getGraphHeads())\n .groupBy(new Id<GraphHead>())\n .reduceGroup(new GroupCountEquals<GraphHead>(2));\n }", "private LeftJoin convertToLeftJoin(GraphPattern gp, ElementOptional optional) throws SemQAException {\n\t\tGraphPattern right = sparqlToSemQA(optional.getOptionalElement());\r\n\t\treturn new LeftJoin(gp, right);\r\n\t}", "@Test\n public void testMixedJoin3() throws Exception {\n String sql = \"SELECT * FROM g1, g2 inner join g3 on g2.a=g3.a\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g1\");\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, 2, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_INNER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"g2.a\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"g3.a\");\n \n verifySql(\"SELECT * FROM g1, g2 INNER JOIN g3 ON g2.a = g3.a\", fileNode);\n }", "void addNodeMetadata(int node, String key, String value);", "public Relation setDeepRelation(XDI3Segment contextNodeXri, XDI3Segment arcXri, ContextNode targetContextNode);", "@Override\n public BatchOperator linkFrom(List<BatchOperator> ins) {\n return linkFrom(ins.get(0));\n }", "Exp join() {\n List<Node> connectedNode = null;\n Exp connectedExp = Exp.create(AND);\n List<Exp> disconnectedExp = new ArrayList<Exp>();\n boolean disconnectedFilter = false;\n\n for (int i = 0; i < size(); i++) {\n Exp e = get(i);\n\n switch (e.type()) {\n\n case FILTER:\n Filter f = e.getFilter();\n List<String> lvar = f.getVariables();\n\n if (connectedNode == null || isBound(lvar, connectedNode)) {\n // filter is first \n // or filter is bound by current exp : add it to exp\n connectedExp.add(e);\n } else {\n // filter not bound by current exp\n if (!disconnectedFilter) {\n add(disconnectedExp, connectedExp);\n disconnectedFilter = true;\n }\n add(disconnectedExp, e);\n }\n continue;\n\n case OPTION:\n if (connectedNode == null) {\n connectedNode = e.getAllNodes();\n } else {\n connectedNode.addAll(e.getAllNodes());\n }\n\n break;\n\n default:\n // TODO: UNION \n List<Node> nodes = null;\n if (type() == MINUS || type() == OPTIONAL) {\n nodes = e.first().getAllNodes();\n } else {\n nodes = e.getAllNodes();\n }\n\n if (disconnectedFilter) {\n if (!groupEdge) {\n connectedExp = Exp.create(AND);\n connectedNode = null;\n }\n disconnectedFilter = false;\n }\n\n if (connectedNode == null) {\n connectedNode = nodes;\n } else if (intersect(nodes, connectedNode)) {\n connectedNode.addAll(nodes);\n } else {\n add(disconnectedExp, connectedExp);\n connectedExp = Exp.create(AND);\n connectedNode = nodes;\n }\n }\n\n connectedExp.add(e);\n }\n\n if (connectedExp.size() > 0) {\n add(disconnectedExp, connectedExp);\n }\n\n if (disconnectedExp.size() <= 1) {\n return this;\n } else {\n Exp res = join(disconnectedExp);\n //System.out.println(\"E: \" + res);\n return res;\n }\n }", "void associate(SNode outputNode, SReferenceLink role, String targetModelRef, String targetNodeId);", "private static List<WayNodeOSM> concatMetanodes(List<WayNodeOSM>metaNodes1, List<WayNodeOSM>metaNodes2, long duplicateNode) {\n \t\t// turn the lists the right way round\n \t\tif ( metaNodes1.get(0).getID() == duplicateNode){\n \t\t\tCollections.reverse(metaNodes1);\n \t\t}\n \t\tif (!( metaNodes2.get(0).getID() == duplicateNode)) {\n \t\t\tCollections.reverse(metaNodes2);\n \t\t}\n \t\t// remove the duplicate, then concat\n \t\tmetaNodes1.remove(metaNodes1.size() - 1);\n \t\tmetaNodes1.addAll(metaNodes2);\n \t\treturn metaNodes1;\n \t}", "@PortedFrom(file = \"Taxonomy.h\", name = \"finishCurrentNode\")\n public void finishCurrentNode() {\n TaxonomyVertex syn = current.getSynonymNode();\n if (syn != null) {\n addCurrentToSynonym(syn);\n } else {\n // put curEntry as a representative of Current\n if (!queryMode()) {\n // insert node into taxonomy\n current.incorporate(options);\n graph.add(current);\n // we used the Current so need to create a new one\n current = new TaxonomyVertex();\n }\n }\n }", "Link(Object it, Link inp, Link inn) { e = it; p = inp; n = inn; }", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public String getPrefix() { return \"linknode\"; }", "ArrayList<String> findLinkedEntity(String node) throws SQLException;", "public Node appendNode(Node node);", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "public Relation setDeepRelation(XDI3Segment contextNodeXri, XDI3Segment arcXri, XDI3Segment targetContextNodeXri);", "private String replaceIntermediateObjectWithRel(Context context, String strOldRelId ,String strNewRelId ,String strNewRelIdSide,Map attributeMap) throws Exception {\r\n\r\n\t\tString strNewConnId=\"\";\r\n\t\tboolean isRelToRel = true;\r\n\t\tboolean isFrom = true;\r\n\r\n\t\ttry{\r\n\r\n\t\tDomainRelationship domRel = new DomainRelationship(strOldRelId);\r\n //Get the attributes on Relationship\r\n /*Map attributeMap = new HashMap();\r\n attributeMap = domRel.getAttributeMap(context,true);*/\r\n\r\n\r\n\t\t//Get the \"Type\" of rel\r\n\t\tStringList slRelSelects = new StringList(1);\r\n slRelSelects.addElement(DomainRelationship.SELECT_TYPE);\r\n\r\n if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"from\")){\r\n \t//New Rel replaces FL/GBOM which is on \"from\" side of Old Rel hence we query now \"to\" side of Old Rel\r\n \tslRelSelects.add(\"to.id\");\r\n slRelSelects.add(\"torel.id\");\r\n\r\n }else if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"to\")){\r\n \t//New Rel replaces FL/GBOM which is on \"to\" side of Old Rel hence we query now \"from\" side of Old Rel\r\n \tslRelSelects.add(\"from.id\");\r\n slRelSelects.add(\"fromrel.id\");\r\n }\r\n\r\n Hashtable htRelData = domRel.getRelationshipData(context,slRelSelects);\r\n\r\n String strFromSideOfRel =\"\";\r\n String strToSideOfRel =\"\";\r\n String strRelId =\"\";\r\n String strObjId =\"\";\r\n\r\n StringList slRelTypes = (StringList) htRelData.get(DomainRelationship.SELECT_TYPE);\r\n String strRelType = (String) slRelTypes.get(0);\r\n RelationshipType RelType = new RelationshipType(strRelType);\r\n\r\n\r\n if((StringList) htRelData.get(\"from.id\")!=null || ((StringList)htRelData.get(\"fromrel.id\"))!=null ){\r\n\r\n \tStringList slFromSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"from.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"from.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\t//isFrom = false;\r\n \t\tstrObjId = strFromSideOfRel;\r\n\r\n\r\n \t}else if(!((StringList)htRelData.get(\"fromrel.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"fromrel.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tstrRelId = strFromSideOfRel;\r\n \t\tisFrom = false;\r\n \t}\r\n }\r\n\r\n if((StringList) htRelData.get(\"to.id\")!=null || ((StringList)htRelData.get(\"torel.id\"))!=null ){\r\n\r\n \tStringList slToSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"to.id\")).isEmpty()){\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"to.id\");\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\tstrObjId = strToSideOfRel;\r\n \t\tisFrom = false;\r\n \t}else if(!((StringList)htRelData.get(\"torel.id\")).isEmpty()){\r\n\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"torel.id\");\r\n\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n \t\tstrRelId =strToSideOfRel;\r\n \t\t//isFrom = false;\r\n \t}\r\n }\r\n\r\n\r\n if(isRelToRel){\r\n\r\n strNewConnId = connectRelationship(context, RelType, strRelId,strNewRelId, isFrom);\r\n\r\n }else{\r\n\r\n \tstrNewConnId = connectObject(context, RelType, strObjId,strNewRelId, isFrom);\r\n }\r\n\r\n\t\t\t StringList relDataSelects = new StringList();\r\n\t\t\t relDataSelects.addElement(\"frommid.id\");\r\n\t\t\t relDataSelects.addElement(\"tomid.id\");\r\n\r\n\t\t\t Map gbomRelData = domRel.getRelationshipData(context,relDataSelects);\r\n\t\t\t StringList sLFrommid = new StringList();\r\n\t\t\t StringList sLTomid = new StringList();\r\n\r\n\t\t\t sLFrommid = (StringList) gbomRelData.get(\"frommid.id\");\r\n\t\t\t if(!sLFrommid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLFrommid.size();i++){\r\n\r\n\t\t\t\t\tString strFromMid = (String)sLFrommid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strFromMid,strNewConnId,true);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\r\n\t\t\t sLTomid = (StringList) gbomRelData.get(\"tomid.id\");\r\n\t\t\t if(!sLTomid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLTomid.size();i++){\r\n\r\n\t\t\t\t\tString strToMid = (String)sLTomid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strToMid,strNewConnId,false);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\tDomainRelationship domNewConnId = new DomainRelationship(strNewConnId);\r\n\t\t\tmqlLogRequiredInformationWriter(\"Rel id :: \"+ strNewConnId +\"\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this rel id :: \"+ attributeMap +\"\\n\\n\");\r\n\t domNewConnId.setAttributeValues(context, attributeMap);\r\n\r\n\r\n\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn strNewConnId;\r\n\t}", "public UserJoins getUserJoins(Integer tid, int uid);", "@Override\r\n\tpublic void join() {\n\r\n\t}", "static void compressTwoNode(ExecutableNodeBase node, ExecutableNodeBase parent) {\n if (!(node instanceof QueryNodeBase) || !(parent instanceof QueryNodeBase)) {\n return;\n }\n QueryNodeBase parentQuery = (QueryNodeBase) parent;\n QueryNodeBase nodeQuery = (QueryNodeBase) node;\n\n // Change the query of parents\n BaseTable placeholderTableinParent =\n ((QueryNodeWithPlaceHolders) parent)\n .getPlaceholderTables()\n .get(parent.getExecutableNodeBaseDependents().indexOf(node));\n ((QueryNodeWithPlaceHolders) parent).getPlaceholderTables().remove(placeholderTableinParent);\n\n // If temp table is in from list of parent, just direct replace with the select query of node\n boolean find = false;\n for (AbstractRelation table : parentQuery.getSelectQuery().getFromList()) {\n if (table instanceof BaseTable && table.equals(placeholderTableinParent)) {\n int index = parentQuery.getSelectQuery().getFromList().indexOf(table);\n nodeQuery\n .getSelectQuery()\n .setAliasName(\n parentQuery.getSelectQuery().getFromList().get(index).getAliasName().get());\n parentQuery.getSelectQuery().getFromList().set(index, nodeQuery.getSelectQuery());\n find = true;\n break;\n } else if (table instanceof JoinTable) {\n for (AbstractRelation joinTable : ((JoinTable) table).getJoinList()) {\n if (joinTable instanceof BaseTable && joinTable.equals(placeholderTableinParent)) {\n int index = ((JoinTable) table).getJoinList().indexOf(joinTable);\n nodeQuery.getSelectQuery().setAliasName(joinTable.getAliasName().get());\n ((JoinTable) table).getJoinList().set(index, nodeQuery.getSelectQuery());\n find = true;\n break;\n }\n }\n if (find) break;\n }\n }\n\n // Otherwise, it need to search filter to find the temp table\n if (!find) {\n List<SubqueryColumn> placeholderTablesinFilter =\n ((QueryNodeWithPlaceHolders) parent).getPlaceholderTablesinFilter();\n for (SubqueryColumn filter : placeholderTablesinFilter) {\n if (filter.getSubquery().getFromList().size() == 1\n && filter.getSubquery().getFromList().get(0).equals(placeholderTableinParent)) {\n filter.setSubquery(nodeQuery.getSelectQuery());\n }\n }\n }\n\n // Move node's placeholderTable to parent's\n ((QueryNodeWithPlaceHolders) parent)\n .placeholderTables.addAll(((QueryNodeWithPlaceHolders) node).placeholderTables);\n\n // Compress the node tree\n parentQuery.cancelSubscriptionTo(nodeQuery);\n for (Pair<ExecutableNodeBase, Integer> s : nodeQuery.getSourcesAndChannels()) {\n parentQuery.subscribeTo(s.getLeft(), s.getRight());\n }\n // parent.getListeningQueues().removeAll(node.broadcastingQueues);\n // parent.getListeningQueues().addAll(node.getListeningQueues());\n // parent.dependents.remove(node);\n // parent.dependents.addAll(node.dependents);\n // for (BaseQueryNode dependent:node.dependents) {\n // dependent.parents.remove(node);\n // dependent.parents.add(parent);\n // }\n }", "void doNestedNaturalJoin(WorkflowExpressionQuery e, NestedExpression nestedExpression, StringBuffer columns, StringBuffer where, StringBuffer whereComp, List values, List queries, StringBuffer orderBy) { // throws WorkflowStoreException {\n\n Object value;\n Field currentExpField;\n\n int numberOfExp = nestedExpression.getExpressionCount();\n\n for (int i = 0; i < numberOfExp; i++) { //ori\n\n //for (i = numberOfExp; i > 0; i--) { //reverse 1 of 3\n Expression expression = nestedExpression.getExpression(i); //ori\n\n //Expression expression = nestedExpression.getExpression(i - 1); //reverse 2 of 3\n if (!(expression.isNested())) {\n FieldExpression fieldExp = (FieldExpression) expression;\n\n FieldExpression fieldExpBeforeCurrent;\n queries.add(expression);\n\n int queryId = queries.size();\n\n if (queryId > 1) {\n columns.append(\" , \");\n }\n\n //do; OS_CURRENTSTEP AS a1 ....\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n columns.append(currentTable + \" AS \" + 'a' + queryId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n columns.append(historyTable + \" AS \" + 'a' + queryId);\n } else {\n columns.append(entryTable + \" AS \" + 'a' + queryId);\n }\n\n ///////// beginning of WHERE JOINS/s : //////////////////////////////////////////\n //do for first query; a1.ENTRY_ID = a1.ENTRY_ID\n if (queryId == 1) {\n where.append(\"a1\" + '.' + stepProcessId);\n where.append(\" = \");\n\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else {\n where.append(\"a\" + queryId + '.' + entryId);\n }\n }\n\n //do; a1.ENTRY_ID = a2.ENTRY_ID\n if (queryId > 1) {\n fieldExpBeforeCurrent = (FieldExpression) queries.get(queryId - 2);\n\n if (fieldExpBeforeCurrent.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + (queryId - 1) + '.' + stepProcessId);\n } else if (fieldExpBeforeCurrent.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + (queryId - 1) + '.' + stepProcessId);\n } else {\n where.append(\"a\" + (queryId - 1) + '.' + entryId);\n }\n\n where.append(\" = \");\n\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else {\n where.append(\"a\" + queryId + '.' + entryId);\n }\n }\n\n ///////// end of LEFT JOIN : \"LEFT JOIN OS_CURRENTSTEP a1 ON a0.ENTRY_ID = a1.ENTRY_ID\n //\n //////// BEGINNING OF WHERE clause //////////////////////////////////////////////////\n value = fieldExp.getValue();\n currentExpField = fieldExp.getField();\n\n //if the Expression is negated and FieldExpression is \"EQUALS\", we need to negate that FieldExpression\n if (expression.isNegate()) {\n //do ; a2.STATUS !=\n whereComp.append(\"a\" + queryId + '.' + fieldName(fieldExp.getField()));\n\n switch (fieldExp.getOperator()) { //WHERE a1.STATUS !=\n case EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS NOT \");\n } else {\n whereComp.append(\" != \");\n }\n\n break;\n\n case NOT_EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS \");\n } else {\n whereComp.append(\" = \");\n }\n\n break;\n\n case GT:\n whereComp.append(\" < \");\n\n break;\n\n case LT:\n whereComp.append(\" > \");\n\n break;\n\n default:\n whereComp.append(\" != \");\n\n break;\n }\n\n switch (currentExpField) {\n case START_DATE:\n case FINISH_DATE:\n values.add(new Timestamp(((java.util.Date) value).getTime()));\n\n break;\n\n default:\n\n if (value == null) {\n values.add(null);\n } else {\n values.add(value);\n }\n\n break;\n }\n } else {\n //do; a1.OWNER =\n whereComp.append(\"a\" + queryId + '.' + fieldName(fieldExp.getField()));\n\n switch (fieldExp.getOperator()) { //WHERE a2.FINISH_DATE <\n case EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS \");\n } else {\n whereComp.append(\" = \");\n }\n\n break;\n\n case NOT_EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS NOT \");\n } else {\n whereComp.append(\" <> \");\n }\n\n break;\n\n case GT:\n whereComp.append(\" > \");\n\n break;\n\n case LT:\n whereComp.append(\" < \");\n\n break;\n\n default:\n whereComp.append(\" = \");\n\n break;\n }\n\n switch (currentExpField) {\n case START_DATE:\n case FINISH_DATE:\n values.add(new Timestamp(((java.util.Date) value).getTime()));\n\n break;\n\n default:\n\n if (value == null) {\n values.add(null);\n } else {\n values.add(value);\n }\n\n break;\n }\n }\n\n //do; a1.OWNER = ? ... a2.STATUS != ?\n whereComp.append(\" ? \");\n\n //////// END OF WHERE clause////////////////////////////////////////////////////////////\n if ((e.getSortOrder() != WorkflowExpressionQuery.SORT_NONE) && (e.getOrderBy() != null)) {\n // System.out.println(\"ORDER BY ; queries.size() : \" + queries.size());\n orderBy.append(\" ORDER BY \");\n orderBy.append(\"a1\" + '.' + fieldName(e.getOrderBy()));\n\n if (e.getSortOrder() == WorkflowExpressionQuery.SORT_ASC) {\n orderBy.append(\" ASC\");\n } else if (e.getSortOrder() == WorkflowExpressionQuery.SORT_DESC) {\n orderBy.append(\" DESC\");\n }\n }\n } else {\n NestedExpression nestedExp = (NestedExpression) expression;\n\n where.append('(');\n\n doNestedNaturalJoin(e, nestedExp, columns, where, whereComp, values, queries, orderBy);\n\n where.append(')');\n }\n\n //add AND or OR clause between the queries\n if (i < (numberOfExp - 1)) { //ori\n\n //if (i > 1) { //reverse 3 of 3\n if (nestedExpression.getExpressionOperator() == LogicalOperator.AND) {\n where.append(\" AND \");\n whereComp.append(\" AND \");\n } else {\n where.append(\" OR \");\n whereComp.append(\" OR \");\n }\n }\n }\n }", "public void creatUserJoins(int tid, int uid, Timestamp time);", "@Override\n public void prepare() {\n leftChild.prepare();\n rightChild.prepare();\n\n // Use the parent class' helper-function to prepare the schema.\n prepareSchemaStats();\n\n /** if the join is an anti or semi join, must change the schema to that of the left child*/\n if (joinType == JoinType.ANTIJOIN || joinType == JoinType.SEMIJOIN) {\n schema = leftChild.getSchema();\n sem_ant = true;\n outer = false;\n }\n /** If the join type is an outer, sets state variables and creates the null-pad tuple*/\n else if (joinType == JoinType.LEFT_OUTER || joinType == JoinType.RIGHT_OUTER) {\n outer = true;\n sem_ant = false;\n if (joinType == JoinType.LEFT_OUTER)\n nullPad = new TupleLiteral(rightChild.getSchema().numColumns());\n else {\n nullPad = new TupleLiteral(leftChild.getSchema().numColumns());\n }\n }\n /** if the join is an inner join*/\n else {\n sem_ant = false;\n outer = false;\n }\n \n // We obtain the cost of our children\n PlanCost lChildCost = leftChild.getCost();\n PlanCost rChildCost = rightChild.getCost();\n \n // Our base number of tuples is the two tuples multiplied together\n float totalTuples = lChildCost.numTuples * rChildCost.numTuples;\n \n // If we have a predicate, we multiply by this value\n if (predicate != null) {\n // We use a selectivity estimator if necessary\n float selValue = SelectivityEstimator.estimateSelectivity(\n predicate, \n schema, \n stats);\n \n // Anti-joins will have the opposite of our estimated selectivity\n if (joinType == JoinType.ANTIJOIN || \n joinType == JoinType.SEMIJOIN) {\n selValue = 1 - selValue;\n }\n totalTuples *= selValue;\n }\n // Outer joins require extra nodes for their bounds\n if (joinType == JoinType.LEFT_OUTER) {\n totalTuples += lChildCost.numTuples;\n }\n else if (joinType == JoinType.RIGHT_OUTER) {\n totalTuples += rChildCost.numTuples;\n }\n \n cost = new PlanCost(\n // We have our total number of tuples\n totalTuples,\n // Our overall tuple size is now the size of the two\n // tuples added together\n lChildCost.tupleSize + rChildCost.tupleSize,\n // Our CPU cost is the cost of going through every tuple\n // on the right child for every tuple on the left\n // and for computing both tables\n lChildCost.numTuples * rChildCost.numTuples + lChildCost.cpuCost + rChildCost.cpuCost,\n // Our block cost is the cost of going through the blocks\n // in the two children\n lChildCost.numBlockIOs + rChildCost.numBlockIOs);\n }", "Node[] merge(List<Node> nodeList1, List<Node> nodeList2, List<Node> exhaustedNodes);", "@Override\n public void visit(final OpJoin opJoin) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpJoin\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpJoin.create(rewriteOp2(opJoin, rewriter), rewriter.getResult()));\n }", "public void handleLink(Node from, Node to) {\n\t\t\r\n\t}", "@Override\n public void enterFrom(SQLParser.FromContext ctx) {\n if (supportsJoinUsing) return;\n\n // Initialization\n String name1 = null;\n String name2 = null;\n\n // Get table names (prefer aliases, if available)\n // NOTE: the conditions on tables and using are unnecessary\n List<SQLParser.TableContext> tables = ctx.table();\n if (tables.size()>0) {\n name1 = tables.get(0).getText();\n }\n if (tables.size()>1) {\n name2 = tables.get(1).getText();\n }\n\n List<SQLParser.AliasContext> aliases = ctx.alias();\n if (aliases.size()>0) {\n name1 = aliases.get(0).getText();\n }\n if (aliases.size()>1) {\n name2 = aliases.get(1).getText();\n }\n\n // Deal with \"using\"\n List<SQLParser.UsingContext> usings = ctx.using();\n if (usings.size()>0) {\n transformUsing(usings.get(0), name1, name2);\n }\n }", "@Override\n\t\tprotected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString[] fields = value.toString().split(\",\");\n\t\t\tJoinBean bean = new JoinBean();\n\t\t\tif (name.startsWith(\"order\")) {\n\t\t\t\tbean.set(fields[0], fields[1], \"NULL\", -1, \"NULL\", \"order\");\n\t\t\t} else {\n\t\t\t\tbean.set(\"NULL\", fields[0], fields[1], Integer.parseInt(fields[2]), fields[3], \"user\");\n\t\t\t}\n\t\t\tk.set(bean.getUserId());\n\t\t\tcontext.write(k, bean);\n\t\t}", "public Relation setRelation(XDI3Segment arcXri, ContextNode targetContextNode);", "public void visit(SetQuery obj) {\n visitor.createChildNamingContext(true);\n visitNode(obj.getRightQuery());\n visitor.removeChildNamingContext();\n visitor.namingContext.aliasColumns = true;\n visitNode(obj.getLeftQuery());\n visitNode(obj.getOrderBy());\n }", "public abstract void map(Long queryNode, Long graphNode);", "@Test\n public void testMixedJoin2() throws Exception {\n String sql = \"SELECT * FROM g1 cross join (g2 cross join g3), g4, g5 cross join g6\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode1 = verify(fromNode, From.CLAUSES_REF_NAME, 1, JoinPredicate.ID);\n verifyJoin(jpNode1, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode1, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n \n Node jpNode2 = verify(jpNode1, JoinPredicate.RIGHT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode2, JoinTypeTypes.JOIN_CROSS);\n \n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 2, \"g4\");\n\n Node jpNode3 = verify(fromNode, From.CLAUSES_REF_NAME, 3, JoinPredicate.ID);\n verifyJoin(jpNode3, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g5\");\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g6\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN (g2 CROSS JOIN g3), g4, g5 CROSS JOIN g6\", fileNode);\n }", "public abstract List<Node> expand();", "@Override\n protected PlanNode clone() throws CloneNotSupportedException {\n NestedLoopsJoinNode node = (NestedLoopsJoinNode) super.clone();\n\n // Clone the predicate.\n if (predicate != null)\n node.predicate = predicate.duplicate();\n else\n node.predicate = null;\n\n return node;\n }", "public RelationshipNode( metamodel.Relationship r ) {\n this.relationship = r;\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}", "public Value joinObject(ObjectLabel objlabel) {\n checkNotPolymorphicOrUnknown();\n if (object_labels != null && object_labels.contains(objlabel))\n return this;\n Value r = new Value(this);\n if (r.object_labels == null)\n r.object_labels = newSet();\n else\n r.object_labels = newSet(r.object_labels);\n r.object_labels.add(objlabel);\n return canonicalize(r);\n }", "public Join dup (Join self)\n {\n if (self == null)\n return null;\n\n Join copy = new Join ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.group = self.group;\n copy.status = self.status;\n return copy;\n }", "@Test\n \tpublic void whereClauseForNodeDirectDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t}", "protected String getJoin( LogicalModel businessModel, LogicalRelationship relation,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) throws PentahoMetadataException {\n String join = \"\"; //$NON-NLS-1$\n if ( relation.isComplex() ) {\n try {\n // parse join as MQL\n SqlOpenFormula formula =\n new SqlOpenFormula( businessModel, databaseMeta, relation.getComplexJoin(), tableAliases, parameters,\n genAsPreparedStatement );\n formula.parseAndValidate();\n join = formula.generateSQL( locale );\n } catch ( PentahoMetadataException e ) {\n // backward compatibility, deprecate\n // FIXME: we need to get rid of this and just throw an exception\n logger.warn( Messages.getErrorString(\n \"SqlGenerator.ERROR_0017_FAILED_TO_PARSE_COMPLEX_JOIN\", relation.getComplexJoin() ), e ); //$NON-NLS-1$\n join = relation.getComplexJoin();\n }\n } else if ( relation.getFromTable() != null && relation.getToTable() != null && relation.getFromColumn() != null\n && relation.getToColumn() != null ) {\n // Left side\n String leftTableAlias = null;\n if ( tableAliases != null ) {\n leftTableAlias = tableAliases.get( relation.getFromColumn().getLogicalTable() );\n } else {\n leftTableAlias = relation.getFromColumn().getLogicalTable().getId();\n }\n\n join = databaseMeta.quoteField( leftTableAlias );\n join += \".\"; //$NON-NLS-1$\n join +=\n databaseMeta.quoteField( (String) relation.getFromColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n\n // Equals\n join += \" = \"; //$NON-NLS-1$\n\n // Right side\n String rightTableAlias = null;\n if ( tableAliases != null ) {\n rightTableAlias = tableAliases.get( relation.getToColumn().getLogicalTable() );\n } else {\n rightTableAlias = relation.getToColumn().getLogicalTable().getId();\n }\n\n join += databaseMeta.quoteField( rightTableAlias );\n join += \".\"; //$NON-NLS-1$\n join += databaseMeta.quoteField( (String) relation.getToColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n } else {\n throw new PentahoMetadataException( Messages.getErrorString(\n \"SqlGenerator.ERROR_0003_INVALID_RELATION\", relation.toString() ) ); //$NON-NLS-1$\n }\n\n return join;\n }", "private void joinParent() {\n System.out.println(\"JOINING parent...\");\n try {\n node.getParent()\n .sendMessage(\n new JoinMessage(node.getName()),\n () -> {\n System.out.println(\"Joined parent!\");\n this.state = State.RUNNING;\n }, () -> {\n node.isRoot = true;\n this.state = State.TERMINATED;\n// node.isRoot = true;\n System.out.println(\"Failed to connect to parent\");\n messageListener.interrupt();\n node.parent.detach();\n }\n );\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public Association associate(Node otherNode, QName associationTypeQName, Directionality directionality, ObjectNode object);", "public JavaPairRDD<String, Tuple2<Integer, Integer>> joinExample(){\n return firstSet\n .join(secondSet);\n }", "public abstract DBResult getAdjacentContinuousLinks(int nodeId) throws SQLException;", "public void setup(Context context) {\n\t\t\tjoinType = context.getConfiguration().get(\"join.type\");\n\t\t}", "public SymmetricHashJoin(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this.pred = p;\n this.child1 = child1;\n this.child2 = child2;\n comboTD = TupleDesc.merge(child1.getTupleDesc(), child2.getTupleDesc());\n }" ]
[ "0.5757736", "0.542126", "0.5369955", "0.5249318", "0.5233", "0.5203126", "0.5199318", "0.51742244", "0.51432014", "0.5034645", "0.5032728", "0.50322926", "0.50083387", "0.5004283", "0.49678734", "0.49628574", "0.49542144", "0.49432328", "0.4887041", "0.48744082", "0.48677495", "0.4841921", "0.482069", "0.4798708", "0.47656602", "0.47544035", "0.47534215", "0.47429824", "0.47268268", "0.4721533", "0.47196677", "0.46926516", "0.46705976", "0.46439952", "0.46363384", "0.46322605", "0.46044666", "0.4601854", "0.45829406", "0.45787954", "0.4572349", "0.45717576", "0.45560768", "0.45498806", "0.45431897", "0.45371646", "0.45203385", "0.44568145", "0.44466102", "0.44466016", "0.4445392", "0.4441968", "0.44419", "0.44408974", "0.44298553", "0.44254327", "0.441972", "0.44166017", "0.44157422", "0.44123277", "0.44047976", "0.43947083", "0.43913203", "0.43892896", "0.43881664", "0.4387133", "0.43853942", "0.43823662", "0.4379418", "0.43775868", "0.43761706", "0.43684018", "0.43630043", "0.43626726", "0.4359613", "0.43561637", "0.4354561", "0.43492967", "0.43491456", "0.434733", "0.43446985", "0.4342213", "0.43319243", "0.43273163", "0.43249297", "0.43231678", "0.43217582", "0.43144125", "0.43139905", "0.4307131", "0.43015385", "0.42973137", "0.42965528", "0.42863584", "0.4285544", "0.42848772", "0.42749962", "0.42696446", "0.42691082", "0.4268595" ]
0.6653766
0
join self with default meta information. default meta is composed of IP + timestamp + random number
public String join() throws IOException, KeeperException, InterruptedException { NodeMeta meta = NodeMeta.defaultNodeMeta.with("sig", NodeMeta.signature().getBytes()); return join(meta); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Value joinMeta(Value v) {\n Value r = new Value(this);\n r.flags |= v.flags & META;\n return canonicalize(r);\n }", "public String join(NodeMeta meta)\n throws IOException, KeeperException, InterruptedException {\n return zk.create(thisPrefix + \"/\" + GROUP,\n serializer.serialize(meta), DEFAULT_ACL, CreateMode.PERSISTENT_SEQUENTIAL);\n }", "@Override\n public void addMetadata(Resource meta) {\n meta.addProperty(API.sparqlEndpoint, \"a combined source\");\n }", "private void getMetadata() {\n masterRoot = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n masterMetadata = new MetadataDoris(masterRoot);\n masterOrbit = new OrbitsDoris();\n masterOrbit.setOrbit(masterRoot);\n \n // SLAVE METADATA\n // hash table or just map for slaves - now it supports only a single sourceSlave image\n slaveRoot = sourceProduct.getMetadataRoot().getElement(AbstractMetadata.SLAVE_METADATA_ROOT).getElementAt(0);\n slaveMetadata = new MetadataDoris(slaveRoot);\n slaveOrbit = new OrbitsDoris();\n slaveOrbit.setOrbit(slaveRoot);\n }", "@Override\n protected MetaData makeMetaData() {\n return new MetaData();\n }", "public RandomListNode copyRandomListHashMap(RandomListNode head) {\n HashMap<RandomListNode,RandomListNode> connection = new HashMap<RandomListNode,RandomListNode>();\n RandomListNode dummy = new RandomListNode(0);\n RandomListNode first = dummy;\n RandomListNode cur = head;\n \n while(cur!= null){\n RandomListNode copyhead = new RandomListNode(cur.label);\n copyhead.random = cur.random;\n first.next = copyhead;\n connection.put(cur,copyhead); //HashMap content: connection (\"original\", \"copy\")\n first = first.next;\n cur = cur.next;\n }\n cur = dummy.next;\n while(cur != null){ //now, cur is the copy list, but it's .random is still belong to the original list:see row 19 and 20\n cur.random = connection.get(cur.random); //so we could use that as Key to search\n cur = cur.next;\n }\n return dummy.next;\n }", "protected static LibMetaData createLibMetaData(LibMetaData lmd) {\n MetaData metaData = new MetaData();\r\n metaData.add(\"IsThing\", new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Items\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(0), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Number\", new Integer(1), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(THING, metaData);\r\n \r\n metaData = new MetaData(lmd.get(\"thing\"));\r\n metaData.add(\"IsItem\", new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Items\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(1), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Name\", \"Thing\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"NameType\", new Integer(Description.NAMETYPE_NORMAL), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Z\", new Integer(Thing.Z_ITEM), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(ITEM, metaData);\r\n \r\n metaData = new MetaData(lmd.get(\"thing\"));\r\n metaData.add(\"IsBeing\",new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Creatures\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(340), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"IsMobile\",new Integer(1), new Integer[]{new Integer(0), new Integer(1)}, MetaDataEntry.CERTAIN_VALUES, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"IsBlocking\", new Integer(1), new Integer[]{new Integer(0), new Integer(1)}, MetaDataEntry.CERTAIN_VALUES, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"MoveCost\", new Integer(100), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"DeathDecoration\", \"blood pool\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"NameType\", new Integer(Description.NAMETYPE_NORMAL), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Z\", new Integer(Thing.Z_MOBILE), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(BEING, metaData);\r\n \r\n lmd = createEffectMetaData(lmd);\r\n lmd = createPoisonMetaData(lmd);\r\n lmd = createFoodMetaData(lmd);\r\n lmd = createScrollMetaData(lmd);\r\n lmd = createMissileMetaData(lmd);\r\n lmd = createRangedWeaponMetaData(lmd);\r\n lmd = createPotionMetaData(lmd);\r\n lmd = createWandMetaData(lmd);\r\n lmd = createRingMetaData(lmd);\r\n lmd = createCoinMetaData(lmd);\r\n lmd = createArmourMetaData(lmd);\r\n lmd = createWeaponMetaData(lmd);\r\n lmd = createSecretMetaData(lmd);\r\n lmd = createSpellBookMetaData(lmd);\r\n lmd = createChestMetaData(lmd);\r\n lmd = createDecorationMetaData(lmd);\r\n lmd = createSceneryMetaData(lmd);\r\n lmd = createPortalMetaData(lmd);\r\n lmd = createTrapMetaData(lmd);\r\n createMonsterMetaData(lmd);\r\n createPersonMetaData(lmd);\r\n return lmd;\r\n }", "Mapper<T, T2> relate(Customizable customizable);", "@Override\n public Meta createMeta(AvaticaConnection connection) {\n String host = props.getProperty(\"remoteHost\");\n int port = Integer.parseInt(props.getProperty(\"port\"));\n int timeout = 30;\n if (props.containsKey(\"timeout\")) {\n timeout = Integer.parseInt(props.getProperty(\"timeout\"));\n }\n\n Location location = new Location(host, port);\n Supplier<Location> locationSupplier = () -> location;\n\n NetConfiguration.resetAllTimeout(timeout);\n final DingoServiceImpl service = new DingoServiceImpl(locationSupplier, timeout);\n NetService.getDefault().newChannel(location).setCloseListener(NoBreakFunctions.wrap(ch -> {\n log.warn(\"Connection channel closed, close connection.\");\n connection.close();\n }));\n connection.setService(service);\n return new DingoRemoteMeta(\n connection, service, ApiRegistry.getDefault().proxy(MetaApi.class, locationSupplier, timeout)\n );\n }", "@Override\n public Metadata.Custom apply(Metadata.Custom part) {\n return new MlMetadata(upgradeMode, resetMode);\n }", "@Override\n public Collection<MetadatumDTO> contributeMetadata(PlainMetadataSourceDto t) {\n List<MetadatumDTO> values = new LinkedList<>();\n for (PlainMetadataKeyValueItem metadatum : t.getMetadata()) {\n if (key.equals(metadatum.getKey())) {\n MetadatumDTO dcValue = new MetadatumDTO();\n dcValue.setValue(metadatum.getValue());\n dcValue.setElement(field.getElement());\n dcValue.setQualifier(field.getQualifier());\n dcValue.setSchema(field.getSchema());\n values.add(dcValue);\n }\n }\n return values;\n }", "public MetaDataHolder getMetaOfMeta ()\n\t{\n\t\treturn metaData;\n\t}", "@Override\n public DataMapMeta getMeta() {\n return null;\n }", "void appendMetaBlock(String bloomFilterMetaKey, Writable metaWriter);", "public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }", "public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }", "public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }", "public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }", "public io.dstore.engine.MetaInformation.Builder addMetaInformationBuilder() {\n return getMetaInformationFieldBuilder().addBuilder(\n io.dstore.engine.MetaInformation.getDefaultInstance());\n }", "public DefaultMetaData getMetaData() {\n\t\treturn this.metaData;\n\t}", "public IndexInfo(IndexInfo other, MetaRelationship field) {\n\t\tString prefix = field.getName();\n\t\tthis.indexName = prefix + \".\" + other.indexName;\n\t\tthis.options = new HashSet<IndexOptionEnum>(other.options);\n\t\t// since the embed field might not have field, it must be spare for\n\t\t// unique index\n\t\tif (this.options.contains(IndexOptionEnum.unique)) {\n\t\t\tthis.options.add(IndexOptionEnum.sparse);\n\t\t}\n\t\tthis.keyList = new LinkedList<String>();\n\t\tfor (String key : other.keyList) {\n\t\t\tkeyList.add(prefix + \".\" + key);\n\t\t}\n\t\tthis.internal = true;\n\t}", "public HostingRelatedInfo(HostingRelatedInfo other) {\n __isset_bitfield = other.__isset_bitfield;\n this.relatedId = other.relatedId;\n this.companyId = other.companyId;\n this.companyGroupId = other.companyGroupId;\n this.machineId = other.machineId;\n this.activeStartTimestamp = other.activeStartTimestamp;\n this.activedEndTimestamp = other.activedEndTimestamp;\n if (other.isSetMachineInnerIP()) {\n this.machineInnerIP = other.machineInnerIP;\n }\n if (other.isSetMachineOuterIP()) {\n this.machineOuterIP = other.machineOuterIP;\n }\n this.createTimestamp = other.createTimestamp;\n this.lastmodifyTimestamp = other.lastmodifyTimestamp;\n }", "private void createDummyData() {\n YangInstanceIdentifier yiid;\n // create 2 links (stored in waitingLinks)\n LeafNode<String> link1Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_1);\n LeafNode<String> link2Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_3);\n\n ContainerNode source1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link1Source).build();\n ContainerNode source2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link2Source).build();\n\n LeafNode<String> link1Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_2);\n LeafNode<String> link2Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_4);\n ContainerNode dest1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link1Dest).build();\n ContainerNode dest2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link2Dest).build();\n\n MapEntryNode link1 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_1)\n .withChild(source1Container).withChild(dest1Container).build();\n MapEntryNode link2 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_2)\n .withChild(source2Container).withChild(dest2Container).build();\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_1);\n UnderlayItem item = new UnderlayItem(link1, null, TOPOLOGY_ID, LINK_ID_1, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_2);\n item = new UnderlayItem(link2, null, TOPOLOGY_ID, LINK_ID_2, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create 2 supporting nodes under two overlay nodes\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1).build();\n Map<QName, Object> suppNode1KeyValues = new HashMap<>();\n suppNode1KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode1KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_1);\n MapEntryNode menSuppNode1 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode1KeyValues)).build();\n MapNode suppNode1List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode1).build();\n MapEntryNode overlayNode1 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1)\n .addChild(suppNode1List).build();\n item = new UnderlayItem(overlayNode1, null, TOPOLOGY_ID, OVERLAY_NODE_ID_1, CorrelationItemEnum.Node);\n // overlayNode1 is created\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2).build();\n Map<QName, Object> suppNode2KeyValues = new HashMap<>();\n suppNode2KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode2KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_2);\n MapEntryNode menSuppNode2 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode2KeyValues)).build();\n MapNode suppNode2List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode2).build();\n MapEntryNode overlayNode2 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2)\n .addChild(suppNode2List).build();\n item = new UnderlayItem(overlayNode2, null, TOPOLOGY_ID, OVERLAY_NODE_ID_2, CorrelationItemEnum.Node);\n // overlayNode2 is created and link:1 is matched\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create a third supporting node under a third overlay node\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3).build();\n Map<QName, Object> suppNode3KeyValues = new HashMap<>();\n suppNode3KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode3KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_3);\n MapEntryNode menSuppNode3 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode3KeyValues)).build();\n MapNode suppNode3List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode3).build();\n MapEntryNode node3 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3)\n .addChild(suppNode3List).build();\n item = new UnderlayItem(node3, null, TOPOLOGY_ID, OVERLAY_NODE_ID_3, CorrelationItemEnum.Node);\n\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create another matched link (link:3)\n LeafNode<String> link3Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_2);\n ContainerNode source3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link3Source).build();\n LeafNode<String> link3Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_3);\n ContainerNode dest3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link3Dest).build();\n MapEntryNode link3 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_3)\n .withChild(source3Container).withChild(dest3Container).build();\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_3);\n item = new UnderlayItem(link3, null, TOPOLOGY_ID, LINK_ID_3, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n }", "private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t}", "private void constructSourceMetadata() throws Exception {\n final String masterTag = \"ifg\";\n final String slaveTag = \"dummy\";\n\n // get sourceMaster & sourceSlave MetadataElement\n final MetadataElement masterMeta = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n final String slaveMetadataRoot = AbstractMetadata.SLAVE_METADATA_ROOT;\n\n /* organize metadata */\n\n // put sourceMaster metadata into the masterMap\n metaMapPut(masterTag, masterMeta, sourceProduct, masterMap);\n\n // pug sourceSlave metadata into slaveMap\n MetadataElement[] slaveRoot = sourceProduct.getMetadataRoot().getElement(slaveMetadataRoot).getElements();\n for (MetadataElement meta : slaveRoot) {\n metaMapPut(slaveTag, meta, sourceProduct, slaveMap);\n }\n\n }", "private Builder(com.example.DNSLog other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.uid)) {\n this.uid = data().deepCopy(fields()[0].schema(), other.uid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.originh)) {\n this.originh = data().deepCopy(fields()[1].schema(), other.originh);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.originp)) {\n this.originp = data().deepCopy(fields()[2].schema(), other.originp);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.resph)) {\n this.resph = data().deepCopy(fields()[3].schema(), other.resph);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.respp)) {\n this.respp = data().deepCopy(fields()[4].schema(), other.respp);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.proto)) {\n this.proto = data().deepCopy(fields()[5].schema(), other.proto);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.port)) {\n this.port = data().deepCopy(fields()[6].schema(), other.port);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.ts)) {\n this.ts = data().deepCopy(fields()[7].schema(), other.ts);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.query)) {\n this.query = data().deepCopy(fields()[8].schema(), other.query);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.qclass)) {\n this.qclass = data().deepCopy(fields()[9].schema(), other.qclass);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.qclassname)) {\n this.qclassname = data().deepCopy(fields()[10].schema(), other.qclassname);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.qtype)) {\n this.qtype = data().deepCopy(fields()[11].schema(), other.qtype);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.qtypename)) {\n this.qtypename = data().deepCopy(fields()[12].schema(), other.qtypename);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.rcode)) {\n this.rcode = data().deepCopy(fields()[13].schema(), other.rcode);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.rcodename)) {\n this.rcodename = data().deepCopy(fields()[14].schema(), other.rcodename);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.Z)) {\n this.Z = data().deepCopy(fields()[15].schema(), other.Z);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.OR)) {\n this.OR = data().deepCopy(fields()[16].schema(), other.OR);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.AA)) {\n this.AA = data().deepCopy(fields()[17].schema(), other.AA);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.TC)) {\n this.TC = data().deepCopy(fields()[18].schema(), other.TC);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.rejected)) {\n this.rejected = data().deepCopy(fields()[19].schema(), other.rejected);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.Answers)) {\n this.Answers = data().deepCopy(fields()[20].schema(), other.Answers);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.TLLs)) {\n this.TLLs = data().deepCopy(fields()[21].schema(), other.TLLs);\n fieldSetFlags()[21] = true;\n }\n }", "@Override\n\tpublic Meta_data get_Meta_data() {\n\t\tMeta_data meta_data = new Meta_data_layer(elements);\n\t\treturn meta_data;\n\t}", "@Provides\n\t@Singleton\n\tpublic HostMetaFetcher provideHostMetaFetcher(\n\t\t\tDefaultHostMetaFetcher fetcher1,\n\t\t\tGoogleHostedHostMetaFetcher fetcher2) {\n\t\treturn fetcher2;\n\t}", "final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}", "private synchronized void create_head(){\n\t\t// Take current time\n\t\thead_time = System.currentTimeMillis();\n\t\tdouble lcl_head_time = head_time/1000.0;\n\t\tString time = Double.toString(lcl_head_time);\n\t\t \n\t\theader.append(\"protocol: 1\\n\");\n\t\theader.append(\"experiment-id: \" + oml_exp_id + \"\\n\");\n\t\theader.append(\"start_time: \" + time + \"\\n\");\n\t\theader.append(\"sender-id: \" + oml_name + \"-sender\\n\");\n\t\theader.append(\"app-name: \" + oml_app_name + \"\\n\");\n\t}", "private RandomData() {\n initFields();\n }", "void setMetaLocal(Map<Integer, String> newMetaTable);", "public DatasetHelper(DatasetHelper another){\n id= another.id;\n hash = another.hash;\n catalogueId = another.catalogueId;\n sourceType = another.sourceType;\n sourceLang = another.sourceLang;\n model = ModelFactory.createDefaultModel().add(another.model);\n uriSchema = another.uriSchema;\n }", "public SeoProfileRecord(Integer id, Integer qsid, Integer tpid, Byte autoAlias, String urlCanonical, String metaTitle, String metaDescription, String graphPageUrl, String graphContentTitle, String graphContentDescription, String graphContentData, String graphArticleData, String hreflandDefaultLocation, String hreflandForEnglish, String hreflandForSpanish, String hreflandForKorean, String hreflandForJapanese, Byte robotsAllowSearchToIndex, Byte robotsAllowSearchToFollow, Byte robotsPreventsSearchFromIndex, Byte robotsPreventsSearchFromFollow, Byte robotsPreventsCached, Byte robotsPreventsDescriptoinFrom, String sitemapFrequency, Double sitemapPriority, Timestamp created, Timestamp updated) {\n super(SeoProfile.SEO_PROFILE);\n\n set(0, id);\n set(1, qsid);\n set(2, tpid);\n set(3, autoAlias);\n set(4, urlCanonical);\n set(5, metaTitle);\n set(6, metaDescription);\n set(7, graphPageUrl);\n set(8, graphContentTitle);\n set(9, graphContentDescription);\n set(10, graphContentData);\n set(11, graphArticleData);\n set(12, hreflandDefaultLocation);\n set(13, hreflandForEnglish);\n set(14, hreflandForSpanish);\n set(15, hreflandForKorean);\n set(16, hreflandForJapanese);\n set(17, robotsAllowSearchToIndex);\n set(18, robotsAllowSearchToFollow);\n set(19, robotsPreventsSearchFromIndex);\n set(20, robotsPreventsSearchFromFollow);\n set(21, robotsPreventsCached);\n set(22, robotsPreventsDescriptoinFrom);\n set(23, sitemapFrequency);\n set(24, sitemapPriority);\n set(25, created);\n set(26, updated);\n }", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "private static List<WayNodeOSM> concatMetanodes(List<WayNodeOSM>metaNodes1, List<WayNodeOSM>metaNodes2, long duplicateNode) {\n \t\t// turn the lists the right way round\n \t\tif ( metaNodes1.get(0).getID() == duplicateNode){\n \t\t\tCollections.reverse(metaNodes1);\n \t\t}\n \t\tif (!( metaNodes2.get(0).getID() == duplicateNode)) {\n \t\t\tCollections.reverse(metaNodes2);\n \t\t}\n \t\t// remove the duplicate, then concat\n \t\tmetaNodes1.remove(metaNodes1.size() - 1);\n \t\tmetaNodes1.addAll(metaNodes2);\n \t\treturn metaNodes1;\n \t}", "public SimilarProductBuilder meta(\n @Nullable final com.commercetools.ml.models.similar_products.SimilarProductMeta meta) {\n this.meta = meta;\n return this;\n }", "@Override\n\tpublic void linkInstances(Tuple<String,String> queries){\n\t\toutputFile = \"\";\n\n\t\tinstancesLinkedSet = new CopyOnWriteArraySet<Tuple<String,String>>();\n\t\tif(nonEmptyQueries(queries) && !sampleInstances.isEmpty()){\n\t\t\tsampleInstances.stream().parallel().forEach(pair-> linkPairOfInstances(pair,queries));\n\t\t}\n\t}", "public String meta(String opt, String key, String value) throws Exception;", "private MetaSparqlRequest createInsertMT1() {\n\t\tString sparqlStr = \"\"+\n\t\t\t\t\"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\r\\n\" + \n\t\t\t\t\"PREFIX ub: \"+_ontology+\"\\r\\n\" + \n\t\t\t\t\"INSERT DATA { GRAPH \"+_graph+\" { \"+\n\t\t\t\tbuilderBindInsert\n\t\t\t\t+\" } }\";\n\t\t\n\t\tSparqlObj sparql= new SparqlObj(sparqlStr) ;\n\t\tEndPoint endPointHost= new EndPoint(_protocol,_host,_port,\"/update\");\n\t\tMetaSparqlRequest msr = new MetaSparqlRequest(new SparqlRequest(sparql,endPointHost));\n\t\tmsr.setTripleInsert(createTripleBaseMT1());\n\t\treturn msr;\n\t}", "public LinkRecord (String key, String info, LinkRecord next)\n {\n this.key = key;\n this.info = info;\n this.next = next;\n }", "public RandomListNode copyRandomList1(RandomListNode head) {\n HashMap<RandomListNode, RandomListNode> cpyNode = new HashMap<>();\n\n RandomListNode dummy1 = head, dummy2 = head;\n // phase 1: copy node\n while (dummy1 != null) {\n cpyNode.put(dummy1, new RandomListNode(dummy1.label));\n dummy1 = dummy1.next;\n }\n\n // phase 2: copy link\n while (dummy2 != null) {\n cpyNode.get(dummy2).next = cpyNode.get(dummy2.next);\n cpyNode.get(dummy2).random = cpyNode.get(dummy2.random);\n dummy2 = dummy2.next;\n }\n\n return cpyNode.get(head);\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private void buildRowMapping() {\n final Map<String, ColumnDescriptor> targetSource = new TreeMap<>();\n\n // build a DB path .. find parent node that terminates the joint group...\n PrefetchTreeNode jointRoot = this;\n while (jointRoot.getParent() != null && !jointRoot.isDisjointPrefetch()\n && !jointRoot.isDisjointByIdPrefetch()) {\n jointRoot = jointRoot.getParent();\n }\n\n final String prefix;\n if (jointRoot != this) {\n Expression objectPath = ExpressionFactory.pathExp(getPath(jointRoot));\n ASTPath translated = (ASTPath) ((PrefetchProcessorNode) jointRoot)\n .getResolver()\n .getEntity()\n .translateToDbPath(objectPath);\n\n // make sure we do not include \"db:\" prefix\n prefix = translated.getOperand(0) + \".\";\n } else {\n prefix = \"\";\n }\n\n // find propagated keys, assuming that only one-step joins\n // share their column(s) with parent\n\n if (getParent() != null\n && !getParent().isPhantom()\n && getIncoming() != null\n && !getIncoming().getRelationship().isFlattened()) {\n\n DbRelationship r = getIncoming()\n .getRelationship()\n .getDbRelationships()\n .get(0);\n for (final DbJoin join : r.getJoins()) {\n appendColumn(targetSource, join.getTargetName(), prefix\n + join.getTargetName());\n }\n }\n\n ClassDescriptor descriptor = resolver.getDescriptor();\n\n descriptor.visitAllProperties(new PropertyVisitor() {\n\n public boolean visitAttribute(AttributeProperty property) {\n String target = property.getAttribute().getDbAttributePath();\n if(!property.getAttribute().isLazy()) {\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n\n public boolean visitToMany(ToManyProperty property) {\n return visitRelationship(property);\n }\n\n public boolean visitToOne(ToOneProperty property) {\n return visitRelationship(property);\n }\n\n private boolean visitRelationship(ArcProperty arc) {\n DbRelationship dbRel = arc.getRelationship().getDbRelationships().get(0);\n for (DbAttribute attribute : dbRel.getSourceAttributes()) {\n String target = attribute.getName();\n\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n });\n\n // append id columns ... (some may have been appended already via relationships)\n for (String pkName : descriptor.getEntity().getPrimaryKeyNames()) {\n appendColumn(targetSource, pkName, prefix + pkName);\n }\n\n // append inheritance discriminator columns...\n for (ObjAttribute column : descriptor.getDiscriminatorColumns()) {\n String target = column.getDbAttributePath();\n appendColumn(targetSource, target, prefix + target);\n }\n\n int size = targetSource.size();\n this.rowCapacity = (int) Math.ceil(size / 0.75);\n this.columns = new ColumnDescriptor[size];\n targetSource.values().toArray(columns);\n }", "private void setupMockBase() {\n storage = new MockBase(tsdb, client, true, true, true, true);\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, METRICS, \n Bytes.fromLong(2L));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, TAGK, \n Bytes.fromLong(2L));\n storage.addColumn(UID_TABLE, new byte[] { 0 }, ID_FAMILY, TAGV, \n Bytes.fromLong(2L));\n // forward mappings\n storage.addColumn(UID_TABLE, \"foo\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 1});\n storage.addColumn(UID_TABLE, \"host\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGK, new byte[] {0, 0, 1});\n storage.addColumn(UID_TABLE, \"web01\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGV, new byte[] {0, 0, 1});\n \n storage.addColumn(UID_TABLE, \"bar\".getBytes(MockBase.ASCII()), ID_FAMILY, \n METRICS, new byte[] {0, 0, 2});\n storage.addColumn(UID_TABLE, \"dc\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGK, new byte[] {0, 0, 2});\n storage.addColumn(UID_TABLE, \"web02\".getBytes(MockBase.ASCII()), ID_FAMILY, \n TAGV, new byte[] {0, 0, 2});\n \n // reverse mappings\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 1}, NAME_FAMILY, \n METRICS, \"foo\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 1}, NAME_FAMILY, \n TAGK, \"host\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 1}, NAME_FAMILY, \n TAGV, \"web01\".getBytes(MockBase.ASCII()));\n \n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n METRICS, \"bar\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n TAGK, \"dc\".getBytes(MockBase.ASCII()));\n storage.addColumn(UID_TABLE, new byte[] {0, 0, 2}, NAME_FAMILY, \n TAGV, \"web02\".getBytes(MockBase.ASCII()));\n }", "public interface MargeDefaults {\n\n\tpublic static final String DEFAULT_UUID = \"D0FFBEE2D0FFBEE2D0FFBEE2D0FFBEE2\";\n \n public static final UUID[] DEFAULT_UUID_ARRAY = new UUID[] { new UUID(DEFAULT_UUID, false) };\n\n\tpublic static final String DEFAULT_SERVER_NAME = \"We_Love_Duff_Beer\";\n \n}", "public LdDBMeta getDBMeta() {\r\n return LdPublisherDbm.getInstance();\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn ip + \" \"+ times;\n\t}", "Join createJoin();", "Map<Integer, String> getMetaLocal();", "protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }", "private NodeDB() {\n\t\tNodeInfo me = new NodeInfo();\n\t\tme.alive = true;\n\t\tme.nodecomms = ConfigManager.get().node_interface;\n\t\tme.nodehash = ConfigManager.get().nodehash;\n\t\tme.timestamp = System.currentTimeMillis();\n\t\tthis.update(new NodeDB.NodeInfo[] { me });\n\t\tthis.random = new Random();\n\t\tthis.random.setSeed(System.currentTimeMillis());\n\t}", "public RandomListNode copyRandomList(RandomListNode head) {\r\n if (head == null) {\r\n return null;\r\n }\r\n \r\n Map<RandomListNode, RandomListNode> map = new HashMap<RandomListNode, RandomListNode>();\r\n\r\n RandomListNode cur = head;\r\n while(cur != null) {\r\n map.put(cur, new RandomListNode(cur.label));\r\n cur = cur.next;\r\n }\r\n \r\n for (Map.Entry<RandomListNode, RandomListNode> entry : map.entrySet()) {\r\n final RandomListNode newNode = entry.getValue();\r\n newNode.next = map.get(entry.getKey().next);\r\n newNode.random = (entry.getKey().random == null) ? null : map.get(entry.getKey().random);\r\n }\r\n \r\n return map.get(head);\r\n }", "private MetaSparqlRequest createInsertMT2() {\n\t\t//is the same of MT1\n\t\treturn createInsertMT1();\n\t}", "public Node clone01(Node head) {\n Map<Node, Node> map = new HashMap<>();\n\n Node originNode = head, cloneNode = null;\n\n while (originNode != null) {\n cloneNode = new Node(originNode.data);\n\n map.put(originNode, cloneNode);\n originNode = originNode.next;\n }\n\n originNode = head;\n while (originNode != null) {\n cloneNode = map.get(originNode);\n cloneNode.next = map.get(originNode.next);\n cloneNode.random = map.get(originNode.random);\n\n originNode = originNode.next;\n }\n\n return map.get(head);\n }", "@Override\n public void nextTuple() {\n final Random rand = new Random();\n int instanceRandom = rand.nextInt(MAX_RANDOM);\n if(instanceRandom == referenceRandom){\n collector.emit(new Values(\"Hello World\"));\n } else {\n collector.emit(new Values(\"Other Random Word\"));\n }\n }", "@Override\n\tpublic double timeToLink() {\n\t\treturn 0;\n\t}", "public DelegatingMetaStore getDefaultMetaStore() {\n\t\treturn metaStore;\n\t}", "@Override\n public SystemMetadata mapRow(ResultSet resultSet, int rowNumber) throws SQLException {\n\n // resultSet contains guid, serialVersion, date_modified, and archived column data\n SystemMetadata systemMetadata = new SystemMetadata();\n ReplicationPolicy replPolicy = new ReplicationPolicy();\n AccessPolicy accessPolicy = new AccessPolicy();\n\n // add guid\n Identifier pid = new Identifier();\n pid.setValue(resultSet.getString(\"guid\"));\n systemMetadata.setIdentifier(pid);\n \n // add seriesId\n Identifier seriesId = new Identifier();\n seriesId.setValue(resultSet.getString(\"series_id\"));\n systemMetadata.setSeriesId(seriesId);\n\n // add serialVersion\n BigInteger serialVersion = new BigInteger(resultSet.getString(\"serial_version\"));\n systemMetadata.setSerialVersion(serialVersion);\n\n // add date_modified\n Date dateSystemMetadataLastModified = resultSet.getTimestamp(\"date_modified\");\n systemMetadata.setDateSysMetadataModified(dateSystemMetadataLastModified);\n\n // add archived value, if it was stored\n boolean archived = resultSet.getBoolean(\"archived\"); // getBoolean returns false for null results\n if (!resultSet.wasNull())\n systemMetadata.setArchived(new Boolean(archived));\n\n // add date_uploaded\n Date dateUploaded = resultSet.getTimestamp(\"date_uploaded\");\n systemMetadata.setDateUploaded(dateUploaded);\n\n // add rights_holder\n Subject rightsHolderSubject = new Subject();\n String rightsHolder = resultSet.getString(\"rights_holder\");\n rightsHolderSubject.setValue(rightsHolder);\n systemMetadata.setRightsHolder(rightsHolderSubject);\n\n // add checksum, checksum_algorithm\n String checksum = resultSet.getString(\"checksum\");\n String checksumAlgorithm = resultSet.getString(\"checksum_algorithm\");\n Checksum checksumObject = new Checksum();\n checksumObject.setValue(checksum);\n checksumObject.setAlgorithm(checksumAlgorithm);\n systemMetadata.setChecksum(checksumObject);\n\n // add origin_member_node\n String originMemberNode = resultSet.getString(\"origin_member_node\");\n if (originMemberNode != null) {\n NodeReference omn = new NodeReference();\n omn.setValue(originMemberNode);\n systemMetadata.setOriginMemberNode(omn);\n }\n\n // add authoritive_member_node\n String authoritativeMemberNode = resultSet.getString(\"authoritive_member_node\");\n if (originMemberNode != null) {\n NodeReference amn = new NodeReference();\n amn.setValue(authoritativeMemberNode);\n systemMetadata.setAuthoritativeMemberNode(amn);\n }\n\n // add submitter\n String submitter = resultSet.getString(\"submitter\");\n if (submitter != null) {\n Subject submitterSubject = new Subject();\n submitterSubject.setValue(submitter);\n systemMetadata.setSubmitter(submitterSubject);\n }\n\n // add object_format\n String fmtidStr = resultSet.getString(\"object_format\");\n ObjectFormatIdentifier fmtid = new ObjectFormatIdentifier();\n fmtid.setValue(fmtidStr);\n systemMetadata.setFormatId(fmtid);\n\n // add size\n String size = resultSet.getString(\"size\");\n systemMetadata.setSize(new BigInteger(size));\n\n // add obsoletes\n String obsoletes = resultSet.getString(\"obsoletes\");\n if (obsoletes != null) {\n Identifier obsoletesId = new Identifier();\n obsoletesId.setValue(obsoletes);\n systemMetadata.setObsoletes(obsoletesId);\n }\n // add obsoleted_by\n String obsoletedBy = resultSet.getString(\"obsoleted_by\");\n if (obsoletedBy != null) {\n Identifier obsoletedById = new Identifier();\n obsoletedById.setValue(obsoletedBy);\n systemMetadata.setObsoletedBy(obsoletedById);\n }\n\n // potentially build a ReplicationPolicy\n \n // add replication_allowed, if it was persisted\n boolean replAllowed = resultSet.getBoolean(\"replication_allowed\"); // getBoolean returns false for null results\n \n if (!resultSet.wasNull()) {\n // populate and add ReplicationPolicy\n ReplicationPolicy replicationPolicy = new ReplicationPolicy();\n \n replicationPolicy.setReplicationAllowed(new Boolean(replAllowed));\n\n // add number_replicas\n int numberOfReplicas = resultSet.getInt(\"number_replicas\"); // getInt returns 0 for null values\n if (numberOfReplicas > 0) {\n replicationPolicy.setNumberReplicas(new Integer(numberOfReplicas));\n\n }\n\n // add preferred and blocked lists\n List<ReplicationPolicyEntry> replPolicies = new ArrayList<ReplicationPolicyEntry>();\n List<NodeReference> preferredNodes = new ArrayList<NodeReference>();\n List<NodeReference> blockedNodes = new ArrayList<NodeReference>();\n\n replPolicies = listReplicationPolicies(pid, localTableMap);\n\n for (ReplicationPolicyEntry policy : replPolicies) {\n Identifier id = policy.getPid();\n String entryPolicy = policy.getPolicy();\n NodeReference node = policy.getMemberNode();\n\n if (entryPolicy.equals(\"preferred\")) {\n preferredNodes.add(node);\n\n } else if (entryPolicy.equals(\"blocked\")) {\n blockedNodes.add(node);\n\n }\n }\n\n replicationPolicy.setPreferredMemberNodeList(preferredNodes);\n replicationPolicy.setBlockedMemberNodeList(blockedNodes);\n\n systemMetadata.setReplicationPolicy(replicationPolicy);\n } else {\n systemMetadata.setReplicationPolicy(null);\n }\n\n // populate and add replicas list\n\n List<Replica> replicas = new ArrayList<Replica>();\n replicas = listReplicaEntries(pid, localTableMap);\n systemMetadata.setReplicaList(replicas);\n\n // populate and add AccessPolicy\n List<AccessRule> accessRules = new ArrayList<AccessRule>();\n accessRules = listAccessRules(pid, localTableMap);\n accessPolicy.setAllowList(accessRules);\n systemMetadata.setAccessPolicy(accessPolicy);\n\n // Validate the system metadata in debug mode using TypeMarshaller\n if (log.isDebugEnabled()) {\n try {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n TypeMarshaller.marshalTypeToOutputStream(systemMetadata, baos);\n log.debug(\"SystemMetadata for pid \" + pid.getValue() + \" is: \"\n + baos.toString());\n\n } catch (MarshallingException e) {\n e.printStackTrace();\n\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }\n return systemMetadata;\n }", "@Override\r\n\tpublic String toString()\r\n\t{\n\t\treturn this.id +\" \" +\" \" + this.host +\" \" + this.url +\" flag = \"+this.flag +\" type=\"+this.type + \" lastCrawled = \" +this.lastCrawled;\r\n\t}", "@Override\n protected DataSet<GraphHead> computeNewGraphHeads() {\n return firstCollection.getGraphHeads()\n .union(secondCollection.getGraphHeads())\n .groupBy(new Id<GraphHead>())\n .reduceGroup(new GroupCountEquals<GraphHead>(2));\n }", "public Builder commonTag(MetricBaseInfo metricBaseInfo) {\n MetricUtil.validateNotNull(metricBaseInfo, \"metricBaseInfo\");\n if (!StringUtils.isEmpty(metricBaseInfo.getDepartment())) {\n commonTags.put(\"department\", metricBaseInfo.getDepartment());\n }\n if (!StringUtils.isEmpty(metricBaseInfo.getGroup())) {\n commonTags.put(\"group\", metricBaseInfo.getGroup());\n }\n if (!StringUtils.isEmpty(metricBaseInfo.getHost())) {\n commonTags.put(\"host\", metricBaseInfo.getHost());\n }\n if (!StringUtils.isEmpty(metricBaseInfo.getIp())) {\n commonTags.put(\"ip\", metricBaseInfo.getIp());\n }\n if (!StringUtils.isEmpty(metricBaseInfo.getProject())) {\n commonTags.put(\"project\", metricBaseInfo.getProject());\n }\n return this;\n }", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "protected abstract MetaDao metaDao();", "public void rereadMetaData() {\n reread = true;\n }", "public LinkRecord (String key, String info)\n {\n this.key = key;\n this.info = info;\n next = null;\n }", "public abstract String associatePredefinedAddress(NodeMetadata node, String ip);", "public void setDefaultData()\n\t\t{\n\t\t\t\n\t\t\t//Creating demo/default ADMIN:\n\t\t\t\n\t\t\tUser testAdmin = new User(\"ADMIN\", \"YAGYESH\", \"123\", 123, Long.parseLong(\"7976648278\"));\n\t\t\tdata.userMap.put(testAdmin.getUserId(), testAdmin);\n\t\t\t\n\t\t\t//Creating demo/default CUSTOMER:\n\t\t\tUser tempCustomer = new User(\"CUSTOMER\", \"JOHN\", \"124\", 124, Long.parseLong(\"9462346459\"));\n\t\t\tdata.userMap.put(tempCustomer.getUserId(), tempCustomer);\n\t\t\t\n\t\t\t//Creating Airports:\n\t\t\tAirport airport1 = new Airport(\"Mumbai Chattrapathi Shivaji International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"MUMBAI\", \"BOM\");\n\t\t\t\n\t\t\tAirport airport2 = new Airport(\"Bangalore Bengaluru International Airport \",\n\t\t\t\t\t\t\t\t\t\t\t\"Bangalore\", \"BLR\");\n\t\t\t\n\t\t\tAirport airport3 = new Airport(\"New Delhi Indira Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"New Delhi \", \"DEL\");\n\n\t\t\tAirport airport4 = new Airport(\"Hyderabad Rajiv Gandhi International Airport\",\n\t\t\t\t\t\t\t\t\t\t\t\"Hyderabad\", \"HYD\");\n\n\t\t\tdata.airportMap.put(airport1.getAirportCode(), airport1);\n\t\t\tdata.airportMap.put(airport2.getAirportCode(), airport2);\n\t\t\tdata.airportMap.put(airport3.getAirportCode(), airport3);\n\t\t\tdata.airportMap.put(airport4.getAirportCode(), airport4);\n\t\t\t\n\t\t\t//Creating DateTime Objects:\n\t\t\t\n\t\t\tDate dateTime1 = null;\n\t\t\tDate dateTime2 = null;\n\t\t\tDate dateTime3 = null;\n\t\t\tDate dateTime4 = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdateTime1 = dateFormat.parse(\"12-01-2020 05:12:00\");\n\t\t\t\tdateTime2 = dateFormat.parse(\"02-02-2020 23:45:00\");\n\t\t\t\tdateTime3 = dateFormat.parse(\"12-01-2020 07:12:00\");\n\t\t\t\tdateTime4 = dateFormat.parse(\"03-02-2020 01:45:00\");\n\t\t\t}\n\t\t\tcatch (ParseException e) \n\t\t\t{\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Creating Schedules:\n\t\t\tSchedule schedule1 = new Schedule(airport1, airport2, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule2 = new Schedule(airport2, airport3, dateTime3, dateTime1, dateFormat);\n\t\t\tSchedule schedule3 = new Schedule(airport4, airport1, dateTime4, dateTime2, dateFormat);\n\t\t\tSchedule schedule4 = new Schedule(airport3, airport4, dateTime4, dateTime2, dateFormat);\n\t\t\t\n\t\t\t//Creating Flights:\n\t\t\tFlight flight1 = new Flight(\"AB3456\", \"INDIGO\", \"A330\", 293);\n\t\t\tFlight flight2 = new Flight(\"BO6789\", \"JET AIRWAYS\", \"777\", 440);\n\t\t\tdata.flightMap.put(flight1.getFlightNumber(), flight1);\n\t\t\tdata.flightMap.put(flight2.getFlightNumber(), flight2);\n\t\t\t\n\t\t\t//Creating Scheduled Flights:\n\t\t\tScheduledFlight scheduledFlight1 = new ScheduledFlight(flight1, 293, schedule1);\n\t\t\tScheduledFlight scheduledFlight2 = new ScheduledFlight(flight2, 440, schedule2);\n\t\t\tScheduledFlight scheduledFlight3 = new ScheduledFlight(flight1, 293, schedule3);\n\t\t\tScheduledFlight scheduledFlight4 = new ScheduledFlight(flight2, 440, schedule4);\n\t\t\t\n\t\t\t//Creating List of Scheduled Flights:\n\t\t\tdata.listScheduledFlights.add(scheduledFlight1);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight2);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight3);\n\t\t\tdata.listScheduledFlights.add(scheduledFlight4);\n\n\t\t}", "public Shout dup (Shout self)\n {\n if (self == null)\n return null;\n\n Shout copy = new Shout ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.group = self.group;\n copy.content = self.content.duplicate ();\n return copy;\n }", "@Override\n public void modify( MemoryGroupByMeta someMeta ) {\n someMeta.allocate( 5, 5 );\n }", "@Override\r\n\tpublic XContentBuilder addMeta(XContentBuilder xcb, T river) throws IOException {\r\n\t\t// We add specific metadata here\r\n\t\txcb = addFSMeta(xcb, river);\r\n\t\t\r\n\t\txcb\t\r\n\t\t\t.field(\"url\", river.getUrl())\r\n\t\t\t.field(\"update_rate\", river.getUpdateRate() * 1000)\r\n\t\t\t.field(\"includes\", river.getIncludes())\r\n\t\t\t.field(\"excludes\", river.getExcludes())\r\n\t\t\t.field(\"analyzer\", river.getAnalyzer());\r\n\r\n\t\treturn xcb;\r\n\t}", "public RandomListNode copyRandomList2(RandomListNode head){\n RandomListNode currP = head;\n \n //copy the node\n while(currP != null){\n RandomListNode tmp = new RandomListNode(currP.label);\n tmp.next = currP.next;\n currP.next = tmp;\n currP = tmp.next;\n }\n \n currP = head;\n //copy the random pointer\n while(currP != null){\n \n if(currP.random != null){\n currP.next.random = currP.random.next; \n }\n \n currP = currP.next.next;\n }\n \n //decouple the list\n RandomListNode safehead = new RandomListNode(0);\n RandomListNode p = safehead;\n currP = head;\n \n while(currP != null){\n p.next = currP.next;\n currP.next = currP.next.next;\n currP = currP.next;\n p = p.next;\n }\n \n return safehead.next;\n }", "public String getDefaultLink() {\n return (toAdDefaultLink);\n }", "private static void handleJoin(DatagramPacket packet){\n byte[] packetData = packet.getData();\n InetAddress packetAddr = packet.getAddress();\n if(packetData[0]== (byte)'W') {\n if (!map.containsKey(packetAddr)) {\n byte[] bytes = new byte[8];\n for (int i = 0; i < 8; i++) {\n bytes[i] = packetData[i + 1];\n }\n String name = \"\";\n for (int i = 9; i < packetData.length; i++) {\n name += (char) packetData[i];\n }\n System.out.println(\"Adding \"+name+\":\"+packetAddr.getHostAddress());\n DH dh = new DH(BigInteger.valueOf('&'));\n BigInteger[] bigs = dh.generateRandomKeys(BigInteger.valueOf(77));\n// DH.getSharedSecretKey(bigs[0],BigInteger.valueOf(77),new BigInteger(bytes));\n map.put(packetAddr, new Client(DH.getSharedSecretKey(bigs[0], BigInteger.valueOf(77), new BigInteger(bytes)),name));\n map.get(packetAddr).setB(new BigInteger(bytes));\n map.get(packetAddr).setAddress(packetAddr);\n map.get(packetAddr).lives=5;\n System.out.println(Arrays.toString(bigs) + \":\" + new BigInteger(bytes));\n sendWRQResponse(bigs[1], packet);\n }\n }\n }", "@Override\n public ProviderMetaData onChainProvider(ProviderMetaData providerMetaData) {\n ProviderMetaData newProviderMetaData = new ProviderMetaData(providerMetaData);\n newProviderMetaData.merge(providerMetaData);\n return newProviderMetaData;\n }", "private IndexKPIData populateIndexStaticData() {\n\t\tIndexKPIData kpiData = new IndexKPIData();\n\t\tkpiData.setRegion1Threshold(CommonConstants.FORTY_FIVE);\n\t\tkpiData.setRegion1Label(CommonConstants.IMPROVE);\n\t\tkpiData.setRegion1Color(CommonConstants.RED);\n\t\tkpiData.setRegion2Threshold(CommonConstants.HUNDRED);\n\t\tkpiData.setRegion2Label(CommonConstants.SAFE);\n\t\tkpiData.setRegion2Color(CommonConstants.GREEN);\n\t\treturn kpiData;\n\t}", "@Override\n\t\tprotected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString[] fields = value.toString().split(\",\");\n\t\t\tJoinBean bean = new JoinBean();\n\t\t\tif (name.startsWith(\"order\")) {\n\t\t\t\tbean.set(fields[0], fields[1], \"NULL\", -1, \"NULL\", \"order\");\n\t\t\t} else {\n\t\t\t\tbean.set(\"NULL\", fields[0], fields[1], Integer.parseInt(fields[2]), fields[3], \"user\");\n\t\t\t}\n\t\t\tk.set(bean.getUserId());\n\t\t\tcontext.write(k, bean);\n\t\t}", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "public void addMeta(int i, int o, int t) {\n\n pcb_e.addMetadata(i, o, t);\n jobQueue.add(pcb_e);\n count++;\n\n }", "LocalMaterialData withDefaultBlockData();", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "private DefaultNodeInfoOther(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public QueryPolymorphismSiteSetter() {\n super(\"org.tair.db.locusdetail\", 2147483647);\n }", "private Map<String, Object> generateDefaultModel(Request request) {\n return newHashMap(ImmutableMap.<String, Object>of(\n \"meta\", newHashMap(ImmutableMap.<String, Object>of(\n \"url\", request.getRequestUri(),\n \"title\", applicationName,\n \"description\", String.format(\"Try %s today!\", applicationName),\n \"image\", \"https://lh3.googleusercontent.com/sm_h6TfeNXSFRKr3hB8C9Ir8lcWa4PYf56OwLeOieU3Y9G1HYiy-N0AvZzAN2dgJBnwWq-HKM5Bo9atsos8_FnXfHOJlXgLjjB_ZKaNfBt8rZTIOQad2x0YEbiSLOjj99sHRmbH_\"\n ))\n ));\n }", "public Object getMeta() {\n return meta;\n }", "@Override public Set<Entity> get() {\n Set<Entity> seeds = getAttribute(CURRENT_SEEDS);\n boolean hasPublishedSeeds = Boolean.TRUE.equals(getAttribute(HAS_PUBLISHED_SEEDS));\n int quorumSize = getQuorumSize(getMembers());\n \n if (seeds == null || seeds.size() < quorumSize || containsDownEntity(seeds)) {\n Set<Entity> newseeds;\n Multimap<CassandraCluster,Entity> potentialSeeds = LinkedHashMultimap.create();\n Multimap<CassandraCluster,Entity> potentialRunningSeeds = LinkedHashMultimap.create();\n for (CassandraCluster member : Iterables.filter(getMembers(), CassandraCluster.class)) {\n potentialSeeds.putAll(member, member.gatherPotentialSeeds());\n potentialRunningSeeds.putAll(member, member.gatherPotentialSeeds());\n }\n boolean stillWaitingForQuorum = (!hasPublishedSeeds) && (potentialSeeds.size() < quorumSize);\n \n if (stillWaitingForQuorum) {\n if (log.isDebugEnabled()) log.debug(\"Not refresheed seeds of fabric {}, because still waiting for quorum (need {}; have {} potentials)\", new Object[] {CassandraFabricImpl.class, quorumSize, potentialSeeds.size()});\n newseeds = ImmutableSet.of();\n } else if (hasPublishedSeeds) {\n Set<Entity> currentSeeds = getAttribute(CURRENT_SEEDS);\n if (getAttribute(SERVICE_STATE) == Lifecycle.STARTING) {\n if (Sets.intersection(currentSeeds, ImmutableSet.copyOf(potentialSeeds.values())).isEmpty()) {\n log.warn(\"Cluster {} lost all its seeds while starting! Subsequent failure likely, but changing seeds during startup would risk split-brain: seeds={}\", new Object[] {this, currentSeeds});\n }\n newseeds = currentSeeds;\n } else if (potentialRunningSeeds.isEmpty()) {\n // TODO Could be race where nodes have only just returned from start() and are about to \n // transition to serviceUp; so don't just abandon all our seeds!\n log.warn(\"Cluster {} has no running seeds (yet?); leaving seeds as-is; but risks split-brain if these seeds come back up!\", new Object[] {this});\n newseeds = currentSeeds;\n } else {\n Set<Entity> result = trim(quorumSize, potentialRunningSeeds);\n log.debug(\"Cluster {} updating seeds: chosen={}; potentialRunning={}\", new Object[] {this, result, potentialRunningSeeds});\n newseeds = result;\n }\n } else {\n Set<Entity> result = trim(quorumSize, potentialSeeds);\n if (log.isDebugEnabled()) log.debug(\"Cluster {} has reached seed quorum: seeds={}\", new Object[] {this, result});\n newseeds = result;\n }\n \n setAttribute(CURRENT_SEEDS, newseeds);\n return newseeds;\n } else {\n if (log.isDebugEnabled()) log.debug(\"Not refresheed seeds of fabric {}, because have quorum {}, and none are down: seeds=\", new Object[] {CassandraFabricImpl.class, quorumSize, seeds});\n return seeds;\n }\n }", "public static void restoreDefaultProperties() {\n results = new HashMap<String, Map<String, Object>>();\n\n {\n Map<String, Object> host1 = new HashMap<String, Object>();\n results.put(HOST1_URL, host1);\n host1.put(P_COMMON_ID.toString(), HOST1_ID);\n host1.put(P_HOST_VM_ID.toString(VM1_ID), VM1_ID);\n host1.put(P_HOST_VM_MAC.toString(VM1_ID, 0), VM1_MAC);\n host1.put(P_HOST_VM_ID.toString(VM2_ID), VM2_ID);\n host1.put(P_HOST_VM_MAC.toString(VM2_ID, 0), VM2_MAC);\n host1.put(VMPLister.VMS_KEY, VM1_ID + VMPLister.VMS_SEPARATOR + VM2_ID);\n host1.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> host2 = new HashMap<String, Object>();\n results.put(HOST2_URL, host2);\n host2.put(P_COMMON_ID.toString(), HOST2_ID);\n host2.put(P_HOST_VM_ID.toString(VM3_ID), VM3_ID);\n host2.put(P_HOST_VM_MAC.toString(VM3_ID, 0), VM3_MAC);\n host2.put(P_HOST_VM_ID.toString(VM4_ID), VM4_ID);\n host2.put(P_HOST_VM_MAC.toString(VM4_ID, 0), VM4_MAC);\n host2.put(VMPLister.VMS_KEY, VM3_ID + VMPLister.VMS_SEPARATOR + VM4_ID);\n host2.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm1 = new HashMap<String, Object>();\n results.put(VM1_URL, vm1);\n vm1.put(P_COMMON_ID.toString(), VM1_ID);\n vm1.put(P_TEST_PROP_FROM_VM_SIGAR.toString(), VM1_PROP_VM_SIGAR);\n vm1.put(P_COMMON_NET_MAC.toString(0), VM1_MAC);\n vm1.put(P_SIGAR_JMX_URL.toString(), VM1_URL);\n vm1.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm2 = new HashMap<String, Object>();\n results.put(VM2_URL, vm2);\n vm2.put(P_COMMON_ID.toString(), VM2_ID);\n vm2.put(P_TEST_PROP_FROM_VM_SIGAR.toString(), VM2_PROP_VM_SIGAR);\n vm2.put(P_COMMON_NET_MAC.toString(0), VM2_MAC);\n vm2.put(P_SIGAR_JMX_URL.toString(), VM2_URL);\n vm2.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm3 = new HashMap<String, Object>();\n results.put(VM3_URL, vm3);\n vm3.put(P_COMMON_ID.toString(), VM3_ID);\n vm3.put(P_COMMON_NET_MAC.toString(0), VM3_MAC);\n vm3.put(P_SIGAR_JMX_URL.toString(), VM3_URL);\n vm3.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n\n {\n Map<String, Object> vm4 = new HashMap<String, Object>();\n results.put(VM4_URL, vm4);\n vm4.put(P_COMMON_ID.toString(), VM4_ID);\n vm4.put(P_COMMON_NET_MAC.toString(0), VM4_MAC);\n vm4.put(P_SIGAR_JMX_URL.toString(), VM4_URL);\n vm4.put(P_DEBUG_NUMBER_OF_ERRORS.toString(), 1);\n }\n }", "public VMAllocationPolicyRandom(List<? extends Host> list) {\n super(list);\n }", "@Override\n public void init() throws IOException {\n super.init();\n metaUtils_ = new MetaUtils(conf_);\n }", "public ReqTable withDefaults() {\n return this;\n }", "public void join(NodeInfo info) {\n\t\taddAsPeer(info);\r\n\t\tSystem.out.println(\"Joined : \" + info.getIp() + \" \" + info.getPort());\r\n\t\t// join to obtained node\r\n\t\tString newJoinString = \"0114 JOIN \" + ip + \" \" + port;\r\n\t\tsend(newJoinString, info.getIp(), info.getPort());\r\n\t}", "public SystemMetadataDaoMetacatImpl() {\n this(MetacatDataSourceFactory.getMetacatDataSource());\n }", "public AbstractJob addMetaData(String key, String value) {\n this.mMetaDataAttributes.add(new MetaData(key, value));\n return this;\n }", "public <T extends Object> T getMeta(String name, T defaultValue) {\n try { \n Object result = metadata.get(name);\n if (result != null)\n return (T) result;\n else\n return defaultValue;\n } catch (Exception e) {\n return defaultValue;\n }\n }", "private Builder(sparqles.avro.discovery.DGETInfo other) {\n super(sparqles.avro.discovery.DGETInfo.SCHEMA$);\n if (isValidValue(fields()[0], other.allowedByRobotsTXT)) {\n this.allowedByRobotsTXT = data().deepCopy(fields()[0].schema(), other.allowedByRobotsTXT);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.Operation)) {\n this.Operation = data().deepCopy(fields()[1].schema(), other.Operation);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.URL)) {\n this.URL = data().deepCopy(fields()[2].schema(), other.URL);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.Exception)) {\n this.Exception = data().deepCopy(fields()[3].schema(), other.Exception);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.ResponseType)) {\n this.ResponseType = data().deepCopy(fields()[4].schema(), other.ResponseType);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.ResponseCode)) {\n this.ResponseCode = data().deepCopy(fields()[5].schema(), other.ResponseCode);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.ResponseServer)) {\n this.ResponseServer = data().deepCopy(fields()[6].schema(), other.ResponseServer);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.ResponseLink)) {\n this.ResponseLink = data().deepCopy(fields()[7].schema(), other.ResponseLink);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.Content)) {\n this.Content = data().deepCopy(fields()[8].schema(), other.Content);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.SPARQLDESCpreds)) {\n this.SPARQLDESCpreds = data().deepCopy(fields()[9].schema(), other.SPARQLDESCpreds);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.voiDpreds)) {\n this.voiDpreds = data().deepCopy(fields()[10].schema(), other.voiDpreds);\n fieldSetFlags()[10] = true;\n }\n }" ]
[ "0.5251745", "0.4926883", "0.48333767", "0.4707227", "0.4576809", "0.45457006", "0.45327523", "0.45053005", "0.4454082", "0.43889967", "0.43660197", "0.43408218", "0.432069", "0.42813805", "0.42783853", "0.42783853", "0.42783853", "0.42783853", "0.42783853", "0.4276354", "0.42568365", "0.42447212", "0.42408597", "0.42356902", "0.4225944", "0.42228952", "0.42136803", "0.4208306", "0.42017967", "0.41951755", "0.41913012", "0.41901514", "0.41824633", "0.4173091", "0.4168338", "0.4164191", "0.41604033", "0.41576508", "0.4153276", "0.4147985", "0.41419113", "0.41399387", "0.41101032", "0.41101032", "0.41058818", "0.4102593", "0.408418", "0.40790185", "0.4073226", "0.40671378", "0.40643266", "0.40584123", "0.4055753", "0.40526733", "0.40488994", "0.40473354", "0.40371063", "0.40346354", "0.40332583", "0.40225387", "0.40125114", "0.40068945", "0.4006491", "0.40046152", "0.40046152", "0.40046152", "0.40046152", "0.40046152", "0.4002707", "0.39981964", "0.39970806", "0.39963627", "0.39886847", "0.3988149", "0.39848754", "0.39781773", "0.3975075", "0.3972055", "0.3970028", "0.39697492", "0.39691633", "0.39682907", "0.3959922", "0.39593723", "0.39591753", "0.39523998", "0.39446047", "0.39423066", "0.39415288", "0.39363256", "0.39343864", "0.39325616", "0.39282304", "0.39190736", "0.39189643", "0.39183894", "0.3916176", "0.39105386", "0.39095178", "0.39094895" ]
0.3997703
70
find all nodes in current group. NOTE the returned list may already outofdate.
public List<String> getAll() throws KeeperException, InterruptedException { List<String> copy = new ArrayList<>(); copy.addAll(members); return copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<Node> allNodes();", "protected abstract Node[] getAllNodes();", "public List<INode> getAllNodes();", "public List<Node> getNodes();", "List<Node> getNodes();", "private List<Node> getNodes() {\n List<Node> nodes = new ArrayList<Node>();\n NodeApi.GetConnectedNodesResult rawNodes =\n Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();\n for (Node node : rawNodes.getNodes()) {\n nodes.add(node);\n }\n return nodes;\n }", "public List<Node> getAllNodes() {\n return nodeRepository.findAll();\n }", "public List<TbNode> getAll() {\n return qureyNodeList(new NodeParam());\n }", "public List<Node> getNodes() {\n List<Node> list = getNodes(false, false);\n return list;\n }", "@Override\n public ArrayList<Node> getAllNodes() {\n return getAllNodesRecursive(root);\n\n }", "public Collection<Node> getNodeList(){\r\n return nodesMap.values();\r\n }", "List<CommunicationLink> getAllNodes()\n {\n return new ArrayList<>(allNodes.values());\n }", "java.util.List<io.netifi.proteus.admin.om.Node> \n getNodesList();", "public Set<String> getAllNodes() {\n return this.graph.keySet();\n }", "List<Node> nodes();", "List<CyNode> getNodeList();", "public HashMap<Integer, Node> getNodeList()\n\t{\n\t\treturn nodeManager.getNodes();\n\t}", "public ArrayList<GraphNode> getNodes() {\n return selectedNodes;\n }", "public Vector<Node> getNodes(){\n\t\treturn this.listOfNodes;\n\t}", "public List<Node> getAll() throws SQLException {\n var nodes = new ArrayList<Node>();\n var statement = connection.createStatement();\n var result = statement.executeQuery(\"SELECT identifier, x, y, parentx, parenty, status, owner, description FROM nodes\");\n while (result.next()) {\n nodes.add(\n new Node(\n result.getInt(\"identifier\"),\n result.getInt(\"x\"),\n result.getInt(\"y\"),\n result.getInt(\"parentx\"),\n result.getInt(\"parenty\"),\n result.getString(\"status\"),\n result.getString(\"owner\"),\n result.getString(\"description\")\n )\n );\n }\n result.close();\n statement.close();\n return nodes;\n }", "java.util.List<entities.Torrent.NodeId>\n getNodesList();", "private Collection<Node> getNodes()\r\n\t{\r\n\t return nodeMap.values();\r\n\t}", "public Set<Node<E>> getNodes(){\n return nodes.keySet();\n }", "public abstract List<Node> getChildNodes();", "public java.util.List<entities.Torrent.NodeId> getNodesList() {\n if (nodesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(nodes_);\n } else {\n return nodesBuilder_.getMessageList();\n }\n }", "@Override\n public Set<EventNode> getNodes() {\n return nodes;\n }", "public Nodes nodes() {\n return this.nodes;\n }", "public List<OSMNode> nodes() {\n return nodes;\n }", "private Set<Node> getAllCardNodes() {\n return guiRobot.lookup(CARD_PANE_ID).queryAll();\n }", "public HashSet<Node> getNodes(){\n\t\t\n\t\t//Return nodes hashset\n\t\treturn this.nodes;\n\t\t\n\t}", "public List<Nodes> getNodes() {\n return nodes;\n }", "public ArrayList<Node> getListNodes(){\r\n return listNodes;\r\n }", "public List<Node> getNodes()\t{return Collections.unmodifiableList(nodes);}", "public Collection<DBNode> getNodeList() {\n \n if (!isTable()) {\n // if not a table assume all until more intelligence\n // added\n return client.getSysDatabase().getDBNodeList();\n }\n return getSysTable().getNodeList();\n }", "@Override\n public Collection<? extends INode> getNodes() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.nodeMap\n .values()));\n }", "public MyArrayList<Node> getNodes() {\n return this.nodes;\n }", "public List<Node<T>> getNodesCollection() {\n if (root == null) {\n return new ArrayList<>();\n }\n\n ArrayList<Node<T>> nodesCollection = new ArrayList<>();\n\n Queue<Node<T>> pendingNodes = new ArrayDeque<>();\n pendingNodes.add(root);\n\n while (pendingNodes.size() > 0) {\n Node<T> currNode = pendingNodes.poll();\n nodesCollection.add(currNode);\n\n for (Node<T> child : currNode.getChildren()) {\n pendingNodes.add(child);\n }\n }\n\n return nodesCollection;\n }", "public static Collection<SxpNode> getNodes() {\n return Collections.unmodifiableCollection(NODES.values());\n }", "@Override\n public abstract Collection<? extends GraphNode<N, E>> getNodes();", "public List<TbNode> queryByGroupId(int groupId) {\n NodeParam nodeParam = new NodeParam();\n nodeParam.setGroupId(groupId);\n return qureyNodeList(nodeParam);\n }", "@Override\n public List<GraphNode> getNodes() {\n List<String> namesOfFiles = ProjectFileNamesUtil.getFileNamesFromProject(project.getBaseDir());\n this.relations = RelationsService.getRelations(project, namesOfFiles);\n List<GraphNode> nodes = new ArrayList<>();\n nodeHashTable = new Hashtable();\n nodeHashTable.clear();\n resultsOfRanTests = HashtableResultsUtil.copyHashtableTestResults(TestResultsCollector.getInstance().getTestResults());\n int i = 0;\n for (String nameOfFile : namesOfFiles){ //for each name of file\n String[] str = nameOfFile.split(\"/\");\n String file = str[str.length-1];\n Hashtable fileTestResults = (Hashtable) resultsOfRanTests.get(file.replace(\".py\",\"\"));\n if (nodeHashTable.get(file)!=null){ //a node with this name already exists\n file=file.concat(\" (\" + i++ + \")\");\n }\n CoverageNode node = new CoverageNode(file,nameOfFile);\n node.setCoverage(GetOnlyCoveragedFileNames.getCovForFile(file,project)); //get coverage\n node.getTypes().add(\"Coverage is: \" + node.getCoverage() + \"%.\");\n node.setColor(node.getCoverage()/10);\n if (fileTestResults != null) { //check for test changes in node\n node.setOutColorNumber(getNodeOutColor(fileTestResults));\n }\n HashMap<String, Object> properties = new HashMap<>();\n getPropertiesForNodes(properties, nameOfFile);\n ResultsPropertyContainer resultsPropertyContainer = new ResultsPropertyContainer(properties);\n node.setResultsPropertyContainer(resultsPropertyContainer);\n nodeHashTable.put(file, node);\n nodes.add(node);\n }\n if (HashtableResultsUtil.getInstance().getOnlyCoveraged()) { //this runs if we want only coveraged nodes\n nodes = doCleaning(nodes);\n }\n HashtableResultsUtil.getInstance().setNodes(nodes);\n return nodes;\n }", "@Override\n\tpublic List<N> getNodeList()\n\t{\n\t\treturn new ArrayList<N>(nodeList);\n\t}", "private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}", "public List<OSMNode> nonRepeatingNodes() {\n if (isClosed()) {\n return nodes.subList(0, nodes.size() - 1);\n } else {\n return nodes;\n }\n }", "public Node[] getNodes()\r\n {\r\n if(nodes == null)\r\n\t{\r\n\t nodes = new Node[numNodes()];\r\n\t int i = 0;\r\n\t for (final NodeTypeHolder nt : ntMap.values())\r\n\t\tfor (final Node node : nt.getNodes())\r\n\t\t nodes[i++] = node;\r\n\t}\r\n return nodes.clone();\r\n }", "public void list() {\r\n\t\tfor (String key : nodeMap.keySet()) {\r\n\t\t\tNodeRef node = nodeMap.get(key);\r\n\t\t\tSystem.out.println(node.getIp() + \" : \" + node.getPort());\r\n\t\t}\t\t\r\n\t}", "public Map<String, Node> nodes() {\n return this.nodes;\n }", "io.netifi.proteus.admin.om.Node getNodes(int index);", "@java.lang.Override\n public java.util.List<entities.Torrent.NodeId> getNodesList() {\n return nodes_;\n }", "public Nodes getNodes()\n {\n return nodes;\n }", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> \n getNodeList();", "public Node[] getNodes() {\n\t\treturn nodes;\n\t}", "@Override\r\n\tpublic Iterable<Entity> getNodes()\r\n\t{\n\t\treturn null;\r\n\t}", "public LinkedList<AbstractNode> getNodes() {\n\t\treturn nodes;\n\t}", "public ReadOnlyIterator<ContextNode> getAllContextNodes();", "public List<byte[]> getAllNodeInfo() {\n // Fetch a node list with protobuf bytes format from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetAllNodeInfo(globalStateAccessorNativePointer);\n }\n }", "public java.util.List<? extends entities.Torrent.NodeIdOrBuilder>\n getNodesOrBuilderList() {\n if (nodesBuilder_ != null) {\n return nodesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(nodes_);\n }\n }", "java.util.List<com.zibea.recommendations.webserver.core.dao.proto.AttributesMapProto.Map.KeyValue> \n getNodesList();", "String showAllNodes();", "protected ArrayList<AStarNode> getNodes() {\n return nodes;\n }", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> getNodeList() {\n if (nodeBuilder_ == null) {\n return java.util.Collections.unmodifiableList(node_);\n } else {\n return nodeBuilder_.getMessageList();\n }\n }", "public List<TreeNode> getChildrenNodes();", "public ReadOnlyIterator<ContextNode> getAllLeafContextNodes();", "public List<NetworkNode> listNetworkNode();", "@Override\n public List<E> allItems() {\n return new ArrayList(graphNodes.keySet());\n }", "public ArrayList<Node> getList(){\n \treturn this.children;\n }", "List<String> getNodeNames()\n {\n return allNodes.values().stream().map(CommunicationLink::getName).collect(Collectors.toList());\n }", "@Override\n\tpublic synchronized Set<PetrinetNode> getNodes() {\n\t\tSet<PetrinetNode> nodes = new HashSet<PetrinetNode>();\n\t\tnodes.addAll(this.transitions);\n\t\tnodes.addAll(this.places);\n\t\treturn nodes;\n\t}", "public static Set<Node> getCheckedoutNodes() {\n return checkedOutNodes.get();\n }", "public ResultMap<BaseNode> listChildren();", "private List<Node> returnAllNodes(Node node) {\n List<Node> listOfNodes = new ArrayList<Node>();\n if (node != null) {\n listOfNodes.add(node);\n for (int i = 0; i < listOfNodes.size(); ++i) {\n Node n = listOfNodes.get(i);\n List<Node> children = n.children;\n if (children != null) {\n for (Node child : children) {\n if (!listOfNodes.contains(child)) {\n listOfNodes.add(child);\n }\n }\n }\n }\n }\n return listOfNodes;\n }", "public java.util.Iterator engineListRootGroups() {\n ConfigurationHandler handler = factory.getConfigurationHandler();\n Configuration configuration = null;\n try {\n configuration = factory.getConfiguration(GROUPS_CONFIG_PATH, false, handler);\n return treeManager.listRoots(configuration);\n } catch (Exception e) {\n throw new BaseSecurityException(BaseSecurityException.CANNOT_LIST_ROOT_GROUPS, e);\n } finally {\n factory.close(configuration, handler);\n }\n }", "public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }", "private Collection<Node> getCandidates(State state) {\n\t\treturn new ArrayList<Node>(Basic_ILS.graph.getNodes());\n\t}", "public List<NodeInfo> getStoredNodes() {\n List<NodeInfo> nodes = new ArrayList<>();\n\n SearchResponse response = client.prepareSearch(\"k8s_*\").setTypes(\"node\").setSize(10000).get();\n\n SearchHit[] hits = response.getHits().getHits();\n log.info(String.format(\"The length of node search hits is [%d]\", hits.length));\n\n ObjectMapper mapper = new ObjectMapper();\n try {\n for (SearchHit hit : hits) {\n// log.info(hit.getSourceAsString());\n NodeInfo node = mapper.readValue(hit.getSourceAsString(), NodeInfo.class);\n nodes.add(node);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return nodes;\n }", "public Iterator<Node> getNodeIter() {\n\t\treturn nodes.iterator();\n\t}", "public Iterator<LayoutNode> nodeIterator() {\n\treturn nodeList.iterator();\n }", "public List<LayoutNode> getNodeList() {\n\treturn nodeList;\n }", "public ArrayList<String> getChildrenNodes(MasterMgrClient mclient, String start)\n\tthrows PipelineException\n\t{\n\t\tArrayList<String> toReturn = new ArrayList<String>();\n\t\tTreeMap<String, Boolean> comps = new TreeMap<String, Boolean>();\n\t\tcomps.put(start, false);\n\t\tNodeTreeComp treeComps = mclient.updatePaths(pUser, pView, comps);\n\t\tPath p = new Path(start);\n\t\tArrayList<String> parts = p.getComponents();\n\t\tfor (String comp : parts)\n\t\t{\n\t\t\tif(treeComps!=null)\n\t\t\t\ttreeComps = treeComps.get(comp);\n\t\t}\n\t\tfor (String s : treeComps.keySet())\n\t\t{\n\t\t\ttoReturn.add(s);\n\t\t}\n\t\treturn toReturn;\n\t}", "public Node[] getSelectedNodes() {\n return selectedNodes;\n }", "public Set<DefaultGraphCell> getNodes() {\n return nodes;\n }", "public java.util.List<Node> getSelection() {\n\t\treturn selected_nodes;\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllPartOfSet_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), PARTOFSET);\r\n\t}", "public Collection<MyNode> getNeighbors(){\r\n return new ArrayList<>(this.neighbors);\r\n }", "java.util.List<? extends entities.Torrent.NodeIdOrBuilder>\n getNodesOrBuilderList();", "@Override\r\n public Node[] getRootNodes() {\r\n return new Node[] {getNetworkNode()};\r\n }", "public Set<LeafNode> getSelectedNodes()\n\t{\n\t\treturn Collections.unmodifiableSet(selectionNode);\n\t}", "public Vector<Node> getChildren(){\n\t\t Vector<Node> children = new Vector<>(0);\n\t\t Iterator<Link> l= myLinks.iterator();\n\t\t\twhile(l.hasNext()){\n\t\t\t\tLink temp=l.next();\n\t\t\t\tif(temp.getM().equals(currNode))\n\t\t\t\t children.add(temp.getN());\n\t\t\t\tif(temp.getN().equals(currNode))\n\t\t\t\t children.add(temp.getM());\n\t\t\t}\n\t\treturn children;\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInterpretedBy_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "@java.lang.Override\n public java.util.List<? extends entities.Torrent.NodeIdOrBuilder>\n getNodesOrBuilderList() {\n return nodes_;\n }", "public Iterator nodeIterator() { return nodes.keySet().iterator(); }", "@Override\r\n\tpublic List<JedisPool> getNodes() {\n\t\treturn Collections.emptyList();\r\n\t}", "public Vector<Node> GetAdditionalSubNodes();", "public Collection<String> loadAllDataSourcesNodes() {\n return repository.getChildrenKeys(node.getDataSourcesNodeFullRootPath());\n }", "public List<AST> getChildNodes ();", "public List<Imnode> getImnodes() {\n if (Imnodes == null) {\n Imnodes = new ArrayList<Imnode>();\n }\n return Imnodes;\n }", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> getNodeList() {\n return node_;\n }", "public ArrayList<NodeRef> getDataNodes() {\r\n\t\tArrayList<NodeRef> slaves = new ArrayList<NodeRef>();\r\n\t\tfor (NodeRef node : nodeMap.values()) {\r\n\t\t\tslaves.add(node);\r\n\t\t}\r\n\t\treturn slaves;\r\n\t}", "public List<Node> getRootElements() {\n List<Node> subRoots = tree.find(\"s\", \"neb\", \"objc\");\n List<Node> directRoots = this.tree.getChildren().stream()\n .filter(x -> !x.getPosGroup().equals(\"$.\") && !x.getPosGroup().equals(\"$,\") && !x.getPosGroup().equals(\"$(\"))\n .collect(Collectors.toList());\n\n subRoots.addAll(directRoots);\n\n return subRoots;\n }", "public Collection<GraphNode> getGraphNodes() {\n\t\treturn graphNodeMap.values();\n\t}", "public Node[] getChildren() {\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\treturn nextLayer;\n\t}" ]
[ "0.76304954", "0.7396985", "0.7380443", "0.7116423", "0.70930934", "0.7063521", "0.7058413", "0.7028089", "0.6919487", "0.683072", "0.67184156", "0.6693056", "0.66929036", "0.667055", "0.66693705", "0.6646655", "0.6632589", "0.66077965", "0.65972173", "0.6579051", "0.65327", "0.652479", "0.6470636", "0.64672023", "0.641268", "0.6411919", "0.6409997", "0.6407721", "0.6406247", "0.63924915", "0.63913286", "0.63883525", "0.6383236", "0.6336116", "0.633249", "0.6331397", "0.6326519", "0.63227606", "0.62887675", "0.62682354", "0.6251504", "0.6246867", "0.62314725", "0.62259376", "0.6212824", "0.6179707", "0.61777765", "0.6167804", "0.61663926", "0.61575747", "0.6140733", "0.6116521", "0.61074543", "0.6105181", "0.60600144", "0.6059368", "0.6044051", "0.60377824", "0.6034701", "0.6025117", "0.6021423", "0.6014082", "0.6001459", "0.5992408", "0.5989181", "0.5989146", "0.5960597", "0.5957584", "0.5953832", "0.5953138", "0.59387636", "0.5932426", "0.59305716", "0.5924733", "0.5921211", "0.5916643", "0.5912113", "0.5905044", "0.58611876", "0.58608013", "0.5855782", "0.584506", "0.58364964", "0.5833825", "0.582632", "0.58067226", "0.5792795", "0.5786465", "0.5785567", "0.5780401", "0.5779972", "0.57698566", "0.5769452", "0.5767527", "0.5763126", "0.57589763", "0.5752588", "0.5750996", "0.57486147", "0.57440215", "0.57416123" ]
0.0
-1
sync local group membership with zookeeper server. this might also change the result of getAll().
public void sync() throws KeeperException, InterruptedException { members = zk.getChildren(thisPrefix, groupWatcher, null); // also reset the watcher }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void syncGroup();", "void syncGroup(Context context);", "public synchronized void updateGroup() {\n RaftGroup newGroup = getCurrentGroup();\n if (!newGroup.equals(mRaftGroup)) {\n LOG.info(\"Raft group updated: old {}, new {}\", mRaftGroup, newGroup);\n mRaftGroup = newGroup;\n }\n }", "@Test\n\tvoid synchGroups() {\n\t\tassumeWritable(c);\n\t\ttry (var u1 = c.update(GROUP_SYNC_MAKE_TEMP_TABLE)) {\n\t\t\tassertEquals(List.of(), u1.getParameters());\n\t\t\tc.transaction(() -> {\n\t\t\t\tu1.call();\n\t\t\t\ttry (var u2 = c.update(GROUP_SYNC_INSERT_TEMP_ROW);\n\t\t\t\t\t\tvar u3 = c.update(GROUP_SYNC_ADD_GROUPS);\n\t\t\t\t\t\tvar u4 = c.update(GROUP_SYNC_REMOVE_GROUPS);\n\t\t\t\t\t\tvar u5 = c.update(GROUP_SYNC_DROP_TEMP_TABLE)) {\n\t\t\t\t\tassertEquals(List.of(\"group_name\", \"group_type\"),\n\t\t\t\t\t\t\tu2.getParameters());\n\t\t\t\t\tassertEquals(0, u2.call(NO_NAME, INTERNAL));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u3.getParameters());\n\t\t\t\t\tassertEquals(0, u3.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u4.getParameters());\n\t\t\t\t\tassertEquals(0, u4.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(), u5.getParameters());\n\t\t\t\t\tu5.call();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n public void cacheGroupsRefresh() throws IOException {\n List<String> groups = NetgroupCache.getNetgroupNames();\n NetgroupCache.clear();\n cacheGroupsAdd(groups);\n }", "private List<User> syncDataFromMaster() {\n\n// if (getHostPostOfServer().equals(ClusterInfo.getClusterInfo().getMaster())) {\n// return;\n// }\n String requestUrl;\n requestUrl = \"http://\".concat(ClusterInfo.getClusterInfo().getMaster().concat(\"/users\"));\n List<User> users = restTemplate.getForObject(requestUrl, List.class);\n return users;\n\n }", "private void refreshAvailableChannelGroups() {\r\n Collection<TvBrowserDataServiceChannelGroup> serverDefinedGroups = getServerDefinedChannelGroupsCollection();\r\n\r\n mAvailableChannelGroupsSet.clear();\r\n mAvailableChannelGroupsSet.addAll(serverDefinedGroups);\r\n mAvailableChannelGroupsSet.addAll(getUserDefinedChannelGroupsCollection());\r\n\r\n for (int i=0;i<DEFAULT_CHANNEL_GROUP_NAMES.length;i++) {\r\n TvBrowserDataServiceChannelGroup g =new TvBrowserDataServiceChannelGroup(this, DEFAULT_CHANNEL_GROUP_NAMES[i], DEFAULT_CHANNEL_GROUP_MIRRORS[i], mSettings);\r\n if (!mAvailableChannelGroupsSet.contains(g)) {\r\n mAvailableChannelGroupsSet.add(g);\r\n }\r\n }\r\n }", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\r\n\tpublic void update(List<GroupMember> list) {\n\t\tif(list == null) return;\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t\tupdate(list.get(i));\r\n\t}", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "private void sendGroupInit() {\n \t\ttry {\n \t\t\tmyEndpt=new Endpt(serverName+\"@\"+vsAddress.toString());\n \n \t\t\tEndpt[] view=null;\n \t\t\tInetSocketAddress[] addrs=null;\n \n \t\t\taddrs=new InetSocketAddress[1];\n \t\t\taddrs[0]=vsAddress;\n \t\t\tview=new Endpt[1];\n \t\t\tview[0]=myEndpt;\n \n \t\t\tGroup myGroup = new Group(\"DEFAULT_SERVERS\");\n \t\t\tvs = new ViewState(\"1\", myGroup, new ViewID(0,view[0]), new ViewID[0], view, addrs);\n \n \t\t\tGroupInit gi =\n \t\t\t\tnew GroupInit(vs,myEndpt,null,gossipServers,vsChannel,Direction.DOWN,this);\n \t\t\tgi.go();\n \t\t} catch (AppiaEventException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (NullPointerException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (AppiaGroupException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} \n \t}", "public void setGcGrouperSyncMembers(List<GcGrouperSyncMember> gcGrouperSyncMembers) {\r\n this.gcGrouperSyncMembers = gcGrouperSyncMembers;\r\n }", "public void setContactsGroup()\n\t{\n\t\tUtility.ThreadSleep(1000);\n\t\tList<Long> group = new ArrayList<Long>(Arrays.asList(new Long[] {1l,2l})); //with DB Call\n\t\tthis.groupIds = group;\n\t\tLong contactGroupId = groupIds.get(0);\n\t\tSystem.out.println(\".\");\n\t}", "@VisibleForTesting\n void updateGroups(List<String> groupUnids) {\n final String METHOD = \"updateGroups\";\n LOGGER.entering(CLASS_NAME, METHOD);\n\n long timeStart = System.currentTimeMillis();\n int count = 0;\n for (String unid : groupUnids) {\n if (count++ % NCCONST.GC_INVOCATION_INTERVAL == 0) {\n Util.invokeGC();\n }\n NotesDocument groupDoc = getDocumentByUnid(directoryDatabase, unid);\n if (groupDoc == null) {\n LOGGER.log(Level.FINEST, \"Group document [{0}] is not found\", unid);\n } else {\n String groupName = null;\n try {\n groupName = groupDoc.getItemValueString(NCCONST.GITM_LISTNAME);\n if (Strings.isNullOrEmpty(groupName)) {\n continue;\n }\n // Only process groups\n if (!isAccessControlGroup(groupDoc)) {\n LOGGER.log(Level.FINEST,\n \"Not a group/access control group: '{0}'\", groupName);\n continue;\n }\n updateGroup(groupDoc, groupName);\n } catch (RepositoryException e) {\n LOGGER.log(Level.WARNING, \"Failed to update group cache\"\n + (groupName != null ? \" for \" + groupName : \"\"), e);\n } finally {\n Util.recycle(groupDoc);\n }\n }\n }\n long timeFinish = System.currentTimeMillis();\n LOGGER.log(Level.FINE, \"Update groups: {0}ms\", timeFinish - timeStart);\n }", "@Override\n public void sync(Context context) {\n context.setCandidateSet(Database.getCandidateSet());\n context.setVoterSet(Database.getVoterSet());\n context.setLogins(Database.getLogins());\n context.setCommissionerSet(Database.getCommissionerSet());\n }", "public static void main(String[] args)\n\t{\n\t\tGroupSynchronization groupSynchronization = new GroupSynchronization();\n\t\tGroup group\t\t\t= new Group();\n\t\t\n//\t\tGroupInfo subNodeGroupInfo\t= new GroupInfo();\n//\t\tsubNodeGroupInfo.setGroupName(\"组一\");\n//\t\tsubNodeGroupInfo.setGroupFullname(\"集团公司.省公司.市公司一.公司一部门二.组一\");\n//\t\tsubNodeGroupInfo.setGroupParentid(\"000000000600007\");\n//\t\tsubNodeGroupInfo.setGroupType(\"0\");\n//\t\tsubNodeGroupInfo.setGroupOrderBy(\"1\");\n//\t\tsubNodeGroupInfo.setGroupPhone(\"1111111\");\n//\t\tsubNodeGroupInfo.setGroupFax(\"1111111\");\n//\t\tsubNodeGroupInfo.setGroupStatus(\"0\");\n//\t\tsubNodeGroupInfo.setGroupCompanyid(\"000000000600004\");\n//\t\tsubNodeGroupInfo.setGroupCompanytype(\"3\");\n//\t\tsubNodeGroupInfo.setGroupDesc(\"1\");\n//\t\tsubNodeGroupInfo.setGroupIntId(600009);\n//\t\tsubNodeGroupInfo.setGroupDnId(\"0;000000000600002;000000000600003;000000000600004;000000000600007;000000000600009;\");\n//\t\t\n//\t\tgroupSynchronization.modifySynchronization(\"000000000600009\",subNodeGroupInfo);\n//\t\tgroup.modifyGroup(subNodeGroupInfo,\"000000000600009\");\n\t\t\n\t\tGroupInfo subNodeGroupInfo\t= new GroupInfo();\n\t\tsubNodeGroupInfo.setGroupName(\"公司一部门二\");\n\t\tsubNodeGroupInfo.setGroupFullname(\"集团公司.省公司.省公司部门一.公司一部门二\");\n\t\tsubNodeGroupInfo.setGroupParentid(\"000000000600008\");\n\t\tsubNodeGroupInfo.setGroupType(\"3\");\n\t\tsubNodeGroupInfo.setGroupOrderBy(\"1\");\n\t\tsubNodeGroupInfo.setGroupPhone(\"1111111\");\n\t\tsubNodeGroupInfo.setGroupFax(\"1111111\");\n\t\tsubNodeGroupInfo.setGroupStatus(\"0\");\n\t\tsubNodeGroupInfo.setGroupCompanyid(\"000000000600003\");\n\t\tsubNodeGroupInfo.setGroupCompanytype(\"1\");\n\t\tsubNodeGroupInfo.setGroupDesc(\"1\");\n\t\tsubNodeGroupInfo.setGroupIntId(600007);\n\t\tsubNodeGroupInfo.setGroupDnId(\"0;000000000600002;000000000600003;000000000600008;000000000600007;\");\n\t\t\n\t\tgroupSynchronization.modifySynchronization(\"000000000600007\",subNodeGroupInfo);\n\t\tgroup.modifyGroup(subNodeGroupInfo,\"000000000600007\");\n\t}", "SyncTree getServerSyncTree() {\n return serverSyncTree;\n }", "private void syncTimeZones()\n {\n resetCounts();\n JwList<AcTimeZone> v = _access.getTimeZoneDb().getAll();\n for ( AcGlobalTimeZone g : getGlobalTimeZones() )\n {\n AcTimeZone a = v.getMatch(g.getCode());\n syncTimeZone(a, g);\n }\n logSummary(\"timezone\");\n }", "void reschedule(Collection<Group> groupInfos);", "@Override\n public List<InstanceOverallStatusDto> syncInstances(List<Manifest.Key> given) {\n List<InstanceDto> list = list();\n List<Manifest.Key> instances = (given == null || given.isEmpty()) ? list.stream().map(d -> d.instance).toList() : given;\n Set<String> errors = new TreeSet<>();\n\n // on CENTRAL only, synchronize managed servers. only after that we know all instances.\n if (minion.getMode() == MinionMode.CENTRAL) {\n List<ManagedMasterDto> toSync = list.stream().filter(i -> instances.contains(i.instance)).map(i -> i.managedServer)\n .toList();\n\n log.info(\"Mass-synchronize {} server(s).\", toSync.size());\n\n ManagedServersResource rs = rc.initResource(new ManagedServersResourceImpl());\n try (Activity sync = reporter.start(\"Synchronize Servers\", toSync.size())) {\n AtomicLong syncNo = new AtomicLong(0);\n ExecutorService es = Executors.newFixedThreadPool(4, new RequestScopedNamedDaemonThreadFactory(reqScope,\n reg.get(group).getTransactions(), reporter, () -> \"Mass-Synchronizer \" + syncNo.incrementAndGet()));\n List<Future<?>> syncTasks = new ArrayList<>();\n for (ManagedMasterDto host : toSync) {\n syncTasks.add(es.submit(() -> {\n try (Activity singleSync = reporter.start(\"Synchronize \" + host.hostName)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Synchronize {}\", host.hostName);\n }\n rs.synchronize(group, host.hostName);\n } catch (Exception e) {\n errors.add(host.hostName);\n log.warn(\"Could not synchronize managed server: {}: {}\", host.hostName, e.toString());\n if (log.isDebugEnabled()) {\n log.debug(\"Exception:\", e);\n }\n }\n sync.workAndCancelIfRequested(1);\n }));\n }\n\n FutureHelper.awaitAll(syncTasks);\n es.shutdown(); // make all threads exit :)\n }\n } else {\n // update the local stored state.\n ResourceProvider.getResource(minion.getSelf(), MasterRootResource.class, context).getNamedMaster(group)\n .updateOverallStatus();\n }\n\n // for each instance, read the meta-manifest, and provide the recorded data.\n var result = new ArrayList<InstanceOverallStatusDto>();\n for (var inst : list.stream().filter(i -> instances.contains(i.instance)).toList()) {\n if (inst.managedServer != null && inst.managedServer.hostName != null\n && errors.contains(inst.managedServer.hostName)) {\n continue; // no state as we could not sync.\n }\n result.add(new InstanceOverallStatusDto(inst.instanceConfiguration.id,\n new InstanceOverallState(inst.instance, hive).read()));\n }\n\n return result;\n }", "@VisibleForTesting\n synchronized void updateUsersGroups(boolean force) {\n final String METHOD = \"updateUsersGroups\";\n LOGGER.entering(CLASS_NAME, METHOD);\n try {\n LOGGER.log(Level.FINE, \"Forcing cache update: {0}\", force);\n if (!setUpResources(force)) {\n return;\n }\n\n // Pass 0 - Reset domain cache\n List<String> userUnids =\n getViewUnids(directoryDatabase, NCCONST.DIRVIEW_VIMUSERS);\n updateNotesDomainNames(userUnids);\n\n // Pass 1 - Update groups\n List<String> groupUnids =\n getViewUnids(directoryDatabase, NCCONST.DIRVIEW_VIMGROUPS);\n updateGroups(groupUnids);\n\n // Pass 2 - Update people\n updateUsers(userUnids);\n\n // Pass 3 - Update roles\n // Role update is moved from the maintenance thread to the traversal\n // thread so that the update only occurs when the database ACL is updated.\n\n // Pass 4 - Delete any users that no longer exist\n checkUserDeletions();\n\n // Pass 5 - Delete any groups that no longer exist\n checkGroupDeletions();\n\n setLastCacheUpdate();\n setCacheInitialized();\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failure updating user/group cache\", e);\n } finally {\n releaseResources();\n LOGGER.exiting(CLASS_NAME, METHOD);\n }\n }", "public void localToRemoteRatingSync()\r\n {\r\n Uri uri = DataBaseContract.Rating.URI_CONTENT;\r\n int results = ratingModel.changeToSync(uri,contentResolver);\r\n Log.i(TAG, \"Ratings puestos en cola de sincronizacion:\" + results);\r\n\r\n ArrayList<Rating> ratingsPendingForInsert = ratingModel.getRatingsForSync();\r\n Log.i(TAG, \"Se encontraron \" + ratingsPendingForInsert.size() + \" ratings para insertar en el servidor\");\r\n\r\n syncRatingsPendingForInsert(ratingsPendingForInsert);\r\n }", "public TravelGroup updateTravelGroup(TravelGroup travelGroup);", "@Override\n public void syncUserData() {\n\n List<User> users = userRepository.getUserList();\n List<LdapUser> ldapUsers = getAllUsers();\n Set<Integer> listUserIdRemoveAM = new HashSet<>();\n\n //check update or delete \n for (User user : users) {\n boolean isDeleted = true;\n for (LdapUser ldapUser : ldapUsers) {\n if (user.getUserID().equals(ldapUser.getUserID())) {\n // is updateours\n user.setFirstName(ldapUser.getFirstName());\n user.setLastName(ldapUser.getLastName());\n user.setUpdatedAt(Utils.getCurrentTime());\n user.setEmail(ldapUser.getMail().trim());\n user.setJobTitle(ldapUser.getTitle() == null ? DEFAULT_JOB_TITLE : ldapUser.getTitle());\n user.setPhoneNumber(ldapUser.getTelephonNumber());\n user.setOfficeLocation(ldapUser.getOfficeLocation());\n \n String managerId = ldapUser.getManagerUser();\n User manager = getUserFromListByUserID(users, managerId);\n user.setManagerId(manager == null ? 0 : manager.getId());\n \n //This code will be lock till deploy the real LDAP have 2 properties are \"department\" and \"userAccountControl\"\n /*user.setActive(ldapUser.getUserAccountControl() == 514 ? (byte) 0 : (byte) 1);*/\n Department department = departmentRepository.getDepartmentByName(ldapUser.getDepartment());\n checkChangeDepartment(user, department, listUserIdRemoveAM);\n \n userRepository.editUser(user);\n \n isDeleted = false;\n break;\n }\n }\n if (isDeleted) {\n user.setIsDeleted((byte) 1);\n user.setActive((byte) 0);\n userRepository.editUser(user);\n }\n }\n\n //check new user\n for (LdapUser ldapUser : ldapUsers) {\n boolean isNew = true;\n for(User user : users){\n if(ldapUser.getUserID().equals(user.getUserID())){\n isNew = false;\n break;\n }\n }\n if(isNew){\n logger.debug(\"Is new User userID = \"+ldapUser.getUserID());\n User user = new User();\n user.setUserID(ldapUser.getUserID());\n user.setStaffCode(ldapUser.getUserID());\n user.setFirstName(ldapUser.getFirstName());\n user.setLastName(ldapUser.getLastName());\n user.setCreatedAt(Utils.getCurrentTime());\n user.setUpdatedAt(Utils.getCurrentTime());\n user.setEmail(ldapUser.getMail().trim());\n user.setJobTitle(ldapUser.getTitle() == null ? DEFAULT_JOB_TITLE : ldapUser.getTitle());\n user.setPhoneNumber(ldapUser.getTelephonNumber());\n user.setActive((byte) 1);\n user.setIsDeleted((byte) 0);\n user.setOfficeLocation(ldapUser.getOfficeLocation());\n user.setRoleId(4);\n user.setApprovalManagerId(0);;\n \n String managerId = ldapUser.getManagerUser();\n User manager = getUserFromListByUserID(users, managerId);\n user.setManagerId(manager == null ? 0 : manager.getId());\n\n //This code will be lock till deploy the real LDAP have 2 properties are \"department\" and \"userAccountControl\"\n Department department = departmentRepository.getDepartmentByName(ldapUser.getDepartment());\n user.setDepartmentId(department == null ? 0 : department.getId());\n \n /*user.setActive(ldapUser.getUserAccountControl() == 514 ? (byte) 0 : (byte) 1);*/\n \n userRepository.addUser(user);\n logger.debug(\"Is new User id = \"+user.getId());\n }\n }\n \n //Remove AprovalManager out User\n for(Integer userId : listUserIdRemoveAM){\n if(userId == null) continue;\n User userRemoveAMId = userRepository.getUserById(userId);\n userRemoveAMId.setApprovalManagerId(0);\n userRepository.editUser(userRemoveAMId);\n }\n }", "private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }", "@Override\n public void cacheGroupsAdd(List<String> groups) throws IOException {\n }", "public GrupoLocalResponse actualizarGrupoLocal(Integer idGrupoLocal, GrupoLocalRequest grupoLocalRequest);", "public void saveNow() {\n\t\tplugin.getFileManager().saveGroupsNow();\n\t}", "public void assignGroups(Player pl) {\n\t\tif (!Settings.Groups.ENABLED)\n\t\t\treturn;\n\t\t\n\t\tif (groups == null || Settings.Groups.ALWAYS_CHECK_UPDATES) {\n\t\t\tCommon.Debug(\"&bLoading group for &f\" + pl.getName() + \"&b ...\");\n\t\t\tgroups = Group.loadFor(pl);\n\t\t}\n\t}", "protected abstract Set getUserGroups();", "public List<GcGrouperSyncMember> getGcGrouperSyncMembers() {\r\n return gcGrouperSyncMembers;\r\n }", "public static void getCluster(ZkClient zkClient) {\n \ttry {\n \t\tif(zkClient.getZooKeeper().getState().isAlive()){\n \t\t\tList<String> allGroupNames = ZkUtils.getChildrenParentMayNotExist(zkClient, ServerRegister.ZK_BROKER_GROUP);\n \tCollections.sort(allGroupNames);\n if (allGroupNames != null) {\n \t//LOGGER.debug(\"read all broker group count: \" + allGroupNames.size());\n \tList<Group> allGroup = new ArrayList<Group>();\n \tMap<String, String> slaveIp = new HashMap<>();\n for (String group : allGroupNames) {\n String jsonGroup = ZkUtils.readData(zkClient, ServerRegister.ZK_BROKER_GROUP + \"/\" + group);\n if(StringUtils.isNotBlank(jsonGroup)){\n \tGroup groupObj = DataUtils.json2BrokerGroup(jsonGroup);\n \tallGroup.add(groupObj);\n \tif(groupObj.getSlaveOf() != null){\n \t\tslaveIp.put(groupObj.getSlaveOf().getHost(), groupObj.getMaster().getHost());\n \t}\n \t//LOGGER.debug(\"Loading Broker Group \" + groupObj.toString());\n }\n }\n Cluster.clear();\n List<Group> noSlave = new ArrayList<Group>();\n for(Group group:allGroup){\n \tif(slaveIp.containsKey(group.getMaster().getHost())){\n \t\tgroup.getMaster().setShost(slaveIp.get(group.getMaster().getHost()));\n \t\tCluster.addGroup(group);\n \t}else{\n \t\tnoSlave.add(group);\n \t}\n }\n if(noSlave.size() > 0){\n \tCluster.addGroups(noSlave);\n \t//LOGGER.info(\"Master load success, list:\"+Cluster.getMasters().toString());\n }\n }\n \t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"get cluster error\", e);\n\t\t}\n }", "void doResetGroups( long start_id )\n {\n // Log.v(\"DistoX\", \"Reset CID \" + mApp.mCID + \" from gid \" + start_id );\n mApp_mDData.resetAllGMs( mApp.mCID, start_id ); // reset all groups where status=0, and id >= start_id\n }", "public void setGcGrouperSyncMemberships(List<GcGrouperSyncMembership> gcGrouperSyncMemberships) {\r\n this.gcGrouperSyncMemberships = gcGrouperSyncMemberships;\r\n }", "private void fillCacheGroupState(CheckpointRecord cpRec) throws IgniteCheckedException {\n GridCompoundFuture grpHandleFut = asyncRunner == null ? null : new GridCompoundFuture();\n\n for (CacheGroupContext grp : cctx.cache().cacheGroups()) {\n if (grp.isLocal() || !grp.walEnabled())\n continue;\n\n Runnable r = () -> {\n ArrayList<GridDhtLocalPartition> parts = new ArrayList<>(grp.topology().localPartitions().size());\n\n for (GridDhtLocalPartition part : grp.topology().currentLocalPartitions())\n parts.add(part);\n\n CacheState state = new CacheState(parts.size());\n\n for (GridDhtLocalPartition part : parts) {\n state.addPartitionState(\n part.id(),\n part.dataStore().fullSize(),\n part.updateCounter(),\n (byte)part.state().ordinal()\n );\n }\n\n synchronized (cpRec) {\n cpRec.addCacheGroupState(grp.groupId(), state);\n }\n };\n\n if (asyncRunner == null)\n r.run();\n else\n try {\n GridFutureAdapter<?> res = new GridFutureAdapter<>();\n\n asyncRunner.execute(U.wrapIgniteFuture(r, res));\n\n grpHandleFut.add(res);\n }\n catch (RejectedExecutionException e) {\n assert false : \"Task should never be rejected by async runner\";\n\n throw new IgniteException(e); //to protect from disabled asserts and call to failure handler\n }\n }\n\n if (grpHandleFut != null) {\n grpHandleFut.markInitialized();\n\n grpHandleFut.get();\n }\n }", "@Override\n public void run() {\n syncToServer();\n }", "private void loadAllGroups() {\n ParseUser user = ParseUser.getCurrentUser();\n List<Group> groups = user.getList(\"groups\");\n groupList.clear();\n if (groups != null) {\n for (int i = 0; i < groups.size(); i++) {\n try {\n Group group = groups.get(i).fetchIfNeeded();\n groupList.add(group);\n groupAdapter.notifyItemInserted(groupList.size() - 1);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n }\n }", "void getGroupsAsync(IAsyncCallback<Set<Object>> callback);", "public List<GcGrouperSyncMembership> getGcGrouperSyncMemberships() {\r\n return gcGrouperSyncMemberships;\r\n }", "public void modifyGroup(String id) {\r\n //TODO\r\n System.out.println(\"conectado con model ---> metodo modifyGroup\");\r\n }", "public List<GcGrouperSyncMembership> retrieveGcGrouperSyncMemberships() {\n List<GcGrouperSyncMembership> result = new ArrayList<GcGrouperSyncMembership>();\n for (ProvisioningMembershipWrapper provisioningMembershipWrapper : this.provisioningMembershipWrappers) {\n GcGrouperSyncMembership gcGrouperSyncMembership = provisioningMembershipWrapper.getGcGrouperSyncMembership();\n if (gcGrouperSyncMembership != null) {\n result.add(gcGrouperSyncMembership);\n }\n }\n return result;\n }", "@Override\n public void cacheGroupsAdd(List<String> groups) throws IOException {\n for(String group: groups) {\n if(group.length() == 0) {\n // better safe than sorry (should never happen)\n } else if(group.charAt(0) == '@') {\n if(!NetgroupCache.isCached(group)) {\n NetgroupCache.add(group, getUsersForNetgroup(group));\n }\n } else {\n // unix group, not caching\n }\n }\n }", "private void refreshServerList() {\n\t\tcurrentRequestId++;\n\t\tserverNames.clear();\n\t\tserverTable.clear();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\taddresses = client.discoverHosts(WifiHelper.UDP_PORT, 1000);\n\t\t\t\tint removed = 0;\n\t\t\t\tfor(int i = 0; i + removed < addresses.size(); i++) {\n\t\t\t\t\tsynchronized(client) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tclient.connect(1000, addresses.get(i - removed), WifiHelper.TCP_PORT, WifiHelper.UDP_PORT);\n\t\t\t\t\t\t\tclient.sendTCP(new NameRequest(currentRequestId, addresses.size()));\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tclient.wait(5000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\taddresses.remove(i);\n\t\t\t\t\t\t\tremoved++;\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}).start();\n\t}", "void updateGroup(@Nonnull UserGroup group);", "public void setGcGrouperSyncMembership(GcGrouperSyncMembership gcGrouperSyncMembership) {\r\n this.gcGrouperSyncMembership = gcGrouperSyncMembership;\r\n }", "public GrupoLocalResponse registrarGrupoLocal(GrupoLocalRequest grupoLocalRequest);", "@Test\n\tpublic void testCourseSetMembersReconciled() throws Exception {\n\t\tMembership member = (Membership)cmService.getCourseSetMemberships(\"ucb\").iterator().next();\n\t\tAssert.assertEquals(\"birgeneau\", member.getUserId());\n\t\tAssert.assertEquals(\"president\", member.getRole());\n\t\t\n\t\t// Add a new membership\n\t\tMembership newMember = cmAdmin.addOrUpdateCourseSetMembership(\"foo\", \"bar\", \"ucb\", \"active\");\n\t\t\n\t\t// Ensure it was added\n\t\tAssert.assertTrue(cmService.getCourseSetMemberships(\"ucb\").contains(newMember));\n\t\t\n\t\t// Reconcile again\n\t\tjob.syncAllCmObjects();\n\t\t\n\t\t// Ensure that the new member was removed\n\t\tAssert.assertFalse(cmService.getCourseSetMemberships(\"ucb\").contains(newMember));\n\t}", "@Test\n public void testRoundRobinMasters()\n throws Exception {\n\n RepEnvInfo[] repEnvInfo = null;\n Logger logger = LoggerUtils.getLoggerFixedPrefix(getClass(), \"Test\");\n\n try {\n /* Create a replicator for each environment directory. */\n EnvironmentConfig envConfig =\n RepTestUtils.createEnvConfig\n (new Durability(Durability.SyncPolicy.WRITE_NO_SYNC,\n Durability.SyncPolicy.WRITE_NO_SYNC,\n Durability.ReplicaAckPolicy.SIMPLE_MAJORITY));\n envConfig.setConfigParam\n (EnvironmentConfig.LOG_FILE_MAX,\n EnvironmentParams.LOG_FILE_MAX.getDefault());\n\n // TODO: Is this needed now that hard recovery works?\n LocalCBVLSNUpdater.setSuppressGroupDBUpdates(true);\n envConfig.setConfigParam(\"je.env.runCleaner\", \"false\");\n\n repEnvInfo =\n RepTestUtils.setupEnvInfos(envRoot, nNodes, envConfig);\n\n /* Increase the ack timeout, to deal with slow test machines. */\n RepTestUtils.setConfigParam(RepParams.REPLICA_ACK_TIMEOUT, \"30 s\",\n repEnvInfo);\n\n /* Start all members of the group. */\n ReplicatedEnvironment master = RepTestUtils.joinGroup(repEnvInfo);\n assert(master != null);\n\n /* Do work */\n int startVal = 1;\n doWork(master, startVal);\n\n VLSN commitVLSN =\n RepTestUtils.syncGroupToLastCommit(repEnvInfo,\n repEnvInfo.length);\n RepTestUtils.checkNodeEquality(commitVLSN, verbose , repEnvInfo);\n\n logger.fine(\"--> All nodes in sync\");\n\n /*\n * Round robin through the group, letting each one have a turn\n * as the master.\n */\n for (int i = 0; i < nNodes; i++) {\n /*\n * Shut just under a quorum of the nodes. Let the remaining\n * nodes vote, and then do some work. Then bring\n * the rest of the group back in a staggered fashion. Check for\n * consistency among the entire group.\n */\n logger.fine(\"--> Shutting down, oldMaster=\" +\n master.getNodeName());\n int activeNodes =\n shutdownAllButQuorum(logger,\n repEnvInfo,\n RepInternal.getNodeId(master));\n\n master = RepTestUtils.openRepEnvsJoin(repEnvInfo);\n\n assertNotNull(master);\n logger.fine(\"--> New master = \" + master.getNodeName());\n\n startVal += 5;\n\n /*\n * This test is very timing dependent, so\n * InsufficientReplicasException is allowed.\n */\n int retries = 5;\n for (int retry = 0;; retry++) {\n try{\n doWork(master, startVal);\n break;\n } catch (InsufficientReplicasException e) {\n if (retry >= retries) {\n throw e;\n }\n }\n }\n\n /* Re-open the closed nodes and have them re-join the group. */\n logger.fine(\"--> Before closed nodes rejoin\");\n ReplicatedEnvironment newMaster =\n RepTestUtils.joinGroup(repEnvInfo);\n\n assertEquals(\"Round \" + i +\n \" expected master to stay unchanged. \",\n master.getNodeName(),\n newMaster.getNodeName());\n VLSN vlsn =\n RepTestUtils.syncGroupToLastCommit(repEnvInfo,\n activeNodes);\n RepTestUtils.checkNodeEquality(vlsn, verbose, repEnvInfo);\n }\n } catch (Throwable e) {\n e.printStackTrace();\n throw e;\n } finally {\n RepTestUtils.shutdownRepEnvs(repEnvInfo);\n }\n }", "public void populateGroups() {\n new PopulateGroupsTask(this.adapter, this).execute();\n }", "public static void sendCoordinatorMsg() {\n int numberOfRequestsNotSent = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if ( key != ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n\n try {\n MessageTransfer.sendServer(\n ServerMessage.getCoordinator( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent leader ID to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n numberOfRequestsNotSent += 1;\n System.out.println(\"WARN : Server s\"+destServer.getServerID()+\n \" has failed, it will not receive the leader\");\n }\n }\n }\n if( numberOfRequestsNotSent == ServerState.getInstance().getServers().size()-1 ) {\n // add self clients and chat rooms to leader state\n List<String> selfClients = ServerState.getInstance().getClientIdList();\n List<List<String>> selfRooms = ServerState.getInstance().getChatRoomList();\n\n for( String clientID : selfClients ) {\n LeaderState.getInstance().addClientLeaderUpdate( clientID );\n }\n\n for( List<String> chatRoom : selfRooms ) {\n LeaderState.getInstance().addApprovedRoom( chatRoom.get( 0 ),\n chatRoom.get( 1 ), Integer.parseInt(chatRoom.get( 2 )) );\n }\n\n leaderUpdateComplete = true;\n }\n }", "@Test\n public void updateSubjectGroupTest() throws Exception\n {\n createSubjectGroupTest();\n \n String groupName = \"network\";\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n \n Map<Long, SubjectGroup> result = ip.getSubjectGroupInfoByName(groupName);\n \n assertNotNull(result);\n SubjectGroup subjectGroup = result.values().toArray(new SubjectGroup[1])[0];\n Long groupId = result.keySet().toArray(new Long[1])[0];\n \n SubjectGroupEditObject sgEditObj = new SubjectGroupEditObject();\n List<Long> addList = sgEditObj.getAddSubjectList();\n addList.add(ip.getSubjectByName(\"server\").keySet().toArray(new Long[1])[0]);\n List<Long> remList = sgEditObj.getRemoveSubjectList();\n remList.add(ip.getSubjectByName(\"workstation\").keySet().toArray(new Long[1])[0]);\n\n SubjectGroupKey groupKey = ip.updateSubjectGroup(subjectGroup, sgEditObj, userKey);\n EntityManagerContext.open(factory);\n try {\n Query query = EntityManagerContext.get().createQuery(\"select sg.subjects from \" +\n \"org.ebayopensource.turmeric.policyservice.model.SubjectGroup as sg \" + \n \"where sg.id = \" + groupId);\n List<org.ebayopensource.turmeric.policyservice.model.Subject> subjectList =\n query.getResultList();\n assertEquals(2, subjectList.size());\n assertEquals(\"gateway\", subjectList.get(0).getSubjectName());\n assertEquals(\"server\", subjectList.get(1).getSubjectName());\n } finally {\n EntityManagerContext.close();\n }\n }", "public Collection<String> getGroups() {\r\n \t\tCollection<String> serverGroups = this.groupList.getGroups();\r\n \r\n \t\treturn serverGroups;\r\n \t}", "public List<GcGrouperSyncMember> retrieveGcGrouperSyncMembers() {\n List<GcGrouperSyncMember> result = new ArrayList<GcGrouperSyncMember>();\n for (ProvisioningEntityWrapper provisioningEntityWrapper : this.provisioningEntityWrappers) {\n GcGrouperSyncMember gcGrouperSyncMember = provisioningEntityWrapper.getGcGrouperSyncMember();\n if (gcGrouperSyncMember != null) {\n result.add(gcGrouperSyncMember);\n }\n }\n return result;\n }", "private synchronized void syncData() {\n try {\n // pulling data from server\n pullData();\n\n // pushing local changes to server\n// recordStatus=2\n pushData();\n// recordStatus=1\n// pushData1();\n } catch (Throwable throwable) {\n Log.d(TAG, \"doWork: \" + throwable.getMessage());\n }\n // Toast.makeText(getApplicationContext(), \".\", Toast.LENGTH_SHORT).show();\n }", "public void updated(ServerList list);", "@Override\n public void sync(){\n }", "private void groupQuery() {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(ParseConstants.CLASS_GROUPS);\n query.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n setProgressBarIndeterminateVisibility(false);\n if(e == null) {\n mGroup = group;\n mMemberRelation = mGroup.getRelation(ParseConstants.KEY_MEMBER_RELATION);\n mMemberOfGroupRelation = mCurrentUser.getRelation(ParseConstants.KEY_MEMBER_OF_GROUP_RELATION);\n\n //only the admin can delete the group\n mGroupAdmin = mGroup.get(ParseConstants.KEY_GROUP_ADMIN).toString();\n mGroupAdmin = Utilities.removeCharacters(mGroupAdmin);\n if ((mCurrentUser.getUsername()).equals(mGroupAdmin)) {\n mDeleteMenuItem.setVisible(true);\n }\n\n mGroupName = group.get(ParseConstants.KEY_GROUP_NAME).toString();\n mGroupName = Utilities.removeCharacters(mGroupName);\n setTitle(mGroupName);\n\n mCurrentDrinker = mGroup.get(ParseConstants.KEY_CURRENT_DRINKER).toString();\n mCurrentDrinker = Utilities.removeCharacters(mCurrentDrinker);\n mCurrentDrinkerView.setText(mCurrentDrinker);\n\n mPreviousDrinker = mGroup.get(ParseConstants.KEY_PREVIOUS_DRINKER).toString();\n mPreviousDrinker = Utilities.removeCharacters(mPreviousDrinker);\n mPreviousDrinkerView.setText(mPreviousDrinker);\n\n listViewQuery(mMemberRelation);\n }\n else {\n Utilities.getNoGroupAlertDialog(null);\n }\n }\n });\n }", "private void getGroup() {\n\r\n if (mAuth.getCurrentUser().isAnonymous()){\r\n g.setGroup(\"guest\");\r\n u.setGroup(g.getGroup());\r\n //nFirestore.collection(\"user\").document(mAuth.getCurrentUser().getUid()).set(g);\r\n }else{\r\n\r\n DocumentReference docRef = nFirestore.collection(\"usergroup\").document(mAuth.getCurrentUser().getUid());\r\n docRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\r\n\r\n @Override\r\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\r\n if (task.isSuccessful()){\r\n DocumentSnapshot document = task.getResult();\r\n g = document.toObject(Grupo.class);\r\n u.setGroup(g.getGroup());\r\n nFirestore.collection(\"user\").document(mAuth.getCurrentUser().getUid()).update(\"group\",g.getGroup()).addOnSuccessListener(new OnSuccessListener<Void>() {\r\n @Override\r\n public void onSuccess(Void aVoid) {\r\n //Toast.makeText(MainActivity.this, \"Updateado\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }", "@GET\n\t@Path(\"/updateGroupMemberPositions\")\n\tpublic void updateGroupMemberPositions(@Context HttpServletResponse response, @Context HttpServletRequest request) {\n\t\tlogger.info(\"start : updateGroupMemberPositions \");\n\t\tMap<String, Object> json = new HashMap<>();\n\t\tEntityManager em = EntityManagerHelper.getDefaulteEntityManager();\n\t\ttry {\n\t\t\tGroupMemberDAO groupMemberDAO = new GroupMemberDAO(em);\n\t\t\tList<GroupMember> members = groupMemberDAO.getAll();\n\t\t\tlogger.warn(\"members size : \" + members.size());\n\t\t\tint count = 0;\n\t\t\tfor (GroupMember m : members) {\n\t\t\t\tif(m.getPositions().isEmpty()){\n\t\t\t\t\tif(m.getIsAdmin()){\n\t\t\t\t\t\tm.getPositions().add(UserPosition.ADMIN);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tm.getPositions().add(UserPosition.STUDENT);\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n\t\t\t\t\tgroupMemberDAO.upsert(m);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlogger.warn(\"updated members size : \" + count);\n\t\t\tjson.put(Constants.CODE, Constants.RESPONSE_OK);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage(), e);\n\n\t\t\tjson.put(Constants.CODE, Constants.ERROR_WITH_MSG);\n\t\t\tjson.put(Constants.MESSAGE, e.getMessage());\n\t\t} finally {\n\t\t\tif (em.isOpen()) {\n\t\t\t\tem.close();\n\t\t\t}\n\t\t}\n\t\trenderResponseJson(json, response);\n\t\tlogger.info(\"exit : updateGroupMemberPositions\");\n\t}", "public void join() {\n FacesContext fc = FacesContext.getCurrentInstance();\n try {\n UbikeUser current = (UbikeUser) BaseBean.getSessionAttribute(\"user\");\n ExternalContext exctx = fc.getExternalContext();\n HttpServletRequest request = (HttpServletRequest) exctx.getRequest();\n long groupId = Long.parseLong(request.getParameter(\"groupId\"));\n long userId = current.getId();\n MemberShip m = memberShipService.getMemberShip(userId, groupId);\n\n if (m != null) {\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"You are already member of this group\",\n \"You are already member of this group\"));\n return;\n }\n\n UbikeGroup group = groupService.find(groupId);\n m = new MemberShip(current, group, Role.Member);\n memberShipService.create(m);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_INFO,\n \"You joined the group \" + group.getName() + \" successfully\",\n \"You joined the group \" + group.getName() + \" successfully\"));\n\n List<MemberShip> members = (List<MemberShip>) BaseBean.getSessionAttribute(\"tmp_members\");\n if (members == null) {\n members = new ArrayList<MemberShip>();\n BaseBean.setSessionAttribute(\"tmp_members\", members);\n }\n members.add(m);\n } catch (Exception exp) {\n logger.log(Level.SEVERE, \"An error occurs while joinning group\", exp);\n fc.addMessage(\"join:join_status\", new FacesMessage(FacesMessage.SEVERITY_ERROR,\n \"An error occurs while processing your request\",\n \"An error occurs while processing your request\"));\n }\n }", "public void updateCollisionGroup(){\n\t\tcollisionGroup = new CollisionGroup();\n\t\t\n\t\t//Adds tile from the Screen into the collisionGroup.\n\t\tfor(int x = 0; x<getScreen().getNumOfTilesX(); x++){\n\t\t\tfor(int y = 0; y<getScreen().getNumOfTilesY(); y++){\n\t\t\t\t\n\t\t\t\tTile sTile = getScreen().getTile(x, y);\n\t\t\t\tcollisionGroup.add(sTile);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Adds the Player to the collisionGroup.\n\t\tif(player != null){\n\t\t\tcollisionGroup.add(getPlayer());\n\t\t}\n\t}", "void deployGroup(String groupJson);", "void renameServerStoredContactGroup(ContactGroup group, String newName);", "public void setCurrentGroups(final Collection<BwGroup> val) {\n currentGroups = val;\n }", "List<GroupUser> getConnectedClients();", "void addServerStoredGroupChangeListener(ServerStoredGroupListener listener);", "@Test\n public void testBasic() throws InterruptedException {\n createGroup(2);\n\n ReplicatedEnvironment menv = repEnvInfo[0].getEnv();\n assertEquals(menv.getState(), State.MASTER);\n repEnvInfo[1].closeEnv();\n\n final int nRecords = 1000;\n populateDB(menv, nRecords);\n\n ReplicatedEnvironmentStats stats =\n menv.getRepStats(StatsConfig.CLEAR);\n assertEquals(0, stats.getNProtocolMessagesBatched());\n\n /* Open replica and catch up. */\n repEnvInfo[1].openEnv();\n\n /* Wait for catchup. */\n VLSN vlsn = RepTestUtils.syncGroup(repEnvInfo);\n /*\n * All the messages must have been sent in batches as part of the sync\n * operation.\n */\n stats = menv.getRepStats(null);\n\n assertTrue(stats.getNProtocolMessagesBatched() >= nRecords);\n\n /* Verify contents. */\n RepTestUtils.checkNodeEquality(vlsn, false, repEnvInfo);\n }", "private void assignGroups(int numSupportedGroups) {\n if (mSendDeviceId == Device.DEVICE_ID_UNKNOWN)\n return;\n // Check the number of supported groups matches the number requested to be set.\n if (numSupportedGroups >= mNewGroups.size()) {\n\n mGroupAcksWaiting = 0;\n\n // Make a copy of existing groups for this device.\n mGroupsToSend = mDeviceStore.getSingleDevice(mSendDeviceId).getGroupMembershipValues();\n // Loop through existing groups.\n for (int i = 0; i < mGroupsToSend.size(); i++) {\n int groupId = mGroupsToSend.get(i);\n if (groupId != 0) {\n int foundIndex = mNewGroups.indexOf(groupId);\n if (foundIndex > -1) {\n // The device is already a member of this group so remove it from the list of groups to add.\n mNewGroups.remove(foundIndex);\n }\n else {\n // The device should no longer be a member of this group, so set that index to -1 to flag\n // that a message must be sent to update this index.\n mGroupsToSend.set(i, -1);\n }\n }\n }\n // Now loop through currentGroups, and for every index set to -1 or zero send a group update command for\n // that index with one of our new groups if one is available. If there are no new groups to set, then just\n // send a message for all indices set to -1, to set them to zero.\n boolean commandSent = false;\n for (int i = 0; i < mGroupsToSend.size(); i++) {\n int groupId = mGroupsToSend.get(i);\n if (groupId == -1 || groupId == 0) {\n if (mNewGroups.size() > 0) {\n int newGroup = mNewGroups.get(0);\n mNewGroups.remove(0);\n commandSent = true;\n sendGroupCommands(mSendDeviceId, i, newGroup);\n }\n else if (groupId == -1) {\n commandSent = true;\n sendGroupCommands(mSendDeviceId, i, 0);\n }\n }\n }\n if (!commandSent) {\n // There were no changes to the groups so no updates were sent. Just tell the listener\n // that the operation is complete.\n if (mGroupAckListener != null) {\n mGroupAckListener.groupsUpdated(mSendDeviceId, true, stActivity.getString(R.string.group_no_changes));\n }\n }\n }\n else {\n // Not enough groups supported on device.\n if (mGroupAckListener != null) {\n mGroupAckListener.groupsUpdated(mSendDeviceId, false,\n stActivity.getString(R.string.group_max_fail) + \" \" + numSupportedGroups + \" \" + stActivity.getString(R.string.groups));\n }\n }\n }", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tvoid updateNames () {\n\t\tConnection[] connections = server.getConnections();\r\n\t\t\r\n\t\tArrayList<String> names = new ArrayList<>(connections.length);\r\n\t\tfor (int i = connections.length - 1; i >= 0; i--) {\r\n\t\t\tChatConnection connection = (ChatConnection)connections[i];\r\n\t\t\tnames.add(connection.name);\r\n\t\t}\r\n\t\t// Send the names to everyone.\r\n\t\tUpdateNames updateNames = new UpdateNames();\r\n\t\tupdateNames.names = (String[])names.toArray(new String[names.size()]);\r\n\t\tserver.sendToAll(updateNames, true);\r\n\t}", "public void setGcGrouperSyncMember(GcGrouperSyncMember gcGrouperSyncMember) {\r\n this.gcGrouperSyncMember = gcGrouperSyncMember;\r\n }", "void refreshPlayerList(Map<String, IPlayerConfig> playerList) throws RpcException;", "private void updateLocalPatients(){\n if (localUser == null){\n Log.d(Constants.NULL_USER_TAG, \"updateLocalPatients: local User is null\");\n return;\n }\n localPatients = new ArrayList<>();\n CollectionReference patientsCollection = db.collection(Constants.PATIENTS_COLLECTION_FIELD);\n for (final String patientId : localUser.getPatientIds()) {\n patientsCollection.document(patientId).get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n // attempt to get patient\n Patient patient = documentSnapshot.toObject(Patient.class);\n if (patient == null){\n return;\n }\n // assert this patient allows local user to follow\n if (patient.hasCaregiverWithId(localUser.getId()) || patient.hasFriendWithId(localUser.getId())){\n localPatients.add(patient);\n }\n }\n });\n }\n }", "public void joinGroup() throws IOException{\n\t\tmSocket.joinGroup(mIP);\n\t}", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> updateShardGroup(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.UpdateClusterShardGroupRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getUpdateShardGroupMethod(), getCallOptions()), request);\n }", "public static void sync(Context context) {\n\t\t//Initialise the Manager\n\t\tIpGetter_manager manager = GetInstance(context);\n\t\t\n\t\t//Try to get the openudid from local preferences\n\t\tip = manager.mPreferences.getString(PREF_IP_KEY, null);\n\t\tcity = manager.mPreferences.getString(PREF_CITY_KEY, null);\n\t\tnetSSID = manager.mPreferences.getString(PREF_SSID_KEY, null);\n\t\tnetMac = manager.mPreferences.getString(PREF_NMAC_KEY, null);\n\t\tlocalMac = manager.mPreferences.getString(PREF_LMAC_KEY, null);\n\t\tif (ip == null) //Not found\n\t\t{\n\t\t\t//Get the list of all OpenUDID services available (including itself)\n\t\t\tgetIpInfo(manager.mContext.get());\n\t\t\n\t\t} else {//Got it, you can now call getOpenUDID()\n\t\t\tif (LOG) Log.d(TAG, \"OpenIp: \" + ip);\n\t\t\tgetIpInfo(context);\n\t\t}\n\t}", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public SyncGroupsInner(Retrofit retrofit, StorageSyncManagementClientImpl client) {\n this.service = retrofit.create(SyncGroupsService.class);\n this.client = client;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprotected void refreshLocaleRelatedGroups(List<String> sessionGroups) {\r\n\t\tSet<String> inputGroups = new HashSet<String>();\r\n\t\tString language = \"\";\r\n\t\tString country = \"\";\r\n\t\tIterator<String> iterator = sessionGroups.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tString group = iterator.next();\r\n\t\t\tif (!group.startsWith(AuthenticationConsts.LOCAL_PORTAL_LANG_PREFIX)\r\n\t\t\t\t&& !group.startsWith(AuthenticationConsts.LOCAL_PORTAL_COUNTRY_PREFIX)) {\r\n\t\t\t\t// find all groups which are not locale groups\r\n\t\t\t\tinputGroups.add(group);\r\n\t\t\t}\r\n\t\t\tif (group.startsWith(AuthenticationConsts.LOCAL_PORTAL_LANG_PREFIX)) {\r\n\t\t\t\tlanguage = group.replace(AuthenticationConsts.LOCAL_PORTAL_LANG_PREFIX,\r\n\t\t\t\t\t\t\t\t\t\t \"\");\r\n\t\t\t}\r\n\t\t\tif (group.startsWith(AuthenticationConsts.LOCAL_PORTAL_COUNTRY_PREFIX)) {\r\n\t\t\t\tcountry = group.replace(AuthenticationConsts.LOCAL_PORTAL_COUNTRY_PREFIX,\r\n\t\t\t\t\t\t\t\t\t\t\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tLocale reqLocale = (Locale)request.getAttribute(AuthenticationConsts.SSO_USER_LOCALE);\r\n\t\t// if locale change\r\n\t\tif (!(reqLocale.getLanguage().equalsIgnoreCase(language) && reqLocale.getCountry()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .equalsIgnoreCase(country))) {\r\n\t\t\t// add new locale group to the final group set\r\n\t\t\tinputGroups.addAll(getLocaleGroups());\r\n\t\t\tssoUser.setGroups(inputGroups);\r\n\t\t\ttry {\r\n\t\t\t\t// Retrieve user from session, in current situation user will\r\n\t\t\t\t// not be null\r\n\t\t\t\tUser currentUser = SessionUtils.getCurrentUser(request.getSession());\r\n\t\t\t\tupdateVAPUserGroups(currentUser);\r\n\t\t\t\tsaveUserProfile2Session(currentUser);\r\n\t\t\t} catch (EntityPersistenceException ex) {\r\n\t\t\t\tLOG.error(\"Invoke Authenticator.execute error: updateVAPUserGroups error: \"\r\n\t\t\t\t\t\t\t\t + ex.getMessage(),\r\n\t\t\t\t\t\t ex);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void mem_list() {\n synchronized(chat_room) {\n Set id_set = cur_chat_room.keySet();\n Iterator iter = id_set.iterator();\n clearScreen(client_PW);\n client_PW.println(\"------------online member-----------\");\n while(iter.hasNext()) {\n String mem_id = (String)iter.next();\n if(mem_id != client_ID) {\n client_PW.println(mem_id);\n }\n }\n client_PW.flush();\n }\n }", "public void syncingByGroup(String period, int granularity){\n\t\tList<Object[]> resultList = kpiResultDetailDao.getKpiResultDetail(period, granularity);\n\t\tif(resultList.size()==0){\n\t\t\tlog.info(\"Can not fetch data,return.\");\n\t\t\treturn;\n\t\t}\n\t\tString filename = saveToFileGroup(resultList, granularity);\n\t\tString loadsql = String.format(LOAD_FORMAT_GROUP, filename,\"ices_kpi_result_detail_group\");\n\t\tlog.info(\"loadsql: \"+loadsql);\n\t\tkpiDao.loadData(loadsql);\n\t\tnew File(filename).delete();\n\t\tsaveKpiResultGroup(period, granularity);\n\t}", "static void refreshFileSystem() {\n \t// Clear all existing registrations on the server via CORBA for this username\n server.clearSharedFiles(username);\n server.clearNotSharedFiles(username);\n // Register the files on the server through CORBA that have been added to the directories manually\n server.registerFiles(username);\n System.out.println();\n return;\n }", "public void broadcastToChannelMembers(L2GameServerPacket gsp) \r\n\t{\r\n\t\tif (_partys != null)\r\n\t\t\tfor (L2Party party : _partys)\r\n\t\t\t\tif (party != null)\r\n\t\t\t\t\tparty.broadcastToPartyMembers(gsp);\r\n\t}", "public void updateTvData(TvDataUpdateManager updateManager, Channel[] channelArr,\r\n Date startDate, int dateCount, ProgressMonitor monitor) {\r\n boolean groupsWereAlreadyUpdated = false;\r\n mHasRightToDownloadIcons = true;\r\n // Check for connection\r\n if (!updateManager.checkConnection()) {\r\n return;\r\n }\r\n\r\n // Reset list of banned Servers\r\n Mirror.resetBannedServers();\r\n\r\n mUpdateManager=updateManager;\r\n mProgressMonitor = monitor;\r\n \r\n HashSet<TvBrowserDataServiceChannelGroup> groups=new HashSet<TvBrowserDataServiceChannelGroup>();\r\n HashMap<ChannelGroup, GroupNews[]> newsMap = new HashMap<ChannelGroup, GroupNews[]>();\r\n \r\n monitor.setMaximum(channelArr.length);\r\n int i=0;\r\n for (Channel element : channelArr) {\r\n monitor.setValue(i++);\r\n TvBrowserDataServiceChannelGroup curGroup=getChannelGroupById(element.getGroup().getId());\r\n if (curGroup==null) {\r\n mLog.warning(\"Invalid channel group id: \"+element.getGroup().getId());\r\n continue;\r\n }\r\n\r\n if (!groups.contains(curGroup)) {\r\n groups.add(curGroup);\r\n mProgressMonitor.setMessage(mLocalizer.msg(\"info.8\",\"Finding mirror for group {0} ...\",curGroup.getName()));\r\n\r\n try {\r\n curGroup.chooseMirrors();\r\n \r\n long lastNewsTime = -1;\r\n \r\n if(mSettings.showNews()) {\r\n lastNewsTime = getNewsInfo(curGroup.getId(), curGroup.getMirror());\r\n \r\n if(lastNewsTime > mSettings.getLastGroupNewsDateForGroupId(curGroup.getId())) {\r\n GroupNews[] news = loadGroupNewsForGroup(curGroup);\r\n \r\n Arrays.sort(news);\r\n \r\n if(news.length > 0) {\r\n newsMap.put(curGroup, news);\r\n }\r\n \r\n mSettings.setLastGroupNewsDateForGroupId(curGroup.getId(), lastNewsTime);\r\n }\r\n }\r\n } catch(TvBrowserException e) {\r\n try {\r\n if(!groupsWereAlreadyUpdated) {\r\n groupsWereAlreadyUpdated = true;\r\n downloadChannelGroupFile();\r\n }\r\n setMirrorUrlForServerDefinedChannelGroup(curGroup);\r\n curGroup.chooseMirrors();\r\n }catch(TvBrowserException de) {\r\n ErrorHandler.handle(de);\r\n }\r\n }\r\n }\r\n\r\n curGroup.addChannel(element);\r\n\r\n }\r\n\r\n\r\n // Delete outdated files\r\n deleteOutdatedFiles();\r\n\r\n mProgressMonitor.setMessage(mLocalizer.msg(\"info.7\",\"Preparing download...\"));\r\n\r\n // Create a download manager and add all the jobs\r\n mDownloadManager = new DownloadManager();\r\n TvDataBaseUpdater updater = new TvDataBaseUpdater(this, updateManager);\r\n\r\n monitor.setMaximum(groups.size());\r\n\r\n Iterator<TvBrowserDataServiceChannelGroup> groupIt=groups.iterator();\r\n i=0;\r\n while (groupIt.hasNext()) {\r\n\r\n monitor.setValue(i++);\r\n\r\n TvBrowserDataServiceChannelGroup group=groupIt.next();\r\n SummaryFile remoteSummaryFile = group.getSummary();\r\n SummaryFile localSummaryFile = group.getLocalSummary();\r\n if (remoteSummaryFile != null) {\r\n \r\n // Add a receive or a update job for each channel and day\r\n DayProgramReceiveDH receiveDH = new DayProgramReceiveDH(this, updater, localSummaryFile);\r\n DayProgramUpdateDH updateDH = new DayProgramUpdateDH(this, updater, localSummaryFile);\r\n \r\n Date date = startDate;\r\n for (int day = 0; day < dateCount; day++) {\r\n for (TvDataLevel element : mSubscribedLevelArr) {\r\n String level = element.getId();\r\n Iterator<Channel> it=group.getChannels();\r\n while (it.hasNext()) {\r\n Channel ch=it.next();\r\n addDownloadJob(updateManager, group.getMirror(), date, level, ch,\r\n ch.getBaseCountry(), receiveDH, updateDH, remoteSummaryFile, localSummaryFile);\r\n }\r\n }\r\n date = date.addDays(1);\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n mProgressMonitor.setMessage(mLocalizer.msg(\"info.1\",\"Downloading...\"));\r\n\r\n\r\n // Initialize the ProgressMonitor\r\n mTotalDownloadJobCount = mDownloadManager.getDownloadJobCount();\r\n mProgressMonitor.setMaximum(mTotalDownloadJobCount);\r\n\r\n // Let the download begin\r\n try {\r\n mDownloadManager.runDownload();\r\n }\r\n finally {\r\n // Update the programs for which the update succeeded in every case\r\n mProgressMonitor.setMessage(mLocalizer.msg(\"info.2\",\"Updating database\"));\r\n Iterator<TvBrowserDataServiceChannelGroup> groupIt1=groups.iterator();\r\n while (groupIt1.hasNext()) {\r\n try {\r\n groupIt1.next().saveLocalSummary();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n updater.updateTvDataBase(monitor);\r\n mProgressMonitor.setMessage(\"\");\r\n\r\n // Clean up resources\r\n mDownloadManager = null;\r\n mUpdateManager = null;\r\n mProgressMonitor = null;\r\n }\r\n \r\n mHasRightToDownloadIcons = false;\r\n \r\n showNews(newsMap,true);\r\n }", "protected void updateGroupData() {\n if (!mGroupList.isEmpty()) {\n mAdapter.notifyDataSetChanged();\n // If we did not load 8 groups, we are at the end of the list, so signal\n // not to try to load more groups.\n if (mGroupList.size() - mCurrentAmountShown < 8) {\n loadMore = false;\n if(getListView() != null) {\n \tgetListView().removeFooterView(mProgressBar);\n }\n }\n \n hasGroups = true;\n } else {\n ArrayAdapter<String> blankAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1);\n blankAdapter.add(\"no groups to display\");\n getListView().setAdapter(blankAdapter);\n getListView().setEnabled(false);\n getListView().removeFooterView(mProgressBar);\n }\n }", "public void sync()\n {\n setAutoSync(false);\n // simply send sync command\n super.executionSync(Option.SYNC);\n }", "public interface GroupRpcService {\n\n /**\n * 创建群组\n * @param name\n * @param description\n * @param userId\n * @return\n */\n int createGroup(String name, String description, int userId);\n\n /**\n * 修改群组名\n * @param groupId\n * @param groupName\n * @return\n */\n int modifyGroupName(int groupId, String groupName);\n\n /**\n * 修改群备注\n * @param groupId\n * @param description\n * @return\n */\n int modifyGroupDescription(int groupId, String description);\n\n /**\n * 解散群组\n * @param groupId\n * @param userId\n * @return\n */\n int disbandGroup(int groupId, int userId);\n\n /**\n * 查询我创建的群组\n * @param userId\n * @return\n */\n List<GroupListVo> findGroupsByUserId(int userId);\n\n /**\n * 查询我所有加入的群组\n * @param userId\n * @return\n */\n List<GroupListVo> findUserJoinedGroup(int userId);\n\n /**\n * 查询群组内所有用户信息\n * @param groupId\n * @return\n */\n List<GroupMemberListVo> findGroupMemberList(int groupId);\n\n /**\n * 查询群组详细信息\n * @param groupId\n * @return\n */\n GroupInfoVo findGroupInfo(int groupId);\n\n /**\n * 发送群信息\n * @param groupId\n * @param userId\n * @param content\n * @param chatImage\n * @return\n */\n int sendGroupMessage(int groupId, int userId, String content,String chatImage);\n\n /**\n * 查询群聊天内容\n * @param groupId\n * @param page\n * @param count\n * @return\n */\n List<GroupChatRecordListVo> findGroupChatRecordPage(int groupId, int page, int count);\n\n /**\n * 移出群成员\n * @param groupId\n * @param userId\n * @param memberId\n * @return\n */\n int removeGroupMember(int groupId, int userId,int memberId);\n\n /**\n * 调整群成员角色\n * @param groupId\n * @param userId\n * @param role\n * @param memberId\n * @return\n */\n int modifyPermission(int groupId, int userId, int role,int memberId);\n\n /**\n * 判断用户是否已在群内\n * @param userId\n * @param groupId\n * @return\n */\n int whetherInGroup(int userId, int groupId);\n\n /**\n * 申请进群\n * @param groupId\n * @param fromUid\n * @param remark\n * @return\n */\n int applyAddGroup(int groupId, int fromUid, String remark);\n\n /**\n * 邀请加群\n * @param groupId\n * @param fromUid\n * @param receiverUid\n * @return\n */\n int inviteAddGroup(int groupId, int fromUid, int receiverUid);\n\n /**\n * 查询群通知记录\n * @param userId\n * @param page\n * @param count\n * @return\n */\n List<GroupNoticeListVo> findGroupNoticePageList(int userId, int page, int count);\n\n /**\n * 审核群申请\n * @param noticeId\n * @param flag\n * @return\n */\n int reviewGroupApply(int noticeId, int flag);\n\n /**\n * 修改群头像\n * @param image\n * @param groupId\n * @return\n */\n int modifyImage(String image,int groupId);\n\n /**\n * 退群\n * @param userId\n * @param groupId\n * @return\n */\n int retreat(int userId,int groupId);\n\n}", "@Override\n public void addServerStoredGroupChangeListener(ServerStoredGroupListener\n listener)\n {\n ssContactList.addGroupListener(listener);\n }", "public void sync() {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (useMmap) {\n\t\t\tsyncAllMmaps();\n\t\t}\n\t\tif (fileChannel != null) {\n\t\t\ttry {\n\t\t\t\tfileChannel.force(false);\n\t\t\t} catch (Exception ign) {\n\t\t\t}\n\t\t}\n\t\tif (callback != null) {\n\t\t\tcallback.synched();\n\t\t}\n\t}", "@Test\n\tvoid updateUserAddGroup() {\n\t\t// Pre condition, check the user \"wuser\", has not yet the group \"DIG\n\t\t// RHA\" we want to be added by \"fdaugan\"\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> initialResultsFromUpdater = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater.getRecordsTotal());\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency Manager\",\n\t\t\t\tinitialResultsFromUpdater.getData().get(0).getGroups().get(0).getName());\n\n\t\t// Pre condition, check the user \"wuser\", has no group visible by\n\t\t// \"assist\"\n\t\tinitSpringSecurityContext(\"assist\");\n\t\tfinal TableItem<UserOrgVo> assisteResult = resource.findAll(null, null, \"wuser\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, assisteResult.getRecordsTotal());\n\t\tAssertions.assertEquals(0, assisteResult.getData().get(0).getGroups().size());\n\n\t\t// Pre condition, check the user \"wuser\", \"Biz Agency Manager\" is not\n\t\t// visible by \"mtuyer\"\n\t\tinitSpringSecurityContext(\"mtuyer\");\n\t\tfinal TableItem<UserOrgVo> usersFromOtherGroupManager = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, usersFromOtherGroupManager.getRecordsTotal());\n\t\tAssertions.assertEquals(0, usersFromOtherGroupManager.getData().get(0).getGroups().size());\n\n\t\t// Add a new valid group \"DIG RHA\" to \"wuser\" by \"fdaugan\"\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal UserOrgEditionVo user = new UserOrgEditionVo();\n\t\tuser.setId(\"wuser\");\n\t\tuser.setFirstName(\"William\");\n\t\tuser.setLastName(\"User\");\n\t\tuser.setCompany(\"ing\");\n\t\tuser.setMail(\"[email protected]\");\n\t\tfinal List<String> groups = new ArrayList<>();\n\t\tgroups.add(\"DIG RHA\");\n\t\tgroups.add(\"Biz Agency Manager\");\n\t\tuser.setGroups(groups);\n\t\tresource.update(user);\n\n\t\t// Check the group \"DIG RHA\" is added and\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, null, \"wuser\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\t\tAssertions.assertEquals(2, tableItem.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency Manager\", tableItem.getData().get(0).getGroups().get(0).getName());\n\t\tAssertions.assertEquals(\"DIG RHA\", tableItem.getData().get(0).getGroups().get(1).getName());\n\n\t\t// Check the user \"wuser\", still has no group visible by \"assist\"\n\t\tinitSpringSecurityContext(\"assist\");\n\t\tfinal TableItem<UserOrgVo> assisteResult2 = resource.findAll(null, null, \"wuser\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, assisteResult2.getRecordsTotal());\n\t\tAssertions.assertEquals(0, assisteResult2.getData().get(0).getGroups().size());\n\n\t\t// Check the user \"wuser\", still has the group \"DIG RHA\" visible by\n\t\t// \"mtuyer\"\n\t\tinitSpringSecurityContext(\"mtuyer\");\n\t\tfinal TableItem<UserOrgVo> usersFromOtherGroupManager2 = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, usersFromOtherGroupManager2.getRecordsTotal());\n\t\tAssertions.assertEquals(\"DIG RHA\", usersFromOtherGroupManager2.getData().get(0).getGroups().get(0).getName());\n\n\t\t// Restore the old state\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal UserOrgEditionVo user2 = new UserOrgEditionVo();\n\t\tuser2.setId(\"wuser\");\n\t\tuser2.setFirstName(\"William\");\n\t\tuser2.setLastName(\"User\");\n\t\tuser2.setCompany(\"ing\");\n\t\tuser2.setMail(\"[email protected]\");\n\t\tfinal List<String> groups2 = new ArrayList<>();\n\t\tgroups2.add(\"Biz Agency Manager\");\n\t\tuser.setGroups(groups2);\n\t\tresource.update(user);\n\t\tfinal TableItem<UserOrgVo> initialResultsFromUpdater2 = resource.findAll(null, null, \"wuser\",\n\t\t\t\tnewUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater2.getRecordsTotal());\n\t\tAssertions.assertEquals(1, initialResultsFromUpdater2.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency Manager\",\n\t\t\t\tinitialResultsFromUpdater2.getData().get(0).getGroups().get(0).getName());\n\t}", "public void updateShardGroup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.UpdateClusterShardGroupRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateShardGroupMethod(), responseObserver);\n }", "@Transactional(readOnly = false)\n public void addToEveryone(Member member) {\n MemberGroup memberGroup = new MemberGroup();\n memberGroup.setStatus(Constants.STATUS_ACTIVE);\n memberGroup.setDateCreated(new Date());\n memberGroup.setGroupName(Group.EVERYONE.name());//default group\n memberGroup.setMember(member);\n saveMemberGroup(memberGroup);\n }", "@Override\n public void refresh() {\n serverJList.removeAll();\n client.searchForServer();\n }", "public void getGroups() {\n String listOfCode = prefs.getString(\"listOfCode\");\n if (!listOfCode.isEmpty()) {\n for (String groupPair : listOfCode.split(\",\"))\n if (!groupPair.isEmpty()) {\n final String nickname = groupPair.substring(0, groupPair.indexOf('|'));\n String code = groupPair.substring(groupPair.indexOf('|') + 1);\n ServerAPI.groupInformation(code, new RequestHandler<Group>() {\n @Override\n public void callback(Group result) {\n if (result == null) {\n return;\n }\n savedGroups.add(new Pair<String, Group>(nickname, result));\n populateListView();\n }\n });\n }\n }\n }", "public static boolean syncUp(ClientResponsePacket res_packet)throws IOException\n {\n Socket mem_conn = null;\n ClientResponsePacket data = null;\n MemNodeSyncHelper sync_nodes_list = res_packet.getMemNodeSyncHelper();\n ClientRequestPacket req_packet = new ClientRequestPacket();\n for(MemNodeSyncDetails node : sync_nodes_list.syncIps)\n {\n req_packet.setCommand(ProjectConstants.SYNC_MEM_NODE);\n req_packet.setStart_range(node.getStart_range());\n req_packet.setEnd_range(node.getEnd_range());\n req_packet.setStorage_type(node.getStorage_type());\n mem_conn = new Socket(node.getIp_Address(),ProjectConstants.MN_LISTEN_PORT);\n PacketTransfer.sendRequest(req_packet,mem_conn);\n data = PacketTransfer.recv_response(mem_conn);\n System.out.println(\"Loading DS with status : \" + data.getResponse_code() + \" and size : \" + data.getSync_data().size() +\n \" and range \" + node.getStart_range() + \":\" + node.getEnd_range() + \" and ip : \" + node.getIp_Address());\n if(data.getResponse_code() != ProjectConstants.SUCCESS)\n return false;\n loadSyncData(data.getSync_data(),node.getStorage_type());\n }\n return true;\n }", "ContactGroup getServerStoredContactListRoot();", "private void reloadGroupAppData(JsonEvents events) {\n\n\t\tAuthzManager.getPerunPrincipal(new JsonEvents() {\n\t\t\t@Override\n\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\tlocalPP = result.cast();\n\n\t\t\t\t// since this is a group initi form we know that vo and group are not null.\n\t\t\t\tRegistrarManager.initializeRegistrar(registrar.getVo().getShortName(), registrar.getGroup().getName(), new JsonEvents() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\t\t\tRegistrarObject ro = result.cast();\n\t\t\t\t\t\tregistrar.setGroupFormInitial(ro.getGroupFormInitial());\n\t\t\t\t\t\tregistrar.setGroupFormInitialException(ro.getGroupFormInitialException());\n\t\t\t\t\t\t// continue with the step\n\t\t\t\t\t\tevents.onFinished(null);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onError(PerunException error) {\n\t\t\t\t\t\t// ignore and continue with the step\n\t\t\t\t\t\tevents.onFinished(null);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onLoadingStart() {\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(PerunException error) {\n\t\t\t\t// ignore it and continue with default form init processing\n\t\t\t\tevents.onFinished(null);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onLoadingStart() {\n\t\t\t}\n\t\t});\n\n\n\t}", "private void sendGroupMessage(String message){\n\n\t\tObject[] userIDs = chatInstanceMap.keySet().toArray();\n\n\t\tfor(int i = 0; i < userIDs.length; i++ ){\n\n\t\t\tsendMessage((String) userIDs[i], message);\n\t\t}\n\t}", "@Test\n public void testGroupModification() {\n app.getNavigationHelper().gotoGroupPage();\n\n if (! app.getGroupHelper().isThereAGroup()) {//якщо не існує ні одної групи\n app.getGroupHelper().createGroup(new CreateGroupData(\"Tol-AutoCreate\", \"Tol-AutoCreate\", null));\n }\n\n //int before = app.getGroupHelper().getGroupCount(); //count groups before test\n List<CreateGroupData> before = app.getGroupHelper().getGroupList(); // quantity of group before creation\n app.getGroupHelper().selectGroup(before.size() - 1);\n app.getGroupHelper().initGroupModification();\n CreateGroupData group = new CreateGroupData(before.get(before.size()-1).getId(),\"Change1-name\", \"Change2-header\", \"Change3-footer\");\n app.getGroupHelper().fillGroupData(group);\n app.getGroupHelper().submitGroupModification();\n app.getGroupHelper().returnToGroupPage();\n //int after = app.getGroupHelper().getGroupCount();\n List<CreateGroupData> after = app.getGroupHelper().getGroupList(); // quantity of group after creation\n //Assert.assertEquals(after, before);\n Assert.assertEquals(after.size(), before.size());\n\n before.remove(before.size() - 1);\n before.add(group); //add object to the list after creation/modification of a group\n Assert.assertEquals(new HashSet<>(before), new HashSet<>(after)); //compare two lists без учета порядка\n }", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }" ]
[ "0.72026867", "0.6501201", "0.632137", "0.61671364", "0.5712368", "0.56731033", "0.5597756", "0.54533756", "0.5389426", "0.53708076", "0.5347089", "0.5341119", "0.53154016", "0.5271181", "0.52662325", "0.52431995", "0.52274394", "0.52269363", "0.5225429", "0.52135646", "0.5196004", "0.51611274", "0.5147546", "0.51403546", "0.5136684", "0.5105277", "0.51044786", "0.51024795", "0.50934535", "0.5071333", "0.506762", "0.50565183", "0.5047059", "0.50417316", "0.50374025", "0.5022885", "0.50202656", "0.50064945", "0.5006319", "0.499924", "0.49985954", "0.4990078", "0.49895284", "0.49804392", "0.4977818", "0.49690506", "0.49581215", "0.4953448", "0.49406475", "0.4928284", "0.4912465", "0.4900189", "0.48893803", "0.48878634", "0.4884151", "0.4871456", "0.48709682", "0.48665357", "0.48453662", "0.4842877", "0.48404816", "0.48362958", "0.48345548", "0.48328322", "0.48327395", "0.4818422", "0.4816473", "0.48095593", "0.48072347", "0.47960302", "0.4794272", "0.4791534", "0.4787983", "0.47850984", "0.4784166", "0.4782297", "0.47729737", "0.47729012", "0.47674537", "0.47428358", "0.4735516", "0.47293702", "0.47286853", "0.4725726", "0.47235674", "0.4719245", "0.47142673", "0.47095415", "0.47007695", "0.47002527", "0.46965912", "0.46905234", "0.46890733", "0.46821073", "0.46817878", "0.46812746", "0.4677384", "0.46721527", "0.46711427", "0.46649516" ]
0.7104806
1
Log the new app start count for the next start
private void appStartCountIncrease(int currentAppStartCount) { Prefs p = new Prefs(c); p.save("app_start_count", currentAppStartCount + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized void updateLogCount() {\n this.logCount++;\n }", "public void increase() {\r\n\t\t\tsynchronized (activity.getTaskTracker()) {\r\n\t\t\t\tactivity.getTaskTracker().count++;\r\n\t\t\t\tLog.d(LOGTAG, \"Incremented task count to \" + count);\r\n\t\t\t}\r\n\t\t}", "private void showExecutionStart() {\n log.info(\"##############################################################\");\n log.info(\"Creating a new web application with the following parameters: \");\n log.info(\"##############################################################\");\n log.info(\"Name: \" + data.getApplicationName());\n log.info(\"Package: \" + data.getPackageName());\n log.info(\"Database Choice: \" + data.getDatabaseChoice());\n log.info(\"Database Name: \" + data.getDatabaseName());\n log.info(\"Persistence Module: \" + data.getPersistenceChoice());\n log.info(\"Web Module: \" + data.getWebChoice());\n }", "public static void handleApplicationLaunch(Context context) {\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);\n\n boolean doNotRemindAgain = sharedPrefs.getBoolean(PREF_KEY_DO_NOT_REMIND_AGAIN, false);\n if (!doNotRemindAgain) {\n // Increment launch counter\n long launchCount = sharedPrefs.getLong(PREF_KEY_LAUNCH_COUNT, 0);\n launchCount++;\n Log.d(TAG, \"The application has been launched \" + launchCount + \" times.\");\n sharedPrefs.edit().putLong(PREF_KEY_LAUNCH_COUNT, launchCount).commit();\n\n // Get date of first launch\n long now = System.currentTimeMillis();\n Long dateOfFirstLaunch = sharedPrefs.getLong(PREF_KEY_DATE_OF_FIRST_LAUNCH, now);\n if (dateOfFirstLaunch == now) {\n sharedPrefs.edit().putLong(PREF_KEY_DATE_OF_FIRST_LAUNCH, now).commit();\n }\n long numberOfDaysSinceFirstLaunch = convertMillisToDays(now - dateOfFirstLaunch);\n Log.d(TAG, \"It has been \" + numberOfDaysSinceFirstLaunch + \" days since first launch\");\n\n if (numberOfDaysSinceFirstLaunch >= NUMBER_OF_DAYS_TIL_PROMPT &&\n launchCount >= NUMBER_OF_LAUNCHES_TIL_PROMPT) {\n // It's time. Ask the user to rate the app.\n showRateApplicationDialog(context, sharedPrefs);\n }\n }\n }", "private void incrementUsageCount() {\n usageCount++;\n }", "@Override\r\n\tpublic Integer getApp_activity_logins_cnt() {\n\t\treturn super.getApp_activity_logins_cnt();\r\n\t}", "public static int getNumStarted() {\n return numStarted;\n }", "private static void incrementLaunchOrder()\r\n\t{\r\n\t\tlaunchOrder++;\r\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "public int maxAppStartSeconds() {\n return maxAppStartSeconds;\n }", "private void handleAppStartFinish() {\n if (curState == 1) {\n curReclaimFailCount = 0;\n lastReclaimFailTime = -1;\n handler.removeMessages(3);\n setTargetBuffer();\n curState = 0;\n Slog.i(TAG, \"handle app start finish, reset failCount, targetBuffer:\" + targetBuffer);\n return;\n }\n Slog.e(TAG, \"invalid app start finish msg\");\n }", "@Override\n\tpublic void onApplicationEvent(ContextStartedEvent event) {\n\t\tSystem.out.println(\"start event \" + event);\n\t}", "public void setKillCount(){\n killCount = killCount + 1;\n System.out.println(\"Kill count: \"+ killCount);\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "@Scheduled(cron = \"*/2 * * * * ?\")\n public void dataCount(){\n System.out.println(\"数据统计第 \" + count++ + \" 次\");\n }", "void incrementAddedCount() {\n addedCount.incrementAndGet();\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n MobclickAgent.onPageStart(\"ACGwenDangActivity\");\n MobclickAgent.onResume(this); // 统计时长\n }", "@Override\n public void setCounterToInitialAmount() {\n UserPreferences.sharedInstance().setEventId(null);\n //reset timer to normal recording time\n timeCounter = UserPreferences.sharedInstance().recordTime() * 1000;\n }", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}", "int getActionLogCount();", "public abstract void countLaunchingActivities(int num);", "@Override\n public void start() throws MuleException {\n // Increment this counter as a demonstration.\n // Should be able to see this in mbean viewer.\n metricRegistry.counter(\"MetricAgent.start\").inc();\n }", "@Override\n protected void appStart() {\n }", "public void onStart(Application app) {\n Akka.system().scheduler().schedule(\n Duration.create(0, TimeUnit.MILLISECONDS),\n Duration.create(10, TimeUnit.SECONDS),\n new Runnable() {\n @Override\n public void run() {\n ImportMangerSystem mgr = ImportMangerSystem.getInstance();\n mgr.reportOnAllSuperVisors();\n }\n },\n Akka.system().dispatcher()\n );\n InitialData.insert();\n upgrade();\n }", "@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }", "void onStart(@Observes Startup event, ApplicationLifecycle app) {\n\n\t\tif (!newstore)\n\t\t\tapp.markAsRestart();\n\t\t\n\t}", "Response<Void> logApplicationStart(String uniqueIdentifier);", "private void updateSessionCounter(HttpSessionEvent httpSessionEvent){\n httpSessionEvent.getSession().getServletContext()\r\n .setAttribute(\"activeSession\", counter.get());\r\n LOG.info(\"Total active session are {} \",counter.get());\r\n }", "public void incrementCount() {\n count++;\n }", "public int getCountAtSessionStart() {\r\n return countAtSessionStart;\r\n }", "public static void logRevisedPromoOpenCount(int count) {\n RecordHistogram.recordCount1MHistogram(\"Search.ContextualSearchPromoOpenCount2\", count);\n }", "public void startCommandLine() {\r\n Object[] messageArguments = { System.getProperty(\"app.name.display\"), //$NON-NLS-1$\r\n System.getProperty(\"app.version\") }; //$NON-NLS-1$\r\n MessageFormat formatter = new MessageFormat(\"\"); //$NON-NLS-1$\r\n formatter.applyPattern(Messages.MainModel_13.toString());\r\n TransportLogger.getSysAuditLogger().info(\r\n formatter.format(messageArguments));\r\n }", "public void incrementCount() {\n\t\tcount++;\n\t}", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "public void honourDesiredCount() {\n int totalDeploymentCount = getDeployments().size();\n// log.info(\"[Total count] \" + totalDeploymentCount + \" [Desired Count] \" + desiredCount);\n\n while (totalDeploymentCount < desiredCount) {\n log.info(\"Scaling UP: REASON -> [Total Count] \" + totalDeploymentCount + \" < [Desired Count] \" +\n desiredCount);\n\n scaleUp(\"honourDesiredCount\");\n totalDeploymentCount = getDeployments().size();\n }\n }", "static final long getTotalStartedCount()\n {\n synchronized (threadStartLock)\n {\n return totalStartedCnt;\n }\n }", "public void addCount()\n {\n \tcount++;\n }", "@Override\n public void start() {\n runTime.reset();\n telemetry.addData(\"Run Time\", \"reset\");\n }", "@Override\r\n public int onStartCommand(Intent intent, int flag, int startId) {\r\n\r\n try {\r\n manager.clearTimeStampFile(fileName);\r\n } catch (IOException e) {\r\n //nothing\r\n }\r\n\r\n //store the first boot time to file\r\n if (recorder.isExternalStorageWritable()) {\r\n try {\r\n recorder.storeFirstTimeToFile();\r\n Log.d(TAG, \"file created successfully - first_time.csv\");\r\n } catch (FileNotFoundException e) {\r\n Log.e(TAG, \"start time file not found when storing\");\r\n } catch (IOException e) {\r\n Log.e(TAG, \"start time file io exception\");\r\n }\r\n }\r\n\r\n //get the first boot time from file\r\n long firstTime = 0;\r\n try {\r\n firstTime = recorder.getFirstTimeLong();\r\n } catch (FileNotFoundException e) {\r\n Log.e(TAG, \"start time file not found when reading\");\r\n } catch (ParseException e) {\r\n Log.e(TAG, \"parse exception when retrieving start time\");\r\n }\r\n\r\n //tell whether the current week is week1 or week2\r\n int week = 1;\r\n long current = System.currentTimeMillis();\r\n double daysOld = ((current - firstTime) / DAY_IN_MILLISECONDS);\r\n\r\n double weekDouble = daysOld / 7.0;\r\n week = (int) weekDouble + 1;\r\n\r\n //TO DO: 1. Continuously query usage stats\r\n // 2. Refer to file, add new item to file if it is not duplicate with the last item from the file\r\n Log.d(TAG, \"start running on start command of main service\");\r\n Context context = getApplicationContext();\r\n UsageStatsManager usm = (UsageStatsManager) context.getSystemService(Context.USAGE_STATS_SERVICE);\r\n\r\n List<UsageStats> applist = usm.queryUsageStats(UsageStatsManager.INTERVAL_BEST, current - 60 * 60 * 1000, current);\r\n Log.d(TAG, \"queried past history for an hour\");\r\n //for a 10 seconds running, we only need the newest one app, which is the index 0\r\n UsageStats app = null;\r\n try {\r\n for(UsageStats a : applist){\r\n Log.e(TAG, \"app is: \" + a.getPackageName());\r\n }\r\n app = applist.get(0);\r\n } catch (IndexOutOfBoundsException e) {\r\n return START_STICKY;\r\n }\r\n\r\n //get the launch time for this app\r\n long launchTime = app.getLastTimeStamp();\r\n String pkgName = app.getPackageName();\r\n String timeStr = dateFormat.format(launchTime);\r\n\r\n String lastPkgName = \"\";\r\n //check for the last item from file, add it if not duplicate\r\n try {\r\n lastPkgName = manager.getNewestPkgName(fileName);\r\n Log.d(TAG, \"the last package item from file got\");\r\n } catch (FileNotFoundException e) {\r\n Log.e(TAG, \"app timestamp file not existed\");\r\n } catch (IndexOutOfBoundsException e) {\r\n return START_STICKY;\r\n }\r\n\r\n Log.d(TAG, \"package name is: \" + pkgName);\r\n\r\n applist.sort(new Comparator<UsageStats>() {\r\n @Override\r\n public int compare(UsageStats u1, UsageStats u2) {\r\n if(u1.getLastTimeStamp() > u2.getLastTimeStamp()){\r\n return 1;\r\n } else if (u1.getLastTimeStamp() < u2.getLastTimeStamp()) {\r\n return -1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n });\r\n\r\n if (!pkgName.equals(lastPkgName)) {\r\n //add to file\r\n try {\r\n for (int i = 0; i < applist.size(); i++) {\r\n \t\tmanager.updateAppTimeStampFile(fileName, new AppTimeStamp(dateFormat.format(applist.get(i).getLastTimeStamp()), applist.get(i).getPackageName()));\r\n \t}\r\n Log.d(TAG, \"package names added to file\");\r\n } catch (IOException e) {\r\n Log.e(TAG, \"io exception: cannot update the file\");\r\n }\r\n } else {\r\n \ttry {\r\n \t\tfor (int j = 1; j < applist.size(); j++) {\r\n \t\t\tmanager.updateAppTimeStampFile(fileName, new AppTimeStamp(dateFormat.format(applist.get(j).getLastTimeStamp()), applist.get(j).getPackageName()));\r\n \t\t}\r\n \t\tLog.d(TAG, \"package names added to file\");\r\n \t} catch (IOException e) {\r\n \t\tLog.e(TAG, \"io exception: cannot update the file\");\r\n \t}\r\n }\r\n\r\n\r\n /** The following is for duration rating file */\r\n //get the hour from current time\r\n String currentStr = dateFormat.format(current);\r\n\r\n if (current >= lastUpdateTime + 30 * 1000) {\r\n\r\n String hourStr = currentStr.split(\" \")[1].split(\":\")[0];\r\n\r\n String period = \"\";\r\n\r\n if (hourStr.equals(\"06\") || hourStr.equals(\"07\") || hourStr.equals(\"08\") || hourStr.equals(\"09\") || hourStr.equals(\"10\")) {\r\n //morning\r\n //add ten seconds to file\r\n //in final UI, convert those seconds from file to hours for view by users\r\n period = \"morning\";\r\n } else if (hourStr.equals(\"11\") || hourStr.equals(\"12\") || hourStr.equals(\"13\")) {\r\n //noon\r\n //add ten seconds\r\n period = \"noon\";\r\n } else if (hourStr.equals(\"14\") || hourStr.equals(\"15\") || hourStr.equals(\"16\") || hourStr.equals(\"17\")) {\r\n //afternoon\r\n period = \"afternoon\";\r\n } else if (hourStr.equals(\"18\") || hourStr.equals(\"19\") || hourStr.equals(\"20\") || hourStr.equals(\"21\") || hourStr.equals(\"22\")) {\r\n //evening\r\n period = \"evening\";\r\n } else {\r\n //late night\r\n //add ten seconds to file\r\n period = \"night\";\r\n }\r\n\r\n try {\r\n manager.updateDurationFile(durationFileName, week, period, 30);\r\n manager.updateDurationFile(durationFileName, week, \"total\", 30);\r\n } catch (UnsupportedEncodingException e) {\r\n Log.e(TAG, \"unsupported encoding exception while updating duration file\");\r\n } catch (FileNotFoundException e) {\r\n Log.e(TAG, \"duration file not found\");\r\n }\r\n\r\n //update the lastUpdateTime variable\r\n lastUpdateTime = current;\r\n Log.d(TAG, \"updated duration.csv\");\r\n }\r\n /** Above is for duration file */\r\n\r\n\r\n /** The following is for app rating file */\r\n long current2 = System.currentTimeMillis();\r\n if (current2 - lastUpdateRating > 30 * 1000) {\r\n List<UsageStats> apps = usm.queryUsageStats(UsageStatsManager.INTERVAL_BEST, current - 30 * 1000, current);\r\n\r\n\r\n for (UsageStats u : apps) {\r\n try {\r\n manager.updateApp(u, ratingFileName);\r\n } catch (IOException e) {\r\n Log.e(TAG, \"IO Exception when updating app rating file\");\r\n }\r\n }\r\n lastUpdateRating = current2;\r\n }\r\n /** Above is for app rating file */\r\n\r\n\r\n /** The following is for logcat file */\r\n long current3 = System.currentTimeMillis();\r\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n if (current3 >= lastUpdateTimeLogcat + 1 * 60 * 1000) {\r\n try {\r\n String currentTime = df.format(current3);\r\n String requiredTime = currentTime.substring(5,15);\r\n\r\n Process process = Runtime.getRuntime().exec(\"logcat -d\");\r\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\r\n StringBuilder log = new StringBuilder();\r\n String line;\r\n while((line = bufferedReader.readLine()) != null) {\r\n if (line.contains(requiredTime) && !line.contains(\"app is:\")) {\r\n log.append(line);\r\n log.append(\"\\n\");\r\n }\r\n }\r\n\r\n //Convert log to string\r\n final String logString = new String(log.toString());\r\n\r\n //Create txt file in SD Card\r\n File file = new File(Environment.getExternalStorageDirectory(), \"logcat.txt\");\r\n\r\n //To write logcat in text file\r\n PrintWriter writer = new PrintWriter(file);\r\n\r\n //Writing the string to file\r\n writer.write(logString);\r\n writer.flush();\r\n writer.close();\r\n } catch(FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch(IOException e) {\r\n e.printStackTrace();\r\n }\r\n lastUpdateTimeLogcat = current3;\r\n }\r\n /** Above is for logcat file */\r\n\r\n\r\n //use alarm to ensure the service is running every 10 seconds\r\n AlarmManager alarms = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);\r\n Intent someIntent = new Intent(this, MainService.class);\r\n PendingIntent alarmIntent = PendingIntent.getService(this, 1111, someIntent, PendingIntent.FLAG_CANCEL_CURRENT);\r\n alarms.setExact(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 60 * 1000, alarmIntent);\r\n Log.e(TAG, \"Start the service alarm set\");\r\n\r\n try {\r\n Thread.sleep(10 * 1000);\r\n } catch (InterruptedException e) {\r\n //nothing\r\n }\r\n\r\n return START_STICKY;\r\n }", "@Override\n public void stepCount(long step, int timestamp) {\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\tcom.facebook.AppEventsLogger.activateApp(HomeActivity.this, \"312401348947190\");\n\t}", "public void mo23021d() {\n this.f26122b.edit().putLong(\"last.refresh.otherapp\", System.currentTimeMillis()).apply();\n }", "void startSectionCB(int classType) {\n instances_[classType].logNum++;\n instances_[classType].logTotal++;\n }", "@Override\n public void onStart() {\n super.onStart();\n GoogleAnalytics.getInstance(this).reportActivityStart(this);\n }", "public void IncrementCounter()\r\n {\r\n \tif (startAtUsed==false\r\n \t\t\t|| (!counter.encounteredAlready)) {\r\n \t\t// Defer setting the startValue until the list\r\n \t\t// is actually encountered in the main document part,\r\n \t\t// since otherwise earlier numbering (using the\r\n \t\t// same abstract number) would use this startValue\r\n \tcounter.setCurrentValue(this.startValue); \r\n \tlog.debug(\"not encounteredAlready; set to startValue \" + startValue);\r\n \tcounter.encounteredAlready = true;\r\n \tstartAtUsed = true;\r\n \t}\r\n counter.IncrementCounter();\r\n }", "public void increment() {\n mNewNotificationCount.setValue(mNewNotificationCount.getValue() + 1);\n }", "public void startApp()\r\n\t{\n\t}", "public void incrementActiveRequests() \n {\n ++requests;\n }", "public void trackStart(String id) {\n mStartTimes.put(id, SystemClock.uptimeMillis());\n }", "private void incrementGcCounter() {\n if (null == PSAgentContext.get().getMetrics()) {\n return; // nothing to do.\n }\n long elapsedGc = getElapsedGc();\n long totalGc = 0;\n String gc_time = PSAgentContext.get().getMetrics().get(AngelCounter.GC_TIME_MILLIS);\n if (gc_time != null) {\n totalGc = elapsedGc + Long.parseLong(gc_time);\n } else {\n totalGc = elapsedGc;\n }\n PSAgentContext.get().getMetrics().put(AngelCounter.GC_TIME_MILLIS, Long.toString(totalGc));\n }", "Long getRunningCount();", "private void start(){\n\t\tMetricData metric = new MetricData();\n\t\tmetric.getName();\n\t\tmetric.getValue();\n\t\tmetric.setValue(2);\n\t}", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "public void countTimer() {\n\t\t\n\t\ttimerEnd = System.currentTimeMillis();\n\t}", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "public void addNumOfActionTaken() {\n this.numOfActionTaken++;\n }", "public static void displayMsg() {\n\t\tSystem.out.println(\"Welcome Visit Count \"+count++);\n\t}", "private void startCounter() {\n\t\tThread t = new Thread(new Runnable(){\n\t\t\t//@Override\n\t\t\tpublic void run() {\n\t\t\t\tInteger counter = 0;\n\t\t\t\tint step = 1;\n\t\t\t\twhile (true) {\n\t\t\t\t\tjLabel3.setText(counter.toString());\n\t\t\t\t\ttry {\n\t\t\t\t\t\t/* Put thread to sleep for 1 sec */\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tcounter = counter + step;\n\t\t\t\t\tif (counter == 0 || counter == 9)\n\t\t\t\t\t\tstep = step * -1;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}", "public final synchronized int incrementOpenCount() {\n\t\tm_openCount++;\n\t\t\n\t\t//\tDebug\n\t\t\n//\t\tif ( m_openCount > 1)\n//\t\t\tDebug.println(\"@@@@@ File open name=\" + getPath() + \", count=\" + m_openCount);\n\t\treturn m_openCount;\n\t}", "protected long logTestStart(String methodName) {\n\t\tString startTimeString = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\").format(new Date());\n\t\tlogEntry(\"*** START \" + methodName + \": \" + testProperties.getEnvironmentName() + \" / \" + browser + \" / \"\n\t\t\t\t+ startTimeString);\n\t\treturn System.nanoTime();\n\t}", "public void incrementNumAddRequests() {\n this.numAddRequests.incrementAndGet();\n }", "private synchronized static void upCount() {\r\n\t\t++count;\r\n\t}", "public StartCount() {\n\tint pass = 4;\n\tboolean heard = false;\n\tIterator iter;\n\n\ttry {\n\t \n\t \n\t aif.open();\n\t aif.registerHandler(this, kCOUNT_MESSAGE);\n\t \n\t while (true) {\n\t\tSystem.out.println(\"Start of Epoch\");\n\t\tif (pass++ > 2) {\n\n\t\t countMessage[LEVEL_BYTE] = 0;\n\t\t countMessage[COUNT_BYTE] = 0;\n\t\t countMessage[REMAINING_TIME_LO_BYTE] = 64;\n\t\t aif.sendAM(countMessage, kCOUNT_MESSAGE, (short)0xFFFF);\n\t\t pass = 0;\n\t\t}\n\t\tThread.currentThread().sleep(2000);\n\t\titeration++;\n\t\t//if (epochCount > 0) heard = true;\n\t\titer = counts.values().iterator();\n\t\tepochCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t CountReport cr = (CountReport)iter.next();\n\t\t if (iteration - cr.iteration > 8) iter.remove();\n\t\t else epochCount += cr.count;\n\t\t}\n\t\tSystem.out.println(\"End of Epoch, Count = \" + epochCount);\n\n\n\n\t }\n\n\t \n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t}\n }", "private void updateNumberOfConnections(int delta)\n\t{\n\t\tint count = numberOfConnections.addAndGet(delta);\t\t\n\t\tLOG.debug(\"Active connections count = {}\", count);\n\t}", "private void logCurrentSensorEntriesBatch() {\n\t\tentriesRecorded++;\n\n\t\tint targetBatchSize = Constants.MS_FREQUENCY_FOR_CAMERA_CAPTURE / Constants.MS_INS_SAMPLING_FREQUENCY;\n\n\t\tArrayList<SensorEntry> toProcess = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(0, targetBatchSize));\n\t\tthis.sensorEntryBatch = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(targetBatchSize,\n\t\t\t\ttargetBatchSize));\n\n\t\tthis.writeBatchToFile(toProcess);\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tcounter = 0;\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tcounter = counter + 1;\n\t\t\t\tLog.d(\"SvcCounter\", Integer.toString(counter));\n\t\t\t\tIntent counterValue = new Intent(\"CounterValue\");\n\n\t\t\t\tcounterValue.putExtra(\"cValue\", counter);\n\t\t\t\tsendBroadcast(counterValue);\n\t\t\t}\n\t\t};\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(timerTask, delay = 2000, period = 5000);\n\t\tsuper.onCreate();\n\t}", "private AppTimer() {\n\t\tstart();\n\t}", "private void startTimer(int startValue) {\n counts = startValue;\n timerTask = new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n counts++;\n TextView score = (TextView) findViewById(R.id.Score);\n score.setText(\"Time: \"+counts);\n boardManager.setLastTime(counts);\n saveToFile(\"save_file_\" +\n Board.NUM_COLS + \"_\" + LoginActivity.currentUser);\n }\n });\n }\n };\n timer.scheduleAtFixedRate(timerTask, new Date(), 1000);\n }", "public void resetRunCount() {\n\n }", "LogTailer startTailing();", "@Override\n public void start(int totalTasks) {\n }", "public int start() {\n return start;\n }", "private static void incrementFlightTakeOffCounter()\r\n\t{\r\n\t\tflightTakeOffCounter++;\r\n\t}", "private void reactMain_region_digitalwatch_Time_counting_Counting() {\n\t\tif (timeEvents[0]) {\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 0);\n\n\t\t\ttimer.setTimer(this, 0, 1 * 1000, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseTimeByOne();\n\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.main_region_digitalwatch_Time_counting_Counting;\n\t\t}\n\t}", "@Override\n\tprotected void onStart() {\n\t\tSystem.out.println(\"onStart\");\n\t}", "@Override\n\tpublic void onApplicationEvent(ContextRefreshedEvent event) {\n\t\tlogger.info(\"XD Home: \" + environment.resolvePlaceholders(\"${XD_HOME}\"));\n\t\tlogger.info(\"Transport: \" + environment.resolvePlaceholders(\"${XD_TRANSPORT}\"));\n\t\tlogHadoopDistro();\n\t\tlogConfigLocations();\n\t\tif (isContainer) {\n\t\t\tlogContainerInfo();\n\t\t}\n\t\telse {\n\t\t\tlogAdminUI();\n\t\t}\n\t\tlogZkConnectString();\n\t\tlogZkNamespace();\n\t\tlogger.info(\"Analytics: \" + environment.resolvePlaceholders(\"${XD_ANALYTICS}\"));\n\t\tif (\"true\".equals(environment.getProperty(\"verbose\"))) {\n\t\t\tlogAllProperties();\n\t\t}\n\t}", "private void eventLookupStarted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter++;\n\t\t}\n\t}", "public static long getStartupTime() {\n return startupTime;\n }", "private void incrConnectionCount() {\n connectionCount.inc();\n }", "public static void main(String[] args) {\n\t\r\n\tlogger.info(\"{}\" , addDay(new Date(),1));\r\n\t\r\n}", "public long getStarted () {\n\treturn started;\n }", "void incrementCount();", "protected AppLoggingNVPairs addTimingAndMachineApplogInfo(\n AppLoggingNVPairs appLogPairs, long startTime)\n {\n // Processing time\n\n if (startTime > 0) {\n long endTime = System.currentTimeMillis();\n double totalTime = ((endTime - startTime) / 1000.0);\n appLogPairs.addInfo(\"TotalProcessingTimeSecs\", String.valueOf(totalTime));\n }\n\n // Machine Name/Server Name\n\n String machineInfo = AppUtilities.buildServerName();\n if (machineInfo != null && machineInfo.length() > 0) {\n appLogPairs.addInfo(\"ProcessingMachineInfo\", machineInfo);\n }\n\n return appLogPairs;\n }", "public static void addSaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter6 = prefs.getInt(saveCounter6, 0);\n SaveCounter6 = SaveCounter6 + SaveInc;\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "public int getRunCount() {\n return runCount;\n }", "public void onStarted(long startedTime);", "public void increment() {\n\t\tsynchronized (this) {\n\t\t\tCounter.count++;\n\t\t\tSystem.out.print(Counter.count + \" \");\n\t\t}\n\t\n\t}", "@Override\r\n\tpublic Integer getActivity_logins_cnt() {\n\t\treturn super.getActivity_logins_cnt();\r\n\t}", "public void incFileCount(){\n\t\tthis.num_files++;\n\t}", "public void increaseEntered() {\n numTimesEntered++;\n }", "@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}", "public void trackNewSession() {\n if(isTelemetryEnabled()){\n new CreateDataTask(CreateDataTask.DataType.NEW_SESSION).execute();\n }\n }", "@Override\n public void onRestart() {\n super.onRestart();\n Log.d(Constants.ERROR_TAG_ACTIVITY_ONE, Constants.ON_RESTART);\n }", "public void incrementCount(){\n count+=1;\n }", "public static void addSaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter5 = prefs.getInt(saveCounter5, 0);\n SaveCounter5 = SaveCounter5 + SaveInc;\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}", "public void addConsecutiveLoginAttempts(){\n\t\tconsecutiveLoginAttempts++;\t\n\t}" ]
[ "0.64127094", "0.5903771", "0.57905823", "0.5705616", "0.56399536", "0.5631528", "0.56236255", "0.5566117", "0.55437326", "0.55359524", "0.5517261", "0.5483074", "0.54343826", "0.5433432", "0.541366", "0.5376347", "0.5360208", "0.5342474", "0.5333076", "0.53041744", "0.53034776", "0.5298434", "0.52943605", "0.52831715", "0.52830017", "0.52717036", "0.5257249", "0.5255041", "0.5244111", "0.52334166", "0.5232992", "0.5224272", "0.52067566", "0.5196618", "0.51866025", "0.517746", "0.5146736", "0.5140899", "0.51362294", "0.5102614", "0.509258", "0.50852036", "0.50848866", "0.50801134", "0.5057132", "0.50556725", "0.5055395", "0.50371933", "0.5034126", "0.50268525", "0.5026755", "0.5015744", "0.5010781", "0.5007793", "0.5000685", "0.49984416", "0.49964362", "0.49952617", "0.49933082", "0.49906233", "0.49892285", "0.49670175", "0.49591437", "0.49538952", "0.49486345", "0.4946337", "0.49449688", "0.49294063", "0.4929285", "0.49264038", "0.4924351", "0.4920364", "0.4920303", "0.49154958", "0.49099112", "0.4907905", "0.49065804", "0.49015352", "0.489918", "0.48968425", "0.48934612", "0.48884928", "0.4885787", "0.48852646", "0.48812386", "0.48769552", "0.48748752", "0.48690474", "0.48657686", "0.4865749", "0.48597008", "0.48531976", "0.48521695", "0.48517168", "0.48459446", "0.48455125", "0.48339963", "0.482686", "0.48267248", "0.4826554" ]
0.7507104
0
Show the remind to rate dialog. Any checks whether or not it should be showed must be done before calling this method
private void showRemindRateDialog() { final Dialog remindDialog = new Dialog(c); remindDialog.setTitle(R.string.remind_rate_dialog_title); remindDialog.setContentView(R.layout.dialog_remind_to_rate); TextView tvStartCount = (TextView) remindDialog .findViewById(R.id.tvRemindStartCount); tvStartCount.setText(DResources.getString(c, R.string.remind_rate_dialog_content)); Button bOpenMarket = (Button) remindDialog .findViewById(R.id.bOpenMarket); TextView tvHidePermanently = (TextView) remindDialog .findViewById(R.id.tvRemindHidePermanently); class ButtonListener implements OnClickListener { public void onClick(View v) { switch (v.getId()) { case R.id.tvRemindHidePermanently: // Never remind to rate anymore Prefs p = new Prefs(c); p.save("already_rated_app", true); break; case R.id.bOpenMarket: try { DApp.openGooglePlayStore(c); } catch (DException e) { e.printStackTrace(); } break; } remindDialog.dismiss(); } } // Setup the click listeners for the buttons inside the remind dialog bOpenMarket.setOnClickListener(new ButtonListener()); tvHidePermanently.setOnClickListener(new ButtonListener()); remindDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void display() {\r\n dlgRates.show();\r\n }", "public static void showRateDialog() {\n dialog = new Dialog(mContext, android.R.style.Theme_DeviceDefault_Dialog_NoActionBar);\n\n LayoutInflater inflater = mContext.getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_apprater, null);\n TextView notnow = rootView.findViewById(R.id.notnow);\n final TextView rate = rootView.findViewById(R.id.rate);\n final LinearLayout reviewcntr = rootView.findViewById(R.id.reviewcntr);\n final LinearLayout playstoreCntr = rootView.findViewById(R.id.playstoreCntr);\n final RatingBar star = rootView.findViewById(R.id.star);\n final LinearLayout myratecontanr = rootView.findViewById(R.id.myratecontanr);\n final EditText review = rootView.findViewById(R.id.review);\n rate.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Configs.sendHitEvents(Configs.APP_RATER, Configs.CATEGORIA_ANALYTICS, \"Clique\", \"Avaliar\", mContext);\n if (rate.getText().toString().contains(\"PLAY STORE\")) {\n mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"market://details?id=\" + PACKAGE_NAME)));\n delayDays(365);\n delayLaunches(1000);\n dialog.dismiss();\n } else if (star.getRating() > 4f && reviewcntr.getVisibility() == View.GONE) {\n star.setIsIndicator(true);\n playstoreCntr.setVisibility(View.VISIBLE);\n // myratecontanr.setVisibility(View.INVISIBLE);\n rate.setText(\"PLAY STORE\");\n delayDays(180);\n delayLaunches(360);\n } else if (star.getRating() > 0f && reviewcntr.getVisibility() == View.GONE) {\n reviewcntr.setVisibility(View.VISIBLE);\n delayDays(180);\n delayLaunches(360);\n\n } else if (star.getRating() > 0f && reviewcntr.getVisibility() == View.VISIBLE) {\n Toast.makeText(mContext, \"Thank You!\", Toast.LENGTH_SHORT).show();\n String feedback = \"Star:\" + star.getRating() + \"Rev:\" + review.getText();\n feedback = feedback.replaceAll(\"'\", \" \");\n feedback = feedback.replaceAll(\"\\\"\", \" \");\n String json1 = \"{'FEEDBACK':'\" + feedback + \"'}\";\n loadData(json1, Constant.FEEDBACK_API);\n delayDays(180);\n delayLaunches(360);\n dialog.dismiss();\n\n } else {\n Toast.makeText(mContext, \"Please select star.\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n });\n\n notnow.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Configs.sendHitEvents(Configs.APP_RATER, Configs.CATEGORIA_ANALYTICS, \"Clique\", \"Avaliar Mais Tarde\", mContext);\n delayDays(180);\n delayLaunches(360);\n dialog.dismiss();\n }\n });\n\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.show();\n // dialog.setContentView(rootView);\n dialog.setCanceledOnTouchOutside(true);\n\n dialog.setContentView(rootView);\n dialog.show();\n }", "@Override\n public void showRatingDialog() {\n showRatingDialog(0);\n }", "public boolean AskRate() {\n return Rate.rateWithCounter(getActivity(), getResources().getInteger(R.integer.rate_shows_after_X_starts), getResources().getString(R.string.rate_title), getResources().getString(R.string.rate_text), getResources().getString(R.string.unable_to_reach_market), getResources().getString(R.string.Alert_accept), getResources().getString(R.string.Alert_cancel));\n\n }", "private void showRewardDialog() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\taddRewardDialogue = RewardsDialogFragment.newInstance(\"Some Title\");\n\t\taddRewardDialogue.show(fm, \"fragment_edit_task\");\n\t}", "public void showRating() {\n rate = new RateMyApp(this, getResources().getString(R.string.app_name), 0, 4);\n \n //make all text white\n rate.setTextColor(Color.WHITE);\n \n //set a custom message\n// rate.setMessage(getResources().getString(R.string.like_rate));\n \n //set a custom text size\n rate.setTextSize(16);\n rate.start();\n\t}", "private void showLoserDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"You Have Been Defeated \" + player1.getName() + \",Computer Wins!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Try Again?\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/bronze.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Computer Wins\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "private void showPatternDetectPeroidDialog() {\r\n\r\n\t\tRadioListDialogFragment inputFragment = RadioListDialogFragment.newInstance(\r\n\t\t\t\tR.string.setting_pattern_password_detect, R.array.pattern_detect_peroid, new NineDaleyOnItemClickListener(), \"nine\");\r\n\t\tint i = getSelectedNineDelay();\r\n\t\tinputFragment.setSelectedPosition(i);\r\n\t\tinputFragment.setShowsDialog(false);\r\n\t\tgetActivity().getSupportFragmentManager().beginTransaction()\r\n\t\t.add(inputFragment, \"nineDelayFragment\").addToBackStack(null).commit();\r\n\t}", "private void correctDialog() {\n // Update score.\n updateScore(scoreIncrease);\n\n // Show Dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Correct! This Tweet is \" + (realTweet ? \"real\" : \"fake\"));\n //builder.setPositiveButton(\"OK\", (dialog, which) -> chooseRandomTweet());\n builder.setOnDismissListener(unused -> chooseRandomTweet());\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void showResult() {\n mTvErrorMessage.setVisibility(View.INVISIBLE); // set the visibility of the error message to invisible\n mCryptoRecyclerView.setVisibility(View.VISIBLE); // set the visibility of the recycler to visible\n }", "@Override\n public void showRatingDialog(int existingRating) {\n // Inflate view for Ratings Dialog.\n LayoutInflater li = LayoutInflater.from(getContext());\n View rateMeDialogView = li.inflate(R.layout.dialog_rate_me, null);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n getContext());\n\n // set our custom inflated view to alert dialog builder.\n alertDialogBuilder.setView(rateMeDialogView);\n\n // create alert dialog\n final AlertDialog alertDialog = alertDialogBuilder.create();\n\n // Initialize views.\n ratingBar = rateMeDialogView.findViewById(R.id.rating_bar);\n Button okButton = rateMeDialogView.findViewById(R.id.button_submit);\n Button cancelButton = rateMeDialogView.findViewById(R.id.button_cancel);\n\n // Pre-set rating in rating bar.\n if (existingRating > 0) {\n ratingBar.setRating(existingRating);\n }\n\n // Bind views.\n okButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n presenter.rateGif(gif, (int)ratingBar.getRating());\n dismissDialog(alertDialog);\n }\n });\n\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismissDialog(alertDialog);\n }\n });\n\n alertDialog.show();\n }", "private void alertDialoge() {\n builder.setMessage(R.string.dialoge_desc).setTitle(R.string.we_request_again);\n\n builder.setCancelable(false)\n .setPositiveButton(R.string.give_permissions, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n requestPermission();\n }\n })\n .setNegativeButton(R.string.dont_ask_again, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'Don't Ask Again' Button\n // the sharedpreferences value is true\n editor.putBoolean(getResources().getString(R.string.dont_ask_again), true);\n editor.commit();\n dialog.cancel();\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n alert.show();\n }", "public void show() {\r\n isOkPressed = false;\r\n\r\n dialog = RitDialog.create(context);\r\n dialog.setTitle(\"Inline Method\");\r\n dialog.setContentPane(contentPanel);\r\n\r\n buttonOk.requestFocus();\r\n\r\n HelpViewer.attachHelpToDialog(dialog, buttonHelp, \"refact.inline_method\");\r\n SwingUtil.initCommonDialogKeystrokes(dialog, buttonOk, buttonCancel, buttonHelp);\r\n\r\n dialog.show();\r\n }", "private void showCredits() {\n //show credit information\n //source: https://stackoverflow.com/questions/6264694/how-to-add-message-box-with-ok-button\n final AlertDialog.Builder dlgAlert = new AlertDialog.Builder(context);\n dlgAlert.setMessage(R.string.credits);\n dlgAlert.setTitle(\"Credits\");\n dlgAlert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //for dismissing the dialog there is no action necessary\n }\n });\n dlgAlert.setCancelable(true);\n dlgAlert.create().show();\n }", "private void showPassRatingDialog(final String rid, final String rideType) {\n //this dialog will contain an input field so need to declare it\n final EditText passRatingInput = new EditText(this);\n\n //need to set the custom dialog for the user using my own style not androids default one\n final AlertDialog passRatingDialog = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.NavAlerts)).create();\n passRatingDialog.setMessage(\"Rate your Driver (0-5)\");\n passRatingDialog.setButton(AlertDialog.BUTTON_POSITIVE,\"SUBMIT RATING\",new DialogInterface.OnClickListener(){\n @Override\n public void onClick(DialogInterface dialog, int in) {\n String ratingAsString;\n final int ratingAsInt;\n ratingAsString = passRatingInput.getText().toString();\n ratingAsInt = Integer.parseInt(ratingAsString);\n if(ratingAsInt >= 0 && ratingAsInt <= 5){\n DocumentReference rideRef = dataStore.collection(\"OfferedRides\").document(rid);\n rideRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n DocumentSnapshot rideDoc = task.getResult();\n if (rideDoc.exists()) {\n DocumentReference driverDocRef = dataStore.collection(\"users\").document(rideDoc.getString(\"offeredBy\"));\n driverDocRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n DocumentSnapshot userDoc = task.getResult();\n if (userDoc.exists()) {\n //need to update the rating once it has been submitted\n UpdateRating(userDoc.getString(\"user-id\"), userDoc.getLong(\"rating\"), userDoc.getLong(\"amountOfRatings\"), ratingAsInt, rideType);\n } else {\n Log.d(TAG, \"No such document\");\n }\n } else {\n Log.d(TAG, \"get failed with \", task.getException());\n }\n }\n });\n } else {\n Log.d(TAG, \"No such document\");\n }\n } else {\n Log.d(TAG, \"get failed with \", task.getException());\n }\n }\n });\n }else{\n //if there was an error dismiss the rating dialog and show an error dialog\n passRatingDialog.dismiss();\n AlertDialog errorMessageDialog = new AlertDialog.Builder(new ContextThemeWrapper(MainActivity.this, R.style.NavAlerts)).create();\n errorMessageDialog.setMessage(\"Enter a number from 0-5\");\n errorMessageDialog.setButton(AlertDialog.BUTTON_POSITIVE,\"OK\",new DialogInterface.OnClickListener(){\n @Override\n public void onClick(DialogInterface dInterface, int num) {\n showPassRatingDialog(rid, rideType);\n }\n });\n\n errorMessageDialog.setCancelable(false);\n errorMessageDialog.show();\n }\n }\n });\n\n //need to create linear layout which will contain the text input\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);\n //the input should fill the alert dialog box\n passRatingInput.setLayoutParams(lp);\n passRatingDialog.setView(passRatingInput);\n\n //I need to set the text inputs theme programmatically since there is no view in xml created for it\n ColorStateList csList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.colorAccent));\n ViewCompat.setBackgroundTintList(passRatingInput, csList);\n passRatingInput.setTextColor(csList);\n\n passRatingDialog.setCancelable(false);\n passRatingDialog.show();\n }", "@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}", "private void showSubmitRatingDialog() {\n ServiceSubmitRatingDialog submitRatingDialog = ServiceSubmitRatingDialog.getInstance(0.0f,\n this, mServiceStation);\n Utils.showDialogFragment(getFragmentManager(), submitRatingDialog,\n \"submit_rating_dialog\");\n }", "private void showNoSpeedNumberDialog(int numId) {\n int numKey = numId + 2;\n String dialogTxt = getString(R.string.is_set_speed, String.valueOf(numKey));\n final Activity thisActivity = getActivity();\n new AlertDialog.Builder(thisActivity).setTitle(R.string.dialog_title).setMessage(dialogTxt)\n .setPositiveButton(android.R.string.ok,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n //go to speed dial setting screen, in this screen, the user can set speed dial number.\n Intent intent = new Intent(thisActivity, SpeedDialListActivity.class);\n startActivity(intent);\n }\n }).setNegativeButton(android.R.string.cancel,null)\n .show();\n }", "public void showVerifyTravelExpenseDialog() {\n\n\t\t\tverifyTravelExpenseDialogBox = new DialogBox(true);\n\t\t\tverifyTravelExpenseDialogBox.setGlassEnabled(true);\n\t\t\tverifyTravelExpenseDialogBox.setText(\"Comprobación de Viáticos.\");\n\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"400px\", \"100px\");\n\t\t\tverifyTravelExpenseDialogBox.setWidget(vp);\n\n\t\t\tUiRequisitionCheekingCostsForm uiRequisitionCheekingCostsForm = new UiRequisitionCheekingCostsForm(getUiParams(), vp, bmoRequisition);\n\t\t\tuiRequisitionCheekingCostsForm.show();\n\n\t\t\tverifyTravelExpenseDialogBox.center();\n\t\t\tverifyTravelExpenseDialogBox.show();\n\t\t}", "public void viewAlarm() {\n\t\tfinal Dialog dialog = new Dialog(this);\n\t\tdialog.setContentView(R.layout.date_time_picker);\n\t\tdialog.setTitle(\"Set Reminder\");\n\t\tButton saveDate = (Button)dialog.findViewById(R.id.btnSave);\n\t\tsaveDate.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t\tsetAlarm(dialog);\n\t\t\t}\n\t\t});\n\t\tdialog.show();\n\t}", "private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void showbadgedialog() {\n final LayoutInflater li = LayoutInflater.from(mContext);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dialog_badges, null);\n // number=session.getMobileNumber();\n //Initizliaing confirm button fo dialog box and edittext of dialog box\n final Button buttonconfirm = (Button) confirmDialog.findViewById(R.id.buttonConfirm);\n\n\n AlertDialog.Builder alert = new AlertDialog.Builder(mContext);\n\n alert.setView(confirmDialog);\n\n final AlertDialog alertDialog = alert.create();\n alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n alertDialog.show();\n\n //On the click of the confirm button from alert dialog\n buttonconfirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n }\n });\n\n }", "public void ratedPositive(View arg0){\r\n\t\t/*\tif (!checkiFRated(1)){\r\n\t\t\tToast.makeText(ShowAnswerActivity.this,\"RATED POSSITIVE\",\tToast.LENGTH_SHORT).show();\r\n\t\t\trates++;\r\n\t\t\ttxtview_Rates.setText(String.valueOf(rates));\t\r\n\t\t\tsetRate(1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tToast.makeText(ShowAnswerActivity.this,\"YOU ALREADY RATED THIS ANSWER\",\tToast.LENGTH_SHORT).show();\r\n\t\t}\t*/\r\n\t\t//\tanimation = new WaitingAnimation(this);\r\n\t\t//\tanimation.execute();\r\n\r\n\t}", "public void doubleRevealWin() {\n AlertDialog.Builder builder = new AlertDialog.Builder(game_activity_fb.this);\n\n builder.setCancelable(false);\n builder.setTitle(\"You Won!\");\n builder.setMessage(\"You can now double reveal \" + UserName + \"!\" +\n \" \" +\n \"Do you want to double reveal?\");\n\n\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }\n });\n\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent challintent = new Intent(game_activity_fb.this, reveal_activity_test.class);\n startActivity(challintent);\n overridePendingTransition(0, 0);\n }\n });\n builder.show();\n\n }", "public void askUserToRateApp(final Context context) {\n\t\tnew AlertDialog.Builder(context)\n\t\t\t\t.setTitle(\"Please Rate Me\")\n\t\t\t\t.setMessage(\"If you find this app useful, please support the developers by rating it 5 stars on Google Play.\")\n\t\t\t\t.setPositiveButton(\"Rate Now\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\t\t\tlaunchAppInGooglePlay(context);\n\t\t\t\t\t}\n\t\t\t\t}).setNegativeButton(\"Rate Later\", null).show();\n\t}", "private void showMuteMessage() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.mute_msg_text);\n builder.setCancelable(false);\n builder.setNegativeButton(R.string.mute_msg_no, this);\n builder.setPositiveButton(R.string.mute_msg_yes, this);\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "private void showDriverRatingDialog(final String rid, final String rideType) {\n //this dialog will contain an input field so need to declare it\n final EditText driverRatingInput = new EditText(this);\n\n //need to set the custom dialog for the user using my own style not androids default one\n final AlertDialog driverRatingDialog = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.NavAlerts)).create();\n driverRatingDialog.setMessage(\"Rate your Passengers (0-5)\");\n driverRatingDialog.setButton(AlertDialog.BUTTON_POSITIVE,\"SUBMIT RATING\", new DialogInterface.OnClickListener(){\n @Override\n public void onClick(DialogInterface dInterface, int num) {\n String ratingAsString;\n final int ratingAsInt;\n ratingAsString = driverRatingInput.getText().toString();\n ratingAsInt = Integer.parseInt(ratingAsString);\n if(ratingAsInt >= 0 && ratingAsInt <= 5){\n DocumentReference rideRef = dataStore.collection(\"OfferedRides\").document(rid);\n rideRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> returnedTask) {\n if (returnedTask.isSuccessful()) {\n DocumentSnapshot rideDoc = returnedTask.getResult();\n if (rideDoc.exists()) {\n rideDataObjectsMap = rideDoc.getData();\n List<Map> d = (List<Map>) rideDataObjectsMap.get(\"passengers\");\n //When the driver submits a rating, I need to iterate over each passenger and each passengers details\n //then set the ratings using this\n for(int i = 0; i < d.size(); i++){\n passengerDataStringMap = d.get(i);\n passengerDataLongMap = d.get(i);\n final String userId = passengerDataStringMap.get(\"passenger\");\n long rating = passengerDataLongMap.get(\"rating\");\n long amtOfRatings = passengerDataLongMap.get(\"amountOfRatings\");\n final long amtOfRatingsIncludingThis = amtOfRatings + 1;\n final long ratingToAddToDB;\n final float ratingBeforeRounding;\n final long accumulatedRating;\n\n if(rating == -1){\n ratingToAddToDB = ratingAsInt / 1;\n }else{\n accumulatedRating = amtOfRatings * rating;\n ratingBeforeRounding = ((float)ratingAsInt + (float)accumulatedRating) / (float)amtOfRatingsIncludingThis;\n ratingToAddToDB = Math.round(ratingBeforeRounding);\n }\n\n //update the users ratings in the database so need to use firebase firestore methods\n DocumentReference usersReference = dataStore.collection(\"users\").document(userId);\n usersReference.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> returnedTask) {\n if (returnedTask.isSuccessful()) {\n DocumentSnapshot userDoc = returnedTask.getResult();\n if (userDoc.exists()) {\n Map<String, Object> user = new HashMap<>();\n user.put(\"rating\", ratingToAddToDB);\n user.put(\"amountOfRatings\", amtOfRatingsIncludingThis);\n\n dataStore.collection(\"users\").document(userId)\n .update(user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void v) {\n Log.d(TAG, \"USER RATINGS UPDATED\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Failed update driverRatingDialog userRef\", e);\n }\n });\n } else {\n Log.d(TAG, \"Could get user doc\");\n }\n } else {\n Log.d(TAG, \"Exception: \", returnedTask.getException());\n }\n }\n });\n\n }\n //since the driver has submitted a rating the ride can be removed from their profile now\n DeleteRideFromUser(rideType);\n } else {\n Log.d(TAG, \"Couldnt find doc\");\n }\n } else {\n Log.d(TAG, \"Exception: \", returnedTask.getException());\n }\n }\n });\n }else{\n //if there was an error dismiss the rating dialog and show an error dialog\n driverRatingDialog.dismiss();\n AlertDialog errorMessageDialog = new AlertDialog.Builder(new ContextThemeWrapper(MainActivity.this, R.style.NavAlerts)).create();\n errorMessageDialog.setMessage(\"Enter a number from 0-5\");\n errorMessageDialog.setButton(AlertDialog.BUTTON_POSITIVE,\"OK\",new DialogInterface.OnClickListener(){\n @Override\n public void onClick(DialogInterface dInterface, int num) {\n showDriverRatingDialog(rid, rideType);\n }\n });\n\n errorMessageDialog.setCancelable(false);\n errorMessageDialog.show();\n }\n }\n });\n\n //need to create linear layout which will contain the text input\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);\n //the input should fill the alert dialog box\n driverRatingInput.setLayoutParams(lp);\n driverRatingDialog.setView(driverRatingInput);\n\n //I need to set the text inputs theme programmatically since there is no view in xml created for it\n ColorStateList csList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.colorAccent));\n ViewCompat.setBackgroundTintList(driverRatingInput, csList);\n driverRatingInput.setTextColor(csList);\n\n driverRatingDialog.setCancelable(false);\n driverRatingDialog.show();\n }", "public static void showReviewDialogIfNotShownBefore() {\n\t\tif (mRequestActivity != null\n\t\t\t\t\t\t&& PhonarPreferencesManager.getFirstResponseSeen(mRequestActivity)\n\t\t\t\t\t\t&& !PhonarPreferencesManager.getReviewDialogSeen(mRequestActivity)) {\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(mRequestActivity);\n\t\t\tbuilder.setTitle(R.string.review_title);\n\t\t\tbuilder.setMessage(R.string.review_message);\n\t\t\tbuilder.setPositiveButton(R.string.review_ok, new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t.parse(\"market://details?id=com.phonar\"));\n\t\t\t\t\tmRequestActivity.startActivity(intent);\n\t\t\t\t\tPhonarPreferencesManager.setReviewDialogSeen(mRequestActivity, true);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuilder.setNegativeButton(R.string.review_cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\t\tPhonarPreferencesManager.setReviewDialogSeen(mRequestActivity,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tCommonUtils.showDialog(builder);\n\t\t}\n\t}", "private void showFinalInfoDialogue(boolean NEGATIVE_DUE, double dueAmnt, final SalesReturnReviewItem printList) {\n\n paymentDialog.dismiss();\n final Dialog lastDialog = new Dialog(this);\n\n lastDialog.setContentView(R.layout.pop_up_for_sale_and_payment_success);\n\n\n //SETTING SCREEN WIDTH\n lastDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n Window window = lastDialog.getWindow();\n window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n //*************\n\n lastDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n finish();\n }\n });\n\n Button okayButton = lastDialog.findViewById(R.id.pop_up_for_payment_okay);\n okayButton.setText(\"Done\");\n okayButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n lastDialog.dismiss();\n }\n });\n\n Button printBtn = lastDialog.findViewById(R.id.pop_up_for_payment_add_pay);\n printBtn.setText(\"Print\");\n printBtn.setVisibility(View.VISIBLE);\n printBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (btsocket == null) {\n Intent BTIntent = new Intent(getApplicationContext(), DeviceList.class);\n startActivityForResult(BTIntent, DeviceList.REQUEST_CONNECT_BT);\n } else {\n BPrinter printer = new BPrinter(btsocket, SalesReviewDetail.this);\n FabizProvider provider = new FabizProvider(SalesReviewDetail.this, false);\n Cursor cursor = provider.query(FabizContract.Customer.TABLE_NAME, new String[]{FabizContract.Customer.COLUMN_SHOP_NAME,\n FabizContract.Customer.COLUMN_VAT_NO,\n FabizContract.Customer.COLUMN_ADDRESS_AREA,\n FabizContract.Customer.COLUMN_ADDRESS_ROAD,\n FabizContract.Customer.COLUMN_ADDRESS_BLOCK,\n FabizContract.Customer.COLUMN_ADDRESS_SHOP_NUM\n },\n FabizContract.Customer._ID + \"=?\", new String[]{custId}, null);\n if (cursor.moveToNext()) {\n String addressForInvoice = cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_AREA));\n if (!cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_ROAD)).matches(\"NA\")) {\n addressForInvoice += \", \" + cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_ROAD));\n }\n if (!cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_BLOCK)).matches(\"NA\")) {\n addressForInvoice += \", \" + cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_BLOCK));\n }\n if (!cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_SHOP_NUM)).matches(\"NA\")) {\n addressForInvoice += \", \" + cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_ADDRESS_SHOP_NUM));\n }\n\n printer.printSalesReturnReciept(printList, cdue + \"\",\n cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_SHOP_NAME)), addressForInvoice,\n cursor.getString(cursor.getColumnIndex(FabizContract.Customer.COLUMN_VAT_NO)));\n } else {\n showToast(\"Something went wrong, can't print right now\");\n }\n }\n }\n });\n\n final TextView dateV = lastDialog.findViewById(R.id.pop_up_for_payment_date);\n\n final TextView returnedAmntLabel = lastDialog.findViewById(R.id.pop_up_for_payment_label_ent_amt);\n returnedAmntLabel.setText(\"Returned Amount\");\n\n final TextView returnedAmntV = lastDialog.findViewById(R.id.pop_up_for_payment_ent_amt);\n\n final TextView dueAmtV = lastDialog.findViewById(R.id.pop_up_for_payment_due);\n\n TextView dueLabelText = lastDialog.findViewById(R.id.pop_up_for_payment_due_label);\n dueLabelText.setText(\"Bill Due Amount\");\n\n dateV.setText(\": \" + DcurrentTime);\n returnedAmntV.setText(\": \" + TruncateDecimal(printList.getTotal() + \"\"));\n\n dueAmtV.setText(\": \" + TruncateDecimal(dueAmnt + \"\"));\n\n lastDialog.show();\n }", "public void showCorrectDialog() {\n\t\t //get correct dialog box image\n\t\t URL greenIconURL = getClass().getResource(\"green.png\");\n\t\t Image greenImage = getToolkit().getImage(greenIconURL);\n\t\t ImageIcon greenIcon = new ImageIcon(greenImage);\n\t\t \n\t\t //show dialog box\n\t\t JOptionPane.showMessageDialog(this,\n\t\t\t\t \"Good job!\", //answer message\n\t\t\t\t \"Correct\", //title bar\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE, \n\t\t\t\t greenIcon);\n\t\t \n\t\t //enable next button\n\t\t next.setEnabled(true);\n\t }", "private void incorrectDialog() {\n // Update score.\n updateScore(scoreDecrease);\n\n // Show Dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"TRUMPED! This Tweet is \" + (realTweet ? \"real\" : \"fake\"));\n //builder.setPositiveButton(\"OK\", (dialog, which) -> chooseRandomTweet());\n builder.setOnDismissListener(unused -> chooseRandomTweet());\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void showCorrectAnswerDialogueBox() {\n\n\t\tupdateImageView(currentQuestionNumber);\n\n\t\t// check if all other questions are answered\n\t\tif (StoreAnalysisStateApplication.stageCleared) {\n\t\t\t// this call is specifically for updating fragment in description\n\t\t\t// tab\n\n\t\t\tString _title = getString(R.string.levelcleared);\n\t\t\tString _message = getString(R.string.analysislevelclearedmessage);\n\t\t\tUtilityMethods.createAlertDialog(_title, _message,\n\t\t\t\t\tAnalysisActivity.this);\n\n\t\t} else {\n\n\t\t\tString _title = getString(R.string.correctansweralertdialoguetitle);\n\t\t\tString _message = getString(R.string.correctansweralertdialoguemessage);\n\t\t\tUtilityMethods.createAlertDialog(_title, _message,\n\t\t\t\t\tAnalysisActivity.this);\n\t\t}\n\n\t\tdisableRadioOptions();\n\t}", "public void showLooseMessage() {\n\t\tAlertDialog alert = new AlertDialog.Builder(getContext()).create();\n\t\talert.setCancelable(false);\n\n\t\talert.setMessage(\"You Loose!\");\n\t\talert.setButton(AlertDialog.BUTTON_POSITIVE, \"Replay\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\talert.setButton(AlertDialog.BUTTON_NEGATIVE, \"Exit\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tactivity.finish();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\talert.show();\n\n\t}", "private void setClaimButton()\t{\n\t\t\n\t\tif(Integer.parseInt(scanCount) >= Integer.parseInt(maxScans))\t{\n\n\t\t\t/*\tImage*/Button ib = (/*Image*/Button) findViewById(R.id.ibClaim);\n\t\t\tib.setVisibility(View.VISIBLE);\n\t\t\t/*\tib.setPadding(0, 0, 0, 0);*/\n\t\t\tib.setLayoutParams(new LinearLayout.LayoutParams((int) (width*0.8),(int) (height*0.15)));\n\n\t\t\tib.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\t\tif(getSharedPrefs(\"userDetails\", \"allInfo\", \"\").equals(\"true\"))\t{\n\t\t\t\t\t\t\n\t\t\t\t\tAlertDialog.Builder adb = new AlertDialog.Builder(DisplayActivity.this);\n\t\t\t\t\tadb.setMessage(\"Once you click 'YES', you will have 5 minutes to claim your item from the cashier.\\nAre you by the cashier?\");\n\t\t\t\t\t\n\t\t\t\t\tadb.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\t\tString uuid = getSharedPrefs(\"userDetails\", \"uuid\", \"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString url = \"http://www.loyal3.co.za/redeem?uuid=\"+uuid+\"&shop=\"+shopName;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnew ValidateCounts().execute(url.trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\n\n\t\t\t\t\t//Neg Button does nothing.\n\t\t\t\t\tadb.setNegativeButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tadb.show();\t\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(getBaseContext(), \"Please update your information in your Profile Page in order to claim your free item\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\t\n\t}", "public void PINext (View view){\n try {\n readCardOpt.cancelCheckCard();\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n final ProgressDialog pdialog = new ProgressDialog(powerInstantActivity.this);\n pdialog.setMessage(\"Loading, Please wait...\");\n pdialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n pdialog.setCancelable(false);\n pdialog.show();\n\n if (meternumber.getText().toString() != null){\n meter = meternumber.getText().toString();\n\n if (piphoneno.getText().toString() != null){\n powerphone = piphoneno.getText().toString();\n int length = piphoneno.getText().length();\n if (length > 6 && length < 8){\n String firstdigit = powerphone.substring(0, 1);\n if (firstdigit.equals(\"8\") || firstdigit.equals(\"7\")){\n\n if (piamount.getText().toString() != null && !piamount.getText().toString().isEmpty()){\n poweramount = piamount.getText().toString();\n int amt = Integer.parseInt(poweramount);\n if (amt > 4 && amt < 401){\n appConn = new AppConn();\n appConn.meter_no = meter;\n appConn.webLink = Global.URL;\n appConn.commandpost = \"metercheck\";\n appConn.meterChecker(new ResponseListener() {\n @Override\n public void onResponse(Response response) {\n if (appConn.meterFailedcode != null) {\n pdialog.dismiss();\n Toast.makeText(powerInstantActivity.this, \"failedcode : \" + appConn.meterFailedcode, Toast.LENGTH_SHORT).show();\n } else {\n // test for valid meter number : 37120107851 / 98t00642\n\n String meterValidity = appConn.res_server;\n System.out.println(\"meterValidity = \" + meterValidity);\n if (meterValidity.equals(\"yes\")) {\n pdialog.dismiss();\n meterStat.setImageResource(R.drawable.truetick);\n\n startActivity(new Intent(powerInstantActivity.this, powerInstantConfirm.class)\n .putExtra(\"name\", appConn.res_name)\n .putExtra(\"meter\", meternumber.getText().toString().toUpperCase())\n .putExtra(\"phoneno\", powerphone)\n .putExtra(\"amount\", piamount.getText().toString())\n .putExtra(\"piPid\", powerinstantPid)\n .putExtra(\"piMail\", powerinstantMail));\n } else {\n pdialog.dismiss();\n meterStat.setImageResource(R.drawable.falsetick);\n Toast.makeText(powerInstantActivity.this, \"Invalid Meter No.\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n @Override\n public void onError(String error) {\n pdialog.dismiss();\n finish();\n Toast.makeText(powerInstantActivity.this, \"Error : \" + error, Toast.LENGTH_SHORT).show();\n startActivity(new Intent(powerInstantActivity.this, errorActivity.class));\n }\n });\n //\n\n } else {\n pdialog.dismiss();\n Toast.makeText(this, \"Amount range: $5 - $400\", Toast.LENGTH_SHORT).show();\n }\n } else {\n pdialog.dismiss();\n Toast.makeText(this, \"Please enter amount no.\", Toast.LENGTH_SHORT).show();\n }\n } else {\n pdialog.dismiss();\n Toast.makeText(this, \"Invalid phone no.\", Toast.LENGTH_SHORT).show();\n }\n } else {\n pdialog.dismiss();\n Toast.makeText(this, \"Invalid phone no. length\", Toast.LENGTH_SHORT).show();\n }\n } else {\n pdialog.dismiss();\n Toast.makeText(this, \"Please enter phone no.\", Toast.LENGTH_SHORT).show();\n }\n } else {\n pdialog.dismiss();\n Toast.makeText(this, \"Please enter meter no.\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public void showIfMeetsConditions() {\n\n if (!PrefUtils.getStopTrack(mContext) && (checkIfMeetsCondition() || isDebug)) {\n showRatePromptDialog();\n PrefUtils.setStopTrack(true, mContext);\n }\n }", "public void correctDialog() {\n final Dialog dialogCorrect = new Dialog(MainQuiz.this);\n dialogCorrect.requestWindowFeature(Window.FEATURE_NO_TITLE);\n if (dialogCorrect.getWindow() != null) {\n ColorDrawable colorDrawable = new ColorDrawable(Color.TRANSPARENT);\n dialogCorrect.getWindow().setBackgroundDrawable(colorDrawable);\n }\n dialogCorrect.setContentView(R.layout.right_answer);\n dialogCorrect.setCancelable(false);\n dialogCorrect.show();\n\n //Since the dialog is show to user just pause the timer in background\n onPause();\n\n\n TextView correctText = (TextView) dialogCorrect.findViewById(R.id.correctText);\n Button buttonNext = (Button) dialogCorrect.findViewById(R.id.dialogNext);\n\n correctText.setTypeface(bs);\n buttonNext.setTypeface(bs);\n\n\n buttonNext.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n dialogCorrect.dismiss();\n //increment question number\n qid++;\n //get the que and option put in currentQuestion\n currentQust = QuestionLList.get(qid);\n //show new question\n updateQueAndOptions();\n resetColor();\n enableButton();\n }\n });\n }", "private void mDialogShow() {\n alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"CyanMobile Warning!\");\n alertDialog.setMessage(\"Enable Pie Menu App Toggle to use this!\");\n alertDialog.setButton(DialogInterface.BUTTON_POSITIVE,\n getResources().getString(com.android.internal.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n updateValues();\n return;\n }\n });\n \n alertDialog.show();\n }", "@Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n if ((PrefUtils.shouldResetOnRatingDeclined(mContext))) {\n resetTwoStage();\n }\n\n if (confirmRateDialogCallback != null) {\n confirmRateDialogCallback.onCancel();\n }\n dialog.dismiss();\n }", "public void show()\n\t{\n\t\tfinal String eulaKey = EULA_PREFIX;\n\t\tfinal SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mActivity);\n\t\tboolean hasBeenShown = prefs.getBoolean(eulaKey, false);\n\t\tif (hasBeenShown == false)\n\t\t{\n\n\t\t\t// Show the Eula\n\t\t\tString title = mActivity.getString(R.string.app_name);\n\n\t\t\t// Includes the updates as well so users know what changed.\n\t\t\tString message = mActivity.getString(R.string.updates) + \"\\n\\n\" + mActivity.getString(R.string.eula);\n\t\t\tTextView title_text = new TextView(mActivity);\n\t\t\ttitle_text.setWidth(40);\n\t\t\ttitle_text.setGravity(Gravity.CENTER_VERTICAL);\n\t\t\ttitle_text.setGravity(Gravity.RIGHT); // attempt at justifying text\n\t\t\ttitle_text.setMaxLines(1);\n\t\t\ttitle_text.setText(mActivity.getString(R.string.eula));\n\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(mActivity).setTitle(title).setMessage(title_text.getText())\n\t\t\t\t\t.setPositiveButton(android.R.string.ok, new Dialog.OnClickListener()\n\t\t\t\t\t{\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialogInterface, int i)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Mark this version as read.\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = prefs.edit();\n\t\t\t\t\t\t\teditor.putBoolean(eulaKey, true);\n\t\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\t\tdialogInterface.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).setNegativeButton(android.R.string.cancel, new Dialog.OnClickListener()\n\t\t\t\t\t{\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Close the activity as they have declined the EULA\n\t\t\t\t\t\t\tmActivity.finish();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\tbuilder.create().show();\n\t\t}\n\t}", "@Override\n public void onSureClick(final String pwd) {\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }", "public void onClickRecall(View view) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(this)\n .setTitle(\"Confirm Recall\")\n .setMessage(\"Are you sure you to retrieve the last order?\")\n .setNegativeButton(\"No\", null)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n loadPreferences();\n }\n });\n dialog.show();\n }", "private void showFinalScore() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Time's up! Your final score is: \" + score + \"\\nHigh score: \" + highScore);\n builder.setOnDismissListener(unused -> finish());\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void showRiderDialog(boolean isUserMessage) {\n if (isdialogShowing) {\n return;\n }\n isdialogShowing = true;\n try {\n\n final Dialog dialog = new Dialog(SlideMainActivity.this);\n dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.trip_cancelled_layout);\n dialog.getWindow().setBackgroundDrawable(\n new ColorDrawable(Color.TRANSPARENT));\n dialog.getWindow().setLayout(LinearLayout.LayoutParams.WRAP_CONTENT,\n LinearLayout.LayoutParams.WRAP_CONTENT);\n Window window = dialog.getWindow();\n window.setLayout(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n window.setGravity(Gravity.CENTER);\n TextView title2 = (TextView) dialog.findViewById(R.id.tv_dialog_title);\n title2.setTypeface(drawerListTypeface);\n\n // TextView text = (TextView) dialog.findViewById(R.id.alert_message);\n Button yes = (Button) dialog.findViewById(R.id.yes_btn);\n yes.setTypeface(drawerListTypeface);\n title2.setText(isUserMessage ? getString(R.string.rider_has_cancelled_trip): getString(R.string.trip_cancelled));\n // text.setText(message);\n yes.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n isdialogShowing = false;\n controller.stopNotificationSound();\n updateButtons(\"cancel\");\n\n }\n });\n\n dialog.show();\n } catch (Exception e) {\n isdialogShowing = false;\n updateButtons(\"cancel\");\n }\n\n }", "private void showOtpDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Enter OTP:\");\n\n // set the custom layout\n final View customLayout = getLayoutInflater().inflate(R.layout.pno_otp_alert_dialog, null);\n builder.setView(customLayout);\n\n // add a button\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n EditText otp1 = customLayout.findViewById(R.id.et_verificationCode);\n String otp2 = otp1.getText().toString();\n verifyCode(otp2);\n }\n });\n\n // create and show\n // the alert dialog\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }", "public void showNextMovePrompt() {\n\n if(model.isXTurn()){\n resultLabel.setText(\"X's Turn\");\n }\n else{\n resultLabel.setText(\"O's Turn\");\n }\n }", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "@Override\r\n\tpublic void showErrReq() {\n\t\tdialog.cancel();\r\n\t\tshowNetView(true);\r\n\t}", "private void basicInfoDialogPrompt() {\n if(!prefBool){\n BasicInfoDialog dialog = new BasicInfoDialog();\n dialog.show(getFragmentManager(), \"info_dialog_prompt\");\n }\n }", "DialogResult show();", "public void doubleRevealLose() {\n AlertDialog.Builder builder = new AlertDialog.Builder(game_activity_fb.this);\n\n builder.setCancelable(true);\n builder.setTitle(\"You Lost...\");\n builder.setMessage(UserName + \" can now double reveal you.. \");\n\n\n builder.setPositiveButton(\"Leave Game\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent challintent = new Intent(game_activity_fb.this, reveal_activity_test.class);\n startActivity(challintent);\n overridePendingTransition(0, 0);\n }\n });\n builder.show();\n\n }", "private void showGrantPermissionDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Stop!\")\n .setMessage(\"You must grant all the permissions request otherwise you can't use this feature.\")\n .setCancelable(false)\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int i) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "@SuppressLint(\"InflateParams\")\r\n\tprivate void showDialog() {\n\t\tLayoutInflater layoutInflater = LayoutInflater.from(getActivity());\r\n\t\tviewAddEmployee = layoutInflater\r\n\t\t\t\t.inflate(R.layout.activity_dialog, null);\r\n\t\teditText = (EditText) viewAddEmployee.findViewById(R.id.editText1);\r\n\t\ttv_phone = (TextView) viewAddEmployee.findViewById(R.id.tv_phone);\r\n\t\tbt_setting = (Button) viewAddEmployee.findViewById(R.id.bt_setting);\r\n\t\tbt_cancel = (Button) viewAddEmployee.findViewById(R.id.bt_cancel);\r\n\t\tString tel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserTel();\r\n\t\ttv_phone.setText(StringUtils.getTelNum(tel));\r\n\r\n\t\tshowPop();\r\n\r\n\t\tbt_setting.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tString psd = SharePreferenceUtil.getInstance(\r\n\t\t\t\t\t\tgetActivity().getApplicationContext()).getUserPsd();\r\n\t\t\t\tString password = editText.getText().toString().trim();\r\n\t\t\t\tif (TextUtils.isEmpty(password)) {\r\n\t\t\t\t\tShowToast(\"密码不能为空!\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (password.equals(psd)) {\r\n\t\t\t\t\tavatorPop.dismiss();\r\n\t\t\t\t\tintentAction(getActivity(), GesturePsdActivity.class);\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tShowToast(\"输入密码错误!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbt_cancel.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tavatorPop.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n\tpublic void show() {\n\t\tGameView.VIEW.addDialog(this);\n\t\tsuper.show();\n\t}", "public void rate(View view) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"market://details?id=com.iven.lfflfeedreader\"));\n startActivity(intent);\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "private void showDialog() {\n try {\n pDialog.setMessage(getString(R.string.please_wait));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.setCanceledOnTouchOutside(false);\n pDialog.show();\n } catch (Exception e) {\n // TODO: handle exception\n }\n\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "public void diler(View view) {\n//dialogi stexcman mek ayl dzev en kirarel\n dialog_diler.show();\n }", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "public void showReminderDetail(Reminder reminder) {\n if (reminder != null) {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n if (reminder.getNumberShown() > 0) {\n timesShown = reminder.getNumberShown();\n }\n repeatType = reminder.getRepeatType();\n interval = reminder.getInterval();\n calendar = DateAndTimeUtil.parseDateAndTime(reminder.getDateAndTime());\n showText.setText(getString(R.string.times_shown_edit, reminder.getNumberShown()));\n\n dateTextView.setText(DateAndTimeUtil.toStringReadableDate(calendar));\n timeTextView.setText(DateAndTimeUtil.toStringReadableTime(calendar, this));\n timesEditText.setText(String.valueOf(reminder.getNumberToShow()));\n\n timesText.setVisibility(View.VISIBLE);\n\n if (reminder.getRepeatType() != Constants.DOES_NOT_REPEAT) {\n if (reminder.getInterval() > 1) {\n repeatTextView.setText(TextFormatUtil.formatAdvancedRepeatText(this, repeatType, interval));\n } else {\n repeatTextView.setText(getResources().getStringArray(R.array.repeat_array)[reminder.getRepeatType()]);\n }\n showFrequency(true);\n }\n\n if (reminder.getRepeatType() == Constants.SPECIFIC_DAYS) {\n daysOfWeek = reminder.getDaysOfWeekList();\n repeatTextView.setText(TextFormatUtil.formatDaysOfWeekText(this, daysOfWeek));\n }\n\n if (reminder.isIndefinite()) {\n foreverSwitch.setChecked(true);\n bottomRow.setVisibility(View.GONE);\n }\n }\n }", "@Override\n\tprotected void showFisrtDialog() {\n\t\tboolean isFirst=LocalApplication.getInstance().sharereferences.getBoolean(\"music\", false);\n\t if(isFirst){\tshowAlertDialog(showString(R.string.app_Music),\n\t\t\tshowString(R.string.music_dialog),\n\t\t\tnew String[] {showString(R.string.no_dialog), showString(R.string.yes_dialog)}, true, true, null);}\n\t\t LocalApplication.getInstance().sharereferences.edit().putBoolean(\"music\", false).commit();\n\n\t}", "private void gaVerder()\n {\n /**\n * Dialog tonen waarbij de gebruiker de keuze krijgt om al dan niet nog een spelbord te maken.\n */\n Alert keuze = new Alert(Alert.AlertType.CONFIRMATION);\n keuze.setTitle(ResourceHandling.getInstance().getString(\"Configureer.gaverder\"));\n keuze.setHeaderText(ResourceHandling.getInstance().getString(\"Knop.verder\"));\n\n ButtonType btnNieuw = new ButtonType(ResourceHandling.getInstance().getString(\"Spelbord.nieuw\"));\n ButtonType btnCancel = new ButtonType(ResourceHandling.getInstance().getString(\"Annuleer.knop\"));\n\n keuze.getButtonTypes().setAll(btnCancel, btnNieuw);\n Optional<ButtonType> result = keuze.showAndWait();\n\n if (result.get() == btnNieuw)\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new GaVerderSchermController(dc), 488, 213, this);\n } else\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new KiesConfigureerSchermController(dc), 300, 300, this);\n }\n }", "public void display() {\n dialog.setVisible(true);\n }", "@Override\n public void show() {\n VisAQ.getInstance().userInput();\n }", "private void showWrongPasswordDialog()\r\n\t{\t\r\n\t\t// Create and show dialog\r\n\t\tfinal WrongPasswordDialogBuilder loginDialogBuilder = new WrongPasswordDialogBuilder(this);\r\n\t\tfinal AlertDialog alert = loginDialogBuilder.create( );\r\n\t\talert.show( );\r\n\t}", "private void showFormatConfirmDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setMessage(R.string.setting_format_desc);\n\t\tbuilder.setNegativeButton(R.string.setting_no,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setPositiveButton(R.string.setting_yes,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t// handler.obtainMessage(REQUEST_FORMAT_SD_CARD).sendToTarget();\n\t\t\t\t\t\tFormatSDCard formatSDCard = new FormatSDCard(handler);\n\t\t\t\t\t\tformatSDCard.start();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tdialog = builder.create();\n\t\tdialog.show();\n\t}", "public void showSmartpayDialog() {\n if (getSmartpayDialog() == null) {\n // Get Smartpay View\n View smartPayView = LayoutInflater.from(getActivity().getApplicationContext()).\n inflate(R.layout.smartpay_dialog, null, false);\n\n // Get Message from Pref\n JSONObject smartPayJsonObject = null;\n String smartPayMessage = DOPreferences.getSmartpayPopupMessage(getActivity().getApplicationContext());\n if (!AppUtil.isStringEmpty(smartPayMessage)) {\n try {\n smartPayJsonObject = new JSONObject(smartPayMessage);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n // Get Title\n TextView title = (TextView) smartPayView.findViewById(R.id.textView_smartpay_title);\n title.setText((smartPayJsonObject != null && !AppUtil.isStringEmpty(smartPayJsonObject.optString(\"title_1\"))) ?\n smartPayJsonObject.optString(\"title_1\") : getString(R.string.text_smartPay));\n\n // Set Content 1\n TextView content1 = (TextView) smartPayView.findViewById(R.id.textView_smartpay_content_1);\n content1.setText((smartPayJsonObject != null && !AppUtil.isStringEmpty(smartPayJsonObject.optString(\"title_2\"))) ?\n smartPayJsonObject.optString(\"title_2\") : getString(R.string.text_smartpay_content_1));\n\n // Set Content 2\n TextView content2 = (TextView) smartPayView.findViewById(R.id.textView_smartpay_content_2);\n content2.setText((smartPayJsonObject != null && !AppUtil.isStringEmpty(smartPayJsonObject.optString(\"title_3\"))) ?\n smartPayJsonObject.optString(\"title_3\") : getString(R.string.text_smartpay_content_2));\n\n // Set Ok Button Click Listener\n smartPayView.findViewById(R.id.textView_smartpay_ok).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Dismiss Dialog\n getSmartpayDialog().dismiss();\n }\n });\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setCancelable(false);\n builder.setView(smartPayView);\n\n // Set Dialog Instance\n setSmartpayDialog(builder.create());\n }\n\n // Show Alert Dialog\n getSmartpayDialog().show();\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "public void onClick(View v) {\n if (rate.getText().toString().contains(\"PLAY STORE\")) {\n mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"market://details?id=\" + PACKAGE_NAME)));\n delayDays(365);\n delayLaunches(1000);\n dialog.dismiss();\n } else if (star.getRating() > 4f && reviewcntr.getVisibility() == View.GONE) {\n star.setIsIndicator(true);\n playstoreCntr.setVisibility(View.VISIBLE);\n // myratecontanr.setVisibility(View.INVISIBLE);\n rate.setText(\"PLAY STORE\");\n delayDays(180);\n delayLaunches(360);\n } else if (star.getRating() > 0f && reviewcntr.getVisibility() == View.GONE) {\n reviewcntr.setVisibility(View.VISIBLE);\n delayDays(180);\n delayLaunches(360);\n\n } else if (star.getRating() > 0f && reviewcntr.getVisibility() == View.VISIBLE) {\n Toast.makeText(mContext, \"Thank You!\", Toast.LENGTH_SHORT).show();\n String feedback = \"Star:\" + star.getRating() + \"Rev:\" + review.getText();\n feedback = feedback.replaceAll(\"'\", \" \");\n feedback = feedback.replaceAll(\"\\\"\", \" \");\n String json1 = \"{'FEEDBACK':'\" + feedback + \"'}\";\n loadData(json1, Constant.FEEDBACK_API);\n delayDays(180);\n delayLaunches(360);\n dialog.dismiss();\n\n } else {\n Toast.makeText(mContext, \"Please select star.\", Toast.LENGTH_SHORT).show();\n }\n\n\n }", "public String openShowUnconfirmed(){\r\n\t\treturn SUCCESS;\r\n\t}", "private void AlertUserToReset() {\n Builder builder = new AlertDialog.Builder(this);\n View titleView = LayoutInflater.from(CheckResultActivity.this)\n .inflate(R.layout.custom_alert_dialog, null);\n TextView title = (TextView) titleView.findViewById(R.id.title);\n title.setText(getString(R.string.alert_restore_title));\n builder.setCustomTitle(titleView);\n builder.setMessage(getString(R.string.alert_restore_note));\n builder.setPositiveButton(R.string.alert_dialog_ok, null);\n builder.create().show();\n }", "public void showProgressDialog() {\n pd = new ProgressDialog(this);\n pd.setMessage(\"Renting film...\");\n pd.show();\n }", "private void showRestartDialog(){\n final Dialog verificationDialog = new Dialog(this, R.style.DialogTheme);\n verificationDialog.setContentView(R.layout.dialog_verification);\n TextView verificationText = (TextView) verificationDialog.findViewById(R.id.verification_text);\n Button cancelButton = (Button) verificationDialog.findViewById(R.id.cancel_button);\n Button acceptButton = (Button) verificationDialog.findViewById(R.id.accept_button);\n verificationDialog.show();\n\n verificationText.setText(R.string.verification_restart);\n\n // Setting up a listener for the Cancel Button:\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n }\n });\n\n // Setting up a listener for the Done Button:\n acceptButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Creating a new game and reinitializing UI components:\n mGame = new Game();\n setupGrid();\n mBlackCounter.setText(\"2\");\n mWhiteCounter.setText(\"2\");\n startGame();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n // Showing a promo ad by chance:\n showPromoAdByChance();\n\n }\n });\n\n }", "@Override\n public void displayRatificationActivity() {\n Intent i = new Intent(MainActivity.this, LoginActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivityForResult(i, RC_RATIFY_CONSTITUTION);\n }", "private void showRate() {\r\n\t\tString currencyCode = signalThreeLetters();\r\n\t\tif (currencyCode == null){\r\n\t\t\treturn;\r\n }\r\n //needed if-else to check if currencies is null. As currencies.getCurrencyByCode doesn't work if currencies is null\r\n if (currencies == null){\r\n \tSystem.out.println(\"There are currently no currencies in the system.\");\r\n \tSystem.out.println();}\r\n \t\r\n else{\r\n Currency currency = currencies.getCurrencyByCode(currencyCode);\r\n if (currency == null) {\r\n\t\t\t// No, so complain and return\r\n\t\t\tSystem.out.println(\"\\\"\" + currencyCode + \"\\\" is is not in the system.\");\r\n\t\t\tSystem.out.println();}\r\n else {\r\n System.out.println(\"Currency \" +currencyCode+ \" has exchange rate \" + currency.getExchangeRate() + \".\");\r\n System.out.println();}\r\n \r\n }\r\n \r\n\t}", "private void showDialogNoNet() {\n View view = getLayoutInflater().inflate(R.layout.dialog_no_internet, null);\n\n Button btn_retry = (Button) view.findViewById(R.id.btn_retry);\n\n final Dialog dialog = new Dialog(this, android.R.style.Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setContentView(view);\n dialog.show();\n\n btn_retry.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //retry and close dialogue\n if (dialog.isShowing()) {\n dialog.cancel();\n onRetryLoadPaperGroups();\n }\n }\n });\n }", "public void show() {\n listenerHandler.onShow(dialog);\n dialog.show();\n }", "private void show_input() {\n clear();\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"ادخل رقم البطاقة\");\n\n// Set up the input\n final EditText input = new EditText(this);\n// Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n builder.setView(input);\n\n// Set up the buttons\n builder.setPositiveButton(\"تم\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n String Customer_id = input.getText().toString();\n getMenuID_Card(getCardURL, Customer_id);\n Log.d(\"karrar\", \"getMenuID_Card func \" + Customer_id);\n session.setScanfor(\"0\");\n\n }\n });\n// builder.setNegativeButton(\"الغاء\", new DialogInterface.OnClickListener() {\n// @Override\n// public void onClick(DialogInterface dialog, int which) {\n// dialog.cancel();\n// }\n// });\n\n builder.show();\n }", "private void popupCalibratingDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.motion_calibrating);\n builder.setCancelable(false);\n builder.setMessage(R.string.motion_calibrating_message);\n\n calibratingDialog = builder.create();\n calibratingDialog.show();\n }", "void doShowRetry();", "public void thankYou()\n {\n onSales = false;\n clearScreen();\n showText(\"Thank you!\", getHeight()/2, getWidth()/2);\n Greenfoot.stop();\n }", "private void showReturnDialog(){\n final Dialog verificationDialog = new Dialog(this, R.style.DialogTheme);\n verificationDialog.setContentView(R.layout.dialog_verification);\n TextView verificationText = (TextView) verificationDialog.findViewById(R.id.verification_text);\n Button cancelButton = (Button) verificationDialog.findViewById(R.id.cancel_button);\n Button acceptButton = (Button) verificationDialog.findViewById(R.id.accept_button);\n verificationDialog.show();\n\n verificationText.setText(R.string.verification_return);\n\n // Setting up a listener for the Cancel Button:\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n }\n });\n\n // Setting up a listener for the Done Button:\n acceptButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Play a proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Dismiss dialog:\n verificationDialog.dismiss();\n\n // Go back to main menu:\n\n // Creating an intent:\n Intent mainIntent = new Intent(OfflineGameActivity.this , MainActivity.class);\n // Starting the Main Activity:\n startActivity(mainIntent);\n\n }\n });\n\n }", "private AlertDialog alertBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Missing Arduino Unit, go to Settings?\").\n setCancelable(false).setPositiveButton(\n \"Yes\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int id) {\n //call qr scan intent\n Intent prefScreen = new Intent(TempMeasure.this, Preferences.class);\n startActivityForResult(prefScreen, 0);\n }\n }).setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = builder.create();\n return alert;\n }", "private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreferences(mdiForm.getUserId());\r\n userPreferencesForm.setUserName(mdiForm.getUserName());\r\n userPreferencesForm.display();\r\n }", "public void showAdvice(View target){\r\n\t\thintDialog.show();\r\n\t\tadviceIcon.setVisibility(View.INVISIBLE);\r\n//\t\tFGCourse.this.startActivityForResult(new Intent(FGCourse.this,FGCAdvice.class),CREATE_ADVICE_ACTIVITY);\r\n\t}", "@Override\n public void showFingerprintDialog(CharSequenceX pincode) {\n mBinding.fingerprintLogo.setVisibility(View.VISIBLE);\n mBinding.fingerprintLogo.setOnClickListener(v -> mViewModel.checkFingerprintStatus());\n // Show dialog itself if not already showing\n if (mFingerprintDialog == null && mViewModel.canShowFingerprintDialog()) {\n mFingerprintDialog = FingerprintDialog.newInstance(pincode, FingerprintDialog.Stage.AUTHENTICATE);\n mFingerprintDialog.setAuthCallback(new FingerprintDialog.FingerprintAuthCallback() {\n @Override\n public void onAuthenticated(CharSequenceX data) {\n dismissFingerprintDialog();\n mViewModel.loginWithDecryptedPin(data);\n }\n\n @Override\n public void onCanceled() {\n dismissFingerprintDialog();\n showKeyboard();\n }\n });\n\n mDelayHandler.postDelayed(() -> {\n if (!isFinishing() && !mIsPaused) {\n mFingerprintDialog.show(getSupportFragmentManager(), FingerprintDialog.TAG);\n } else {\n mFingerprintDialog = null;\n }\n }, 200);\n\n hideKeyboard();\n }\n }", "protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }", "private void showAlert() {\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n alert.setMessage(\"Error al autenticar usuario\");\n alert.setPositiveButton(\"Aceptar\", null);\n AlertDialog pop = alert.create();\n alert.show();\n }", "private void showErrorMessage() {\n mCryptoRecyclerView.setVisibility(View.INVISIBLE); // set the visibility of the recycler to invisible\n mTvErrorMessage.setVisibility(View.VISIBLE); // set the visibility of the error message to visible\n }", "private void showForgotPasswordDialog() {\n LayoutInflater inflater = LayoutInflater.from(this);\n View dialogView = inflater.inflate(R.layout.dialog_forgot_password, null);\n final TextInputEditText emailEditText = dialogView.findViewById(R.id.dialog_forgot_password_value_email);\n //endregion\n\n //region Building the dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.password_reset);\n\n builder.setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n String email = emailEditText.getText().toString();\n\n mFirebaseAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignInActivity.this, R.string.sent_reset_password_email, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, R.string.failed_to_reset_email, Toast.LENGTH_SHORT).show();\n }\n }\n });\n dialog.dismiss();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n //endregion\n\n builder.setView(dialogView);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "boolean isDisplayMessageOnRedeem();", "public void correctAnswer(){\n AlertDialog.Builder dialogBoxAns = new AlertDialog.Builder(this);\n //set title to dialog box\n dialogBoxAns.setTitle(\"Results\");\n //set correct message to dialog box\n dialogBoxAns.setMessage((Html.fromHtml(\"<font color='#39FF14'> CORRECT! </font> \")));\n //set button to dialog box\n dialogBoxAns.setPositiveButton(\"OK\", null);\n //create new dialog box\n AlertDialog dialog = dialogBoxAns.create();\n dialog.show();\n }", "public void onContribute(final String payId) {\n LayoutInflater li = LayoutInflater.from(GoalDisActivity.this);\n View promptsPaymentView = li.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Payment\");\n build.setMessage(\"Please Enter payment amount\");\n build.setView(promptsPaymentView);\n PayValue = (EditText) promptsPaymentView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n PayValue.setFocusableInTouchMode(true);\n PayValue.setFocusable(true);\n PayValue.requestFocus();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.showSoftInput(PayValue, InputMethodManager.SHOW_IMPLICIT);\n build.setPositiveButton(\"Ok\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0; val = 0;\n moneyValue = \"0\";\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME+\" WHERE \"+DbHelperGoal.KEY_ID+\"=\"+payId, null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n } while (mCursor.moveToNext());\n }\n val = Float.valueOf(PayValue.getText().toString())+ Float.valueOf(moneyValue);\n if(val-check <= Float.valueOf(dbExpAmount) && val-check >= 0) {// within the Target Amount\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + payId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }else if(val-check > Float.valueOf(dbExpAmount) && val-check >= 0){// if client collects extra amount for that goal, the Target amount extends\n build2 = new AlertDialog.Builder(GoalDisActivity.this);\n build2.setTitle(\"Confirmation\");\n build2.setMessage(\"The Payment Amount is exceeding the Target Amount. Do you want to increment the Target amount to the new value?\");\n build2.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.AMOUNT + \"=\" + String.valueOf(val - check) + \",\" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + payId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n build2.setNeutralButton(\"No, only Savings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + payId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n build2.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n alert2 = build2.create();\n alert2.show();\n alert2.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n }else{\n Toast.makeText(getApplication(),\"Sorry, the amount is beyond the Target Amount\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }", "private void showRequestPermissionsInfoAlertDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.permission_alert_dialog_title);\n builder.setMessage(R.string.permission_dialog_message);\n builder.setPositiveButton(R.string.action_ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n requestReadAndSendSmsPermission();\n }\n });\n builder.show();\n }", "private void showDrawDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \" Game Has Ended in a Draw!! \\n\\n\\n Thanks For Playing \" + player1.getName(), new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Play Again\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/draw.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Draw!\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "private void showHelp(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this,R.style.MyDialogTheme);\n alertDialogBuilder.setMessage(\"Welcome to NBA Manager 2019\\n\\n\" +\n \"The purpose of the application is to simulate a basketball manager game and draft a team.\\n\\n\" +\n \"You can view your current roster by pressing the right arrow in the top right corner.\\n\\n\" +\n \"*Not all players will have a height or a weight.\");\n alertDialogBuilder.setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "private void askResetBluetooth() {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(ScanResultsActivity.this);\n\n alertDialogBuilder.setTitle(R.string.reset_bluetooth);\n alertDialogBuilder.setMessage(R.string.prompt_not_discove_bridge_device_can_reset_buletooth);\n // set positive button: Yes message\n alertDialogBuilder.setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n resetBluetooth();\n dialog.cancel();\n }\n });\n // set negative button: No message\n alertDialogBuilder.setNegativeButton(R.string.later_handle, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // cancel the alert box and put a Toast to the user\n dialog.cancel();\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n // show alert\n alertDialog.show();\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Re-enter phone number\", Toast.LENGTH_SHORT).show();\n }", "public void displayRespuesta(){\n final Dialog customDialog = new Dialog(this);\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n customDialog.setCancelable(false);\n customDialog.setContentView(ar.com.klee.marvinSimulator.R.layout.dialog_sms_respond);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n actualDialog = customDialog;\n\n Typeface fontBold = Typeface.createFromAsset(getApplicationContext().getAssets(),\"Bariol_Bold.otf\");\n Typeface fontRegular = Typeface.createFromAsset(getApplicationContext().getAssets(),\"Bariol_Bold.otf\");\n\n answer = (EditText) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.contenido);\n answer.setTypeface(fontRegular);\n\n TextView textFor = (TextView) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.textFor);\n textFor.setTypeface(fontRegular);\n\n TextView contact = (TextView) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.contact);\n TextView phone = (TextView) customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.phone);\n\n if(!mensaje.getContactName().equals(mensaje.getPhoneNumber())) {\n contact.setText(mensaje.getContactName());\n contact.setTypeface(fontBold);\n phone.setText(mensaje.getPhoneNumber());\n phone.setTypeface(fontRegular);\n }else{\n contact.setText(mensaje.getPhoneNumber());\n contact.setTypeface(fontBold);\n phone.setText(\"Número no agendado\");\n phone.setTypeface(fontRegular);\n }\n\n\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.cancelar).setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view){\n STTService.getInstance().setIsListening(false);\n commandHandlerManager.setNullCommand();\n customDialog.dismiss();\n }\n });\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.enviar).setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n String smsBody=answer.getText().toString();\n if(smsBody.equals(\"\"))\n Toast.makeText(getApplicationContext(), \"Ingresá un mensaje\", Toast.LENGTH_LONG).show();\n else {\n try {\n\n SmsManager smsManager = SmsManager.getDefault();\n smsManager.sendTextMessage(mensaje.getPhoneNumber(), null, smsBody, null, null);\n if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT)\n saveInOutbox(mensaje.getPhoneNumber(), smsBody);\n Toast.makeText(getApplicationContext(), \"SMS enviado\", Toast.LENGTH_LONG).show();\n\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(), \"El envío falló. Reintentá luego\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n STTService.getInstance().setIsListening(false);\n commandHandlerManager.setNullCommand();\n customDialog.dismiss();\n }\n }\n });\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.leer).setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view)\n {\n final boolean isListening = STTService.getInstance().getIsListening();\n STTService.getInstance().setIsListening(false);\n\n String smsBody = answer.getText().toString();\n\n if(smsBody.equals(\"\"))\n Toast.makeText(getApplicationContext(), \"Ingresá un mensaje\", Toast.LENGTH_LONG).show();\n else {\n\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.cancelar).setEnabled(false);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.leer).setEnabled(false);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.enviar).setEnabled(false);\n\n int delay = commandHandlerManager.getTextToSpeech().speakTextWithoutStart(smsBody);\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n STTService.getInstance().setIsListening(isListening);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.cancelar).setEnabled(true);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.leer).setEnabled(true);\n customDialog.findViewById(ar.com.klee.marvinSimulator.R.id.enviar).setEnabled(true);\n }\n }, delay);\n }\n }\n });\n\n customDialog.show();\n\n }" ]
[ "0.6986354", "0.6933164", "0.66478264", "0.62996775", "0.62948406", "0.6264416", "0.62386817", "0.61859864", "0.6010387", "0.5945307", "0.58991784", "0.5898705", "0.5893716", "0.58888555", "0.58329904", "0.5823026", "0.58177495", "0.58151555", "0.5786415", "0.57749534", "0.57662404", "0.574045", "0.57103515", "0.5694266", "0.56902885", "0.5670298", "0.5661403", "0.5654127", "0.5629987", "0.5626422", "0.560369", "0.5594495", "0.55751777", "0.5565003", "0.55544484", "0.555359", "0.55470717", "0.5544962", "0.5539619", "0.55220217", "0.5519447", "0.5518942", "0.55146563", "0.5512773", "0.55012053", "0.54958516", "0.54944617", "0.5492553", "0.5485547", "0.54819846", "0.5474289", "0.5452779", "0.5449215", "0.54490227", "0.54489243", "0.5437567", "0.5433775", "0.5426705", "0.5417972", "0.5417793", "0.54144496", "0.54029346", "0.5401315", "0.5392428", "0.5386283", "0.5380218", "0.537593", "0.53730285", "0.53706074", "0.5369875", "0.53592277", "0.5352071", "0.53442913", "0.5342322", "0.5341105", "0.53365415", "0.5336257", "0.5333397", "0.5319372", "0.53193235", "0.5317931", "0.53136265", "0.5308511", "0.5306594", "0.5294047", "0.5290513", "0.52892196", "0.5288113", "0.5284443", "0.5281641", "0.5279198", "0.52786326", "0.52774566", "0.5274475", "0.5262981", "0.52611905", "0.5260265", "0.52515787", "0.52513754", "0.5244205" ]
0.8591999
0
/ Create Console Handler
public ConsoleHandler createConsoleHandler () { ConsoleHandler consoleHandler = null; try { consoleHandler = new ConsoleHandler(); } catch (SecurityException e) { e.printStackTrace(); } return consoleHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ConsoleHandler() {\n super();\n setConsole(System.err);\n setFormatter(LOG_FORMATTER);\n setLevel(DEFAULT_LEVEL);\n }", "public Console(/*@ non_null */ CommandHandler ch)\n\t{\n\t\tsuper(\"Console\");\n\t\tthis._handler = ch;\n\t}", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "abstract void initiateConsole();", "Console(/*@ non_null */ Properties p, /*@ non_null */ CommandHandler ch)\n\t{\n\t\tsuper(\"Console\");\n\n\t\tthis._handler = ch;\n\t}", "public static void handle ( String input, JTextPane console ) {\r\n GUI.commandHistory.add ( input ) ;\r\n GUI.commandHistoryLocation = GUI.commandHistory.size ( ) ;\r\n\r\n GUI.write ( \"Processing... [ \"\r\n + console.getText ( ).replaceAll ( \"\\r\", \"\" ).replaceAll ( \"\\n\", \"\" )\r\n + \" ]\" ) ;\r\n console.setText ( \"\" ) ;\r\n\r\n input = input.replaceAll ( \"\\r\", \"\" ).replaceAll ( \"\\n\", \"\" ) ;\r\n try {\r\n if ( input.equalsIgnoreCase ( \"quit\" )\r\n || input.equalsIgnoreCase ( \"exit\" )\r\n || input.equalsIgnoreCase ( \"close\" ) ) {\r\n Core.fileLogger.flush ( ) ;\r\n System.exit ( 0 ) ;\r\n } else {\r\n final String inp[] = input.split ( \"(\\\\s)+\" ) ;\r\n if ( inp.length == 0 ) { return ; }\r\n final Class<?> cmdClass = Class.forName ( \"net.mokon.scrabble.cmd.CMD_\"\r\n + inp[ 0 ].toLowerCase ( ) ) ;\r\n final Constructor<?> cmdConstructor = cmdClass\r\n .getDeclaredConstructors ( )[ 0 ] ;\r\n final Command toRun = (Command) cmdConstructor.newInstance ( inp,\r\n console, Core.scrabbleBoard, Core.main, Core.moves,\r\n Core.scrabbleBoard.bag ) ;\r\n if ( inp[ 0 ].equalsIgnoreCase ( \"word\" ) ) {\r\n final Method method = cmdClass.getMethod ( \"setFrame\", JFrame.class ) ;\r\n method.invoke ( toRun, Core.showWorkingScreen ( ) ) ;\r\n }\r\n toRun.start ( ) ;\r\n }\r\n } catch ( final ClassNotFoundException e ) {\r\n GUI.write ( \"Unknown Command - Valid are [ help, word, use, draw,\"\r\n + \" place, set, unset, grid, size, fill, lookup ]\" ) ;\r\n } catch ( final Throwable e ) {\r\n GUI.write ( \"An error has been enountered [ \" + e.toString ( )\r\n + \" ]. Attempting to continue...\" ) ;\r\n e.printStackTrace ( ) ;\r\n e.printStackTrace ( Core.fileLogger ) ;\r\n }\r\n }", "CreateHandler()\n {\n }", "CommandHandler() {\n registerArgument(new ChallengeCmd());\n registerArgument(new CreateCmd());\n }", "public static void main(String[] args) {\n\t\tstringhandler obj=new stringhandler();\r\n\t\tobj.input();\r\n\t\tobj.display();\r\n\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 interface CommandHandlerFactory {\n public CommandHandler getHandler(Command command);\n}", "public void run(){\n\t\tinputStreamReader = new InputStreamReader(System.in);\r\n\t\tin = new BufferedReader( inputStreamReader );\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\" + Application.APPLICATION_VENDOR + \" \" + Application.APPLICATION_NAME + \" \" + Application.VERSION_MAJOR + \".\" + Application.VERSION_MINOR + \".\" + Application.VERSION_REVISION + \" (http://ThreatFactor.com)\");\r\n\t\t//System.out.println(\"We are here to help, just go to http://ThreatFactor.com/\");\r\n\t\t\r\n\t\tif( application.getNetworkManager().sslEnabled() )\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 443 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 80 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Interactive console, type help for list of commands\");\r\n\t\t\r\n\t\tcontinueExecuting = true;\r\n\t\twhile( continueExecuting ){\r\n\r\n\t\t\tSystem.out.print(\"> \");\r\n\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tString text = in.readLine();\r\n\t\t\t\t\r\n\t\t\t\tif( continueExecuting && text != null ){\r\n\t\t\t\t\tcontinueExecuting = runCommand( text.trim() );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(AsynchronousCloseException e){\r\n\t\t\t\t//Do nothing, this was likely thrown because the read-line command was interrupted during the shutdown operation\r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\t//Catch the exception and move on, the console listener must not be allowed to exit\r\n\t\t\t\tSystem.err.println(\"Operation Failed: \" + e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t\t//Stop listening. Otherwise, an exception loop may occur. \r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\thandler();\r\n\r\n\t}", "public void activateConsoleMode() {\n logger.addHandler(mConsoleHandler);\n }", "public interface Console {\n\t//For know without description\n\t\n\t/**\n\t * Prints all information in XML src\n\t * @param src - document \n\t */\n\tpublic void startInfo(Document src);\n\t\n\t/**\n\t * Reading and printing inform. from console\n\t * @param str - string from console with request\n\t */\n\tpublic void readAndPrint(String str);\n\t\n\t/**\n\t * Starts listening InputStream in\n\t * @param in - in this program it's System.in\n\t */\n\n\tpublic void start(InputStream in, String path);\n\t\n\t/**\n\t * Printing all information about Node n\n\t * @param n\n\t */\n\tpublic void printNode(Node n);\n}", "public static void main(String[] args) {\n \tWelcome console = null;\n\t\ttry {\n\t\t\t//console = new Welcome(conn);\n\t\t\tconsole = new Welcome();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \tconsole.start();\n }", "public static void main(String[] args) {\n\t\tLogger logger = Logger.getLogger(\"mylogger\");\r\n\t\tlogger.setLevel(Level.ALL);\r\n\t\t// 2. Create a handler\r\n\t\tHandler handler = new ConsoleHandler();\r\n\t\thandler.setLevel(Level.ALL);\r\n\t\t// 3. Define formatter and filter\r\n\t\tFormatter formatter = new Formatter() {\r\n\t\t\t@Override\r\n\t\t\tpublic String format(LogRecord record) {\r\n\t\t\t\treturn record.getLevel() + \":\" + record.getMessage() + \"\\n\";\r\n\t\t\t}\r\n\t\t};\r\n\t\t// 4. Add formatter and filter to handler\r\n\t\thandler.setFormatter(formatter);\r\n\t\t// 5. Add handler to logger\r\n\t\tlogger.addHandler(handler);\r\n\t\t// 6. Use logger\r\n\t\tlogger.info(\"Test Message.\");\r\n\t}", "AdminConsole createAdminConsole();", "public synchronized final void\n\t\trun()\n\t{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = null;\n\n\t\ttry {\n\t\t\twhile (this.isRunning() && (null != (line = reader.readLine()))) {\n\t\t\t\ttry {\n\t\t\t\t\t_handler.handleCommand(line);\n\t\t\t\t} catch (RuntimeException ex) {\n\t\t\t\t\t_LOG.error(new Strings(new Object[]\n\t\t\t\t\t\t{this, \":\", StackTrace.formatStackTrace(ex)}));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ex) {\n\t\t\t_LOG.error(new Strings(new Object[]\n\t\t\t\t{this, \":\", StackTrace.formatStackTrace(ex)}));\n\t\t}\n\n\t\tif (line == null) {\n\t\t\tif (this.isRunning()) {\n\t\t\t\t_handler.handleCommand(\"quit\");\n\t\t\t}\n\t\t}\n\n\t\t_LOG.warn(\"Console exiting.\");\n\t}", "public static void main( String[] cmdLine ) throws MalformedURLException,\n NotBoundException, RemoteException\n {\n TuiConsole tuiConsole = new TuiConsole();\n System.exit( tuiConsole.start( cmdLine ) );\n }", "public static void main(String[] args){\n eLivros handler = new eLivros();\n }", "public ConsoleView() {\n\t\tcrapsControl = new CrapsControl();\n\t\tinput = new Scanner(System.in);\n\t}", "public Console() {\n initComponents();\n }", "public static void main(String[] args) {\n InputHandler.inputs();\n }", "private ConsoleScanner() {}", "public static void main(String[] args){\n\t\tString user_id=\"Server\";\n\t\tString host = \"\", password=\"\";\n\t\tint port = 0; //The port number\n\t\ttry{\n\t\t\tpassword = args[0];\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"ERROR: No password provided for logging onto server console, connection aborted\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry{\n\t\t\thost = args[1];\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\thost = \"localhost\";\n\t\t}\n\t\ttry{\n\t\t\tport = Integer.parseInt(args[2]);\n\t\t}catch (ArrayIndexOutOfBoundsException e){\n\t\t\tport = DEFAULT_PORT;\n\t\t}\n\t\tServerConsole serv= new ServerConsole(user_id, host, password, port);\n\t\tserv.accept(); //Wait for console data\n\t}", "public Console(Client client, Controller controller){\r\n\t\tsuper(client,controller);\r\n\t\tsc = new Scanner(System.in);\r\n\t\tnew Thread(new ReadInput()).start();\r\n\t}", "private CommandLine() {\n\t}", "public static void main(String[] args) {\n\t\tUI ui = new UI();\n\t\tui.console();\n\t}", "public ConsolePanel() throws Exception, SAXException, IOException\r\n\t{\r\n\t\tgame=null;\r\n\t\tgame_started=false;\r\n\t\tgs=new MainMenuDialog();\r\n\t\tMyKeyHandler kh = new MyKeyHandler();\r\n\t\taddKeyListener(kh);\r\n\t\tsetFocusable(true);\r\n\t}", "public void accept(){\n\t\ttry{\n\t\t\tBufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString message;\n\t\t\twhile (true){\n\t\t\t\tmessage = fromConsole.readLine();\n\t\t\t\tthis.handleMessage(message);\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exception){\n\t\t\tSystem.out.println\n\t\t\t(\"Unexpected error while reading from console!\");\n\t\t}\n\t}", "public void accept() {\n try {\n BufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n String message;\n\n // loops infinitely, until #quit command is called, which sets run = false, and\n // stops the loop\n while (run) {\n message = fromConsole.readLine();\n if (message != null) {\n if (message.charAt(0) == '#') {\n command(message.substring(1));\n } else {\n client.handleMessageFromClientUI(message);\n }\n } else {\n client.handleMessageFromClientUI(message);\n }\n }\n }\n\n // Exceptions where the reader encounters an error\n catch (Exception ex) {\n System.out.println(\"Unexpected error while reading from console!\");\n System.out.println(ex.getMessage());\n }\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}", "void setConsole(ConsoleManager console);", "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 static Optional<ConsoleHandler> getConsoleHandler() {\n ImmutableList<Handler> handlers = ImmutableList.copyOf(Logger.getLogger(\"\").getHandlers());\n for (Handler handler : handlers) {\n if (handler instanceof ConsoleHandler) {\n return Optional.of((ConsoleHandler) handler);\n }\n }\n return Optional.absent();\n }", "public interface Console {\n\n /**\n * Prompt for input from user.\n * @param message the prompt message\n * @return the input from the user\n * @throws IOException if an i/o error occurs\n */\n String prompt(String message) throws IOException;\n\n /**\n * Prompt (with color) for input from user\n * @param message the prompt message\n * @param color the color of the prompt message\n * @return the input from the user\n * @throws IOException if an i/o error occurs\n */\n String prompt(String message, Color color) throws IOException;\n\n /**\n * Print a message to the console\n * @param message the message to print\n * @throws IOException if an i/o error occurs\n */\n void print(String message) throws IOException;\n\n /**\n * Print a message to the console\n * @param message the message to print\n * @param color the color of the message\n * @throws IOException if an i/o error occurs\n */\n void print(String message, Color color) throws IOException;\n\n default void printNewLine() throws IOException {\n print(\"\");\n }\n}", "public Cli (BufferedReader in,PrintWriter out , Controller thecontroller) {\r\n\t\tsuper(thecontroller);\r\n\t\tthis.in=in;\r\n\t\tthis.out=out;\r\n\t\tthis.commandsSet= controller.getCommandSet();\r\n\t}", "Commands createCommands();", "public void init() {\n\t\tregisterFunctions();\n\t\t\t\t\n\t\t//Start it\n\t\tconsole.startUserConsole();\n\t}", "@Override\n\tpublic void run() {\n\t\tregisterTab(\"chat\");\n\t\tregisterListener(\"COMMAND\");\n\t}", "private void printConsole(String text) {\n\t\tMessage msg = getHandler().obtainMessage(MESSAGE_CONSOLE_CHANGED);\n\t\tmsg.obj = \"\\n\" + text ;\n\t\tmsg.sendToTarget();\t\t\n\t}", "public interface ConsoleIO {\n void write(String line);\n\n}", "@Override\n\tpublic void addConsoleOutputListener(IEventHandler listener) {\n\t\t\n\t}", "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}", "public Hello(Handler handler){\n this.handler = handler;\n }", "protected abstract void registerCommands(CommandHandler handler);", "public static void main(String[] args) {\n\n HttpConnector connector = new HttpConnector();\n Wrapper wrapper = new SimpleWrapper();\n wrapper.setServletClass(\"ModernServlet\");\n Loader loader = new SimpleLoader();\n Valve valve1 = new HeaderLoggerValve();\n Valve valve2 = new ClientIPLoggerValve();// 在这里显示IP\n\n wrapper.setLoader(loader);\n ((Pipeline) wrapper).addValve(valve1);\n ((Pipeline) wrapper).addValve(valve2);\n\n connector.setContainer(wrapper);\n\n try {\n connector.initialize();\n connector.start();\n\n // make the application wait until we press a key.\n System.in.read();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "private Shell() { }", "public Skeleton() throws IOException {\n\t\tconsoleIn = new BufferedReader(new InputStreamReader(System.in));\n\t}", "public static void main(String[] args) {\n stringhandler obj=new stringhandler();\r\n obj.transform(\"Greety\");\r\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}", "com.lxd.protobuf.msg.result.console.Console.Console_ getConsole();", "public static void main(String[] args) {\n\n try (ServerSocket ss = new ServerSocket(PORT)) {\n System.out.println(\"chat.Server is started...\");\n System.out.println(\"Server address: \" + getCurrentIP() + \":\" + PORT);\n\n while (true) {\n Socket socket = ss.accept();\n new Handler(socket).start();\n }\n\n } catch (IOException e) {\n System.out.println(\"chat.Server error.\");\n }\n }", "public static void main(String[] args) {\n\t\tif(args.length == 0){\n\t\t\tstartHeadsUp(new String[] {\"-p\", \"2\", \"-recordNext\", \"-console\"}, new HoldemServerMiddleMan());\n\t\t} else {\n\t\t\tstartHeadsUp(args, new HoldemServerMiddleMan());\n\t\t}\n\t}", "public void process () {\n consoleListenerAndSender.execute(() -> {\n String message = null;\n DataInputStream reader = null;\n try {\n reader = new DataInputStream(new BufferedInputStream(console.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (!isServerAvailable()) {\n message = reader.readUTF();\n\n if (Objects.equals(message, \"/quit\")){\n close();\n setQuitCommandAppear(true);\n break;\n }\n\n sender.sendMessage(message);\n message = null;\n\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n serverListenerAndConsoleWriter.execute(() -> {\n try {\n while (!isServerAvailable()) {\n System.out.println(getter.getInputMessage());\n }\n } catch (IOException e) {\n if (!isQuitCommandAppear()) {\n System.out.println(\"[SERVER ISSUE] server is down.\");\n close();\n setServerAvailable(true);\n }\n else {\n System.out.println(\"Quit...\");\n }\n }\n });\n }", "public void handleCommand(String command);", "public static void main(String[] _args) {\n \n \n Logger logger = LoggerFactory.getLogger(BluezShell.class);\n logger.debug(\"Initializing Shell\");\n \n \n \n try(EmbeddedShell shell = new EmbeddedShell(System.in, System.out, System.err)) {\n // initialize the shell\n shell.initialize(new ShellInitializeCommand(), new ShellDeInitializeCommand());\n // register our commands\n \n // adapter commands\n shell.registerCommand(new ShowBluetoothAdapters());\n shell.registerCommand(new SelectAdapter());\n \n // device commands\n shell.registerCommand(new ScanDevices());\n shell.registerCommand(new ShowDevices());\n \n // start shell\n shell.start(\"bluezShell > \");\n } catch (Exception _ex) {\n // EndOfFileException will occur when using CTRL+D to exit shell\n // UserInterruptException will occur when using CTRL+C\n if (! (_ex instanceof EndOfFileException) && !(_ex instanceof UserInterruptException)) { \n System.err.println(\"Error: (\" + _ex.getClass().getSimpleName() + \"): \" + _ex.getMessage());\n } \n } finally {\n DeviceManager.getInstance().closeConnection();\n logger.debug(\"Deinitializing Shell\");\n }\n\n }", "@NotNull\n CommandResult onConsoleCommand(@NotNull ConsoleCommandSender console,\n @NotNull String[] params);", "public void start(){\r\n\t\tThread cliThread = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tString line= \"1\";\r\n\t\t\t\twhile(!line.equals(\"exit\")) {\r\n\t\t\t\t\tSystem.out.println(\"\\n\");\r\n\t\t\t\t\tfor(String str: commandsSet.keySet())\r\n\t\t\t\t\t\tSystem.out.println(\"* \" + str);\r\n\t\t\t\t\tSystem.out.println(\"\\nEnter command\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tline=in.readLine();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tStringBuilder argusb= new StringBuilder();\r\n\t\t\t\t\t\tStringBuilder command=new StringBuilder();\r\n\t\t\t\t\t\tString[] split=line.split(\" \");\r\n\t\t\t\t\t\tint j=0;\r\n\t\t\t\t\t\tfor (int i =0;i<split.length;i++) {\r\n\t\t\t\t\t\t\tif (split[i].startsWith(\"<\")){\r\n\t\t\t\t\t\t\t\tsplit[i] = split[i].replace(\"<\",\"\");\r\n\t\t\t\t\t\t\t\tsplit[i] = split[i].replace(\">\", \"\");\r\n\t\t\t\t\t\t\t\tsplit[i]= split[i].toLowerCase();\r\n\t\t\t\t\t\t\t\targusb.append(split[i]);\r\n\t\t\t\t\t\t\t\targusb.append(\" \");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcommand.append(\" \");\r\n\t\t\t\t\t\t\t\tcommand.append(split[i]);\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\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcommand.deleteCharAt(0);\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tcontroller.handleUserCommand(command.toString(),argusb.toString().split(\" \"));\r\n\t\t\t\t\t\t}catch (Exception e){\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\targusb=null;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//out.write(\"The Program closed Good Bye\");\r\n\t\t\t{ try {\r\n\t\t\t\tin.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"The In stream can't be close\");\r\n\t\t\t} \r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\t\r\n\t\t\tcliThread.start();\t\r\n\t\t}", "private void initHandlers(){\n\t\thandlers.put((byte) 0x02, new Cmd02());\n\t\t//handlers.put((byte) 0x03, new Cmd03());\n\t\thandlers.put((byte) 0x04, new Cmd04());\n\t\thandlers.put((byte) 0x05, new Cmd05());\n\t\thandlers.put((byte) 0x06, new Cmd06());\n\t\thandlers.put((byte) 0x07, new Cmd07());\n\t\thandlers.put((byte) 0x08, new Cmd08());\n\t\thandlers.put((byte) 0x80, new Cmd80());\n\t\thandlers.put((byte) 0x81, new Cmd81());\n\t\thandlers.put((byte) 0x82, new Cmd82());\n\t\thandlers.put((byte) 0x83, new Cmd83());\n\t\thandlers.put((byte) 0x84, new Cmd84());\n\t\thandlers.put((byte) 0x85, new Cmd85());\n\t\thandlers.put((byte) 0x86, new Cmd86());\n\t}", "public MyViewCLI(InputStreamReader in, OutputStreamWriter out, Controller controller) {\r\n\t\tcli = new CLI(in, out, controller);\r\n\t\tthis.controller = controller;\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}", "private void initializeConsole() {\n\t\tthis.hydraConsole = new HydraConsole(this.stage, this.commands);\n\t\tthis.splitPane.setBottomComponent(this.hydraConsole);\n\t}", "protected void mainTask() {\n\t logger.log(1, CLASS, \"-\", \"impl\",\n\t\t \"About to read command\");\n\t try { \n\t\tcommand = (COMMAND)connection.receive();\n\t\tlogger.log(1,CLASS, \"-\", \"impl\",\n\t\t\t \"Received command: \"+(command == null ? \"no-command\" : command.getClass().getName()));\n\t } catch (IOException e) {\n\t\tinitError(\"I/O error while reading command:[\"+e+\"]\",command);\n\t\treturn;\n\t } catch (ClassCastException ce) {\n\t\tinitError(\"Garbled command:[\"+ce+\"]\", command);\n\t\treturn;\n\t } \n\t \n\t // 2. Create a handler.\n\t if (command == null) {\n\t\tinitError(\"No command set\", null);\n\t\treturn;\n\t }\n\n\t if (handlerFactory != null) {\n\t\thandler = handlerFactory.createHandler(connection, command);\n\t\tif (handler == null) {\n\t\t initError(\"Unable to process command [\"+command.getClass().getName()+\"]: No known handler\", command);\n\t\t return;\n\t\t}\n\t \n\t\t// 3. Handle the request - handler may send multiple updates to client over long period\n\t\thandler.handleRequest();\n\t }\t \n\t}", "public ModuliHandler() {\n\t}", "private void handleCreateCommand() throws IOException,\r\n ClassNotFoundException,\r\n InstantiationException,\r\n IllegalAccessException {\r\n final String className = (String) m_in.readObject();\r\n Class klass = Class.forName(className, false, m_loader);\r\n final Object instance = klass.newInstance();\r\n final String handle = RemoteProxy.wrapInstance(instance);\r\n m_out.writeObject(handle);\r\n m_out.flush();\r\n }", "public static void main(String[]args) {\n\t\n\t \n\tArgsHandler handler = new ArgsHandler(args);\n if (!handler.empty()) {\n handler.execute();\n }\n \n final int exit = 0;\n final int setValues = 1;\n final int getValues = 2;\n final int execute2 = 3;\n final int printResult = 4;\n String word = null;\n \n /**\n * Our dialog menu with checking of input argumet's of program \n */\n do {\n UI.mainMenu();\n UI.enterChoice();\n switch (UI.getChoice()) {\n case exit:\n if (ArgsHandler.isDebug()) {\n System.out.println(\"\\nYou chosen 0. Exiting...\");\n System.out.format(\"%n############################################################### DEBUG #############################################################\");\n }\n break;\n case setValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 1. Setting values...\");\n }\n word = UI.enterValues();\n break;\n case getValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 2. Getting values...\");\n }\n if (word != null ) {\n UI.printText(word);\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break; \n case execute2:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 3. Executing task...\");\n }\n if (word != null) {\n \t final String []lines = NewHelper.DivString(word);\n \t System.out.println(\"\\nTask done...\");\n \t if (ArgsHandler.isDebug()) {\n \t System.out.format(\"%n############################################################### DEBUG #############################################################\");\n \t }\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break;\n case printResult:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.format(\"%nYou chosen 4. \"\n + \"Printing out result...%n\");\n }\n if (word != null) {\n \tfinal String[] lines2 = NewHelper.DivString(word);\n \tfor (final String line2 : lines2) {\n NewHelper.printSymbols(line2);\n NewHelper.printSymbolNumbers(line2);\n \t}\n \tif(ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n } \n \telse {\n System.out.format(\"%nFirst you need to add values.\"); \n }\n break;\n }\n default:\n System.out.println(\"\\nEnter correct number.\");\n }\n } while (UI.getChoice() != 0);\n}", "private Console startConsole( String consoleHost ) throws RemoteException\n {\n Console console = null;\n Registry registry = null;\n int attempt = 0;\n final int numAttempts = 5;\n final int delay = 750; // 0.75 seconds.\n \n if( Launcher.startChameleonConsole( consoleHost ) )\n {\n for( ; attempt < numAttempts; ++attempt )\n {\n try\n {\n registry = LocateRegistry.getRegistry( consoleHost,\n RegistrationManager.PORT );\n console = (Console) registry.lookup( Console.SERVICE_NAME );\n }\n catch( Exception anyException )\n {\n }\n \n if( null == console )\n {\n try\n {\n Thread.sleep( delay );\n }\n catch( InterruptedException interruptedException )\n {\n }\n }\n }\n }\n \n return( console );\n }", "public SpacetimeCLI() {\n world = new World();\n input = new Scanner(System.in);\n jsonReader = new JsonReader(JSON_STORE);\n jsonWriter = new JsonWriter(JSON_STORE);\n runApp();\n }", "public static void main(String[] args) {\n ICommand[] commandRegister = {\n new LeagueCmd(),\n new TeamCmd(),\n new MatchCmd(),\n new LoadCmd(),\n new SaveCmd()\n };\n if (Utils.initSaveFileLocation()) {\n final CommandHandler cmdHandler = new CommandHandler(commandRegister);\n Scanner scanner = new Scanner(System.in);\n boolean isExited = false;\n String userInput;\n String[] exitCmd = {\"exit\", \"quit\", \"close\"};\n\n System.out.println(\"# CompetitionManager.\\nAfin d'afficher la liste des commandes, entrez \\\"help\\\".\");\n Utils.displayBasePath();\n\n while (!isExited) {\n // Boucle de lecture des commandes\n System.out.printf(\"%s> \", renderSelected());\n userInput = scanner.nextLine();\n if (Arrays.asList(exitCmd).contains(userInput)) isExited = true;\n else cmdHandler.handleMessage(userInput);\n }\n } else {\n System.out.println(\"Une erreur est survenue lors de l'initialisation de l'application.\");\n }\n }", "public interface ConsolePrinter {\r\n\r\n\t/**\r\n\t * Prints given text line to console.\r\n\t * \r\n\t * @param line\r\n\t * text to print.\r\n\t */\r\n\tvoid println(String line);\r\n\r\n\t/**\r\n\t * Prints given (formatted) string to current server console.<br>\r\n\t * <i>Note: This method neither throws an exception nor prints anything if a\r\n\t * command line is available but no server console running. Use\r\n\t * {@link EduLog} for that.</i>\r\n\t * \r\n\t * @see Formatter\r\n\t * \r\n\t * @param line\r\n\t * A (format) string that should be printed.\r\n\t * \r\n\t * @param args\r\n\t * Format arguments.\r\n\t * \r\n\t * @throws IllegalFormatException\r\n\t * If a format string contains an illegal syntax, a format\r\n\t * specifier that is incompatible with the given arguments,\r\n\t * insufficient arguments given the format string, or other\r\n\t * illegal conditions. For specification of all possible\r\n\t * formatting errors, see the detail section of\r\n\t * {@link Formatter} class specification.\r\n\t */\r\n\tvoid printlnf(String line, Object... args);\r\n\r\n}", "void showInConsole();", "public static void main(String[] args) {\n AbsHandler absHandler = new AbsHandler();\n AnotherAbsHandler anotherAbsHandler = new AnotherAbsHandler();\n InterfaceHandler interfaceHandler = new InterfaceHandler();\n\n System.out.println(interfaceHandler.sayHello());\n\n System.out.println(absHandler.sayHello());\n System.out.println(anotherAbsHandler.sayHello());\n System.out.println(absHandler.sayHi());\n }", "public static ConsoleHelper getInstance() {\n\treturn helper;\n }", "private ConsoleUtils(String name) {\n instance = this;\n fConsole = new IOConsole(\"Mobius\" + name + \" Console\", EImages.TOOL.getDescriptor());\n fConsole.activate();\n ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{fConsole});\n final Display display = PlatformUI.getWorkbench().getDisplay();\n fRed = new Color(display, RED);\n fBlue = new Color(display, BLUE);\n fPurple = new Color(display, PURPLE);\n fBlack = new Color(display, BLACK);\n }", "public void run() {\n\t\t\tconsole.run();\n\t\t}", "public static void main(String[] args) throws IOException {\n\n\n Menu.displayMenu();\n }", "public interface Console {\n\n void writeMessage(String msg);\n void writeMessage(String msg, Object... args) throws FormatStringException, IllegalFormatCodeException;\n\n String readString();\n String readLine();\n\n int readInteger();\n\n}", "void createHandler(final String handlerClassName);", "protected abstract void runHandler();", "public static void main(String[] args)\n {\n MessageHandler runner = new MessageHandler();\n runner.processArgs(args);\n \n String command = runner.getConfiguration(\"command\");\n String host = runner.getConfiguration(\"host\");\n int port = runner.getConfiguration().getInt(\"port\");\n \n boolean isStart = false;\n boolean isRestart = false;\n boolean isStatus = false;\n \n if ( true ) {\n if (command.equalsIgnoreCase(\"shutdown\")){\n command = SHUTDOWN;\n }\n else if(command.equalsIgnoreCase(\"status\")) {\n command = STATUS;\n isStatus = true;\n } else if(command.equalsIgnoreCase(\"restart\")) {\n command = RESTART;\n }\n else if( command.equalsIgnoreCase(\"start\") ){\n command = START;\n isStart = true;\n }\n }\n \n if( port > -1 ) {\n if( !isStart ){\n boolean needsStarted = false;\n \n try {\n runner.client(host, port,command);\n } catch(IOException ex) {\n String showCommand = command;\n if ( showCommand != null)\n showCommand = command;\n Helper.writeLog(1,\"unable to send command: '\" + showCommand + \"' stack: \" + ex.toString());\n if( isStatus ){\n needsStarted = true;\n }\n }\n \n if( isRestart ){\n try {\n command = START + \"@\" + SECRETCODE;\n \n runner.client(host, port,command);\n } catch(IOException ex) {\n String showCommand = command;\n if ( showCommand != null)\n showCommand = command;\n Helper.writeLog(1,\"unable to send command: '\" + showCommand + \"' stack: \" + ex.toString());\n }\n }\n\n if( needsStarted ){\n runner.startServer(port);\n }\n else {\n System.exit(0);\n }\n }\n else {\n runner.startServer(port);\n }\n }\n }", "public static void main(String[] args) {\n MyShell ms = new MyShell(args);\n }", "public AbstractCommand()\n {\n this.logger = new ConsoleLogger();\n }", "@objid (\"9a6323cb-12ea-11e2-8549-001ec947c8cc\")\n private static MHandler createAndActivateHandler(MCommand command, IModule module, IModuleAction action, MPart view) {\n Object handler = new ExecuteModuleActionHandler(module, action);\n // Fit it into a MHandler\n MHandler mHandler = MCommandsFactory.INSTANCE.createHandler();\n mHandler.setObject(handler);\n // mHandler.setElementId(command.getElementId().replace(\"command\",\n // \"handler\"));\n // Bind it to the corresponding command\n mHandler.setCommand(command);\n // Define scope of this handler as the browser view.\n view.getHandlers().add(mHandler);\n return mHandler;\n }", "public static void main(String[] args) {\n\n // create an object to call the instance methods\n Nimsys engine = new Nimsys();\n\n // game welcome instruction\n System.out.println(\"Welcome to Nim\\n\");\n System.out.println(\"Please enter a command to continue\\n\");\n\n // command is for receiving the command from user\n String command;\n\n\n while (true) {\n\n // output the symbol for entering\n System.out.print(\"$ \");\n\n // every input is using next to avoid getting the content\n // in the keyboard buffer\n command = sc.nextLine();\n\n if (command.equalsIgnoreCase(\"start\")) {\n System.out.println();\n engine.start();\n } else if (command.equalsIgnoreCase(\"help\")) {\n engine.help();\n } else if (command.equalsIgnoreCase(\"exit\")) {\n System.out.println();\n engine.exit();\n break;\n } else if (command.equalsIgnoreCase(\"commands\")) {\n System.out.println();\n engine.command();\n }\n }\n System.out.println();\n }", "public static void main(String[] args) {\n\t\tConsole console = System.console();\n\t\tSystem.out.println(\"console value is : \" + console);\n\t\t\n\t\tString name = console.readLine();\n\t\t\n\t\tSystem.out.println(\"Enter input is: \" + name);\n\t}", "public void console() throws RemoteException {\r\n Scanner in = new Scanner(System.in);\r\n do {\r\n System.out.println(\"Select one of the following options:\");\r\n System.out.println(\" 1: Be a publisher\");\r\n System.out.println(\" 2: Be a subscriber\");\r\n System.out.println(\" 3: Save & quit\");\r\n System.out.print(\"Enter a number:\");\r\n int choice = 0;\r\n try {\r\n choice = in.nextInt();\r\n } catch (Exception e) {\r\n System.err.println(\"Provide a Valid Option... \");\r\n }\r\n switch (choice) {\r\n case 1: {\r\n optionsForPublisher();\r\n break;\r\n }\r\n case 2: {\r\n optionsForSubscriber();\r\n break;\r\n }\r\n case 3: {\r\n in.close();\r\n saveState();\r\n break;\r\n }\r\n default: System.out.println(\"Input not recognized, Please enter a valid option...\");\r\n }\r\n } while (true);\r\n }", "public interface CommandHandler {\n\n\t/**\n\t * Receive and handle the given Command.\n\t * @param c The Command to be handled.\n\t */\n\tpublic void handleCommand(String command);\n}", "@RequestMapping(value = \"/console\", method = RequestMethod.POST)\n @ResponseStatus(value = HttpStatus.CREATED)\n public Console addConsole(@RequestBody @Valid Console console) {\n return serviceLayer.addConsole(console);\n }", "public static void main(String[] args){\n new BlackJackConsole();\n }", "public static void main(String[] args) {\n\t\tnew MenuController();\n\n\t}", "public static void setUp() {\n Handler handler = new LoggerHandler();\n handler.setFormatter(new SimpleFormatter());\n getInstance().addHandler(handler);\n }", "public static void main(String[] args) {\n Shell mainShell = new Shell();\n // Continue to keep the shell opened as long as the user does not close\n // it\n while (mainShell.getStatus()) {\n mainShell.display();\n }\n\n }", "public static void main(String[] args) {\n\t\tClient client = new Client();\n\t\tClientMenu cm = new ClientMenu(\"localhost\", 7966, client);\n\t\tclient.addObserver(cm);\n\t}", "public static void main(String[] args) {\n // parses the command-line arguments\n ICmdHandler cmdHandler = new CmdHandler(args);\n if (!cmdHandler.isValid()) {\n throw new InvalidInputArgumentException(cmdHandler.getErrorMessage());\n }\n\n // creates the socket\n String hostname = cmdHandler.getHostname();\n int portNumber = cmdHandler.getPortNumber();\n Socket socket = createSocket(hostname, portNumber);\n\n // initializes a new player and starts the game\n IPlayer player = new YahtzeePlayer(socket);\n player.playGame();\n }", "public static void main(String[] args) {\n\t\ttry{\n\t\t\tEcho echo = new Echo(false);\n\t\t\techo.startEcho();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\t\t\tHandler h1 = new Handler1();\n\t\t\t\tHandler h2 = new Handler2();\n\t\t\t\tHandler h3 = new Handler3();\n\t\t\t\th1.setNextHandler(h3);\n\t\t\t\th3.setNextHandler(h2);\n\t\t\t\th2.setNextHandler(null);\n\n\t\t\t\th1.handleRequest(new Request(\"Value \", 4));\n\t\t\t\th1.handleRequest(new Request(\"Value \", -5));\n\t\t\t\th1.handleRequest(new Request(\"Value \", 45));\n\n\t}", "public CallAppAbilityConnnectionHandler createHandler() {\n EventRunner create = EventRunner.create();\n if (create != null) {\n return new CallAppAbilityConnnectionHandler(create);\n }\n HiLog.error(LOG_LABEL, \"createHandler: no runner.\", new Object[0]);\n return null;\n }", "public void launch() throws IOException {\n initBinding();\n var request = this.password == null ? new AnonymousConnection(login)\n : new AuthentificatedConnection(login, password);\n\n this.uniqueContext.putInQueue(request.toBuffer());\n console.setDaemon(true);\n console.start();// run stdin thread\n\n var lastCheck = System.currentTimeMillis();\n while (!Thread.interrupted()) {\n // printKeys();\n try {\n if (uniqueContext.isClosed()) {\n console.interrupt();\n selector.close();\n serverSocketChannel.close();\n sc.close();\n return;\n }\n selector.select(this::treatKey);\n processCommands();\n var currentTime = System.currentTimeMillis();\n if (currentTime >= lastCheck + TIMEOUT) {\n lastCheck = currentTime;\n clearInvalidSelectionKey();\n }\n } catch (UncheckedIOException tunneled) {\n throw tunneled.getCause();\n }\n }\n }" ]
[ "0.66510934", "0.6511327", "0.63791555", "0.63607377", "0.62594044", "0.61983514", "0.6193738", "0.60693264", "0.6055734", "0.591574", "0.59015995", "0.58775336", "0.58143955", "0.57822037", "0.57579464", "0.5665142", "0.5656477", "0.5649337", "0.56219244", "0.56010514", "0.55979645", "0.55718744", "0.5569562", "0.5538816", "0.55287576", "0.55287385", "0.5513681", "0.54928637", "0.54928493", "0.5487332", "0.54635453", "0.5458529", "0.5450634", "0.54503864", "0.5446971", "0.5430632", "0.54242575", "0.54120743", "0.54120165", "0.54115885", "0.54067326", "0.54015195", "0.53918284", "0.5371669", "0.5371135", "0.53499717", "0.53435874", "0.53416896", "0.53366196", "0.53186864", "0.53182584", "0.5301567", "0.5300603", "0.5294236", "0.5289984", "0.5278599", "0.52771986", "0.52698857", "0.52594054", "0.52587813", "0.52545995", "0.5253996", "0.5251357", "0.5241244", "0.5238041", "0.52309763", "0.52270085", "0.5224442", "0.52173686", "0.52093035", "0.52044404", "0.5201171", "0.5191947", "0.5186756", "0.5173943", "0.5173771", "0.5166247", "0.5158353", "0.5153215", "0.51504815", "0.5144233", "0.5138315", "0.5125185", "0.51198196", "0.51136774", "0.5112641", "0.5112456", "0.5108981", "0.5105617", "0.51026386", "0.50990146", "0.50983727", "0.5094045", "0.50915426", "0.50836545", "0.5083605", "0.5083499", "0.50786406", "0.5063863", "0.505982" ]
0.80604166
0
/ Create XML Formatted Log File
public FileHandler createXmlFileHandler ( String fileName , boolean append ) { FileHandler xmlFileHandler = null; try { xmlFileHandler = new FileHandler(fileName, append); } catch (SecurityException | IOException e) { e.printStackTrace(); } return xmlFileHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toXML() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"<logfilter>\\n\");\n\t\t// write description\n\t\tsb.append(\"<description>\" + description + \"</description>\\n\");\n\t\t// write logdata\n\t\tsb.append(\"<logdata>\" + logData + \"</logdata>\");\n\t\t// write accepted types\n\t\tsb.append(\"<acceptedtypes>\\n\");\n\t\tif (acceptedEventTypes != null) { \n\t\t\tSet<String> keys = acceptedEventTypes.keySet();\n\t\t\tfor (String key : keys) {\n\t\t\t\tsb.append(\"<class priority=\\\"\" + acceptedEventTypes.get(key) + \"\\\">\" + key + \"</class>\\n\");\n\t\t\t}\n\t\t}\n\t\tsb.append(\"</acceptedtypes>\\n\");\n\t\t\n\t\tsb.append(\"</logfilter>\");\n\t\t\n\t\treturn sb.toString();\n\t}", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}", "private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "public String createLogInfo() {\n String res = TXN_ID_TAG + REGEX + this.txnId + \"\\n\" +\n TXN_STATUS_TAG + REGEX + this.txnStatus + \"\\n\";\n if (this.readKeyList != null && this.readKeyList.length != 0) {\n for (String readKey : this.readKeyList) {\n res += TXN_READ_TAG + REGEX + readKey + \"\\n\";\n }\n }\n \n if (this.writeKeyList != null && this.writeKeyList.length != 0) {\n for (int i = 0; i < this.writeKeyList.length; i++) {\n res += TXN_WRITE_TAG + REGEX + this.writeKeyList[i] + \"\\n\";\n res += TXN_VAL_TAG + REGEX + this.writeValList[i] + \"\\n\";\n }\n }\n \n return res;\n }", "public XmlWriter(String filename, String logFile, Vector dirs) throws IOException {\n\t\tout = new FileOutputStream(filename);\n\t\tstack = new Stack();\n\t\tindent = 0;\n\n\t\twriteProlog();\n\n\t\ttag = Xml.TAG_ROOT;\n\t\twriteDTD(tag);\n\t\ttag += addAttr(Xml.ATTR_LOGFILE, logFile);\n\t\ttag += addAttr(Xml.ATTR_TIMESTAMPWRITEBACK, DirSync.getSync().isWriteTimestampBack());\n\t\ttag += addAttr(Xml.ATTR_TIMESTAMPDIFF, DirSync.getSync().getMaxTimestampDiff());\n\t\ttag += addAttr(Xml.ATTR_SKIP_LINKS, DirSync.getSync().isSkipLinks());\n\t\twriteStartTag(tag);\n\n\t\tfor (Iterator iter = dirs.iterator(); iter.hasNext();) {\n\t\t\tDirectory dir = (Directory) iter.next();\n\n\t\t\ttag = Xml.TAG_DIR;\n\t\t\ttag += addAttr(Xml.ATTR_NAME, dir.getName());\n\t\t\ttag += addAttr(Xml.ATTR_SRC, dir.getSrc());\n\t\t\ttag += addAttr(Xml.ATTR_DST, dir.getDst());\n\t\t\ttag += addAttr(Xml.ATTR_WITHSUBFOLDERS, dir.isWithSubfolders());\n\t\t\ttag += addAttr(Xml.ATTR_VERIFY, dir.isVerify());\n\t\t\ttag += addAttr(Xml.ATTR_FILE_INCLUDE, dir.getFileInclude());\n\t\t\ttag += addAttr(Xml.ATTR_FILE_EXCLUDE, dir.getFileExclude());\n\t\t\ttag += addAttr(Xml.ATTR_DIR_INCLUDE, dir.getDirInclude());\n\t\t\ttag += addAttr(Xml.ATTR_DIR_EXCLUDE, dir.getDirExclude());\n\t\t\ttag += addAttr(Xml.ATTR_LOGFILE, dir.getLogfile());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_ALL, dir.isCopyAll());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_LARGER, dir.isCopyLarger());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_LARGERMODIFIED, dir\n\t\t\t\t\t.isCopyLargerModified());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_MODIFIED, dir.isCopyModified());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_NEW, dir.isCopyNew());\n\t\t\ttag += addAttr(Xml.ATTR_DEL_FILES, dir.isDelFiles());\n\t\t\ttag += addAttr(Xml.ATTR_DEL_DIRS, dir.isDelDirs());\n\t\t\twriteEmptyTag(tag);\n\t\t}\n\n\t\twriteEndTag();\n\t}", "public File makeXML(String key, int layerID, String value1, String time1, int totalCopies1, int copyNum1, boolean timerType1, String userId, String time, Certificate cert) {\n\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n Element key1 = document.createElement(\"Search_Result_for\" + key);\n document.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element layerid = document.createElement(\"layerid\");\n\n key1.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(layerID));\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value1));\n layerid.appendChild(Value);\n\n Element timer = document.createElement(\"timer\");\n timer.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(timer);\n\n Element totcopies = document.createElement(\"totcopies\");\n totcopies.appendChild(document.createTextNode(String.valueOf(totalCopies1)));\n layerid.appendChild(totcopies);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum1)));\n layerid.appendChild(copynum);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType1)));\n layerid.appendChild(timertype);\n\n Element userid = document.createElement(\"userid\");\n userid.appendChild(document.createTextNode(userId));\n layerid.appendChild(userid);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(time2);\n\n /*Element cert1 = document.createElement(\"cert\");\n cert1.appendChild(document.createTextNode(String.valueOf(cert)));\n layerid.appendChild((Node) cert);*/\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(layerID + \"_Search Result for \" + key + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n System.out.println(\"Done creating XML File\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(layerID + \"_Search Result for \" + key + \".xml\");\n return file;\n }", "public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"ReadConfigLog.txt\");\n\t\t\t\tFileWriter gpxwriter = new FileWriter(gpxfile);\n\t\t\t\tout = new BufferedWriter(gpxwriter);\n\t\t\t\tout.write(\"Hello world\");\n\t\t\t\t// out.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"SD CARD READ ERROR : \", \"Problem reading SD CARD\");\n\t\t\tLog.e(\"SD CARD LOG ERROR : \", \"Please take logs using Logcat\");\n\t\t\tLog.e(\"<<<<<<<<<<WifiPreference>>>>>>>>>>>>\",\n\t\t\t\t\t\"Could not write file \" + e.getMessage());\n\t\t}\n\t}", "public void toXML(PrintWriter pw) {\n pw.println(\"<crontabentry>\");\n pw.println(\"<id>\" + id + \"</id> \");\n pw.println(\"<classname>\" + className + \"</classname> \");\n pw.println(\"<methodname>\" + methodName + \"</methodname> \");\n if (bextraInfo) {\n for (int i = 0; i < extraInfo.length; i++) {\n pw.println(\"<extrainfo parameter = \\\"\" + i + \"\\\" >\");\n pw.println(extraInfo[i] + \" </extrainfo>\");\n }\n }\n pw.println(\"<calendar>\" + cal + \" </calendar>\");\n pw.println(\"<timemillis>\" + timeMillis + \"</timemillis> \");\n pw.println(\"</crontabentry>\");\n }", "protected static void writeXML(String path, String ID, String abs,String cls) {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder;\r\n try {\r\n dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.newDocument();\r\n //add elements to Document\r\n Element rootElement =doc.createElement(\"Data\");\r\n //append root element to document\r\n doc.appendChild(rootElement);\r\n\r\n rootElement.appendChild(getReviewsPositive(doc, ID, abs,cls));\r\n //for output to file, console\r\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n Transformer transformer = transformerFactory.newTransformer();\r\n //for pretty print\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n\r\n //write to console or file\r\n StreamResult console = new StreamResult(System.out);\r\n StreamResult file = new StreamResult(new File(path+\"\"+ID+\".xml\"));\r\n\r\n //write data\r\n transformer.transform(source, console);\r\n transformer.transform(source, file);\r\n //System.out.println(\"DONE\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\t}", "public void printXmlPath(StackTraceElement l) throws IOException {\n\t\t String packageNameOnly = l.getClassName().substring(0, l.getClassName().lastIndexOf(\".\"));\n\t\t String classNameOnly = l.getClassName().substring(1 + l.getClassName().lastIndexOf(\".\"), l.getClassName().length());\n\t\t String xml = \"<class name=\\\"\" + packageNameOnly + \".\" + classNameOnly + \"\\\"><methods><include name=\\\"\" + l.getMethodName() + \"\\\"/></methods></class>\";\n\t\t\t fileWriterPrinter(\" XML Path: \" + xml);\n\t\t\t// Renew XML record:\n\t\t\t fileCleaner(\"xml.path\");\n\t\t\t fileWriter( \"xml.path\", xml);\n\t\t\t// Renew Stack Trace Element record:\n\t\t\t fileCleaner(\"stack.trace\");\n\t\t\t fileWriter( \"stack.trace\", l);\n\t\t\t// Append a New Log record:\n\t\t\t if (fileExist(\"run.log\", false)) { fileWriter(\"run.log\", \" XML Path: \" + xml); } \n\t\t}", "protected abstract void toXml(PrintWriter result);", "private String writeValidXMLFile() throws java.io.IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"06010101\\\">\");\n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>3</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>200.0</plot_lenX>\");\n oOut.write(\"<plot_lenY>200.0</plot_lenY>\");\n oOut.write(\"<plot_precip_mm_yr>1150.645781</plot_precip_mm_yr>\");\n oOut.write(\"<plot_temp_C>12.88171785</plot_temp_C>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_3\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_4\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_5\\\" />\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_3\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_4\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_5\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_3\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_4\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_5\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_sizeClasses>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s1.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s10.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s20.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s30.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s40.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s50.0\\\"/>\");\n oOut.write(\"</tr_sizeClasses>\");\n oOut.write(\"<tr_initialDensities>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_2\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_3\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_4\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_5\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"</tr_initialDensities>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_3\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_4\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_5\\\">39.48</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_3\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_4\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_5\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_3\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_4\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_5\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_3\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_4\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_5\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_3\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_4\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_5\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_3\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_4\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_5\\\">0.389</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_3\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_4\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_5\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_3\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_4\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_5\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_3\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_4\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_5\\\">0.0299</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_3\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_4\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_5\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_3\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_4\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_5\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_3\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_4\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_5\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_3\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_4\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_5\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_3\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_4\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_5\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_3\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_4\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_5\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_3\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_4\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_5\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>QualityVigorClassifier</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_3\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_4\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_5\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<QualityVigorClassifier1>\");\n oOut.write(\"<ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>10</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>20</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.78</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.88</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.61</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.64</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">1</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.55</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>20</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>30</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.33</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.81</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.64</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.32</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.32</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.69</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.58</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>30</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>40</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.34</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.57</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.26</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.46</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.13</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.36</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.66</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.45</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"</ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierVigBeta0>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_2\\\">0.1</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_3\\\">0</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_4\\\">0.3</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_5\\\">0.4</ma_cvb0Val>\");\n oOut.write(\"</ma_classifierVigBeta0>\");\n oOut.write(\"<ma_classifierVigBeta11>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_2\\\">0.2</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_3\\\">2.35</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_4\\\">0.1</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_5\\\">2.43</ma_cvb11Val>\");\n oOut.write(\"</ma_classifierVigBeta11>\");\n oOut.write(\"<ma_classifierVigBeta12>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_2\\\">-2.3</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_3\\\">1.12</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_4\\\">0.32</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_5\\\">1.3</ma_cvb12Val>\");\n oOut.write(\"</ma_classifierVigBeta12>\");\n oOut.write(\"<ma_classifierVigBeta13>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_2\\\">0.13</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_3\\\">1</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_4\\\">-0.2</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_5\\\">1</ma_cvb13Val>\");\n oOut.write(\"</ma_classifierVigBeta13>\");\n oOut.write(\"<ma_classifierVigBeta14>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_2\\\">0.9</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_3\\\">0</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_4\\\">-1</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_5\\\">0</ma_cvb14Val>\");\n oOut.write(\"</ma_classifierVigBeta14>\");\n oOut.write(\"<ma_classifierVigBeta15>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_2\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_3\\\">0.25</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_4\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_5\\\">-0.45</ma_cvb15Val>\");\n oOut.write(\"</ma_classifierVigBeta15>\");\n oOut.write(\"<ma_classifierVigBeta16>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_2\\\">1</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_3\\\">0.36</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_4\\\">0</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_5\\\">0.46</ma_cvb16Val>\");\n oOut.write(\"</ma_classifierVigBeta16>\");\n oOut.write(\"<ma_classifierVigBeta2>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_2\\\">0.01</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_3\\\">0.02</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_4\\\">0.04</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_5\\\">0.1</ma_cvb2Val>\");\n oOut.write(\"</ma_classifierVigBeta2>\");\n oOut.write(\"<ma_classifierVigBeta3>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_2\\\">0.001</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_3\\\">0.2</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_4\\\">0.3</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_5\\\">0.4</ma_cvb3Val>\");\n oOut.write(\"</ma_classifierVigBeta3>\");\n oOut.write(\"<ma_classifierQualBeta0>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_2\\\">0.25</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_3\\\">1.13</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_4\\\">0</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_5\\\">1.15</ma_cqb0Val>\");\n oOut.write(\"</ma_classifierQualBeta0>\");\n oOut.write(\"<ma_classifierQualBeta11>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_2\\\">0.36</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_3\\\">0</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_4\\\">0.4</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_5\\\">0</ma_cqb11Val>\");\n oOut.write(\"</ma_classifierQualBeta11>\");\n oOut.write(\"<ma_classifierQualBeta12>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_2\\\">0.02</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_3\\\">10</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_4\\\">0.3</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_5\\\">30</ma_cqb12Val>\");\n oOut.write(\"</ma_classifierQualBeta12>\");\n oOut.write(\"<ma_classifierQualBeta13>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_2\\\">0.2</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_3\\\">10</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_4\\\">-0.3</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_5\\\">30</ma_cqb13Val>\");\n oOut.write(\"</ma_classifierQualBeta13>\");\n oOut.write(\"<ma_classifierQualBeta14>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_2\\\">-0.2</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_3\\\">10</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_4\\\">-0.4</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_5\\\">30</ma_cqb14Val>\");\n oOut.write(\"</ma_classifierQualBeta14>\");\n oOut.write(\"<ma_classifierQualBeta2>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_2\\\">-0.2</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_3\\\">10</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_4\\\">0</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_5\\\">30</ma_cqb2Val>\");\n oOut.write(\"</ma_classifierQualBeta2>\");\n oOut.write(\"<ma_classifierQualBeta3>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_2\\\">1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_3\\\">10</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_4\\\">0.1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_5\\\">30</ma_cqb3Val>\");\n oOut.write(\"</ma_classifierQualBeta3>\");\n oOut.write(\"<ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_2\\\">0.1</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_3\\\">0.25</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_4\\\">0.5</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_5\\\">0.74</ma_cnapvVal>\");\n oOut.write(\"</ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_2\\\">0.9</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_3\\\">0.25</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_4\\\">0.3</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_5\\\">0.74</ma_cnapsVal>\");\n oOut.write(\"</ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_classifierDeciduous>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_2\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_3\\\">0</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_4\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_5\\\">0</ma_cdVal>\");\n oOut.write(\"</ma_classifierDeciduous>\");\n oOut.write(\"</QualityVigorClassifier1>\");\n oOut.write(\"</paramFile>\");\n\n oOut.close();\n return sFileName;\n }", "public String toXML(int indent) {\n\t\tStringBuffer xmlBuf = new StringBuffer();\n\t\t//String xml = \"\";\n\n\t\tsynchronized (xmlBuf) {\n\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"<ScheduleEvent>\\n\");\n\t\t\t//xml += \"<ScheduleEvent>\\n\";\n\n\t\t\tindent++;\n\n\t\t\tif (crid != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Program crid=\\\"\");\n\t\t\t\txmlBuf.append(crid.getCRID());\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml = xml + \"<Program crid=\\\"\"+crid.getCRID()+\"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (programURL != null) {\n\t\t\t\txmlBuf.append(programURL.toXML(indent));\n\t\t\t\txmlBuf.append(\"\\n\");\n\t\t\t\t//xml = xml + programURL.toXML(indent) + \"\\n\";\n\t\t\t}\n\n\t\t\tif (imi != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<InstanceMetadataId>\");\n\t\t\t\txmlBuf.append(imi.getInstanceMetadataId());\n\t\t\t\txmlBuf.append(\"</InstanceMetadataId>\\n\");\n\t\t\t\t//xml = xml +\n\t\t\t\t// \"<InstanceMetadataId>\"+imi.getInstanceMetadataId()+\"</InstanceMetadataId>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedStartTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedStartTime>\");\n\t\t\t\txmlBuf\n\t\t\t\t\t\t.append(TimeToolbox\n\t\t\t\t\t\t\t\t.makeTVATimeString(publishedStartTime));\n\t\t\t\txmlBuf.append(\"</PublishedStartTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedStartTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedStartTime) +\n\t\t\t\t// \"</PublishedStartTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedEndTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedEndTime>\");\n\t\t\t\txmlBuf.append(TimeToolbox.makeTVATimeString(publishedEndTime));\n\t\t\t\txmlBuf.append(\"</PublishedEndTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedEndTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedEndTime) +\n\t\t\t\t// \"</PublishedEndTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedDuration != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedDuration>\");\n\t\t\t\txmlBuf.append(publishedDuration.getDurationAsString());\n\t\t\t\txmlBuf.append(\"</PublishedDuration>\\n\");\n\t\t\t\t//xml += \"<PublishedDuration>\"+\n\t\t\t\t// publishedDuration.getDurationAsString() +\n\t\t\t\t// \"</PublishedDuration>\\n\";\n\t\t\t}\n\n\t\t\tif (live != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Live value=\\\"\");\n\t\t\t\txmlBuf.append(live);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Live value=\\\"\" + live + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (repeat != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Repeat value=\\\"\");\n\t\t\t\txmlBuf.append(repeat);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Repeat value=\\\"\" + repeat + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (firstShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<FirstShowing value=\\\"\");\n\t\t\t\txmlBuf.append(firstShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<FirstShowing value=\\\"\" + firstShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (lastShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<LastShowing value=\\\"\");\n\t\t\t\txmlBuf.append(lastShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<LastShowing value=\\\"\" + lastShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (free != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Free value=\\\"\");\n\t\t\t\txmlBuf.append(free);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Free value=\\\"\" + free + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (ppv != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PayPerView value=\\\"\");\n\t\t\t\txmlBuf.append(ppv);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<PayPerView value=\\\"\" + ppv + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < indent - 1; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"</ScheduleEvent>\");\n\t\t\t//xml += \"</ScheduleEvent>\";\n\n\t\t\treturn xmlBuf.toString();\n\t\t}\n\t}", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "protected abstract String createMessage(XMLLogHelper logHelper);", "private void saveXML_FTP(String yearId, String templateId, String schoolCode,Restrictions r) {\n String server = \"192.168.1.36\";\r\n int port = 21;\r\n String user = \"david\";\r\n String pass = \"david\";\r\n DocumentBuilderFactory icFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder icBuilder;\r\n FTPClient ftpClient = new FTPClient();\r\n try {\r\n ftpClient.connect(server, port);\r\n ftpClient.login(user, pass);\r\n\r\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\tDate date = new Date();\r\n\t//System.out.println(dateFormat.format(date)); //2016/11/16 12:08:43\r\n String fecha = dateFormat.format(date);\r\n fecha = fecha.replace(\" \", \"_\");\r\n fecha = fecha.replace(\"/\", \"_\");\r\n fecha = fecha.replace(\":\", \"_\");\r\n String filename = yearId + \"_\" + templateId+\"_\"+fecha+\".xml\";\r\n String rutaCarpeta = \"/Schedules/\" + schoolCode;\r\n\r\n if (!ftpClient.changeWorkingDirectory(rutaCarpeta));\r\n {\r\n ftpClient.changeWorkingDirectory(\"/Schedules\");\r\n ftpClient.mkd(schoolCode);\r\n ftpClient.changeWorkingDirectory(schoolCode);\r\n }\r\n\r\n icBuilder = icFactory.newDocumentBuilder();\r\n Document doc = icBuilder.newDocument();\r\n Element mainRootElement = doc.createElementNS(\"http://eduwebgroup.ddns.net/ScheduleWeb/enviarmensaje.htm\", \"Horarios\");\r\n doc.appendChild(mainRootElement);\r\n Element students = doc.createElement(\"Students\");\r\n // append child elements to root element\r\n \r\n for (Course t : r.courses) {\r\n for (int j = 0; j < t.getArraySecciones().size(); j++) {\r\n for (int k = 0; k < t.getArraySecciones().get(j).getIdStudents().size(); k++) { \r\n students.appendChild(getStudent(doc,\"\"+t.getArraySecciones().get(j).getIdStudents().get(k),\"\"+t.getIdCourse(),\"\"+(j+1),yearId,\"\"+t.getArraySecciones().get(j).getClassId())); \r\n } \r\n }\r\n }\r\n \r\n Element cursos = doc.createElement(\"Courses\");\r\n for (Course t : r.courses) {\r\n for (int j = 1; j < t.getArraySecciones().size(); j++) {\r\n //if()\r\n cursos.appendChild(getCursos(doc,\"\"+t.getIdCourse(),\"\"+j,\"\"+t.getArraySecciones().get(j).getIdTeacher(),yearId,\"\"+t.getArraySecciones().get(j).getClassId()));\r\n }\r\n }\r\n \r\n//private Node getBloques(Document doc, String day, String begin, String tempId, String courseId, String section) {\r\n \r\n Element bloques = doc.createElement(\"Blocks\");\r\n for (Course t : r.courses) {\r\n /* for (int i = 0; i < TAMY; i++) {\r\n for (int j = 0; j < TAMX; j++) {\r\n \r\n if ( !t.getHuecos()[j][i].contains(\"0\")) {\r\n if(t.getHuecos()[j][i].contains(\"and\")){\r\n String[] partsSections = t.getHuecos()[j][i].split(\"and\");\r\n for (String partsSection : partsSections) {\r\n String seccionClean = partsSection.replace(\" \", \"\");\r\n if(!seccionClean.equals(\"0\"))bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),seccionClean,yearId));\r\n }\r\n }\r\n else\r\n bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),\"\"+t.getHuecos()[j][i],yearId));\r\n }\r\n }\r\n }*/\r\n for (int i = 0; i < t.getArraySecciones().size(); i++) {\r\n for (int j = 0; j < t.getArraySecciones().get(i).getPatronUsado().size(); j++) {\r\n int col = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).x +1;\r\n int row = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).y +1;\r\n \r\n bloques.appendChild(getBloques(doc,\"\"+(col),\"\"+(row),templateId,\"\"+t.getIdCourse(),\"\"+t.getArraySecciones().get(i).getNumSeccion(),yearId,\"\"+t.getArraySecciones().get(i).getClassId(),\"\"+t.getArraySecciones().get(i).getPatternRenweb()));\r\n }\r\n }\r\n }\r\n \r\n /* students.appendChild(getCompany(doc, \"Paypal\", \"Payment\", \"1000\"));\r\n students.appendChild(getCompany(doc, \"eBay\", \"Shopping\", \"2000\"));\r\n students.appendChild(getCompany(doc, \"Google\", \"Search\", \"3000\"));*/\r\n \r\n mainRootElement.appendChild(students);\r\n mainRootElement.appendChild(cursos);\r\n mainRootElement.appendChild(bloques);\r\n // output DOM XML to console \r\n /*Transformer transformer = TransformerFactory.newInstance().newTransformer();\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n StreamResult console = new StreamResult(System.out);\r\n transformer.transform(source, console);\r\n*/\r\n\r\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\r\n Source xmlSource = new DOMSource(doc);\r\n Result outputTarget = new StreamResult(outputStream);\r\n TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget);\r\n InputStream is = new ByteArrayInputStream(outputStream.toByteArray());\r\n\r\n ftpClient.storeFile(filename, is);\r\n ftpClient.logout();\r\n\r\n } catch (Exception ex) {\r\n System.err.println(\"\");\r\n }\r\n\r\n }", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "abstract void toXML(StringBuilder xml, int level);", "public void createXMLFileForNOC(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\t//for(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\t/*Element schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);*/\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t//}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "public void writeXML() throws IOException {\n OutputFormat format = OutputFormat.createPrettyPrint();//th format of xml file\n XMLWriter xmlWriter =new XMLWriter( new FileOutputStream(file), format);\n xmlWriter.write(document);//write the new xml into the file\n xmlWriter.flush();\n }", "public void writeToXmlFile(String xmlFile, Constraint constraint) {\n\t\tDocument xmlDocument = XmlDocument.newDocument();\n\t\t\n\t\tElement rootElement = xmlDocument.createElement(XML_ROOT);\n\t\trootElement.setAttribute(XML_NUM_ATTRS, \"2\");\n\t\trootElement.setAttribute(XML_ATTR + \"1\", XML_INFO1);\n\t\trootElement.setAttribute(XML_ATTR + \"2\", XML_INFO2);\n\t\txmlDocument.appendChild(rootElement);\n\t\t\n\t\tCollections.sort(nameValuePairs, SortNameValuePairByName.inst);\n\t\t\n\t\tfor (NameValuePair pair : nameValuePairs) {\n\t\t\tElement element = createXmlElementForNameValuePair(pair.getName(), pair.getValue(), xmlDocument, constraint);\n\t\t\tif (element != null)\n\t\t\t\trootElement.appendChild(element);\n\t\t}\n\t\t\n\t\tXmlDocument.writeXmlDocumentToFile(xmlDocument, xmlFile);\n\t}", "private static String generateXML(String userName, String hash,\n String userID, String ipAddress, String paymentToolNumber,\n String expDate, String cvc, String orderID, String amount,\n String currency) {\n\n try {\n // Create instance of DocumentBuilderFactory\n DocumentBuilderFactory factory = DocumentBuilderFactory\n .newInstance();\n // Get the DocumentBuilder\n DocumentBuilder docBuilder = factory.newDocumentBuilder();\n // Create blank DOM Document\n Document doc = docBuilder.newDocument();\n\n Element root = doc.createElement(\"GVPSRequest\");\n doc.appendChild(root);\n\n Element Mode = doc.createElement(\"Mode\");\n Mode.appendChild(doc.createTextNode(\"PROD\"));\n root.appendChild(Mode);\n\n Element Version = doc.createElement(\"Version\");\n Version.appendChild(doc.createTextNode(\"v0.01\"));\n root.appendChild(Version);\n\n Element Terminal = doc.createElement(\"Terminal\");\n root.appendChild(Terminal);\n\n Element ProvUserID = doc.createElement(\"ProvUserID\");\n // ProvUserID.appendChild(doc.createTextNode(userName));\n ProvUserID.appendChild(doc.createTextNode(\"PROVAUT\"));\n Terminal.appendChild(ProvUserID);\n\n Element HashData_ = doc.createElement(\"HashData\");\n HashData_.appendChild(doc.createTextNode(hash));\n Terminal.appendChild(HashData_);\n\n Element UserID = doc.createElement(\"UserID\");\n UserID.appendChild(doc.createTextNode(\"deneme\"));\n Terminal.appendChild(UserID);\n\n Element ID = doc.createElement(\"ID\");\n ID.appendChild(doc.createTextNode(\"10000039\"));\n Terminal.appendChild(ID);\n\n Element MerchantID = doc.createElement(\"MerchantID\");\n MerchantID.appendChild(doc.createTextNode(userID));\n Terminal.appendChild(MerchantID);\n\n Element Customer = doc.createElement(\"Customer\");\n root.appendChild(Customer);\n\n Element IPAddress = doc.createElement(\"IPAddress\");\n IPAddress.appendChild(doc.createTextNode(ipAddress));\n Customer.appendChild(IPAddress);\n\n Element EmailAddress = doc.createElement(\"EmailAddress\");\n EmailAddress.appendChild(doc.createTextNode(\"[email protected]\"));\n Customer.appendChild(EmailAddress);\n\n Element Card = doc.createElement(\"Card\");\n root.appendChild(Card);\n\n Element Number = doc.createElement(\"Number\");\n Number.appendChild(doc.createTextNode(paymentToolNumber));\n Card.appendChild(Number);\n\n Element ExpireDate = doc.createElement(\"ExpireDate\");\n ExpireDate.appendChild(doc.createTextNode(\"1212\"));\n Card.appendChild(ExpireDate);\n\n Element CVV2 = doc.createElement(\"CVV2\");\n CVV2.appendChild(doc.createTextNode(cvc));\n Card.appendChild(CVV2);\n\n Element Order = doc.createElement(\"Order\");\n root.appendChild(Order);\n\n Element OrderID = doc.createElement(\"OrderID\");\n OrderID.appendChild(doc.createTextNode(orderID));\n Order.appendChild(OrderID);\n\n Element GroupID = doc.createElement(\"GroupID\");\n GroupID.appendChild(doc.createTextNode(\"\"));\n Order.appendChild(GroupID);\n\n\t\t\t/*\n * Element Description=doc.createElement(\"Description\");\n\t\t\t * Description.appendChild(doc.createTextNode(\"\"));\n\t\t\t * Order.appendChild(Description);\n\t\t\t */\n\n Element Transaction = doc.createElement(\"Transaction\");\n root.appendChild(Transaction);\n\n Element Type = doc.createElement(\"Type\");\n Type.appendChild(doc.createTextNode(\"sales\"));\n Transaction.appendChild(Type);\n\n Element InstallmentCnt = doc.createElement(\"InstallmentCnt\");\n InstallmentCnt.appendChild(doc.createTextNode(\"\"));\n Transaction.appendChild(InstallmentCnt);\n\n Element Amount = doc.createElement(\"Amount\");\n Amount.appendChild(doc.createTextNode(amount));\n Transaction.appendChild(Amount);\n\n Element CurrencyCode = doc.createElement(\"CurrencyCode\");\n CurrencyCode.appendChild(doc.createTextNode(currency));\n Transaction.appendChild(CurrencyCode);\n\n Element CardholderPresentCode = doc\n .createElement(\"CardholderPresentCode\");\n CardholderPresentCode.appendChild(doc.createTextNode(\"0\"));\n Transaction.appendChild(CardholderPresentCode);\n\n Element MotoInd = doc.createElement(\"MotoInd\");\n MotoInd.appendChild(doc.createTextNode(\"N\"));\n Transaction.appendChild(MotoInd);\n\n // Convert dom to String\n TransformerFactory tranFactory = TransformerFactory.newInstance();\n Transformer aTransformer = tranFactory.newTransformer();\n StringWriter buffer = new StringWriter();\n aTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,\n \"yes\");\n aTransformer\n .transform(new DOMSource(doc), new StreamResult(buffer));\n return buffer.toString();\n\n } catch (Exception e) {\n return null;\n }\n\n }", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "String toXmlString() throws IOException;", "public void parseLog2(){\n\t\ttry{\n\t\t\tMxmlFile eventlog=new MxmlFile(res.getFileName());\n\t\t\t//log.info(\"processing \"+res.getFileName());\n\t\t\tres=eventlog.parse(eventlog.read(), res);\n\t\t\teventlog.close();\n\t\t}catch(Exception e){\n\t\t\tlog.warn(e.toString());\n\t\t}\n\t}", "public abstract StringBuffer toXML();", "protected BuildLog\n (\n final String fileName,\n final int buffer\n ) \n throws IOException\n {\n File logDir = new File(\"log\");\n if (!logDir.exists()) logDir.mkdirs();\n out = new PrintWriter\n (\n new BufferedWriter\n (\n new FileWriter(\"log\" + fileName, StandardCharsets.UTF_8), \n buffer\n )\n );\n }", "private void openLogFile()\r\n {\n try\r\n {\r\n GregorianCalendar gc = new GregorianCalendar();\r\n runTS = su.reformatDate(\"now\", null, DTFMT);\r\n logFile = new File(logDir + File.separator + runTS + \"_identifyFTPRequests_log.txt\");\r\n logWriter = new BufferedWriter(new FileWriter(logFile));\r\n String now = su.DateToString(gc.getTime(), DTFMT);\r\n writeToLogFile(\"identifyFTPRequests processing started at \" +\r\n now.substring(8, 10) + \":\" + now.substring(10, 12) + \".\" +\r\n now.substring(12, 14) + \" on \" + now.substring(6, 8) + \"/\" +\r\n now.substring(4, 6) + \"/\" + now.substring(0, 4));\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error opening log file: \" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }", "public static void writeUAV(){\n System.out.println(\"Writing new UAV\");\n Document dom;\n Element e = null;\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n dom = documentBuilder.newDocument();\n Element rootElement = dom.createElement(\"UAV\");\n\n // Create the name tag and write the name data\n e = dom.createElement(\"name\");\n e.appendChild(dom.createTextNode(name.getText()));\n rootElement.appendChild(e);\n\n // Create the weight tag and write the weight data\n e = dom.createElement(\"weight\");\n e.appendChild(dom.createTextNode(weight.getText()));\n rootElement.appendChild(e);\n\n // Create the turn radius tag and write the turn radius data\n e = dom.createElement(\"turn_radius\");\n e.appendChild(dom.createTextNode(turnRadius.getText()));\n rootElement.appendChild(e);\n\n // Create the max incline angle tag and write the max incline angle data\n e = dom.createElement(\"max_incline\");\n e.appendChild(dom.createTextNode(maxIncline.getText()));\n rootElement.appendChild(e);\n\n // Create the battery type tag and write the battery type data\n e = dom.createElement(\"battery\");\n e.appendChild(dom.createTextNode(battery.getText()));\n rootElement.appendChild(e);\n\n // Create the battery capacity tag and write the battery capacity data\n e = dom.createElement(\"battery_capacity\");\n e.appendChild(dom.createTextNode(batteryCapacity.getText()));\n rootElement.appendChild(e);\n\n dom.appendChild(rootElement);\n\n // Set the transforms to make the XML document\n Transformer tr = TransformerFactory.newInstance().newTransformer();\n tr.setOutputProperty(OutputKeys.INDENT,\"yes\");\n tr.setOutputProperty(OutputKeys.METHOD,\"xml\");\n tr.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n //tr.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"uav.dtd\");\n tr.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\",\"4\");\n\n // Write the data to the file\n tr.transform(new DOMSource(dom),new StreamResult(\n new FileOutputStream(\"src/uavs/\"+name.getText()+\".uav\")));\n\n }catch (IOException | ParserConfigurationException | TransformerException ioe){\n ioe.printStackTrace();\n // If error, show dialog box with the error message\n // If error, show dialog box with the error message\n Dialog.showDialog(\"Unable to write to write camera settings.\\n\\n\" +\n \"Ensure that \" + path + \" is visible by the application.\",\"Unable to write settings\");\n }\n }", "public String createConfigXml(PentahoConfig config) throws ApsSystemException {\n\t\tElement root = this.createConfigElement(config);\n\t\tDocument doc = new Document(root);\n\t\tXMLOutputter out = new XMLOutputter();\n\t\tFormat format = Format.getPrettyFormat();\n\t\tformat.setIndent(\"\\t\");\n\t\tout.setFormat(format);\n\t\treturn out.outputString(doc);\n\t}", "public void dumpAsXmlFile(String pFileName);", "public void processElementEpilog(Element node) \r\n\tthrows Exception \r\n\t{\r\n\tWriter xml = getWriter();\r\n\tindentLess();\r\n\txml.write(getIndent());\r\n\txml.write(\"</\");\r\n\txml.write(node.getNodeName());\r\n\txml.write(\">\\n\");\r\n\treturn;\t\r\n\t}", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException, TransformerException {\n\t\t\n\t\tString path = args[0]; //\"/home/pehlivanz/PWA/topics.xml\";\n\t\tString output = args[1];\n\t\tFile fXmlFile = new File(path);\n\t\t\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument docoriginal = dBuilder.parse(fXmlFile);\n\t\t\n\t\tdocoriginal.getDocumentElement().normalize();\n\t\t\n\t\t// PREPARE NEW DOCUMENT\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\tDocument docNEW = docBuilder.newDocument();\n\t\tElement rootElement = docNEW.createElement(\"Topics\");\n\t\tdocNEW.appendChild(rootElement);\n\t\t\n\t\tNodeList nList = docoriginal.getElementsByTagName(\"topic\");\n\t\tNode nNode;\n\t\tElement eElement;\n\t\t\n\t\tElement newelement;\n\t\tString query;\n\t\tString datestart;\n\t\tString dateend;\n\t\tElement tempelement;\n\t\tfor (int temp = 0; temp < nList.getLength(); temp++) {\n\t\t\t \n\t\t\ttempelement = docNEW.createElement(\"top\");\n\t\t\t\n\t\t\tnNode = (Node) nList.item(temp);\n\t \n\t\t\n\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t \n\t\t\t\teElement = (Element) nNode;\n\t \n\t\t\t\tnewelement = docNEW.createElement(\"num\");\n\t\t\t\tnewelement.appendChild(docNEW.createTextNode(\"Number:\" + eElement.getAttribute(\"number\")));\n\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\n\t\t\t\tquery = eElement.getElementsByTagName(\"query\").item(0).getTextContent();\n\t\t\t\t//System.out.print(\"\\\"\"+query+\"\\\",\");\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tdatestart = eElement.getElementsByTagName(\"start\").item(0).getTextContent();\n\t\t\t\t\tdateend = eElement.getElementsByTagName(\"end\").item(0).getTextContent();\n\t\t\t\t\t\n\t\t\t\t\tquery = query.trim() +\"@\" + convertDateToTimeCronon(datestart) + \"_\" + convertDateToTimeCronon(dateend);\n\t\t\t\t\tSystem.out.println(query);\n\t\t\t\t\n\t\t\t\t// to filter topics without date I did it here\n\t\t\t\t\tnewelement = docNEW.createElement(\"title\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode( query));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\tnewelement = docNEW.createElement(\"desc\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode(eElement.getElementsByTagName(\"description\").item(1).getTextContent()));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\tnewelement = docNEW.createElement(\"narr\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode(eElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\trootElement.appendChild(tempelement);\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"NO Date\");\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}\n\t\t}\n\t\t\n\t\t\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\tDOMSource source = new DOMSource(docNEW);\n\t\tStreamResult result = new StreamResult(new File(output));\n \n\t\t// Output to console for testing\n\t\t// StreamResult result = new StreamResult(System.out);\n \n\t\ttransformer.transform(source, result);\n \n\t\tSystem.out.println(\"File saved!\");\n\t\t\n\t}", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public static String xml(String filename, ISOLayout layout) {\r\n try {\r\n return process(filename, layout).xml();\r\n } catch (Exception ignore) {\r\n }\r\n\r\n return MessageFormat.format(HEADER_TAG + ERROR_ELEMENT + FOOTER_TAG, filename, 0);\r\n }", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "public String getAuditXml();", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public abstract StringBuffer toXML ();", "public File XMLforRoot(String hashid, String key, String value, int LayerId, int copyNum, String timer, boolean timerType, String userid, String Time, Certificate Certi) {\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n // root element\n Element root = document.createElement(\"Root_Node_For\" + key + \"Copy\" + copyNum);\n document.appendChild(root);\n\n Element hashId = document.createElement(\"HashID\");\n hashId.appendChild(document.createTextNode(hashid));\n root.appendChild(hashId);\n\n Element layerid = document.createElement(\"layerid\");\n hashId.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(LayerId));\n\n Element key1 = document.createElement(\"Key\");\n hashId.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value));\n hashId.appendChild(Value);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum)));\n hashId.appendChild(copynum);\n\n Element timer2 = document.createElement(\"timer\");\n timer2.appendChild(document.createTextNode(String.valueOf(timer)));\n hashId.appendChild(timer2);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType)));\n hashId.appendChild(timertype);\n\n Element userId = document.createElement(\"userId\");\n userId.appendChild(document.createTextNode(String.valueOf(userid)));\n hashId.appendChild(userId);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(Time)));\n hashId.appendChild(time2);\n\n Element cert = document.createElement(\"Certificate\");\n cert.appendChild(document.createTextNode(String.valueOf(Certi)));\n hashId.appendChild(cert);\n\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\");\n return file;\n }", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\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\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\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\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "public void createXMLFileForCertificate(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\tfor(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t//\tStudentResult setudentResult = new\n\t\t\t\t\n\t\t\t\tElement exam = doc.createElement(\"exam\");\n\t\t\t\texam.appendChild(doc.createTextNode((student.getStudentResultList().get(0).getExam()!=null?student.getStudentResultList().get(0).getExam():\"--------\")));\n\t\t\t\tstudentList.appendChild(exam);\n\t\t\t}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }", "public static void dumpLog() {\n\t\t\n\t\tif (log == null) {\n\t\t\t// We have no log! We must be accessing this entirely statically. Create a new log. \n\t\t\tnew Auditor(); // This will create the log for us. \n\t\t}\n\n\t\t// Try to open the log for writing.\n\t\ttry {\n\t\t\tFileWriter logOut = new FileWriter(log);\n\n\t\t\t// Write to the log.\n\t\t\tlogOut.write( trail.toString() );\n\n\t\t\t// Close the log writer.\n\t\t\tlogOut.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Close the log file itself.\n\t\t// Apparently we can't? TODO: Look into this. \n\n\t}", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "public void serializeLogs();", "public void createXMLFile() {\n\t int jmax = listOfRules.size();\n\t int j = 0;\n\t try {\n\t try {\n\n\t DocumentBuilderFactory docFactory = DocumentBuilderFactory\n\t .newInstance();\n\t DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t // root elements\n\t Document doc = docBuilder.newDocument();\n\t Element rootElement = doc.createElement(\"profile\");\n\t doc.appendChild(rootElement);\n\t // name\n\t Element name = doc.createElement(\"name\");\n\t name.appendChild(doc.createTextNode(\"Android Lint\"));\n\t rootElement.appendChild(name);\n\t // language\n\t Element language = doc.createElement(\"language\");\n\t language.appendChild(doc.createTextNode(\"Java\"));\n\t rootElement.appendChild(language);\n\t // rules\n\t Element rules = doc.createElement(\"rules\");\n\t rootElement.appendChild(rules);\n\n\t for (j = 0; j < jmax; j++) {\n\t Element rule = doc.createElement(\"rule\");\n\t rules.appendChild(rule);\n\t // repositoryKey\n\t Element repositoryKey = doc.createElement(\"repositoryKey\");\n\t repositoryKey\n\t .appendChild(doc.createTextNode(\"AndroidLint\"));\n\t rule.appendChild(repositoryKey);\n\t // key\n\t Element key = doc.createElement(\"key\");\n\t key.appendChild(doc.createTextNode(listOfRules.get(j)));\n\t rule.appendChild(key);\n\t }\n\n\t // write the content into xml file\n\t TransformerFactory transformerFactory = TransformerFactory\n\t .newInstance();\n\t Transformer transformer = transformerFactory.newTransformer();\n\t DOMSource source = new DOMSource(doc);\n\t StreamResult result = new StreamResult(new File(pathProfileXml+ANDROID_LINT_PROFILE_FILENAME\n\t ));\n\n\t transformer.transform(source, result);\n\n\t System.out.println(\"File \\\"\"+pathProfileXml+ANDROID_LINT_PROFILE_FILENAME+\"\\\" written.\");\n\t System.out.println(\"Quit.\");\n\n\t } catch (ParserConfigurationException pce) {\n\t pce.printStackTrace();\n\t } catch (TransformerException tfe) {\n\t tfe.printStackTrace();\n\t }\n\t } catch (Exception e) {\n\n\t }\n\t }", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "private String toXML(){\n\tString buffer = \"<xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\">\\n\";\n\tfor(Room[] r : rooms)\n\t for(Room s : r)\n\t\tif(s != null)\n\t\t buffer += s.toXML();\n\tbuffer += \"</xml>\";\n\treturn buffer;\n }", "public final void toFile(final File xmlFile) throws IOException {\n if (xmlFile == null) throw new FileNotFoundException(\"file is null\");\n\n PrintWriter pw = new PrintWriter(new FileWriter(xmlFile));\n pw.print(toString());\n pw.close();\n }", "void setupFileLogging();", "public void createXMLFileForExamResultNew(Report reportData) {\n\t\ttry{\n\t\t\tFile outDir = new File(reportData.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tfor(Student student : reportData.getStudentList()){\n\t\t\t\tString final_weitage=null;\n\t\t\t\tint total_weitage = 0;\t\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((reportData.getSchoolDetails().getSchoolDetailsName() != null ? reportData.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (reportData.getAcademicYear().getAcademicYearName()!= null ? reportData.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement report = doc.createElement(\"report\");\n\t\t\t\treport.appendChild(doc.createTextNode(\"MARKS STATEMENT\"));\n\t\t\t\tstudentList.appendChild(report);\n\t\t\t\n\t\t\t\tElement termdate = doc.createElement(\"termdate\");\n\t\t\t\ttermdate.appendChild(doc.createTextNode((reportData.getSchoolDetails().getExamName()!=null?reportData.getSchoolDetails().getExamName():\"--------\")));\n\t\t\t\tstudentList.appendChild(termdate);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t\tElement bloodgroup = doc.createElement(\"bloodgroup\");\n\t\t\t\tbloodgroup.appendChild(doc.createTextNode((student.getBloodGroup()!=null?student.getBloodGroup():\"NA\")));\n\t\t\t\tstudentList.appendChild(bloodgroup);\n\t\t\t\t\n\t\t\t\tif(student.getResource()!=null){\n\t\t\t\t\tElement fathername = doc.createElement(\"fathername\");\n\t\t\t\t\tfathername.appendChild(doc.createTextNode((student.getResource().getFatherFirstName()!=null?student.getResource().getFatherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(fathername);\n\t\t\t\t\t\n\t\t\t\t\tElement mothername = doc.createElement(\"mothername\");\n\t\t\t\t\tmothername.appendChild(doc.createTextNode((student.getResource().getMotherFirstName()!=null?student.getResource().getMotherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(mothername);\n\t\t\t\t\t\n\t\t\t\t\tElement dob = doc.createElement(\"dob\");\n\t\t\t\t\tdob.appendChild(doc.createTextNode((student.getResource().getDateOfBirth()!=null?student.getResource().getDateOfBirth():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(dob);\n\t\t\t\t\t}\n\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\tif(examObj.getExamName().equalsIgnoreCase(\"PerioDic Test\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"PTexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Note Book\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"NBexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Sub Enrichment\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"SEexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Half Yearly Exam\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"HYexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t String subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\t\tString subjectTotalChar = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"grade\");\n\t\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*for(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\"); //For Term 2\n\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*String subjectTotalCharecter = \"\";\n\t\t\t\t\t\t\t\tElement totalTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\ttotalTerm2.appendChild(doc.createTextNode((subjectTotalCharecter!=null?subjectTotalCharecter:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(totalTerm2);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\tgradeTerm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeTerm2);*/\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term2\")){\n\t\t\t\t\tSystem.out.println(\"within term2\");\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(Subject subjectObj : studentResult.getSubjectList()){\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\tfor(Exam examObj:subjectObj.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalString!=null?subjectTotalString:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t System.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//String subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT1\") || reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT2\") ||reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT3\")){\n\t\t\t\tDouble allTotal = 0.00 ;\n\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\n\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement maxmarks = doc.createElement(\"maxmarks\");\n\t\t\t\t\t\tmaxmarks.appendChild(doc.createTextNode((examObj.getExamName()!=null?examObj.getExamName():\"\")));\n\t\t\t\t\t\tsubject.appendChild(maxmarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\") || examObj.getGrade().equalsIgnoreCase(\"NA\")){\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0.0;\n\t\t\t\t\t\t\t\tallTotal = allTotal + 0.0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\tallTotal = allTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\n\t\t\t\t\t/*Element total = doc.createElement(\"total\");\n\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectString!=null?subjectString:\"\")));\n\t\t\t\t\tsubject.appendChild(total);*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString allTotalString = String.format( \"%.2f\", allTotal ) ;\n\t\t\t\t\n\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\ttotal.appendChild(doc.createTextNode((allTotalString!=null?allTotalString:\"\")));\n\t\t\t\tstudentList.appendChild(total);\n\t\t\t}\n\t\t\t\t\t\tif(student.getCoScholasticResultList()!=null && student.getCoScholasticResultList().size()!=0){\n\t\t//\t\t\t\t\tSystem.out.println(\"##....... \"+student.getCoScholasticResultList().size());\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Element coscholasticmarks = doc.createElement(\"coscholasticmarks\");\n\t\t\t\t\t\t\t\t\t//studentList.appendChild(coscholasticmarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"physicalEducation\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticphysicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm2.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"discipline\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticdisciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"healtheducation\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*\tElement coscholastichealtheducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm2.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"workeducation\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticworkeducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm2.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(reportData.getXmlFilePath()+reportData.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.error(e);\n\t\t\t}\n\t\t}", "public void createXMLFileForGatePass(Report report) {\n\t\ttry{\n\t\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\trootElement.appendChild(studentList);\n\t\t\t\n\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\tstudentList.appendChild(roll);\n\t\t\t\n\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\n\t}", "void addEntry(IvyXmlWriter xw) \n{\n xw.begin(\"USERFILE\");\n xw.field(\"NAME\",access_name);\n xw.field(\"JARNAME\",context_name);\n xw.field(\"ACCESS\",file_mode);\n xw.end(\"USERFILE\");\n}", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public void createLogFile(int peerID) {\n String filename = \"peer_\" + peerID + \"/log_peer_\" + peerID + \".log\";\n File output = new File(\"peer_\" + peerID);\n output.mkdir();\n\n File file = new File(filename);\n\n try {\n if(!file.exists()) {\n file.createNewFile();\n FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(\"Log File for peer_\" + peerID + \".\");\n bw.newLine();\n bw.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected String getXML() {\n\n StringBuffer b = new StringBuffer(\"title =\\\"\");\n b.append(title);\n b.append(\"\\\" xAxisTitle=\\\"\");\n b.append(xAxisTitle);\n b.append(\"\\\" yAxisTitle=\\\"\");\n b.append(yAxisTitle);\n b.append(\"\\\" xRangeMin=\\\"\");\n b.append(xRangeMin);\n b.append(\"\\\" xRangeMax=\\\"\");\n b.append(xRangeMax);\n b.append(\"\\\" xRangeIncr=\\\"\");\n b.append(xRangeIncr);\n b.append(\"\\\" yRangeMin=\\\"\");\n b.append(yRangeMin);\n b.append(\"\\\" yRangeMax=\\\"\");\n b.append(yRangeMax);\n b.append(\"\\\" yRangeIncr=\\\"\");\n b.append(yRangeIncr);\n b.append(\"\\\" >\\n\");\n\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource)dataSources.get(i);\n b.append(ds.toXML());\n b.append(\"\\n\");\n }\n\n return b.toString();\n }", "String getStats()\n {\n StringBuffer result = new StringBuffer(\"\\n<LogFile file='\" + file + \"'>\" +\n \"\\n <rewindCount value='\" + rewindCounter + \"'>Number of times this file was rewind to position(0)</rewindCount>\" +\n \"\\n <bytesWritten value='\" + bytesWritten + \"'>Number of bytes written to the file</bytesWritten>\" +\n \"\\n <position value='\" + position + \"'>FileChannel.position()</position>\" +\n \"\\n</LogFile>\" +\n \"\\n\" \n );\n\n return result.toString();\n }", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void createXMLFile(String INPUT_XML_SYMBOL) throws IOException {\n\n\t\t// creates isoxxxx-xxx_temp.xml\n\t\tOUTPUT_FILE_TEMP = INPUT_XML_SYMBOL.replace(\".xml\", \"_temp.xml\");\n\n\t\t// get Symbol\n\t\tString xmlSymbol = readFile(INPUT_XML_SYMBOL);\n\n\t\t// get ComponentName\n\t\tint i = xmlSymbol.indexOf(\"ComponentName=\") + 15;\n\t\tint j = xmlSymbol.indexOf(\"\\\"\", i);\n\t\tString componentName = xmlSymbol.substring(i, j);\n\n\t\t// get basic file stuff\n\t\tString xmlHeader = readFile(this.INPUT_XML_HEADER);\n\t\tString xmlBottom = readFile(this.INPUT_XML_FOOTER).replace(\"abc\", componentName);\n\n\t\t// create the new file\n\t\twriteStringToFile(\n\t\t\t\txmlHeader + \"\\n\" + xmlSymbol + \"\\n\" + \"</ShapeCatalogue>\" + \"\\n\" + xmlBottom + \"\\n\" + \"</PlantModel>\");\n\t}", "static void writeGPXFile(Trail trail, Context context) {\r\n if(gpxParser == null)\r\n buildParser();\r\n\r\n GPX gpx = parseTrailtoGPX(trail);\r\n\r\n System.out.println(\"~~~~~~~~~~~~~~~\"+trail.getMetadata().getName());\r\n\r\n //create a new file with the given name\r\n File file = new File(context.getExternalFilesDir(null), trail.getMetadata().getName()+\".gpx\");\r\n FileOutputStream out;\r\n try {\r\n out = new FileOutputStream(file);\r\n gpxParser.writeGPX(gpx, out);\r\n } catch(FileNotFoundException e) {\r\n AlertUtils.showAlert(context,\"File not found\",\"Please notify the developers.\");\r\n } catch (TransformerException e) {\r\n AlertUtils.showAlert(context,\"Transformer Exception\",\"Please notify the developers.\");\r\n } catch (ParserConfigurationException e) {\r\n AlertUtils.showAlert(context,\"Parser Exception\",\"Please notify the developers.\");\r\n }\r\n }", "private static void createLogger() {\n logger = myLogger.createHtmlLogger(\"JRECEIPTS\", Options.LOG_PATH + \"Receipts\", 262144, true, 1);\n// boolean append = true;\n// int limit = 1000000; // 1 Mb\n// int numLogFiles = 5;\n// FileHandler fh = new FileHandler(Options.LOG_PATH + \"Receipts_%g.html\", limit, numLogFiles, true);\n// fh.setFormatter(new SimpleFormatter());\n// // Add to the desired logger\n// logger = Logger.getLogger(\"Receipts\");\n// logger.addHandler(fh);\n }", "private void toXMLTag(StringBuffer buffer, int level) {\n\t\tindent(buffer,level).append('<').append(name);\n\n\t\tif(attributes!=null && attributes.getLength()>0)\n\t\t\tbuffer.append(' ').append(attributes.toString());\n\n\t\tif(children.size()>0) {\n\t\t\tbuffer.append(\">\\n\");\n\t\t\tfor(int i=0; i<children.size(); i++)\n\t\t\t\t((WSLNode)children.elementAt(i)).toXMLTag(buffer, level+1);\n\t\t\tindent(buffer,level).append(\"</\").append(name).append(\">\\n\");\n\t\t} else buffer.append(\" />\\n\");\n\t}", "@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"使用xml方式存储\");\n\t}", "public void saveRecordingData(SuiteEntry suite, File dirPath) throws Exception {\n // Fortify Mod: make sure that dirPath is a legal path\n if( dirPath != null ) {\n TEPath tpath = new TEPath(dirPath.getAbsolutePath());\n if( ! tpath.isValid() ) \n throw new IllegalArgumentException(\"Invalid argument to saveRecordingData: dirPath = \" + dirPath.getAbsolutePath());\n }\n if (dirPath != null && null != suite && SetupOptions.recordingInfo(suite.getLocalName()) == true) {\n\n try {\n //Create a Source for saving the data.\n DOMSource source = new DOMSource(TECore.doc);\n TransformerFactory xformFactory = TransformerFactory.newInstance();\n // Fortify Mod: prevent external entity injection \n xformFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\n Transformer idTransform = xformFactory.newTransformer();\n // Declare document is XML\n idTransform.setOutputProperty(OutputKeys.METHOD, XML);\n // Declare document standard UTF-8\n idTransform.setOutputProperty(OutputKeys.ENCODING, UT_F8);\n // Declare document is well indented\n idTransform.setOutputProperty(OutputKeys.INDENT, YES);\n OutputStream report_logs = new FileOutputStream(new File(dirPath.getAbsolutePath() + Constants.tmp_File));\n Result output = new StreamResult(report_logs);\n //transform the output in xml.\n idTransform.transform(source, output);\n // Fortify Mod: Flush and free up the OutputStream\n report_logs.close();\n BufferedReader bufferedReader = null;\n BufferedWriter bufferedWriter = null;\n // Read the xml data from file\n bufferedReader = new BufferedReader(new FileReader(dirPath.getAbsolutePath() + Constants.tmp_File));\n // Create a xml file for saving the data.\n bufferedWriter = new BufferedWriter(new FileWriter(dirPath.getAbsolutePath() + Constants.result_logxml));\n String dataString = \"\";\n //Read the data from file.\n while ((dataString = bufferedReader.readLine()) != null) {\n // Replace special symbol code to its symbol\n dataString = dataString.replaceAll(\"&lt;\", \"<\").replaceAll(\"&gt;\", \">\").replaceAll(\"&amp;\", \"&\");\n bufferedWriter.write(dataString);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }\n // Fortify Mod: Free up the Buffered Reader and Writer and their associated resources\n bufferedReader.close();\n bufferedWriter.close();\n TECore.methodCount=0;\n TECore.rootTestName.clear();\n // Check file exists\n File file = new File(dirPath.getAbsolutePath() + Constants.tmp_File);\n if (file.exists()) {\n // Delete file if exists\n file.delete();\n }\n } catch (Exception e) {\n System.out.println(ERROR_ON_SAVE_THE__RECORDING__ + e.toString());\n }\n }\n }", "public void writeToXML() throws IOException, XMLStreamException {\n FileOutputStream outPC = new FileOutputStream(\"C:\\\\Users\\\\Ruben Joosen\\\\Documents\\\\AntwerpenU\\\\Semester 5\\\\Distributed Systems\\\\ProjectY\\\\DS\\\\ProjectY\\\\map.xml\");\n FileOutputStream out = new FileOutputStream(\"/home/pi/Documents/DS/ProjectY/map.xml\"); // \"/home/pi/Documents/DS/ProjectY/map.xml\"\n\n XMLStreamWriter xsw = null;\n try {\n try {\n XMLOutputFactory xof = XMLOutputFactory.newInstance();\n xsw = xof.createXMLStreamWriter(out, \"UTF-8\");\n xsw.writeStartDocument(\"utf-8\", \"1.0\");\n xsw.writeStartElement(\"entries\");\n\n // Do the Collection\n for (Map.Entry<Integer, String> e : this.IPmap.entrySet()) {\n xsw.writeStartElement(\"entry\");\n xsw.writeAttribute(\"key\", e.getKey().toString());\n xsw.writeAttribute(\"value\", e.getValue().toString());\n xsw.writeEndElement();\n }\n xsw.writeEndElement();\n xsw.writeEndDocument();\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) { /* ignore */ }\n }\n }// end inner finally\n } finally {\n if (xsw != null) {\n try {\n xsw.close();\n } catch (XMLStreamException e) { /* ignore */ }\n }\n }\n }", "public void logToXML( OutputStream out ) {\r\n\t\tdbVersion.logToXML( out, Charset.forName( \"UTF-8\" ) );\r\n\t}", "public void filecreate(String Response_details) throws IOException\n\t{\n\t\tFileWriter myWriter = new FileWriter(\"D://Loadtime.txt\",true);\n\t\tmyWriter.write(Response_details+System.lineSeparator());\n\t\tmyWriter.close();\n\t\tSystem.out.println(\"Successfully wrote to the file.\");\n\t\t\n\t\t\n\t}", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void setUpNewXMLFile(File file) {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(file, \"UTF-8\");\n\t\t\tpw.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\\n\");\n\t\t\tpw.write(\"<\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.write(\"</\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.close();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error creating new XML File.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tpw.close();\n\t\t\t} catch(Exception e) {\n\t\t\t\t//Seems like it was already closed.\n\t\t\t}\n\t\t}\n\t}", "public void toXML(StringBuffer xmlDoc)\r\n throws Exception {\r\n XMLBuilder builder = new XMLBuilder();\r\n\r\n /*Get start of document*/\r\n builder.getStartOfDocument(xmlDoc);\r\n\r\n /*Build document content*/\r\n xmlDoc.append(XML_ERROR_MESSAGE_START);\r\n xmlDoc.append(getErrorMessage());\r\n xmlDoc.append(XML_ERROR_MESSAGE_END);\r\n xmlDoc.append(XML_ERROR_CLASS_START);\r\n xmlDoc.append(getException());\r\n xmlDoc.append(XML_ERROR_CLASS_END);\r\n xmlDoc.append(XML_ERROR_CLASS_MESSAGE_START);\r\n xmlDoc.append(getException().getMessage());\r\n xmlDoc.append(XML_ERROR_CLASS_MESSAGE_END);\r\n\r\n /*Get end of document*/\r\n builder.getEndOfDocument(xmlDoc);\r\n }", "public void testLogToXmlCreator(String suiteName, String testName, String sourceFileName, String xmlOutputFileName, String reporterClass) throws IOException {\n \t\t// OPTIONAL FAILURES NUMBER OUTPUT:\n \t\tif (fileExist(\"test.num\", false)) {\n \t\t\tif (fileExist(sourceFileName, false)) {\n \t\t\t\tif (Integer.valueOf(fileScanner(\"test.num\")) == 1 ) { fileWriterPrinter(\"FAILED...\"); }\n \t\t\t\telse { \n \t\t\t\t\tif (convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length == Integer.valueOf(fileScanner(\"test.num\")))\n \t\t\t\t\t { fileWriterPrinter(\"ALL \" + convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length + \" FAILED!\" + \"\\n\"); }\n \t\t\t\t\telse { fileWriterPrinter(\"FAILED: \" + convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length + \" OF \" + fileScanner(\"test.num\") + \"\\n\"); }\n \t\t\t\t}\n \t\t\t} else { \n \t\t\t\t if (Integer.valueOf(fileScanner(\"test.num\")) == 1 ) { fileWriterPrinter(\"PASSED!\"); } \n \t\t\t\t else { fileWriterPrinter(\"ALL PASSED!\\n\"); }\n \t\t\t\t} \t\t\n \t } else {\n \t\t if(fileExist(sourceFileName, false)) {\n \t\t\t System.out.println(\"FAILED: \" + convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\t\n \t\t } else { System.out.print(\"ALL PASSED!\"); } \t \t\n \t }\n\n \t\t// PRE-CLEAN:\n \t\tif (fileExist(System.getProperty(\"user.dir\"), xmlOutputFileName, false)) { fileCleaner(System.getProperty(\"user.dir\"), xmlOutputFileName);}\t\t\n \t\t\n \t\t// FAILED SUITE CREATES XML, OTHERWISE NOTHING:\n \t\tif (fileExist(sourceFileName, false)) {\n \t\t\t\n// \t\t// UPDATE PREVIOUS TEST NUMBER AS PER FAILED:\n// \t\tif (fileExist(\"prev.num\", false)){\n// \t\t\tfileCleaner(\"prev.num\");\n// \t\t\tfileWriter(\"prev.num\", convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\n// \t\t}\n \t\t\t\n// \t\t// UPDATE LAST TEST NUMBER AS PER FAILED:\n// \t\tif (fileExist(\"last.num\", false)){\n// \t\t\tfileCleaner(\"last.num\");\n// \t\t\tfileWriter(\"last.num\", convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\n// \t\t}\n \t\t\t\n \t// UPDATE FAILED TEST NUMBER AS PER FAILED:\n \tif (fileExist(\"failed.num\", false)){\n \t\tfileCleaner(\"failed.num\");\n \t\tfileWriter(\"failed.num\", convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\n \t}\n \t\t\n \t\t// HEADER:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"<!DOCTYPE suite SYSTEM \\\"http://testng.org/testng-1.0.dtd\\\">\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"<suite name=\\\"\" + suiteName + \"\\\">\");\n \t\t\n \t\t// LISTENERS:\n\t\t\t\tString extentReporterClassPath; \n \t\textentReporterClassPath = new Object(){}.getClass().getPackage().getName();\n \t\textentReporterClassPath = extentReporterClassPath.substring(0, extentReporterClassPath.lastIndexOf(\".\"));\n \t\textentReporterClassPath = extentReporterClassPath.substring(0, extentReporterClassPath.lastIndexOf(\".\"));\n \t\textentReporterClassPath = extentReporterClassPath + \".extentreporter.ExtentReporterNG\"; \n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <listeners>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <listener class-name=\\\"\" + extentReporterClassPath + \"\\\"/>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" </listeners>\");\n \t\t\n \t\t// TEST:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <test name=\\\"\" + testName + \"\\\">\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <classes>\");\n \t\t\t\t\t\t\n \t\t// BODY:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" \" + reporterClass); \t\t\n \t\tString[] string = convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)); // READS FAILURES\n \t\t/** WILL PRINT XML CLASSES-BODY */ // for (String s : string) { System.out.println(s); }\n \t\tfor (String s : string) { fileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, s); }\n \t\t\n \t\t// FOOTER:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" </classes>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" </test>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"</suite>\");\n \t\t\n \t\t}\t\n \t}", "public void writeXMLFinisher() {\n\t\tJavaIO.createXMLFile(getCurrentPath(), \"coveragePriorJ.xml\", \"</list>\", true);\n\t}", "public static void main(String[]args){\n XMLOutputter out = new XMLOutputter();\n SAXBuilder sax = new SAXBuilder();\n\n //Objekte die gepseichert werden sollen\n Car car = new Car(\"CR-MD-5\",\"16.05.1998\",4,4,4);\n Car car2 = new Car(\"UL-M-5\",\"11.03.2002\",10,2,5);\n\n\n Element rootEle = new Element(\"cars\");\n Document doc = new Document(rootEle);\n\n //hinzufuegen des ersten autos\n Element carEle = new Element(\"car\");\n carEle.setAttribute(new Attribute(\"car\",\"1\"));\n carEle.addContent(new Element(\"licenseplate\").setText(car.getLicensePlate()));\n carEle.addContent(new Element(\"productiondate\").setText(car.getProductionDate()));\n carEle.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car.getNumberPassengers())));\n carEle.addContent(new Element(\"numberwheels\").setText(Integer.toString(car.getNumberWheels())));\n carEle.addContent(new Element(\"numberdoors\").setText(Integer.toString(car.getNumberDoors())));\n\n //hinzufuegen des zweiten autos\n Element carEle2 = new Element(\"car2\");\n carEle2.setAttribute(new Attribute(\"car2\",\"2\"));\n carEle2.addContent(new Element(\"licenseplate\").setText(car2.getLicensePlate()));\n carEle2.addContent(new Element(\"productiondate\").setText(car2.getProductionDate()));\n carEle2.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car2.getNumberPassengers())));\n carEle2.addContent(new Element(\"numberwheels\").setText(Integer.toString(car2.getNumberWheels())));\n carEle2.addContent(new Element(\"numberdoors\").setText(Integer.toString(car2.getNumberDoors())));\n\n\n doc.getRootElement().addContent(carEle);\n doc.getRootElement().addContent(carEle2);\n\n //Einstellen des Formates auf gut lesbares, eingeruecktes Format\n out.setFormat(Format.getPrettyFormat());\n //Versuche in xml Datei zu schreiben\n try {\n out.output(doc, new FileWriter(\"SaveCar.xml\"));\n } catch (IOException e) {\n System.out.println(\"Error opening File\");\n }\n\n\n //Einlesen\n\n File input = new File(\"SaveCar.xml\");\n Document inputDoc = null;\n //Versuche aus xml Datei zu lesen und Document zu instanziieren\n try {\n inputDoc = (Document) sax.build(input);\n } catch (JDOMException e) {\n System.out.println(\"An Error occured\");\n } catch (IOException e) {\n System.out.print(\"Error opening File\");\n }\n\n //Liste von Elementen der jeweiligen Autos\n List<Element> listCar = inputDoc.getRootElement().getChildren(\"car\");\n List<Element> listCar2 = inputDoc.getRootElement().getChildren(\"car2\");\n\n //Ausgabe der Objekte auf der Konsole (manuell)\n printXML(listCar);\n System.out.println();\n printXML(listCar2);\n\n //Erstellen der abgespeicherten Objekte\n Car savedCar1 = createObj(listCar);\n Car savedCar2 = createObj(listCar2);\n\n System.out.println();\n System.out.println(savedCar1);\n System.out.println();\n System.out.println(savedCar2);\n\n}", "public static void buildXML(ReceiverBean receiverBean, String folderName) {\r\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder dBuilder;\r\n\t\ttry {\r\n\t\t\tdBuilder = dbFactory.newDocumentBuilder();\r\n\t\t\tDocument doc = dBuilder.newDocument();\r\n\t\t\t// add elements to Document\r\n\t\t\tElement rootElement = doc.createElementNS(\"\", \"receiver\");\r\n\t\t\t// append root element to document\r\n\t\t\tdoc.appendChild(rootElement);\r\n\r\n\t\t\t// append first child element to root element\r\n\t\t\tpopulateReceiver(rootElement, receiverBean, doc);\r\n\r\n\t\t\t// for output to file, console\r\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\t\t// for pretty print\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\tDOMSource source = new DOMSource(doc);\r\n\r\n\t\t\t// write to console or file\r\n\t\t\tStreamResult console = new StreamResult(System.out);\r\n\t\t\tStreamResult file = new StreamResult(\r\n\t\t\t\t\tnew File(folderName + receiverBean.getFile().split(\"\\\\.\")[0] + \".xml\"));\r\n\r\n\t\t\t// write data\r\n\t\t\ttransformer.transform(source, console);\r\n\t\t\ttransformer.transform(source, 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}\r\n\t}", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLDocking version=\\\"2.1\\\">\");\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desktop = (WSDesktop) desktops.get(i);\n\t\t\tdesktop.writeDesktopNode(out);\n\t\t}\n\t\tout.println(\"</VLDocking>\");\n\n\t\tout.flush();\n\t}", "public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}", "public static String format(String xml) {\r\n try {\r\n final InputSource src = new InputSource(new StringReader(xml));\r\n final Node document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(src).getDocumentElement();\r\n final Boolean keepDeclaration = Boolean.valueOf(xml.startsWith(\"<?xml\"));\r\n \r\n //May need this: System.setProperty(DOMImplementationRegistry.PROPERTY,\"com.sun.org.apache.xerces.internal.dom.DOMImplementationSourceImpl\");\r\n\r\n final DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();\r\n final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation(\"LS\");\r\n final LSSerializer writer = impl.createLSSerializer();\r\n \r\n writer.getDomConfig().setParameter(\"format-pretty-print\", Boolean.TRUE); // Set this to true if the output needs to be beautified.\r\n writer.getDomConfig().setParameter(\"xml-declaration\", keepDeclaration); // Set this to true if the declaration is needed to be outputted.\r\n \r\n return writer.writeToString(document);\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public String ToFile() {\n\t\tif (ismonitored) {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",1;\");\r\n\t\t} else {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",0;\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void writeToDeviceReport(XmlSerializer serializer) throws IOException {\n\t\tthis.serializer = serializer;\n\t\t\n serializer.startTag(DeviceReportWriter.XMLNS, \"log_subreport\");\n \n try {\n\t\t\tif(storage != null) {\n\t\t\t\tif(Logger._() != null) {\n\t\t\t\t\tLogger._().serializeLogs(this);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tserializeLog(entry);\n\t\t\t}\n } finally {\n \tserializer.endTag(DeviceReportWriter.XMLNS, \"log_subreport\");\n }\n\t}", "private void initReportWriter() {\n\t\tfinal XMLOutputFactory xmlof = XMLOutputFactory.newInstance();\r\n\r\n\t\t// Create an XML stream writer\r\n\t\tfinal File reportFile = new File(getOutputDirectory(), \"report.xml\");\r\n\t\ttry {\r\n\t\t\treportWriter = xmlof.createXMLStreamWriter(new FileWriter(reportFile));\r\n\r\n\t\t} catch (final XMLStreamException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (final IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "private void logToFile() {\n }", "public void writeXML(Vehicle vehicle_a, Vehicle vehicle_b){\n\n //writing encoding and xml file version\n\n XMLOutputFactory xmlof = null;\n XMLStreamWriter xmlw = null;\n\n try{\n\n xmlof = XMLOutputFactory.newInstance();\n xmlw = xmlof.createXMLStreamWriter(new FileOutputStream(FILE_NAME), \"utf-8\");\n xmlw.writeStartDocument(\"utf-8\", \"1.0\");\n\n } catch (Exception e){\n\n System.out.println(\"Error: \");\n System.out.println(e.getMessage());\n\n }\n\n //writing information\n\n try {\n xmlw.writeStartElement(\"routes\");\n\n\n xmlw.writeStartElement(\"route\");\n xmlw.writeAttribute(\"team\", vehicle_a.getTeam_name());\n xmlw.writeAttribute(\"cost\", String.valueOf(vehicle_a.getFuel()));\n xmlw.writeAttribute(\"cities\", String.valueOf(vehicle_a.getTouched_cities().size()));\n\n\n\n for(int i=0; i<vehicle_a.getTouched_cities().size(); i++){\n\n xmlw.writeStartElement(\"city\");\n xmlw.writeAttribute(\"id\", String.valueOf(vehicle_a.getTouched_cities().get(i).getId()));\n xmlw.writeAttribute(\"name\", vehicle_a.getTouched_cities().get(i).getName());\n\n //tag \"city\" close\n xmlw.writeEndElement();\n }\n\n //tag \"route\" close\n xmlw.writeEndElement();\n\n\n xmlw.writeStartElement(\"route\");\n xmlw.writeAttribute(\"team\", vehicle_b.getTeam_name());\n xmlw.writeAttribute(\"cost\", String.valueOf(vehicle_b.getFuel()));\n xmlw.writeAttribute(\"cities\", String.valueOf(vehicle_b.getTouched_cities().size()));\n\n for(int i=0; i<vehicle_b.getTouched_cities().size(); i++){\n\n xmlw.writeStartElement(\"city\");\n xmlw.writeAttribute(\"id\", String.valueOf(vehicle_b.getTouched_cities().get(i).getId()));\n xmlw.writeAttribute(\"name\", vehicle_b.getTouched_cities().get(i).getName());\n\n //tag \"city\" close\n xmlw.writeEndElement();\n }\n\n //tag \"route\" close\n xmlw.writeEndElement();\n\n //tag \"routes\" close\n xmlw.writeEndElement();\n\n //closing document\n xmlw.writeEndDocument();\n\n //eptying buffer and writing the document\n xmlw.flush();\n\n //closing document and resources used\n xmlw.close();\n\n //Creation of a clone-file but indented\n try {\n indentFile();\n }catch (Exception e){\n System.err.println(e);\n }\n\n }\n catch (Exception e){\n System.out.println(\"Writing error: \");\n System.out.println(e.getMessage());\n }\n }", "public void createFirstXmlFile(ArrayList<Entry> entityList);", "public static void _generateStatistics() {\n\t\ttry {\n\t\t\t// Setup info\n\t\t\tPrintStream stats = new PrintStream(new File (_statLogFileName + \".txt\"));\n\n\t\t\tScanner scan = new Scanner(new File(_logFileName+\".txt\"));\n\t\t\twhile (scan.hasNext(SETUP.toString())) {\n\t\t\t\t// Append setup info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tstats.append(\"\\n\");\n\n\t\t\twhile (scan.hasNext(DETAILS.toString()) || scan.hasNext(RUN.toString())) {\n\t\t\t\t// Throw detailed info away\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\n\t\t\twhile (scan.hasNext()) {\n\t\t\t\t// Append post-run info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tscan.close();\n\t\t\tstats.append(\"\\n\");\n\n\t\t\t// Perf4J info\n\t\t\tReader reader = new FileReader(_logFileName+\".txt\");\n\t\t\tLogParser parser = new LogParser(reader, stats, null, 10800000, true, new GroupedTimingStatisticsTextFormatter());\n\t\t\tparser.parseLog();\n\t\t\tstats.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void CreateFile(){\n try{\n new File(\"wipimages\").mkdir();\n logscommissions.createNewFile();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"CreateFile Failed\\n\");\n }\n }", "private void createTransactionLog(String deltaLakeTableLocation)\n throws IOException\n {\n File deltaTableLogLocation = new File(new File(URI.create(deltaLakeTableLocation)), \"_delta_log\");\n verify(deltaTableLogLocation.mkdirs(), \"mkdirs() on '%s' failed\", deltaTableLogLocation);\n String entry = Resources.toString(Resources.getResource(\"deltalake/person/_delta_log/00000000000000000000.json\"), UTF_8);\n Files.writeString(new File(deltaTableLogLocation, \"00000000000000000000.json\").toPath(), entry);\n }" ]
[ "0.6450681", "0.6049599", "0.6031565", "0.6021803", "0.60045844", "0.58909965", "0.5867717", "0.57506675", "0.5742406", "0.5714184", "0.5670238", "0.5625727", "0.55957997", "0.55752057", "0.5519637", "0.54680043", "0.54392976", "0.5437466", "0.5408387", "0.5407468", "0.5390055", "0.53843445", "0.53843445", "0.53843445", "0.53685737", "0.5365568", "0.53581256", "0.53413415", "0.53317964", "0.5331356", "0.53134966", "0.5303784", "0.52758527", "0.52705693", "0.5270307", "0.5269378", "0.5265691", "0.52637655", "0.52587867", "0.5257091", "0.52551293", "0.5249866", "0.52475", "0.5231179", "0.52266425", "0.5225586", "0.5225009", "0.52208006", "0.51963407", "0.5174991", "0.51746625", "0.5166159", "0.51643854", "0.5157819", "0.51505524", "0.5145098", "0.51370007", "0.5136664", "0.51248306", "0.51190287", "0.51077306", "0.5106317", "0.509295", "0.50927037", "0.5082939", "0.5073801", "0.5070145", "0.5057121", "0.5045313", "0.5044273", "0.50430197", "0.5041434", "0.5033738", "0.502724", "0.5015944", "0.50073814", "0.5003429", "0.5001426", "0.49828336", "0.49828336", "0.49828336", "0.49826497", "0.49696875", "0.49670395", "0.49625674", "0.49568748", "0.4944291", "0.49412358", "0.49397752", "0.49379152", "0.49350372", "0.49330655", "0.4926813", "0.49246532", "0.4923922", "0.49225435", "0.49115965", "0.49094316", "0.48948634", "0.48864013", "0.48855466" ]
0.0
-1
/ Create XML Formatted Log File
public FileHandler createHtmlFileHandler ( String fileName , boolean append ) { FileHandler htmlFileHandler = null; try { htmlFileHandler = new FileHandler(fileName, append); } catch (SecurityException | IOException e) { e.printStackTrace(); } return htmlFileHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toXML() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"<logfilter>\\n\");\n\t\t// write description\n\t\tsb.append(\"<description>\" + description + \"</description>\\n\");\n\t\t// write logdata\n\t\tsb.append(\"<logdata>\" + logData + \"</logdata>\");\n\t\t// write accepted types\n\t\tsb.append(\"<acceptedtypes>\\n\");\n\t\tif (acceptedEventTypes != null) { \n\t\t\tSet<String> keys = acceptedEventTypes.keySet();\n\t\t\tfor (String key : keys) {\n\t\t\t\tsb.append(\"<class priority=\\\"\" + acceptedEventTypes.get(key) + \"\\\">\" + key + \"</class>\\n\");\n\t\t\t}\n\t\t}\n\t\tsb.append(\"</acceptedtypes>\\n\");\n\t\t\n\t\tsb.append(\"</logfilter>\");\n\t\t\n\t\treturn sb.toString();\n\t}", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}", "private static void createLogFile() {\n try {\n String date = new Date().toString().replaceAll(\":\", \"-\");\n logFile = new FileWriter(\"bio-formats-test-\" + date + \".log\");\n TestLogger log = new TestLogger(logFile);\n LogTools.setLog(log);\n }\n catch (IOException e) { }\n }", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "public String createLogInfo() {\n String res = TXN_ID_TAG + REGEX + this.txnId + \"\\n\" +\n TXN_STATUS_TAG + REGEX + this.txnStatus + \"\\n\";\n if (this.readKeyList != null && this.readKeyList.length != 0) {\n for (String readKey : this.readKeyList) {\n res += TXN_READ_TAG + REGEX + readKey + \"\\n\";\n }\n }\n \n if (this.writeKeyList != null && this.writeKeyList.length != 0) {\n for (int i = 0; i < this.writeKeyList.length; i++) {\n res += TXN_WRITE_TAG + REGEX + this.writeKeyList[i] + \"\\n\";\n res += TXN_VAL_TAG + REGEX + this.writeValList[i] + \"\\n\";\n }\n }\n \n return res;\n }", "public XmlWriter(String filename, String logFile, Vector dirs) throws IOException {\n\t\tout = new FileOutputStream(filename);\n\t\tstack = new Stack();\n\t\tindent = 0;\n\n\t\twriteProlog();\n\n\t\ttag = Xml.TAG_ROOT;\n\t\twriteDTD(tag);\n\t\ttag += addAttr(Xml.ATTR_LOGFILE, logFile);\n\t\ttag += addAttr(Xml.ATTR_TIMESTAMPWRITEBACK, DirSync.getSync().isWriteTimestampBack());\n\t\ttag += addAttr(Xml.ATTR_TIMESTAMPDIFF, DirSync.getSync().getMaxTimestampDiff());\n\t\ttag += addAttr(Xml.ATTR_SKIP_LINKS, DirSync.getSync().isSkipLinks());\n\t\twriteStartTag(tag);\n\n\t\tfor (Iterator iter = dirs.iterator(); iter.hasNext();) {\n\t\t\tDirectory dir = (Directory) iter.next();\n\n\t\t\ttag = Xml.TAG_DIR;\n\t\t\ttag += addAttr(Xml.ATTR_NAME, dir.getName());\n\t\t\ttag += addAttr(Xml.ATTR_SRC, dir.getSrc());\n\t\t\ttag += addAttr(Xml.ATTR_DST, dir.getDst());\n\t\t\ttag += addAttr(Xml.ATTR_WITHSUBFOLDERS, dir.isWithSubfolders());\n\t\t\ttag += addAttr(Xml.ATTR_VERIFY, dir.isVerify());\n\t\t\ttag += addAttr(Xml.ATTR_FILE_INCLUDE, dir.getFileInclude());\n\t\t\ttag += addAttr(Xml.ATTR_FILE_EXCLUDE, dir.getFileExclude());\n\t\t\ttag += addAttr(Xml.ATTR_DIR_INCLUDE, dir.getDirInclude());\n\t\t\ttag += addAttr(Xml.ATTR_DIR_EXCLUDE, dir.getDirExclude());\n\t\t\ttag += addAttr(Xml.ATTR_LOGFILE, dir.getLogfile());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_ALL, dir.isCopyAll());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_LARGER, dir.isCopyLarger());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_LARGERMODIFIED, dir\n\t\t\t\t\t.isCopyLargerModified());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_MODIFIED, dir.isCopyModified());\n\t\t\ttag += addAttr(Xml.ATTR_SYNC_NEW, dir.isCopyNew());\n\t\t\ttag += addAttr(Xml.ATTR_DEL_FILES, dir.isDelFiles());\n\t\t\ttag += addAttr(Xml.ATTR_DEL_DIRS, dir.isDelDirs());\n\t\t\twriteEmptyTag(tag);\n\t\t}\n\n\t\twriteEndTag();\n\t}", "public File makeXML(String key, int layerID, String value1, String time1, int totalCopies1, int copyNum1, boolean timerType1, String userId, String time, Certificate cert) {\n\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n Element key1 = document.createElement(\"Search_Result_for\" + key);\n document.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element layerid = document.createElement(\"layerid\");\n\n key1.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(layerID));\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value1));\n layerid.appendChild(Value);\n\n Element timer = document.createElement(\"timer\");\n timer.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(timer);\n\n Element totcopies = document.createElement(\"totcopies\");\n totcopies.appendChild(document.createTextNode(String.valueOf(totalCopies1)));\n layerid.appendChild(totcopies);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum1)));\n layerid.appendChild(copynum);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType1)));\n layerid.appendChild(timertype);\n\n Element userid = document.createElement(\"userid\");\n userid.appendChild(document.createTextNode(userId));\n layerid.appendChild(userid);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(time1)));\n layerid.appendChild(time2);\n\n /*Element cert1 = document.createElement(\"cert\");\n cert1.appendChild(document.createTextNode(String.valueOf(cert)));\n layerid.appendChild((Node) cert);*/\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(layerID + \"_Search Result for \" + key + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n System.out.println(\"Done creating XML File\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(layerID + \"_Search Result for \" + key + \".xml\");\n return file;\n }", "public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"ReadConfigLog.txt\");\n\t\t\t\tFileWriter gpxwriter = new FileWriter(gpxfile);\n\t\t\t\tout = new BufferedWriter(gpxwriter);\n\t\t\t\tout.write(\"Hello world\");\n\t\t\t\t// out.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"SD CARD READ ERROR : \", \"Problem reading SD CARD\");\n\t\t\tLog.e(\"SD CARD LOG ERROR : \", \"Please take logs using Logcat\");\n\t\t\tLog.e(\"<<<<<<<<<<WifiPreference>>>>>>>>>>>>\",\n\t\t\t\t\t\"Could not write file \" + e.getMessage());\n\t\t}\n\t}", "public void toXML(PrintWriter pw) {\n pw.println(\"<crontabentry>\");\n pw.println(\"<id>\" + id + \"</id> \");\n pw.println(\"<classname>\" + className + \"</classname> \");\n pw.println(\"<methodname>\" + methodName + \"</methodname> \");\n if (bextraInfo) {\n for (int i = 0; i < extraInfo.length; i++) {\n pw.println(\"<extrainfo parameter = \\\"\" + i + \"\\\" >\");\n pw.println(extraInfo[i] + \" </extrainfo>\");\n }\n }\n pw.println(\"<calendar>\" + cal + \" </calendar>\");\n pw.println(\"<timemillis>\" + timeMillis + \"</timemillis> \");\n pw.println(\"</crontabentry>\");\n }", "protected static void writeXML(String path, String ID, String abs,String cls) {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder;\r\n try {\r\n dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.newDocument();\r\n //add elements to Document\r\n Element rootElement =doc.createElement(\"Data\");\r\n //append root element to document\r\n doc.appendChild(rootElement);\r\n\r\n rootElement.appendChild(getReviewsPositive(doc, ID, abs,cls));\r\n //for output to file, console\r\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n Transformer transformer = transformerFactory.newTransformer();\r\n //for pretty print\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n\r\n //write to console or file\r\n StreamResult console = new StreamResult(System.out);\r\n StreamResult file = new StreamResult(new File(path+\"\"+ID+\".xml\"));\r\n\r\n //write data\r\n transformer.transform(source, console);\r\n transformer.transform(source, file);\r\n //System.out.println(\"DONE\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\t}", "public void printXmlPath(StackTraceElement l) throws IOException {\n\t\t String packageNameOnly = l.getClassName().substring(0, l.getClassName().lastIndexOf(\".\"));\n\t\t String classNameOnly = l.getClassName().substring(1 + l.getClassName().lastIndexOf(\".\"), l.getClassName().length());\n\t\t String xml = \"<class name=\\\"\" + packageNameOnly + \".\" + classNameOnly + \"\\\"><methods><include name=\\\"\" + l.getMethodName() + \"\\\"/></methods></class>\";\n\t\t\t fileWriterPrinter(\" XML Path: \" + xml);\n\t\t\t// Renew XML record:\n\t\t\t fileCleaner(\"xml.path\");\n\t\t\t fileWriter( \"xml.path\", xml);\n\t\t\t// Renew Stack Trace Element record:\n\t\t\t fileCleaner(\"stack.trace\");\n\t\t\t fileWriter( \"stack.trace\", l);\n\t\t\t// Append a New Log record:\n\t\t\t if (fileExist(\"run.log\", false)) { fileWriter(\"run.log\", \" XML Path: \" + xml); } \n\t\t}", "protected abstract void toXml(PrintWriter result);", "private String writeValidXMLFile() throws java.io.IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"06010101\\\">\");\n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>3</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>200.0</plot_lenX>\");\n oOut.write(\"<plot_lenY>200.0</plot_lenY>\");\n oOut.write(\"<plot_precip_mm_yr>1150.645781</plot_precip_mm_yr>\");\n oOut.write(\"<plot_temp_C>12.88171785</plot_temp_C>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_3\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_4\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_5\\\" />\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_3\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_4\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_5\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_3\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_4\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_5\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_sizeClasses>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s1.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s10.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s20.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s30.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s40.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s50.0\\\"/>\");\n oOut.write(\"</tr_sizeClasses>\");\n oOut.write(\"<tr_initialDensities>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_2\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_3\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_4\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_5\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"</tr_initialDensities>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_3\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_4\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_5\\\">39.48</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_3\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_4\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_5\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_3\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_4\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_5\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_3\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_4\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_5\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_3\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_4\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_5\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_3\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_4\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_5\\\">0.389</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_3\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_4\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_5\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_3\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_4\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_5\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_3\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_4\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_5\\\">0.0299</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_3\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_4\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_5\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_3\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_4\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_5\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_3\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_4\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_5\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_3\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_4\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_5\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_3\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_4\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_5\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_3\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_4\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_5\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_3\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_4\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_5\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>QualityVigorClassifier</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_3\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_4\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_5\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<QualityVigorClassifier1>\");\n oOut.write(\"<ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>10</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>20</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.78</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.88</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.61</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.64</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">1</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.55</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>20</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>30</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.33</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.81</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.64</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.32</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.32</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.69</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.58</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>30</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>40</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.34</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.57</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.26</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.46</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.13</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.36</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.66</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.45</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"</ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierVigBeta0>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_2\\\">0.1</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_3\\\">0</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_4\\\">0.3</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_5\\\">0.4</ma_cvb0Val>\");\n oOut.write(\"</ma_classifierVigBeta0>\");\n oOut.write(\"<ma_classifierVigBeta11>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_2\\\">0.2</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_3\\\">2.35</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_4\\\">0.1</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_5\\\">2.43</ma_cvb11Val>\");\n oOut.write(\"</ma_classifierVigBeta11>\");\n oOut.write(\"<ma_classifierVigBeta12>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_2\\\">-2.3</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_3\\\">1.12</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_4\\\">0.32</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_5\\\">1.3</ma_cvb12Val>\");\n oOut.write(\"</ma_classifierVigBeta12>\");\n oOut.write(\"<ma_classifierVigBeta13>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_2\\\">0.13</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_3\\\">1</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_4\\\">-0.2</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_5\\\">1</ma_cvb13Val>\");\n oOut.write(\"</ma_classifierVigBeta13>\");\n oOut.write(\"<ma_classifierVigBeta14>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_2\\\">0.9</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_3\\\">0</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_4\\\">-1</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_5\\\">0</ma_cvb14Val>\");\n oOut.write(\"</ma_classifierVigBeta14>\");\n oOut.write(\"<ma_classifierVigBeta15>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_2\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_3\\\">0.25</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_4\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_5\\\">-0.45</ma_cvb15Val>\");\n oOut.write(\"</ma_classifierVigBeta15>\");\n oOut.write(\"<ma_classifierVigBeta16>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_2\\\">1</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_3\\\">0.36</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_4\\\">0</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_5\\\">0.46</ma_cvb16Val>\");\n oOut.write(\"</ma_classifierVigBeta16>\");\n oOut.write(\"<ma_classifierVigBeta2>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_2\\\">0.01</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_3\\\">0.02</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_4\\\">0.04</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_5\\\">0.1</ma_cvb2Val>\");\n oOut.write(\"</ma_classifierVigBeta2>\");\n oOut.write(\"<ma_classifierVigBeta3>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_2\\\">0.001</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_3\\\">0.2</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_4\\\">0.3</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_5\\\">0.4</ma_cvb3Val>\");\n oOut.write(\"</ma_classifierVigBeta3>\");\n oOut.write(\"<ma_classifierQualBeta0>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_2\\\">0.25</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_3\\\">1.13</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_4\\\">0</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_5\\\">1.15</ma_cqb0Val>\");\n oOut.write(\"</ma_classifierQualBeta0>\");\n oOut.write(\"<ma_classifierQualBeta11>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_2\\\">0.36</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_3\\\">0</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_4\\\">0.4</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_5\\\">0</ma_cqb11Val>\");\n oOut.write(\"</ma_classifierQualBeta11>\");\n oOut.write(\"<ma_classifierQualBeta12>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_2\\\">0.02</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_3\\\">10</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_4\\\">0.3</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_5\\\">30</ma_cqb12Val>\");\n oOut.write(\"</ma_classifierQualBeta12>\");\n oOut.write(\"<ma_classifierQualBeta13>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_2\\\">0.2</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_3\\\">10</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_4\\\">-0.3</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_5\\\">30</ma_cqb13Val>\");\n oOut.write(\"</ma_classifierQualBeta13>\");\n oOut.write(\"<ma_classifierQualBeta14>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_2\\\">-0.2</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_3\\\">10</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_4\\\">-0.4</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_5\\\">30</ma_cqb14Val>\");\n oOut.write(\"</ma_classifierQualBeta14>\");\n oOut.write(\"<ma_classifierQualBeta2>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_2\\\">-0.2</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_3\\\">10</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_4\\\">0</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_5\\\">30</ma_cqb2Val>\");\n oOut.write(\"</ma_classifierQualBeta2>\");\n oOut.write(\"<ma_classifierQualBeta3>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_2\\\">1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_3\\\">10</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_4\\\">0.1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_5\\\">30</ma_cqb3Val>\");\n oOut.write(\"</ma_classifierQualBeta3>\");\n oOut.write(\"<ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_2\\\">0.1</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_3\\\">0.25</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_4\\\">0.5</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_5\\\">0.74</ma_cnapvVal>\");\n oOut.write(\"</ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_2\\\">0.9</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_3\\\">0.25</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_4\\\">0.3</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_5\\\">0.74</ma_cnapsVal>\");\n oOut.write(\"</ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_classifierDeciduous>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_2\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_3\\\">0</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_4\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_5\\\">0</ma_cdVal>\");\n oOut.write(\"</ma_classifierDeciduous>\");\n oOut.write(\"</QualityVigorClassifier1>\");\n oOut.write(\"</paramFile>\");\n\n oOut.close();\n return sFileName;\n }", "public String toXML(int indent) {\n\t\tStringBuffer xmlBuf = new StringBuffer();\n\t\t//String xml = \"\";\n\n\t\tsynchronized (xmlBuf) {\n\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"<ScheduleEvent>\\n\");\n\t\t\t//xml += \"<ScheduleEvent>\\n\";\n\n\t\t\tindent++;\n\n\t\t\tif (crid != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Program crid=\\\"\");\n\t\t\t\txmlBuf.append(crid.getCRID());\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml = xml + \"<Program crid=\\\"\"+crid.getCRID()+\"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (programURL != null) {\n\t\t\t\txmlBuf.append(programURL.toXML(indent));\n\t\t\t\txmlBuf.append(\"\\n\");\n\t\t\t\t//xml = xml + programURL.toXML(indent) + \"\\n\";\n\t\t\t}\n\n\t\t\tif (imi != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<InstanceMetadataId>\");\n\t\t\t\txmlBuf.append(imi.getInstanceMetadataId());\n\t\t\t\txmlBuf.append(\"</InstanceMetadataId>\\n\");\n\t\t\t\t//xml = xml +\n\t\t\t\t// \"<InstanceMetadataId>\"+imi.getInstanceMetadataId()+\"</InstanceMetadataId>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedStartTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedStartTime>\");\n\t\t\t\txmlBuf\n\t\t\t\t\t\t.append(TimeToolbox\n\t\t\t\t\t\t\t\t.makeTVATimeString(publishedStartTime));\n\t\t\t\txmlBuf.append(\"</PublishedStartTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedStartTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedStartTime) +\n\t\t\t\t// \"</PublishedStartTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedEndTime != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedEndTime>\");\n\t\t\t\txmlBuf.append(TimeToolbox.makeTVATimeString(publishedEndTime));\n\t\t\t\txmlBuf.append(\"</PublishedEndTime>\\n\");\n\t\t\t\t//xml = xml + \"<PublishedEndTime>\" +\n\t\t\t\t// TimeToolbox.makeTVATimeString(publishedEndTime) +\n\t\t\t\t// \"</PublishedEndTime>\\n\";\n\t\t\t}\n\n\t\t\tif (publishedDuration != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PublishedDuration>\");\n\t\t\t\txmlBuf.append(publishedDuration.getDurationAsString());\n\t\t\t\txmlBuf.append(\"</PublishedDuration>\\n\");\n\t\t\t\t//xml += \"<PublishedDuration>\"+\n\t\t\t\t// publishedDuration.getDurationAsString() +\n\t\t\t\t// \"</PublishedDuration>\\n\";\n\t\t\t}\n\n\t\t\tif (live != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Live value=\\\"\");\n\t\t\t\txmlBuf.append(live);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Live value=\\\"\" + live + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (repeat != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Repeat value=\\\"\");\n\t\t\t\txmlBuf.append(repeat);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Repeat value=\\\"\" + repeat + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (firstShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<FirstShowing value=\\\"\");\n\t\t\t\txmlBuf.append(firstShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<FirstShowing value=\\\"\" + firstShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (lastShowing != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<LastShowing value=\\\"\");\n\t\t\t\txmlBuf.append(lastShowing);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<LastShowing value=\\\"\" + lastShowing + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (free != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<Free value=\\\"\");\n\t\t\t\txmlBuf.append(free);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<Free value=\\\"\" + free + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tif (ppv != null) {\n\t\t\t\tfor (int i = 0; i < indent; i++) {\n\t\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t\t//xml += \"\\t\";\n\t\t\t\t}\n\t\t\t\txmlBuf.append(\"<PayPerView value=\\\"\");\n\t\t\t\txmlBuf.append(ppv);\n\t\t\t\txmlBuf.append(\"\\\"/>\\n\");\n\t\t\t\t//xml += \"<PayPerView value=\\\"\" + ppv + \"\\\"/>\\n\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < indent - 1; i++) {\n\t\t\t\txmlBuf.append(\"\\t\");\n\t\t\t\t//xml += \"\\t\";\n\t\t\t}\n\t\t\txmlBuf.append(\"</ScheduleEvent>\");\n\t\t\t//xml += \"</ScheduleEvent>\";\n\n\t\t\treturn xmlBuf.toString();\n\t\t}\n\t}", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "protected abstract String createMessage(XMLLogHelper logHelper);", "private void saveXML_FTP(String yearId, String templateId, String schoolCode,Restrictions r) {\n String server = \"192.168.1.36\";\r\n int port = 21;\r\n String user = \"david\";\r\n String pass = \"david\";\r\n DocumentBuilderFactory icFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder icBuilder;\r\n FTPClient ftpClient = new FTPClient();\r\n try {\r\n ftpClient.connect(server, port);\r\n ftpClient.login(user, pass);\r\n\r\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\tDate date = new Date();\r\n\t//System.out.println(dateFormat.format(date)); //2016/11/16 12:08:43\r\n String fecha = dateFormat.format(date);\r\n fecha = fecha.replace(\" \", \"_\");\r\n fecha = fecha.replace(\"/\", \"_\");\r\n fecha = fecha.replace(\":\", \"_\");\r\n String filename = yearId + \"_\" + templateId+\"_\"+fecha+\".xml\";\r\n String rutaCarpeta = \"/Schedules/\" + schoolCode;\r\n\r\n if (!ftpClient.changeWorkingDirectory(rutaCarpeta));\r\n {\r\n ftpClient.changeWorkingDirectory(\"/Schedules\");\r\n ftpClient.mkd(schoolCode);\r\n ftpClient.changeWorkingDirectory(schoolCode);\r\n }\r\n\r\n icBuilder = icFactory.newDocumentBuilder();\r\n Document doc = icBuilder.newDocument();\r\n Element mainRootElement = doc.createElementNS(\"http://eduwebgroup.ddns.net/ScheduleWeb/enviarmensaje.htm\", \"Horarios\");\r\n doc.appendChild(mainRootElement);\r\n Element students = doc.createElement(\"Students\");\r\n // append child elements to root element\r\n \r\n for (Course t : r.courses) {\r\n for (int j = 0; j < t.getArraySecciones().size(); j++) {\r\n for (int k = 0; k < t.getArraySecciones().get(j).getIdStudents().size(); k++) { \r\n students.appendChild(getStudent(doc,\"\"+t.getArraySecciones().get(j).getIdStudents().get(k),\"\"+t.getIdCourse(),\"\"+(j+1),yearId,\"\"+t.getArraySecciones().get(j).getClassId())); \r\n } \r\n }\r\n }\r\n \r\n Element cursos = doc.createElement(\"Courses\");\r\n for (Course t : r.courses) {\r\n for (int j = 1; j < t.getArraySecciones().size(); j++) {\r\n //if()\r\n cursos.appendChild(getCursos(doc,\"\"+t.getIdCourse(),\"\"+j,\"\"+t.getArraySecciones().get(j).getIdTeacher(),yearId,\"\"+t.getArraySecciones().get(j).getClassId()));\r\n }\r\n }\r\n \r\n//private Node getBloques(Document doc, String day, String begin, String tempId, String courseId, String section) {\r\n \r\n Element bloques = doc.createElement(\"Blocks\");\r\n for (Course t : r.courses) {\r\n /* for (int i = 0; i < TAMY; i++) {\r\n for (int j = 0; j < TAMX; j++) {\r\n \r\n if ( !t.getHuecos()[j][i].contains(\"0\")) {\r\n if(t.getHuecos()[j][i].contains(\"and\")){\r\n String[] partsSections = t.getHuecos()[j][i].split(\"and\");\r\n for (String partsSection : partsSections) {\r\n String seccionClean = partsSection.replace(\" \", \"\");\r\n if(!seccionClean.equals(\"0\"))bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),seccionClean,yearId));\r\n }\r\n }\r\n else\r\n bloques.appendChild(getBloques(doc,\"\"+(j+1),\"\"+(i+1),templateId,\"\"+t.getIdCourse(),\"\"+t.getHuecos()[j][i],yearId));\r\n }\r\n }\r\n }*/\r\n for (int i = 0; i < t.getArraySecciones().size(); i++) {\r\n for (int j = 0; j < t.getArraySecciones().get(i).getPatronUsado().size(); j++) {\r\n int col = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).x +1;\r\n int row = (int) t.getArraySecciones().get(i).getPatronUsado().get(j).y +1;\r\n \r\n bloques.appendChild(getBloques(doc,\"\"+(col),\"\"+(row),templateId,\"\"+t.getIdCourse(),\"\"+t.getArraySecciones().get(i).getNumSeccion(),yearId,\"\"+t.getArraySecciones().get(i).getClassId(),\"\"+t.getArraySecciones().get(i).getPatternRenweb()));\r\n }\r\n }\r\n }\r\n \r\n /* students.appendChild(getCompany(doc, \"Paypal\", \"Payment\", \"1000\"));\r\n students.appendChild(getCompany(doc, \"eBay\", \"Shopping\", \"2000\"));\r\n students.appendChild(getCompany(doc, \"Google\", \"Search\", \"3000\"));*/\r\n \r\n mainRootElement.appendChild(students);\r\n mainRootElement.appendChild(cursos);\r\n mainRootElement.appendChild(bloques);\r\n // output DOM XML to console \r\n /*Transformer transformer = TransformerFactory.newInstance().newTransformer();\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n StreamResult console = new StreamResult(System.out);\r\n transformer.transform(source, console);\r\n*/\r\n\r\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\r\n Source xmlSource = new DOMSource(doc);\r\n Result outputTarget = new StreamResult(outputStream);\r\n TransformerFactory.newInstance().newTransformer().transform(xmlSource, outputTarget);\r\n InputStream is = new ByteArrayInputStream(outputStream.toByteArray());\r\n\r\n ftpClient.storeFile(filename, is);\r\n ftpClient.logout();\r\n\r\n } catch (Exception ex) {\r\n System.err.println(\"\");\r\n }\r\n\r\n }", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "abstract void toXML(StringBuilder xml, int level);", "public void createXMLFileForNOC(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\t//for(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\t/*Element schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);*/\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t//}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "public void writeXML() throws IOException {\n OutputFormat format = OutputFormat.createPrettyPrint();//th format of xml file\n XMLWriter xmlWriter =new XMLWriter( new FileOutputStream(file), format);\n xmlWriter.write(document);//write the new xml into the file\n xmlWriter.flush();\n }", "public void writeToXmlFile(String xmlFile, Constraint constraint) {\n\t\tDocument xmlDocument = XmlDocument.newDocument();\n\t\t\n\t\tElement rootElement = xmlDocument.createElement(XML_ROOT);\n\t\trootElement.setAttribute(XML_NUM_ATTRS, \"2\");\n\t\trootElement.setAttribute(XML_ATTR + \"1\", XML_INFO1);\n\t\trootElement.setAttribute(XML_ATTR + \"2\", XML_INFO2);\n\t\txmlDocument.appendChild(rootElement);\n\t\t\n\t\tCollections.sort(nameValuePairs, SortNameValuePairByName.inst);\n\t\t\n\t\tfor (NameValuePair pair : nameValuePairs) {\n\t\t\tElement element = createXmlElementForNameValuePair(pair.getName(), pair.getValue(), xmlDocument, constraint);\n\t\t\tif (element != null)\n\t\t\t\trootElement.appendChild(element);\n\t\t}\n\t\t\n\t\tXmlDocument.writeXmlDocumentToFile(xmlDocument, xmlFile);\n\t}", "private static String generateXML(String userName, String hash,\n String userID, String ipAddress, String paymentToolNumber,\n String expDate, String cvc, String orderID, String amount,\n String currency) {\n\n try {\n // Create instance of DocumentBuilderFactory\n DocumentBuilderFactory factory = DocumentBuilderFactory\n .newInstance();\n // Get the DocumentBuilder\n DocumentBuilder docBuilder = factory.newDocumentBuilder();\n // Create blank DOM Document\n Document doc = docBuilder.newDocument();\n\n Element root = doc.createElement(\"GVPSRequest\");\n doc.appendChild(root);\n\n Element Mode = doc.createElement(\"Mode\");\n Mode.appendChild(doc.createTextNode(\"PROD\"));\n root.appendChild(Mode);\n\n Element Version = doc.createElement(\"Version\");\n Version.appendChild(doc.createTextNode(\"v0.01\"));\n root.appendChild(Version);\n\n Element Terminal = doc.createElement(\"Terminal\");\n root.appendChild(Terminal);\n\n Element ProvUserID = doc.createElement(\"ProvUserID\");\n // ProvUserID.appendChild(doc.createTextNode(userName));\n ProvUserID.appendChild(doc.createTextNode(\"PROVAUT\"));\n Terminal.appendChild(ProvUserID);\n\n Element HashData_ = doc.createElement(\"HashData\");\n HashData_.appendChild(doc.createTextNode(hash));\n Terminal.appendChild(HashData_);\n\n Element UserID = doc.createElement(\"UserID\");\n UserID.appendChild(doc.createTextNode(\"deneme\"));\n Terminal.appendChild(UserID);\n\n Element ID = doc.createElement(\"ID\");\n ID.appendChild(doc.createTextNode(\"10000039\"));\n Terminal.appendChild(ID);\n\n Element MerchantID = doc.createElement(\"MerchantID\");\n MerchantID.appendChild(doc.createTextNode(userID));\n Terminal.appendChild(MerchantID);\n\n Element Customer = doc.createElement(\"Customer\");\n root.appendChild(Customer);\n\n Element IPAddress = doc.createElement(\"IPAddress\");\n IPAddress.appendChild(doc.createTextNode(ipAddress));\n Customer.appendChild(IPAddress);\n\n Element EmailAddress = doc.createElement(\"EmailAddress\");\n EmailAddress.appendChild(doc.createTextNode(\"[email protected]\"));\n Customer.appendChild(EmailAddress);\n\n Element Card = doc.createElement(\"Card\");\n root.appendChild(Card);\n\n Element Number = doc.createElement(\"Number\");\n Number.appendChild(doc.createTextNode(paymentToolNumber));\n Card.appendChild(Number);\n\n Element ExpireDate = doc.createElement(\"ExpireDate\");\n ExpireDate.appendChild(doc.createTextNode(\"1212\"));\n Card.appendChild(ExpireDate);\n\n Element CVV2 = doc.createElement(\"CVV2\");\n CVV2.appendChild(doc.createTextNode(cvc));\n Card.appendChild(CVV2);\n\n Element Order = doc.createElement(\"Order\");\n root.appendChild(Order);\n\n Element OrderID = doc.createElement(\"OrderID\");\n OrderID.appendChild(doc.createTextNode(orderID));\n Order.appendChild(OrderID);\n\n Element GroupID = doc.createElement(\"GroupID\");\n GroupID.appendChild(doc.createTextNode(\"\"));\n Order.appendChild(GroupID);\n\n\t\t\t/*\n * Element Description=doc.createElement(\"Description\");\n\t\t\t * Description.appendChild(doc.createTextNode(\"\"));\n\t\t\t * Order.appendChild(Description);\n\t\t\t */\n\n Element Transaction = doc.createElement(\"Transaction\");\n root.appendChild(Transaction);\n\n Element Type = doc.createElement(\"Type\");\n Type.appendChild(doc.createTextNode(\"sales\"));\n Transaction.appendChild(Type);\n\n Element InstallmentCnt = doc.createElement(\"InstallmentCnt\");\n InstallmentCnt.appendChild(doc.createTextNode(\"\"));\n Transaction.appendChild(InstallmentCnt);\n\n Element Amount = doc.createElement(\"Amount\");\n Amount.appendChild(doc.createTextNode(amount));\n Transaction.appendChild(Amount);\n\n Element CurrencyCode = doc.createElement(\"CurrencyCode\");\n CurrencyCode.appendChild(doc.createTextNode(currency));\n Transaction.appendChild(CurrencyCode);\n\n Element CardholderPresentCode = doc\n .createElement(\"CardholderPresentCode\");\n CardholderPresentCode.appendChild(doc.createTextNode(\"0\"));\n Transaction.appendChild(CardholderPresentCode);\n\n Element MotoInd = doc.createElement(\"MotoInd\");\n MotoInd.appendChild(doc.createTextNode(\"N\"));\n Transaction.appendChild(MotoInd);\n\n // Convert dom to String\n TransformerFactory tranFactory = TransformerFactory.newInstance();\n Transformer aTransformer = tranFactory.newTransformer();\n StringWriter buffer = new StringWriter();\n aTransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,\n \"yes\");\n aTransformer\n .transform(new DOMSource(doc), new StreamResult(buffer));\n return buffer.toString();\n\n } catch (Exception e) {\n return null;\n }\n\n }", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "String toXmlString() throws IOException;", "public void parseLog2(){\n\t\ttry{\n\t\t\tMxmlFile eventlog=new MxmlFile(res.getFileName());\n\t\t\t//log.info(\"processing \"+res.getFileName());\n\t\t\tres=eventlog.parse(eventlog.read(), res);\n\t\t\teventlog.close();\n\t\t}catch(Exception e){\n\t\t\tlog.warn(e.toString());\n\t\t}\n\t}", "public abstract StringBuffer toXML();", "protected BuildLog\n (\n final String fileName,\n final int buffer\n ) \n throws IOException\n {\n File logDir = new File(\"log\");\n if (!logDir.exists()) logDir.mkdirs();\n out = new PrintWriter\n (\n new BufferedWriter\n (\n new FileWriter(\"log\" + fileName, StandardCharsets.UTF_8), \n buffer\n )\n );\n }", "private void openLogFile()\r\n {\n try\r\n {\r\n GregorianCalendar gc = new GregorianCalendar();\r\n runTS = su.reformatDate(\"now\", null, DTFMT);\r\n logFile = new File(logDir + File.separator + runTS + \"_identifyFTPRequests_log.txt\");\r\n logWriter = new BufferedWriter(new FileWriter(logFile));\r\n String now = su.DateToString(gc.getTime(), DTFMT);\r\n writeToLogFile(\"identifyFTPRequests processing started at \" +\r\n now.substring(8, 10) + \":\" + now.substring(10, 12) + \".\" +\r\n now.substring(12, 14) + \" on \" + now.substring(6, 8) + \"/\" +\r\n now.substring(4, 6) + \"/\" + now.substring(0, 4));\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Error opening log file: \" + ex.getMessage());\r\n System.exit(1);\r\n }\r\n }", "private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }", "public static void writeUAV(){\n System.out.println(\"Writing new UAV\");\n Document dom;\n Element e = null;\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n dom = documentBuilder.newDocument();\n Element rootElement = dom.createElement(\"UAV\");\n\n // Create the name tag and write the name data\n e = dom.createElement(\"name\");\n e.appendChild(dom.createTextNode(name.getText()));\n rootElement.appendChild(e);\n\n // Create the weight tag and write the weight data\n e = dom.createElement(\"weight\");\n e.appendChild(dom.createTextNode(weight.getText()));\n rootElement.appendChild(e);\n\n // Create the turn radius tag and write the turn radius data\n e = dom.createElement(\"turn_radius\");\n e.appendChild(dom.createTextNode(turnRadius.getText()));\n rootElement.appendChild(e);\n\n // Create the max incline angle tag and write the max incline angle data\n e = dom.createElement(\"max_incline\");\n e.appendChild(dom.createTextNode(maxIncline.getText()));\n rootElement.appendChild(e);\n\n // Create the battery type tag and write the battery type data\n e = dom.createElement(\"battery\");\n e.appendChild(dom.createTextNode(battery.getText()));\n rootElement.appendChild(e);\n\n // Create the battery capacity tag and write the battery capacity data\n e = dom.createElement(\"battery_capacity\");\n e.appendChild(dom.createTextNode(batteryCapacity.getText()));\n rootElement.appendChild(e);\n\n dom.appendChild(rootElement);\n\n // Set the transforms to make the XML document\n Transformer tr = TransformerFactory.newInstance().newTransformer();\n tr.setOutputProperty(OutputKeys.INDENT,\"yes\");\n tr.setOutputProperty(OutputKeys.METHOD,\"xml\");\n tr.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n //tr.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"uav.dtd\");\n tr.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\",\"4\");\n\n // Write the data to the file\n tr.transform(new DOMSource(dom),new StreamResult(\n new FileOutputStream(\"src/uavs/\"+name.getText()+\".uav\")));\n\n }catch (IOException | ParserConfigurationException | TransformerException ioe){\n ioe.printStackTrace();\n // If error, show dialog box with the error message\n // If error, show dialog box with the error message\n Dialog.showDialog(\"Unable to write to write camera settings.\\n\\n\" +\n \"Ensure that \" + path + \" is visible by the application.\",\"Unable to write settings\");\n }\n }", "public String createConfigXml(PentahoConfig config) throws ApsSystemException {\n\t\tElement root = this.createConfigElement(config);\n\t\tDocument doc = new Document(root);\n\t\tXMLOutputter out = new XMLOutputter();\n\t\tFormat format = Format.getPrettyFormat();\n\t\tformat.setIndent(\"\\t\");\n\t\tout.setFormat(format);\n\t\treturn out.outputString(doc);\n\t}", "public void dumpAsXmlFile(String pFileName);", "public void processElementEpilog(Element node) \r\n\tthrows Exception \r\n\t{\r\n\tWriter xml = getWriter();\r\n\tindentLess();\r\n\txml.write(getIndent());\r\n\txml.write(\"</\");\r\n\txml.write(node.getNodeName());\r\n\txml.write(\">\\n\");\r\n\treturn;\t\r\n\t}", "public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException, TransformerException {\n\t\t\n\t\tString path = args[0]; //\"/home/pehlivanz/PWA/topics.xml\";\n\t\tString output = args[1];\n\t\tFile fXmlFile = new File(path);\n\t\t\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument docoriginal = dBuilder.parse(fXmlFile);\n\t\t\n\t\tdocoriginal.getDocumentElement().normalize();\n\t\t\n\t\t// PREPARE NEW DOCUMENT\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\tDocument docNEW = docBuilder.newDocument();\n\t\tElement rootElement = docNEW.createElement(\"Topics\");\n\t\tdocNEW.appendChild(rootElement);\n\t\t\n\t\tNodeList nList = docoriginal.getElementsByTagName(\"topic\");\n\t\tNode nNode;\n\t\tElement eElement;\n\t\t\n\t\tElement newelement;\n\t\tString query;\n\t\tString datestart;\n\t\tString dateend;\n\t\tElement tempelement;\n\t\tfor (int temp = 0; temp < nList.getLength(); temp++) {\n\t\t\t \n\t\t\ttempelement = docNEW.createElement(\"top\");\n\t\t\t\n\t\t\tnNode = (Node) nList.item(temp);\n\t \n\t\t\n\t\t\tif (nNode.getNodeType() == Node.ELEMENT_NODE) {\n\t \n\t\t\t\teElement = (Element) nNode;\n\t \n\t\t\t\tnewelement = docNEW.createElement(\"num\");\n\t\t\t\tnewelement.appendChild(docNEW.createTextNode(\"Number:\" + eElement.getAttribute(\"number\")));\n\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\n\t\t\t\tquery = eElement.getElementsByTagName(\"query\").item(0).getTextContent();\n\t\t\t\t//System.out.print(\"\\\"\"+query+\"\\\",\");\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tdatestart = eElement.getElementsByTagName(\"start\").item(0).getTextContent();\n\t\t\t\t\tdateend = eElement.getElementsByTagName(\"end\").item(0).getTextContent();\n\t\t\t\t\t\n\t\t\t\t\tquery = query.trim() +\"@\" + convertDateToTimeCronon(datestart) + \"_\" + convertDateToTimeCronon(dateend);\n\t\t\t\t\tSystem.out.println(query);\n\t\t\t\t\n\t\t\t\t// to filter topics without date I did it here\n\t\t\t\t\tnewelement = docNEW.createElement(\"title\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode( query));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\tnewelement = docNEW.createElement(\"desc\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode(eElement.getElementsByTagName(\"description\").item(1).getTextContent()));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\tnewelement = docNEW.createElement(\"narr\");\n\t\t\t\t\tnewelement.appendChild(docNEW.createTextNode(eElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n\t\t\t\t\ttempelement.appendChild(newelement);\n\t\t\t\t\t\n\t\t\t\t\trootElement.appendChild(tempelement);\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"NO Date\");\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}\n\t\t}\n\t\t\n\t\t\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\tDOMSource source = new DOMSource(docNEW);\n\t\tStreamResult result = new StreamResult(new File(output));\n \n\t\t// Output to console for testing\n\t\t// StreamResult result = new StreamResult(System.out);\n \n\t\ttransformer.transform(source, result);\n \n\t\tSystem.out.println(\"File saved!\");\n\t\t\n\t}", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public static String xml(String filename, ISOLayout layout) {\r\n try {\r\n return process(filename, layout).xml();\r\n } catch (Exception ignore) {\r\n }\r\n\r\n return MessageFormat.format(HEADER_TAG + ERROR_ELEMENT + FOOTER_TAG, filename, 0);\r\n }", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "public String getAuditXml();", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public abstract StringBuffer toXML ();", "public File XMLforRoot(String hashid, String key, String value, int LayerId, int copyNum, String timer, boolean timerType, String userid, String Time, Certificate Certi) {\n try {\n\n DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();\n\n Document document = documentBuilder.newDocument();\n\n // root element\n Element root = document.createElement(\"Root_Node_For\" + key + \"Copy\" + copyNum);\n document.appendChild(root);\n\n Element hashId = document.createElement(\"HashID\");\n hashId.appendChild(document.createTextNode(hashid));\n root.appendChild(hashId);\n\n Element layerid = document.createElement(\"layerid\");\n hashId.appendChild(layerid);\n layerid.setAttribute(\"Id\", String.valueOf(LayerId));\n\n Element key1 = document.createElement(\"Key\");\n hashId.appendChild(key1);\n key1.setAttribute(\"Key\", key);\n\n Element Value = document.createElement(\"Value\");\n Value.appendChild(document.createTextNode(value));\n hashId.appendChild(Value);\n\n Element copynum = document.createElement(\"copynum\");\n copynum.appendChild(document.createTextNode(String.valueOf(copyNum)));\n hashId.appendChild(copynum);\n\n Element timer2 = document.createElement(\"timer\");\n timer2.appendChild(document.createTextNode(String.valueOf(timer)));\n hashId.appendChild(timer2);\n\n Element timertype = document.createElement(\"timertype\");\n timertype.appendChild(document.createTextNode(String.valueOf(timerType)));\n hashId.appendChild(timertype);\n\n Element userId = document.createElement(\"userId\");\n userId.appendChild(document.createTextNode(String.valueOf(userid)));\n hashId.appendChild(userId);\n\n Element time2 = document.createElement(\"time\");\n time2.appendChild(document.createTextNode(String.valueOf(Time)));\n hashId.appendChild(time2);\n\n Element cert = document.createElement(\"Certificate\");\n cert.appendChild(document.createTextNode(String.valueOf(Certi)));\n hashId.appendChild(cert);\n\n\n // create the xml file\n //transform the DOM Object to an XML File\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\"));\n\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n\n File file = new File(\"Root_Node for\" + key + \"Copy\" + copyNum + \".xml\");\n return file;\n }", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\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\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\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\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "public void createXMLFileForCertificate(Report report) {\n\ttry{\n\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\tboolean isDirCreated = outDir.mkdirs();\n\t\tif (isDirCreated)\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\telse\n\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\n\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t// root elements\n\t\tDocument doc = docBuilder.newDocument();\n\t\tElement rootElement = doc.createElement(\"root\");\n\t\tdoc.appendChild(rootElement);\n\t\n\t\t\tfor(Student student : report.getStudentList()){\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((report.getSchoolDetails().getSchoolDetailsName() != null ? report.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t//\tStudentResult setudentResult = new\n\t\t\t\t\n\t\t\t\tElement exam = doc.createElement(\"exam\");\n\t\t\t\texam.appendChild(doc.createTextNode((student.getStudentResultList().get(0).getExam()!=null?student.getStudentResultList().get(0).getExam():\"--------\")));\n\t\t\t\tstudentList.appendChild(exam);\n\t\t\t}\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\tlogger.error(tfe);\n\t\t}\n\t}", "private void addAnalysisTimestamp()\r\n throws XMLStreamException\r\n {\r\n SimpleStartElement start;\r\n SimpleEndElement end;\r\n\r\n addNewline();\r\n\r\n start = new SimpleStartElement(\"analysis_timestamp\");\r\n start.addAttribute(\"analysis\", mimicXpress ? \"xpress\" : \"q3\");\r\n start.addAttribute(\"time\", now);\r\n start.addAttribute(\"id\", \"1\");\r\n add(start);\r\n\r\n addNewline();\r\n\r\n if (mimicXpress)\r\n {\r\n start = new SimpleStartElement(\"xpressratio_timestamp\");\r\n start.addAttribute(\"xpress_light\", \"0\");\r\n add(start);\r\n\r\n end = new SimpleEndElement(\"xpressratio_timestamp\");\r\n add(end);\r\n\r\n addNewline();\r\n }\r\n\r\n end = new SimpleEndElement(\"analysis_timestamp\");\r\n add(end);\r\n }", "public static void dumpLog() {\n\t\t\n\t\tif (log == null) {\n\t\t\t// We have no log! We must be accessing this entirely statically. Create a new log. \n\t\t\tnew Auditor(); // This will create the log for us. \n\t\t}\n\n\t\t// Try to open the log for writing.\n\t\ttry {\n\t\t\tFileWriter logOut = new FileWriter(log);\n\n\t\t\t// Write to the log.\n\t\t\tlogOut.write( trail.toString() );\n\n\t\t\t// Close the log writer.\n\t\t\tlogOut.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Close the log file itself.\n\t\t// Apparently we can't? TODO: Look into this. \n\n\t}", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "public void serializeLogs();", "public void createXMLFile() {\n\t int jmax = listOfRules.size();\n\t int j = 0;\n\t try {\n\t try {\n\n\t DocumentBuilderFactory docFactory = DocumentBuilderFactory\n\t .newInstance();\n\t DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n\t // root elements\n\t Document doc = docBuilder.newDocument();\n\t Element rootElement = doc.createElement(\"profile\");\n\t doc.appendChild(rootElement);\n\t // name\n\t Element name = doc.createElement(\"name\");\n\t name.appendChild(doc.createTextNode(\"Android Lint\"));\n\t rootElement.appendChild(name);\n\t // language\n\t Element language = doc.createElement(\"language\");\n\t language.appendChild(doc.createTextNode(\"Java\"));\n\t rootElement.appendChild(language);\n\t // rules\n\t Element rules = doc.createElement(\"rules\");\n\t rootElement.appendChild(rules);\n\n\t for (j = 0; j < jmax; j++) {\n\t Element rule = doc.createElement(\"rule\");\n\t rules.appendChild(rule);\n\t // repositoryKey\n\t Element repositoryKey = doc.createElement(\"repositoryKey\");\n\t repositoryKey\n\t .appendChild(doc.createTextNode(\"AndroidLint\"));\n\t rule.appendChild(repositoryKey);\n\t // key\n\t Element key = doc.createElement(\"key\");\n\t key.appendChild(doc.createTextNode(listOfRules.get(j)));\n\t rule.appendChild(key);\n\t }\n\n\t // write the content into xml file\n\t TransformerFactory transformerFactory = TransformerFactory\n\t .newInstance();\n\t Transformer transformer = transformerFactory.newTransformer();\n\t DOMSource source = new DOMSource(doc);\n\t StreamResult result = new StreamResult(new File(pathProfileXml+ANDROID_LINT_PROFILE_FILENAME\n\t ));\n\n\t transformer.transform(source, result);\n\n\t System.out.println(\"File \\\"\"+pathProfileXml+ANDROID_LINT_PROFILE_FILENAME+\"\\\" written.\");\n\t System.out.println(\"Quit.\");\n\n\t } catch (ParserConfigurationException pce) {\n\t pce.printStackTrace();\n\t } catch (TransformerException tfe) {\n\t tfe.printStackTrace();\n\t }\n\t } catch (Exception e) {\n\n\t }\n\t }", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "private String toXML(){\n\tString buffer = \"<xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\">\\n\";\n\tfor(Room[] r : rooms)\n\t for(Room s : r)\n\t\tif(s != null)\n\t\t buffer += s.toXML();\n\tbuffer += \"</xml>\";\n\treturn buffer;\n }", "public final void toFile(final File xmlFile) throws IOException {\n if (xmlFile == null) throw new FileNotFoundException(\"file is null\");\n\n PrintWriter pw = new PrintWriter(new FileWriter(xmlFile));\n pw.print(toString());\n pw.close();\n }", "void setupFileLogging();", "public void createXMLFileForExamResultNew(Report reportData) {\n\t\ttry{\n\t\t\tFile outDir = new File(reportData.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tfor(Student student : reportData.getStudentList()){\n\t\t\t\tString final_weitage=null;\n\t\t\t\tint total_weitage = 0;\t\n\t\t\t\t\t\n\t\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\t\trootElement.appendChild(studentList);\n\t\t\t\t\n\t\t\t\tElement schoolname = doc.createElement(\"schoolname\");\n\t\t\t\tschoolname.appendChild(doc.createTextNode((reportData.getSchoolDetails().getSchoolDetailsName() != null ? reportData.getSchoolDetails().getSchoolDetailsName() : \"\" )));\n\t\t\t\tstudentList.appendChild(schoolname);\n\t\t\t\t\n\t\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\t\tacademicYear.appendChild(doc.createTextNode((String) (reportData.getAcademicYear().getAcademicYearName()!= null ? reportData.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\t\tElement report = doc.createElement(\"report\");\n\t\t\t\treport.appendChild(doc.createTextNode(\"MARKS STATEMENT\"));\n\t\t\t\tstudentList.appendChild(report);\n\t\t\t\n\t\t\t\tElement termdate = doc.createElement(\"termdate\");\n\t\t\t\ttermdate.appendChild(doc.createTextNode((reportData.getSchoolDetails().getExamName()!=null?reportData.getSchoolDetails().getExamName():\"--------\")));\n\t\t\t\tstudentList.appendChild(termdate);\n\t\t\t\t\n\t\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\t\troll.appendChild(doc.createTextNode((student.getRollNumber().toString()!=null?student.getRollNumber().toString():\"---------\")));\n\t\t\t\tstudentList.appendChild(roll);\n\t\t\t\t\n\t\t\t\t// nickname elements\n\t\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\t\tstudentname.appendChild(doc.createTextNode((student.getStudentName()!=null?student.getStudentName():\"---------------\")));\n\t\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\t\t\n\t\t\t\tElement house = doc.createElement(\"house\");\n\t\t\t\thouse.appendChild(doc.createTextNode((student.getHouse()!=null?student.getHouse():\"------\")));\n\t\t\t\tstudentList.appendChild(house);\n\t\t\t\n\t\t\t\tElement standard = doc.createElement(\"standard\");\n\t\t\t\tstandard.appendChild(doc.createTextNode((student.getStandard()!=null?student.getStandard():\"------\")));\n\t\t\t\tstudentList.appendChild(standard);\n\t\t\t\n\t\t\t\tElement section = doc.createElement(\"section\");\n\t\t\t\tsection.appendChild(doc.createTextNode((student.getSection()!=null?student.getSection():\"--------\")));\n\t\t\t\tstudentList.appendChild(section);\n\t\t\t\t\n\t\t\t\tElement bloodgroup = doc.createElement(\"bloodgroup\");\n\t\t\t\tbloodgroup.appendChild(doc.createTextNode((student.getBloodGroup()!=null?student.getBloodGroup():\"NA\")));\n\t\t\t\tstudentList.appendChild(bloodgroup);\n\t\t\t\t\n\t\t\t\tif(student.getResource()!=null){\n\t\t\t\t\tElement fathername = doc.createElement(\"fathername\");\n\t\t\t\t\tfathername.appendChild(doc.createTextNode((student.getResource().getFatherFirstName()!=null?student.getResource().getFatherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(fathername);\n\t\t\t\t\t\n\t\t\t\t\tElement mothername = doc.createElement(\"mothername\");\n\t\t\t\t\tmothername.appendChild(doc.createTextNode((student.getResource().getMotherFirstName()!=null?student.getResource().getMotherFirstName():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(mothername);\n\t\t\t\t\t\n\t\t\t\t\tElement dob = doc.createElement(\"dob\");\n\t\t\t\t\tdob.appendChild(doc.createTextNode((student.getResource().getDateOfBirth()!=null?student.getResource().getDateOfBirth():\"--------\")));\n\t\t\t\t\tstudentList.appendChild(dob);\n\t\t\t\t\t}\n\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\tif(examObj.getExamName().equalsIgnoreCase(\"PerioDic Test\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"PTexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Note Book\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"NBexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Sub Enrichment\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"SEexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}else if(examObj.getExamName().equalsIgnoreCase(\"Half Yearly Exam\")){\n\t\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"HYexammarks\");\n\t\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t String subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\t\tString subjectTotalChar = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"grade\");\n\t\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*for(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\"); //For Term 2\n\t\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*String subjectTotalCharecter = \"\";\n\t\t\t\t\t\t\t\tElement totalTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\ttotalTerm2.appendChild(doc.createTextNode((subjectTotalCharecter!=null?subjectTotalCharecter:\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(totalTerm2);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement gradeTerm2 = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\tgradeTerm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(gradeTerm2);*/\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term2\")){\n\t\t\t\t\tSystem.out.println(\"within term2\");\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\tfor(Subject subjectObj : studentResult.getSubjectList()){\n\t\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\t\tfor(Exam examObj:subjectObj.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalString!=null?subjectTotalString:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t System.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\tint subjectTotalInt = 0;\n\t\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\t\t//if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*if(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\")){\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//String subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString subjectTotalChar = subjecTotal.toString();\n\t\t\t\t\t\t\tsubjectTotalInt = (int) Math.round(subjecTotal);\n\t\t\t\t\t\t\tString subjectTotalString = subjectTotalInt +\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement total = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectTotalChar!=null?subjectTotalChar:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(total);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString standardValue = student.getStandard();\n\t\t\t\t\t\t\tString grade = getGradeForSubjectTotal(subjectTotalInt,standardValue);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tElement gradeElement = doc.createElement(\"exammarks\");\n\t\t\t\t\t\t\tgradeElement.appendChild(doc.createTextNode((grade!=null?grade:\"\")));\n\t\t\t\t\t\t\tsubject.appendChild(gradeElement);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"subjecTotal====\"+subjecTotal);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else if(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT1\") || reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT2\") ||reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"PT3\")){\n\t\t\t\tDouble allTotal = 0.00 ;\n\t\t\t\tfor(StudentResult studentResult : student.getStudentResultList()){\n\t\t\t\t\tElement subject = doc.createElement(\"subject\");\n\t\t\t\t\tstudentList.appendChild(subject);\n\t\t\t\t\tDouble subjecTotal = 0.00 ;\n\t\t\t\t\t\n\t\t\t\t\tElement subjectname = doc.createElement(\"subjectname\");\n\t\t\t\t\tsubjectname.appendChild(doc.createTextNode((studentResult.getSubject()!=null?studentResult.getSubject():\"\")));\n\t\t\t\t\tsubject.appendChild(subjectname);\n\t\t\t\t\tfor(Exam examObj:studentResult.getExamList() ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement maxmarks = doc.createElement(\"maxmarks\");\n\t\t\t\t\t\tmaxmarks.appendChild(doc.createTextNode((examObj.getExamName()!=null?examObj.getExamName():\"\")));\n\t\t\t\t\t\tsubject.appendChild(maxmarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement examMarks = doc.createElement(\"exammarks\");\n\t\t\t\t\t\texamMarks.appendChild(doc.createTextNode((examObj.getGrade()!=null?examObj.getGrade():\"\")));\n\t\t\t\t\t\tsubject.appendChild(examMarks);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(null != examObj.getGrade()){\n\t\t\t\t\t\t\tif(examObj.getGrade().equalsIgnoreCase(\"UM\")||examObj.getGrade().equalsIgnoreCase(\"AB\") || examObj.getGrade().equalsIgnoreCase(\"NA\")){\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + 0.0;\n\t\t\t\t\t\t\t\tallTotal = allTotal + 0.0;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsubjecTotal = subjecTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t\tallTotal = allTotal + Double.parseDouble(examObj.getGrade());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString subjectString = String.format( \"%.2f\", subjecTotal ) ;\n\t\t\t\t\t\n\t\t\t\t\t/*Element total = doc.createElement(\"total\");\n\t\t\t\t\ttotal.appendChild(doc.createTextNode((subjectString!=null?subjectString:\"\")));\n\t\t\t\t\tsubject.appendChild(total);*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString allTotalString = String.format( \"%.2f\", allTotal ) ;\n\t\t\t\t\n\t\t\t\tElement total = doc.createElement(\"total\");\n\t\t\t\ttotal.appendChild(doc.createTextNode((allTotalString!=null?allTotalString:\"\")));\n\t\t\t\tstudentList.appendChild(total);\n\t\t\t}\n\t\t\t\t\t\tif(student.getCoScholasticResultList()!=null && student.getCoScholasticResultList().size()!=0){\n\t\t//\t\t\t\t\tSystem.out.println(\"##....... \"+student.getCoScholasticResultList().size());\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"Term1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Element coscholasticmarks = doc.createElement(\"coscholasticmarks\");\n\t\t\t\t\t\t\t\t\t//studentList.appendChild(coscholasticmarks);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"physicalEducation\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticphysicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm2.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"discipline\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticdisciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm2.appendChild(doc.createTextNode((\"\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"healtheducation\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*\tElement coscholastichealtheducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm2.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"workeducation\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t/*Element coscholasticworkeducationTerm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm2.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm2);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm2 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm2.appendChild(doc.createTextNode((\"\")));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm2);*/\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(reportData.getSchoolDetails().getExamName().equalsIgnoreCase(\"AnnualExam1\")){\n\t\t\t\t\t\t\t\tfor(CoScholasticResult csr : student.getCoScholasticResultList()){\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"PHYSICAL EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticphysicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticphysicaleducationTerm1.appendChild(doc.createTextNode(( \"PHYSICAL EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticphysicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement physicaleducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tphysicaleducationTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(physicaleducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"DISCIPLINE\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticdisciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticdisciplineTerm1.appendChild(doc.createTextNode(( \"DISCIPLINE\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticdisciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement disciplineTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tdisciplineTerm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(disciplineTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"HEALTH EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholastichealtheducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholastichealtheducationTerm1.appendChild(doc.createTextNode(( \"HEALTH EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholastichealtheducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement healtheducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\thealtheducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(healtheducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(csr.getHead()!=null && csr.getHead().trim().equalsIgnoreCase(\"WORK EDUCATION\")){\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement coscholasticworkeducationTerm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tcoscholasticworkeducationTerm1.appendChild(doc.createTextNode(( \"WORK EDUCATION\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(coscholasticworkeducationTerm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement workeducationterm1 = doc.createElement(\"coscholastic\");\n\t\t\t\t\t\t\t\t\t\tworkeducationterm1.appendChild(doc.createTextNode((csr.getGrade()!= null ? csr.getGrade() : \"-\" )));\n\t\t\t\t\t\t\t\t\t\tstudentList.appendChild(workeducationterm1);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(reportData.getXmlFilePath()+reportData.getXmlFileName()));\n\t\t\t\n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.error(e);\n\t\t\t}\n\t\t}", "public void createXMLFileForGatePass(Report report) {\n\t\ttry{\n\t\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\trootElement.appendChild(studentList);\n\t\t\t\n\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\tstudentList.appendChild(roll);\n\t\t\t\n\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\n\t}", "void addEntry(IvyXmlWriter xw) \n{\n xw.begin(\"USERFILE\");\n xw.field(\"NAME\",access_name);\n xw.field(\"JARNAME\",context_name);\n xw.field(\"ACCESS\",file_mode);\n xw.end(\"USERFILE\");\n}", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public void createLogFile(int peerID) {\n String filename = \"peer_\" + peerID + \"/log_peer_\" + peerID + \".log\";\n File output = new File(\"peer_\" + peerID);\n output.mkdir();\n\n File file = new File(filename);\n\n try {\n if(!file.exists()) {\n file.createNewFile();\n FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(\"Log File for peer_\" + peerID + \".\");\n bw.newLine();\n bw.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected String getXML() {\n\n StringBuffer b = new StringBuffer(\"title =\\\"\");\n b.append(title);\n b.append(\"\\\" xAxisTitle=\\\"\");\n b.append(xAxisTitle);\n b.append(\"\\\" yAxisTitle=\\\"\");\n b.append(yAxisTitle);\n b.append(\"\\\" xRangeMin=\\\"\");\n b.append(xRangeMin);\n b.append(\"\\\" xRangeMax=\\\"\");\n b.append(xRangeMax);\n b.append(\"\\\" xRangeIncr=\\\"\");\n b.append(xRangeIncr);\n b.append(\"\\\" yRangeMin=\\\"\");\n b.append(yRangeMin);\n b.append(\"\\\" yRangeMax=\\\"\");\n b.append(yRangeMax);\n b.append(\"\\\" yRangeIncr=\\\"\");\n b.append(yRangeIncr);\n b.append(\"\\\" >\\n\");\n\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource)dataSources.get(i);\n b.append(ds.toXML());\n b.append(\"\\n\");\n }\n\n return b.toString();\n }", "String getStats()\n {\n StringBuffer result = new StringBuffer(\"\\n<LogFile file='\" + file + \"'>\" +\n \"\\n <rewindCount value='\" + rewindCounter + \"'>Number of times this file was rewind to position(0)</rewindCount>\" +\n \"\\n <bytesWritten value='\" + bytesWritten + \"'>Number of bytes written to the file</bytesWritten>\" +\n \"\\n <position value='\" + position + \"'>FileChannel.position()</position>\" +\n \"\\n</LogFile>\" +\n \"\\n\" \n );\n\n return result.toString();\n }", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void createXMLFile(String INPUT_XML_SYMBOL) throws IOException {\n\n\t\t// creates isoxxxx-xxx_temp.xml\n\t\tOUTPUT_FILE_TEMP = INPUT_XML_SYMBOL.replace(\".xml\", \"_temp.xml\");\n\n\t\t// get Symbol\n\t\tString xmlSymbol = readFile(INPUT_XML_SYMBOL);\n\n\t\t// get ComponentName\n\t\tint i = xmlSymbol.indexOf(\"ComponentName=\") + 15;\n\t\tint j = xmlSymbol.indexOf(\"\\\"\", i);\n\t\tString componentName = xmlSymbol.substring(i, j);\n\n\t\t// get basic file stuff\n\t\tString xmlHeader = readFile(this.INPUT_XML_HEADER);\n\t\tString xmlBottom = readFile(this.INPUT_XML_FOOTER).replace(\"abc\", componentName);\n\n\t\t// create the new file\n\t\twriteStringToFile(\n\t\t\t\txmlHeader + \"\\n\" + xmlSymbol + \"\\n\" + \"</ShapeCatalogue>\" + \"\\n\" + xmlBottom + \"\\n\" + \"</PlantModel>\");\n\t}", "static void writeGPXFile(Trail trail, Context context) {\r\n if(gpxParser == null)\r\n buildParser();\r\n\r\n GPX gpx = parseTrailtoGPX(trail);\r\n\r\n System.out.println(\"~~~~~~~~~~~~~~~\"+trail.getMetadata().getName());\r\n\r\n //create a new file with the given name\r\n File file = new File(context.getExternalFilesDir(null), trail.getMetadata().getName()+\".gpx\");\r\n FileOutputStream out;\r\n try {\r\n out = new FileOutputStream(file);\r\n gpxParser.writeGPX(gpx, out);\r\n } catch(FileNotFoundException e) {\r\n AlertUtils.showAlert(context,\"File not found\",\"Please notify the developers.\");\r\n } catch (TransformerException e) {\r\n AlertUtils.showAlert(context,\"Transformer Exception\",\"Please notify the developers.\");\r\n } catch (ParserConfigurationException e) {\r\n AlertUtils.showAlert(context,\"Parser Exception\",\"Please notify the developers.\");\r\n }\r\n }", "private static void createLogger() {\n logger = myLogger.createHtmlLogger(\"JRECEIPTS\", Options.LOG_PATH + \"Receipts\", 262144, true, 1);\n// boolean append = true;\n// int limit = 1000000; // 1 Mb\n// int numLogFiles = 5;\n// FileHandler fh = new FileHandler(Options.LOG_PATH + \"Receipts_%g.html\", limit, numLogFiles, true);\n// fh.setFormatter(new SimpleFormatter());\n// // Add to the desired logger\n// logger = Logger.getLogger(\"Receipts\");\n// logger.addHandler(fh);\n }", "private void toXMLTag(StringBuffer buffer, int level) {\n\t\tindent(buffer,level).append('<').append(name);\n\n\t\tif(attributes!=null && attributes.getLength()>0)\n\t\t\tbuffer.append(' ').append(attributes.toString());\n\n\t\tif(children.size()>0) {\n\t\t\tbuffer.append(\">\\n\");\n\t\t\tfor(int i=0; i<children.size(); i++)\n\t\t\t\t((WSLNode)children.elementAt(i)).toXMLTag(buffer, level+1);\n\t\t\tindent(buffer,level).append(\"</\").append(name).append(\">\\n\");\n\t\t} else buffer.append(\" />\\n\");\n\t}", "@Override\n\tpublic void write() {\n\t\tSystem.out.println(\"使用xml方式存储\");\n\t}", "public void saveRecordingData(SuiteEntry suite, File dirPath) throws Exception {\n // Fortify Mod: make sure that dirPath is a legal path\n if( dirPath != null ) {\n TEPath tpath = new TEPath(dirPath.getAbsolutePath());\n if( ! tpath.isValid() ) \n throw new IllegalArgumentException(\"Invalid argument to saveRecordingData: dirPath = \" + dirPath.getAbsolutePath());\n }\n if (dirPath != null && null != suite && SetupOptions.recordingInfo(suite.getLocalName()) == true) {\n\n try {\n //Create a Source for saving the data.\n DOMSource source = new DOMSource(TECore.doc);\n TransformerFactory xformFactory = TransformerFactory.newInstance();\n // Fortify Mod: prevent external entity injection \n xformFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\n Transformer idTransform = xformFactory.newTransformer();\n // Declare document is XML\n idTransform.setOutputProperty(OutputKeys.METHOD, XML);\n // Declare document standard UTF-8\n idTransform.setOutputProperty(OutputKeys.ENCODING, UT_F8);\n // Declare document is well indented\n idTransform.setOutputProperty(OutputKeys.INDENT, YES);\n OutputStream report_logs = new FileOutputStream(new File(dirPath.getAbsolutePath() + Constants.tmp_File));\n Result output = new StreamResult(report_logs);\n //transform the output in xml.\n idTransform.transform(source, output);\n // Fortify Mod: Flush and free up the OutputStream\n report_logs.close();\n BufferedReader bufferedReader = null;\n BufferedWriter bufferedWriter = null;\n // Read the xml data from file\n bufferedReader = new BufferedReader(new FileReader(dirPath.getAbsolutePath() + Constants.tmp_File));\n // Create a xml file for saving the data.\n bufferedWriter = new BufferedWriter(new FileWriter(dirPath.getAbsolutePath() + Constants.result_logxml));\n String dataString = \"\";\n //Read the data from file.\n while ((dataString = bufferedReader.readLine()) != null) {\n // Replace special symbol code to its symbol\n dataString = dataString.replaceAll(\"&lt;\", \"<\").replaceAll(\"&gt;\", \">\").replaceAll(\"&amp;\", \"&\");\n bufferedWriter.write(dataString);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }\n // Fortify Mod: Free up the Buffered Reader and Writer and their associated resources\n bufferedReader.close();\n bufferedWriter.close();\n TECore.methodCount=0;\n TECore.rootTestName.clear();\n // Check file exists\n File file = new File(dirPath.getAbsolutePath() + Constants.tmp_File);\n if (file.exists()) {\n // Delete file if exists\n file.delete();\n }\n } catch (Exception e) {\n System.out.println(ERROR_ON_SAVE_THE__RECORDING__ + e.toString());\n }\n }\n }", "public void writeToXML() throws IOException, XMLStreamException {\n FileOutputStream outPC = new FileOutputStream(\"C:\\\\Users\\\\Ruben Joosen\\\\Documents\\\\AntwerpenU\\\\Semester 5\\\\Distributed Systems\\\\ProjectY\\\\DS\\\\ProjectY\\\\map.xml\");\n FileOutputStream out = new FileOutputStream(\"/home/pi/Documents/DS/ProjectY/map.xml\"); // \"/home/pi/Documents/DS/ProjectY/map.xml\"\n\n XMLStreamWriter xsw = null;\n try {\n try {\n XMLOutputFactory xof = XMLOutputFactory.newInstance();\n xsw = xof.createXMLStreamWriter(out, \"UTF-8\");\n xsw.writeStartDocument(\"utf-8\", \"1.0\");\n xsw.writeStartElement(\"entries\");\n\n // Do the Collection\n for (Map.Entry<Integer, String> e : this.IPmap.entrySet()) {\n xsw.writeStartElement(\"entry\");\n xsw.writeAttribute(\"key\", e.getKey().toString());\n xsw.writeAttribute(\"value\", e.getValue().toString());\n xsw.writeEndElement();\n }\n xsw.writeEndElement();\n xsw.writeEndDocument();\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) { /* ignore */ }\n }\n }// end inner finally\n } finally {\n if (xsw != null) {\n try {\n xsw.close();\n } catch (XMLStreamException e) { /* ignore */ }\n }\n }\n }", "public void logToXML( OutputStream out ) {\r\n\t\tdbVersion.logToXML( out, Charset.forName( \"UTF-8\" ) );\r\n\t}", "public void filecreate(String Response_details) throws IOException\n\t{\n\t\tFileWriter myWriter = new FileWriter(\"D://Loadtime.txt\",true);\n\t\tmyWriter.write(Response_details+System.lineSeparator());\n\t\tmyWriter.close();\n\t\tSystem.out.println(\"Successfully wrote to the file.\");\n\t\t\n\t\t\n\t}", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void setUpNewXMLFile(File file) {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(file, \"UTF-8\");\n\t\t\tpw.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\\n\");\n\t\t\tpw.write(\"<\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.write(\"</\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.close();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error creating new XML File.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tpw.close();\n\t\t\t} catch(Exception e) {\n\t\t\t\t//Seems like it was already closed.\n\t\t\t}\n\t\t}\n\t}", "public void toXML(StringBuffer xmlDoc)\r\n throws Exception {\r\n XMLBuilder builder = new XMLBuilder();\r\n\r\n /*Get start of document*/\r\n builder.getStartOfDocument(xmlDoc);\r\n\r\n /*Build document content*/\r\n xmlDoc.append(XML_ERROR_MESSAGE_START);\r\n xmlDoc.append(getErrorMessage());\r\n xmlDoc.append(XML_ERROR_MESSAGE_END);\r\n xmlDoc.append(XML_ERROR_CLASS_START);\r\n xmlDoc.append(getException());\r\n xmlDoc.append(XML_ERROR_CLASS_END);\r\n xmlDoc.append(XML_ERROR_CLASS_MESSAGE_START);\r\n xmlDoc.append(getException().getMessage());\r\n xmlDoc.append(XML_ERROR_CLASS_MESSAGE_END);\r\n\r\n /*Get end of document*/\r\n builder.getEndOfDocument(xmlDoc);\r\n }", "public void testLogToXmlCreator(String suiteName, String testName, String sourceFileName, String xmlOutputFileName, String reporterClass) throws IOException {\n \t\t// OPTIONAL FAILURES NUMBER OUTPUT:\n \t\tif (fileExist(\"test.num\", false)) {\n \t\t\tif (fileExist(sourceFileName, false)) {\n \t\t\t\tif (Integer.valueOf(fileScanner(\"test.num\")) == 1 ) { fileWriterPrinter(\"FAILED...\"); }\n \t\t\t\telse { \n \t\t\t\t\tif (convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length == Integer.valueOf(fileScanner(\"test.num\")))\n \t\t\t\t\t { fileWriterPrinter(\"ALL \" + convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length + \" FAILED!\" + \"\\n\"); }\n \t\t\t\t\telse { fileWriterPrinter(\"FAILED: \" + convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length + \" OF \" + fileScanner(\"test.num\") + \"\\n\"); }\n \t\t\t\t}\n \t\t\t} else { \n \t\t\t\t if (Integer.valueOf(fileScanner(\"test.num\")) == 1 ) { fileWriterPrinter(\"PASSED!\"); } \n \t\t\t\t else { fileWriterPrinter(\"ALL PASSED!\\n\"); }\n \t\t\t\t} \t\t\n \t } else {\n \t\t if(fileExist(sourceFileName, false)) {\n \t\t\t System.out.println(\"FAILED: \" + convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\t\n \t\t } else { System.out.print(\"ALL PASSED!\"); } \t \t\n \t }\n\n \t\t// PRE-CLEAN:\n \t\tif (fileExist(System.getProperty(\"user.dir\"), xmlOutputFileName, false)) { fileCleaner(System.getProperty(\"user.dir\"), xmlOutputFileName);}\t\t\n \t\t\n \t\t// FAILED SUITE CREATES XML, OTHERWISE NOTHING:\n \t\tif (fileExist(sourceFileName, false)) {\n \t\t\t\n// \t\t// UPDATE PREVIOUS TEST NUMBER AS PER FAILED:\n// \t\tif (fileExist(\"prev.num\", false)){\n// \t\t\tfileCleaner(\"prev.num\");\n// \t\t\tfileWriter(\"prev.num\", convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\n// \t\t}\n \t\t\t\n// \t\t// UPDATE LAST TEST NUMBER AS PER FAILED:\n// \t\tif (fileExist(\"last.num\", false)){\n// \t\t\tfileCleaner(\"last.num\");\n// \t\t\tfileWriter(\"last.num\", convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\n// \t\t}\n \t\t\t\n \t// UPDATE FAILED TEST NUMBER AS PER FAILED:\n \tif (fileExist(\"failed.num\", false)){\n \t\tfileCleaner(\"failed.num\");\n \t\tfileWriter(\"failed.num\", convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)).length);\n \t}\n \t\t\n \t\t// HEADER:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"<!DOCTYPE suite SYSTEM \\\"http://testng.org/testng-1.0.dtd\\\">\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"<suite name=\\\"\" + suiteName + \"\\\">\");\n \t\t\n \t\t// LISTENERS:\n\t\t\t\tString extentReporterClassPath; \n \t\textentReporterClassPath = new Object(){}.getClass().getPackage().getName();\n \t\textentReporterClassPath = extentReporterClassPath.substring(0, extentReporterClassPath.lastIndexOf(\".\"));\n \t\textentReporterClassPath = extentReporterClassPath.substring(0, extentReporterClassPath.lastIndexOf(\".\"));\n \t\textentReporterClassPath = extentReporterClassPath + \".extentreporter.ExtentReporterNG\"; \n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <listeners>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <listener class-name=\\\"\" + extentReporterClassPath + \"\\\"/>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" </listeners>\");\n \t\t\n \t\t// TEST:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <test name=\\\"\" + testName + \"\\\">\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" <classes>\");\n \t\t\t\t\t\t\n \t\t// BODY:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" \" + reporterClass); \t\t\n \t\tString[] string = convertXmlArrayToTestNG(readLogOutputXmlLinesArray(sourceFileName)); // READS FAILURES\n \t\t/** WILL PRINT XML CLASSES-BODY */ // for (String s : string) { System.out.println(s); }\n \t\tfor (String s : string) { fileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, s); }\n \t\t\n \t\t// FOOTER:\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" </classes>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \" </test>\");\n \t\tfileWriter(System.getProperty(\"user.dir\"), xmlOutputFileName, \"</suite>\");\n \t\t\n \t\t}\t\n \t}", "public void writeXMLFinisher() {\n\t\tJavaIO.createXMLFile(getCurrentPath(), \"coveragePriorJ.xml\", \"</list>\", true);\n\t}", "public static void main(String[]args){\n XMLOutputter out = new XMLOutputter();\n SAXBuilder sax = new SAXBuilder();\n\n //Objekte die gepseichert werden sollen\n Car car = new Car(\"CR-MD-5\",\"16.05.1998\",4,4,4);\n Car car2 = new Car(\"UL-M-5\",\"11.03.2002\",10,2,5);\n\n\n Element rootEle = new Element(\"cars\");\n Document doc = new Document(rootEle);\n\n //hinzufuegen des ersten autos\n Element carEle = new Element(\"car\");\n carEle.setAttribute(new Attribute(\"car\",\"1\"));\n carEle.addContent(new Element(\"licenseplate\").setText(car.getLicensePlate()));\n carEle.addContent(new Element(\"productiondate\").setText(car.getProductionDate()));\n carEle.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car.getNumberPassengers())));\n carEle.addContent(new Element(\"numberwheels\").setText(Integer.toString(car.getNumberWheels())));\n carEle.addContent(new Element(\"numberdoors\").setText(Integer.toString(car.getNumberDoors())));\n\n //hinzufuegen des zweiten autos\n Element carEle2 = new Element(\"car2\");\n carEle2.setAttribute(new Attribute(\"car2\",\"2\"));\n carEle2.addContent(new Element(\"licenseplate\").setText(car2.getLicensePlate()));\n carEle2.addContent(new Element(\"productiondate\").setText(car2.getProductionDate()));\n carEle2.addContent(new Element(\"numberpassengers\").setText(Integer.toString(car2.getNumberPassengers())));\n carEle2.addContent(new Element(\"numberwheels\").setText(Integer.toString(car2.getNumberWheels())));\n carEle2.addContent(new Element(\"numberdoors\").setText(Integer.toString(car2.getNumberDoors())));\n\n\n doc.getRootElement().addContent(carEle);\n doc.getRootElement().addContent(carEle2);\n\n //Einstellen des Formates auf gut lesbares, eingeruecktes Format\n out.setFormat(Format.getPrettyFormat());\n //Versuche in xml Datei zu schreiben\n try {\n out.output(doc, new FileWriter(\"SaveCar.xml\"));\n } catch (IOException e) {\n System.out.println(\"Error opening File\");\n }\n\n\n //Einlesen\n\n File input = new File(\"SaveCar.xml\");\n Document inputDoc = null;\n //Versuche aus xml Datei zu lesen und Document zu instanziieren\n try {\n inputDoc = (Document) sax.build(input);\n } catch (JDOMException e) {\n System.out.println(\"An Error occured\");\n } catch (IOException e) {\n System.out.print(\"Error opening File\");\n }\n\n //Liste von Elementen der jeweiligen Autos\n List<Element> listCar = inputDoc.getRootElement().getChildren(\"car\");\n List<Element> listCar2 = inputDoc.getRootElement().getChildren(\"car2\");\n\n //Ausgabe der Objekte auf der Konsole (manuell)\n printXML(listCar);\n System.out.println();\n printXML(listCar2);\n\n //Erstellen der abgespeicherten Objekte\n Car savedCar1 = createObj(listCar);\n Car savedCar2 = createObj(listCar2);\n\n System.out.println();\n System.out.println(savedCar1);\n System.out.println();\n System.out.println(savedCar2);\n\n}", "public static void buildXML(ReceiverBean receiverBean, String folderName) {\r\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder dBuilder;\r\n\t\ttry {\r\n\t\t\tdBuilder = dbFactory.newDocumentBuilder();\r\n\t\t\tDocument doc = dBuilder.newDocument();\r\n\t\t\t// add elements to Document\r\n\t\t\tElement rootElement = doc.createElementNS(\"\", \"receiver\");\r\n\t\t\t// append root element to document\r\n\t\t\tdoc.appendChild(rootElement);\r\n\r\n\t\t\t// append first child element to root element\r\n\t\t\tpopulateReceiver(rootElement, receiverBean, doc);\r\n\r\n\t\t\t// for output to file, console\r\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\t\t// for pretty print\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\tDOMSource source = new DOMSource(doc);\r\n\r\n\t\t\t// write to console or file\r\n\t\t\tStreamResult console = new StreamResult(System.out);\r\n\t\t\tStreamResult file = new StreamResult(\r\n\t\t\t\t\tnew File(folderName + receiverBean.getFile().split(\"\\\\.\")[0] + \".xml\"));\r\n\r\n\t\t\t// write data\r\n\t\t\ttransformer.transform(source, console);\r\n\t\t\ttransformer.transform(source, 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}\r\n\t}", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLDocking version=\\\"2.1\\\">\");\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desktop = (WSDesktop) desktops.get(i);\n\t\t\tdesktop.writeDesktopNode(out);\n\t\t}\n\t\tout.println(\"</VLDocking>\");\n\n\t\tout.flush();\n\t}", "public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}", "public static String format(String xml) {\r\n try {\r\n final InputSource src = new InputSource(new StringReader(xml));\r\n final Node document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(src).getDocumentElement();\r\n final Boolean keepDeclaration = Boolean.valueOf(xml.startsWith(\"<?xml\"));\r\n \r\n //May need this: System.setProperty(DOMImplementationRegistry.PROPERTY,\"com.sun.org.apache.xerces.internal.dom.DOMImplementationSourceImpl\");\r\n\r\n final DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();\r\n final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation(\"LS\");\r\n final LSSerializer writer = impl.createLSSerializer();\r\n \r\n writer.getDomConfig().setParameter(\"format-pretty-print\", Boolean.TRUE); // Set this to true if the output needs to be beautified.\r\n writer.getDomConfig().setParameter(\"xml-declaration\", keepDeclaration); // Set this to true if the declaration is needed to be outputted.\r\n \r\n return writer.writeToString(document);\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public String ToFile() {\n\t\tif (ismonitored) {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",1;\");\r\n\t\t} else {\r\n\t\t\treturn (\"\" + this.lon + \",\" + this.lat + \",\" + this.vtec + \",\" + this.rms + \",\" + this.timestamp + \",0;\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void writeToDeviceReport(XmlSerializer serializer) throws IOException {\n\t\tthis.serializer = serializer;\n\t\t\n serializer.startTag(DeviceReportWriter.XMLNS, \"log_subreport\");\n \n try {\n\t\t\tif(storage != null) {\n\t\t\t\tif(Logger._() != null) {\n\t\t\t\t\tLogger._().serializeLogs(this);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tserializeLog(entry);\n\t\t\t}\n } finally {\n \tserializer.endTag(DeviceReportWriter.XMLNS, \"log_subreport\");\n }\n\t}", "private void initReportWriter() {\n\t\tfinal XMLOutputFactory xmlof = XMLOutputFactory.newInstance();\r\n\r\n\t\t// Create an XML stream writer\r\n\t\tfinal File reportFile = new File(getOutputDirectory(), \"report.xml\");\r\n\t\ttry {\r\n\t\t\treportWriter = xmlof.createXMLStreamWriter(new FileWriter(reportFile));\r\n\r\n\t\t} catch (final XMLStreamException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (final IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "private void logToFile() {\n }", "public void writeXML(Vehicle vehicle_a, Vehicle vehicle_b){\n\n //writing encoding and xml file version\n\n XMLOutputFactory xmlof = null;\n XMLStreamWriter xmlw = null;\n\n try{\n\n xmlof = XMLOutputFactory.newInstance();\n xmlw = xmlof.createXMLStreamWriter(new FileOutputStream(FILE_NAME), \"utf-8\");\n xmlw.writeStartDocument(\"utf-8\", \"1.0\");\n\n } catch (Exception e){\n\n System.out.println(\"Error: \");\n System.out.println(e.getMessage());\n\n }\n\n //writing information\n\n try {\n xmlw.writeStartElement(\"routes\");\n\n\n xmlw.writeStartElement(\"route\");\n xmlw.writeAttribute(\"team\", vehicle_a.getTeam_name());\n xmlw.writeAttribute(\"cost\", String.valueOf(vehicle_a.getFuel()));\n xmlw.writeAttribute(\"cities\", String.valueOf(vehicle_a.getTouched_cities().size()));\n\n\n\n for(int i=0; i<vehicle_a.getTouched_cities().size(); i++){\n\n xmlw.writeStartElement(\"city\");\n xmlw.writeAttribute(\"id\", String.valueOf(vehicle_a.getTouched_cities().get(i).getId()));\n xmlw.writeAttribute(\"name\", vehicle_a.getTouched_cities().get(i).getName());\n\n //tag \"city\" close\n xmlw.writeEndElement();\n }\n\n //tag \"route\" close\n xmlw.writeEndElement();\n\n\n xmlw.writeStartElement(\"route\");\n xmlw.writeAttribute(\"team\", vehicle_b.getTeam_name());\n xmlw.writeAttribute(\"cost\", String.valueOf(vehicle_b.getFuel()));\n xmlw.writeAttribute(\"cities\", String.valueOf(vehicle_b.getTouched_cities().size()));\n\n for(int i=0; i<vehicle_b.getTouched_cities().size(); i++){\n\n xmlw.writeStartElement(\"city\");\n xmlw.writeAttribute(\"id\", String.valueOf(vehicle_b.getTouched_cities().get(i).getId()));\n xmlw.writeAttribute(\"name\", vehicle_b.getTouched_cities().get(i).getName());\n\n //tag \"city\" close\n xmlw.writeEndElement();\n }\n\n //tag \"route\" close\n xmlw.writeEndElement();\n\n //tag \"routes\" close\n xmlw.writeEndElement();\n\n //closing document\n xmlw.writeEndDocument();\n\n //eptying buffer and writing the document\n xmlw.flush();\n\n //closing document and resources used\n xmlw.close();\n\n //Creation of a clone-file but indented\n try {\n indentFile();\n }catch (Exception e){\n System.err.println(e);\n }\n\n }\n catch (Exception e){\n System.out.println(\"Writing error: \");\n System.out.println(e.getMessage());\n }\n }", "public void createFirstXmlFile(ArrayList<Entry> entityList);", "public static void _generateStatistics() {\n\t\ttry {\n\t\t\t// Setup info\n\t\t\tPrintStream stats = new PrintStream(new File (_statLogFileName + \".txt\"));\n\n\t\t\tScanner scan = new Scanner(new File(_logFileName+\".txt\"));\n\t\t\twhile (scan.hasNext(SETUP.toString())) {\n\t\t\t\t// Append setup info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tstats.append(\"\\n\");\n\n\t\t\twhile (scan.hasNext(DETAILS.toString()) || scan.hasNext(RUN.toString())) {\n\t\t\t\t// Throw detailed info away\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\n\t\t\twhile (scan.hasNext()) {\n\t\t\t\t// Append post-run info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tscan.close();\n\t\t\tstats.append(\"\\n\");\n\n\t\t\t// Perf4J info\n\t\t\tReader reader = new FileReader(_logFileName+\".txt\");\n\t\t\tLogParser parser = new LogParser(reader, stats, null, 10800000, true, new GroupedTimingStatisticsTextFormatter());\n\t\t\tparser.parseLog();\n\t\t\tstats.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void CreateFile(){\n try{\n new File(\"wipimages\").mkdir();\n logscommissions.createNewFile();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"CreateFile Failed\\n\");\n }\n }", "private void createTransactionLog(String deltaLakeTableLocation)\n throws IOException\n {\n File deltaTableLogLocation = new File(new File(URI.create(deltaLakeTableLocation)), \"_delta_log\");\n verify(deltaTableLogLocation.mkdirs(), \"mkdirs() on '%s' failed\", deltaTableLogLocation);\n String entry = Resources.toString(Resources.getResource(\"deltalake/person/_delta_log/00000000000000000000.json\"), UTF_8);\n Files.writeString(new File(deltaTableLogLocation, \"00000000000000000000.json\").toPath(), entry);\n }" ]
[ "0.6450681", "0.6049599", "0.6031565", "0.6021803", "0.60045844", "0.58909965", "0.5867717", "0.57506675", "0.5742406", "0.5714184", "0.5670238", "0.5625727", "0.55957997", "0.55752057", "0.5519637", "0.54680043", "0.54392976", "0.5437466", "0.5408387", "0.5407468", "0.5390055", "0.53843445", "0.53843445", "0.53843445", "0.53685737", "0.5365568", "0.53581256", "0.53413415", "0.53317964", "0.5331356", "0.53134966", "0.5303784", "0.52758527", "0.52705693", "0.5270307", "0.5269378", "0.5265691", "0.52637655", "0.52587867", "0.5257091", "0.52551293", "0.5249866", "0.52475", "0.5231179", "0.52266425", "0.5225586", "0.5225009", "0.52208006", "0.51963407", "0.5174991", "0.51746625", "0.5166159", "0.51643854", "0.5157819", "0.51505524", "0.5145098", "0.51370007", "0.5136664", "0.51248306", "0.51190287", "0.51077306", "0.5106317", "0.509295", "0.50927037", "0.5082939", "0.5073801", "0.5070145", "0.5057121", "0.5045313", "0.5044273", "0.50430197", "0.5041434", "0.5033738", "0.502724", "0.5015944", "0.50073814", "0.5003429", "0.5001426", "0.49828336", "0.49828336", "0.49828336", "0.49826497", "0.49696875", "0.49670395", "0.49625674", "0.49568748", "0.4944291", "0.49412358", "0.49397752", "0.49379152", "0.49350372", "0.49330655", "0.4926813", "0.49246532", "0.4923922", "0.49225435", "0.49115965", "0.49094316", "0.48948634", "0.48864013", "0.48855466" ]
0.0
-1
/ Create handler for memory file. > target the Handler to which to publish output. > size the number of log records to buffer (must be greater than zero) > pushLevel message level to push on
public MemoryHandler createMemoryHandler ( Handler diskFileHandler , int recordNumber , Level levelValue ) { MemoryHandler memoryHandler = null; try { memoryHandler = new MemoryHandler(diskFileHandler, recordNumber, levelValue); } catch (SecurityException e) { e.printStackTrace(); } return memoryHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MemoryLogger(int size) {\n\t\tthis.size = size;\n\t}", "public FileHandler createRollingLogHandler ( String \tfileName\r\n\t\t\t\t\t\t\t\t\t\t\t\t, int \t\tlimitFileSize\r\n\t\t\t\t\t\t\t\t\t\t\t\t, int \t\tmaximumFileNumbers\r\n\t\t\t\t\t\t\t\t\t\t\t\t, boolean\tappend\r\n\t\t\t\t\t\t\t\t\t\t\t\t) {\r\n\t\t\r\n\t\tFileHandler logHandler = null;\r\n\t\t\r\n\t try {\r\n\t \t\r\n logHandler = new FileHandler(fileName, limitFileSize, maximumFileNumbers, append);\r\n\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n\t return logHandler;\r\n\t}", "public MemoryAppender(Class loggerClass, Level level) {\n super();\n this.logger = (Logger) LoggerFactory.getLogger(Objects.requireNonNull(loggerClass));\n this.setContext((LoggerContext) LoggerFactory.getILoggerFactory());\n this.logger.addAppender(this);\n this.logger.setLevel(level);\n start();\n }", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMethod(), responseObserver);\n }", "CreateHandler()\n {\n }", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request, responseObserver);\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 void setupLoggingEndpoint() {\n HttpHandler handler = (httpExchange) -> {\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(serverLogsArray.toJSONString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));\n this.setHandler(this.getLoggingApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);\n }", "private static void createLogger() {\n logger = myLogger.createHtmlLogger(\"JRECEIPTS\", Options.LOG_PATH + \"Receipts\", 262144, true, 1);\n// boolean append = true;\n// int limit = 1000000; // 1 Mb\n// int numLogFiles = 5;\n// FileHandler fh = new FileHandler(Options.LOG_PATH + \"Receipts_%g.html\", limit, numLogFiles, true);\n// fh.setFormatter(new SimpleFormatter());\n// // Add to the desired logger\n// logger = Logger.getLogger(\"Receipts\");\n// logger.addHandler(fh);\n }", "public void activateFileMode() {\n try {\n mFileHandler = new FileHandler(\"messagesLog/\" + System.currentTimeMillis() + \".log\");\n } catch (IOException pE) {\n pE.printStackTrace();\n }\n logger.addHandler(mFileHandler);\n }", "public yandex.cloud.api.operation.OperationOuterClass.Operation create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMethod(), getCallOptions(), request);\n }", "public void testPublish_EmptyMsg() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n LogRecord r = new LogRecord(Level.INFO, \"\");\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\", aos.toString());\n }", "GenericSink createGenericSink();", "public MemoryAppender(Class loggerClass) {\n this(loggerClass, Level.DEBUG);\n }", "@Override\n protected void sink(Message message) {\n }", "default Handler asHandler() {\n return new HandlerBuffer(this);\n }", "public ExLoggingHandler() {\n super();\n }", "public void OnFileIncoming(int length);", "void setupFileLogging();", "public interface ByteHandler {\n\n /**\n * Method to serialize any byte-chunk.\n *\n * @param toSerialize byte to be serialized\n * @return result of the serialization\n */\n OutputStream serialize(OutputStream toSerialize);\n\n /**\n * Method to deserialize any byte-chunk.\n *\n * @param toDeserialize to deserialize\n * @return result of the deserialization\n */\n InputStream deserialize(InputStream toDeserialize);\n\n /**\n * Method to retrieve a new instance.\n *\n * @return new instance\n */\n ByteHandler getInstance();\n}", "public void testPublish_NullMsg() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n LogRecord r = new LogRecord(Level.INFO, null);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\", aos.toString());\n }", "@Override\n public MetricsCollectorSpark<? extends MetricsArgumentCollection> createCollector(\n final String outputBaseName,\n final Set<MetricAccumulationLevel> metricAccumulationLevel,\n final List<Header> defaultHeaders,\n final SAMFileHeader samHeader)\n {\n final String localBaseName = outputBaseName + \".\" + InsertSizeMetrics.getUniqueNameSuffix();\n\n final InsertSizeMetricsArgumentCollection isArgs = new InsertSizeMetricsArgumentCollection();\n isArgs.output = localBaseName + \".txt\";\n isArgs.histogramPlotFile = localBaseName + \".pdf\";\n isArgs.metricAccumulationLevel.accumulationLevels = metricAccumulationLevel;\n\n final InsertSizeMetricsCollectorSpark collector = new InsertSizeMetricsCollectorSpark();\n collector.initialize(isArgs, samHeader, defaultHeaders);\n\n return collector;\n }", "private NettyServerHandler createHandler(ServerTransportListener transportListener) {\n return NettyServerHandler.newHandler(\n transportListener, streamTracerFactories, maxStreams,\n flowControlWindow, maxHeaderListSize, maxMessageSize,\n keepAliveTimeInNanos, keepAliveTimeoutInNanos,\n maxConnectionIdleInNanos,\n maxConnectionAgeInNanos, maxConnectionAgeGraceInNanos,\n permitKeepAliveWithoutCalls, permitKeepAliveTimeInNanos);\n }", "@Override\n\tpublic void drainHandler(Handler<Void> handler) {\n\t\tSystem.out.println(\"-TARGETTEST set drainHandler\");\n\t}", "private void initWriter(int queueSize) {\n\t\tthis.writer = new RoutingWriter(this.myName, this.remoteName, new Writer(\n\t\t\t\tthis.dos, queueSize, true));\n\t\tthis.writer.start();\n\t}", "public ConsoleHandler createConsoleHandler () {\r\n\t\t\t\r\n\t\tConsoleHandler consoleHandler = null;\r\n\t\t\t\r\n\t\ttry {\r\n\t\t \t\r\n\t\t\tconsoleHandler = new ConsoleHandler();\r\n\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t \r\n\t\t return consoleHandler;\r\n\t}", "MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException;", "public void testPublish_AfterClose() throws Exception {\n Properties p = new Properties();\n p.put(\"java.util.logging.StreamHandler.level\", \"FINE\");\n LogManager.getLogManager().readConfiguration(\n EnvironmentHelper.PropertiesToInputStream(p));\n\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n assertSame(h.getLevel(), Level.FINE);\n LogRecord r = new LogRecord(Level.INFO, \"testPublish_NoFormatter\");\n assertTrue(h.isLoggable(r));\n h.close();\n assertFalse(h.isLoggable(r));\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_HeadMockFormatter_Tail\", aos.toString());\n }", "public LogHandler createDefaultLogHandler() {\r\n return new JavaLoggingHandler();\r\n }", "void createHandler(final String handlerClassName);", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> create(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request);\n }", "@Test\n public void testEvenOverflow() throws IOException {\n File logFile = tmpDir.newFile(\"mem.log\");\n MemMappedMessageLogger logger = new MemMappedMessageLogger (logFile, 16);\n\n for (int i=1; i <= 5; i++) {\n String msg = String.format(\"M%02d\", i); // logger adds \\n char to each\n logger.log(true, msg.getBytes(), 0, msg.length());\n }\n\n logger.close();\n assertLogContent (\"M05\\nM02\\nM03\\nM04\\n\", logFile);\n }", "void setStreamBuffer(int size) {\r\n\t\tif(size>0)\r\n\t\t\tbuffer = new byte[size];\r\n\t\telse\r\n\t\t\tbuffer = new byte[this.size];\r\n\t}", "public MemoryByteArrayOutputStream() {\n\t\tthis(4096, 65536);\n\t}", "public GeneralNettyHandler() {\n\t\tthis(1024 * 8);\n\t}", "private static void setupLogger() {\n\t\tLogManager.getLogManager().reset();\n\t\t// set the level of logging.\n\t\tlogger.setLevel(Level.ALL);\n\t\t// Create a new Handler for console.\n\t\tConsoleHandler consHandler = new ConsoleHandler();\n\t\tconsHandler.setLevel(Level.SEVERE);\n\t\tlogger.addHandler(consHandler);\n\n\t\ttry {\n\t\t\t// Create a new Handler for file.\n\t\t\tFileHandler fHandler = new FileHandler(\"HQlogger.log\");\n\t\t\tfHandler.setFormatter(new SimpleFormatter());\n\t\t\t// set level of logging\n\t\t\tfHandler.setLevel(Level.FINEST);\n\t\t\tlogger.addHandler(fHandler);\n\t\t}catch(IOException e) {\n\t\t\tlogger.log(Level.SEVERE, \"File logger not working! \", e);\n\t\t}\n\t}", "public interface MessageHandler {\n void onMessage(final byte messageType, final int messageId, final byte[] buffer, final int startIndex, final int length);\n}", "private static void setupLogger(String path, String filename, Level level) throws IOException {\n Path logDir = Paths.get(path, filename + \"_log\");\n\t\tif (!Files.exists(logDir)) {\n\t\t\tFiles.createDirectories(logDir);\n\t\t}\n\t\tString fileName = logDir.resolve(\"searsia.log\").toString();\n Handler fileHandler = new FileHandler(fileName, 1048576, 100, true);\n fileHandler.setFormatter(new SimpleFormatter());\n LogManager.getLogManager().reset();\n\t\tLOGGER.addHandler(fileHandler);\n\t\tLOGGER.setLevel(level);\n\t\tLOGGER.warning(\"Searsia restart\");\n\t}", "private void handlerPublish(Level level, String dialog){\n if (handler != null){\n handler.publish(new LogRecord(level, dialog));\n }\n }", "public genericHandler(String fileName) \r\n {\r\n this.fileName = fileName;\r\n }", "public EchoClientHandler()\n {\n String data = \"hello zhang kylin \" ;\n firstMessage = Unpooled.buffer(2914) ;\n firstMessage.writeBytes(data.getBytes()) ;\n }", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "public FileHandler createXmlFileHandler ( String \tfileName\r\n\t\t\t\t\t\t\t\t\t \t\t, boolean \tappend\r\n\t\t\t\t\t\t\t\t\t \t\t) {\r\n\t\t\r\n\t\tFileHandler xmlFileHandler = null;\r\n\t\t\r\n\t try {\r\n\t \t\r\n\t\t\txmlFileHandler\t= new FileHandler(fileName, append);\r\n\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n\t return xmlFileHandler;\r\n\t}", "@Test\n public void testEvenOverflow1() throws IOException {\n File logFile = tmpDir.newFile(\"mem.log\");\n MemMappedMessageLogger logger = new MemMappedMessageLogger (logFile, 16);\n\n for (int i=1; i <= 8; i++) {\n String msg = String.format(\"M%02d\", i); // logger adds \\n char to each\n logger.log(true, msg.getBytes(), 0, msg.length());\n }\n\n logger.close();\n assertLogContent (\"M05\\nM06\\nM07\\nM08\\n\", logFile);\n }", "public FileHandler(byte[] data) {\n this.data = data;\n }", "public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }", "public InMemoryQueueService(){\n this.ringBufferQueue = new QueueMessage[10000];\n }", "public void setLogCollectionMaxFileSize(int size);", "protected BuildLog\n (\n final String fileName,\n final int buffer\n ) \n throws IOException\n {\n File logDir = new File(\"log\");\n if (!logDir.exists()) logDir.mkdirs();\n out = new PrintWriter\n (\n new BufferedWriter\n (\n new FileWriter(\"log\" + fileName, StandardCharsets.UTF_8), \n buffer\n )\n );\n }", "public BuffSink (File dir, String filename, int size) {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tobuff = new BufferedOutputStream(new FileOutputStream(new File(dir, filename)) , size);\r\n\t\t\t\t// file header : RFC 3267, section 5\r\n//\t\t\t\tString header = \"#!AMR\\n\";\r\n\t\t\t\t\r\n\t\t\t\tobuff.write(header);\r\n\r\n\t\t\t} catch (Exception 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}", "Handler create(Encounter<? extends Collector> encounter);", "public SampleMemory(int size) {\n this.memory = new double[size];\n this.pointer = 0;\n }", "public void registerHandler(ReceivedDataHandler handler)\n {\n this.handler = handler;\n }", "private static MockFileChannel newMockFileChannel(\n long size,\n int localBufferCapacity) {\n return newMockFileChannel(\n true,\n true,\n false,\n size,\n localBufferCapacity);\n }", "void record(int actualReadBytes);", "@Override\n public void handleMessage(Message message) {\n Bundle data = message.getData();\n\n // reference input id\n final int inputId = message.arg1;\n\n// Log.i(TAG, \"Received message[\"+message.arg1+\"] => \"+message.what);\n\n // depending on the objective of the message\n switch(message.what) {\n\n // get recording status\n case Geotracer.MESSAGE_OBJECTIVE_RECORDING_STATUS:\n success(message, mService.getRecordingStatus());\n break;\n\n // create a logger\n case Geotracer.MESSAGE_OBJECTIVE_LOGGER_CREATE:\n try {\n\n // get class name\n String className = data.getString(Geotracer.EXTRA_LOGGER_CLASS);\n\n // reference class object\n Class loggerClass = Class.forName(className);\n\n // fetch constructors\n Constructor constructor = loggerClass.getConstructors()[0]; //(Context.class, Bundle.class);\n\n // fetch args bundle\n Bundle args = data.getBundle(Geotracer.EXTRA_LOGGER_ARGS);\n\n // instantiate logger\n _Logger logger = (_Logger) constructor.newInstance(mContext, args);\n\n // feed logger to service, get logger id\n int loggerId = mService.addLogger(logger);\n\n Log.d(TAG, \"Constructed new _Logger: \"+loggerId);\n\n // send logger id back to activity\n success(message, loggerId);\n\n// } catch(NoSuchMethodException x) {\n// x.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch(IndexOutOfBoundsException x) {\n x.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n\n // create an encoder\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_CREATE:\n\n try {\n // get class name\n String className = data.getString(Geotracer.EXTRA_ENCODER_CLASS);\n\n // reference class object\n Class encoderClass = Class.forName(className);\n\n // fetch constructor\n Constructor constructor = encoderClass.getConstructors()[0];\n\n // fetch logger id\n int loggerId = data.getInt(Geotracer.EXTRA_INPUT_ID);\n\n // get logger\n _Logger logger = mService.getLogger(loggerId);\n\n // instantiate encoder\n _Encoder encoder = (_Encoder) constructor.newInstance(mContext, logger);\n\n // feed encoder to service, get encoder id\n int encoderId = mService.addEncoder(encoder, className);\n\n //\n Log.d(TAG, \"Constructed new _Encoder [#\"+encoderId+\"]: \"+encoder+\" using Logger #\"+loggerId);\n\n // send encoder id back to activity\n success(message, encoderId);\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch(IndexOutOfBoundsException x) {\n x.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n\n //\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_START:\n\n // requester wants to receive updates\n if(Geotracer.MESSAGE_ARG_REQUEST_OPTION == message.arg2) {\n\n // establish a final connection to the reply address\n final Messenger replyTo = message.replyTo;\n\n // start the encoder\n mService.getEncoder(inputId).start(new IpcSubscriber() {\n @Override\n public void event(Parcelable eventData, EventDetails eventDetails) {\n Bundle response = new Bundle();\n response.putParcelable(Geotracer.EXTRA_EVENT_DATA, eventData);\n response.putParcelable(Geotracer.EXTRA_EVENT_DETAILS, eventDetails);\n data(replyTo, inputId, response);\n }\n\n @Override\n public void notice(int noticeType, int noticeValue, Parcelable data) {\n Bundle response = new Bundle();\n response.putInt(Geotracer.EXTRA_NOTICE_TYPE, noticeType);\n response.putInt(Geotracer.EXTRA_NOTICE_VALUE, noticeValue);\n response.putParcelable(Geotracer.EXTRA_NOTICE_DATA, data);\n// noticefy(replyTo, inputId, response);\n }\n\n @Override\n public void error(String error) {\n Bundle response = new Bundle();\n response.putString(Geotracer.EXTRA_ERROR, error);\n err(replyTo, inputId, response);\n }\n });\n }\n //\n else {\n mService.getEncoder(inputId).start();\n }\n break;\n\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_STOP: {\n // non-immediate success callbacks\n final Messenger replyTo = message.replyTo;\n final int objectiveId = message.what;\n final int requestId = data.getInt(Geotracer.EXTRA_REQUEST_ID, -1);\n\n //\n mService.getEncoder(inputId).stop(new Attempt() {\n @Override\n public void ready() {\n Log.w(TAG, \"Stopped Encoder \"+mService.getEncoder(inputId).getClass().getSimpleName());\n mService.removeEncoder(inputId);\n success(replyTo, objectiveId, requestId, inputId);\n }\n });\n } break;\n\n case Geotracer.MESSAGE_OBJECTIVE_LOGGER_CLOSE:\n mService.closeLogger(inputId, data);\n success(message, inputId);\n break;\n\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_SUBSCRIBE: {\n// String encoderClassName = data.getString(Geotracer.EXTRA_ENCODER_CLASS);\n// int requestId = data.getInt(Geotracer.EXTRA_REQUEST_ID, -1);\n//\n// int encoderId = mService.lookupEncoder(encoderClassName);\n final Messenger replyTo = message.replyTo;\n\n mService.getEncoder(inputId).replaceCuriousSubscriber(new IpcSubscriber() {\n @Override\n public void event(Parcelable eventData, EventDetails eventDetails) {\n Bundle response = new Bundle();\n response.putParcelable(Geotracer.EXTRA_EVENT_DATA, eventData);\n response.putParcelable(Geotracer.EXTRA_EVENT_DETAILS, eventDetails);\n data(replyTo, inputId, response);\n }\n\n @Override\n public void notice(int noticeType, int noticeValue, Parcelable data) {\n Bundle response = new Bundle();\n response.putInt(Geotracer.EXTRA_NOTICE_TYPE, noticeType);\n response.putInt(Geotracer.EXTRA_NOTICE_VALUE, noticeValue);\n response.putParcelable(Geotracer.EXTRA_NOTICE_DATA, data);\n// noticefy(replyTo, inputId, response);\n }\n\n @Override\n public void error(String error) {\n Bundle response = new Bundle();\n response.putString(Geotracer.EXTRA_ERROR, error);\n err(replyTo, inputId, response);\n }\n });\n } break;\n }\n }", "public void testSetOutputStream_Normal() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n MockStreamHandler h = new MockStreamHandler(aos, new MockFormatter());\n\n LogRecord r = new LogRecord(Level.INFO, \"testSetOutputStream_Normal\");\n h.publish(r);\n assertSame(r, CallVerificationStack.getInstance().pop());\n assertTrue(CallVerificationStack.getInstance().empty());\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal\", aos\n .toString());\n\n ByteArrayOutputStream aos2 = new ByteArrayOutputStream();\n h.setOutputStream(aos2);\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal\"\n + \"MockFormatter_Tail\", aos.toString());\n r = new LogRecord(Level.INFO, \"testSetOutputStream_Normal2\");\n h.publish(r);\n assertSame(r, CallVerificationStack.getInstance().pop());\n assertTrue(CallVerificationStack.getInstance().empty());\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal2\", aos2\n .toString());\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal\"\n + \"MockFormatter_Tail\", aos.toString());\n }", "ByteHandler getInstance();", "@Override\n protected Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "public void testPublish_WithFilter() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n h.setFilter(new MockFilter());\n\n LogRecord r = new LogRecord(Level.INFO, \"testPublish_WithFilter\");\n h.setLevel(Level.INFO);\n h.publish(r);\n h.flush();\n assertEquals(\"\", aos.toString());\n assertSame(r, CallVerificationStack.getInstance().pop());\n\n h.setLevel(Level.WARNING);\n h.publish(r);\n h.flush();\n assertEquals(\"\", aos.toString());\n assertTrue(CallVerificationStack.getInstance().empty());\n\n h.setLevel(Level.CONFIG);\n h.publish(r);\n h.flush();\n assertEquals(\"\", aos.toString());\n assertSame(r, CallVerificationStack.getInstance().pop());\n\n r.setLevel(Level.OFF);\n h.setLevel(Level.OFF);\n h.publish(r);\n h.flush();\n assertEquals(\"\", aos.toString());\n assertTrue(CallVerificationStack.getInstance().empty());\n }", "public static void setupElementLogger(String elementId, long logSize) throws IOException {\n\t\tint maxFileSize = (int) (logSize * 1_000_000); \n\t\tint logFileCount = Math.round(logSize);\n\t\tfinal File logDirectory = new File(Configuration.getLogDiskDirectory());\n\n\t\tlogDirectory.mkdirs();\n\n\t\tUserPrincipalLookupService lookupservice = FileSystems.getDefault().getUserPrincipalLookupService();\n\t\tfinal GroupPrincipal group = lookupservice.lookupPrincipalByGroupName(\"iofog\");\n\t\tFiles.getFileAttributeView(logDirectory.toPath(), PosixFileAttributeView.class,\n\t\t\t\tLinkOption.NOFOLLOW_LINKS).setGroup(group);\n\t\tSet<PosixFilePermission> perms = PosixFilePermissions.fromString(\"rwxrwx---\");\n\t\tFiles.setPosixFilePermissions(logDirectory.toPath(), perms);\n\n\t\tfinal String logFilePattern = logDirectory.getPath() + \"/\" + elementId + \".%g.log\";\n\t\tLogger logger = elementLogger.get(elementId);\n\t\t\n\t\tif (logger != null) {\n\t\t\tfor (Handler f : logger.getHandlers())\n\t\t\t\tf.close();\n\t\t} \n\t\t\n\t\tHandler logFileHandler = new FileHandler(logFilePattern, maxFileSize / logFileCount, logFileCount);\n\t\n\t\tlogFileHandler.setFormatter(new LogFormatter());\n\t\n\t\tlogger = Logger.getLogger(elementId);\n\t\tlogger.addHandler(logFileHandler);\n\n\t\tlogger.setUseParentHandlers(false);\n\n\t\telementLogger.put(elementId, logger);\n\t}", "public void testPublish_NoOutputStream() {\n StreamHandler h = new StreamHandler();\n LogRecord r = new LogRecord(Level.INFO, \"testPublish_NoOutputStream\");\n h.publish(r);\n\n h.setLevel(Level.WARNING);\n h.publish(r);\n\n h.setLevel(Level.CONFIG);\n h.publish(r);\n\n r.setLevel(Level.OFF);\n h.setLevel(Level.OFF);\n h.publish(r);\n }", "public void testPublish_NoFilter() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n\n LogRecord r = new LogRecord(Level.INFO, \"testPublish_NoFilter\");\n h.setLevel(Level.INFO);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\", aos\n .toString());\n\n h.setLevel(Level.WARNING);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\", aos\n .toString());\n\n h.setLevel(Level.CONFIG);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\"\n + \"testPublish_NoFilter\", aos.toString());\n\n r.setLevel(Level.OFF);\n h.setLevel(Level.OFF);\n h.publish(r);\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testPublish_NoFilter\"\n + \"testPublish_NoFilter\", aos.toString());\n }", "native long nativeSpill(long nativeHandler, long size, boolean callBySelf) throws RuntimeException;", "public void listenReportGenerateStatus() {\n KOOM.getInstance().setHeapReportUploader(file -> {\n //Upload the report or do something else.\n //File is deleted automatically when callback is done by default.\n });\n }", "public static void handlerSimpleAppendTest(AvroSourceProtocol handler)\n throws FlumeException, EventDeliveryException {\n handlerSimpleAppendTest(handler, false, false, 0);\n }", "public Netty4HttpPipeliningHandler(Logger logger, final int maxEventsHeld, final Netty4HttpServerTransport serverTransport) {\n this.logger = logger;\n this.maxEventsHeld = maxEventsHeld;\n this.outboundHoldingQueue = new PriorityQueue<>(1, Comparator.comparingInt(t -> t.v1().getSequence()));\n this.serverTransport = serverTransport;\n }", "private void startHandler() {\n mHandler = new MessageHandler();\n }", "private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }", "@Override\r\n public void handle(Buffer inBuffer) {\n \tlogger.debug(name_log + \"----------------------------------------------------------------------------\");\r\n \t//logger.debug(name_log + \"incoming data: \" + inBuffer.length());\r\n String recvPacket = inBuffer.getString(0, inBuffer.length());\r\n \t\r\n //logger.debug(name_log + \"read data: \" + recvPacket);\r\n logger.info(name_log + \"RECV[\" + recvPacket.length() + \"]> \\n\" + recvPacket + \"\\n\");\r\n \r\n \r\n // -- Packet Analyze ----------------------------------------------------------------\r\n // Writing received message to event bus\r\n\t\t\t\t\r\n JsonObject jo = new JsonObject();\r\n \r\n jo.put(\"recvPacket\", recvPacket);\r\n \r\n eb.send(\"PD_Trap\" + remoteAddr, jo);\r\n\r\n // -- RESPONSE, Send Packet to Target -----------------------------------------------\r\n eb.consumer(remoteAddr + \"Trap_ACK\", message -> {\r\n \twriteToTarget(message.body().toString(), \"Trap_ACK\");\r\n });\r\n \r\n eb.consumer(remoteAddr + \"Trap_NACK\", message -> {\r\n \twriteToTarget(message.body().toString(), \"Trap_NACK\");\r\n });\r\n \r\n }", "public interface LogMessageProcessor\n{\n /**\n * Returns the string \"header\" for the chosen output file format.\n * @return String of the default \"heading\" of the file.\n */\n String prepareFile();\n \n /**\n * Formats incoming message object based on rules of chosen output file \n * format\n * @param ioM Incoming message object to be formatted\n * @return String of the formatted object\n */\n String formatMessage(LogMessage ioM);\n \n /**\n * Returns the string \"footer\" for the chosen output file format.\n * @return String of the default \"footer\" of the file\n */\n String endFile();\n}", "public MessageHandler() {\n }", "@Override\n\tpublic void publish(LogRecord record) {\n\tSystem.err.println(formatter.format(record));\n\tLogInfo info = new LogInfo(record.getTime(), \n\t\t\t\t record.getSource()+\":\"+record.getLevel(), \n\t\t\t\t formatter.format(record));\n\ttry {\n\t Telemetry.getInstance().publish(\"LOG\", info);\n\t} catch (Exception e) {\n\t System.err.println(\"Telemetry log error...\");\n\t e.printStackTrace();\n\t}\n }", "public GenericHandler() {\n\n }", "RecordHandler(Looper looper) {\n super(looper);\n if (DEBUG)\n MLog.d(TAG, \"RecordHandler() mPollRate: \" + mPollRate);\n }", "public interface BackPressuredWriteStream<T> extends WriteStream<T> {\n\n static <T> BackPressuredWriteStream create(Handler<T> writeHandler) {\n return new BackPressuredWriteStreamImpl<T>(writeHandler);\n }\n\n static <T> BackPressuredWriteStream createThrottled(Handler<T> writeHandler, long quotaPeriod, int quota, String persistentQuotaTimeFile, Vertx vertx) {\n return new ThrottleStreamImpl(writeHandler, quotaPeriod, quota, persistentQuotaTimeFile, vertx);\n }\n\n void drop();\n\n long getQueueSize();\n}", "public static SMFMemoryMeshFilterType create(\n final SMFSchemaIdentifier in_schema,\n final Path in_file)\n {\n return new SMFMemoryMeshFilterMetadataAdd(in_schema, in_file);\n }", "public MessageDeframer( final AtomicInteger _maxMessageSize ) {\n maxMessageSize = _maxMessageSize.get();\n buffer = allocateBuffer();\n frameOpenDetected = false;\n frameLength = 0;\n buffer.limit( 0 ); // this marks our buffer as empty...\n }", "@Override\n public FileReader handler(Handler<Buffer> handler) {\n this.dataHandler = handler;\n return this;\n }", "private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }", "public MemoryEntryInfo createMemoryEntryInfo() {\n\t\tMemoryEntryInfo info = new MemoryEntryInfo(new HashMap<String, Object>(this.info.getProperties()));\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILE_MD5, md5);\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILENAME, fileName);\n\t\tinfo.getProperties().put(MemoryEntryInfo.OFFSET, fileoffs);\n\t\treturn info;\n\t}", "void writeTo(DataSink dataSink) throws IOException;", "BufferedLogChannel createNewLogForCompaction() throws IOException;", "public PushStream createPushStream(String fname, int mode) throws IOException {\n\t\tSocket socket = null;\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t\tInputStream in = socket.getInputStream();\n\t\t\tDataOutputStream out = new DataOutputStream(socket.getOutputStream());\n\t\t\tProtocolSupport.send(\"host:transport:\" + serial, in, out);\n\n\t\t\tProtocolSupport.send(\"sync:\", in, out);\n\t\t\tout.writeBytes(\"SEND\");\n\t\t\tString target = fname + \",\" + mode;\n\t\t\tout.writeInt(Integer.reverseBytes(target.length()));\n\t\t\tout.writeBytes(target);\n\t\t\tout.flush();\n\t\t\treturn new PushStream(out);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}", "static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }", "protected DeviceEvent writeBuffer(Device device, CommandStream q, long size, Pointer hostPtr) {\n createBuffer(device, size, hostPtr);\n\n return writeBufferNoCreateBuffer(device, q, null, size, hostPtr);\n }", "private void recordPushLog(String configName) {\n PushLog pushLog = new PushLog();\n pushLog.setAppId(client.getAppId());\n pushLog.setConfig(configName);\n pushLog.setClient(IP4s.intToIp(client.getIp()) + \":\" + client.getPid());\n pushLog.setServer(serverHost.get());\n pushLog.setCtime(new Date());\n pushLogService.add(pushLog);\n }", "public Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "public void setRecordHandler(RecordHandler recordHandler) {\n \t this.recordHandler = recordHandler;\n }", "protected void storeBuffer(Buffer buffer, String targetPath) {\n\t\tFileSystem fileSystem = Mesh.vertx().fileSystem();\n\t\tfileSystem.writeFileBlocking(targetPath, buffer);\n\t\t// log.error(\"Failed to save file to {\" + targetPath + \"}\", error);\n\t\t// throw error(INTERNAL_SERVER_ERROR, \"node_error_upload_failed\", error);\n\t}", "@Override\n public void onTrimMemory(int level) {\n Log.d(TAG, TAG + \" onTrimMemory\");\n\n }", "public void setupStatsEndpoint() {\n HttpHandler handler =\n (httpExchange) -> {\n this.increaseEndpointHitFrequency(this.getStatsApiEndpoint());\n StringBuilder response = new StringBuilder();\n Set<Map.Entry<String, Integer>> frequencySet = this.getEndpointFrequencyEntrySet();\n for (Map.Entry<String, Integer> entry : frequencySet) {\n response\n .append(entry.getKey())\n .append(\":\")\n .append(entry.getValue())\n .append(System.getProperty(\"line.separator\"));\n }\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, response.length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(response.toString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.statsApiEndpoint, this.server.createContext(this.statsApiEndpoint));\n this.setHandler(this.getStatsApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.statsApiEndpoint, 0);\n }", "public void createNew(int size);", "public void testSetOutputStream_AfterClose() {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n MockStreamHandler h = new MockStreamHandler(aos, new MockFormatter());\n\n LogRecord r = new LogRecord(Level.INFO, \"testSetOutputStream_Normal\");\n h.publish(r);\n assertSame(r, CallVerificationStack.getInstance().pop());\n assertTrue(CallVerificationStack.getInstance().empty());\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal\", aos\n .toString());\n h.close();\n\n ByteArrayOutputStream aos2 = new ByteArrayOutputStream();\n h.setOutputStream(aos2);\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal\"\n + \"MockFormatter_Tail\", aos.toString());\n r = new LogRecord(Level.INFO, \"testSetOutputStream_Normal2\");\n h.publish(r);\n assertSame(r, CallVerificationStack.getInstance().pop());\n assertTrue(CallVerificationStack.getInstance().empty());\n h.flush();\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal2\", aos2\n .toString());\n assertEquals(\"MockFormatter_Head\" + \"testSetOutputStream_Normal\"\n + \"MockFormatter_Tail\", aos.toString());\n }", "public File newLogFile() {\n File flog = null;\n try {\n this.logFileName = getTimestamp() + \".xml\";\n this.pathToLogFile = logFileFolder + logFileName;\n URL logURL = new URL(this.pathToLogFile);\n flog = new File(logURL.toURI());\n if (!flog.exists()) {\n flog.createNewFile();\n }\n } catch (Exception ex) {\n log.error(\"newLogFile :\"+ ex.getMessage());\n } finally{\n this.fLogFile = flog;\n return flog;\n }\n }", "@Test\n public void testReplicateEntriesForHFiles() throws Exception {\n Path dir = TestReplicationSink.TEST_UTIL.getDataTestDirOnTestFS(\"testReplicateEntries\");\n Path familyDir = new Path(dir, Bytes.toString(TestReplicationSink.FAM_NAME1));\n int numRows = 10;\n List<Path> p = new ArrayList<>(1);\n final String hfilePrefix = \"hfile-\";\n // 1. Generate 25 hfile ranges\n Random rng = new SecureRandom();\n Set<Integer> numbers = new HashSet<>();\n while ((numbers.size()) < 50) {\n numbers.add(rng.nextInt(1000));\n } \n List<Integer> numberList = new ArrayList<>(numbers);\n Collections.sort(numberList);\n Map<String, Long> storeFilesSize = new HashMap<>(1);\n // 2. Create 25 hfiles\n Configuration conf = TestReplicationSink.TEST_UTIL.getConfiguration();\n FileSystem fs = dir.getFileSystem(conf);\n Iterator<Integer> numbersItr = numberList.iterator();\n for (int i = 0; i < 25; i++) {\n Path hfilePath = new Path(familyDir, (hfilePrefix + i));\n HFileTestUtil.createHFile(conf, fs, hfilePath, TestReplicationSink.FAM_NAME1, TestReplicationSink.FAM_NAME1, Bytes.toBytes(numbersItr.next()), Bytes.toBytes(numbersItr.next()), numRows);\n p.add(hfilePath);\n storeFilesSize.put(hfilePath.getName(), fs.getFileStatus(hfilePath).getLen());\n }\n // 3. Create a BulkLoadDescriptor and a WALEdit\n Map<byte[], List<Path>> storeFiles = new HashMap<>(1);\n storeFiles.put(TestReplicationSink.FAM_NAME1, p);\n org.apache.hadoop.hbase.wal.WALEdit edit = null;\n WALProtos.BulkLoadDescriptor loadDescriptor = null;\n try (Connection c = ConnectionFactory.createConnection(conf);RegionLocator l = c.getRegionLocator(TestReplicationSink.TABLE_NAME1)) {\n HRegionInfo regionInfo = l.getAllRegionLocations().get(0).getRegionInfo();\n loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(TestReplicationSink.TABLE_NAME1, UnsafeByteOperations.unsafeWrap(regionInfo.getEncodedNameAsBytes()), storeFiles, storeFilesSize, 1);\n edit = org.apache.hadoop.hbase.wal.WALEdit.createBulkLoadEvent(regionInfo, loadDescriptor);\n }\n List<WALEntry> entries = new ArrayList<>(1);\n // 4. Create a WALEntryBuilder\n WALEntry.Builder builder = TestReplicationSink.createWALEntryBuilder(TestReplicationSink.TABLE_NAME1);\n // 5. Copy the hfile to the path as it is in reality\n for (int i = 0; i < 25; i++) {\n String pathToHfileFromNS = new StringBuilder(100).append(TestReplicationSink.TABLE_NAME1.getNamespaceAsString()).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.TABLE_NAME1.getName())).append(SEPARATOR).append(Bytes.toString(loadDescriptor.getEncodedRegionName().toByteArray())).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.FAM_NAME1)).append(SEPARATOR).append((hfilePrefix + i)).toString();\n String dst = ((TestReplicationSink.baseNamespaceDir) + (Path.SEPARATOR)) + pathToHfileFromNS;\n Path dstPath = new Path(dst);\n FileUtil.copy(fs, p.get(0), fs, dstPath, false, conf);\n }\n entries.add(builder.build());\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 6. Assert no existing data in table\n Assert.assertEquals(0, scanner.next(numRows).length);\n }\n // 7. Replicate the bulk loaded entry\n TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(edit.getCells().iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir);\n try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) {\n // 8. Assert data is replicated\n Assert.assertEquals(numRows, scanner.next(numRows).length);\n }\n // Clean up the created hfiles or it will mess up subsequent tests\n }", "private Chunk generateChunk(int size) {\n String json;\n ObjectMapper objectMapper = new ObjectMapper();\n List<Record> recordList = new ArrayList<>();\n int i = 1;\n while (i <= size) {\n json = \"{ \\\"Price\\\" :\" + priceGenerator.nextDouble() * 100 + \" }\";\n try {\n recordList.add(new Record(String.valueOf(i), LocalDateTime.now(), objectMapper.readTree(json)));\n } catch (JsonProcessingException e) {\n log.error(\"Issue with the chunk generation: \" + e.getMessage());\n return null;\n }\n i++;\n\n }\n log.info(\"Generated Chunk :\");\n recordList.forEach((record) -> log.info(record.toString()));\n return new Chunk(recordList);\n }", "@Override\n public void init() throws Exception {\n // allocate a new logger\n Logger logger = Logger.getLogger(\"processinfo\");\n\n // add some extra output channels, using mask bit 6\n try {\n outputStream = new FileOutputStream(filename);\n logger.addOutput(new PrintWriter(outputStream), new BitMask(MASK.APP));\n } catch (Exception e) {\n LoggerFactory.getLogger(TcpdumpReporter.class).error(e.getMessage());\n }\n\n }", "public FileHandler createHtmlFileHandler ( String \tfileName\r\n\t\t\t\t\t\t\t\t\t \t\t, boolean \tappend\r\n\t\t\t\t\t\t\t\t\t \t\t) {\r\n\t\t\r\n\t\tFileHandler htmlFileHandler = null;\r\n\t\t\r\n\t try {\r\n\t \t\r\n\t\t\thtmlFileHandler\t= new FileHandler(fileName, append);\r\n\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n\t return htmlFileHandler;\r\n\t}", "private void addFileHandler(Logger logger) {\n try {\n fileHandler = new FileHandler(LoggerExample.class.getName() + \".log\");\n } catch (IOException ex) {\n logger.log(Level.SEVERE, null, ex);\n } catch (SecurityException ex) {\n logger.log(Level.SEVERE, null, ex);\n }\n logger.addHandler(fileHandler);\n }" ]
[ "0.5693851", "0.53540653", "0.5231541", "0.50963116", "0.50737965", "0.5070996", "0.5047219", "0.50174534", "0.50065714", "0.49652272", "0.48860243", "0.48844787", "0.48268104", "0.48157048", "0.4805422", "0.47832736", "0.47320503", "0.47276306", "0.4688822", "0.4686445", "0.46736082", "0.4648025", "0.46436244", "0.4628456", "0.45956957", "0.45945308", "0.4554687", "0.45526633", "0.45417896", "0.45406675", "0.45258713", "0.4521186", "0.44888037", "0.44838795", "0.44770917", "0.44746146", "0.447403", "0.44720024", "0.44642517", "0.44455472", "0.4441583", "0.44412836", "0.44400263", "0.44268966", "0.44135457", "0.44021767", "0.43795124", "0.4379501", "0.436934", "0.4363194", "0.43468595", "0.4341278", "0.43349257", "0.43316263", "0.43307084", "0.43306166", "0.43248108", "0.43196732", "0.43120274", "0.43029466", "0.43015543", "0.42973965", "0.42921", "0.42891434", "0.42824253", "0.4280226", "0.4278021", "0.4272037", "0.42671087", "0.42655772", "0.4262521", "0.4260074", "0.4255134", "0.42541888", "0.42535788", "0.42515558", "0.424945", "0.42475283", "0.4226927", "0.42133275", "0.42030394", "0.41941395", "0.41907012", "0.41823706", "0.41812536", "0.41743988", "0.41726843", "0.417094", "0.41664258", "0.41657528", "0.4161029", "0.41589683", "0.4158921", "0.41568866", "0.4154588", "0.41518196", "0.41507638", "0.41490892", "0.41480595", "0.4147076" ]
0.6867008
0
/ Create a file handler with a limit of 2 megabytes
public FileHandler createRollingLogHandler ( String fileName , int limitFileSize , int maximumFileNumbers , boolean append ) { FileHandler logHandler = null; try { logHandler = new FileHandler(fileName, limitFileSize, maximumFileNumbers, append); } catch (SecurityException | IOException e) { e.printStackTrace(); } return logHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMaxFileSize(int sINGLESIZE) {\n\t\t\r\n\t}", "long getMaxFileSizeBytes();", "static ServletFileUpload createUpload() {\n DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();\n diskFileItemFactory.setSizeThreshold(MEM_MAX_SIZE);\n ServletFileUpload upload = new ServletFileUpload(diskFileItemFactory);\n upload.setSizeMax(FILE_MAX_SIZE);\n return upload;\n }", "abstract Function<Multipart.FileInfo, play.libs.streams.Accumulator<ByteString, Http.MultipartFormData.FilePart<A>>> createFilePartHandler();", "public void OnFileIncoming(int length);", "public GeneralNettyHandler() {\n\t\tthis(1024 * 8);\n\t}", "public FileLRUCache(int maxSize, int maxFileSize, long timeout) {\n\t\tsuper(maxSize, maxFileSize, timeout);\n\t}", "private static MockFileChannel newMockFileChannel(\n long size,\n int localBufferCapacity) {\n return newMockFileChannel(\n true,\n true,\n false,\n size,\n localBufferCapacity);\n }", "public MemoryHandler createMemoryHandler ( Handler\t\tdiskFileHandler\r\n\t\t\t\t\t\t\t\t\t\t\t , int \t\trecordNumber\r\n\t\t\t\t\t\t\t\t\t\t\t , Level \tlevelValue\r\n\t\t\t\t\t\t\t\t\t\t\t ) {\r\n\t\t\t\t\r\n\t\tMemoryHandler memoryHandler = null;\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\t \t\r\n\t\t\tmemoryHandler = new MemoryHandler(diskFileHandler, recordNumber, levelValue);\r\n\t\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t \r\n\t\t return memoryHandler;\r\n\t}", "public genericHandler(String fileName) \r\n {\r\n this.fileName = fileName;\r\n }", "private void fileHandler(String line) {\n var splited = line.split(\" \");\n if (splited.length < 3) {\n System.err.println(\"usage: /file login filename\");\n return;\n }\n String receiver = splited[1];\n String filename = splited[2];\n Path filePath = Path.of(directoryPath.toAbsolutePath().toString(), filename);\n\n if (!Files.exists(filePath)) {\n System.err.println(splited[2] + \" file does not exist.\");\n return;\n }\n\n readFile(filePath).ifPresent(fileContent ->\n {\n if (fileContent.limit() > Helper.LIMIT_FILE_CONTENT_SIZE) {\n System.err.println(\"file is too big. It must be under \" + Helper.LIMIT_SIZE_MSG);\n return;\n }\n\n var fileMsg = new FileMessage(filename, login, fileContent);\n if (!existPrivateConnection(receiver)) {\n sendPrivateConnectionRequest(receiver);\n privateConnectionMap.get(receiver).pendingDirectMessages.add(fileMsg.toBuffer());\n return;\n }\n handlerPrivateFrameSending(fileMsg, receiver);\n });\n }", "public void setMaxBufferSize(int value) {\n this.maxBufferSize = value;\n }", "public void setLogCollectionMaxFileSize(int size);", "private int handleCreate(int name) {\n\t\tString FileName = readVirtualMemoryString(name, MAXSTRLEN);\n\t\t//check to make sure file name is valid\n\t\tif(FileName == null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t//find a free file descriptor\n\t\tint fileIndex = -1;\n\t\tfor(int i = 2; i < 16; i++)\n\t\t{\n\t\t\tif(fileDescriptors[i] == null)\n\t\t\t{\n\t\t\t\tfileIndex = i;\n\t\t\t}\n\t\t}\n\t\t//error if there is no free file descriptor\n\t\tif(fileIndex == -1)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\n\t\tOpenFile file = ThreadedKernel.fileSystem.open(FileName, true);\n\t\t//error if file cannot be created\n\t\tif(file == null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\t//create the file with the associated file descriptor\n\t\telse\n\t\t{\n\t\t\tfileDescriptors[fileIndex] = file;\n\t\t\treturn fileIndex;\n\t\t}\n\t}", "public interface BackPressuredWriteStream<T> extends WriteStream<T> {\n\n static <T> BackPressuredWriteStream create(Handler<T> writeHandler) {\n return new BackPressuredWriteStreamImpl<T>(writeHandler);\n }\n\n static <T> BackPressuredWriteStream createThrottled(Handler<T> writeHandler, long quotaPeriod, int quota, String persistentQuotaTimeFile, Vertx vertx) {\n return new ThrottleStreamImpl(writeHandler, quotaPeriod, quota, persistentQuotaTimeFile, vertx);\n }\n\n void drop();\n\n long getQueueSize();\n}", "long getChunkSize();", "long getChunkSize();", "long getChunkSize();", "long getChunkSize();", "public FileHandler(byte[] data) {\n this.data = data;\n }", "public static PathBodyHandler create(Path file,\n List<OpenOption> openOptions) {\n FilePermission filePermission = null;\n SecurityManager sm = System.getSecurityManager();\n if (sm != null) {\n String fn = pathForSecurityCheck(file);\n FilePermission writePermission = new FilePermission(fn, \"write\");\n sm.checkPermission(writePermission);\n filePermission = writePermission;\n }\n return new PathBodyHandler(file, openOptions, filePermission);\n }", "public void setMaxFileSize(String value)\r\n\t{\r\n\t\tmaxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);\r\n\t}", "private NettyServerHandler createHandler(ServerTransportListener transportListener) {\n return NettyServerHandler.newHandler(\n transportListener, streamTracerFactories, maxStreams,\n flowControlWindow, maxHeaderListSize, maxMessageSize,\n keepAliveTimeInNanos, keepAliveTimeoutInNanos,\n maxConnectionIdleInNanos,\n maxConnectionAgeInNanos, maxConnectionAgeGraceInNanos,\n permitKeepAliveWithoutCalls, permitKeepAliveTimeInNanos);\n }", "public static FileHandler getFileHandler() throws SecurityException, IOException {\n if (fh == null) {\n String path = Config.getStringProperty(\"logPath\");\n String fileName = Config.getStringProperty(\"logFileName\");\n String fullLogPath;\n\n if (path.toLowerCase().equals(\"default\")) {\n path = System.getProperty(\"user.dir\");\n path += \"/Logs\";\n }\n\n if (!path.endsWith(\"/\")) {\n path += \"/\";\n }\n\n fullLogPath = path + fileName;\n fh = new FileHandler(fullLogPath, true);\n }\n return fh;\n }", "public void newFile(int temp) {\n if(!doesExist(temp)){\n System.out.println(\"The Directory does not exist \");\n return;\n }\n\n directory nodeptr = root;\n for(int count = 0; count < temp; count++) {\n nodeptr = nodeptr.forward;\n }\n int space = nodeptr.f.createFile(nodeptr.count);\n nodeptr.count++;\n nodeptr.availableSpace = 512 - space;\n\n }", "public FileHandler createHtmlFileHandler ( String \tfileName\r\n\t\t\t\t\t\t\t\t\t \t\t, boolean \tappend\r\n\t\t\t\t\t\t\t\t\t \t\t) {\r\n\t\t\r\n\t\tFileHandler htmlFileHandler = null;\r\n\t\t\r\n\t try {\r\n\t \t\r\n\t\t\thtmlFileHandler\t= new FileHandler(fileName, append);\r\n\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n\t return htmlFileHandler;\r\n\t}", "private static MockFileChannel newMockFileChannel(\n int size,\n ByteBuffer bb) {\n return newMockFileChannel(\n true,\n true,\n false,\n size,\n bb);\n }", "private void conditionalExtendFile() {\n\n // maximum allowed size of an Azure page blob (1 terabyte)\n final long MAX_PAGE_BLOB_SIZE = 1024L * 1024L * 1024L * 1024L;\n\n // If blob is already at the maximum size, then don't try to extend it.\n if (currentBlobSize == MAX_PAGE_BLOB_SIZE) {\n return;\n }\n\n // If we are within the maximum write size of the end of the file,\n if (currentBlobSize - currentBlobOffset <= MAX_RAW_BYTES_PER_REQUEST) {\n\n // Extend the file. Retry up to 3 times with back-off.\n CloudPageBlob cloudPageBlob = (CloudPageBlob) blob.getBlob();\n long newSize = currentBlobSize + configuredPageBlobExtensionSize;\n\n // Make sure we don't exceed maximum blob size.\n if (newSize > MAX_PAGE_BLOB_SIZE) {\n newSize = MAX_PAGE_BLOB_SIZE;\n }\n final int MAX_RETRIES = 3;\n int retries = 1;\n boolean resizeDone = false;\n while(!resizeDone && retries <= MAX_RETRIES) {\n try {\n cloudPageBlob.resize(newSize);\n resizeDone = true;\n currentBlobSize = newSize;\n } catch (StorageException e) {\n LOG.warn(\"Failed to extend size of \" + cloudPageBlob.getUri());\n try {\n\n // sleep 2, 8, 18 seconds for up to 3 retries\n Thread.sleep(2000 * retries * retries);\n } catch (InterruptedException e1) {\n\n // Restore the interrupted status\n Thread.currentThread().interrupt();\n }\n } finally {\n retries++;\n }\n }\n }\n }", "public LengthLimitedInputStream(InputStream in, int limit) {\n\tsuper(in);\n\tleft = limit;\n }", "public int getLogCollectionMaxFileSize();", "public filesMB() {\n }", "public FileHandler createXmlFileHandler ( String \tfileName\r\n\t\t\t\t\t\t\t\t\t \t\t, boolean \tappend\r\n\t\t\t\t\t\t\t\t\t \t\t) {\r\n\t\t\r\n\t\tFileHandler xmlFileHandler = null;\r\n\t\t\r\n\t try {\r\n\t \t\r\n\t\t\txmlFileHandler\t= new FileHandler(fileName, append);\r\n\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t \r\n\t return xmlFileHandler;\r\n\t}", "int getChunkSize();", "public RotatingFile(String path, long sizeLimit)\n\t\tthrows IOException\n\t{\n\t\tthis.sizeLimit = sizeLimit;\n\t\tfile = new File(path);\n\t\tstream = new FileOutputStream(file, true);\n\t\tchannel = stream.getChannel();\n\t}", "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 Builder setMaxUploadSizeInBytes(long value) {\n \n maxUploadSizeInBytes_ = value;\n onChanged();\n return this;\n }", "void visitFile(StorageUnit unit, long off, long lim);", "private FileManager() {}", "public static FileDownloadBodyHandler create(Path directory,\n List<OpenOption> openOptions) {\n FilePermission filePermissions[] = null;\n SecurityManager sm = System.getSecurityManager();\n if (sm != null) {\n String fn = pathForSecurityCheck(directory);\n FilePermission writePermission = new FilePermission(fn, \"write\");\n String writePathPerm = fn + File.separatorChar + \"*\";\n FilePermission writeInDirPermission = new FilePermission(writePathPerm, \"write\");\n sm.checkPermission(writeInDirPermission);\n FilePermission readPermission = new FilePermission(fn, \"read\");\n sm.checkPermission(readPermission);\n\n // read permission is only needed before determine the below checks\n // only write permission is required when downloading to the file\n filePermissions = new FilePermission[] { writePermission, writeInDirPermission };\n }\n\n // existence, etc, checks must be after permission checks\n if (Files.notExists(directory))\n throw new IllegalArgumentException(\"non-existent directory: \" + directory);\n if (!Files.isDirectory(directory))\n throw new IllegalArgumentException(\"not a directory: \" + directory);\n if (!Files.isWritable(directory))\n throw new IllegalArgumentException(\"non-writable directory: \" + directory);\n\n return new FileDownloadBodyHandler(directory, openOptions, filePermissions);\n\n }", "public interface VFSFile extends VFSEntry {\n /**\n * Get current length of this file.\n *\n * @return current length of file\n * @throws IOException I/O exception happened during operation\n */\n int getLength() throws IOException;\n\n /**\n * Set current read/write pointer of file relative to file start.\n *\n * @param offsetFromStart offset from beginning of file\n */\n void seek(int offsetFromStart);\n\n /**\n * Read block of data from file. Read operation starts from current pointer in file, then pointer advances to next\n * byte after last successfully read byte.\n *\n * @param buffer destination buffer to read into\n * @param bufferOffset offset in destination buffer where read bytes must be placed\n * @param length length of bytes to read from file\n * @return amount of successfully read bytes, -1 if there are no more bytes left in file\n * @throws IOException I/O exception happened during operation\n */\n int read(byte[] buffer, int bufferOffset, int length) throws IOException;\n\n /**\n * Write block of data to file, expanding it if necessary. Write operation starts from current pointer in file, then pointer advances to next\n * byte after last successfully written byte. File must be opened for write for this method to succeed.\n *\n * @param buffer source buffer to read bytes from\n * @param bufferOffset offset in source buffer from where bytes must be written to file\n * @param length length of bytes to write to file\n * @throws IOException I/O exception happened during operation\n */\n void write(byte[] buffer, int bufferOffset, int length) throws IOException;\n}", "public StripesRequestWrapper(HttpServletRequest request,\n String pathToTempDir,\n int maxTotalPostSize) throws StripesServletException {\n super(request);\n \n try {\n String contentType = request.getContentType();\n \n if (contentType != null && contentType.startsWith(\"multipart/form-data\")) {\n this.multipart = new MultipartRequest(request, pathToTempDir, maxTotalPostSize);\n }\n }\n catch (IOException e) {\n Matcher matcher = exceptionPattern.matcher(e.getMessage());\n \n if (matcher.matches()) {\n throw new FileUploadLimitExceededException(Integer.parseInt(matcher.group(2)),\n Integer.parseInt(matcher.group(1)));\n }\n else {\n throw new StripesServletException(\"Could not construct request wrapper.\", e);\n }\n }\n }", "CreateHandler()\n {\n }", "public void setMaxBufferSize(int maxBufferSize) {\r\n this.maxBufferSize = maxBufferSize;\r\n }", "public void markMaxRecordsPerFileCreate() throws JNCException {\n markLeafCreate(\"maxRecordsPerFile\");\n }", "@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void setBufferSize(int arg0) {\n\n }", "public static File createTestFile(File file, long length) throws IOException {\n FileOutputStream output = new FileOutputStream(file);\n for (long i = 0; i < length; i++) {\n output.write((int) i);\n }\n output.close();\n return file;\n }", "protected FileItemFactory getFileItemFactory() {\r\n \tUploadMonitor monitor = new UploadMonitor(request.getSession());\r\n \tlistener = new UploadListener(monitor);\r\n \t\r\n \tDiskFileItemFactory factory = new MonitoredDiskFileItemFactory(listener);\r\n \t\r\n \tfactory.setSizeThreshold(10240); // 10k\r\n\r\n if (saveDir != null) {\r\n \tfactory.setRepository(new File(saveDir));\r\n }\r\n \r\n return factory;\r\n }", "public FileHandlerImpl(){\n\t\tfilepath = null;\n\t}", "public void setMaxFiles(int maxFiles)\n\t{\n\t\tthis.maxFiles = maxFiles;\n\t}", "public BufferedFile(String filename, String mode) throws IOException {\n this(filename, mode, BufferedFile.DEFAULT_BUFFER_SIZE);\n }", "@Override\n public FileReader handler(Handler<Buffer> handler) {\n this.dataHandler = handler;\n return this;\n }", "public void setMaxRecordsPerFileValue(long maxRecordsPerFileValue)\n throws JNCException {\n setMaxRecordsPerFileValue(new YangUInt32(maxRecordsPerFileValue));\n }", "long getFileSize();", "public fileServer() {\n }", "public Long createFileUpload(FileUpload fileUpload, InputStream fileInputStream) throws AppException;", "Handle newHandle();", "public void setMaxRecordsPerFileValue(String maxRecordsPerFileValue)\n throws JNCException {\n setMaxRecordsPerFileValue(new YangUInt32(maxRecordsPerFileValue));\n }", "@Override\n public void setMaxWriteSize(int maxWriteSize) {\n mMaxWriteSize = maxWriteSize;\n }", "public HeapFile(File f, TupleDesc td) {\n this.tupleDesc = td;\n this.file = f;\n this.fid = file.getAbsoluteFile().hashCode();\n this.numOfPages = (int)Math.ceil((double)f.length()/(double)BufferPool.PAGE_SIZE);\n if(f.length()==0) \n//\t\t\ttry {\n//\t\t\t\twritePage(new HeapPage(new HeapPageId(fid, 0), new byte[BufferPool.PAGE_SIZE]));\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t}\n\t\t\tthis.numOfPages = 0;\n// }\n }", "@Override\n public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {\n List<String> segments = uri.getPathSegments();\n String accountId = segments.get(0);\n String id = segments.get(1);\n String format = segments.get(2);\n if (FORMAT_THUMBNAIL.equals(format)) {\n int width = Integer.parseInt(segments.get(3));\n int height = Integer.parseInt(segments.get(4));\n String filename = \"thmb_\" + accountId + \"_\" + id;\n File dir = getContext().getCacheDir();\n File file = new File(dir, filename);\n if (!file.exists()) {\n Uri attachmentUri = getAttachmentUri(Long.parseLong(accountId), Long.parseLong(id));\n Cursor c = query(attachmentUri,\n new String[] { AttachmentProviderColumns.DATA }, null, null, null);\n if (c != null) {\n try {\n if (c.moveToFirst()) {\n attachmentUri = Uri.parse(c.getString(0));\n } else {\n return null;\n }\n } finally {\n c.close();\n }\n }\n String type = getContext().getContentResolver().getType(attachmentUri);\n try {\n InputStream in =\n getContext().getContentResolver().openInputStream(attachmentUri);\n Bitmap thumbnail = createThumbnail(type, in);\n thumbnail = Bitmap.createScaledBitmap(thumbnail, width, height, true);\n FileOutputStream out = new FileOutputStream(file);\n thumbnail.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.close();\n in.close();\n }\n catch (IOException ioe) {\n return null;\n }\n }\n return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);\n }\n else {\n return ParcelFileDescriptor.open(\n new File(getContext().getDatabasePath(accountId + \".db_att\"), id),\n ParcelFileDescriptor.MODE_READ_ONLY);\n }\n }", "public NettyHttpFileHandler() {\r\n synchronized(_lock) {\r\n if (mimeTypesMap == null) {\r\n InputStream is = this.getClass().getResourceAsStream(\"/server.mime.types\");\r\n if (is != null) {\r\n mimeTypesMap = new MimetypesFileTypeMap(is);\r\n } else {\r\n \tlogger.debug(\"Cannot load mime types!\");\r\n }\r\n }\r\n }\r\n }", "static public void setMaxLogStoreSize(final int bytes) {\n // TODO: also check if bytes is bigger than remaining disk space?\n if (bytes >= 10000) {\n logFileMaxSize = bytes;\n }\n if (null != context) {\n SharedPreferences prefs = context.getSharedPreferences (SHARED_PREF_KEY, Context.MODE_PRIVATE);\n prefs.edit ().putInt (SHARED_PREF_KEY_logFileMaxSize, logFileMaxSize).commit();\n }\n }", "@ManagedAttribute(description = \"The maximum file size for the file store in bytes\")\n public void setMaxFileStoreSize(long maxFileStoreSize) {\n this.maxFileStoreSize = maxFileStoreSize;\n }", "public void setMaxCacheEntrySize(int val) {\n this.mMaxCacheEntrySize = val;\n }", "public LogFileV2(File file) {\n try {\n if(!file.getParentFile().exists()){\n file.getParentFile().mkdirs();\n }\n this.file = file;\n this.randomAccessFile = new RandomAccessFile(file,\"rw\");\n this.fileChannel = randomAccessFile.getChannel();\n this.readMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n this.writeMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file, long siz)\n throws java.io.IOException {\n \n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB truncateFile()\");\n\n // Check that the network file is our type\n\n if (file instanceof DBNetworkFile) {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Get the JDBC file\n \n DBNetworkFile jfile = (DBNetworkFile) file;\n \n // Get, or create, the file state\n \n FileState fstate = jfile.getFileState();\n \n // Get the file details\n \n DBFileInfo dbInfo = getFileDetails(jfile.getFullName(),dbCtx,fstate);\n if ( dbInfo == null)\n throw new FileNotFoundException(jfile.getFullName());\n\n // Check if the new file size is greater than the maximum allowed file size, if enabled\n \n if ( dbCtx.hasMaximumFileSize() && siz > dbCtx.getMaximumFileSize()) {\n \n // Mark the file to delete on close\n \n file.setDeleteOnClose( true);\n\n // Return a disk full error\n \n throw new DiskFullException( \"Write is beyond maximum allowed file size\");\n }\n \n // Keep track of the allocation/release size in case the file resize fails\n \n long allocSize = 0L;\n long releaseSize = 0L;\n \n // Check if there is a quota manager\n\n QuotaManager quotaMgr = dbCtx.getQuotaManager();\n \n if ( dbCtx.hasQuotaManager()) {\n \n // Determine if the new file size will release space or require space allocating\n \n if ( siz > dbInfo.getAllocationSize()) {\n \n // Calculate the space to be allocated\n \n allocSize = siz - dbInfo.getAllocationSize();\n \n // Allocate space to extend the file\n \n quotaMgr.allocateSpace(sess, tree, file, allocSize);\n }\n else {\n \n // Calculate the space to be released as the file is to be truncated, release the space if\n // the file truncation is successful\n \n releaseSize = dbInfo.getAllocationSize() - siz;\n }\n }\n \n // Set the file length\n\n try {\n jfile.truncateFile(siz);\n }\n catch (IOException ex) {\n \n // Check if we allocated space to the file\n \n if ( allocSize > 0 && quotaMgr != null)\n quotaMgr.releaseSpace(sess, tree, file.getFileId(), null, allocSize);\n\n // Rethrow the exception\n \n throw ex; \n }\n \n // Check if space has been released by the file resizing\n \n if ( releaseSize > 0 && quotaMgr != null)\n quotaMgr.releaseSpace(sess, tree, file.getFileId(), null, releaseSize);\n \n // Update the file information\n \n if ( allocSize > 0)\n dbInfo.setAllocationSize(dbInfo.getAllocationSize() + allocSize);\n else if ( releaseSize > 0)\n dbInfo.setAllocationSize(dbInfo.getAllocationSize() - releaseSize);\n \n // Update the last file change date/time\n \n try {\n\n // Build the file information to set the change date/time\n \n FileInfo finfo = new FileInfo();\n \n finfo.setChangeDateTime(System.currentTimeMillis());\n finfo.setFileInformationFlags(FileInfo.SetChangeDate);\n \n // Set the file change date/time\n \n dbCtx.getDBInterface().setFileInformation(jfile.getDirectoryId(), jfile.getFileId(), finfo);\n \n // Update the cached file information\n \n dbInfo.setChangeDateTime(finfo.getChangeDateTime());\n dbInfo.setAllocationSize(siz);\n }\n catch (Exception ex) { \n }\n }\n }", "SFTPv3FileHandle(SFTPv3Client client, byte[] h)\r\n\t{\r\n\t\tthis.client = client;\r\n\t\tthis.fileHandle = h;\r\n\t}", "private int handleWrite(int fileDescriptor, int buffer, int size){\n\t\t// return -1 on error\n\t\tif (fileDescriptor < 0 || fileDescriptor > 15) return -1;\n\n\n\t\tOpenFile file;\n\t\tif (fileDescriptors[fileDescriptor] == null){\n\t\t\treturn -1;\n\t\t}else{\n\t\t\tfile = fileDescriptors[fileDescriptor];\n\t\t}\n\n\n\t\tif( size < 0) return -1;\n\t\tif(buffer < 0) return -1;\n\t\tif(buffer == 0) return 0;\n\n\t\t//loop through and increment counter and keep the buffer size small\n\t\t//enough not to run out of heap space.\n\t\t//System.out.println(\"687\" + size);//STOPS HERE\n\t\tint maxWrite = 1024;//should put as public variable\n\t\tbyte tempBuff[] = new byte[maxWrite];\n\n\n\t\t//loop through and increment counter and keep the buffer size small\n\t\t//enough not to run out of heap space.\n\t\tint byteTransferTotal = 0;\n\t\twhile(size > 0){\n\t\t\tint transferAmount = (size < maxWrite) ? size : maxWrite;\n\n\t\t\tint readSize = readVirtualMemory(buffer, tempBuff, 0,transferAmount);//could just re-assign this variable\n\n\t\t\tint sizeWritten = file.write(tempBuff, 0, readSize);\n\n\t\t\tif(sizeWritten == -1){\n\t\t\t\tif(byteTransferTotal == 0)\n\t\t\t\t\tbyteTransferTotal = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tbuffer += sizeWritten;\n\t\t\tsize -= sizeWritten;\n\t\t\tbyteTransferTotal += sizeWritten;\n\n\t\t\tif(sizeWritten < transferAmount)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn byteTransferTotal;\n\t}", "public StorageServer(File root)\n {\n this(root, 0, 0);\n }", "private DiskLruImageCache(File cacheDir, long maxByteSize)\n {\n this.cacheDirectory = cacheDir;\n this.maxCacheByteSize = maxByteSize;\n }", "public interface FilePostDownloadHandler {\n void onPostDownload();\n}", "private static ByteBuffer bufferFile(FileChannel fileChannel, long position, long maxLength) throws IOException {\n long mappingBytes = Math.min(fileChannel.size() - position, maxLength);\n\n MappedByteBuffer buffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, position, mappingBytes);\n buffer.load();\n\n /*\n if (mappingBytes >= Integer.MAX_VALUE)\n throw new IOException(\"Buffer for \" + mappingBytes + \" bytes cannot be allocated\");\n ByteBuffer buffer = ByteBuffer.allocateDirect((int)mappingBytes);\n if (fileChannel.read(buffer, position) < mappingBytes)\n throw new IOException(\"File channel provided less than \" + mappingBytes + \" bytes\");\n buffer.flip();\n */\n\n return buffer;\n }", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "private void addHandlers()\n {\n handlers.add(new FileHTTPRequestHandler());\n }", "public BufferedFile(File file, String mode) throws IOException {\n this(file, mode, BufferedFile.DEFAULT_BUFFER_SIZE);\n }", "public void setTotalMaxFileSize(int tOTALMAXSIZE) {\n\t\t\r\n\t}", "private AuctionFileHandler()\n {\n }", "public FileServ() {\n\t\tsuper();\n\t}", "public void setMaxRecordsPerFileValue(YangUInt32 maxRecordsPerFileValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"max-records-per-file\",\n maxRecordsPerFileValue,\n childrenNames());\n }", "public Netty4HttpPipeliningHandler(Logger logger, final int maxEventsHeld, final Netty4HttpServerTransport serverTransport) {\n this.logger = logger;\n this.maxEventsHeld = maxEventsHeld;\n this.outboundHoldingQueue = new PriorityQueue<>(1, Comparator.comparingInt(t -> t.v1().getSequence()));\n this.serverTransport = serverTransport;\n }", "public void setLogFileSizeLimit(int logFileSizeLimit) {\n agentConfig.setLogFileSizeLimit(logFileSizeLimit);\n logConfigChanged();\n }", "public File writeBackFileToDvn(RConnection c, String targetFilename,\n String tmpFilePrefix, String tmpFileExt, int fileSize){\n File tmprsltfl = null;\n \n String resultFilePrefix = tmpFilePrefix + PID + \".\";\n \n String rfsffx = \".\" + tmpFileExt;\n RFileInputStream ris = null;\n OutputStream outbr = null;\n try {\n tmprsltfl = File.createTempFile(resultFilePrefix, rfsffx);\n \n //outbr = new FileOutputStream(tmprsltfl);\n outbr = new BufferedOutputStream(new FileOutputStream(tmprsltfl));\n //File tmp = new File(targetFilename);\n //long tmpsize = tmp.length();\n // open the input stream\n ris = c.openFile(targetFilename);\n \n if (fileSize < 1024*1024*500){\n int bfsize = fileSize +1;\n byte[] obuf = new byte[bfsize];\n ris.read(obuf);\n //while ((obufsize =)) != -1) {\n outbr.write(obuf, 0, bfsize);\n //}\n }\n ris.close();\n outbr.close();\n return tmprsltfl;\n } catch (FileNotFoundException fe){\n fe.printStackTrace();\n dbgLog.fine(\"FileNotFound exception occurred\");\n return tmprsltfl;\n } catch (IOException ie){\n ie.printStackTrace();\n dbgLog.fine(\"IO exception occurred\");\n } finally {\n if (ris != null){\n try {\n ris.close();\n } catch (IOException e){\n \n }\n }\n \n if (outbr != null){\n try {\n outbr.close();\n } catch (IOException e){\n \n }\n }\n \n }\n return tmprsltfl;\n }", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "protected void createFile (ZipFile file, ZipEntry entry, File target)\n {\n if (_buffer == null) {\n _buffer = new byte[COPY_BUFFER_SIZE];\n }\n\n // make sure the file's parent directory exists\n File pdir = target.getParentFile();\n if (!pdir.exists() && !pdir.mkdirs()) {\n log.warning(\"Failed to create parent for '\" + target + \"'.\");\n }\n\n try (InputStream in = file.getInputStream(entry);\n FileOutputStream fout = new FileOutputStream(target)) {\n\n int total = 0, read;\n while ((read = in.read(_buffer)) != -1) {\n total += read;\n fout.write(_buffer, 0, read);\n updateProgress(total);\n }\n\n } catch (IOException ioe) {\n log.warning(\"Error creating '\" + target + \"': \" + ioe);\n }\n }", "File createFile(String name) throws IOException {\n File storageFile = File.createTempFile(FILE_PREFIX + name + \"_\", null, this.subDirectories[fileCounter.getAndIncrement()&(this.subDirectories.length-1)]); //$NON-NLS-1$\n if (LogManager.isMessageToBeRecorded(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {\n LogManager.logDetail(org.teiid.logging.LogConstants.CTX_BUFFER_MGR, \"Created temporary storage area file \" + storageFile.getAbsoluteFile()); //$NON-NLS-1$\n }\n return storageFile;\n }", "default Handler asHandler() {\n return new HandlerBuffer(this);\n }", "public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}", "@Override\n public void doReleaseFile(String filePath, MiddleObject midObj) throws ChannelReleaseException {\n }", "public interface FastDfsService {\n String fileUpload(MultipartFile file) throws Exception;\n}", "public void connect(File file, long position, long size) throws FileNotFoundException;", "Object create(File file) throws IOException, SAXException, ParserConfigurationException;", "protected SMBFile(Session sess, FileInfo finfo, int fid) {\n\t\tm_sess = sess;\n\t\tm_info = finfo;\n\t\tm_FID = fid;\n\n\t\t// Initialize the file write position using the current file size\n\n\t\tm_txpos = getFileSize();\n\t}", "@Override\n\tpublic void setMaxNumOfUrls(int maxNumOfUrls) {\n\t\t\n\t}", "protected DedicatedFile(short fid) \r\n \t //@ requires true;\r\n \t //@ ensures DedicatedFile(fid, null, true, nil, _);\r\n\t{\r\n\t\tsuper(fid);\r\n\t\tparentFile = null;\r\n\t\tsiblings = new File[MAX_SIBLINGS];\r\n\t\tnumber = 0;\r\n\t\t////@ close foreachp(nil, valid_id); // auto\r\n\t\t////@ close DedicatedFile(fid, null, true, nil, _); // auto\r\n\t}", "public long getFileSize();", "public long getFileSize();", "public HeapFile(File f, TupleDesc td) {\n this.file = f;\n this.tableId = f.getAbsoluteFile().hashCode();\n this.td = td;\n int pageSize = BufferPool.PAGE_SIZE;\n int pagesNeeded;\n\n RandomAccessFile rf;\n try {\n rf = new RandomAccessFile(f, \"r\");\n pagesNeeded = (int) Math.ceil((double) rf.length() / pageSize);\n } catch (Exception e) {\n System.err.println(\"Caugth exception1:\" + e.getMessage());\n return;\n }\n this.numPages = pagesNeeded;\n System.out.println(\"Created \" + pagesNeeded + \" heap files.\");\n pages = new HeapPage[pagesNeeded];\n\n // TODO Find out the best way to handle exceptions\n for (int pageIndex = 0; pageIndex < pagesNeeded; ++pageIndex) {\n int offset = pageIndex * pageSize;\n byte[] data = new byte[pageSize];\n try {\n rf.readFully(data, offset, pageSize);\n HeapPageId pid = new HeapPageId(tableId, pageIndex);\n System.out.println(\"Created HeapPageId\");\n pages[pageIndex] = new HeapPage(pid, data);\n System.out.println(\"Wrote to pages[\"+pageIndex+\"].\");\n } catch (Exception e) {\n System.err.println(\"Caught exception2:\" + e.getMessage());\n return;\n }\n }\n }", "public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "private void createHandler()\r\n {\r\n serverHandler = new Handler(Looper.getMainLooper())\r\n {\r\n @Override\r\n public void handleMessage(Message inputMessage)\r\n {\r\n int percentage;\r\n switch (inputMessage.what)\r\n {\r\n case LISTENING:\r\n waiting.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Oczekiwanie na połączenie\");\r\n break;\r\n case CONNECTED:\r\n waiting.setVisibility(View.INVISIBLE);\r\n progress.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Przesyłanie pliku\");\r\n break;\r\n case PROGRESS:\r\n percentage = (int) inputMessage.obj;\r\n progress.setProgress(percentage);\r\n break;\r\n case DONE:\r\n messageDialog(\"Przesyłanie zakończone!\", DIALOG_MODE_DONE);\r\n break;\r\n case LISTENING_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Nie udało się utworzyć gniazda\", DIALOG_MODE_ERROR);\r\n break;\r\n case SOCKET_ACCEPT_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd połączenia!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case EXTERNAL_STORAGE_ACCESS_FAILED:\r\n messageDialog(\"Brak dostępu do pamięci masowej!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case FILE_TRANSFER_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd podczas przesyłania danych!\\nPowrót\",\r\n DIALOG_MODE_ERROR);\r\n break;\r\n default:\r\n super.handleMessage(inputMessage);\r\n }\r\n }\r\n };\r\n }" ]
[ "0.5891853", "0.56290776", "0.5628743", "0.56004614", "0.5586431", "0.5550729", "0.5510616", "0.5437996", "0.5326787", "0.53210986", "0.5281561", "0.52635777", "0.5161425", "0.5160209", "0.51515085", "0.5148813", "0.5148813", "0.5148813", "0.5148813", "0.51103127", "0.5100915", "0.5094449", "0.50919664", "0.5090516", "0.5078873", "0.50708336", "0.50660944", "0.5057588", "0.5052878", "0.5045797", "0.50191975", "0.5016418", "0.50113297", "0.49982303", "0.49475354", "0.4945808", "0.4943042", "0.49294442", "0.4925325", "0.49186456", "0.49067068", "0.49048147", "0.48943725", "0.48851958", "0.48792338", "0.4877133", "0.4873874", "0.48704478", "0.48665228", "0.48655456", "0.48519203", "0.48517874", "0.48460168", "0.48410285", "0.48370248", "0.48338276", "0.48242655", "0.4823745", "0.48182157", "0.48159462", "0.47977757", "0.4791385", "0.47816217", "0.47806782", "0.4753235", "0.4729067", "0.47272336", "0.47260988", "0.47203642", "0.4719642", "0.47139722", "0.4710635", "0.47064885", "0.4704735", "0.4699063", "0.46909043", "0.4683735", "0.46833795", "0.46575463", "0.4650598", "0.46480352", "0.46457928", "0.46432444", "0.46187523", "0.46109498", "0.46060374", "0.46015635", "0.46009284", "0.45977497", "0.4596856", "0.4593795", "0.45879966", "0.45827568", "0.4577093", "0.4573859", "0.4570431", "0.4570431", "0.45658952", "0.4557431", "0.4557099" ]
0.6009326
0
/ Create stream handler.
public StreamHandler createStreamHandler (OutputStream outStream) { StreamHandler streamHandler = null; try { streamHandler = new StreamHandler(outStream, new SimpleFormatter()); } catch (SecurityException e) { e.printStackTrace(); } return streamHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CreateHandler()\n {\n }", "protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }", "default Handler asHandler() {\n return new HandlerBuffer(this);\n }", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "public Http2MultiplexHandler(ChannelHandler inboundStreamHandler) {\n/* 115 */ this(inboundStreamHandler, (ChannelHandler)null);\n/* */ }", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "public final Http2FrameStream newStream() {\n/* 69 */ Http2FrameCodec codec = this.frameCodec;\n/* 70 */ if (codec == null) {\n/* 71 */ throw new IllegalStateException(StringUtil.simpleClassName(Http2FrameCodec.class) + \" not found. Has the handler been added to a pipeline?\");\n/* */ }\n/* */ \n/* 74 */ return codec.newStream();\n/* */ }", "private NettyServerHandler createHandler(ServerTransportListener transportListener) {\n return NettyServerHandler.newHandler(\n transportListener, streamTracerFactories, maxStreams,\n flowControlWindow, maxHeaderListSize, maxMessageSize,\n keepAliveTimeInNanos, keepAliveTimeoutInNanos,\n maxConnectionIdleInNanos,\n maxConnectionAgeInNanos, maxConnectionAgeGraceInNanos,\n permitKeepAliveWithoutCalls, permitKeepAliveTimeInNanos);\n }", "public GenericHandler() {\n\n }", "DataStreams createDataStreams();", "ByteHandler getInstance();", "long createBidirectionalStream(CronetBidirectionalStream caller,\n long urlRequestContextAdapter, boolean sendRequestHeadersAutomatically,\n boolean trafficStatsTagSet, int trafficStatsTag, boolean trafficStatsUidSet,\n int trafficStatsUid, long networkHandle);", "protected void sequence_DEFINE_DefinitionStream_STREAM(ISerializationContext context, DefinitionStream semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "OutputStream createStream(String location);", "BasicSourceStreamHandlers getBasic_ss_handlers();", "public interface S3Handler extends S3ObjectStreaming {\n\n /**\n * Called after a new instance has been created.\n * <p>\n * <i>IMPORTANT</i>: Your S3Handler must use this class, the S3HandlerService will call it.\n *\n * @param desc\n * @throws NuxeoException\n * @since 8.2\n */\n public void initialize(S3HandlerDescriptor desc) throws NuxeoException;\n\n /**\n * Called when the S3Handler is removed. Notice that this should not happen very often. Most of the time, if not\n * every time, S3HandlerService creates and initializes the contributed handles at startup and releases them when\n * the server is shut down.\n *\n * @since 8.2\n */\n public void cleanup();\n\n /**\n * The handler uses the bucket as set in the S3HandlerDescriptor at initialization time. But this can be modified\n * dynamically.\n * <p>\n * Notice that an easy way to handle different buckets on the same S3 instance is to contribute different S3Handler\n * in the XML. This way, there is no need to switch buckets, just use the correct handler.\n *\n * @param inBucket\n * @since 8.2\n */\n public void setBucket(String inBucket);\n\n /**\n * @return the AmazonS3 instance created for this handler\n * @since 8.2\n */\n public AmazonS3 getS3();\n\n /**\n * Uploads inFile to S3, using the \"Current bucket\"\n *\n * @param inKey\n * @param inFile\n * @return true if the file could be uploaded with no error\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean sendFile(String inKey, File inFile) throws NuxeoException;\n\n /**\n * Downloads the file from S3 using the \"current bucket\", saving it to inDestFile\n * <p>\n * <code>fileName</code> should be optional (not required by the interface)\n *\n * @param inKey\n * @param inDestFile\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, File inDestFile);\n\n /**\n * Downloads the file from S3 using the \"current bucket\". Should return\n * a temporary blob (becomes permanent if stored in a document)\n *\n * @param inKey\n * @param inFileName\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, String inFileName);\n\n /**\n * Get a SequenceInputStream to the object. The goal of using a SequenceInputStream is to avoid time out while\n * reading large, big objects.\n * <br>\n * pieceSize is the size in bytes for each sequential stream. It set the number of streams created (object size /\n * pieceSize). If 0, a default value is used.\n * Streams are open/close one after the other.\n * <br>\n * The caller can call close() any time, this will close all the streams.\n * <br>\n * See S3ObjectSequentialStream for more info.\n * \n * @param key\n * @param pieceSize\n * @return the SequenceInputStream\n * @throws IOException\n * @since 2021.35\n */\n public static long DEFAULT_PIECE_SIZE = 100 * 1024 * 1024;\n\n /**\n * @see S3ObjectStreaming#getSequenceInputStream(String, long)\n */\n public SequenceInputStream getSequenceInputStream(String key, long pieceSize) throws IOException;\n\n /**\n * @see S3ObjectStreaming#readBytes(String, long, long)\n */\n public byte[] readBytes(String key, long start, long len) throws IOException;\n\n /**\n * Deletes the file from S3 using the \"current bucket\", returns true if succesful\n *\n * @param inKey\n * @return\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean deleteFile(String inKey) throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param objectKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inKey, int durationInSeconds, String contentType, String contentDisposition)\n throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses <code>inBucket</code>. If it is empty, uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param inBucket\n * @param inKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inBucket, String inKey, int durationInSeconds, String contentType,\n String contentDisposition) throws NuxeoException;\n\n /**\n * Returns true if the key exists in the current bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inBucket\n * @param inKey\n * @return true if the key exists in the \"current bucket\"\n * @since 8.2\n */\n public boolean existsKeyInS3(String inBucket, String inKey);\n\n /**\n * Returns true if the key exists in the bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inKey\n * @return true if the key exists in the bucket\n * @since 8.2\n */\n public boolean existsKeyInS3(String inKey);\n\n /**\n * Returns true if the key exists on S3 (using the \"current bucket\"), and should first check in the\n * CacheForExistsKey (if the configuration allows usage of the cache)\n *\n * @param inKey\n * @return true is the key exists on S3. May use the cache\n * @since 8.2\n */\n public boolean existsKey(String inKey);\n\n /**\n * Returns true if the key exists on S3, in the bucket, and should first check in the CacheForExistsKey (if the\n * Configuration allows usage of the cache)\n *\n * @param bucket\n * @param inKey\n * @return\n * @since 8.2\n */\n public boolean existsKey(String bucket, String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself,\n * as returned by AWS SDK\n * \n * @param inKey\n * @return\n * @since TODO\n */\n public ObjectMetadata getObjectMetadata(String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself.\n * Values returned are whatever is stored as system metadata,\n * such as \"Content-Type\", \"Content-Length\", \"ETag\", ...\n * _plus_ the following properties:\n * <ul>\n * <li>\"bucket\": the bucket name (same as the one defined for the S3Handler)</li>\n * <li>\"objectKey\": the object key (same as the inKey parameter)</li>\n * <li>\"userMetadata\": An object holding the user metadata ({} if no user metadata). All values are String.</li>\n * </ul>\n * If AWS returns a \"not found\" error, the method returns null and adds a WARN to the log. Any other error is thrown\n * \n * @param inKey\n * @return a JsonNode of all the metadata, including userMetadata\n * @throws JsonProcessingException\n * @since 2.0\n */\n public JsonNode getObjectMetadataJson(String inKey) throws JsonProcessingException;\n\n /**\n * Return the current bucket\n *\n * @return the current bucket\n * @since 8.2\n */\n public String getBucket();\n\n /**\n * returns the default duration used to build temp. signed URLs\n *\n * @return the default duration used to build temp. signed URLs\n * @since 8.2\n */\n public int getSignedUrlDuration();\n\n /**\n * Just a convenient method, saving one line of code (getting the service)\n *\n * @param name\n * @return the S3Handler contributed with this name, null if not found\n * @since 8.2\n */\n public static S3Handler getS3Handler(String name) {\n\n S3HandlerService s3HandlerService = Framework.getService(S3HandlerService.class);\n\n if (StringUtils.isBlank(name)) {\n name = Constants.DEFAULT_HANDLER_NAME;\n }\n\n return s3HandlerService.getS3Handler(name);\n\n }\n\n /**\n * Generic method used to build a message when an error is thrown by AWS\n *\n * @param e\n * @return a string describing the error\n * @since 8.2\n */\n public static String buildDetailedMessageFromAWSException(Exception e) {\n\n String message = \"\";\n\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n message = \"Caught an AmazonServiceException, which \" + \"means your request made it \"\n + \"to Amazon S3, but was rejected with an error response\" + \" for some reason.\";\n message += \"\\nError Message: \" + ase.getMessage();\n message += \"\\nHTTP Status Code: \" + ase.getStatusCode();\n message += \"\\nAWS Error Code: \" + ase.getErrorCode();\n message += \"\\nError Type: \" + ase.getErrorType();\n message += \"\\nRequest ID: \" + ase.getRequestId();\n\n } else if (e instanceof AmazonClientException) {\n AmazonClientException ace = (AmazonClientException) e;\n message = \"Caught an AmazonClientException, which \" + \"means the client encountered \"\n + \"an internal error while trying to \" + \"communicate with S3, \"\n + \"such as not being able to access the network.\";\n message += \"\\nError Message: \" + ace.getMessage();\n\n } else {\n message = e.getMessage();\n }\n\n return message;\n }\n\n /**\n * Generic helper telling the caller if an error catched is a \"Missing Key on S3\" error\n *\n * @param e\n * @return true if the error is \"MIssing Key\" error\n * @since 8.2\n */\n public static boolean errorIsMissingKey(AmazonClientException e) {\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n return (ase.getStatusCode() == 404) || \"NoSuchKey\".equals(ase.getErrorCode())\n || \"Not Found\".equals(e.getMessage());\n }\n return false;\n }\n\n}", "public interface IStreamFactory{\n Closeable getStream(Query q);\n }", "public ClientStream delegate() {\n return newStream;\n }", "public ClientHandler(InputStream inputFromClient) {\n try {\n this.inputFromClient = new ObjectInputStream(inputFromClient);\n } catch (IOException e) {\n System.out.println(\"Could not create ObjectInputStream from ClientHandler\");\n }\n }", "public Http2MultiplexHandler(ChannelHandler inboundStreamHandler, ChannelHandler upgradeStreamHandler) {\n/* 127 */ this.inboundStreamHandler = (ChannelHandler)ObjectUtil.checkNotNull(inboundStreamHandler, \"inboundStreamHandler\");\n/* 128 */ this.upgradeStreamHandler = upgradeStreamHandler;\n/* */ }", "protected abstract OutputStream getStream() throws IOException;", "public ConsoleHandler createConsoleHandler () {\r\n\t\t\t\r\n\t\tConsoleHandler consoleHandler = null;\r\n\t\t\t\r\n\t\ttry {\r\n\t\t \t\r\n\t\t\tconsoleHandler = new ConsoleHandler();\r\n\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t \r\n\t\t return consoleHandler;\r\n\t}", "Handle newHandle();", "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}", "GenericSink createGenericSink();", "public void testClose_NoOutputStream() {\n StreamHandler h = new StreamHandler();\n h.close();\n }", "<R> Streamlet<R> newSource(IRichSpout spout);", "protected StreamParser()\n {\n }", "@SuppressWarnings(\"unchecked\")\n private <T extends Event> Stream<T> makeStream(StreamMaker sm, Class<T> type) {\n\n Stream<T> stream = app.createStream(type);\n stream.setName(sm.getName());\n\n if (sm.getKeyFinder() != null)\n stream.setKey((KeyFinder<T>) sm.getKeyFinder());\n else if (sm.getKeyDescriptor() != null)\n stream.setKey(sm.getKeyDescriptor());\n\n return stream;\n }", "public SocketHandler createSocketHandler (String host, int port) {\r\n\t\t\t\t\t\t\t\r\n\t\tSocketHandler socketHandler = null;\r\n\r\n\t\ttry {\r\n\t\t\t\t\t\t \t\r\n\t\t\tsocketHandler = new SocketHandler(host, port);\r\n\t\t\t\t\t\t\t\t\r\n\t\t} catch (SecurityException | IOException e) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\t\t \r\n\t\treturn socketHandler;\r\n\t}", "ResponseHandler createResponseHandler();", "public FStream newStream(String name, ISource source) {\n\t\tFStream n = new FStream(name, this, source);\n\t\t\n\t\t_graph.addVertex(n);\n\t\t\n\t\treturn n;\n\t}", "private static AInput<ByteBuffer> export(final Consumer<StreamFinishedEvent> listener,\n final AInput<ByteBuffer> stream) {\n return AInputProxyFactory.createProxy(Vat.current(), CountingInput.countIfNeeded(stream, listener));\n }", "public interface IStreamAwareScopeHandler extends IScopeHandler {\r\n\t/**\r\n\t * A broadcast stream starts being published. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamPublishStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * A broadcast stream starts being recorded. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream \r\n\t */\r\n\tpublic void streamRecordStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastClose(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberStart(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberClose(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a playlist item plays.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t * @param isLive treu if live\r\n\t * TODO\r\n\t */\r\n\tpublic void streamPlaylistItemPlay(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, boolean isLive);\r\n\r\n\t/**\r\n\t * Notified when a playlist item stops.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t */\r\n\tpublic void streamPlaylistItemStop(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item pauses.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemPause(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item resumes.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemResume(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item seeks.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemSeek(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n}", "public PipedOutputStream() {\n }", "public abstract void stream(int port);", "Handler<Q, R> handler();", "static void serverHandlerImpl(InputStream inputStream,\n OutputStream outputStream,\n URI uri,\n SendResponseHeadersFunction sendResponseHeadersFunction)\n throws IOException\n {\n try (InputStream is = inputStream;\n OutputStream os = outputStream) {\n readAllBytes(is);\n\n String magicQuery = uri.getQuery();\n if (magicQuery != null) {\n int bodyIndex = Integer.valueOf(magicQuery);\n String body = BODIES[bodyIndex];\n byte[] bytes = body.getBytes(UTF_8);\n sendResponseHeadersFunction.apply(200, bytes.length);\n int offset = 0;\n // Deliberately attempt to reply with several relatively\n // small data frames ( each write corresponds to its own\n // data frame ). Additionally, yield, to encourage other\n // handlers to execute, therefore increasing the likelihood\n // of multiple different-stream related frames in the\n // client's read buffer.\n while (offset < bytes.length) {\n int length = Math.min(bytes.length - offset, 64);\n os.write(bytes, offset, length);\n os.flush();\n offset += length;\n Thread.yield();\n }\n } else {\n sendResponseHeadersFunction.apply(200, 1);\n os.write('A');\n }\n }\n }", "public interface ClientHandler {\r\n\r\n\t/**\r\n\t * Handle client.\r\n\t *\r\n\t * @param inFromClient the in from client\r\n\t * @param outToServer the out to server\r\n\t */\r\n\tpublic void handleClient(InputStream inFromClient, OutputStream outToServer);\r\n}", "public static AisPacketStream newStream() {\n return new AisPacketStreamImpl();\n }", "public FileHandler(byte[] data) {\n this.data = data;\n }", "void createHandler(final String handlerClassName);", "public static TwitterStream firehose(TwitterStreamConfiguration tws, \n TwitterStreamHandler handler) throws IOException, OAuthException {\n \n //build get params\n HttpParams getParams = new BasicHttpParams();\n if (tws.getCount() != null) getParams.setIntParameter(\"count\", tws.getCount());\n if (tws.isDelimited()) getParams.setParameter(\"delimited\", tws.getDelimited());\n //send request\n HttpRequestBase conn = buildConnection(FIREHOSE_URL, getParams, tws);\n return new TwitterStream(conn, handler);\n }", "public OutputStream createOutputStream() throws IOException {\n/* 213 */ return this.stream.createOutputStream();\n/* */ }", "private void createHandler()\r\n {\r\n serverHandler = new Handler(Looper.getMainLooper())\r\n {\r\n @Override\r\n public void handleMessage(Message inputMessage)\r\n {\r\n int percentage;\r\n switch (inputMessage.what)\r\n {\r\n case LISTENING:\r\n waiting.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Oczekiwanie na połączenie\");\r\n break;\r\n case CONNECTED:\r\n waiting.setVisibility(View.INVISIBLE);\r\n progress.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Przesyłanie pliku\");\r\n break;\r\n case PROGRESS:\r\n percentage = (int) inputMessage.obj;\r\n progress.setProgress(percentage);\r\n break;\r\n case DONE:\r\n messageDialog(\"Przesyłanie zakończone!\", DIALOG_MODE_DONE);\r\n break;\r\n case LISTENING_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Nie udało się utworzyć gniazda\", DIALOG_MODE_ERROR);\r\n break;\r\n case SOCKET_ACCEPT_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd połączenia!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case EXTERNAL_STORAGE_ACCESS_FAILED:\r\n messageDialog(\"Brak dostępu do pamięci masowej!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case FILE_TRANSFER_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd podczas przesyłania danych!\\nPowrót\",\r\n DIALOG_MODE_ERROR);\r\n break;\r\n default:\r\n super.handleMessage(inputMessage);\r\n }\r\n }\r\n };\r\n }", "private void openStreams() {\n\t\ttry {\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().debug(\"Opening streams..\");\n\t\t\t// abrimos el stream de salida\n\t\t\tthis.setOutputStream(new ObjectOutputStream(this.getConnection().getOutputStream()));\n\t\t\t// abrimos el stream de entrada\n\t\t\tthis.setInputStream(new ObjectInputStream(this.getConnection().getInputStream()));\n\t\t} catch (final IOException e) {}\n\t}", "private static AOutput<ByteBuffer> export(final Consumer<StreamFinishedEvent> listener,\n final AOutput<ByteBuffer> stream) {\n return AOutputProxyFactory.createProxy(Vat.current(), CountingOutput.countIfNeeded(stream, listener));\n }", "public void OnFileIncoming(int length);", "public interface ByteHandler {\n\n /**\n * Method to serialize any byte-chunk.\n *\n * @param toSerialize byte to be serialized\n * @return result of the serialization\n */\n OutputStream serialize(OutputStream toSerialize);\n\n /**\n * Method to deserialize any byte-chunk.\n *\n * @param toDeserialize to deserialize\n * @return result of the deserialization\n */\n InputStream deserialize(InputStream toDeserialize);\n\n /**\n * Method to retrieve a new instance.\n *\n * @return new instance\n */\n ByteHandler getInstance();\n}", "public interface StreamAlgorithm{\n \n \n /**\n * Return the stream content-length. If the content-length wasn't parsed,\n * return -1.\n */\n public int contentLength();\n \n \n /**\n * Return the stream header length. The header length is the length between\n * the start of the stream and the first occurance of character '\\r\\n' .\n */\n public int headerLength();\n \n \n /**\n * Allocate a <code>ByteBuffer</code>\n * @param useDirect allocate a direct <code>ByteBuffer</code>.\n * @param useView allocate a view <code>ByteBuffer</code>.\n * @param size the size of the newly created <code>ByteBuffer</code>.\n * @return a new <code>ByteBuffer</code>\n */\n public ByteBuffer allocate(boolean useDirect, boolean useView, int size);\n \n \n /**\n * Before parsing the bytes, initialize and prepare the algorithm.\n * @param byteBuffer the <code>ByteBuffer</code> used by this algorithm\n * @return <code>ByteBuffer</code> used by this algorithm\n */\n public ByteBuffer preParse(ByteBuffer byteBuffer);\n \n \n /**\n * Parse the <code>ByteBuffer</code> and try to determine if the bytes\n * stream has been fully read from the <code>SocketChannel</code>.\n * @paran byteBuffer the bytes read.\n * @return true if the algorithm determines the end of the stream.\n */\n public boolean parse(ByteBuffer byteBuffer);\n \n \n /**\n * After parsing the bytes, post process the <code>ByteBuffer</code> \n * @param byteBuffer the <code>ByteBuffer</code> used by this algorithm\n * @return <code>ByteBuffer</code> used by this algorithm\n */\n public ByteBuffer postParse(ByteBuffer byteBuffer); \n \n \n /**\n * Recycle the algorithm.\n */\n public void recycle();\n \n \n /**\n * Rollback the <code>ByteBuffer</code> to its previous state in case\n * an error as occured.\n */\n public ByteBuffer rollbackParseState(ByteBuffer byteBuffer); \n \n \n /**\n * The <code>Handler</code> associated with this algorithm.\n */\n public Handler getHandler();\n\n \n /**\n * Set the <code>SocketChannel</code> used by this algorithm\n */\n public void setSocketChannel(SocketChannel socketChannel);\n \n \n /**\n * Set the <code>port</code> this algorithm is used.\n */\n public void setPort(int port);\n \n \n /**\n * Return the port\n */\n public int getPort();\n \n \n /**\n * Return the class responsible for handling OP_READ.\n */\n public Class getReadTask(SelectorThread selectorThread);\n}", "public PushStream createPushStream(String fname, int mode) throws IOException {\n\t\tSocket socket = null;\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t\tInputStream in = socket.getInputStream();\n\t\t\tDataOutputStream out = new DataOutputStream(socket.getOutputStream());\n\t\t\tProtocolSupport.send(\"host:transport:\" + serial, in, out);\n\n\t\t\tProtocolSupport.send(\"sync:\", in, out);\n\t\t\tout.writeBytes(\"SEND\");\n\t\t\tString target = fname + \",\" + mode;\n\t\t\tout.writeInt(Integer.reverseBytes(target.length()));\n\t\t\tout.writeBytes(target);\n\t\t\tout.flush();\n\t\t\treturn new PushStream(out);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}", "private Handler<org.vertx.java.core.http.HttpClientResponse> createResponseHandler(Env env, Callback handler) {\n return new Handler<org.vertx.java.core.http.HttpClientResponse>(env, handler, new ArgumentModifier<org.vertx.java.core.http.HttpClientResponse, HttpClientResponse>() {\n @Override\n public HttpClientResponse modify(org.vertx.java.core.http.HttpClientResponse response) {\n return new HttpClientResponse(response);\n }\n });\n }", "@Override\n protected Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "Handler getHandler(Service service, HandlerFactory handlerFactory) {\n String serializationName = \"PROTOBUF\";\n Driver.Serialization serialization;\n try {\n serialization = Driver.Serialization.valueOf(serializationName);\n } catch (Exception e) {\n LOG.error(\"Unknown message serialization type for \" + serializationName);\n throw e;\n }\n\n Handler handler = handlerFactory.getHandler(service, serialization);\n LOG.info(\"Instantiated \" + handler.getClass() + \" for Quark Server\");\n\n return handler;\n }", "public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }", "SignatureSink createSignatureSink();", "@Override\n\tpublic void streamingServiceStarted(int arg0) {\n\t\t\n\t}", "private void setupStreams() {\n\t\ttry {\n\t\t\tthis.out = new ObjectOutputStream(this.sock.getOutputStream());\n\t\t\tthis.out.flush();\n\t\t\tthis.in = new ObjectInputStream(this.sock.getInputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public NettyHttpFileHandler() {\r\n synchronized(_lock) {\r\n if (mimeTypesMap == null) {\r\n InputStream is = this.getClass().getResourceAsStream(\"/server.mime.types\");\r\n if (is != null) {\r\n mimeTypesMap = new MimetypesFileTypeMap(is);\r\n } else {\r\n \tlogger.debug(\"Cannot load mime types!\");\r\n }\r\n }\r\n }\r\n }", "public void processStreamInput() {\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "public InputDataHandler() {}", "SFTPv3FileHandle(SFTPv3Client client, byte[] h)\r\n\t{\r\n\t\tthis.client = client;\r\n\t\tthis.fileHandle = h;\r\n\t}", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n private final int requestId;\n\n private final SettableFuture<com.baichen.jraft.transport.RpcResult> future;\n\n private RepeatableTimer.TimerTask timeout;\n\n private long startTime;\n\n public PendingRequest(T request, int requestId, SettableFuture<com.baichen.jraft.transport.RpcResult> future) {\n this.request = request;\n this.requestId = requestId;\n this.future = future;\n }\n\n public long getStartTime() {\n return startTime;\n }\n\n public void setStartTime(long startTime) {\n this.startTime = startTime;\n }\n\n public void setTimeout(RepeatableTimer.TimerTask timeout) {\n this.timeout = timeout;\n }\n\n public RepeatableTimer.TimerTask getTimeout() {\n return timeout;\n }\n\n public T getRequest() {\n return request;\n }\n\n public int getRequestId() {\n return requestId;\n }\n\n public SettableFuture<com.baichen.jraft.transport.RpcResult> getFuture() {\n return future;\n }\n }\n}", "ByteHandler getByteHandler();", "boolean streamXML(String path,\n ContentHandler contentHandler,\n LexicalHandler lexicalHandler)\n throws SAXException, ProcessingException;", "private static InputStream createStream(final TachyonFile file, final ReadType readType)\n throws IOException {\n return RemoteBlockInStreams.create(file, readType, 0);\n }", "void setURLStreamHandler(String protocol, URLStreamHandler handler) {\n handlers.put(protocol, handler);\n }", "OutputStream getOutputStream();", "public Hello(Handler handler){\n this.handler = handler;\n }", "@Override\n public FileReader handler(Handler<Buffer> handler) {\n this.dataHandler = handler;\n return this;\n }", "public static final Spooler create(LogMoniker dir, ConnectionHandler handler, ConnectionLogger logger, InputStream in, OutputStream out) {\n return new Spooler(handler, logger, handler.getId() + \"_spooler_\" + dir.getString(), in, out);\n }", "public void handleClient(InputStream inFromClient, OutputStream outToClient);", "@Inject\n public StreamingHandler(final MediaService mediaService, final TransportService transportService) {\n this.mediaService = mediaService;\n this.transportService = transportService;\n }", "public abstract void enableStreamFlow();", "public static <V extends Object> StreamParameter<V, StreamAccessParams<V, StreamData>, StreamData> newSP(\n Application app, Direction direction, StdIOStream stream, String prefix, String name, V value, int hashCode,\n ParameterMonitor monitor) {\n StreamAccessParams<V, StreamData> sap;\n sap = StreamAccessParams.constructStreamAP(app, direction, value, hashCode);\n return new StreamParameter(sap, DataType.STREAM_T, direction, stream, prefix, name, monitor);\n }", "public interface BackPressuredWriteStream<T> extends WriteStream<T> {\n\n static <T> BackPressuredWriteStream create(Handler<T> writeHandler) {\n return new BackPressuredWriteStreamImpl<T>(writeHandler);\n }\n\n static <T> BackPressuredWriteStream createThrottled(Handler<T> writeHandler, long quotaPeriod, int quota, String persistentQuotaTimeFile, Vertx vertx) {\n return new ThrottleStreamImpl(writeHandler, quotaPeriod, quota, persistentQuotaTimeFile, vertx);\n }\n\n void drop();\n\n long getQueueSize();\n}", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMethod(), responseObserver);\n }", "StreamConnectionIO(Mux mux, OutputStream out, InputStream in) {\n\tsuper(mux);\n\tthis.out = out;\n//\tthis.out = new BufferedOutputStream(out);\n\tthis.in = in;\n\n\toutChannel = newChannel(out);\n\tinChannel = newChannel(in);\n sendQueue = new LinkedList<Buffer>();\n }", "public COSInputStream createInputStream() throws IOException {\n/* 236 */ return this.stream.createInputStream();\n/* */ }", "IHandler next();", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request, responseObserver);\n }", "protected void sequence_BasicSourceStreamHandler(ISerializationContext context, BasicSourceStreamHandler semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "Object create(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "@Override\n public Single<StreamingHttpResponse> handle(HttpServiceContext ctx,\n StreamingHttpRequest request,\n StreamingHttpResponseFactory responseFactory) {\n request.context().put(CLIENT_CTX, request.headers().get(header(CLIENT_CTX)));\n request.context().put(CLIENT_FILTER_OUT_CTX, request.headers().get(header(CLIENT_FILTER_OUT_CTX)));\n // Set server-side values:\n request.context().put(SERVER_FILTER_IN_CTX, value(SERVER_FILTER_IN_CTX));\n request.context().put(SERVER_FILTER_IN_TRAILER_CTX, value(SERVER_FILTER_IN_TRAILER_CTX));\n return delegate().handle(ctx, request, responseFactory).map(response -> {\n HttpHeaders headers = response.headers();\n // Take the first two values from context:\n headers.set(header(SERVER_FILTER_IN_CTX),\n requireNonNull(response.context().get(SERVER_FILTER_IN_CTX)));\n headers.set(header(SERVER_CTX), requireNonNull(response.context().get(SERVER_CTX)));\n // Set the last value explicitly:\n assertThat(response.context().containsKey(SERVER_FILTER_OUT_CTX), is(false));\n headers.set(header(SERVER_FILTER_OUT_CTX), value(SERVER_FILTER_OUT_CTX));\n\n // For Trailers-Only response put everything into headers:\n if (headers.contains(GRPC_STATUS)) {\n setTrailers(response.context(), headers);\n return response;\n }\n return response.transform(new StatelessTrailersTransformer<Buffer>() {\n @Override\n protected HttpHeaders payloadComplete(HttpHeaders trailers) {\n setTrailers(response.context(), trailers);\n return trailers;\n }\n });\n });\n }", "public EchoClientHandler()\n {\n String data = \"hello zhang kylin \" ;\n firstMessage = Unpooled.buffer(2914) ;\n firstMessage.writeBytes(data.getBytes()) ;\n }", "public void testFlush_NoOutputStream() {\n StreamHandler h = new StreamHandler();\n h.flush();\n }", "public Stream stream() {\n Preconditions.checkState(prepared);\n Preconditions.checkState(!closed);\n return new Stream();\n }", "public PulseAudioStream createStream(int streamIndex, FormatControl formatControl) {\n return new PulseAudioStream(formatControl);\n }", "public StAX2SAX(ContentHandler handler) {\n this.handler = handler;\n this.lhandler = (handler instanceof LexicalHandler) ?\n (LexicalHandler) handler :\n NO_LEXICAL_HANDLER ;\n this.xef = XMLInputFactory.newInstance();\n }", "@Override\n protected Callback<RestResponse> toRestResponseCallback(Callback<StreamResponse> callback, ServerResourceContext context)\n {\n return new AttachmentHandlingStreamToRestResponseCallbackAdapter(callback, context);\n }", "protected void handlerAdded0(ChannelHandlerContext ctx) throws Exception {}", "public yandex.cloud.api.operation.OperationOuterClass.Operation create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMethod(), getCallOptions(), request);\n }", "public interface StreamReceiver{\r\n\t/**\r\n\t * Writes an array of bytes to the object holding one end of the pipe.\r\n\t * \r\n\t * @param b The byte array to be written.\r\n\t */\r\n\tpublic abstract void write(byte[] b);\r\n\t\r\n}", "abstract AbstractStreamingAnalyticsConnection createStreamsConnection()\n throws IOException;", "protected OutputStream _createDataOutputWrapper(DataOutput out)\n/* */ {\n/* 1520 */ return new DataOutputAsStream(out);\n/* */ }", "private AuctionFileHandler()\n {\n }", "protected void create(boolean stream) throws IOException {\n if(!stream)\n throw new IOException(\"Datagram socket not implemented!\");\n }" ]
[ "0.6169144", "0.5975664", "0.5858012", "0.5779613", "0.5685318", "0.56722826", "0.56370693", "0.55826044", "0.5582359", "0.5522097", "0.5490319", "0.5448207", "0.5419214", "0.54160076", "0.53992504", "0.5390173", "0.5316555", "0.5315309", "0.5256592", "0.5256548", "0.5247418", "0.52373916", "0.5233152", "0.5228765", "0.52126676", "0.5204491", "0.5198999", "0.51904637", "0.51887095", "0.5180145", "0.5173399", "0.51714486", "0.5167257", "0.5161552", "0.5155854", "0.51438457", "0.51218134", "0.50970566", "0.50954175", "0.5079683", "0.50766945", "0.50766516", "0.50710845", "0.5065965", "0.5064067", "0.50580347", "0.50465053", "0.5043499", "0.504046", "0.5038914", "0.5005191", "0.50048447", "0.5001477", "0.49992096", "0.49876684", "0.49873826", "0.4984492", "0.49816847", "0.4972163", "0.49605623", "0.49569458", "0.49569458", "0.4952399", "0.49428135", "0.49426362", "0.49416107", "0.49362132", "0.49361703", "0.4930167", "0.492058", "0.49202734", "0.49132955", "0.49100477", "0.4908864", "0.4907464", "0.49067092", "0.4899863", "0.48988745", "0.48973322", "0.4894457", "0.48875692", "0.48849154", "0.48811156", "0.48804834", "0.48786938", "0.4877542", "0.48772112", "0.48748344", "0.4874306", "0.4873089", "0.4871386", "0.48656967", "0.48420388", "0.4841848", "0.48294017", "0.48250994", "0.48241612", "0.48172235", "0.4815461", "0.48094392" ]
0.7732112
0
/ Create stream handler.
public SocketHandler createSocketHandler (String host, int port) { SocketHandler socketHandler = null; try { socketHandler = new SocketHandler(host, port); } catch (SecurityException | IOException e) { e.printStackTrace(); } return socketHandler; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "CreateHandler()\n {\n }", "protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }", "default Handler asHandler() {\n return new HandlerBuffer(this);\n }", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "public Http2MultiplexHandler(ChannelHandler inboundStreamHandler) {\n/* 115 */ this(inboundStreamHandler, (ChannelHandler)null);\n/* */ }", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "public final Http2FrameStream newStream() {\n/* 69 */ Http2FrameCodec codec = this.frameCodec;\n/* 70 */ if (codec == null) {\n/* 71 */ throw new IllegalStateException(StringUtil.simpleClassName(Http2FrameCodec.class) + \" not found. Has the handler been added to a pipeline?\");\n/* */ }\n/* */ \n/* 74 */ return codec.newStream();\n/* */ }", "private NettyServerHandler createHandler(ServerTransportListener transportListener) {\n return NettyServerHandler.newHandler(\n transportListener, streamTracerFactories, maxStreams,\n flowControlWindow, maxHeaderListSize, maxMessageSize,\n keepAliveTimeInNanos, keepAliveTimeoutInNanos,\n maxConnectionIdleInNanos,\n maxConnectionAgeInNanos, maxConnectionAgeGraceInNanos,\n permitKeepAliveWithoutCalls, permitKeepAliveTimeInNanos);\n }", "public GenericHandler() {\n\n }", "DataStreams createDataStreams();", "ByteHandler getInstance();", "long createBidirectionalStream(CronetBidirectionalStream caller,\n long urlRequestContextAdapter, boolean sendRequestHeadersAutomatically,\n boolean trafficStatsTagSet, int trafficStatsTag, boolean trafficStatsUidSet,\n int trafficStatsUid, long networkHandle);", "protected void sequence_DEFINE_DefinitionStream_STREAM(ISerializationContext context, DefinitionStream semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "OutputStream createStream(String location);", "BasicSourceStreamHandlers getBasic_ss_handlers();", "public interface S3Handler extends S3ObjectStreaming {\n\n /**\n * Called after a new instance has been created.\n * <p>\n * <i>IMPORTANT</i>: Your S3Handler must use this class, the S3HandlerService will call it.\n *\n * @param desc\n * @throws NuxeoException\n * @since 8.2\n */\n public void initialize(S3HandlerDescriptor desc) throws NuxeoException;\n\n /**\n * Called when the S3Handler is removed. Notice that this should not happen very often. Most of the time, if not\n * every time, S3HandlerService creates and initializes the contributed handles at startup and releases them when\n * the server is shut down.\n *\n * @since 8.2\n */\n public void cleanup();\n\n /**\n * The handler uses the bucket as set in the S3HandlerDescriptor at initialization time. But this can be modified\n * dynamically.\n * <p>\n * Notice that an easy way to handle different buckets on the same S3 instance is to contribute different S3Handler\n * in the XML. This way, there is no need to switch buckets, just use the correct handler.\n *\n * @param inBucket\n * @since 8.2\n */\n public void setBucket(String inBucket);\n\n /**\n * @return the AmazonS3 instance created for this handler\n * @since 8.2\n */\n public AmazonS3 getS3();\n\n /**\n * Uploads inFile to S3, using the \"Current bucket\"\n *\n * @param inKey\n * @param inFile\n * @return true if the file could be uploaded with no error\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean sendFile(String inKey, File inFile) throws NuxeoException;\n\n /**\n * Downloads the file from S3 using the \"current bucket\", saving it to inDestFile\n * <p>\n * <code>fileName</code> should be optional (not required by the interface)\n *\n * @param inKey\n * @param inDestFile\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, File inDestFile);\n\n /**\n * Downloads the file from S3 using the \"current bucket\". Should return\n * a temporary blob (becomes permanent if stored in a document)\n *\n * @param inKey\n * @param inFileName\n * @return a Blob of the downloaded file\n * @throws NuxeoException\n * @since 8.2\n */\n public Blob downloadFile(String inKey, String inFileName);\n\n /**\n * Get a SequenceInputStream to the object. The goal of using a SequenceInputStream is to avoid time out while\n * reading large, big objects.\n * <br>\n * pieceSize is the size in bytes for each sequential stream. It set the number of streams created (object size /\n * pieceSize). If 0, a default value is used.\n * Streams are open/close one after the other.\n * <br>\n * The caller can call close() any time, this will close all the streams.\n * <br>\n * See S3ObjectSequentialStream for more info.\n * \n * @param key\n * @param pieceSize\n * @return the SequenceInputStream\n * @throws IOException\n * @since 2021.35\n */\n public static long DEFAULT_PIECE_SIZE = 100 * 1024 * 1024;\n\n /**\n * @see S3ObjectStreaming#getSequenceInputStream(String, long)\n */\n public SequenceInputStream getSequenceInputStream(String key, long pieceSize) throws IOException;\n\n /**\n * @see S3ObjectStreaming#readBytes(String, long, long)\n */\n public byte[] readBytes(String key, long start, long len) throws IOException;\n\n /**\n * Deletes the file from S3 using the \"current bucket\", returns true if succesful\n *\n * @param inKey\n * @return\n * @throws NuxeoException\n * @since 8.2\n */\n public boolean deleteFile(String inKey) throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param objectKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inKey, int durationInSeconds, String contentType, String contentDisposition)\n throws NuxeoException;\n\n /**\n * Builds a temporary signed URL for the object and returns it.\n * <p>\n * Uses <code>inBucket</code>. If it is empty, uses the \"current bucket\"\n * <p>\n * If <code>durationInSeconds</code> is <= 0, the duration set in the XML configuration is used (or the default\n * duration)\n * <p>\n * The interface allows <code>contentType</code> and <code>contentDisposition</code> to be empty. But it is\n * recommended to set them to make sure the is no ambiguity when the URL is used (a key without a file extension for\n * example)\n *\n * @param inBucket\n * @param inKey\n * @param durationInSeconds\n * @param contentType\n * @param contentDisposition\n * @return the URL to the file on S3\n * @throws NuxeoException\n * @since 8.2\n */\n public String buildPresignedUrl(String inBucket, String inKey, int durationInSeconds, String contentType,\n String contentDisposition) throws NuxeoException;\n\n /**\n * Returns true if the key exists in the current bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inBucket\n * @param inKey\n * @return true if the key exists in the \"current bucket\"\n * @since 8.2\n */\n public boolean existsKeyInS3(String inBucket, String inKey);\n\n /**\n * Returns true if the key exists in the bucket.\n * <p>\n * <b>IMPORTANT</b>: This method should <i>never</i> uses a CacheForKeyExists, and always requests the key on S3\n *\n * @param inKey\n * @return true if the key exists in the bucket\n * @since 8.2\n */\n public boolean existsKeyInS3(String inKey);\n\n /**\n * Returns true if the key exists on S3 (using the \"current bucket\"), and should first check in the\n * CacheForExistsKey (if the configuration allows usage of the cache)\n *\n * @param inKey\n * @return true is the key exists on S3. May use the cache\n * @since 8.2\n */\n public boolean existsKey(String inKey);\n\n /**\n * Returns true if the key exists on S3, in the bucket, and should first check in the CacheForExistsKey (if the\n * Configuration allows usage of the cache)\n *\n * @param bucket\n * @param inKey\n * @return\n * @since 8.2\n */\n public boolean existsKey(String bucket, String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself,\n * as returned by AWS SDK\n * \n * @param inKey\n * @return\n * @since TODO\n */\n public ObjectMetadata getObjectMetadata(String inKey);\n\n /**\n * Gets the object metadata without fetching the object itself.\n * Values returned are whatever is stored as system metadata,\n * such as \"Content-Type\", \"Content-Length\", \"ETag\", ...\n * _plus_ the following properties:\n * <ul>\n * <li>\"bucket\": the bucket name (same as the one defined for the S3Handler)</li>\n * <li>\"objectKey\": the object key (same as the inKey parameter)</li>\n * <li>\"userMetadata\": An object holding the user metadata ({} if no user metadata). All values are String.</li>\n * </ul>\n * If AWS returns a \"not found\" error, the method returns null and adds a WARN to the log. Any other error is thrown\n * \n * @param inKey\n * @return a JsonNode of all the metadata, including userMetadata\n * @throws JsonProcessingException\n * @since 2.0\n */\n public JsonNode getObjectMetadataJson(String inKey) throws JsonProcessingException;\n\n /**\n * Return the current bucket\n *\n * @return the current bucket\n * @since 8.2\n */\n public String getBucket();\n\n /**\n * returns the default duration used to build temp. signed URLs\n *\n * @return the default duration used to build temp. signed URLs\n * @since 8.2\n */\n public int getSignedUrlDuration();\n\n /**\n * Just a convenient method, saving one line of code (getting the service)\n *\n * @param name\n * @return the S3Handler contributed with this name, null if not found\n * @since 8.2\n */\n public static S3Handler getS3Handler(String name) {\n\n S3HandlerService s3HandlerService = Framework.getService(S3HandlerService.class);\n\n if (StringUtils.isBlank(name)) {\n name = Constants.DEFAULT_HANDLER_NAME;\n }\n\n return s3HandlerService.getS3Handler(name);\n\n }\n\n /**\n * Generic method used to build a message when an error is thrown by AWS\n *\n * @param e\n * @return a string describing the error\n * @since 8.2\n */\n public static String buildDetailedMessageFromAWSException(Exception e) {\n\n String message = \"\";\n\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n message = \"Caught an AmazonServiceException, which \" + \"means your request made it \"\n + \"to Amazon S3, but was rejected with an error response\" + \" for some reason.\";\n message += \"\\nError Message: \" + ase.getMessage();\n message += \"\\nHTTP Status Code: \" + ase.getStatusCode();\n message += \"\\nAWS Error Code: \" + ase.getErrorCode();\n message += \"\\nError Type: \" + ase.getErrorType();\n message += \"\\nRequest ID: \" + ase.getRequestId();\n\n } else if (e instanceof AmazonClientException) {\n AmazonClientException ace = (AmazonClientException) e;\n message = \"Caught an AmazonClientException, which \" + \"means the client encountered \"\n + \"an internal error while trying to \" + \"communicate with S3, \"\n + \"such as not being able to access the network.\";\n message += \"\\nError Message: \" + ace.getMessage();\n\n } else {\n message = e.getMessage();\n }\n\n return message;\n }\n\n /**\n * Generic helper telling the caller if an error catched is a \"Missing Key on S3\" error\n *\n * @param e\n * @return true if the error is \"MIssing Key\" error\n * @since 8.2\n */\n public static boolean errorIsMissingKey(AmazonClientException e) {\n if (e instanceof AmazonServiceException) {\n AmazonServiceException ase = (AmazonServiceException) e;\n return (ase.getStatusCode() == 404) || \"NoSuchKey\".equals(ase.getErrorCode())\n || \"Not Found\".equals(e.getMessage());\n }\n return false;\n }\n\n}", "public interface IStreamFactory{\n Closeable getStream(Query q);\n }", "public ClientStream delegate() {\n return newStream;\n }", "public ClientHandler(InputStream inputFromClient) {\n try {\n this.inputFromClient = new ObjectInputStream(inputFromClient);\n } catch (IOException e) {\n System.out.println(\"Could not create ObjectInputStream from ClientHandler\");\n }\n }", "public Http2MultiplexHandler(ChannelHandler inboundStreamHandler, ChannelHandler upgradeStreamHandler) {\n/* 127 */ this.inboundStreamHandler = (ChannelHandler)ObjectUtil.checkNotNull(inboundStreamHandler, \"inboundStreamHandler\");\n/* 128 */ this.upgradeStreamHandler = upgradeStreamHandler;\n/* */ }", "protected abstract OutputStream getStream() throws IOException;", "public ConsoleHandler createConsoleHandler () {\r\n\t\t\t\r\n\t\tConsoleHandler consoleHandler = null;\r\n\t\t\t\r\n\t\ttry {\r\n\t\t \t\r\n\t\t\tconsoleHandler = new ConsoleHandler();\r\n\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t \r\n\t\t return consoleHandler;\r\n\t}", "Handle newHandle();", "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}", "GenericSink createGenericSink();", "public void testClose_NoOutputStream() {\n StreamHandler h = new StreamHandler();\n h.close();\n }", "<R> Streamlet<R> newSource(IRichSpout spout);", "protected StreamParser()\n {\n }", "@SuppressWarnings(\"unchecked\")\n private <T extends Event> Stream<T> makeStream(StreamMaker sm, Class<T> type) {\n\n Stream<T> stream = app.createStream(type);\n stream.setName(sm.getName());\n\n if (sm.getKeyFinder() != null)\n stream.setKey((KeyFinder<T>) sm.getKeyFinder());\n else if (sm.getKeyDescriptor() != null)\n stream.setKey(sm.getKeyDescriptor());\n\n return stream;\n }", "ResponseHandler createResponseHandler();", "public FStream newStream(String name, ISource source) {\n\t\tFStream n = new FStream(name, this, source);\n\t\t\n\t\t_graph.addVertex(n);\n\t\t\n\t\treturn n;\n\t}", "private static AInput<ByteBuffer> export(final Consumer<StreamFinishedEvent> listener,\n final AInput<ByteBuffer> stream) {\n return AInputProxyFactory.createProxy(Vat.current(), CountingInput.countIfNeeded(stream, listener));\n }", "public interface IStreamAwareScopeHandler extends IScopeHandler {\r\n\t/**\r\n\t * A broadcast stream starts being published. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamPublishStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * A broadcast stream starts being recorded. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream \r\n\t */\r\n\tpublic void streamRecordStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastClose(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberStart(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberClose(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a playlist item plays.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t * @param isLive treu if live\r\n\t * TODO\r\n\t */\r\n\tpublic void streamPlaylistItemPlay(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, boolean isLive);\r\n\r\n\t/**\r\n\t * Notified when a playlist item stops.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t */\r\n\tpublic void streamPlaylistItemStop(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item pauses.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemPause(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item resumes.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemResume(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item seeks.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemSeek(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n}", "public PipedOutputStream() {\n }", "public abstract void stream(int port);", "Handler<Q, R> handler();", "static void serverHandlerImpl(InputStream inputStream,\n OutputStream outputStream,\n URI uri,\n SendResponseHeadersFunction sendResponseHeadersFunction)\n throws IOException\n {\n try (InputStream is = inputStream;\n OutputStream os = outputStream) {\n readAllBytes(is);\n\n String magicQuery = uri.getQuery();\n if (magicQuery != null) {\n int bodyIndex = Integer.valueOf(magicQuery);\n String body = BODIES[bodyIndex];\n byte[] bytes = body.getBytes(UTF_8);\n sendResponseHeadersFunction.apply(200, bytes.length);\n int offset = 0;\n // Deliberately attempt to reply with several relatively\n // small data frames ( each write corresponds to its own\n // data frame ). Additionally, yield, to encourage other\n // handlers to execute, therefore increasing the likelihood\n // of multiple different-stream related frames in the\n // client's read buffer.\n while (offset < bytes.length) {\n int length = Math.min(bytes.length - offset, 64);\n os.write(bytes, offset, length);\n os.flush();\n offset += length;\n Thread.yield();\n }\n } else {\n sendResponseHeadersFunction.apply(200, 1);\n os.write('A');\n }\n }\n }", "public interface ClientHandler {\r\n\r\n\t/**\r\n\t * Handle client.\r\n\t *\r\n\t * @param inFromClient the in from client\r\n\t * @param outToServer the out to server\r\n\t */\r\n\tpublic void handleClient(InputStream inFromClient, OutputStream outToServer);\r\n}", "public static AisPacketStream newStream() {\n return new AisPacketStreamImpl();\n }", "public FileHandler(byte[] data) {\n this.data = data;\n }", "void createHandler(final String handlerClassName);", "public static TwitterStream firehose(TwitterStreamConfiguration tws, \n TwitterStreamHandler handler) throws IOException, OAuthException {\n \n //build get params\n HttpParams getParams = new BasicHttpParams();\n if (tws.getCount() != null) getParams.setIntParameter(\"count\", tws.getCount());\n if (tws.isDelimited()) getParams.setParameter(\"delimited\", tws.getDelimited());\n //send request\n HttpRequestBase conn = buildConnection(FIREHOSE_URL, getParams, tws);\n return new TwitterStream(conn, handler);\n }", "public OutputStream createOutputStream() throws IOException {\n/* 213 */ return this.stream.createOutputStream();\n/* */ }", "private void createHandler()\r\n {\r\n serverHandler = new Handler(Looper.getMainLooper())\r\n {\r\n @Override\r\n public void handleMessage(Message inputMessage)\r\n {\r\n int percentage;\r\n switch (inputMessage.what)\r\n {\r\n case LISTENING:\r\n waiting.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Oczekiwanie na połączenie\");\r\n break;\r\n case CONNECTED:\r\n waiting.setVisibility(View.INVISIBLE);\r\n progress.setVisibility(View.VISIBLE);\r\n statusText.setText(\"Przesyłanie pliku\");\r\n break;\r\n case PROGRESS:\r\n percentage = (int) inputMessage.obj;\r\n progress.setProgress(percentage);\r\n break;\r\n case DONE:\r\n messageDialog(\"Przesyłanie zakończone!\", DIALOG_MODE_DONE);\r\n break;\r\n case LISTENING_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Nie udało się utworzyć gniazda\", DIALOG_MODE_ERROR);\r\n break;\r\n case SOCKET_ACCEPT_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd połączenia!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case EXTERNAL_STORAGE_ACCESS_FAILED:\r\n messageDialog(\"Brak dostępu do pamięci masowej!\\nPowrót\", DIALOG_MODE_ERROR);\r\n break;\r\n case FILE_TRANSFER_FAILED:\r\n if(acceptMessages)\r\n messageDialog(\"Wystąpił błąd podczas przesyłania danych!\\nPowrót\",\r\n DIALOG_MODE_ERROR);\r\n break;\r\n default:\r\n super.handleMessage(inputMessage);\r\n }\r\n }\r\n };\r\n }", "private void openStreams() {\n\t\ttry {\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().debug(\"Opening streams..\");\n\t\t\t// abrimos el stream de salida\n\t\t\tthis.setOutputStream(new ObjectOutputStream(this.getConnection().getOutputStream()));\n\t\t\t// abrimos el stream de entrada\n\t\t\tthis.setInputStream(new ObjectInputStream(this.getConnection().getInputStream()));\n\t\t} catch (final IOException e) {}\n\t}", "private static AOutput<ByteBuffer> export(final Consumer<StreamFinishedEvent> listener,\n final AOutput<ByteBuffer> stream) {\n return AOutputProxyFactory.createProxy(Vat.current(), CountingOutput.countIfNeeded(stream, listener));\n }", "public void OnFileIncoming(int length);", "public interface ByteHandler {\n\n /**\n * Method to serialize any byte-chunk.\n *\n * @param toSerialize byte to be serialized\n * @return result of the serialization\n */\n OutputStream serialize(OutputStream toSerialize);\n\n /**\n * Method to deserialize any byte-chunk.\n *\n * @param toDeserialize to deserialize\n * @return result of the deserialization\n */\n InputStream deserialize(InputStream toDeserialize);\n\n /**\n * Method to retrieve a new instance.\n *\n * @return new instance\n */\n ByteHandler getInstance();\n}", "public interface StreamAlgorithm{\n \n \n /**\n * Return the stream content-length. If the content-length wasn't parsed,\n * return -1.\n */\n public int contentLength();\n \n \n /**\n * Return the stream header length. The header length is the length between\n * the start of the stream and the first occurance of character '\\r\\n' .\n */\n public int headerLength();\n \n \n /**\n * Allocate a <code>ByteBuffer</code>\n * @param useDirect allocate a direct <code>ByteBuffer</code>.\n * @param useView allocate a view <code>ByteBuffer</code>.\n * @param size the size of the newly created <code>ByteBuffer</code>.\n * @return a new <code>ByteBuffer</code>\n */\n public ByteBuffer allocate(boolean useDirect, boolean useView, int size);\n \n \n /**\n * Before parsing the bytes, initialize and prepare the algorithm.\n * @param byteBuffer the <code>ByteBuffer</code> used by this algorithm\n * @return <code>ByteBuffer</code> used by this algorithm\n */\n public ByteBuffer preParse(ByteBuffer byteBuffer);\n \n \n /**\n * Parse the <code>ByteBuffer</code> and try to determine if the bytes\n * stream has been fully read from the <code>SocketChannel</code>.\n * @paran byteBuffer the bytes read.\n * @return true if the algorithm determines the end of the stream.\n */\n public boolean parse(ByteBuffer byteBuffer);\n \n \n /**\n * After parsing the bytes, post process the <code>ByteBuffer</code> \n * @param byteBuffer the <code>ByteBuffer</code> used by this algorithm\n * @return <code>ByteBuffer</code> used by this algorithm\n */\n public ByteBuffer postParse(ByteBuffer byteBuffer); \n \n \n /**\n * Recycle the algorithm.\n */\n public void recycle();\n \n \n /**\n * Rollback the <code>ByteBuffer</code> to its previous state in case\n * an error as occured.\n */\n public ByteBuffer rollbackParseState(ByteBuffer byteBuffer); \n \n \n /**\n * The <code>Handler</code> associated with this algorithm.\n */\n public Handler getHandler();\n\n \n /**\n * Set the <code>SocketChannel</code> used by this algorithm\n */\n public void setSocketChannel(SocketChannel socketChannel);\n \n \n /**\n * Set the <code>port</code> this algorithm is used.\n */\n public void setPort(int port);\n \n \n /**\n * Return the port\n */\n public int getPort();\n \n \n /**\n * Return the class responsible for handling OP_READ.\n */\n public Class getReadTask(SelectorThread selectorThread);\n}", "public PushStream createPushStream(String fname, int mode) throws IOException {\n\t\tSocket socket = null;\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t\tInputStream in = socket.getInputStream();\n\t\t\tDataOutputStream out = new DataOutputStream(socket.getOutputStream());\n\t\t\tProtocolSupport.send(\"host:transport:\" + serial, in, out);\n\n\t\t\tProtocolSupport.send(\"sync:\", in, out);\n\t\t\tout.writeBytes(\"SEND\");\n\t\t\tString target = fname + \",\" + mode;\n\t\t\tout.writeInt(Integer.reverseBytes(target.length()));\n\t\t\tout.writeBytes(target);\n\t\t\tout.flush();\n\t\t\treturn new PushStream(out);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}", "private Handler<org.vertx.java.core.http.HttpClientResponse> createResponseHandler(Env env, Callback handler) {\n return new Handler<org.vertx.java.core.http.HttpClientResponse>(env, handler, new ArgumentModifier<org.vertx.java.core.http.HttpClientResponse, HttpClientResponse>() {\n @Override\n public HttpClientResponse modify(org.vertx.java.core.http.HttpClientResponse response) {\n return new HttpClientResponse(response);\n }\n });\n }", "@Override\n protected Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "Handler getHandler(Service service, HandlerFactory handlerFactory) {\n String serializationName = \"PROTOBUF\";\n Driver.Serialization serialization;\n try {\n serialization = Driver.Serialization.valueOf(serializationName);\n } catch (Exception e) {\n LOG.error(\"Unknown message serialization type for \" + serializationName);\n throw e;\n }\n\n Handler handler = handlerFactory.getHandler(service, serialization);\n LOG.info(\"Instantiated \" + handler.getClass() + \" for Quark Server\");\n\n return handler;\n }", "public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }", "SignatureSink createSignatureSink();", "@Override\n\tpublic void streamingServiceStarted(int arg0) {\n\t\t\n\t}", "private void setupStreams() {\n\t\ttry {\n\t\t\tthis.out = new ObjectOutputStream(this.sock.getOutputStream());\n\t\t\tthis.out.flush();\n\t\t\tthis.in = new ObjectInputStream(this.sock.getInputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public NettyHttpFileHandler() {\r\n synchronized(_lock) {\r\n if (mimeTypesMap == null) {\r\n InputStream is = this.getClass().getResourceAsStream(\"/server.mime.types\");\r\n if (is != null) {\r\n mimeTypesMap = new MimetypesFileTypeMap(is);\r\n } else {\r\n \tlogger.debug(\"Cannot load mime types!\");\r\n }\r\n }\r\n }\r\n }", "public void processStreamInput() {\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "public InputDataHandler() {}", "SFTPv3FileHandle(SFTPv3Client client, byte[] h)\r\n\t{\r\n\t\tthis.client = client;\r\n\t\tthis.fileHandle = h;\r\n\t}", "public interface Stream<T> extends Lifecycle {\n\n PendingRequest<T> next(int requestId, T request);\n\n int getPendingRequestCount();\n\n ClientResponseObserver<T, RpcResult> newObserver();\n\n\n final class PendingRequest<T> {\n\n private final T request;\n\n private final int requestId;\n\n private final SettableFuture<com.baichen.jraft.transport.RpcResult> future;\n\n private RepeatableTimer.TimerTask timeout;\n\n private long startTime;\n\n public PendingRequest(T request, int requestId, SettableFuture<com.baichen.jraft.transport.RpcResult> future) {\n this.request = request;\n this.requestId = requestId;\n this.future = future;\n }\n\n public long getStartTime() {\n return startTime;\n }\n\n public void setStartTime(long startTime) {\n this.startTime = startTime;\n }\n\n public void setTimeout(RepeatableTimer.TimerTask timeout) {\n this.timeout = timeout;\n }\n\n public RepeatableTimer.TimerTask getTimeout() {\n return timeout;\n }\n\n public T getRequest() {\n return request;\n }\n\n public int getRequestId() {\n return requestId;\n }\n\n public SettableFuture<com.baichen.jraft.transport.RpcResult> getFuture() {\n return future;\n }\n }\n}", "ByteHandler getByteHandler();", "boolean streamXML(String path,\n ContentHandler contentHandler,\n LexicalHandler lexicalHandler)\n throws SAXException, ProcessingException;", "private static InputStream createStream(final TachyonFile file, final ReadType readType)\n throws IOException {\n return RemoteBlockInStreams.create(file, readType, 0);\n }", "void setURLStreamHandler(String protocol, URLStreamHandler handler) {\n handlers.put(protocol, handler);\n }", "OutputStream getOutputStream();", "public Hello(Handler handler){\n this.handler = handler;\n }", "@Override\n public FileReader handler(Handler<Buffer> handler) {\n this.dataHandler = handler;\n return this;\n }", "public static final Spooler create(LogMoniker dir, ConnectionHandler handler, ConnectionLogger logger, InputStream in, OutputStream out) {\n return new Spooler(handler, logger, handler.getId() + \"_spooler_\" + dir.getString(), in, out);\n }", "public void handleClient(InputStream inFromClient, OutputStream outToClient);", "@Inject\n public StreamingHandler(final MediaService mediaService, final TransportService transportService) {\n this.mediaService = mediaService;\n this.transportService = transportService;\n }", "public abstract void enableStreamFlow();", "public static <V extends Object> StreamParameter<V, StreamAccessParams<V, StreamData>, StreamData> newSP(\n Application app, Direction direction, StdIOStream stream, String prefix, String name, V value, int hashCode,\n ParameterMonitor monitor) {\n StreamAccessParams<V, StreamData> sap;\n sap = StreamAccessParams.constructStreamAP(app, direction, value, hashCode);\n return new StreamParameter(sap, DataType.STREAM_T, direction, stream, prefix, name, monitor);\n }", "public interface BackPressuredWriteStream<T> extends WriteStream<T> {\n\n static <T> BackPressuredWriteStream create(Handler<T> writeHandler) {\n return new BackPressuredWriteStreamImpl<T>(writeHandler);\n }\n\n static <T> BackPressuredWriteStream createThrottled(Handler<T> writeHandler, long quotaPeriod, int quota, String persistentQuotaTimeFile, Vertx vertx) {\n return new ThrottleStreamImpl(writeHandler, quotaPeriod, quota, persistentQuotaTimeFile, vertx);\n }\n\n void drop();\n\n long getQueueSize();\n}", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMethod(), responseObserver);\n }", "StreamConnectionIO(Mux mux, OutputStream out, InputStream in) {\n\tsuper(mux);\n\tthis.out = out;\n//\tthis.out = new BufferedOutputStream(out);\n\tthis.in = in;\n\n\toutChannel = newChannel(out);\n\tinChannel = newChannel(in);\n sendQueue = new LinkedList<Buffer>();\n }", "public COSInputStream createInputStream() throws IOException {\n/* 236 */ return this.stream.createInputStream();\n/* */ }", "IHandler next();", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request, responseObserver);\n }", "protected void sequence_BasicSourceStreamHandler(ISerializationContext context, BasicSourceStreamHandler semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "Object create(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "@Override\n public Single<StreamingHttpResponse> handle(HttpServiceContext ctx,\n StreamingHttpRequest request,\n StreamingHttpResponseFactory responseFactory) {\n request.context().put(CLIENT_CTX, request.headers().get(header(CLIENT_CTX)));\n request.context().put(CLIENT_FILTER_OUT_CTX, request.headers().get(header(CLIENT_FILTER_OUT_CTX)));\n // Set server-side values:\n request.context().put(SERVER_FILTER_IN_CTX, value(SERVER_FILTER_IN_CTX));\n request.context().put(SERVER_FILTER_IN_TRAILER_CTX, value(SERVER_FILTER_IN_TRAILER_CTX));\n return delegate().handle(ctx, request, responseFactory).map(response -> {\n HttpHeaders headers = response.headers();\n // Take the first two values from context:\n headers.set(header(SERVER_FILTER_IN_CTX),\n requireNonNull(response.context().get(SERVER_FILTER_IN_CTX)));\n headers.set(header(SERVER_CTX), requireNonNull(response.context().get(SERVER_CTX)));\n // Set the last value explicitly:\n assertThat(response.context().containsKey(SERVER_FILTER_OUT_CTX), is(false));\n headers.set(header(SERVER_FILTER_OUT_CTX), value(SERVER_FILTER_OUT_CTX));\n\n // For Trailers-Only response put everything into headers:\n if (headers.contains(GRPC_STATUS)) {\n setTrailers(response.context(), headers);\n return response;\n }\n return response.transform(new StatelessTrailersTransformer<Buffer>() {\n @Override\n protected HttpHeaders payloadComplete(HttpHeaders trailers) {\n setTrailers(response.context(), trailers);\n return trailers;\n }\n });\n });\n }", "public EchoClientHandler()\n {\n String data = \"hello zhang kylin \" ;\n firstMessage = Unpooled.buffer(2914) ;\n firstMessage.writeBytes(data.getBytes()) ;\n }", "public void testFlush_NoOutputStream() {\n StreamHandler h = new StreamHandler();\n h.flush();\n }", "public Stream stream() {\n Preconditions.checkState(prepared);\n Preconditions.checkState(!closed);\n return new Stream();\n }", "public PulseAudioStream createStream(int streamIndex, FormatControl formatControl) {\n return new PulseAudioStream(formatControl);\n }", "public StAX2SAX(ContentHandler handler) {\n this.handler = handler;\n this.lhandler = (handler instanceof LexicalHandler) ?\n (LexicalHandler) handler :\n NO_LEXICAL_HANDLER ;\n this.xef = XMLInputFactory.newInstance();\n }", "@Override\n protected Callback<RestResponse> toRestResponseCallback(Callback<StreamResponse> callback, ServerResourceContext context)\n {\n return new AttachmentHandlingStreamToRestResponseCallbackAdapter(callback, context);\n }", "protected void handlerAdded0(ChannelHandlerContext ctx) throws Exception {}", "public yandex.cloud.api.operation.OperationOuterClass.Operation create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMethod(), getCallOptions(), request);\n }", "public interface StreamReceiver{\r\n\t/**\r\n\t * Writes an array of bytes to the object holding one end of the pipe.\r\n\t * \r\n\t * @param b The byte array to be written.\r\n\t */\r\n\tpublic abstract void write(byte[] b);\r\n\t\r\n}", "abstract AbstractStreamingAnalyticsConnection createStreamsConnection()\n throws IOException;", "protected OutputStream _createDataOutputWrapper(DataOutput out)\n/* */ {\n/* 1520 */ return new DataOutputAsStream(out);\n/* */ }", "private AuctionFileHandler()\n {\n }", "protected void create(boolean stream) throws IOException {\n if(!stream)\n throw new IOException(\"Datagram socket not implemented!\");\n }" ]
[ "0.7732112", "0.6169144", "0.5975664", "0.5858012", "0.5779613", "0.5685318", "0.56722826", "0.56370693", "0.55826044", "0.5582359", "0.5522097", "0.5490319", "0.5448207", "0.5419214", "0.54160076", "0.53992504", "0.5390173", "0.5316555", "0.5315309", "0.5256592", "0.5256548", "0.5247418", "0.52373916", "0.5233152", "0.5228765", "0.52126676", "0.5204491", "0.5198999", "0.51904637", "0.51887095", "0.5173399", "0.51714486", "0.5167257", "0.5161552", "0.5155854", "0.51438457", "0.51218134", "0.50970566", "0.50954175", "0.5079683", "0.50766945", "0.50766516", "0.50710845", "0.5065965", "0.5064067", "0.50580347", "0.50465053", "0.5043499", "0.504046", "0.5038914", "0.5005191", "0.50048447", "0.5001477", "0.49992096", "0.49876684", "0.49873826", "0.4984492", "0.49816847", "0.4972163", "0.49605623", "0.49569458", "0.49569458", "0.4952399", "0.49428135", "0.49426362", "0.49416107", "0.49362132", "0.49361703", "0.4930167", "0.492058", "0.49202734", "0.49132955", "0.49100477", "0.4908864", "0.4907464", "0.49067092", "0.4899863", "0.48988745", "0.48973322", "0.4894457", "0.48875692", "0.48849154", "0.48811156", "0.48804834", "0.48786938", "0.4877542", "0.48772112", "0.48748344", "0.4874306", "0.4873089", "0.4871386", "0.48656967", "0.48420388", "0.4841848", "0.48294017", "0.48250994", "0.48241612", "0.48172235", "0.4815461", "0.48094392" ]
0.5180145
30
Adds data points to given DataSet for given data arrays.
public static void addDataPoints(DataSet aDataSet, double[] dataX, double[] dataY, double[] dataZ, String[] dataC) { // Get min length of staged data int xlen = dataX != null ? dataX.length : Integer.MAX_VALUE; int ylen = dataY != null ? dataY.length : Integer.MAX_VALUE; int zlen = dataZ != null ? dataZ.length : Integer.MAX_VALUE; int clen = dataC != null ? dataC.length : Integer.MAX_VALUE; int len = Math.min(xlen, Math.min(ylen, Math.min(zlen, clen))); if (len == Integer.MAX_VALUE) return; // Iterate over data arrays and add to DataSet for (int i = 0; i < len; i++) { Double valX = dataX != null ? dataX[i] : null; Double valY = dataY != null ? dataY[i] : null; Double valZ = dataZ != null ? dataZ[i] : null; String valC = dataC != null ? dataC[i] : null; DataPoint dataPoint = new DataPoint(valX, valY, valZ, valC); int index = aDataSet.getPointCount(); aDataSet.addPoint(dataPoint, index); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addData(double[][] data) {\n for (int i = 0; i < data.length; i++) {\n addData(data[i][0], data[i][1]);\n }\n }", "public void addData(DataPoint point)\n {\n data.add(point);\n }", "private void appendData() {\n XYDataset tempdata = getDataset();\n\n XYSeriesCollection originaldata = (XYSeriesCollection) chartpanel.getChart().getXYPlot().getDataset();\n XYSeriesCollection newdata = (XYSeriesCollection) getDataset();\n\n addToDataSet(newdata, originaldata);\n tempdata = missingSeries(newdata, originaldata);\n\n XYSeriesCollection foo = (XYSeriesCollection) tempdata;\n int n = foo.getSeriesCount();\n for (int i = 0; i < n; i++) {\n originaldata.addSeries(foo.getSeries(i));\n }\n nullMissingPoints((XYSeriesCollection) chartpanel.getChart().getXYPlot().getDataset());\n }", "private void addDataToXYSeries(final List<DateCounter> data, final XYSeries series)\n {\n int counter = INITIALIZE_DATA_COUNTER;\n //Iterating data and adding it to X and Y axises\n for (final DateCounter tempData : data)\n {\n series.add(counter, tempData.getCounter());\n counter++;\n }\n }", "public void setData(List<E> newDataSet) {\n\t\tdata.addAll(newDataSet);\n\t}", "public void addSeries(DataSeries aSeries) { _dataSet.addSeries(aSeries); }", "public void addPoint(double[] point);", "private static void fillDataset(Dataset d){\n try{\n\n BufferedReader in = new BufferedReader(new FileReader(\"src/points.txt\"));\n String str;\n while ((str = in.readLine()) != null){\n String[] tmp=str.split(\",\");\n d.addPoint(new Point(Double.parseDouble(tmp[0]), Double.parseDouble(tmp[1])));\n }\n in.close();\n }\n catch (IOException e){\n System.out.println(\"File Read Error\");\n }\n }", "private void addDataSet() {\n Log.d(TAG, \"addDataSet started\");\n ArrayList<PieEntry> yEntrys = new ArrayList<>();\n ArrayList<String> xEntrys = new ArrayList<>();\n\n for(int i = 0; i < yData.length; i++){\n yEntrys.add(new PieEntry(yData[i] , i));\n }\n\n for(int i = 1; i < xData.length; i++){\n xEntrys.add(xData[i]);\n }\n\n //Create the data set\n PieDataSet pieDataSet = new PieDataSet(yEntrys, \"Popularity stat\");\n pieDataSet.setSliceSpace(2);\n pieDataSet.setValueTextSize(12);\n pieDataSet.setValueTextColor(Color.WHITE);\n\n\n\n //Add colors to dataset\n ArrayList<Integer> colors = new ArrayList<>();\n colors.add(Color.BLUE);\n colors.add(Color.RED);\n colors.add(Color.GREEN);\n colors.add(Color.CYAN);\n colors.add(Color.YELLOW);\n colors.add(Color.MAGENTA);\n\n pieDataSet.setColors(colors);\n\n //Add legend to chart\n Legend legend = pieChart.getLegend();\n legend.setForm(Legend.LegendForm.DEFAULT);\n legend.setPosition(Legend.LegendPosition.ABOVE_CHART_CENTER);\n\n //Create pie data object\n PieData pieData = new PieData(pieDataSet);\n pieChart.setData(pieData);\n pieChart.invalidate();\n }", "@Override\n\tpublic void addSeries(final String title, final double[] xs,\n\t\t\tfinal double[] ys) {\n\t\tXYSeries series = new XYSeries(title, false, true);\n\t\tfor (int i = 0, n = Math.min(xs.length, ys.length); i < n; i++) {\n\t\t\tseries.add(xs[i], ys[i]);\n\t\t}\n\t\tthis.dataset.addSeries(series);\n\t}", "public void setData(float[] x, float[] y){\n insertData(x, y, true);\n }", "public void add(String name, XYDatasetWithGroups dataset) {\n assert names.size() == datasets.size();\n assert datasets.size() == maxCounts.size();\n \n names.add(name);\n datasets.add(dataset);\n maxCounts.add(calculateMaxCount(dataset));\n if (datasets.size() == 1) {\n assert active == null;\n int groupCount = dataset.getGroupCount();\n active = new boolean[groupCount];\n groupNames = new String[groupCount];\n for (int i = 0; i < groupCount; ++i) {\n active[i] = true;\n dataset.setGroupActive(i, true);\n groupNames[i] = dataset.getGroupName(i);\n }\n } else {\n assert active != null;\n assert datasets.size() > 1;\n assert dataset.getGroupCount() == active.length;\n for (int i = 0; i < groupNames.length; ++i) {\n assert groupNames[i].equals(dataset.getGroupName(i));\n }\n }\n \n assert names.size() == datasets.size();\n assert datasets.size() == maxCounts.size();\n }", "public void setDataSets(List<DataSet> dataSets)\n {\n this.dataSets = dataSets;\n }", "public void addDataPoint2( DataPoint dataPoint ) {\n\t\tif ( dataPoint.x < 50.0 ){\n\t\t\tsumX1 += dataPoint.x;\n\t\t\tsumX1X1 += dataPoint.x*dataPoint.x;\n\t\t\tsumX1Y += dataPoint.x*dataPoint.z;\n\t\t\tsumY += dataPoint.z;\n\t\t\tsumYY += dataPoint.z*dataPoint.z;\n\n\t\t\tif ( dataPoint.x > X1Max ) {\n\t\t\t\tX1Max = (int)dataPoint.x;\n\t\t\t}\n\t\t\tif ( dataPoint.z > YMax ) {\n\t\t\t\tYMax = (int)dataPoint.z;\n\t\t\t}\n\n\t\t\t// 把每個點的具體座標存入 ArrayList中,備用。\n\t\t\txyz[0] = (int)dataPoint.x+ \"\";\n\t\t\txyz[2] = (int)dataPoint.z+ \"\";\n\t\t\tif ( dataPoint.x !=0 && dataPoint.z != 0 ) {\n\t\t\t\ttry {\n\t\t\t\t\tlistX.add( numPoint, xyz[0] );\n\t\t\t\t\tlistZ.add( numPoint, xyz[2] );\n\t\t\t\t} \n\t\t\t\tcatch ( Exception e ) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t++numPoint;\n\t\t}\n\t\telse {\n\t\t\t sumX50 += dataPoint.x;\n\t\t \t sumX50X50 += dataPoint.x*dataPoint.x;\n\t\t\t sumX50Y50 += dataPoint.x*dataPoint.z;\n\t\t\t sumY50 += dataPoint.z;\n\t\t\t sumY50Y50 += dataPoint.z*dataPoint.z;\n\n\t\t\t if ( dataPoint.x > X50Max ) {\n\t\t\t\t X50Max = (int)dataPoint.x;\n\t\t\t }\n\t\t\t if ( dataPoint.z > Y50Max ) {\n\t\t\t\t Y50Max = (int)dataPoint.z;\n\t\t\t }\n\n\t\t\t // 把每個點的具體座標存入 ArrayList中,備用。\n\t\t\t xyz50[0] = (int)dataPoint.x+ \"\";\n\t\t\t xyz50[2] = (int)dataPoint.z+ \"\";\n\t\t\t if ( dataPoint.x !=0 && dataPoint.z != 0 ) {\n\t\t\t\t try {\n\t\t\t\t\t listX50.add( numPoint50, xyz50[0] );\n\t\t\t\t\t listZ50.add( numPoint50, xyz50[2] );\n\t\t\t\t } \n\t\t\t\t catch ( Exception e ) {\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t ++numPoint50;\n\t\t}\n\t\tcoefsValid = false;\n\t}", "public Dataset(final int dimensions, final int numPoints) {\n this(dimensions);\n\n for (int i = 0; i < numPoints; i++) {\n double[] point = new double[dimensions];\n addPoint(new DataPoint(point));\n }\n }", "protected void fillDataset(Dataset dataset) {\n dataset.getDefaultModel().getGraph().add(SSE.parseTriple(\"(<x> <p> 'Default graph')\")) ;\n \n Model m1 = dataset.getNamedModel(graph1) ;\n m1.getGraph().add(SSE.parseTriple(\"(<x> <p> 'Graph 1')\")) ;\n m1.getGraph().add(SSE.parseTriple(\"(<x> <p> 'ZZZ')\")) ;\n \n Model m2 = dataset.getNamedModel(graph2) ;\n m2.getGraph().add(SSE.parseTriple(\"(<x> <p> 'Graph 2')\")) ;\n m2.getGraph().add(SSE.parseTriple(\"(<x> <p> 'ZZZ')\")) ;\n calcUnion.add(m1) ;\n calcUnion.add(m2) ;\n }", "public void addAllSeriesTo(GMMDataset newDataset){\n int seriesCount = this.dataset.seriesCount();\n for (int i = 0; i < seriesCount; i++) {\n XYSeries xySeries = this.dataset.getSeries(i);\n boolean shapeVisible = this.dataset.shapeVisible(i);\n newDataset.addSeries(xySeries, shapeVisible);\n }\n this.dataset = newDataset;\n }", "public void add(float[] x, float[] y, String[] labels) {\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tpoints.add(new GPoint(x[i], y[i], labels[i]));\n\t\t}\n\t}", "public void setData(double[] points)\r\n/* 39: */ {\r\n/* 40: 29 */ if ((this.data.length != 0) && (this.data.length != points.length)) {\r\n/* 41: 30 */ System.err.println(\"setData in Spider got wrong number of data points\");\r\n/* 42: */ }\r\n/* 43: 32 */ this.data = points;\r\n/* 44: 33 */ repaint();\r\n/* 45: */ }", "public void attachData(double[] newData) {\n\t\tdouble[] newDataArray = new double[data.length + newData.length];\n\t\tSystem.arraycopy(data, 0, newDataArray, 0, data.length);\n\t\tSystem.arraycopy(newData, 0, newDataArray, data.length, newData.length);\n\t\tdata = newDataArray;\n\t}", "public void addPoints(List<Point2D> points);", "private static void insertTimeSeriesOneDim(final ScriptEngine engine,\r\n final List<DataSet> dataFiles) throws Exception {\r\n List<DataArray> list = new ArrayList<DataArray>();\r\n for (DataSet set : dataFiles) {\r\n list.add(set.getDataArray());\r\n }\r\n DataArray array = new DataArray();\r\n for (DataArray arr : list) {\r\n for (Data d : arr.getData()) {\r\n array.addData(d);\r\n }\r\n }\r\n insertTimeSeriesOneDim(engine, array);\r\n }", "public void add(float[] x, float[] y) {\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tpoints.add(new GPoint(x[i], y[i]));\n\t\t}\n\t}", "public void add(GPointsArray pts) {\n\t\tfor (int i = 0; i < pts.getNPoints(); i++) {\n\t\t\tpoints.add(new GPoint(pts.get(i)));\n\t\t}\n\t}", "@Override\r\n public void dataAdded(DataSet data) {\n rebuildColumns();\r\n }", "public void add(DataSample ds) {\n \tfloat dsAverage = 1.0f;\n \tDataSample s;\n \tfor (int i = 0; i < samples.size(); ++i) {\n \t\ts = samples.get(i);\n \t\tfloat v = averages.get(i);\n \t\tfloat t = compare(s, ds);\n \t\t\n \t\tv += t;\n \t\tdsAverage += t;\n \t\t\n \t\taverages.set(i, v);\n \t}\n \t\n \taverages.add(dsAverage);\n \tsamples.add(ds);\n }", "public void addPoints(int i, List<Point2D> points);", "public void add(GPoint[] pts) {\n\t\tfor (int i = 0; i < pts.length; i++) {\n\t\t\tpoints.add(new GPoint(pts[i]));\n\t\t}\n\t}", "public void addDataBufferAsRawDataPoints(RecordSet recordSet, byte[] dataBuffer, int recordDataSize, boolean doUpdateProgressBar) throws DataInconsitsentException {\n\t\tint dataBufferSize = GDE.SIZE_BYTES_INTEGER * recordSet.getNoneCalculationRecordNames().length;\n\t\tbyte[] convertBuffer = new byte[dataBufferSize];\n\t\tint[] points = new int[recordSet.getNoneCalculationRecordNames().length];\n\t\tString sThreadId = String.format(\"%06d\", Thread.currentThread().getId()); //$NON-NLS-1$\n\t\tint progressCycle = 0;\n\t\tVector<Integer> timeStamps = new Vector<Integer>(1, 1);\n\t\tif (doUpdateProgressBar) this.application.setProgress(progressCycle, sThreadId);\n\n\t\tint timeStampBufferSize = GDE.SIZE_BYTES_INTEGER * recordDataSize;\n\t\tbyte[] timeStampBuffer = new byte[timeStampBufferSize];\n\t\tif (!recordSet.isTimeStepConstant()) {\n\t\t\tSystem.arraycopy(dataBuffer, 0, timeStampBuffer, 0, timeStampBufferSize);\n\n\t\t\tfor (int i = 0; i < recordDataSize; i++) {\n\t\t\t\ttimeStamps.add(((timeStampBuffer[0 + (i * 4)] & 0xff) << 24) + ((timeStampBuffer[1 + (i * 4)] & 0xff) << 16) + ((timeStampBuffer[2 + (i * 4)] & 0xff) << 8)\n\t\t\t\t\t\t+ ((timeStampBuffer[3 + (i * 4)] & 0xff) << 0));\n\t\t\t}\n\t\t}\n\t\tlog.log(Level.FINE, timeStamps.size() + \" timeStamps = \" + timeStamps.toString()); //$NON-NLS-1$\n\n\t\tfor (int i = 0; i < recordDataSize; i++) {\n\t\t\tlog.log(Level.FINER, i + \" i*dataBufferSize+timeStampBufferSize = \" + i * dataBufferSize + timeStampBufferSize); //$NON-NLS-1$\n\t\t\tSystem.arraycopy(dataBuffer, i * dataBufferSize + timeStampBufferSize, convertBuffer, 0, dataBufferSize);\n\n\t\t\t//0=VoltageRx, 1=Voltage, 2=Current, 3=Capacity, 4=Power, 5=Energy, 6=CellBalance, 7=CellVoltage1, 8=CellVoltage2, 9=CellVoltage3, \n\t\t\t//10=CellVoltage4, 11=CellVoltage5, 12=CellVoltage6, 13=Revolution, 14=Efficiency, 15=Height, 16=Climb, 17=ValueA1, 18=ValueA2, 19=ValueA3,\n\t\t\t//20=AirPressure, 21=InternTemperature, 22=ServoImpuls In, 23=ServoImpuls Out, \n\t\t\t//M-LINK 24=valAdd00 25=valAdd01 26=valAdd02 27=valAdd03 28=valAdd04 29=valAdd05 30=valAdd06 31=valAdd07 32=valAdd08 33=valAdd09 34=valAdd10 35=valAdd11 36=valAdd12 37=valAdd13 38=valAdd14;\n\t\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\t\tpoints[j] = (((convertBuffer[0 + (j * 4)] & 0xff) << 24) + ((convertBuffer[1 + (j * 4)] & 0xff) << 16) + ((convertBuffer[2 + (j * 4)] & 0xff) << 8) + ((convertBuffer[3 + (j * 4)] & 0xff) << 0));\n\t\t\t}\n\n\t\t\tif (recordSet.isTimeStepConstant())\n\t\t\t\trecordSet.addNoneCalculationRecordsPoints(points);\n\t\t\telse\n\t\t\t\trecordSet.addNoneCalculationRecordsPoints(points, timeStamps.get(i) / 10.0);\n\n\t\t\tif (doUpdateProgressBar && i % 50 == 0) this.application.setProgress(((++progressCycle * 5000) / recordDataSize), sThreadId);\n\t\t}\n\t\tif (doUpdateProgressBar) this.application.setProgress(100, sThreadId);\n\t}", "public void addEntries(LineChart chart, int point)\n {\n LineData data = chart.getData();\n LineDataSet set;\n\n if(data != null)\n {\n set = data.getDataSetByIndex(0);\n\n if(set == null)\n {\n //Create a DataSet\n set = createSet();\n data.addDataSet(set);\n }\n\n //Add values\n data.addXValue(\"\");\n data.addEntry(new Entry(point, set.getEntryCount()), 0);\n\n //Notify the chart about the new data\n chart.notifyDataSetChanged();\n\n //Limit the number of visible entries\n chart.setVisibleXRange(0, 70);\n\n //Move to the last entry\n chart.moveViewToX(data.getXValCount() - 71);\n\n //Refresh the chart, used for dynamic data readings\n chart.invalidate();\n }\n }", "void fit(DataSet dataSet);", "public void addAllSeries(GMMDataset newDataset) {\n int seriesCount = newDataset.seriesCount();\n for (int i = 0; i < seriesCount; i++) {\n XYSeries xySeries = newDataset.getSeries(i);\n boolean shapeVisible = newDataset.shapeVisible(i);\n this.dataset.addSeries(xySeries, shapeVisible);\n }\n }", "private boolean addToDataSet(XYSeriesCollection newdata, XYSeriesCollection olddata) {\n\n boolean hasnewseries = false;\n // Loop over newdata.\n for (int nindex = 0; nindex < newdata.getSeriesCount(); nindex++) {\n XYSeries newseries = newdata.getSeries(nindex);\n String newname = (String) newseries.getKey();\n // Check if olddata has series with same key.\n XYSeries oldseries = null;\n try {\n oldseries = olddata.getSeries(newname);\n } catch (org.jfree.data.UnknownKeyException e) {\n hasnewseries = true;\n continue;\n }\n if (oldseries != null) {\n\n for (int n = 0; n < newseries.getItemCount(); n++) {\n // Remove possible {x,null} pairs.\n double xval = (Double) newseries.getX(n);\n int pos = oldseries.indexOf(xval);\n if ((pos > -1) && (oldseries.getY(pos) == null)) {\n oldseries.remove(pos);\n }\n oldseries.add(newseries.getDataItem(n));\n }\n }\n }\n return hasnewseries;\n }", "private static void add(List<Point> points, int param, double value, boolean measured) {\r\n points.add(new Point(param, value, measured));\r\n }", "private static List<Point> createConvergingDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 400);\r\n add(data, 5, 700);\r\n add(data, 10, 900);\r\n add(data, 15, 1000);\r\n add(data, 20, 1050);\r\n add(data, 25, 1060);\r\n add(data, 30, 1062);\r\n return data;\r\n }", "public void addAll(E[] es){\n for(E e: es) {\n \tmData.add(e);\n }\n notifyDataSetChanged();\n }", "private static XYDataset createDataset(Double[] x, Double[] y) {\n\t\tlogger.info(\"Creating Dataset\");\n\t\tXYSeries s1 = new XYSeries(Double.valueOf(1));\n\t\tif (x.length != y.length) {\n\t\t\tlogger.error(\"Error in createDataset of ScatterDialog. \" +\n\t\t\t\t\t\"Could not create a dataset for the scatter plot -- missing data\");\n\t\t\treturn null;\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tif (y[i] != null) {\n\t\t\t\ts1.add(x[i], y[i]);\n\t\t\t}\n\t\t}\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\tdataset.addSeries(s1);\n\t\treturn dataset;\n\t}", "private void setData() {\n LineDataSet set1 = new LineDataSet(valuesTemperature, \"Temperature\");\n\n set1.setColor(Color.RED);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n LineData data = new LineData(set1);\n\n // set data\n chartTemperature.setData(data);\n\n // get the legend (only possible after setting data)\n Legend l = chartTemperature.getLegend();\n l.setEnabled(true);\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesPressure, \"Pressure\");\n\n set1.setColor(Color.GREEN);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartPressure.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartPressure.getLegend();\n l.setEnabled(true);\n\n\n\n // create a dataset and give it a type\n set1 = new LineDataSet(valuesAltitude, \"Altitude\");\n\n set1.setColor(Color.BLUE);\n set1.setLineWidth(1.0f);\n set1.setDrawValues(false);\n set1.setDrawCircles(false);\n set1.setMode(LineDataSet.Mode.LINEAR);\n set1.setDrawFilled(false);\n\n // create a data object with the data sets\n data = new LineData(set1);\n\n // set data\n chartAltitude.setData(data);\n\n // get the legend (only possible after setting data)\n l = chartAltitude.getLegend();\n l.setEnabled(true);\n }", "public void addSeries(List<T1> xData, List<T2> yData, String seriesName){\n\t\tif(xData.size() != yData.size())\n\t\t\tthrow new IllegalArgumentException(\"X and Y data must have the same size\");\n\t\tXYChart.Series<T1, T2> series = new XYChart.Series<>();\n\t\tfor(int i=0; i<xData.size(); i++){\n\t\t\tseries.getData().add(new XYChart.Data<>(xData.get(i), yData.get(i)));\n\t\t}\n\t\tseries.setName(seriesName);\n\t\tplot.getData().add(series);\n\t}", "public void add(final int[] newSet) {\n for (int i: newSet) {\n add(i);\n }\n }", "private static List<Point> createLinearDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 100);\r\n add(data, 5, 200);\r\n add(data, 10, 300);\r\n add(data, 15, 400);\r\n return data;\r\n }", "public void addAll(Object[] toAdd) {\r\n\t\tAssert.isNotNull(toAdd);\r\n\t\tdata.addAll(Arrays.asList(toAdd));\r\n\r\n\t\tfireAdd(toAdd);\r\n\t}", "public void insert(final ArrayList<SelectablePoint2> points) {\n additions.sort((o1, o2) -> o2.cachedIndex - o1.cachedIndex);\n for (final SelectablePoint2 p : additions) {\n points.add(p.cachedIndex, p);\n }\n }", "public void add(PVector[] vectors, String[] labels) {\n\t\tfor (int i = 0; i < vectors.length; i++) {\n\t\t\tpoints.add(new GPoint(vectors[i], labels[i]));\n\t\t}\n\t}", "public void addAll(Points points) {\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tPoint temp = points.getPoint(i);\n\t\t\tif (!this.points.contains(temp))\n\t\t\t\tthis.points.add(temp);\n\t\t}\n\t}", "public void appendAdd(EPPSecDNSExtDsData dsData) {\n\t\tif (addDsData == null) {\n\t\t\taddDsData = new ArrayList();\n\t\t}\n\t\taddDsData.add(dsData);\n }", "public void update(double[][] data) {\n for (double[] x : data) {\n update(x);\n }\n }", "public void addData(List<? extends T> dataObjects)\n {\n assert SwingUtilities.isEventDispatchThread();\n if (!dataObjects.isEmpty())\n {\n int firstRow = myRowDataProvider.getRowCount();\n myRowDataProvider.addData(dataObjects);\n fireTableRowsInserted(firstRow, myRowDataProvider.getRowCount() - 1);\n }\n }", "public void setData(double[] d){\r\n\t\t//make a deeeeeep copy of d\r\n\t\tdouble[] newData = new double[d.length];\r\n\t\t\r\n\t\t//fill with passed values\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\tnewData[i] = d[i];\r\n\t\t}\r\n\t\t//set data equal to a ref to newData array\r\n\t\tthis.data = newData;\r\n\t}", "private void addOrReplaceDataSeries() {\n int chartMode;\n try {\n m_pLock.lock();\n chartMode = mChartMode;\n } finally {\n m_pLock.unlock();\n }\n\n if (m_pLineChart.getData().size() > 0) {\n m_pLineChart.getData().clear();\n }\n\n switch (chartMode) {\n case CHART_MODE_2_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_2SEC);\n m_pLineChart.getData().add(m_pDataSeries2_2SEC);\n m_pLineChart.getData().add(m_pDataSeries3_2SEC);\n break;\n case CHART_MODE_10_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_10SEC);\n m_pLineChart.getData().add(m_pDataSeries2_10SEC);\n m_pLineChart.getData().add(m_pDataSeries3_10SEC);\n break;\n case CHART_MODE_30_SECONDS:\n m_pLineChart.getData().add(m_pDataSeries1_30SEC);\n m_pLineChart.getData().add(m_pDataSeries2_30SEC);\n m_pLineChart.getData().add(m_pDataSeries3_30SEC);\n break;\n case CHART_MODE_5_MINUTES:\n m_pLineChart.getData().add(m_pDataSeries1_5MIN);\n m_pLineChart.getData().add(m_pDataSeries2_5MIN);\n m_pLineChart.getData().add(m_pDataSeries3_5MIN);\n break;\n default:\n break;\n }\n\n m_pXAxis.setDisable(true);\n int chartRange;\n int tickUnit;\n ObservableList<XYChart.Data<Number, Number>> observableList1, observableList2, observableList3;\n switch (mChartMode) {\n case CHART_MODE_2_SECONDS:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n case CHART_MODE_10_SECONDS:\n observableList1 = m_pDataSerieObservableList1_10SEC;\n observableList2 = m_pDataSerieObservableList2_10SEC;\n observableList3 = m_pDataSerieObservableList3_10SEC;\n chartRange = X_AXIS_RANGE_10_SECOND_MODE;\n tickUnit = X_AXIS_TICK_10_SECOND_MODE;\n break;\n case CHART_MODE_30_SECONDS:\n observableList1 = m_pDataSerieObservableList1_30SEC;\n observableList2 = m_pDataSerieObservableList2_30SEC;\n observableList3 = m_pDataSerieObservableList3_30SEC;\n chartRange = X_AXIS_RANGE_30_SECOND_MODE;\n tickUnit = X_AXIS_TICK_30_SECOND_MODE;\n break;\n case CHART_MODE_5_MINUTES:\n observableList1 = m_pDataSerieObservableList1_5MIN;\n observableList2 = m_pDataSerieObservableList2_5MIN;\n observableList3 = m_pDataSerieObservableList3_5MIN;\n chartRange = X_AXIS_RANGE_5_MINUTE_MODE;\n tickUnit = X_AXIS_TICK_5_MINUTE_MODE;\n break;\n default:\n observableList1 = m_pDataSerieObservableList1_2SEC;\n observableList2 = m_pDataSerieObservableList2_2SEC;\n observableList3 = m_pDataSerieObservableList3_2SEC;\n chartRange = X_AXIS_RANGE_2_SECOND_MODE;\n tickUnit = X_AXIS_TICK_2_SECOND_MODE;\n break;\n }\n\n if (observableList1.isEmpty() == false && observableList2.isEmpty() == false && observableList3.isEmpty() == false) {\n double maxValue = Math.max(Math.max(observableList1.get(observableList1.size() - 1).getXValue().doubleValue(),\n observableList2.get(observableList1.size() - 1).getXValue().doubleValue()),\n observableList3.get(observableList1.size() - 1).getXValue().doubleValue());\n double newLowerBound = maxValue - chartRange;\n double newUpperBound = maxValue;\n m_pXAxis.setLowerBound(newLowerBound);\n m_pXAxis.setUpperBound(newUpperBound);\n m_pXAxis.setTickUnit(tickUnit);\n m_pXAxis.setDisable(false);\n }\n \n // Update if there is some data series which is not to be plotted\n boolean toPlotDataSeries1 = mToPlotDataSeries1;\n boolean toPlotDataSeries2 = mToPlotDataSeries2;\n boolean toPlotDataSeries3 = mToPlotDataSeries3;\n mToPlotDataSeries1 = true;\n mToPlotDataSeries2 = true;\n mToPlotDataSeries3 = true; \n switchDataSeriesStatus(1, toPlotDataSeries1);\n switchDataSeriesStatus(2, toPlotDataSeries2);\n switchDataSeriesStatus(3, toPlotDataSeries3);\n \n\n }", "public void setData( List<Double> data ) {\r\n this.data = data;\r\n // set default labels\r\n DSPUtils.setLabels( this, 0, data.size() );\r\n updateMinMax();\r\n }", "public void setData(int close[] , int high[] , int low[] , int vol[]) {\n // check for null pointers\n if(close == null || high == null || low == null || vol == null) {\n // error ..\n eHandler.newError(ErrorType.NULL_ARGUMENT, \"setData\");\n\n // exit from method\n return;\n\n } // end of if statement\n\n data = new ChartData(close , high , low , vol);\n\n }", "public void addAll(Collection<T> objs) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter addAll\");\r\n\t\t\r\n\t\tdata.addAll(objs);\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit addAll\");\r\n\t}", "@SimpleFunction(description = \"Append new row of data to existing data set.\")\n public void AppendToDataSet(final int DataSetID, \n final YailList Fields, final YailList Data) {\n // Create new \"DataObject\" and add to upload queue\n DataObject dob = new DataObject(DataSetID, Fields, Data);\n if (pending.size() >= QUEUEDEPTH) {\n UploadDataSetFailed(\"Upload queue full!\");\n return;\n }\n pending.add(dob);\n numPending++; \n new UploadTask().execute(); \n }", "private void initDataset(){\n dataSet.add(\"Karin\");\n dataSet.add(\"Ingrid\");\n dataSet.add(\"Helga\");\n dataSet.add(\"Renate\");\n dataSet.add(\"Elke\");\n dataSet.add(\"Ursula\");\n dataSet.add(\"Erika\");\n dataSet.add(\"Christa\");\n dataSet.add(\"Gisela\");\n dataSet.add(\"Monika\");\n\n addDataSet.add(\"Anna\");\n addDataSet.add(\"Sofia\");\n addDataSet.add(\"Emilia\");\n addDataSet.add(\"Emma\");\n addDataSet.add(\"Neele\");\n addDataSet.add(\"Franziska\");\n addDataSet.add(\"Heike\");\n addDataSet.add(\"Katrin\");\n addDataSet.add(\"Katharina\");\n addDataSet.add(\"Liselotte\");\n }", "@Override\n public void addVertex(Set<V> psetVertices, TimeFrame tf) {\n for (V v : psetVertices) {\n addVertex(v,tf);\n }\n }", "public void setData(double[][] data) {\r\n reset(data.length, data[0].length);\r\n for (int i = 0; i < data.length; i++) {\r\n for (int j = 0; j < data[0].length; j++) {\r\n this.setLogicalValue(i, j, data[i][j], false);\r\n }\r\n }\r\n fireTableDataChanged();\r\n }", "@Override\n\tpublic void setDataSet(IDataSet ds) {\n\t\t\n\t}", "private XYDataset createDataset() {\n\t \tXYSeriesCollection dataset = new XYSeriesCollection();\n\t \t\n\t \t//Definir cada Estacao\n\t\t XYSeries aes1 = new XYSeries(\"Estação1\");\n\t\t XYSeries aes2 = new XYSeries(\"Estação2\");\n\t\t XYSeries aes3 = new XYSeries(\"Estação3\");\n\t\t XYSeries aes4 = new XYSeries(\"Estação4\");\n\t\t XYSeries aes5 = new XYSeries(\"Estação5\");\n\t\t XYSeries aes6 = new XYSeries(\"Estação6\");\n\t\t XYSeries aes7 = new XYSeries(\"Estação7\");\n\t\t XYSeries aes8 = new XYSeries(\"Estação8\");\n\t\t XYSeries aes9 = new XYSeries(\"Estação9\");\n\t\t XYSeries aes10 = new XYSeries(\"Estação10\");\n\t\t XYSeries aes11 = new XYSeries(\"Estação11\");\n\t\t XYSeries aes12 = new XYSeries(\"Estação12\");\n\t\t XYSeries aes13 = new XYSeries(\"Estação13\");\n\t\t XYSeries aes14 = new XYSeries(\"Estação14\");\n\t\t XYSeries aes15 = new XYSeries(\"Estação15\");\n\t\t XYSeries aes16 = new XYSeries(\"Estação16\");\n\t\t \n\t\t //Definir numero de utilizadores em simultaneo para aparece na Interface\n\t\t XYSeries au1 = new XYSeries(\"AU1\");\n\t\t XYSeries au2 = new XYSeries(\"AU2\");\n\t\t XYSeries au3 = new XYSeries(\"AU3\");\n\t\t XYSeries au4 = new XYSeries(\"AU4\");\n\t\t XYSeries au5 = new XYSeries(\"AU5\");\n\t\t XYSeries au6 = new XYSeries(\"AU6\");\n\t\t XYSeries au7 = new XYSeries(\"AU7\");\n\t\t XYSeries au8 = new XYSeries(\"AU8\");\n\t\t XYSeries au9 = new XYSeries(\"AU9\");\n\t\t XYSeries au10 = new XYSeries(\"AU10\");\n\t\t \n\t\t //Colocar estacoes no gráfico\n\t\t aes1.add(12,12);\n\t\t aes2.add(12,37);\n\t\t aes3.add(12,62);\n\t\t aes4.add(12,87);\n\t\t \n\t\t aes5.add(37,12);\n\t\t aes6.add(37,37);\n\t\t aes7.add(37,62);\n\t\t aes8.add(37,87);\n\t\t \n\t\t aes9.add(62,12); \n\t\t aes10.add(62,37);\n\t\t aes11.add(62,62);\n\t\t aes12.add(62,87);\n\t\t \n\t\t aes13.add(87,12);\n\t\t aes14.add(87,37);\n\t\t aes15.add(87,62);\n\t\t aes16.add(87,87);\n\t\t \n\t\t//Para a bicicleta 1\n\t\t \t\n\t\t\t for(Entry<String, String> entry : position1.entrySet()) {\n\t\t\t\t String key = entry.getKey();\n\t\t\t\t \n\t\t\t\t String[] part= key.split(\",\");\n\t\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t\t \n\t\t\t\t au1.add(keyX,keyY);\n\t\t\t }\n\t\t \n\t\t\t //Para a bicicleta 2\n\t\t for(Entry<String, String> entry : position2.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au2.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Para a bicicleta 3\n\t\t for(Entry<String, String> entry : position3.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au3.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position4.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au4.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position5.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au5.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position6.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au6.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position7.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au7.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position8.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au8.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position9.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au9.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position10.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au10.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Add series to dataset\n\t\t dataset.addSeries(au1);\n\t\t dataset.addSeries(au2);\n\t\t dataset.addSeries(au3);\n\t\t dataset.addSeries(au4);\n\t\t dataset.addSeries(au5);\n\t\t dataset.addSeries(au6);\n\t\t dataset.addSeries(au7);\n\t\t dataset.addSeries(au8);\n\t\t dataset.addSeries(au9);\n\t\t dataset.addSeries(au10);\n\t\t \n\t\t \n\t\t dataset.addSeries(aes1);\n\t\t dataset.addSeries(aes2);\n\t\t dataset.addSeries(aes3);\n\t\t dataset.addSeries(aes4);\n\t\t dataset.addSeries(aes5);\n\t\t dataset.addSeries(aes6);\n\t\t dataset.addSeries(aes7);\n\t\t dataset.addSeries(aes8);\n\t\t dataset.addSeries(aes9);\n\t\t dataset.addSeries(aes10);\n\t\t dataset.addSeries(aes11);\n\t\t dataset.addSeries(aes12);\n\t\t dataset.addSeries(aes13);\n\t\t dataset.addSeries(aes14);\n\t\t dataset.addSeries(aes15);\n\t\t dataset.addSeries(aes16);\n\t\t \n\t\t return dataset;\n\t }", "public void fit(double[][] trainingData, int[][] trainingLabels) {\n\t}", "private void insertTestData(List<? extends MithraDataObject> dataObjects, Object source)\r\n {\r\n if (dataObjects != null && !dataObjects.isEmpty())\r\n {\r\n MithraDataObject firstData = dataObjects.get(0);\r\n RelatedFinder finder = firstData.zGetMithraObjectPortal().getFinder();\r\n\r\n ((MithraAbstractDatabaseObject) finder.getMithraObjectPortal().getDatabaseObject()).insertData(\r\n Arrays.asList(finder.getPersistentAttributes()), dataObjects, source\r\n );\r\n finder.getMithraObjectPortal().clearQueryCache();\r\n }\r\n }", "public void setData(List<? extends T> dataObjects)\n {\n assert SwingUtilities.isEventDispatchThread();\n myRowDataProvider.clear();\n myCache.clear();\n myRowDataProvider.addData(dataObjects);\n fireTableDataChanged();\n }", "public DatasetIndex(Dataset data){\n\t\tthis();\n\t\tfor(Iterator<Example> i=data.iterator();i.hasNext();){\n\t\t\taddExample(i.next());\n\t\t}\n\t}", "private void writeDataToDatabase(InfluxDB influxDB, Target target, Point[] data) {\n for (Point p : data) {\n influxDB.write(target.getDatabase(), \"default\", p);\n }\n }", "private static void groupDataSetSamples(Map<EMailAddress, EntityTrackingEmailData> result,\n TrackedEntities trackedEntities)\n {\n for (AbstractExternalData dataSet : trackedEntities.getDataSets())\n {\n for (EMailAddress recipient : getDataSetTrackingRecipients(dataSet))\n {\n final EntityTrackingEmailData emailData =\n getOrCreateRecipientEmailData(result, recipient);\n emailData.addDataSet(dataSet);\n }\n }\n }", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "protected void insertDataIntoPersons(Collection<User> users) {\n\t\t\ttry {\n\t\t\t\topenConnection();\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Persons VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);\");\n\t\t\t\t//HUGEST IF STATEMENT EVAAAAAAH\n\t\t\t\tfor (User u : users) {\n\t\t\t\t\tif\n\t\t\t\t\t(\n\t\t\t\t\t\t\tu.getName() != null && u.getCountry() != null && \n\t\t\t\t\t\t\tu.getLanguage() != null && u.getGender() != null && \n\t\t\t\t\t\t\tu.getRegisteredDate() != null && u.getRealname() != null && \n\t\t\t\t\t\t\tu.getPlaycount() != 0 && u.getAge() != 0 && u.getNumPlaylists() != 0\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tprep.setString(1, u.getName());\n\t\t\t\t\t\tprep.setInt(2, u.getAge());\n\t\t\t\t\t\tprep.setString(3, u.getCountry());\n\t\t\t\t\t\tprep.setString(4, u.getLanguage());\n\t\t\t\t\t\tprep.setString(5, u.getGender());\n\t\t\t\t\t\tprep.setString(6, u.getRegisteredDate().toString());\n\t\t\t\t\t\tprep.setString(7, u.getRealname());\n\t\t\t\t\t\tprep.setInt(8, u.getPlaycount());\n\t\t\t\t\t\tprep.setInt(9, u.getNumPlaylists());\t\n\t\t\t\t\t\tprep.addBatch();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Persons\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t}", "public void setDataSet(DataSet dataSet) {\r\n\t\tthis.dataSet = dataSet;\r\n\t}", "public void add(PVector[] vectors) {\n\t\tfor (int i = 0; i < vectors.length; i++) {\n\t\t\tpoints.add(new GPoint(vectors[i]));\n\t\t}\n\t}", "public void setData(CellRecord[] data) {\r\n setAttribute(\"data\", data, true);\r\n }", "@Override\r\n\tpublic void setDataSeries(List<Double> factValues) {\n\r\n\t}", "private void setPointArray(Point heartPoint, Point calPoint, Point activePoint, Point sedPoint)\n\t{\n\t\tthis.pointArray[1] = heartPoint;\n\t\tthis.pointArray[2] = calPoint;\n\t\tthis.pointArray[3] = activePoint;\n\t\tthis.pointArray[4] = sedPoint;\n\t\t\n\t}", "public void addPoint(final DataPoint point) {\n logger.debug(\"addPoint called\");\n\n checkDimension(point);\n\n _addPoint(point);\n }", "public void add(DataFile data) {\n dataFiles.add(data);\n super.fireTableDataChanged();\n }", "public void addDataSet(List<Movie> items){\n mValues.addAll(items);\n notifyDataSetChanged();\n }", "private final void addCalibrationRecords(final String userID, final NetcdfFile ncfile, final String sourceName,\r\n final String sourceURL, final Array dateArray, final Array offsetArray, final Array offsetSeArray,\r\n final Array slopeArray, final Array slopeSeArray, final Array covarianceArray, final int channelNum,\r\n final double sceneTb, final String radToTbConvFormula, final String tbToRadConvFormula,\r\n final Set<String> convVarsNames) throws BadArgumentException, InvalidFilenameException,\r\n DatasetReadException, VariableNotFoundException, ChannelNotFoundException, VariableReadException\r\n {\r\n // Check dimensions consistency.\r\n if ((dateArray.getShape()[0] != offsetArray.getShape()[0])\r\n || (dateArray.getShape()[0] != slopeArray.getShape()[0])\r\n || (dateArray.getShape()[0] != offsetSeArray.getShape()[0])\r\n || (dateArray.getShape()[0] != slopeSeArray.getShape()[0])\r\n || (dateArray.getShape()[0] != covarianceArray.getShape()[0]))\r\n {\r\n throw new BadArgumentException(\"array dimensions mismatch.\");\r\n }\r\n\r\n // Sweep arrays and add each record into the map.\r\n for (int i = 0; i < dateArray.getShape()[0]; i++)\r\n {\r\n Double dateDouble = dateArray.getDouble(i) * 1e3; // in [ms]\r\n Date date = new Date(dateDouble.longValue());\r\n\r\n // Read the conversion variables.\r\n Map<String, Double> convVars = new HashMap<String, Double>();\r\n for (String convVarName : convVarsNames)\r\n {\r\n // TODO: [Remove workaround when formulas are changed]\r\n // Restore 'c1' and 'c2', if they are in the formula...\r\n if (convVarName.equals(configManager.getGlobalAttributesNames().getC1()))\r\n {\r\n convVars.put(C1_VARNAME, NetcdfUtils.readDouble(ncfile, convVarName, i, channelNum));\r\n\r\n } else if (convVarName.equals(configManager.getGlobalAttributesNames().getC2()))\r\n {\r\n convVars.put(C2_VARNAME, NetcdfUtils.readDouble(ncfile, convVarName, i, channelNum));\r\n } else\r\n {\r\n convVars.put(convVarName, NetcdfUtils.readDouble(ncfile, convVarName, i, channelNum));\r\n }\r\n }\r\n\r\n // Create calibration record.\r\n CalibrationRecord calRecord = new CalibrationRecordImpl(radToTbConvFormula, tbToRadConvFormula, convVars,\r\n TB_VARNAME, RAD_VARNAME, offsetArray.getDouble(i), offsetSeArray.getDouble(i),\r\n slopeArray.getDouble(i), slopeSeArray.getDouble(i), covarianceArray.getDouble(i), sceneTb);\r\n\r\n // Add calibration record, if valid, to data for this user.\r\n if (calRecord.isValid())\r\n {\r\n dataForUser(userID).addRecord(date, sourceName, sourceURL, calRecord);\r\n\r\n // TODO: to be checked.\r\n // if single-point, add a second one, with same value, and shifted one second, so that\r\n // it can be plotted by dygraphs.\r\n if (dateArray.getShape()[0] == 1)\r\n {\r\n DateTime dt = new DateTime(date);\r\n dt = dt.plus(Seconds.ONE);\r\n\r\n dataForUser(userID).addRecord(dt.toDate(), sourceName, sourceURL, calRecord);\r\n }\r\n }\r\n }\r\n }", "public boolean insertDataSet(String dsID, String hdfsPath);", "public void append(CPoint[] cpoints) {\n\tfor (CPoint cpoint: cpoints) {\n\t append(cpoint);\n\t}\n }", "public void feedData(int[][] Os) {\n\t\tthis.Os = Os;\n\t}", "private static void add(List<Point> points, int param, double value) {\r\n add(points, param, value, false);\r\n }", "public void setDataSet(DataSet dataSet) {\r\n dataBinder.setDataSet(dataSet);\r\n }", "public void addDataset(Resource dataset, String label, String comment, String publisher, String date, Resource structure){\n\t\tdataCubeModel.add(dataset, RDF.type, QB.Dataset);\n\t\tdataCubeModel.add(dataset, DCTerms.publisher, publisher);\n\t\tdataCubeModel.add(dataset, RDFS.label, label);\n\t\tdataCubeModel.add(dataset, RDFS.comment, comment);\n\t\tdataCubeModel.add(dataset, QB.structure, structure);\n\t\tdataCubeModel.add(dataset, DCTerms.date, date);\n\t}", "public void addData(double x, double y) {\n if (n == 0) {\n xbar = x;\n ybar = y;\n } else {\n double dx = x - xbar;\n double dy = y - ybar;\n sumXX += dx * dx * (double) n / (n + 1d);\n sumYY += dy * dy * (double) n / (n + 1d);\n sumXY += dx * dy * (double) n / (n + 1d);\n xbar += dx / (n + 1.0);\n ybar += dy / (n + 1.0);\n }\n sumX += x;\n sumY += y;\n n++;\n\n if (n > 2) {\n distribution.setDegreesOfFreedom(n - 2);\n }\n }", "protected MapDataSet mergeDataSets(List<MapDataSet> dataSets, MergingDataSetDefinition dataSetDefinition, EvaluationContext context) {\n \t\tMapDataSet ret = new MapDataSet(dataSetDefinition, context);\n \n \t\tList<DataSetColumn> columns = new ArrayList<DataSetColumn>();\n \n \t\t// Gather all columns from all contained data sets\n \t\tfor (DataSet dataSet : dataSets) {\n \t\t\tfor (DataSetColumn column : dataSet.getMetaData().getColumns()) {\n \t\t\t\tcolumns.add(column);\n \t\t\t}\n \t\t}\n \n \t\t// Sort the columns according to the merge order\n \t\tif (MergingDataSetDefinition.MergeOrder.NAME.equals(dataSetDefinition.getMergeOrder())) {\n \t\t\tCollections.sort(columns, new Comparator<DataSetColumn>() {\n \t\t\t\t@Override\n \t\t\t\tpublic int compare(DataSetColumn column1, DataSetColumn column2) {\n \t\t\t\t\treturn OpenmrsUtil.compareWithNullAsGreatest(column1.getName(), column2.getName());\n \t\t\t\t}\n \t\t\t});\n \t\t}\n \t\telse if (MergingDataSetDefinition.MergeOrder.LABEL.equals(dataSetDefinition.getMergeOrder())) {\n \t\t\tCollections.sort(columns, new Comparator<DataSetColumn>() {\n \t\t\t\t@Override\n \t\t\t\tpublic int compare(DataSetColumn column1, DataSetColumn column2) {\n \t\t\t\t\treturn OpenmrsUtil.compareWithNullAsGreatest(column1.getLabel(), column2.getLabel());\n \t\t\t\t}\n \t\t\t});\n \t\t}\n \n \t\tret.getMetaData().setColumns(columns);\n \n \t\t// Gather column data values from all contained data sets\n \t\tfor (MapDataSet dataSet : dataSets) {\n \t\t\tfor (DataSetColumn column : dataSet.getMetaData().getColumns()) {\n \t\t\t\tret.addData(column, getDataSetData(dataSet, column));\n \t\t\t}\n \t\t}\n \n \t\treturn ret;\n \t}", "public void setData(List<Number> data) {\n this.data = data;\n }", "void fit(DataSetIterator iterator);", "public void setData(String[] data) throws IOException {\n exoData = data;\n findPlanetLines(exoData);\n }", "public void setData(Rule[] rules, String[] criteres) {\n\n\t\t// get all data\n\t\tthis.rules = rules;\n\t\tthis.criteres = criteres;\n\t\tdrawGraph();\n\t}", "public void setData(int[] data) {\n this.data = data;\n }", "protected abstract Set<Event> createEvents(String[] dataset);", "private XYDataset createDataset(int a, List<ExtractedMZ> extracteddata, List<ExtractedMZ> extracteddata2) {\r\n final XYSeriesCollection dataset = new XYSeriesCollection();\r\n \r\n \r\n for (int i = 0; i<extracteddata.size(); i++) {\r\n \r\n final XYSeries series = new XYSeries(extracteddata.get(i).getName());\r\n float max = 0;\r\n \r\n for (int j = 0; j< extracteddata.get(i).retentionTimeList.get(a).size(); j++) {\r\n max = extracteddata.get(i).intensityList.get(a).get(j);\r\n while (j<extracteddata.get(i).retentionTimeList.get(a).size()-1 && Math.abs(extracteddata.get(i).retentionTimeList.get(a).get(j) - extracteddata.get(i).retentionTimeList.get(a).get(j+1)) < 0.01) {\r\n if (extracteddata.get(i).intensityList.get(a).get(j) > max) {\r\n max = extracteddata.get(i).intensityList.get(a).get(j+1);\r\n }\r\n j++;\r\n \r\n }\r\n \r\n series.add(extracteddata.get(i).retentionTimeList.get(a).get(j)/60,max);\r\n }\r\n dataset.addSeries(series);\r\n }\r\n \r\n for (int i = 0; i<extracteddata2.size(); i++) {\r\n \r\n final XYSeries series = new XYSeries(extracteddata2.get(i).getName());\r\n float max = 0;\r\n \r\n for (int j = 0; j< extracteddata2.get(i).retentionTimeList.get(a).size(); j++) {\r\n max = extracteddata2.get(i).intensityList.get(a).get(j);\r\n while (j<extracteddata2.get(i).retentionTimeList.get(a).size()-1 && Math.abs(extracteddata2.get(i).retentionTimeList.get(a).get(j) - extracteddata2.get(i).retentionTimeList.get(a).get(j+1)) < 0.01) {\r\n if (extracteddata2.get(i).intensityList.get(a).get(j) > max) {\r\n max = extracteddata2.get(i).intensityList.get(a).get(j+1);\r\n }\r\n j++;\r\n \r\n }\r\n \r\n series.add(extracteddata2.get(i).retentionTimeList.get(a).get(j)/60,max);\r\n }\r\n dataset.addSeries(series);\r\n }\r\n\r\n \r\n \r\n \r\n \r\n return dataset;\r\n \r\n }", "public void addAll(Collection<E> es) {\n \tmData.addAll(es);\n notifyDataSetChanged();\n }", "public void loadData(HistogramDataSet dataSet);", "public void addDataSources(Collection<DataSource> sources) {\n if (containsDataSource(sources)) { // there are duplicates so trim the collection\n removeIdenticalDataSources(sources);\n }\n datasources.addAll(sources);\n }", "public void addTrainingData(String value,String label);", "private static void insertTimeSeriesOneDim(final ScriptEngine engine,\r\n final DataArray data) throws Exception {\r\n List<DataEntry> time = data.getDate();\r\n int freq = TimeUtils.getFrequency(time);\r\n List<Double> doubleList = data.getDouble();\r\n double[] doubleArray = new double[doubleList.size()];\r\n for (int i = 0; i < doubleList.size(); i++) {\r\n doubleArray[i] = doubleList.get(i);\r\n }\r\n engine.put(\"my_double_vector\", doubleArray);\r\n engine.eval(\"ts_0 <- ts(my_double_vector, frequency = \"\r\n + freq + \")\");\r\n }", "public void addData(@NonNull Collection<? extends T> newData) {\n mData.addAll(newData);\n notifyItemRangeInserted(mData.size() - newData.size() + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }", "public void setDataElements(int x, int y, Object obj, DataBuffer data) {\n if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {\n throw new ArrayIndexOutOfBoundsException(\"Coordinate out of bounds!\");\n }\n\n int type = getTransferType();\n int numDataElems = getNumDataElements();\n int pixelOffset = y * scanlineStride + x * pixelStride;\n\n switch (type) {\n\n case DataBuffer.TYPE_BYTE:\n\n byte[] barray = (byte[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) barray[i]) & 0xff);\n }\n break;\n\n case DataBuffer.TYPE_USHORT:\n case DataBuffer.TYPE_SHORT:\n\n short[] sarray = (short[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], ((int) sarray[i]) & 0xffff);\n }\n break;\n\n case DataBuffer.TYPE_INT:\n\n int[] iarray = (int[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElem(bankIndices[i], pixelOffset + bandOffsets[i], iarray[i]);\n }\n break;\n\n case DataBuffer.TYPE_FLOAT:\n\n float[] farray = (float[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemFloat(bankIndices[i], pixelOffset + bandOffsets[i], farray[i]);\n }\n break;\n\n case DataBuffer.TYPE_DOUBLE:\n\n double[] darray = (double[]) obj;\n\n for (int i = 0; i < numDataElems; i++) {\n data.setElemDouble(bankIndices[i], pixelOffset + bandOffsets[i], darray[i]);\n }\n break;\n\n }\n }", "private void bulkInsertIntoDataAnalyzing(ArrayList<DataInfo> tmp) {\r\n sqliteDBHelper.insertIntoDataAnalyzingBulk(tmp);\r\n sqliteDBHelper.insertIntoScannedAppsBulk(tmp);\r\n }" ]
[ "0.67949563", "0.61852103", "0.6126006", "0.60026634", "0.59895927", "0.59747595", "0.59617513", "0.5952175", "0.5943932", "0.59019655", "0.58942443", "0.58643156", "0.5843534", "0.5828094", "0.582228", "0.58220345", "0.57969576", "0.5790008", "0.57684785", "0.57615304", "0.5749323", "0.57458186", "0.5729042", "0.56790096", "0.5639385", "0.56314677", "0.55968904", "0.5579131", "0.55644596", "0.55468845", "0.5534644", "0.5532538", "0.5440118", "0.5438513", "0.54336715", "0.5403364", "0.53968835", "0.535527", "0.5352077", "0.52664644", "0.526601", "0.5250193", "0.524625", "0.52434033", "0.5233384", "0.5227329", "0.5190512", "0.5187106", "0.5186666", "0.5179788", "0.51261187", "0.5083832", "0.5052229", "0.5041448", "0.5029934", "0.50268257", "0.5026102", "0.5014238", "0.50031483", "0.49975067", "0.4991275", "0.4988214", "0.49854732", "0.49778292", "0.4956069", "0.49543566", "0.49476582", "0.49467713", "0.4936596", "0.4930345", "0.4924833", "0.49243551", "0.4917902", "0.4910775", "0.49077073", "0.48932526", "0.48896587", "0.4881412", "0.48734337", "0.48677006", "0.4863629", "0.48576966", "0.48506632", "0.48326173", "0.48316023", "0.48203415", "0.48144057", "0.4810963", "0.47961873", "0.47877663", "0.47874814", "0.47870588", "0.4777103", "0.47752908", "0.47735295", "0.47732106", "0.47693437", "0.4766541", "0.47481892", "0.47464567" ]
0.7529488
0
Returns the index of the first value that is inside or inside adjacent for given min/max.
public static int getStartIndexForRange(DataSet aDataSet, double aMin, double aMax) { int start = 0; int pointCount = aDataSet.getPointCount(); while (start<pointCount && !isArrayValueAtIndexInsideOrInsideAdjacent(aDataSet, start, pointCount, aMin, aMax)) start++; return start; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public int serachMaxOrMinPoint(int [] A){\r\n\t\r\n\tint mid, first=0,last=A.length-1;\r\n\t\r\n\twhile( first <= last){\r\n\t\tif(first == last){\r\n\t\t\treturn A[first];\r\n\t\t}\r\n\t\telse if(first == last-1){\r\n\t\t\treturn Math.max(A[first], A[last]);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmid= first + (last-first)/2;\r\n\t\t\t\r\n\t\t\tif(A[mid]>A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\treturn A[mid];\r\n\t\t\telse if(A[mid]>A[mid-1] && A[mid]<A[mid+1])\r\n\t\t\t\tfirst=mid+1;\r\n\t\t\telse if(A[mid]<A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\tlast=mid-1;\r\n\t\t\telse return -1;\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n\t\r\n}", "private int betweenPoints(int value,Individual ind) {\n\t\tfor(int i=_point1; i<_point2;i++) {\n\t\t\tif(value==ind.getGene(i)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "private static int getMinIndex(int[] maxcounts){\n\t\tif(maxcounts[0]>maxcounts[1]){\n\t\t\tif(maxcounts[1]>maxcounts[2]){\n\t\t\t\treturn 2;\n\t\t\t}else{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}else{\n\t\t\tif(maxcounts[0]>maxcounts[2]){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "private static int partition(Comparable[] data, int min, int max) {\n\n\t\t// Use first element as the partition value\n\n\t\tComparable partitionValue = data[min];\n\n\t\tint left = min;\n\t\tint right = max;\n\n\t\twhile (left < right) {\n\t\t\t// Search for an element that is > the partition element\n\t\t\twhile (data[left].compareTo(partitionValue) <= 0 && left < right)\n\t\t\t\tleft++;\n\t\t\t// Search for an element that is < the partitionelement\n\t\t\twhile (data[right].compareTo(partitionValue) > 0)\n\t\t\t\tright--;\n\t\t\tif (left < right)\n\t\t\t\tswap(data, left, right);\n\t\t}\n\t\t// Move the partition element to its final position\n\t\tswap(data, min, right);\n\n\t\treturn right;\n\t}", "private int binarySearch(int[] array, int min, int max, int target){\r\n\r\n //because there is often not an answer that is equal to our target,\r\n //this algorithm is deisgned to find the element that it would go after in the array\r\n //because sometimes that is smaller than anything in the list it could bisect at a value that is not ideal.\r\n //however the final check handles 4 possible answers so this is not really an issue.\r\n if(target >= array[max]) return max;\r\n else if(target < array[min]) return min;\r\n if(min + 1 == max) return min;\r\n\r\n int midPoint = (min + max) / 2;\r\n\r\n if(target > array[midPoint]){\r\n return binarySearch(array, midPoint, max, target);\r\n }else return binarySearch(array, min, midPoint, target);\r\n }", "public int findLHSOrigin(int[] nums) {\n if (nums.length < 2)\n return 0;\n\n Map<Double, Integer> map = new HashMap<>();\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < nums.length; i++) {\n map.put(nums[i] - 0.5, map.getOrDefault(nums[i] - 0.5, 0) + 1);\n map.put(nums[i] + 0.5, map.getOrDefault(nums[i] + 0.5, 0) + 1);\n set.add(nums[i]);\n }\n\n int ans = 0;\n for (Double d : map.keySet()) {\n// System.out.println(d +\" \"+ map.get(d));\n if (set.contains((int) (d - 0.5)) && set.contains((int) (d + 0.5))) {\n ans = ans < map.get(d) ? map.get(d) : ans;\n }\n }\n return ans;\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public int findMinII(int[] nums) {\n int n = nums.length;\n int l = 0;\n int r = n - 1;\n int m;\n while (l + 1 < r) {\n while (r > 0 && nums[r] == nums[r-1]) r --;\n while (l < n-1 && nums[l] == nums[l+1]) l ++;\n m = (l + r) / 2;\n if (nums[m] > nums[l]) {\n l = m;\n }\n else if (nums[m] < nums[r]) {\n r = m;\n }\n }\n return Math.min(nums[0], Math.min(nums[l], nums[r]));\n }", "private int findMin(int[] nums) {\n if (nums == null || nums.length == 0) return -1;\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] >= nums[left] && nums[mid] > nums[right]) {\n left = mid + 1;\n } else if (nums[mid] == nums[right]) {\n while (mid < right && nums[mid] == nums[right]) {\n right--;\n }\n } else {\n right = mid;\n }\n }\n return nums[left];\n }", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "private int minFind(int[] nums, int lo, int hi){\n if (lo+1 >= hi) return Math.min(nums[lo], nums[hi]);\n // sorted. we return the minimum element.\n // to tell it is sorted or not, we need nums[lo] less than nums[hi], they cannot be equal.\n if (nums[lo] < nums[hi]) return nums[lo];\n // unsorted\n int mid = lo + (hi-lo)/2;\n // avoid overflow\n\n return Math.min(minFind(nums, lo, mid-1), minFind(nums, mid, hi));\n }", "static int minimumInRange(int a[], int from, int to){ //\"O(to-from+1)\" O(m)\n int min = from;\n for(int i = from+1; i<= to; i++){ //n times\n if(a[i]<a[min]){\n min = i;\n }\n }\n return min;\n }", "public static int findPosMin(List<Integer> values, int start) {\r\n int bestGuessSoFar = start;\r\n for (int i = start + 1; i < values.size(); i++) {\r\n if (values.get(i) < values.get(bestGuessSoFar)) {\r\n bestGuessSoFar = i;\r\n } // if\r\n } // for\r\n return bestGuessSoFar;\r\n }", "public int indexPosition(int i) {\n \t\tint min=0; int max=data.length;\n \t\twhile (min<max) {\n \t\t\tint mid=(min+max)>>1;\n \t\t\tint mi=data[mid];\n \t\t\tif (i==mi) return mid;\n \t\t\tif (i<mi) {\n \t\t\t\tmax=mid;\n \t\t\t} else {\n \t\t\t\tmin=mid+1;\n \t\t\t}\n \t\t}\n \t\treturn -1;\n \t}", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "public static int getEndIndexForRange(DataSet aDataSet, double aMin, double aMax)\n {\n int pointCount = aDataSet.getPointCount();\n int end = pointCount - 1;\n while (end>0 && !isArrayValueAtIndexInsideOrInsideAdjacent(aDataSet, end, pointCount, aMin, aMax))\n end--;\n return end;\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public int findSmallest(int[] arr, int begin, int end) {\n int minIndex = begin; //hint\n for(int i = begin; i < end ; i++) {\n if(arr[begin - 1] < arr[begin]) {\n minIndex = begin;\n } else \n minIndex = begin - 1;\n }\n return minIndex;\n }", "protected int getIndex(int digit, int lookup[], int min, int max)\n\t{\n\t\t// default case\n\t\tif(max - min == 1)\n\t\t{\n\t\t\tif(digit > lookup[min]) return max;\n\t\t\telse return min;\n\t\t}\n\t\t\n\t\t// recursive case, choose new partition using pivot value as the center\n\t\telse\n\t\t{\n\t\t\tint pivot = min + ((max - min) / 2);\n\t\t\tif(digit > lookup[pivot]) return getIndex(digit, lookup, pivot, max);\n\t\t\telse return getIndex(digit, lookup, min , pivot);\n\t\t}\n\t}", "public static int indexOfMaxInRange(int start, int end, double[] data)\r\n\t{\r\n\t\tint maxx=start;\r\n\t\tfor(int i=start;i<end;i++)\r\n\t\t{\r\n\t\t\tif(data[i]>data[maxx])\r\n\t\t\t\tmaxx=i;\r\n\t\t}\r\n\t\treturn maxx;\r\n\t}", "static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}", "private static int minIndex(int... values) {\n assert values.length != 0 : \"No values\"; // NOI18N\n boolean first = true;\n int min = -1;\n for (int value : values) {\n if (value == -1) {\n continue;\n }\n if (first) {\n first = false;\n min = value;\n continue;\n }\n min = Math.min(min, value);\n }\n return min;\n }", "private static <T extends Comparable <? super T>> int findMinPos(List <T> list, int from, int to){\r\n\t\tif (list.isEmpty()) return -1;\r\n\t\tif (from < 0 || to > list.size()) throw new IllegalArgumentException();\r\n\t\tT currentMin = list.get(from);\r\n\t\tint currentMinPos = from;\r\n\t\tfor (int i = from; i < to; i++){\r\n\t\t\tif (list.get(i).compareTo(currentMin) < 0){\r\n\t\t\t\tcurrentMin = list.get(i);\r\n\t\t\t\tcurrentMinPos = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentMinPos;\r\n\t}", "private static int indexOfSmallest(int[] a, int start) {\n int minNum = a[start];\n int minIndex = start;\n for(int i=start; i<a.length; i++){\n if(a[i]<minNum){\n minNum = a[i];\n minIndex = i;\n }\n\n }\n return minIndex;\n }", "private static final boolean isArrayValueAtIndexInsideOrInsideAdjacent(DataSet aDataSet, int i, int pointCount, double aMin, double aMax)\n {\n // If val at index in range, return true\n double val = aDataSet.getX(i);\n if (val >= aMin && val <= aMax)\n return true;\n\n // If val at next index in range, return true\n if (i+1 < pointCount)\n {\n double nextVal = aDataSet.getX(i + 1);\n if (val < aMin && nextVal >= aMin || val > aMax && nextVal <= aMax)\n return true;\n }\n\n // If val at previous index in range, return true\n if (i > 0)\n {\n double prevVal = aDataSet.getX(i - 1);\n if ( val < aMin && prevVal >= aMin || val > aMax && prevVal <= aMax)\n return true;\n }\n\n // Return false since nothing in range\n return false;\n }", "private int getMinIndex(List<Integer> cost) {\n int min = cost.get(0);\n int index = 0;\n for (int i = 1; i < cost.size(); i++) {\n if (cost.get(i) < 0) {\n continue;\n }\n if (cost.get(i) < min) {\n min = cost.get(i);\n index = i;\n }\n }\n return index;\n }", "private static double search(double min, double max, Function f) {\n\t\tdouble a = min;\n\t\tdouble c = max;\n\t\tdouble b = 0;\n\t\twhile (Math.abs(c - a) > MIN_DIFFERENCE) {\n\t\t\tb = (a + c) / 2;\n\t\t\tdouble fa = f.f(a);\n\t\t\tdouble fc = f.f(c);\n\t\t\t\n\t\t\tif (fa < fc) {\n\t\t\t\tc = b;\n\t\t\t} else {\n\t\t\t\ta = b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn b;\n\t}", "static int findMin(int[] nums) {\r\n \r\n // **** sanity check(s) ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** initialization ****\r\n int left = 0;\r\n int right = nums.length - 1;\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[right] > nums[left])\r\n return nums[left];\r\n\r\n // **** binary search approach ****\r\n while (left < right) {\r\n\r\n // **** compute mid point ****\r\n int mid = left + (right - left) / 2;\r\n\r\n // **** check if we found min ****\r\n if (nums[mid] > nums[mid + 1])\r\n return nums[mid + 1];\r\n\r\n if (nums[mid - 1] > nums[mid])\r\n return nums[mid];\r\n\r\n // **** decide which way to go ****\r\n if (nums[mid] > nums[0])\r\n left = mid + 1; // go right\r\n else\r\n right = mid - 1; // go left\r\n }\r\n\r\n // **** min not found (needed to keep the compiler happy) ****\r\n return 69696969;\r\n }", "public int findMin(int[] nums) {\n\t\t// corner\n\t\tif (nums.length == 1) {\n\t\t\treturn nums[0];\n\t\t}\n\t\t// Not rotated.\n\t\tif (nums[0] < nums[nums.length - 1]) {\n\t\t\treturn nums[0];\n\t\t}\n\n\t\t// Binary Search.\n\t\tint left = 0;\n\t\tint right = nums.length - 1;\n\t\t// int right = nums.length; // NG! (R = M version)\n\t\twhile (left <= right) {\n\t\t\t// while (left < right) { // NG! (R = M version)\n\t\t\tint mid = left + (right - left) / 2;\n\n\t\t\t// Find the valley.\n\t\t\t// nums[mid + 1] could cause array index out of bound when nums[mid] is the last\n\t\t\t// element.\n\t\t\t// However, for this problem, when nums[mid] is the second to the last, it\n\t\t\t// returns and\n\t\t\t// nums[mid] never reaches to the last element.\n\t\t\t// R = M version is NG because nums[mid] skips the second to the last and hits\n\t\t\t// the last\n\t\t\t// element depending on the case, in which case, nums[mid + 1] causes array\n\t\t\t// index out of bound.\n\t\t\tif (nums[mid] > nums[mid + 1]) {\n\t\t\t\treturn nums[mid + 1];\n\t\t\t}\n\t\t\t// Assert nums[mid] < nums[mid + 1] (no duplicates)\n\n\t\t\t// nums[mid - 1] could cause array index out of bound when the target is the\n\t\t\t// first element or\n\t\t\t// the second element.\n\t\t\t// However, for this problem, the code above returns when mid is equal to 0.\n\t\t\t// To be exact, when you use R = M - 1 version, mid is approaching index 0 as\n\t\t\t// the following:\n\t\t\t// 1. 2 -> 0 -> 1\n\t\t\t// 2. 3 -> 1 -> 0\n\t\t\t// ex) 1. [ 5, 1, 2, 3, 4 ], 2. [ 6, 1, 2, 3, 4, 5]\n\t\t\t// For case 1, the code above returns when mid is equal to 0, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t// For case 2, the code below returns when mid is equal to 1, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t//\n\t\t\t// Be careful!\n\t\t\t// Not rotated array can cause nums[-1] here for both of the two cases above\n\t\t\t// because\n\t\t\t// the code above does not return when mid is equal to 0, which causes index out\n\t\t\t// of bound here.\n\t\t\t// So, eliminate this case in advance.\n\t\t\tif (nums[mid - 1] > nums[mid]) {\n\t\t\t\treturn nums[mid];\n\t\t\t}\n\n\t\t\t// If the mid does not hit the valley, then keep searching.\n\t\t\t// I don't know why nums[mid] > nums[0] is ok in the LeetCode solution yet.\n\t\t\t// (No need to explore any further)\n\t\t\tif (nums[mid] > nums[left]) {\n\t\t\t\t// The min is in the right subarray.\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\t// The min is in the left subarray.\n\t\t\t\tright = mid - 1;\n\t\t\t\t// right = mid; // NG! (R = M version)\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public static int findMin(int[] nums) {\n\n int lo =0;\n int n = nums.length;\n int hi = n-1;\n int min = nums[lo];\n while(lo<hi){\n while(lo <hi && lo <n-2 && nums[lo]==nums[lo+1] ){\n lo = lo+1;\n }\n while(lo<hi && hi >=1 && nums[hi]== nums[hi-1]){\n hi = hi-1;\n }\n int mid = lo +(hi-lo)/2;\n if(mid-1>=0 && mid+1<=n-1 && nums[mid]<nums[mid-1]&& nums[mid]>nums[mid+1]){\n return nums[mid];\n }\n if(nums[mid]<nums[hi]){\n hi = mid;\n } else {\n lo = mid+1;\n }\n\n\n }\n return nums[lo];\n }", "private static int first(int arr[], int low, int high, int x, int n)\n {\n if(high >= low){\n \n /*mid = low+high/2*/\n int mid = low + (high-low) / 2;\n\n //Wen we found the X at the MID\n if( (mid==0 || x > arr[mid-1]) && arr[mid] == x)\n return mid;\n\n //WEn the x is greater than mid go to right ie mid+1\n if( x > arr[mid])\n return first(arr, (mid+1), high, x, n);\n\n //Else case wen x is small go left ie mid-1\n return first(arr, low, (mid-1), x, n);\n\n }\n\n //Wen not found ie high <= low\n return -1;\n }", "static int findFirstPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the first target from left\n if(mid==0 ||nums[mid-1]<nums[mid])\n return mid;\n else{\n //there are more targets available at left\n right=mid-1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public int findMin(int[] nums) {\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] < nums[start]) {\n end = mid;\n }\n else if (nums[mid] < nums[end]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n if (nums[start] < nums[end]) return nums[start];\n return nums[end];\n }", "static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "public static int findMinPositionSegment (int[] elts, int first, int size) {\r\n\t\tint min = elts[first];\r\n\t\tint minPosition = first;\r\n\t\tfor (int i = first+1; i < first+size; i++) {\r\n\t\t\tif (elts[i] < min) {\r\n\t\t\t\tmin = elts[i];\r\n\t\t\t\tminPosition = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn minPosition;\r\n\t}", "public static int findMinPositionSegment (int[] elts, int first, int size) {\r\n\t\tint min = elts[first];\r\n\t\tint minPosition = first;\r\n\t\tfor (int i = first+1; i < first+size; i++) {\r\n\t\t\tif (elts[i] < min) {\r\n\t\t\t\tmin = elts[i];\r\n\t\t\t\tminPosition = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn minPosition;\r\n\t}", "public int getLowerBound ();", "private int searchFilterIndex(List<Filter> filters, int targetId, int min, int max) {\r\n\t\t// Basic algorithm taken from Wikipedia:\r\n\t\t// http://en.wikipedia.org/wiki/Binary_search_algorithm#Recursive\r\n\t\tif (max <= min) {\r\n\t\t\t// set is empty, so return value showing not found\r\n\t\t\treturn -1;\r\n\t\t} \r\n\t\t\r\n\t\t// calculate midpoint to cut set in half\r\n\t\tint mid = (min + max) / 2;\r\n\r\n\t\t// three-way comparison\r\n\t\tint id = filters.get(mid).getId();\r\n\t\tif (id > targetId) {\r\n\t\t\t// id is in lower subset\r\n\t\t\treturn searchFilterIndex(filters, targetId, min, mid - 1);\r\n\t\t} else if (id < targetId) {\r\n\t\t\t// id is in upper subset\r\n\t\t\treturn searchFilterIndex(filters, targetId, mid + 1, max);\r\n\t\t}\r\n\t\t\r\n\t\t// index has been found\r\n\t\treturn mid + 1;\r\n\t}", "public static int indexOfSmallestElement(int[] array) {\n\t\tint min = array[0];\n\t\tint minIndex = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < min) {\n\t\t\t\tmin = array[i];\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn minIndex;\t\n\t}", "public static int getMinIndex(double[] array)\r\n\t{\r\n\t\tdouble min = Double.POSITIVE_INFINITY;\r\n\t\tint minIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (min > array[i]) {\r\n\t\t\t\tmin = array[i];\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\treturn minIndex;\r\n\t}", "public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList.size()==0)\n\t\t\treturn 0;\n\t\t\n\t\t//TODO Are we sure an binarySearch(pointList, xVal) wouldn't be a better choice here?\n\t\t//it can gracefully handle cases where the key isn't in the list of values...\n\t\tdouble stepWidth = (pointList.get(pointList.size()-1).getX()-pointList.get(0).getX())/(double)pointList.size();\n\t\t\n\t\tint index = (int)Math.floor( (xVal-pointList.get(0).getX())/stepWidth );\n\t\t//System.out.println(\"Start index: \" + index);\n\t\t\n\t\t//Check to see if we got it right\n\t\tif (index>=0 && (index<pointList.size()-1) && pointList.get(index).getX() < xVal && pointList.get(index+1).getX()>xVal) {\n\t\t\t//System.out.println(\"Got it right on the first check, returning index : \" + index);\n\t\t\treturn index;\n\t\t}\n\t\t\t\t\n\t\t//Make sure the starting index is sane (between upper and lower)\n\t\tif (index<0 || index>=pointList.size() )\n\t\t\tindex = (upper+lower)/2; \n\t\t\n\t\tif (xVal < pointList.get(0).getX()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\t\n\t\tif(xVal > pointList.get(pointList.size()-1).getX()) {\n\t\t\treturn pointList.size()-1;\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile( upper-lower > 1) {\n\t\t\tif (xVal < pointList.get(index).getX()) {\n\t\t\t\tupper = index;\n\t\t\t}\n\t\t\telse\n\t\t\t\tlower = index;\n\t\t\tindex = (upper+lower)/2;\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\treturn index;\n\t}", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "private int min(int index1, int index2) {\n // TODO: YOUR CODE HERE\n E first = getElement(index1);\n E second = getElement(index2);\n if (first == null) { //if null then just return the other one?\n return index2;\n }\n if (second == null) {\n return index1;\n }\n if (first.compareTo(second) > 0) {\n return index2;\n } else {\n return index1;\n }\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "public static int binarySearchR(int[] numbers, int target,\n int min, int max) {\n // base case\n if (min > max) {\n return -1; // not found\n } else {\n // recursive case\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid;\n } else if (numbers[mid] < target) {\n return binarySearchR(numbers, target,\n mid + 1, max);\n } else {\n return binarySearchR(numbers, target,\n min, mid - 1);\n }\n }\n }", "public int findDuplicate(int[] nums) {\n int max = Integer.MIN_VALUE, min = Integer.MAX_VALUE;\n for(int num : nums){\n max = Math.max(max, num);\n min = Math.min(min, num);\n }\n\n int l = min, r = max;\n while(l < r){\n int mid = l + (r-l)/2;\n\n int cnt = 0;\n for(int num : nums){\n if(num <= mid) ++cnt;\n }\n\n if(cnt <= mid) l = mid+1;\n else r = mid;\n }\n\n return l;\n }", "private int NumInRangeAxis(int min, int max, Boolean axis){\n\t\tint counter = 0;\n\t\tboolean stop = false;\n\t\tif (this.size==0) return 0;\n\t\tif (axis){ //axis x\n\t\t\tif (min>this.maxx.getData().getX() || max<this.minx.getData().getX()) stop=true;\n\t\t\tthis.current=this.minx;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getX() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}}\n\t\telse { //axis y\n\t\t\tif (min>this.maxy.getData().getY() || max<this.miny.getData().getY()) stop=true;\n\t\t\tthis.current=this.miny;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getY() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}}\n\t\treturn counter;\n\t}", "public int getIndexOfMaxNumber(int[] array) {\n\t\tint left = 0, right = array.length - 1;\n\t\twhile (left < right - 1) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid - 1] > array[mid]) {\n\t\t\t\treturn mid - 1;\n\t\t\t}\n\t\t\tif (array[mid] > array[mid + 1]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// up to this point,\n\t\t\t// mid == right || array[mid] < array[mid + 1] ||\n\t\t\t// mid == left || array[mid - 1] < array[mid]\n\t\t\tif (array[mid] <= array[left]) {\n\t\t\t\tright = mid;\n\t\t\t} else {\n\t\t\t\tleft = mid;\n\t\t\t}\n\t\t}\n\t\t// up to this point, left == right - 1;\n\t\treturn array[left] >= array[right] ? left : right;\n\t}", "public static int partition(ArrayList<Integer> list, int min, int max) {\n int center = list.get(max);\r\n int i = (min - 1);\r\n for (int j = min; j < max; j++) {\r\n if (list.get(j) < center) {\r\n i++;\r\n Collections.swap(list, i, j);\r\n }\r\n }\r\n Collections.swap(list, i + 1, max);\r\n\r\n return i + 1;//the location of the pivot point in the sorted array\r\n }", "public int\ngetNodeIndexMin();", "public ArrayList<Integer> pointsInRange( int min, int max )\n {\n ArrayList<Integer> points = new ArrayList<Integer>();\n _root.findPoints( min, max, points );\n return points;\n }", "public static int binarySearch(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "static int findMin0(int[] nums) {\r\n \r\n // **** sanity check ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[nums.length - 1] > nums[0])\r\n return nums[0];\r\n\r\n // **** loop looking for the next smallest value ****\r\n for (int i = 0; i < nums.length - 1; i++) {\r\n if (nums[i] > nums[i + 1])\r\n return nums[i + 1];\r\n }\r\n\r\n // **** min not found ****\r\n return -1;\r\n }", "public int getFirstInInterval(int start) {\n if (start > last()) {\n return -1;\n }\n if (start <= first) {\n return first;\n }\n if (stride == 1) {\n return start;\n }\n int offset = start - first;\n int i = offset / stride;\n i = (offset % stride == 0) ? i : i + 1; // round up\n return first + i * stride;\n }", "public static int getIndexOfMin(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double min = Double.MAX_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] < min) {\n min = x[i];\n index = i;\n }\n }\n return (index);\n }", "private int getIndex(int[][] matrix) {\n int[] columnsList = columnSum(matrix);\n int min = columnsList[0];\n int index = 0;\n for (int i = 1; i < columnsList.length; i++) {\n if (min > columnsList[i]) {\n min = columnsList[i];\n index = i;\n }\n }\n return index;\n }", "private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}", "private static <T extends Comparable<T>> boolean search(T target, int min, int max, T... list) {\n if (min > max)\n return false;\n\n int middle = (min + max) / 2;\n\n if (list[middle].compareTo(target) == 0)\n return true;\n\n else if (list[middle].compareTo(target) < 0)\n return search(target, middle + 1, max, list);\n\n else\n return search(target, min, middle - 1, list);\n }", "public int getIntPosition(double value) {\n if (Double.isNaN(value)) {\n return size - nanW/2;\n } else if (Double.isInfinite(value)) {\n if (value > 0.) \n return min < max ? size - nanW - posW / 2 : posW / 2;\n else\n return min < max ? negW / 2 : size - nanW - negW / 2;\n }\n return (int)getPosition(value);\n }", "private int findPosition(int[] src, int start, int end, int key) {\n\t\tif (end < start || start < 0)\n\t\t\treturn -1;\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\tif (src[i] == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t} \n\n\t\treturn -1;\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public int findMin(int[] num) {\n \t\n \tif (num.length == 1) {\n \t return num[0];\n \t}\n \t\n \tint up = num.length - 1,\n \t low = 0,\n \t mid = (up + low) / 2;\n \twhile (up > low) {\n \t if (mid + 1 < num.length && mid - 1 >= 0 && num[mid] < num[mid - 1] && num[mid] < num[mid + 1]) {\n \t return num[mid];\n \t }\n \t if (num[mid] > num[up]) {\n \t low = mid + 1;\n \t } else {\n \t up = mid - 1;\n \t }\n \t \n \t mid = (up + low) / 2;\n \t}\n \treturn num[mid];\n\t}", "public int findDuplicate(int[] nums) {\n int low = 1, high = nums.length - 1;\n while (low < high) {\n int mid = low + (high - low) / 2;\n int cnt = 0;\n for (int n : nums) {\n if (n <= mid) {\n cnt++;\n }\n }\n if (cnt <= mid) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return low;\n\n }", "private static int findIndexOfMaxInside(final int[] hist, int i, final int j) {\n int index = -1;\n for (int max = Integer.MIN_VALUE; ++i < j; ) {\n if (hist[i] > max) {\n max = hist[index = i];\n }\n }\n return index;\n }", "public static int findPivot(int[] arr) {\n // write your code here\n /*\n - if arr[rhs]<arr[mid] then min-val will lie in rhs\n else if arr[rhs]>arr[mid] then min-val will lie in lhs\n else if(i==j) means we have found the min-val, so return its value.\n */\n int i=0, j = arr.length-1, mid = (i+j)/2;\n while(i<=j) {\n mid = (i+j)/2;\n if(arr[j]<arr[mid])\n i = mid+1;\n else if(arr[j]>arr[mid])\n j = mid;\n else if(i==j)\n return arr[mid];\n }\n return -1;\n }", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "public int findMinOptimization(int[] nums) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n int target = nums[end];\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] <= target) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n if (nums[start] <= nums[end]) return nums[start];\n return nums[end];\n }", "private int findExtremePosition(int[] nums, int target, boolean left){\n int low = 0, high = nums.length-1, mid, index=-1;\n while(low<=high){\n mid = low + (high-low)/2;\n // target is found\n if(target==nums[mid]){\n // store the index\n index = mid;\n // continue moving left to find leftmost index of target element\n if(left){\n high = mid-1;\n // continue moving right to find rightmost index of target element\n }else {\n low = mid+1;\n }\n } else if(target<nums[mid]) {\n high = mid-1;\n } else {\n low = mid+1;\n }\n }\n //loop breaks when low>high, return the last recorded index\n return index;\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "public static int binarySearch2(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n int mid = -1;\n while (min <= max) {\n mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n mid = (max + min) / 2;\n }\n \n return -min - 1; // not found\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "private int binarySearchByIndex(List<Span> spans, int index){\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).startIndex;\n if(row == index) {\n return mid;\n }else if(row < index){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n int result = Math.max(0,Math.min(left,max));\n while(result > 0) {\n if(spans.get(result).startIndex > index) {\n result--;\n }else{\n break;\n }\n }\n while(result < right) {\n if(getSpanEnd(result,spans) < index) {\n result++;\n }else{\n break;\n }\n }\n return result;\n }", "public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }", "public int peekIntCoord(int max) throws IOException {\n if (1 >= max) return 0;\n int bits = 1 + (int) Math.ceil(Math.log(max) / Math.log(2));\n Bits peek = this.peek(bits);\n double divisor = 1 << peek.bitLength;\n int value = (int) (peek.toLong() * ((double) max) / divisor);\n assert (0 <= value);\n assert (max >= value);\n return value;\n }", "public static int argmin(double[] array, int from, int to) {\n\t\tif (from>=to) return -1;\n\t\tdouble max = array[from];\n\t\tint re = from;\n\t\tfor (int i=from+1; i<to; i++) {\n\t\t\tif (array[i]<max) {\n\t\t\t\tmax = array[i];\n\t\t\t\tre = i;\n\t\t\t}\n\t\t}\n\t\treturn re;\n\t}", "private int maxIndex(int[] values){\n int curMaxIndex = 0;\n int curMax = values[0];\n for(int i = 1; i < values.length; i++){\n if(values[i] > curMax){\n curMaxIndex = i;\n curMax = values[i];\n }\n }\n return curMaxIndex;\n }", "protected int findMinIndex(int[] arr)\n\t{\n\t\tint minIndex = arr.length;\n\t\tSet<Integer> set = new HashSet<>();\n\n\t\tfor (int i = arr.length - 1; i >= 0; i--) {\n\t\t\tif (set.contains(arr[i])) {\n\t\t\t\tminIndex = i;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tset.add(arr[i]);\n\t\t\t}\n\t\t}\n\t\treturn minIndex;\n\t}", "public static int interpolationSearch(int[] nums, int val){\n\n int lo = 0, mid = 0, hi = nums.length - 1;\n int range = nums[hi] - nums[lo];\n int normmailized = (hi - lo);\n while(nums[lo] <= val && nums[hi] >= val){\n mid = lo + ((val - nums[lo]) * normmailized)/ range; // normalization\n if(nums[mid] < val){\n lo = mid + 1;\n } else if(nums[mid] > val){\n hi = mid - 1;\n } else return mid;\n }\n if(nums[lo] == val) return lo;\n return -1;\n }", "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude();\n }\n\n // calculates the index of value in the array with the smallest value and returns that index\n lastClosestPointIndex = Functions.calculateIndexOfSmallestValue(distances);\n return lastClosestPointIndex;\n }", "private static int findMin(int startPos,int[] x){\n\t\tint result = startPos;\n\t\tfor(int i= startPos;i<x.length;i++){\n\t\t\tif(x[i]<x[result]){\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private static int getMinIndex(List<Integer> list) {\n return IntStream.range(0, list.size())\n .boxed()\n .min(Comparator.comparingInt(list::get)).\n orElse(list.get(0));\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 int findBinIndex(Double precursor, Double binSize, Double minMass)\n\t{\n\t\treturn (int)((precursor-minMass)/binSize);\n\t}", "public static int minIndex(int a, int b)\n {\n return (a < 0) ? b\n : (b < 0) ? a\n : Math.min(a, b);\n }", "public abstract void selectIndexRange(int min, int max);", "private static int maxXIndex(int y, int lo, int hi, int[][] nums) {\n int maxIndex = -1;\n for (int x = lo; x < hi; x++) {\n if (maxIndex == -1 || nums[y][x] > nums[y][maxIndex])\n maxIndex = x;\n }\n return maxIndex;\n }", "public int findMin(int[] nums) {\n int n = nums.length;\n int l = 0;\n int r = n - 1;\n int m;\n while (l + 1 < r) {\n m = (l + r) / 2;\n if (nums[m] > nums[l]) {\n l = m;\n }\n else if (nums[m] < nums[r]) {\n r = m;\n }\n }\n \n return Math.min(nums[0], Math.min(nums[l], nums[r]));\n }", "public static int indexOfLowestElevPath(Graphics g, int[][] grid){\n int lowest = 9999999;\n int row = -1;\n \n for(int i = 1; i < 480; i++)\n {\n if(drawLowestElevPath(g, grid, i) < lowest)\n {\n lowest = drawLowestElevPath(g, grid, i);\n row = i;\n }\n }\n \n return row;\n }", "public int findMinII(int[] nums) {\n return helper(nums, 0, nums.length - 1);\n }", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "int getMin( int min );", "private int binarySearch(int[] nums, int target, int low, int high) {\n while (low <= high) {\n int mid = low + (high - low) / 2; // find mid\n\n if (nums[mid] == target) { // if number found\n if (mid == low || nums[mid] > nums[mid - 1]) // check if it is the first occurence\n return mid; // if it is return mid\n else\n high = mid - 1; // decrease high to reach the index\n } else if (nums[mid] > target) // if the value in num is greater\n high = mid - 1; // decrease high\n else\n low = mid + 1; // else increase low\n\n }\n\n return -1; // number not found\n }" ]
[ "0.6476983", "0.646101", "0.63903344", "0.637149", "0.6338647", "0.6041276", "0.59990156", "0.5996247", "0.59356654", "0.5925458", "0.59000236", "0.58843064", "0.58585995", "0.5837159", "0.58315367", "0.5830217", "0.58272237", "0.5817335", "0.58037955", "0.57973087", "0.5791381", "0.5788237", "0.5781384", "0.5779851", "0.57551205", "0.57486", "0.57284486", "0.5723592", "0.5716843", "0.56836665", "0.56790817", "0.56769574", "0.5676478", "0.5664393", "0.5664292", "0.565947", "0.5632256", "0.56261533", "0.56234837", "0.5620318", "0.56193584", "0.5609731", "0.5609731", "0.5604241", "0.5597759", "0.55855083", "0.55837804", "0.5583751", "0.55772847", "0.557657", "0.557517", "0.5574488", "0.5574099", "0.55707246", "0.5558704", "0.55549103", "0.5553965", "0.55476433", "0.55474883", "0.55103344", "0.5507357", "0.5505701", "0.5505232", "0.55042917", "0.5501944", "0.5495312", "0.5479667", "0.54773307", "0.5475409", "0.5475252", "0.5473648", "0.54638654", "0.5459253", "0.54585665", "0.54566187", "0.54563695", "0.54520065", "0.5450868", "0.5443904", "0.5438556", "0.5434248", "0.5432694", "0.54313743", "0.5427453", "0.54214483", "0.5418921", "0.541622", "0.54124206", "0.5410281", "0.54093826", "0.54057324", "0.53951764", "0.5394826", "0.53946584", "0.5394042", "0.53884965", "0.53875667", "0.5373901", "0.5372626", "0.53529155" ]
0.6461299
1
Returns the index of the last value that is inside or inside adjacent for given min/max.
public static int getEndIndexForRange(DataSet aDataSet, double aMin, double aMax) { int pointCount = aDataSet.getPointCount(); int end = pointCount - 1; while (end>0 && !isArrayValueAtIndexInsideOrInsideAdjacent(aDataSet, end, pointCount, aMin, aMax)) end--; return end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int serachMaxOrMinPoint(int [] A){\r\n\t\r\n\tint mid, first=0,last=A.length-1;\r\n\t\r\n\twhile( first <= last){\r\n\t\tif(first == last){\r\n\t\t\treturn A[first];\r\n\t\t}\r\n\t\telse if(first == last-1){\r\n\t\t\treturn Math.max(A[first], A[last]);\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tmid= first + (last-first)/2;\r\n\t\t\t\r\n\t\t\tif(A[mid]>A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\treturn A[mid];\r\n\t\t\telse if(A[mid]>A[mid-1] && A[mid]<A[mid+1])\r\n\t\t\t\tfirst=mid+1;\r\n\t\t\telse if(A[mid]<A[mid-1] && A[mid]>A[mid+1])\r\n\t\t\t\tlast=mid-1;\r\n\t\t\telse return -1;\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n\t\r\n}", "public static int indexOfMaxInRange(int start, int end, double[] data)\r\n\t{\r\n\t\tint maxx=start;\r\n\t\tfor(int i=start;i<end;i++)\r\n\t\t{\r\n\t\t\tif(data[i]>data[maxx])\r\n\t\t\t\tmaxx=i;\r\n\t\t}\r\n\t\treturn maxx;\r\n\t}", "private int maxIndex(int[] values){\n int curMaxIndex = 0;\n int curMax = values[0];\n for(int i = 1; i < values.length; i++){\n if(values[i] > curMax){\n curMaxIndex = i;\n curMax = values[i];\n }\n }\n return curMaxIndex;\n }", "public int getIndexOfMaxNumber(int[] array) {\n\t\tint left = 0, right = array.length - 1;\n\t\twhile (left < right - 1) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid - 1] > array[mid]) {\n\t\t\t\treturn mid - 1;\n\t\t\t}\n\t\t\tif (array[mid] > array[mid + 1]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// up to this point,\n\t\t\t// mid == right || array[mid] < array[mid + 1] ||\n\t\t\t// mid == left || array[mid - 1] < array[mid]\n\t\t\tif (array[mid] <= array[left]) {\n\t\t\t\tright = mid;\n\t\t\t} else {\n\t\t\t\tleft = mid;\n\t\t\t}\n\t\t}\n\t\t// up to this point, left == right - 1;\n\t\treturn array[left] >= array[right] ? left : right;\n\t}", "public int checkIsEndState() {\n if (higherIndex - lowerIndex <= 1) {\n if (checkIsLeftBound(inputArray, lowerIndex)) {\n return lowerIndex;\n } else if (checkIsRightBound(inputArray, higherIndex)) {\n return higherIndex;\n }\n }\n return -1;\n }", "private static int maxIndex(int[] vals) {\n \n int indOfMax = 0;\n int maxSoFar = vals[0];\n \n for (int i=1;i<vals.length;i++){\n \n if (vals[i]>maxSoFar) {\n maxSoFar = vals[i];\n indOfMax = i;\n }\n }\n \n return indOfMax;\n }", "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }", "public int getMaximumIndexDifference() {\n int maxIndexDiff = 0;\n \n for(int i = 0; i < array.size() - 1; i++) {\n for(int j = i + 1; j < array.size(); j++) {\n if(array.get(i) <= array.get(j) && maxIndexDiff < j - i) {\n maxIndexDiff = j - i; \n }\n }\n }\n \n return maxIndexDiff;\n }", "private int findUpperBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] > target) right = mid;\n else left = mid + 1;\n }\n return (left > 0 && nums[left - 1] == target) ? left - 1 : -1;\n }", "private static int getMinIndex(int[] maxcounts){\n\t\tif(maxcounts[0]>maxcounts[1]){\n\t\t\tif(maxcounts[1]>maxcounts[2]){\n\t\t\t\treturn 2;\n\t\t\t}else{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}else{\n\t\t\tif(maxcounts[0]>maxcounts[2]){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static int getMax(ArrayList<QuoteShort> data, int begin, int end) {\n\t\t\r\n\t\tint max = -1;\r\n\t\tint maxIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()>=max){\r\n\t\t\t\tmax = data.get(i).getHigh5();\r\n\t\t\t\tmaxIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maxIndex;\r\n\t}", "private int binarySearch(int[] array, int min, int max, int target){\r\n\r\n //because there is often not an answer that is equal to our target,\r\n //this algorithm is deisgned to find the element that it would go after in the array\r\n //because sometimes that is smaller than anything in the list it could bisect at a value that is not ideal.\r\n //however the final check handles 4 possible answers so this is not really an issue.\r\n if(target >= array[max]) return max;\r\n else if(target < array[min]) return min;\r\n if(min + 1 == max) return min;\r\n\r\n int midPoint = (min + max) / 2;\r\n\r\n if(target > array[midPoint]){\r\n return binarySearch(array, midPoint, max, target);\r\n }else return binarySearch(array, min, midPoint, target);\r\n }", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogram.length - 1;\n\t}", "public static int getStartIndexForRange(DataSet aDataSet, double aMin, double aMax)\n {\n int start = 0;\n int pointCount = aDataSet.getPointCount();\n while (start<pointCount && !isArrayValueAtIndexInsideOrInsideAdjacent(aDataSet, start, pointCount, aMin, aMax))\n start++;\n return start;\n }", "private static int findIndexOfMaxInside(final int[] hist, int i, final int j) {\n int index = -1;\n for (int max = Integer.MIN_VALUE; ++i < j; ) {\n if (hist[i] > max) {\n max = hist[index = i];\n }\n }\n return index;\n }", "private int NumInRangeAxis(int min, int max, Boolean axis){\n\t\tint counter = 0;\n\t\tboolean stop = false;\n\t\tif (this.size==0) return 0;\n\t\tif (axis){ //axis x\n\t\t\tif (min>this.maxx.getData().getX() || max<this.minx.getData().getX()) stop=true;\n\t\t\tthis.current=this.minx;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getX() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}}\n\t\telse { //axis y\n\t\t\tif (min>this.maxy.getData().getY() || max<this.miny.getData().getY()) stop=true;\n\t\t\tthis.current=this.miny;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getY() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}}\n\t\treturn counter;\n\t}", "public abstract int maxIndex();", "public static int findMax(Integer[] X, int low, int high)\n\t\t{if (low + 1 > high) {return X[low];}\n\t\telse {return Math.max(Math.abs(X[low]), Math.abs(findMax(X, low + 1, high)));}\n\t\t}", "static int findLastPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the last target from right\n if(mid==nums.length-1 ||nums[mid]<nums[mid+1])\n return mid;\n else{\n //there are more targets available at right\n left=mid+1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "private static int upperBound(int[] A, int target) {\n int max = A.length;\n int min = -1;\n while (max - min > 1) {\n int mid = ( max + min ) / 2;\n if(A[mid] <= target) {\n min = mid;\n } else {\n max = mid;\n }\n }\n\n return max;\n\n }", "public int calculateMaximumPosition() {\n\t\tdouble[] maxVal = { inputArray[0], 0 };\n\t\tfor (int i = 0; i < inputArray.length; i++) {\n\t\t\tif (inputArray[i] > maxVal[0]) {\n\t\t\t\tmaxVal[0] = inputArray[i];\n\t\t\t\tmaxVal[1] = i;\n\t\t\t}\n\t\t}\n\t\treturn (int) maxVal[1];\n\t}", "private int findCoordElementDiscontiguousInterval(CoordInterval target, boolean bounded) {\n Preconditions.checkNotNull(target);\n\n // Check that the target is within range\n int n = orgGridAxis.getNcoords();\n double lowerValue = Math.min(target.start(), target.end());\n double upperValue = Math.max(target.start(), target.end());\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (upperValue < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (lowerValue > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n // see if we can find an exact match\n int index = -1;\n for (int i = 0; i < orgGridAxis.getNcoords(); i++) {\n if (target.fuzzyEquals(orgGridAxis.getCoordInterval(i), 1.0e-8)) {\n return i;\n }\n }\n\n // ok, give up on exact match, try to find interval closest to midpoint of the target\n if (bounded) {\n index = findCoordElementDiscontiguousInterval(target.midpoint(), bounded);\n }\n return index;\n }", "private int findExtremePosition(int[] nums, int target, boolean left){\n int low = 0, high = nums.length-1, mid, index=-1;\n while(low<=high){\n mid = low + (high-low)/2;\n // target is found\n if(target==nums[mid]){\n // store the index\n index = mid;\n // continue moving left to find leftmost index of target element\n if(left){\n high = mid-1;\n // continue moving right to find rightmost index of target element\n }else {\n low = mid+1;\n }\n } else if(target<nums[mid]) {\n high = mid-1;\n } else {\n low = mid+1;\n }\n }\n //loop breaks when low>high, return the last recorded index\n return index;\n }", "static int maxIndexDiff(int arr[], int n) { \n int max = 0;\n int i = 0;\n int j = n - 1;\n while (i <= j) {\n if (arr[i] <= arr[j]) {\n if (j - i > max) {\n max = j - i;\n }\n i += 1;\n j = n - 1;\n }\n else {\n j -= 1;\n }\n }\n return max;\n // Your code here\n \n }", "private int betweenPoints(int value,Individual ind) {\n\t\tfor(int i=_point1; i<_point2;i++) {\n\t\t\tif(value==ind.getGene(i)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "private static int maxXIndex(int y, int lo, int hi, int[][] nums) {\n int maxIndex = -1;\n for (int x = lo; x < hi; x++) {\n if (maxIndex == -1 || nums[y][x] > nums[y][maxIndex])\n maxIndex = x;\n }\n return maxIndex;\n }", "public static int lastOneIndexForLoop(int first, int last){\n//\t\tint max = Integer.MAX_VALUE;\n\t\tif(first < 0) first = 0;\n\t\tif(last < 0) last = 0;\n\t\tif(first > last) return 0;\n\n\t\treturn last;\n\t}", "public int\ngetNodeIndexMax();", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "private static int partition(Comparable[] data, int min, int max) {\n\n\t\t// Use first element as the partition value\n\n\t\tComparable partitionValue = data[min];\n\n\t\tint left = min;\n\t\tint right = max;\n\n\t\twhile (left < right) {\n\t\t\t// Search for an element that is > the partition element\n\t\t\twhile (data[left].compareTo(partitionValue) <= 0 && left < right)\n\t\t\t\tleft++;\n\t\t\t// Search for an element that is < the partitionelement\n\t\t\twhile (data[right].compareTo(partitionValue) > 0)\n\t\t\t\tright--;\n\t\t\tif (left < right)\n\t\t\t\tswap(data, left, right);\n\t\t}\n\t\t// Move the partition element to its final position\n\t\tswap(data, min, right);\n\n\t\treturn right;\n\t}", "public static int upperBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high)/2;\n if (arr[mid] == data) {\n ans = mid;\n low = mid + 1;\n } else if ( data < arr[mid] ) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public static int findLargest(int[] data){\n\t\tint lo=0, hi=data.length-1;\n\t\tint mid = (lo+hi)/2;\n\t\tint N = data.length-1;\n\t\twhile (lo <= hi){\n\t\t\tint val = data[mid];\n\t\t\tif(mid == 0 ) return (val > data[mid+1]) ? mid : -1;\n\t\t\telse if(mid == N) return (val > data[mid-1]) ? mid : -1;\n\t\t\telse{\n\t\t\t\tint prev = data[mid-1];\n\t\t\t\tint next = data[mid+1];\n\t\t\t\tif(prev < val && val < next) lo=mid+1;\n\t\t\t\telse if(prev > val && val > next) hi = mid-1;\n\t\t\t\telse return mid; // prev > val && val > next // is the only other case\n\t\t\t\tmid = (lo+hi)/2;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int lastPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n start = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[end] == target) return end;\n if (nums[start] == target) return start;\n return -1;\n }", "public int getMaxPos() {\n return nextPos - 1;\n }", "private int maxIndex(int[] sums) {\n\t\tint index = 0;\n\t\tint max = 0;\n\t\tfor(int i = 0; i < sums.length-1; i++) {\n\t\t\tif(sums[i] > max) {\n\t\t\t\tmax = sums[i];\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "private static final boolean isArrayValueAtIndexInsideOrInsideAdjacent(DataSet aDataSet, int i, int pointCount, double aMin, double aMax)\n {\n // If val at index in range, return true\n double val = aDataSet.getX(i);\n if (val >= aMin && val <= aMax)\n return true;\n\n // If val at next index in range, return true\n if (i+1 < pointCount)\n {\n double nextVal = aDataSet.getX(i + 1);\n if (val < aMin && nextVal >= aMin || val > aMax && nextVal <= aMax)\n return true;\n }\n\n // If val at previous index in range, return true\n if (i > 0)\n {\n double prevVal = aDataSet.getX(i - 1);\n if ( val < aMin && prevVal >= aMin || val > aMax && prevVal <= aMax)\n return true;\n }\n\n // Return false since nothing in range\n return false;\n }", "public int indexPosition(int i) {\n \t\tint min=0; int max=data.length;\n \t\twhile (min<max) {\n \t\t\tint mid=(min+max)>>1;\n \t\t\tint mi=data[mid];\n \t\t\tif (i==mi) return mid;\n \t\t\tif (i<mi) {\n \t\t\t\tmax=mid;\n \t\t\t} else {\n \t\t\t\tmin=mid+1;\n \t\t\t}\n \t\t}\n \t\treturn -1;\n \t}", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "public int upperBound() {\n\t\tif(step > 0)\n\t\t\treturn last;\n\t\telse\n\t\t\treturn first;\n\t}", "public static int binarySearchR(int[] numbers, int target,\n int min, int max) {\n // base case\n if (min > max) {\n return -1; // not found\n } else {\n // recursive case\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid;\n } else if (numbers[mid] < target) {\n return binarySearchR(numbers, target,\n mid + 1, max);\n } else {\n return binarySearchR(numbers, target,\n min, mid - 1);\n }\n }\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int findEntry(long msb, long lsb) {\n\n int lowIndex = 0;\n int highIndex = index.remaining() / 24 - 1;\n float lowValue = Long.MIN_VALUE;\n float highValue = Long.MAX_VALUE;\n float targetValue = msb;\n\n while (lowIndex <= highIndex) {\n int guessIndex = lowIndex + Math.round(\n (highIndex - lowIndex)\n * (targetValue - lowValue)\n / (highValue - lowValue));\n int position = index.position() + guessIndex * 24;\n long m = index.getLong(position);\n if (msb < m) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (msb > m) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // getting close...\n long l = index.getLong(position + 8);\n if (lsb < l) {\n highIndex = guessIndex - 1;\n highValue = m;\n } else if (lsb > l) {\n lowIndex = guessIndex + 1;\n lowValue = m;\n } else {\n // found it!\n return position;\n }\n }\n }\n\n // not found\n return -1;\n }", "static int getMaxCoinValMine(int vals[], int n) {\n int[][] maxVals = new int[n][n];\n for(int wind = 0; wind < n; wind++) {\n // start is always less than or equal to end\n for(int start=0, end = start+wind; end<n; start++,end++ ) {\n // no elements element\n if(wind==0) {\n maxVals[start][end] = 0;\n }\n else if(start == end) {\n // only single element\n maxVals[start][end] = vals[start];\n }\n else {\n // start >=0\n // calculate wind[start][end]\n // chose end, then value is val[end] for P1, val[start][end-1] for P2 and val[start][end-2] for P1\n int valEnd = vals[end] + (( start < end-2)? maxVals[start][end-2]:0);\n // chose start, then value is val[start] for P1, val[start+1][end] for P2 and val[start+2][end] for P1\n int valStart = vals[start] + ((start+2 < end)? maxVals[start+2][end]:0);\n maxVals[start][end] = max(valEnd, valStart);\n }\n }\n }\n return maxVals[0][n-1];\n\n }", "public abstract int getEndIndex();", "public int peekIntCoord(int max) throws IOException {\n if (1 >= max) return 0;\n int bits = 1 + (int) Math.ceil(Math.log(max) / Math.log(2));\n Bits peek = this.peek(bits);\n double divisor = 1 << peek.bitLength;\n int value = (int) (peek.toLong() * ((double) max) / divisor);\n assert (0 <= value);\n assert (max >= value);\n return value;\n }", "private int findCoordElementDiscontiguousInterval(double target, boolean bounded) {\n int idx = findSingleHit(target);\n if (idx >= 0)\n return idx;\n if (idx == -1)\n return -1; // no hits\n\n // multiple hits = choose closest (definition of closest will be based on axis type)\n return findClosestDiscontiguousInterval(target);\n }", "private int searchFilterIndex(List<Filter> filters, int targetId, int min, int max) {\r\n\t\t// Basic algorithm taken from Wikipedia:\r\n\t\t// http://en.wikipedia.org/wiki/Binary_search_algorithm#Recursive\r\n\t\tif (max <= min) {\r\n\t\t\t// set is empty, so return value showing not found\r\n\t\t\treturn -1;\r\n\t\t} \r\n\t\t\r\n\t\t// calculate midpoint to cut set in half\r\n\t\tint mid = (min + max) / 2;\r\n\r\n\t\t// three-way comparison\r\n\t\tint id = filters.get(mid).getId();\r\n\t\tif (id > targetId) {\r\n\t\t\t// id is in lower subset\r\n\t\t\treturn searchFilterIndex(filters, targetId, min, mid - 1);\r\n\t\t} else if (id < targetId) {\r\n\t\t\t// id is in upper subset\r\n\t\t\treturn searchFilterIndex(filters, targetId, mid + 1, max);\r\n\t\t}\r\n\t\t\r\n\t\t// index has been found\r\n\t\treturn mid + 1;\r\n\t}", "public static int lowerBound(int[] arr, int data) {\n int ans = -1, low = 0, high = arr.length - 1;\n while (low <= high) {\n int mid = (low + high) / 2;\n if (arr[mid] == data) {\n ans = mid;\n high = mid - 1;\n } else if (data < arr[mid]) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "private int searchNext(JmtCell prev) {\r\n \t\tRectangle boundspadre = GraphConstants.getBounds((prev).getAttributes()).getBounds();\r\n \t\tObject[] listEdges = null;\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \t\tList<Object> next = new ArrayList<Object>();\r\n \r\n \t\tif (flag1 == false && prev.seen == false) {\r\n \r\n \t\t\t// Rectangle bounds =\r\n \t\t\t// GraphConstants.getBounds(((JmtCell)prev).getAttributes()).getBounds();\r\n \t\t\tif (!flag2) {\r\n \t\t\t\tboundspadre.setLocation(x, y + ((e + 1) * (42 + heightMax)) - (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t} else {\r\n \t\t\t\tboundspadre.setLocation(x - (int) (boundspadre.getWidth() / 2), y + ((e + 1) * (42 + heightMax))\r\n \t\t\t\t\t\t- (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t}\r\n \r\n \t\t\tGraphConstants.setBounds(prev.getAttributes(), boundspadre);\r\n \t\t\tx = (int) boundspadre.getCenterX() + widthMax + 50;\r\n \t\t\tprev.seen = true;\r\n \t\t\tflag2 = true;\r\n \t\t}\r\n \r\n \t\t// inserisco tutti gli archi uscenti e entranti di min.get(j) in\r\n \t\t// listEdges\r\n \t\tlistEdges = DefaultGraphModel.getOutgoingEdges(graphmodel, prev);\r\n \t\tVector<Object> listEdgestmp = new Vector<Object>();\r\n \t\tfor (Object listEdge : listEdges) {\r\n \t\t\tJmtCell qq = (JmtCell) (graphmodel.getParent(graphmodel.getTarget(listEdge)));\r\n \t\t\tif (!(qq).seen) {\r\n \t\t\t\tlistEdgestmp.add(listEdge);\r\n \t\t\t}\r\n \t\t}\r\n \t\tlistEdges = listEdgestmp.toArray();\r\n \r\n \t\tint numTarget = listEdges.length;\r\n \t\tif (numTarget == 0) {\r\n \t\t\treturn 1;\r\n \t\t}\r\n \r\n \t\tfor (int k = 0; k < numTarget; k++) {\r\n \t\t\tnext.add((graphmodel.getParent(graphmodel.getTarget(listEdges[k]))));\r\n \t\t}\r\n \r\n \t\tint j = 1;\r\n \t\tif (inRepositionSons == false && ((JmtCell) next.get(0)).seen == false) {\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t} else if (inRepositionSons == true && ((JmtCell) next.get(0)).seen == false) {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(((JmtCell) next.get(0)).getAttributes()).getBounds();\r\n \t\t\tbounds.setLocation((int) (boundspadre.getCenterX()) + widthMax + 50 - (int) (bounds.getWidth() / 2), (int) boundspadre.getCenterY()\r\n \t\t\t\t\t- (int) (bounds.getHeight() / 2));\r\n \t\t\tGraphConstants.setBounds(((JmtCell) next.get(0)).getAttributes(), bounds);\r\n \r\n \t\t\t((JmtCell) next.get(0)).seen = true;\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t}\r\n \r\n \t\tif (numTarget > 0) {\r\n \t\t\tif (!flag) {\r\n \t\t\t\trepositionSons(prev, next, j - 1, 1);\r\n \t\t\t} else {\r\n \t\t\t\trepositionSons(prev, next, -1, 0);\r\n \t\t\t}\r\n \t\t\tflag = false;\r\n \t\t}\r\n \r\n \t\t(prev).sons = 0;\r\n \t\tfor (int w = 0; w < numTarget; w++) {\r\n \t\t\tprev.sons += ((JmtCell) next.get(w)).sons;\r\n \t\t}\r\n \r\n \t\treturn prev.sons;\r\n \t}", "int arrayMaximalAdjacentDifference(int[] inputArray) {\n\n\t int maximum = Math.abs(inputArray[1]- inputArray[0]);\n\t int result = 0;\n\t for(int i =1; i<inputArray.length-1; i++){\n\t result =Math.abs(inputArray[i+1]- inputArray[i]);\n\t if(result>=maximum){\n\t maximum = result;\n\t }\n\t }\n\t \n\t return maximum;\n\t}", "public static int getMin(ArrayList<QuoteShort> data, int begin, int end) {\n\t\tint min = 999999999;\r\n\t\tint minIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()<=min){\r\n\t\t\t\tmin = data.get(i).getLow5();\r\n\t\t\t\tminIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minIndex;\r\n\t}", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "MinmaxEntity getEnd();", "private StreamEvent findIfActualMax(AttributeDetails latestEvent) {\n int indexCurrentMax = valueStack.indexOf(currentMax);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMax;\n // If latest event is at a distance greater than maxPostBound from max, max is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMax.notEligibleForRealMax();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMax);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"max\", 0, postBound });\n currentMax.sentOutputAsRealMax();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMax.getValue() - currentMax.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMax - preBound >= 0) {\n if (valueStack.get(indexCurrentMax - preBound).getValue() <= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMax);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"max\", preBound, postBound });\n currentMax.sentOutputAsRealMax();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore max is not eligible to be sent as output.\n currentMax.notEligibleForRealMax();\n return null;\n }", "int rangeEnd(int start, int limitp, int val) {\n int c;\n int limit = Math.min(highStart, limitp);\n\n for (c = start+1; c < limit; c++) {\n if (get(c) != val) {\n break;\n }\n }\n if (c >= highStart) {\n c = limitp;\n }\n return c - 1;\n }", "public static int indexOfMax(int[] array)\n {\n int max = array[0];\n int maxIndex = 0;\n for(int i = 1; i < array.length; i++)\n {\n if(array[i] > max)\n {\n max = array[i];\n maxIndex = i;\n }\n }\n return maxIndex;\n }", "private int binarySearchEndBlock(int firstVis,List<BlockLine> blocks) {\n //end > firstVis\n int left = 0,right = blocks.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = blocks.get(mid).endLine;\n if(row > firstVis) {\n right = mid - 1;\n }else if(row < firstVis) {\n left = mid + 1;\n }else{\n left = mid;\n break;\n }\n }\n return Math.max(0,Math.min(left,max));\n }", "static int BinarySerach_upperValue(ArrayList<Integer> list , int value){ \r\n\t\t\r\n\t\tint mid,l,r;\r\n\t\t\r\n\t\tl = 0;\r\n\t\tr = list.size()-1;\r\n\t\t\r\n\t\tif(value>=list.get(r))\r\n\t\t\treturn r;\r\n\t\tif(value<=list.get(l))\r\n\t\t\treturn l;\r\n\t\t\r\n\t\tmid = (l+r)/2;\r\n\t\t\r\n\t\twhile(l<r){\r\n\t\t\t\r\n\t\t\tmid = (l+r)/2;\r\n\t\t\t\r\n\t\t\tif(list.get(mid)==value)\r\n\t\t\t\treturn mid;\r\n\t\t\t\r\n\t\t\tif(mid+1<list.size() && list.get(mid)<value && list.get(mid+1)>=value)\r\n\t\t\t\treturn mid+1;\r\n\t\t\tif(mid-1>0 && list.get(mid-1)<value && list.get(mid)>=value)\r\n\t\t\t\treturn mid;\r\n\t\t\tif(list.get(mid)<value)\r\n\t\t\t\tl = mid+1;\r\n\t\t\telse\r\n\t\t\t\tr = mid-1;\r\n\t\t}\r\n\t\t\t\r\n\t\treturn -1;\r\n\t}", "private static int search(long[] numbers, int start, int end, long value) {\n if (start > end){\n return -1;\n }\n\n int middle = (start + end) / 2;\n\n if (numbers[middle] == value) {\n return middle;\n }\n\n if (numbers[middle] > value) {\n return search(numbers, start, middle - 1, value);\n }\n\n return search(numbers, middle + 1, end, value);\n }", "private static int maxConti(int[] arr) {\n\t\tint sum=0;\n\t\tint maxValue=arr[0];\n\t\tint start=0;int end=0;\n\t\tfor(int i=0;i<arr.length;i++)\n\t\t{ \n\t\t\tsum=Math.max(sum+arr[i], arr[i]);\n\t\t\t\n\t\t\t\n\t\t\tmaxValue=Math.max(maxValue,sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(start+\" \"+end);\n\t\treturn maxValue;\n\t}", "protected int getIndex(int digit, int lookup[], int min, int max)\n\t{\n\t\t// default case\n\t\tif(max - min == 1)\n\t\t{\n\t\t\tif(digit > lookup[min]) return max;\n\t\t\telse return min;\n\t\t}\n\t\t\n\t\t// recursive case, choose new partition using pivot value as the center\n\t\telse\n\t\t{\n\t\t\tint pivot = min + ((max - min) / 2);\n\t\t\tif(digit > lookup[pivot]) return getIndex(digit, lookup, pivot, max);\n\t\t\telse return getIndex(digit, lookup, min , pivot);\n\t\t}\n\t}", "public int findExitIndex() {\n for (int i = 0; i < cells.size() ; i++) {\n if (cells.get(i) == CellState.Exit) { // Entrance -> indexEntrance\n return i;\n }\n }\n return -1;\n }", "private int getBestGuess(double values[]){\n int maxIndex=0;\n double max=0;\n for(int i=0;i<4;i++){\n if(values[i]>max) {\n max = values[i];\n maxIndex=i;\n }\n }\n return maxIndex+1;\n }", "private static double search(double min, double max, Function f) {\n\t\tdouble a = min;\n\t\tdouble c = max;\n\t\tdouble b = 0;\n\t\twhile (Math.abs(c - a) > MIN_DIFFERENCE) {\n\t\t\tb = (a + c) / 2;\n\t\t\tdouble fa = f.f(a);\n\t\t\tdouble fc = f.f(c);\n\t\t\t\n\t\t\tif (fa < fc) {\n\t\t\t\tc = b;\n\t\t\t} else {\n\t\t\t\ta = b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn b;\n\t}", "static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }", "public int findCoordElement(CoordInterval target, boolean bounded) {\n switch (orgGridAxis.getSpacing()) {\n case regularInterval:\n // can use midpoint\n return findCoordElementRegular(target.midpoint(), bounded);\n case contiguousInterval:\n // can use midpoint\n return findCoordElementContiguous(target.midpoint(), bounded);\n case discontiguousInterval:\n // cant use midpoint\n return findCoordElementDiscontiguousInterval(target, bounded);\n }\n throw new IllegalStateException(\"unknown spacing\" + orgGridAxis.getSpacing());\n }", "double getRight(double max);", "private int findCursorBlock(List<BlockLine> blocks) {\n int line = mCursor.getLeftLine();\n int min = binarySearchEndBlock(line,blocks);\n int max = blocks.size() - 1;\n int minDis = Integer.MAX_VALUE;\n int found = -1;\n int jCount = 0;\n int maxCount = Integer.MAX_VALUE;\n if(mSpanner != null) {\n TextColorProvider.TextColors colors = mSpanner.getColors();\n if(colors != null) {\n maxCount = colors.getSuppressSwitch();\n }\n }\n for(int i = min;i <= max;i++) {\n BlockLine block = blocks.get(i);\n if(block.endLine >= line && block.startLine <= line) {\n int dis = block.endLine - block.startLine;\n if(dis < minDis) {\n minDis = dis;\n found = i;\n }\n }else if(minDis != Integer.MAX_VALUE) {\n jCount++;\n if(jCount >= maxCount) {\n break;\n }\n }\n }\n return found;\n }", "private int findMax(int begin, int end) {\n // you should NOT change this function\n int max = array[begin];\n for (int i = begin + 1; i <= end; i++) {\n if (array[i] > max) {\n max = array[i];\n }\n }\n return max;\n }", "public static int findNextHigherIndex(int[] a, int k) {\n\t\tint start = 0, end = a.length - 1; \n\t \n int ans = -1; \n while (start <= end) { \n int mid = (start + end) / 2; \n \n // Move to right side if target is \n // greater. \n if (a[mid] <= k) { \n start = mid + 1; \n } \n \n // Move left side. \n else { \n ans = mid; \n end = mid - 1; \n } \n } \n return ans;\n\t}", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public static void minMaxDifference() {\n //int arr[] = {4,3,5,6,7,1,2};\n int arr[] = {6, 1, 7, -1, 3, 5, 9};\n int min_number = Integer.MAX_VALUE;\n int max_diff = Integer.MIN_VALUE;\n int current_difference;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i] < min_number)\n min_number = arr[i];\n current_difference = arr[i] - min_number;\n if (current_difference > max_diff)\n max_diff = current_difference;\n }\n System.out.println(\"Max diff : \" + max_diff);\n }", "private static int maxDifference(int[] arr) {\n\t\tint maxDiff = arr[1] - arr[0];\n\t\tint minElement = arr[0];\n\t\t\n\t\tfor(int i = 1 ; i < arr.length; i++)\n\t\t{\n\t\t\tif(arr[i] - minElement > maxDiff)\n\t\t\t{\n\t\t\t\tmaxDiff = arr[i] - minElement;\n\t\t\t}\n\t\t\tif(arr[i] < minElement)\n\t\t\t{\n\t\t\t\tminElement = arr[i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn maxDiff;\n\t}", "public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }", "public static int longestConsecutive(int[] num) {\n // Start typing your Java solution below\n // DO NOT write main() function\n \n if(num == null || num.length == 0) return 0;\n \n int min = Integer.MAX_VALUE;\n int max = Integer.MIN_VALUE;\n for(int i= 0; i< num.length; i++){\n if(num[i] > max){\n max = num[i];\n }\n if(num[i] < min){\n min = num[i];\n }\n }\n \n int range = max - min +1;\n BitSet bs = new BitSet(range);\n System.out.println(\"range \" + range);\n \n for(int i=0; i< num.length; i++){\n bs.set(num[i] - min);\n }\n \n int maxCount = 0;\n int start = -1;\n int i = 0;\n \n System.out.println(\"bs size \" + bs.size());\n while(i < bs.size() && !bs.get(i)){\n i++;\n }\n if(i < bs.size()){\n start = i;\n maxCount = 1;\n }\n \n //System.out.println(\"start \" + start + \" max \" + maxCount);\n for(int j=i+1; j< bs.size() && j >=1; j++){\n if(bs.get(j) != bs.get(j-1)){\n if(bs.get(j) && start == -1){\n start = j;\n }\n if(!bs.get(j) && start != -1){\n if(maxCount < j - start){\n maxCount = j - start;\n }\n start = -1;\n }\n //System.out.println(\"start \" + start + \" max \" + maxCount);\n \n }\n }\n return maxCount;\n }", "public int maxDistance(List<List<Integer>> arrays) {\r\n int min1 = Integer.MAX_VALUE, min2 = Integer.MAX_VALUE;\r\n int max1 = Integer.MIN_VALUE, max2 = Integer.MIN_VALUE;\r\n int min1Idx=-1, min2Idx=-1, max1Idx=-1, max2Idx=-1;\r\n\r\n for (int i=0; i<arrays.size(); ++i){\r\n int curMin = arrays.get(i).get(0);\r\n int curMax = arrays.get(i).get(arrays.get(i).size()-1);\r\n if (curMin < min1){\r\n min2=min1;\r\n min2Idx=min1Idx;\r\n min1=curMin;\r\n min1Idx=i;\r\n }\r\n else if (curMin<min2){\r\n min2=curMin;\r\n min2Idx=i;\r\n }\r\n\r\n if (curMax>max1){\r\n max2=max1;\r\n max2Idx=max1Idx;\r\n max1=curMax;\r\n max1Idx=i;\r\n }\r\n else if (curMax>max2){\r\n max2=curMax;\r\n max2Idx=i;\r\n }\r\n }\r\n if (min1Idx!=max1Idx) return max1-min1;\r\n return Math.max(max1-min2, max2-min1);\r\n }", "public static int maxInRange(int arr[], int lowIndex, int highIndex ) {\n\n if (lowIndex == highIndex) {\n return arr[highIndex];\n }\n if( arr[lowIndex]<= arr[highIndex]) {\n return maxInRange(arr,lowIndex+1,highIndex);\n } else{\n return maxInRange(arr, lowIndex, highIndex-1);\n }\n\n }", "public int getMaxRangeEnd() {\n return maximumViewableRange.getTo();\n }", "private int getIndex(int row,int column,int maxColumn)\n {\n \tint rownumber = row*maxColumn+column;\n \treturn rownumber;\n }", "private static int findIndexOfLargest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.NEGATIVE_INFINITY;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp>value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "public ArrayList<Integer> pointsInRange( int min, int max )\n {\n ArrayList<Integer> points = new ArrayList<Integer>();\n _root.findPoints( min, max, points );\n return points;\n }", "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "public static int maxindex(Random rng, int[] values) {\n\t\tint max = 0;\n\t\tList<Integer> maxindices = Lists.newArrayList();\n\t\t\n\t\tfor (int index = 0; index < values.length; index++) {\n\t\t\tif (values[index] > max) {\n\t\t\t\tmax = values[index];\n\t\t\t\tmaxindices.clear();\n\t\t\t\tmaxindices.add(index);\n\t\t\t} else if (values[index] == max) {\n\t\t\t\tmaxindices.add(index);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn maxindices.size() > 1 ? maxindices.get(rng.nextInt(maxindices.size())) : maxindices.get(0);\n\t}", "public abstract void selectIndexRange(int min, int max);", "public int getMaxFloor();", "int maxIndexDiff(int arr[], int n)\n {\n int maxDiff;\n int i, j;\n\n int rightMax[] = new int[n];\n int leftMin[] = new int[n];\n\n /* Construct leftMin[] such that leftMin[i] stores the minimum value\n from (arr[0], arr[1], ... arr[i]) */\n leftMin[0] = arr[0];\n for (i = 1; i < n; ++i) {\n leftMin[i] = min(arr[i], leftMin[i - 1]);\n }\n\n\n /* Construct rightMax[] such that rightMax[j] stores the maximum value from (arr[j], arr[j+1], ..arr[n-1]) */\n rightMax[n - 1] = arr[n - 1];\n for (j = n - 2; j >= 0; --j) {\n rightMax[j] = max(arr[j], rightMax[j + 1]);\n }\n\n\n /* Traverse both arrays from left to right to find optimum j - i This process is similar to merge() of MergeSort */\n i = 0; j = 0; maxDiff = 0;\n while (j < n && i < n) {\n if (leftMin[i] < rightMax[j]) {\n maxDiff = max(maxDiff, j - i);\n j = j + 1;\n } else {\n i = i + 1;\n }\n\n }\n\n return maxDiff;\n }", "private static <T extends Comparable<T>> boolean search(T target, int min, int max, T... list) {\n if (min > max)\n return false;\n\n int middle = (min + max) / 2;\n\n if (list[middle].compareTo(target) == 0)\n return true;\n\n else if (list[middle].compareTo(target) < 0)\n return search(target, middle + 1, max, list);\n\n else\n return search(target, min, middle - 1, list);\n }", "public int getLastSubIndex() {\n\t\t\tint maxRVI = 0, subIndex = 0;\n\t\t\tfor (Map.Entry<Integer, Integer> entry : subIndices.entrySet()) {\n\t\t\t\tif (entry.getKey() < currentRVIndex) {\n\t\t\t\t\tif (entry.getKey() > maxRVI) {\n\t\t\t\t\t\tmaxRVI = entry.getKey();\n\t\t\t\t\t\tsubIndex = entry.getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn subIndex;\n\t\t}", "void findLeadrsInArray2(int[] a){\n\t\tint n = a.length;\n\t\tSystem.out.println(a[n-1]);\n\t\tint max = a[n-1];\n\t\tfor(int i = n-2; i>=0 ; i--){\n\t\t\tif(a[i] < max){\n\t\t\t\tmax = a[i];\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }", "public int lastNonZero() {\n\t\tint i;\n\t\tfor(i=pointList.size()-1; i>=0; i--) {\n\t\t\tif (pointList.get(i).getY() > 0)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn 0;\n\t}", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public abstract int getMaximumValue();", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "public static int getIndexOfMax(double[] x) {\n Objects.requireNonNull(x, \"The supplied array was null\");\n int index = 0;\n double max = Double.MIN_VALUE;\n for (int i = 0; i < x.length; i++) {\n if (x[i] > max) {\n max = x[i];\n index = i;\n }\n }\n return (index);\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public static int getMaxIndex(double[] array)\r\n\t{\r\n\t\tdouble max = Double.NEGATIVE_INFINITY;\r\n\t\tint maxIndex = 0;\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tif (max < array[i]) {\r\n\t\t\t\tmax = array[i];\r\n\t\t\t\tmaxIndex = i;\r\n\t\t\t}\r\n\t\treturn maxIndex;\r\n\t}", "public int findLHSOrigin(int[] nums) {\n if (nums.length < 2)\n return 0;\n\n Map<Double, Integer> map = new HashMap<>();\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < nums.length; i++) {\n map.put(nums[i] - 0.5, map.getOrDefault(nums[i] - 0.5, 0) + 1);\n map.put(nums[i] + 0.5, map.getOrDefault(nums[i] + 0.5, 0) + 1);\n set.add(nums[i]);\n }\n\n int ans = 0;\n for (Double d : map.keySet()) {\n// System.out.println(d +\" \"+ map.get(d));\n if (set.contains((int) (d - 0.5)) && set.contains((int) (d + 0.5))) {\n ans = ans < map.get(d) ? map.get(d) : ans;\n }\n }\n return ans;\n }" ]
[ "0.63972455", "0.6371264", "0.6286719", "0.62358284", "0.6088121", "0.60669196", "0.60294896", "0.60251534", "0.59897715", "0.5979002", "0.5970468", "0.59682626", "0.5932647", "0.5919689", "0.5907016", "0.5903789", "0.5868121", "0.583795", "0.5821413", "0.5813228", "0.5799337", "0.57941145", "0.579232", "0.57525325", "0.5748886", "0.5730013", "0.57173216", "0.571388", "0.5699917", "0.5698664", "0.5669032", "0.56592846", "0.56449443", "0.563451", "0.5616693", "0.56079996", "0.5534161", "0.5517701", "0.5503662", "0.5498175", "0.54705995", "0.5457591", "0.54430324", "0.5438537", "0.5423903", "0.54159755", "0.5403879", "0.54020196", "0.538379", "0.5380595", "0.5378587", "0.5353819", "0.53473175", "0.5345543", "0.5342674", "0.53377056", "0.53376245", "0.5337228", "0.53331316", "0.53324676", "0.5327755", "0.5325214", "0.531814", "0.5314295", "0.5300699", "0.5293668", "0.5284903", "0.5283913", "0.5283398", "0.52752274", "0.5271371", "0.5270204", "0.5269405", "0.52678066", "0.5250638", "0.5241276", "0.52391696", "0.5237087", "0.5223488", "0.5223184", "0.5222197", "0.5221967", "0.5221719", "0.5221143", "0.522066", "0.5219869", "0.5215826", "0.521085", "0.52064055", "0.52062213", "0.51994985", "0.5192407", "0.51852566", "0.5181262", "0.51741475", "0.5171943", "0.5171054", "0.5170514", "0.5163748", "0.5162472" ]
0.68901217
0
Returns true if given data/index value is inside range or adjacent to point inside.
private static final boolean isArrayValueAtIndexInsideOrInsideAdjacent(DataSet aDataSet, int i, int pointCount, double aMin, double aMax) { // If val at index in range, return true double val = aDataSet.getX(i); if (val >= aMin && val <= aMax) return true; // If val at next index in range, return true if (i+1 < pointCount) { double nextVal = aDataSet.getX(i + 1); if (val < aMin && nextVal >= aMin || val > aMax && nextVal <= aMax) return true; } // If val at previous index in range, return true if (i > 0) { double prevVal = aDataSet.getX(i - 1); if ( val < aMin && prevVal >= aMin || val > aMax && prevVal <= aMax) return true; } // Return false since nothing in range return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isInInterval(int baseIndex);", "public static boolean inRange (Position defPos, Position atkPos, int range) {\n\t\tint defX = defPos.getX();\n\t\tint defY = defPos.getY();\n\t\t\n\t\tint atkX = atkPos.getX();\n\t\tint atkY = atkPos.getY();\n\t\t\n\t\tif (defX -range <= atkX &&\n\t\t\t\tdefX + range >= atkX)\n\t\t{\n\t\t\tif (defY -range <= atkY &&\n\t\t\t\t\tdefY+range >= atkY)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isIndexInMyRange(String index) {\n\t\tif (this.getFromIndex().compareTo(this.getToIndex()) > 0) {\n\t\t\tif (index.compareTo(this.getFromIndex()) >= 0)\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\treturn (index.compareTo(this.getToIndex()) <= 0);\n\t\t\t}\n\t\t}\n\t\t// for the other nodes\n\t\telse\n\t\t\treturn (index.compareTo(this.getFromIndex()) >= 0 && index\n\t\t\t\t\t.compareTo(this.getToIndex()) <= 0);\n\n\t}", "public boolean contains(Index position) { // TODO rename: adjoinsOrContains\n return position != null && position.getX() + 1 >= start.getX() && position.getY() + 1 >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "private boolean isBetweenBounds(int x, int y, int[] bounds) {\n return x >= bounds[0] && x <= bounds[2] && y >= bounds[1] && y <= bounds[3];\n }", "private boolean intervalContains(double target, int coordIdx, boolean ascending, boolean closed) {\n // Target must be in the closed bounds defined by the discontiguous interval at index coordIdx.\n double lowerVal = ascending ? orgGridAxis.getCoordEdge1(coordIdx) : orgGridAxis.getCoordEdge2(coordIdx);\n double upperVal = ascending ? orgGridAxis.getCoordEdge2(coordIdx) : orgGridAxis.getCoordEdge1(coordIdx);\n\n if (closed) {\n return lowerVal <= target && target <= upperVal;\n } else {\n return lowerVal <= target && target < upperVal;\n }\n }", "private boolean intervalContains(double target, int coordIdx) {\n double midVal1 = orgGridAxis.getCoordEdge1(coordIdx);\n double midVal2 = orgGridAxis.getCoordEdge2(coordIdx);\n boolean ascending = midVal1 < midVal2;\n return intervalContains(target, coordIdx, ascending, true);\n }", "public boolean inRange(Vector v) {\r\n\t\tdouble w = v.get(0);\r\n\t\tdouble x = v.get(1);\r\n\t\tdouble y = v.get(2);\r\n\t\tdouble z = v.get(3);\r\n\t\tboolean a = (x+w>1)&&(x+1>w)&&(w+1>x);\r\n\t\tboolean b = (y+z>1)&&(y+1>z)&&(z+1>y);\r\n\t\treturn a&&b;\r\n\t}", "public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }", "public boolean allInRange(int start, int end) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tint a=data[i];\n \t\t\tif ((a<start)||(a>=end)) return false;\n \t\t}\n \t\treturn true;\n \t}", "private static boolean isBetween(double start, double middle, double end) {\n if(start > end) {\n return end <= middle && middle <= start;\n }\n else {\n return start <= middle && middle <= end;\n }\n }", "default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "boolean hasDestRange();", "private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }", "private boolean inRange(double num, double low, double high) {\n if (num >= low && num <= high)\n return true;\n\n return false;\n }", "public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isIn(Point p)\n {\n \n \treturn isIn(p.x, p.y);\n \t\n //\tboolean cond1 = false;\n // boolean cond2 = false; \n // cond1 = (p.x>=rettangoloX)&&(p.x<=(rettangoloX+larghezza));\n // cond2 = (p.y>=rettangoloY)&&(p.y<=(rettangoloY+altezza));\n // return (cond1&&cond2);\n }", "@JsMethod(name = \"containsPoint\")\n public boolean contains(double p) {\n return p >= lo && p <= hi;\n }", "public boolean contains2(DecimalPosition position) { // TODO rename: ???\n return position != null && position.getX() >= start.getX() && position.getY() >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\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/* */ }", "private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}", "public int isInBounds(T a);", "public boolean rangeCheck(int index) {\n\t\tif (index >= 0 && index <= 7) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isInBound(int current, int bound){\n return (current >= 0 && current < bound);\n }", "public static boolean checkRange(TechnicalData data0, TechnicalData data1, int index0, int index1) {\n\t\tif (data0.timeStamp(index0).equals(data1.timeStamp(index1))) return true;\n\t\treturn false;\n\t}", "private boolean cell_in_bounds(int row, int col) {\n return row >= 0\n && row < rowsCount\n && col >= 0\n && col < colsCount;\n }", "private static boolean withinArea(Point dronePos) {\r\n\t\tvar droneLat = dronePos.latitude();\r\n\t\tvar droneLon = dronePos.longitude();\r\n\t\treturn droneLat<latUB && droneLat>latLB && droneLon<lonUB && droneLon>lonLB;\r\n\t}", "private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }", "private boolean isInRange(Balloon balloon) {\r\n\t\tfloat xDistance = Math.abs(balloon.getX() - x);\r\n\t\tfloat yDistance = Math.abs(balloon.getY() - y);\r\n\r\n\t\tif (xDistance < range && yDistance < range) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean contain(int x, int y) {\n return(x>=this.x && y>=this.y && x<=this.x+(int)a && y<=this.y+(int)b);\n }", "@SuppressWarnings(\"unused\")\n public static boolean withinRange(float value, float startValue, float endValue) {\n return value == ScWidget.valueRangeLimit(value, startValue, endValue);\n }", "private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }", "private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }", "private static boolean hasVisibleRegion(int begin,int end,int first,int last) {\n return (end > first && begin < last);\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "private boolean between(int x1, int x2, int x3) {\n return (x1 >= x3 && x1 <= x2) || (x1 <= x3 && x1 >= x2);\n }", "boolean isEquals(Range other);", "public boolean containsOffset(int offs) {\r\n\t\treturn offset!=null && endOffset!=null &&\r\n\t\t\t\toffs>=offset.getOffset() && offs<=endOffset.getOffset();\r\n\t}", "private boolean isNumberinRange(double needle, double haystack, double range) {\n return (((haystack - range) < needle) // greater than low bounds\n && (needle < (haystack + range))); // less than upper bounds\n }", "private boolean pointOnSegment(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\t\n\t\tif (w3x <= Math.max(w1x, w2x) && w3x >= Math.min(w1x, w2x) && \n\t\t\tw3y <= Math.max(w1y, w2y) && w3y >= Math.min(w1y, w2y))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "private int betweenPoints(int value,Individual ind) {\n\t\tfor(int i=_point1; i<_point2;i++) {\n\t\t\tif(value==ind.getGene(i)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "public boolean inRange(int row, int col) {\n\t /*if the given row and col is less than 0 or greater than the maximum number, return false*/\n\t if(row < 0 || row >= this.row || col < 0 || col >= this.col) {\n\t\t return false;\n\t }\n\t /*return true if it's valid*/\n\t else {\n\t\t return true;\n\t }\n }", "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 isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }", "public static boolean isInRange(int i, int topBoundary) {\n return 0 <= i && i < topBoundary;\n }", "private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }", "protected boolean checkPoiInside( CFWPoint poiBegI, CFWPoint poiEndI)\t{\r\n\t\t//[begin point in area 1] unintersect: 1,2,3,7,8\r\n\t\t//[begin point in area 2] unintersect: 1,2,3\r\n\t\t//[begin point in area 3] unintersect: 1,2,3,4,5\r\n\t\t//[begin point in area 4] unintersect: 3,4,5\r\n\t\t//[begin point in area 5] unintersect: 3,4,5,6,7\r\n\t\t//[begin point in area 6] unintersect: 5,6,7\r\n\t\t//[begin point in area 7] unintersect: 5,6,7,8,1\r\n\t\t//[begin point in area 8] unintersect: 7,8,1\r\n\t\t//[begin point in area 9] unintersect: 9\r\n\t\tif(isInsideArea( 1, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 2, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 3, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 2, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 4, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 5, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 3, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 4, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 6, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 7, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 5, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 6, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\tif(isInsideArea( 8, poiBegI))\t{\r\n\t\t\tif(isInsideArea( 7, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 8, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t\telse if(isInsideArea( 1, poiEndI))\r\n\t\t\t\treturn(false);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean containsExclusive(DecimalPosition position) { // TODO rename: contains\n if (position.getX() < start.getX() || position.getY() < start.getY()) {\n return false;\n }\n if (width() > 0) {\n if (position.getX() >= end.getX()) {\n return false;\n }\n } else {\n if (position.getX() > end.getX()) {\n return false;\n }\n }\n\n if (height() > 0) {\n if (position.getY() >= end.getY()) {\n return false;\n }\n } else {\n if (position.getY() > end.getY()) {\n return false;\n }\n }\n return true;\n }", "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}", "public boolean containsPoint(Point p) {\n \treturn\n \t\tp.x >= x &&\n \t\tp.x <= x + width &&\n \t\tp.y >= y &&\n \t\tp.y <= y + height;\n }", "public boolean isWithinStackCapacity(int index)\n {\n // if outside of bound of array, return false\n if(index < 0 || index >= values.length)\n {\n return false;\n }\n\n // if index wraps around adjust it.\n int contiguousIndex = index < start ? index + values.length : index;\n int end = start + capacity;\n return start <= contiguousIndex && contiguousIndex < end; \n }", "public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;", "public boolean isIn(int x, int y)\n {\n boolean cond1 = false;\n boolean cond2 = false;\n cond1 = (x>=rettangoloX)&&(x<=(rettangoloX+larghezza));\n cond2 = (y>=rettangoloY)&&(y<=(rettangoloY+altezza));\n return (cond1&&cond2); \n }", "boolean inBoundingBox(Coord pos) {\n\t\treturn min(from.x, to.x) <= pos.x && pos.x <= max(from.x, to.x)\n\t\t\t\t&& min(from.y, to.y) <= pos.y && pos.y <= max(from.y, to.y);\n\t}", "default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }", "public boolean containsDomainRange(long from, long to) { return true; }", "private static boolean isOnSegment(Coord p, Coord q, Coord r) \n {\n if(r.x <= Math.max(p.x, q.x) && r.x >= Math.min(p.x, q.x) && \n r.y <= Math.max(p.y, q.y) && r.y >= Math.min(p.y, q.y)) \n return true; \n return false; \n }", "private boolean isBetween(float a, float b, float c) {\n return b >= a ? c >= a && c <= b : c >= b && c <= a;\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 }", "public boolean isInRange(int number){\n return (number >= min && number <= max);\n }", "private boolean checkIndexBounds(int idx) {\n return (idx >= 0) && (idx <= this.length);\n }", "public abstract boolean isOutOfBounds(int x, int y);", "boolean inViewport(final int index) {\n resetViewport(start);\n return index >= start && index <= end;\n }", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public boolean isAdjacent(int from, int to) {\r\n LinkedList<Edge> testList = myAdjLists[from];\r\n int counter = 0;\r\n while (counter < testList.size()) {\r\n \tif (testList.get(counter).myTo == to) {\r\n \t\treturn true;\r\n \t}\r\n \tcounter++;\r\n }\r\n return false;\r\n }", "public boolean isInterior() {\n\t\tif (this.eltZero != null && this.eltOne != null && this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private boolean holds(int attrIndex, double value) {\n\t\n if (numAttributes() == 0)\n\treturn false;\n\t\n if(attribute(attrIndex).isNumeric())\n\treturn(m_MinBorder[attrIndex] <= value && value <= m_MaxBorder[attrIndex]);\n else\n\treturn m_Range[attrIndex][(int) value];\n }", "public boolean isAdjacent(int from, int to) {\n //your code here\n \tfor (Edge e : myAdjLists[from]) {\n \t\tif (e.to() == to) {\n \t\t\treturn true;\n \t\t}\n \t}\n return false;\n }", "private boolean inProcessRange(ProcessorDistributionKey key, ActiveTimeSpans active)\n {\n if (checkTime(active, key.getTimeSpan(), key.getConstraintKey()))\n {\n return true;\n }\n\n final AnimationPlan animationPlan = myAnimationPlan;\n final AnimationState currentAnimationState = myCurrentAnimationState;\n if (animationPlan == null || currentAnimationState == null)\n {\n return false;\n }\n\n final int loadAhead = myProcessorBuilder.getProcessorFactory().getLoadAhead(key.getGeometryType());\n\n final AnimationState state = animationPlan.findState(key.getTimeSpan(), currentAnimationState.getDirection());\n if (state == null)\n {\n return false;\n }\n animationPlan.getTimeSpanForState(state);\n boolean inRange = false;\n try\n {\n final int distance = animationPlan.calculateDistance(currentAnimationState, state);\n inRange = distance <= loadAhead;\n }\n catch (final RuntimeException e)\n {\n // If this test fails just fail the in range test as this always\n // happens during a plan\n // change where the distributor has yet to receive the updated\n // plan and ends up in\n // a race condition with the animation manager adjusting to the\n // new plan.\n inRange = false;\n }\n return inRange;\n }", "private boolean inRange(final int left, final int right, final int target) {\n if (left <= target && target <= right)\n return true;\n\n // 2. If this is a reverted array\n //\n // e.g. [6, 7, 8, 9, 1, 2, 3]\n if (left > right &&\n (target >= left || target <= right)) // NOTE the \"OR\" here.\n return true;\n\n return false;\n }", "private boolean isWithinBounds(Point3D point) {\n // Check if point is above min bounds\n if (point.getX() < minBounds.getX() || point.getY() < minBounds.getY() || point.getZ() < minBounds.getZ()) {\n return false;\n }\n // Check if point is below max bounds\n if (point.getX() > maxBounds.getX() || point.getY() > maxBounds.getY() || point.getZ() > maxBounds.getZ()) {\n return false;\n }\n return true;\n }", "private boolean withinRange(Enemy e) {\n \t\tRect r = e.r; //Get the collision box from the \n \t\tPoint rectCenter = new Point((int) r.exactCenterX(), (int) r.exactCenterY());\n \t\tif (Math.abs(center.x - rectCenter.x) <= (e.getSize()/2 + range)) {\n \t\t\tif (Math.abs(center.y - rectCenter.y) <= (e.getSize()/2 + range)) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t\treturn false;\t\n \t}", "private boolean checkRange(int rowIndex, int columnIndex) {\n return rowIndex >= 0 && rowIndex < matrix.length\n && columnIndex >= 0 && columnIndex < matrix[rowIndex].length;\n\n }", "private boolean isInside(int i, int j) {\n\t\tif (i < 0 || j < 0 || i > side || j > side)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public boolean isInsideLimits(int value) {\n return value > lowerLimit && value < upperLimit;\n }", "public static boolean inRange(double lon, double lat) {\n // Coordinates of office and current location in radians\n double lon1 = Math.toRadians(lon);\n double lat1 = Math.toRadians(lat);\n double lon2 = Constants.OFFICE_LONG;\n double lat2 = Constants.OFFICE_LAT;\n\n // Uses the haversine formula to calculate distance\n double deltaLon = Math.abs(lon1 - lon2);\n double deltaLat = Math.abs(lat1 - lat2);\n double num1 = Math.sin(deltaLat/Constants.SQUARE);\n num1 = Math.pow(num1, Constants.SQUARE);\n double num2 = Math.sin(deltaLon/Constants.SQUARE);\n num2 = Math.pow(num2, Constants.SQUARE);\n num2 = num2 * Math.cos(lat1) * Math.cos(lat2);\n double num = num1 + num2;\n num = Math.sqrt(num);\n num = Math.asin(num);\n num *= Constants.SQUARE;\n double dist = num * Constants.RADIUS; \n return (dist <= Constants.MAX); // Compares it to max distance\n }", "public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }", "public static boolean isSequence(double start, double mid, double end)\r\n/* 140: */ {\r\n/* 141:324 */ return (start < mid) && (mid < end);\r\n/* 142: */ }", "public static boolean isInside(int nX, int nY,\n\t int nT, int nR, int nB, int nL, int nTol)\n\t{\n\t\tif (nR < nL) // swap the left and right bounds as needed\n\t\t{\n\t\t\tnR ^= nL;\n\t\t\tnL ^= nR;\n\t\t\tnR ^= nL;\n\t\t}\n\n\t\tif (nT < nB) // swap the top and bottom bounds as needed\n\t\t{\n\t\t\tnT ^= nB;\n\t\t\tnB ^= nT;\n\t\t\tnT ^= nB;\n\t\t}\n\n\t\t// expand the bounds by the tolerance\n\t\treturn (nX >= nL - nTol && nX <= nR + nTol\n\t\t && nY >= nB - nTol && nY <= nT + nTol);\n\t}", "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}", "boolean hasIncomeRange();", "public static boolean openIntervalIntersect(float start1, float end1, float start2, float end2) {\n\t\treturn (start1 < end2 && start2 < end1);\n\t}", "private boolean inBounds(int deltaRow, int deltaCol) {\n boolean row = false;\n boolean col = false;\n\n if (lastPlacedRow + deltaRow < NUM_ROWS && lastPlacedRow + deltaRow >= 0) {\n row = true;\n }\n if (lastPlacedCol + deltaCol < NUM_COLS && lastPlacedCol + deltaCol >= 0) {\n col = true;\n }\n\n return row && col;\n }", "static boolean isInside(int x, int y, int N) {\n if (x >= 1 && x <= N && y >= 1 && y <= N) {\n return true;\n }\n return false;\n }", "public boolean contains(T value) {\n boolean aboveLower = (includesLower) ? lower.compareTo(value) <= 0 : lower.compareTo(value) < 0;\n boolean belowUpper = (includesUpper) ? value.compareTo(upper) <= 0 : value.compareTo(upper) < 0;\n\n return aboveLower && belowUpper;\n }", "private static final boolean correct(List<Long> xs, int i, int low, int high) {\n final long target = xs.get(i);\n for (int x = low; x < high; x++) {\n for (int y = low + 1; y <= high; y++) {\n final long vx = xs.get(x);\n final long vy = xs.get(y);\n if ((vx != vy) && ((vx + vy) == target)) {\n return true;\n }\n }\n }\n return false;\n }", "private boolean withinGridDimensions(int startX, int startY, int endX, int endY) {\n boolean within = true;\n int largerX = Math.max(startX, endX);\n int smallerX = Math.min(startX, endX);\n int largerY = Math.max(startY, endY);\n int smallerY = Math.min(startY, endY);\n \n if (smallerX < 1 || smallerY < 1 || largerX > GRID_DIMENSIONS || largerY > GRID_DIMENSIONS) {\n within = false;\n }\n \n return within;\n }", "private boolean isInBounds(int i, int j)\n {\n if (i < 0 || i > size-1 || j < 0 || j > size-1)\n {\n return false;\n }\n return true;\n }", "boolean isEndInclusive();", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "public static double inInterval(double lowerBound, double value, double upperBound) {\n/* 67 */ if (value < lowerBound)\n/* 68 */ return lowerBound; \n/* 69 */ if (upperBound < value)\n/* 70 */ return upperBound; \n/* 71 */ return value;\n/* */ }", "protected boolean hasConnection(int start, int end) {\n\t\tfor (Gene g : genes.values()) {\n\t\t\tif (g.start == start && g.end == end)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean inHitRegion(int x, int y) {\n\tif(lastRow != -1 && tree != null) {\n\t Rectangle bounds = tree.getRowBounds(lastRow);\n\n\t if(bounds != null && x <= (bounds.x + offset) &&\n\t offset < (bounds.width - 5)) {\n\t\treturn false;\n\t }\n\t}\n\treturn true;\n }", "public boolean containsDomainRange(Date from, Date to) { return true; }", "public static boolean intervalIntersect(float start1, float end1, float start2, float end2) {\n\t\treturn (start1 <= end2 && start2 <= end1);\n\t}", "public boolean isInRange(int fromRank, int toRank, int fromFile, int toFile) {\n return fromRank <= rank && rank <= toRank && fromFile <= file && file <= toFile;\n }", "private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }" ]
[ "0.6690947", "0.66295326", "0.66135895", "0.65491366", "0.6477205", "0.64749026", "0.64551824", "0.6351523", "0.63144845", "0.62862426", "0.6273316", "0.62060803", "0.617845", "0.6174896", "0.61618555", "0.615026", "0.6141762", "0.61251223", "0.611444", "0.61111057", "0.60947466", "0.6071076", "0.60661155", "0.6052271", "0.60446954", "0.60371226", "0.60228324", "0.6018465", "0.6017467", "0.59916586", "0.5968046", "0.59582084", "0.591817", "0.59141284", "0.590621", "0.5897869", "0.5894715", "0.5888746", "0.58784723", "0.5850196", "0.58194125", "0.581519", "0.58058614", "0.5799993", "0.57982916", "0.5796699", "0.57942575", "0.57874864", "0.5785441", "0.5780534", "0.57683665", "0.57594484", "0.575685", "0.5754053", "0.5754015", "0.5753183", "0.5743211", "0.5743077", "0.57323015", "0.5723571", "0.57171583", "0.5706796", "0.5703426", "0.5689897", "0.5679296", "0.56742465", "0.5670312", "0.56605977", "0.5657035", "0.5652613", "0.56478596", "0.56472874", "0.5643048", "0.5639243", "0.563682", "0.5632731", "0.5628531", "0.56172943", "0.56165504", "0.5609681", "0.56058484", "0.5604906", "0.55959576", "0.5583392", "0.5583098", "0.55792683", "0.5577811", "0.55672526", "0.5558984", "0.5554909", "0.555054", "0.5549971", "0.55484116", "0.55441135", "0.55420786", "0.55389285", "0.55382323", "0.553605", "0.55199087", "0.5517539" ]
0.757256
0
Returns a copy of given DataSet processed with given expressions.
public static DataSet getProcessedData(DataSet aDataSet, String exprX, String exprY, String exprZ) { // If both expressions empty, just return boolean isEmptyX = exprX == null || exprX.length() == 0; boolean isEmptyY = exprY == null || exprY.length() == 0; boolean isEmptyZ = exprZ == null || exprZ.length() == 0; if (isEmptyX && isEmptyY && isEmptyZ) return aDataSet; // Get KeyChains KeyChain keyChainX = !isEmptyX ? KeyChain.getKeyChain(exprX.toLowerCase()) : null; KeyChain keyChainY = !isEmptyY ? KeyChain.getKeyChain(exprY.toLowerCase()) : null; KeyChain keyChainZ = !isEmptyZ ? KeyChain.getKeyChain(exprZ.toLowerCase()) : null; // Get DataX DataType dataType = aDataSet.getDataType(); int pointCount = aDataSet.getPointCount(); boolean hasZ = dataType.hasZ(); double[] dataX = new double[pointCount]; double[] dataY = new double[pointCount]; double[] dataZ = hasZ ? new double[pointCount] : null; Map map = new HashMap(); for (int i=0; i<pointCount; i++) { double valX = aDataSet.getX(i); double valY = aDataSet.getY(i); double valZ = hasZ ? aDataSet.getZ(i) : 0; map.put("x", valX); map.put("y", valY); if (hasZ) map.put("z", valZ); dataX[i] = isEmptyX ? valX : KeyChain.getDoubleValue(map, keyChainX); dataY[i] = isEmptyY ? valY : KeyChain.getDoubleValue(map, keyChainY); if (hasZ) dataZ[i] = isEmptyZ ? valZ : KeyChain.getDoubleValue(map, keyChainZ); } // Return new DataSet for type and values return DataSet.newDataSetForTypeAndValues(dataType, dataX, dataY, dataZ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Dataset FilterDataset(Dataset dataset)\n {\n Dataset result = new Dataset();\n for(HashMap<String, Object> row : dataset.dataset){\n if(this.eventExpression.MatchExpression(row))\n result.addRow(row);\n }\n return result;\n }", "public T evaluate(String expr, Map<String, Expression> dataSet) {\n List<Token> tokens = ExpressionParser.parse(expr);\n Expression expression = ExpressionBuilder.build(tokens);\n Visitor<T> visitor = new ExpressionVisitor<>(dataSet);\n return visitor.visit(expression);\n }", "public Object clone()\n {\n DataSetDivide new_op = new DataSetDivide( );\n // copy the data set associated\n // with this operator\n new_op.setDataSet( this.getDataSet() );\n new_op.CopyParametersFrom( this );\n\n return new_op;\n }", "public Expression copy(HashMap<String, VarNode> variables){\n\t\treturn new Expression(this.ExprNode.copy(variables));\n\t}", "@Override\n\tpublic DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException {\n\t\tFormRecentlyFilledDataSetDefinition dsd = (FormRecentlyFilledDataSetDefinition) dataSetDefinition;\n\t\tInteger total = dsd.getTotal();\n\t\t//PatientIdentifierType primaryIdentifierType = emrApiProperties.getPrimaryIdentifierType();\n\t\tStringBuilder sqlQuery = new StringBuilder(\n\t\t \"select\"\n\t\t + \" p.st_id as 'No. de patient attribué par le site', usr.username as utilisateur, entype.name as Fiche,\"\n\t\t + \" DATE(enc.date_created) as 'Date de création',\"\n\t\t + \" CASE WHEN enc.date_changed is null then enc.date_created ELSE enc.date_changed END as 'Dernière modification',\"\n\t\t + \" f.name as Fiches\");\n\t\tsqlQuery.append(\" FROM isanteplus.patient p, openmrs.encounter enc, openmrs.encounter_type entype, openmrs.form f, openmrs.users usr\");\n\t\tsqlQuery.append(\" WHERE p.patient_id=enc.patient_id\");\n\t\tsqlQuery.append(\" AND enc.encounter_type=entype.encounter_type_id\");\n\t\tsqlQuery.append(\" AND enc.form_id=f.form_id\");\n\t\tsqlQuery.append(\" AND enc.creator=usr.user_id\");\n\t\tsqlQuery.append(\" GROUP BY DATE(enc.date_created) DESC\");\n\t\tif (total > 0) {\n\t\t\tsqlQuery.append(\" LIMIT :total\");\n\t\t}\n\t\tSQLQuery query = sessionFactory.getCurrentSession().createSQLQuery(sqlQuery.toString());\n\t\t//query.setInteger(\"primaryIdentifierType\", primaryIdentifierType.getId());\n\t\t/*if (startDate != null) {\n\t\t\tquery.setTimestamp(\"startDate\", startDate);\n\t\t}\n\t\tif (startDate != null) {\n\t\t\tquery.setTimestamp(\"endDate\", endDate);\n\t\t}*/\n\t\t\n\t\tList<Object[]> list = query.list();\n\t\tSimpleDataSet dataSet = new SimpleDataSet(dataSetDefinition, context);\n\t\tfor (Object[] o : list) {\n\t\t\tDataSetRow row = new DataSetRow();\n\t\t\trow.addColumnValue(new DataSetColumn(\"numero\", \"numero\", String.class), o[0]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"utilisateur\", \"utilisateur\", String.class), o[1]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"fiche\", \"fiche\", String.class), o[2]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"creation\", \"creation\", String.class), o[3]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"modification\", \"modification\", String.class), o[4]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"fiches\", \"fiches\", String.class), o[5]);\n\t\t\tdataSet.addRow(row);\n\t\t}\n\t\treturn dataSet;\n\t}", "private Triple<List<Set<PredicateDefinition>>,List<PredicateDefinition>,Dataset> preprocessDataset(List<Clause> clauses, List<String> classifications, Set<PredicateDefinition> literalDefinitions, boolean discardPreprocessedClauses){\n List<PredicateDefinition> globalConstants = new ArrayList<PredicateDefinition>();\n for (PredicateDefinition def : literalDefinitions){\n if (def.isGlobalConstant()){\n globalConstants.add(def);\n }\n }\n Pair<Set<PredicateDefinition>,Dataset> pair = preprocess_impl(literalDefinitions, globalConstants, clauses, classifications, discardPreprocessedClauses);\n clauses = null;\n List<PredicateDefinition> outputOnlyLiteralDefinitions = new ArrayList<PredicateDefinition>();\n Set<PredicateDefinition> remainingLiteralDefinitions = new LinkedHashSet<PredicateDefinition>();\n for (PredicateDefinition def : pair.r){\n if (def.isOutputOnly()){\n outputOnlyLiteralDefinitions.add(def);\n } else {\n remainingLiteralDefinitions.add(def);\n }\n }\n List<Set<PredicateDefinition>> definitionsList = new ArrayList<Set<PredicateDefinition>>();\n for (PredicateDefinition output : outputOnlyLiteralDefinitions){\n definitionsList.add(Sugar.setFromCollections(connectedComponent(output, remainingLiteralDefinitions), Sugar.set(output)));\n }\n return new Triple<List<Set<PredicateDefinition>>,List<PredicateDefinition>,Dataset>(definitionsList, globalConstants, pair.s);\n }", "DataSet toDataSet(Object adaptee);", "DataSource clone();", "DataContext copy();", "public DataSet getDataSet() {\r\n return dataBinder.getDataSet();\r\n }", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public Object clone() throws CloneNotSupportedException {\r\n\t\t// Shallow clone\r\n\t\tExpression v = (Expression) super.clone();\r\n\t\tv.eval_stack = null;\r\n\t\t// v.text = new StringBuffer(new String(text));\r\n\t\tint size = elements.size();\r\n\t\tArrayList cloned_elements = new ArrayList(size);\r\n\t\tv.elements = cloned_elements;\r\n\r\n\t\treturn v;\r\n\t}", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "DataSet sql(SQLContext context, String sql);", "public ExpressedConditionRecord clone() {\n ExpressedConditionRecord data = new ExpressedConditionRecord(this.person);\n data.sources.putAll(this.sources);\n return data;\n }", "public ProcessedDynamicData deepCopy( ) {\r\n\r\n ProcessedDynamicData copy = new ProcessedDynamicData( this.channelId );\r\n\r\n copy.channelId = this.channelId;\r\n copy.dateTimeStamp = new java.util.Date( this.dateTimeStamp.getTime() );\r\n copy.samplingRate = this.samplingRate;\r\n copy.eu = this.eu;\r\n\r\n copy.min = this.min;\r\n copy.max = this.max;\r\n\r\n copy.measurementType = this.measurementType;\r\n copy.measurementUnit = this.measurementUnit;\r\n\r\n // data and labels\r\n List<Double> dataCopy = new Vector<Double>();\r\n for( int i = 0; i < this.data.size(); i++ ) {\r\n dataCopy.add( new Double( this.data.get( i ) ) );\r\n }\r\n copy.setData( dataCopy );\r\n\r\n List<Double> dataLabels = new Vector<Double>();\r\n for( int i = 0; i < this.dataLabels.size(); i++ ) {\r\n dataLabels.add( new Double( this.dataLabels.get( i ) ) );\r\n }\r\n copy.setDataLabels( dataLabels );\r\n\r\n // create a deep copy of overalls\r\n if( overalls != null ) {\r\n copy.overalls = new OverallLevels( this.overalls.getChannelId() );\r\n copy.overalls.setDateTimeStampMillis( this.getDateTimeStampMillis() );\r\n Vector<String> overallKeys = this.overalls.getKeys();\r\n for( int i = 0; i < overallKeys.size(); i++ ) {\r\n copy.overalls.addOverall( new String( overallKeys.elementAt( i ) ),\r\n new Double( this.overalls.getOverall( overallKeys.elementAt( i ) ) ) );\r\n }\r\n }\r\n\r\n copy.xEUnit = this.xEUnit;\r\n copy.yEUnit = this.yEUnit;\r\n\r\n copy.xSymbol = this.xSymbol;\r\n copy.ySymbol = this.ySymbol;\r\n copy.xPhysDomain = this.xPhysDomain;\r\n copy.yPhysDomain = this.yPhysDomain;\r\n \r\n copy.noOfAppendedZeros = this.noOfAppendedZeros;\r\n\r\n return copy;\r\n }", "protected void fillDataset(Dataset dataset) {\n dataset.getDefaultModel().getGraph().add(SSE.parseTriple(\"(<x> <p> 'Default graph')\")) ;\n \n Model m1 = dataset.getNamedModel(graph1) ;\n m1.getGraph().add(SSE.parseTriple(\"(<x> <p> 'Graph 1')\")) ;\n m1.getGraph().add(SSE.parseTriple(\"(<x> <p> 'ZZZ')\")) ;\n \n Model m2 = dataset.getNamedModel(graph2) ;\n m2.getGraph().add(SSE.parseTriple(\"(<x> <p> 'Graph 2')\")) ;\n m2.getGraph().add(SSE.parseTriple(\"(<x> <p> 'ZZZ')\")) ;\n calcUnion.add(m1) ;\n calcUnion.add(m2) ;\n }", "public void setData(List<E> newDataSet) {\n\t\tdata.addAll(newDataSet);\n\t}", "public Matrix copy() {\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j];\n }\n }\n return X;\n }", "public DataFrame copy() {\n return new DataFrame(data.values, header.values, index.values);\n }", "private ASTQuery() {\r\n dataset = Dataset.create();\r\n }", "public Builder dataset(String newDataset) {\n dataset = newDataset;\n return this;\n }", "public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}", "private XYDataset createSampleDataset(GradientDescent gd) {\n XYSeries predictedY = new XYSeries(\"Predicted Y\");\n XYSeries actualY = new XYSeries(\"Actual Y\");\n List<BigDecimal> xValues = gd.getInitialXValues();\n List<BigDecimal> yPred = gd.getPredictedY(xValues);\n List<BigDecimal> yActual = gd.getInitialYValues();\n for (int cont = 0; cont < xValues.size(); cont++){\n \tpredictedY.add(xValues.get(cont), yPred.get(cont));\n \tSystem.out.println(\"pred: \" + xValues.get(cont) + \", \" + yPred.get(cont));\n \tactualY.add(xValues.get(cont), yActual.get(cont));\n \tSystem.out.println(\"actual: \" + xValues.get(cont) + \", \" + yActual.get(cont));\n\t\t}\n XYSeriesCollection dataset = new XYSeriesCollection();\n dataset.addSeries(predictedY);\n dataset.addSeries(actualY);\n return dataset;\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "private Instances deepCopy(Instances data) {\n Instances newInst = new Instances(data);\n\n newInst.clear();\n\n for (int i = 0; i < data.size(); i++) {\n Instance ni = new DenseInstance(data.numAttributes());\n for (int j = 0; j < data.numAttributes(); j++) {\n ni.setValue(newInst.attribute(j), data.instance(i).value(data.attribute(j)));\n }\n newInst.add(ni);\n }\n\n return newInst;\n }", "public CFExp deepCopy(){\r\n return this;\r\n }", "public static Expression getCopy(Expression exp) {\n\t\tExpression expcopy = (Expression) EcoreUtil.copy(exp);\t\n\t\treturn expcopy;\n\t}", "@Override\n\tAlgebraicExpression clone();", "List<? extends ExpData> getExpDatas(ExpDataClass dataClass);", "public VirtualDataSet(ActualDataSet source, int[] rows, Attribute[] attributes) { \n\t\tthis.source = source;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sets the reference of VirtualDataSet's source to the ActualDataSet \n\t\tthis.numAttributes = attributes.length;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sets the variable numAttributes to be the number of attributes being passed in\n\t\tthis.numRows = rows.length;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sets the variable numRows to be the number of indexes being passed in the parameter\n\t\tthis.attributes = attributes;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sets the variable attributes to reference the attributes array being passed in the parameters\n\t\tint[] copyOfRows = new int[rows.length];\t\t\t\t\t\t\t\t\t\t\t\t\t//Creates a new copy of int array rows and stores it within variable copyOfRows\n\t\tfor(int i =0; i<copyOfRows.length; i++){\n\t\t\tcopyOfRows[i] = rows[i];\n\t\t}\n\t\tmap = copyOfRows;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sets the variable map to reference rows\n\n\t\tAttribute[] copyOfAttributes = new Attribute[attributes.length];\t\t\t\t\t\t\t//Creates a deep copy of attributes array and stores it within variable copyOfAttributes\n\t\tfor(int i =0; i<attributes.length; i++){\n\t\t\tcopyOfAttributes[i] = attributes[i].clone();\n\t\t}\n\t\tfor(int j = 0; j<attributes.length; j++){\t\t\t\t\t\t\t\t\t\t\t\t\t//Loops through each attribute individually\n\t\t\tString []newValues = new String[rows.length];\t\t\t\t\t\t\t\t\t\t\t//Declares a new String array called newValues\n\t\t\tfor(int i =0; i<rows.length; i++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Loops through the rows array and stores the attributes corresponding to the indexes in rows array into String array newValues\n\t\t\t\tnewValues[i] = source.getValueAt(rows[i],copyOfAttributes[j].getAbsoluteIndex());\t\n\t\t\t}\n\t\t\tcopyOfAttributes[j].replaceValues(newValues);\t\t\t\t\t\t\t\t\t\t\t//Replaces the values stored within attributes array copyOfAttributes with newValues\t\t\t\t\n\t\t\tcopyOfAttributes[j].replaceValues(getUniqueAttributeValues(copyOfAttributes[j].getAbsoluteIndex()));\t//Replaces the values of attribute copyOfAttribute with the non-duplicated String array newValues\n\t\t}\n\n\t\tthis.attributes = copyOfAttributes;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Sets the reference of attributes to the newly edited attributes array copyOfAttributes\n\n\t}", "protected MapDataSet mergeDataSets(List<MapDataSet> dataSets, MergingDataSetDefinition dataSetDefinition, EvaluationContext context) {\n \t\tMapDataSet ret = new MapDataSet(dataSetDefinition, context);\n \n \t\tList<DataSetColumn> columns = new ArrayList<DataSetColumn>();\n \n \t\t// Gather all columns from all contained data sets\n \t\tfor (DataSet dataSet : dataSets) {\n \t\t\tfor (DataSetColumn column : dataSet.getMetaData().getColumns()) {\n \t\t\t\tcolumns.add(column);\n \t\t\t}\n \t\t}\n \n \t\t// Sort the columns according to the merge order\n \t\tif (MergingDataSetDefinition.MergeOrder.NAME.equals(dataSetDefinition.getMergeOrder())) {\n \t\t\tCollections.sort(columns, new Comparator<DataSetColumn>() {\n \t\t\t\t@Override\n \t\t\t\tpublic int compare(DataSetColumn column1, DataSetColumn column2) {\n \t\t\t\t\treturn OpenmrsUtil.compareWithNullAsGreatest(column1.getName(), column2.getName());\n \t\t\t\t}\n \t\t\t});\n \t\t}\n \t\telse if (MergingDataSetDefinition.MergeOrder.LABEL.equals(dataSetDefinition.getMergeOrder())) {\n \t\t\tCollections.sort(columns, new Comparator<DataSetColumn>() {\n \t\t\t\t@Override\n \t\t\t\tpublic int compare(DataSetColumn column1, DataSetColumn column2) {\n \t\t\t\t\treturn OpenmrsUtil.compareWithNullAsGreatest(column1.getLabel(), column2.getLabel());\n \t\t\t\t}\n \t\t\t});\n \t\t}\n \n \t\tret.getMetaData().setColumns(columns);\n \n \t\t// Gather column data values from all contained data sets\n \t\tfor (MapDataSet dataSet : dataSets) {\n \t\t\tfor (DataSetColumn column : dataSet.getMetaData().getColumns()) {\n \t\t\t\tret.addData(column, getDataSetData(dataSet, column));\n \t\t\t}\n \t\t}\n \n \t\treturn ret;\n \t}", "public ExprMatrix simplify() ;", "public Object clone() {\n SetQuery copy = new SetQuery(this.operation);\n\n this.copyMetadataState(copy);\n\n copy.leftQuery = (QueryCommand)this.leftQuery.clone();\n copy.rightQuery = (QueryCommand)this.rightQuery.clone();\n\n copy.setAll(this.all);\n\n if(this.getOrderBy() != null) {\n copy.setOrderBy(this.getOrderBy().clone());\n }\n\n if(this.getLimit() != null) {\n copy.setLimit( this.getLimit().clone() );\n }\n\n copy.setWith(LanguageObject.Util.deepClone(this.getWith(), WithQueryCommand.class));\n\n if (this.projectedTypes != null) {\n copy.setProjectedTypes(new ArrayList<Class<?>>(projectedTypes), this.metadata);\n }\n\n return copy;\n }", "public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Testing expression creation and evaluation.\\n\");\n\n ExpNode e1 = new Bin0pNode(\"+\", new VariableNode(), new ConstNode(3));\n ExpNode e2 = new Bin0pNode(\"*\", new ConstNode(2), new VariableNode());\n ExpNode e3 = new Bin0pNode(\"-\", e1, e2);\n ExpNode e4 = new Bin0pNode(\"/\", e1, new ConstNode(-3));\n\n System.out.println(\"For x = 3: \");\n System.out.println(\" \" + e1 + \" = \" + e1.value(3));\n System.out.println(\" \" + e2 + \" = \" + e2.value(3));\n System.out.println(\" \" + e3 + \" = \" + e3.value(3));\n System.out.println(\" \" + e4 + \" = \" + e4.value(3));\n\n System.out.println(\"nTesting copying...\");\n System.out.println(\" copy of \" + e1 + \" gives \" + copy(e1));\n System.out.println(\" copy of \" + e2 + \" gives \" + copy(e2));\n System.out.println(\" copy of \" + e3 + \" gives \" + copy(e3));\n System.out.println(\" copy of \" + e4 + \" gives \" + copy(e4));\n\n // make a copy of e3, where e3.left is e1\n ExpNode e3copy = copy(e3);\n // make a mdification to e1\n ((Bin0pNode)e1).left = new ConstNode(17);\n System.out.println(\" modified e3: \" + e3 + \"; copy should be unmodified: \" + e3copy);\n\n System.out.println(\"nChecking test data...\");\n double[][] dt = makeTestData();\n for (int i = 0; i < dt.length; i++) {\n System.out.println(\" x = \" + dt[i][0] + \"; y = \" + dt[i][1]);\n\n }\n }", "public Dataset from(From... graphs) {\n\t\taddElements(graphs);\n\n\t\treturn this;\n\t}", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "private Dataset generateDatasetReplicaWithDiscretizedAttributes(Dataset dataset, List<OperatorAssignment> unaryOperatorAssignments, OperatorsAssignmentsManager oam) throws Exception {\n Dataset replicatedDatast = dataset.replicateDataset();\n for (OperatorAssignment oa : unaryOperatorAssignments) {\n ColumnInfo ci = oam.generateColumn(replicatedDatast, oa, true);\n replicatedDatast.addColumn(ci);\n }\n return replicatedDatast;\n }", "public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {\n \treturn this;\n }", "public final ExpressionJpa getExpression(final ExpressionDAO exprDAO) {\n final ExpressionJpa expr = exprDAO.getNew();\n\n final ExprMap exprMap =\n new ExprMap(marcRecord, work);\n\n // -- titleOfTheExpression\n // ExpressionTitle titles\n expr.getTitles().addAll(exprMap.mapTitles(expr));\n\n // -- formOfExpression\n // ExpressionForm forms\n expr.getForms().addAll(exprMap.mapForms(expr));\n\n // -- dateOfExpression\n // ExpressionDate dates\n expr.getDates().addAll(exprMap.mapDates(expr));\n\n // -- languageOfExpression\n // ExpressionLanguage languages\n expr.getLanguages().addAll(exprMap.mapLanguages(expr));\n\n // -- otherDistinguishingCharacteristic\n // not mapped\n // ExpressionCharacteristic characteristics\n\n // -- extentOfTheExpression\n // ExpressionExtent extents\n expr.getExtents().addAll(exprMap.mapExtents(expr));\n\n // -- summarizationOfContent\n // not mapped\n // ExpressionSummarization summarizations\n\n // -- contextForTheExpression\n // not mapped\n // ExpressionContext contexts\n\n // -- criticalResponseToTheExpression\n // not mapped\n // ExpressionResponse responses\n\n // -- typeOfScore\n // ExpressionScoreType scoreType\n expr.getScoreType().addAll(\n exprMap.mapScoreType(expr));\n\n // -- mediumOfPerformance\n // ExpressionPerformanceMedium performanceMediums\n expr.getPerformanceMediums().addAll(\n exprMap.mapPerformanceMediums(expr));\n\n // -- note\n // ExpressionNote notes\n expr.getNotes().addAll(exprMap.mapNotes(expr));\n\n // -- placeOfPerformance\n // ExpressionPerformancePlace performancePlace\n expr.getPerformancePlace().addAll(exprMap.mapPerformancePlace(expr));\n\n // -- key\n // ExpressionKey keys\n expr.getKeys().addAll(exprMap.mapKeys(expr));\n\n // -- genreFormStyle\n // ExpressionGenre genres\n expr.getGenres().addAll(exprMap.mapGenres(expr));\n\n return expr;\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public IndexedDataSet<T> getDataSet();", "protected Dataset readDatasetX(Reader datasetReader) throws IOException {\n List<Clause> clauses = new ArrayList<Clause>();\n List<String> classifications = new ArrayList<String>();\n readExamples(datasetReader, clauses, classifications);\n MemoryBasedDataset dataset = new MemoryBasedDataset();\n for (int i = 0; i < clauses.size(); i++){\n dataset.addExample(new Example(clauses.get(i)), classifications.get(i));\n }\n return dataset;\n }", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "@Override\n\tpublic OnlineRegression copyNew() {\n\t\tBayesianLinearRegression copy = new BayesianLinearRegression(dimension, this.prioriMeans, prioriPrecision);\n\t\tcopy.weights = this.weights.copyNew();\n\t\tcopy.covariance = this.covariance.copyNew();\n\t\tcopy.b = this.b.copyNew();\n\t\tcopy.numTrainedInstances = this.numTrainedInstances;\n\t\treturn copy;\n\t}", "private ValueConstraint getConstraintFromFilters(Set<ElementFilter> filters) {\n\t\tExpr left = null;\r\n\t\tfor (ElementFilter filter : filters) {\r\n\t\t\tExpr filterExpr = ValueConstraintUtils.deepCopyExpr(filter.getExpr()); // create a copy of the expression\r\n\t\t\tif (left == null) {\r\n\t\t\t\tleft = filterExpr;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tleft = new E_LogicalAnd(left, filterExpr);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ValueConstraint(left);\r\n\t}", "public void setExpressions(List<Subscription> expressions) {\n this.expressions = expressions;\n }", "@Test\n public void sharedFilterEnsuresUniqueResults() {\n Filter filter = new Filter(\"test-filter\");\n final Dataset dataset1 = new Dataset(\"TEST1\", \"sql\", filter);\n final Dataset dataset2 = new Dataset(\"TEST2\", \"sql2\", filter); // shared same filter\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"001\");\n entry1.add(\"aaa\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"002\");\n entry2.add(\"bbb\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"003\");\n entry3.add(\"ccc\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"004\");\n entry4.add(\"ddd\");\n\n List<List<String>> queryResults1 = new ArrayList<>();\n queryResults1.add(entry1);\n queryResults1.add(entry2);\n queryResults1.add(entry3);\n queryResults1.add(entry4);\n\n List<String> entry5 = new ArrayList<>();\n entry5.add(\"005\"); // different\n entry5.add(\"eee\");\n\n List<String> entry6 = new ArrayList<>();\n entry6.add(\"002\"); // same\n entry6.add(\"bbb\");\n\n List<String> entry7 = new ArrayList<>();\n entry7.add(\"007\"); // different\n entry7.add(\"fff\");\n\n List<String> entry8 = new ArrayList<>();\n entry8.add(\"004\"); // same\n entry8.add(\"ddd\");\n\n List<List<String>> queryResults2 = new ArrayList<>();\n queryResults2.add(entry5);\n queryResults2.add(entry6);\n queryResults2.add(entry7);\n queryResults2.add(entry8);\n\n // given\n dataset1.populateCache(queryResults1, 200L);\n dataset2.populateCache(queryResults2, 300L);\n\n // when\n final List<String> result1 = dataset1.getCachedResult();\n final List<String> result2 = dataset1.getCachedResult();\n final List<String> result3 = dataset1.getCachedResult();\n final List<String> result4 = dataset1.getCachedResult();\n final List<String> result5 = dataset2.getCachedResult();\n final List<String> result6 = dataset2.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1); // first datset is as-is\n assertEquals(\"Wrong result 2\", entry2, result2); // first datset is as-is\n assertEquals(\"Wrong result 3\", entry3, result3); // first datset is as-is\n assertEquals(\"Wrong result 4\", entry4, result4); // first datset is as-is\n assertEquals(\"Wrong result 3\", entry5, result5); // second datset, not filtered out\n assertEquals(\"Wrong result 3\", entry7, result6); // second dataset, entry6 is filtered out\n\n // and\n try {\n dataset1.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n try {\n // entry7 should be filtered out, resulting in no more data\n dataset2.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST2\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset1.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(200L), dataset1.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(5), dataset1.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.empty(), dataset1.getMetrics().getFilteredOut());\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset2.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(300L), dataset2.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(3), dataset2.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.of(2), dataset2.getMetrics().getFilteredOut());\n }", "Expression createExpression();", "@Test\n @Ignore\n public void testReplaceCommonSubexpression() throws Exception {\n\n checkPlanning( ProjectRemoveRule.INSTANCE, \"select d1.deptno from (select * from dept) d1, (select * from dept) d2\" );\n }", "public Set<DataSet> getMatchingDataSets(FilterSettingsXML xml) {\n Set<DataSet> filteredDataSets = new HashSet<DataSet>();\n\n // Get the filter types\n ArrayList<FilterTypeXML> filterTypeList = xml.getFilterTypeList();\n\n HashMap<String, ArrayList<String>> filterMap = new HashMap<String, ArrayList<String>>();\n\n // Now filter the available data values\n for (FilterTypeXML filterType : filterTypeList) {\n if (filterType.getValues().size() > 0) {\n filterMap.put(filterType.getFilterType(),\n filterType.getValues());\n }\n }\n\n List<String> providers = null;\n List<String> dataSetNames = null;\n Set<LevelType> levels = null;\n List<String> parameterNames = null;\n\n // iterate over the filters\n for (String filterType : filterMap.keySet()) {\n List<String> values = filterMap.get(filterType);\n\n // If there are no values to filter on, just continue to the next\n // filter\n if (values == null) {\n continue;\n }\n\n if (filterType.equalsIgnoreCase(\"Data Provider\")) {\n providers = values;\n } else if (filterType.equalsIgnoreCase(\"Data Set\")) {\n dataSetNames = values;\n } else if (filterType.equalsIgnoreCase(\"Level\")) {\n levels = new HashSet<LevelType>(values.size());\n for (String value : values) {\n levels.add(LevelType.fromDescription(value));\n }\n } else if (filterType.equalsIgnoreCase(\"Parameter\")) {\n parameterNames = values;\n }\n }\n\n // Add data set types\n List<String> dataSetTypes = xml.getDataSetTypes();\n\n try {\n filteredDataSets.addAll(DataDeliveryHandlers.getDataSetHandler()\n .getByFilters(providers, dataSetNames, levels,\n parameterNames, dataSetTypes, envelope));\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the filtered datasets.\", e);\n }\n\n return filteredDataSets;\n }", "private Sql returnsRows(boolean unordered, String[] rows) {\n try (Planner planner = createPlanner()) {\n final RelNode convert;\n if (relFn != null) {\n convert = withRelBuilder(relFn);\n } else {\n SqlNode parse = planner.parse(sql);\n SqlNode validate = planner.validate(parse);\n final RelRoot root = planner.rel(validate);\n convert = project ? root.project() : root.rel;\n }\n final MyDataContext dataContext =\n new MyDataContext(rootSchema, convert);\n assertInterpret(convert, dataContext, unordered, rows);\n return this;\n } catch (ValidationException\n | SqlParseException\n | RelConversionException e) {\n throw Util.throwAsRuntime(e);\n }\n }", "public Table copy() {\n\t\tTableImpl vt;\n\n\t\t// Copy failed, maybe objects in a column that are not serializable.\n\t\tColumn[] cols = new Column[this.getNumColumns()];\n\t\tColumn[] oldcols = this.getColumns();\n\t\tfor (int i = 0; i < cols.length; i++) {\n\t\t\tcols[i] = oldcols[i].copy();\n\t\t}\n\t\tint[] newsubset = new int[subset.length];\n\t\tSystem.arraycopy(subset, 0, newsubset, 0, subset.length);\n\t\tvt = new SubsetTableImpl(cols, newsubset);\n\t\tvt.setLabel(this.getLabel());\n\t\tvt.setComment(this.getComment());\n\t\treturn vt;\n\t}", "public IDataSet loadMaterializedDataSet(Set<FieldDescriptor> columns) throws DataSourceException;", "public INodo copy(){\n INodo copia = new FuncionMultiplicacion(getRaiz(), getNHijos());\n copia.setEtiqueta(getEtiqueta());\n for (INodo aux : getDescendientes()){\n copia.incluirDescendiente(aux.copy());\n }\n return copia;\n }", "public ParameterSet[] getParameterSetArray(String subExpression) {\n ParameterSet[] result = null;\n String expression = contextNode + \"/\" + subExpression;\n try {\n NodeList nl = (NodeList)xp.evaluate(expression, source, XPathConstants.NODESET);\n int n = nl.getLength();\n // If there is a single item and it is a template, drop it \n if (n == 1 && (Boolean)nl.item(0).getUserData(\"isTemplate\")) \n return new ParameterSet[0];\n if (n > 0) {\n result = new ParameterSet[n];\n for (int i = 0; i < n; i++) {\n result[i] = (ParameterSet) nl.item(i).getUserData(\"parameterSetObject\");\n }\n }\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n return result;\n }", "DExpression getExpression();", "public Object clone()\n {\n return new ReturnStatement((Expression) expression.clone(), -1, -1);\n }", "public Table shallowCopy() {\n\t\tSubsetTableImpl vt =\n\t\t\tnew SubsetTableImpl(this.getColumns(), this.subset);\n\t\tvt.setLabel(getLabel());\n\t\tvt.setComment(getComment());\n\t\treturn vt;\n\t}", "public abstract DataTableDefinition clone();", "DataFrame<R,C> copy();", "public final DataSet getDataSet(final String dataSetType) {\n return DataSetFactory.getDataSet(dataSetType);\n }", "static List<Expression> addOrReplaceColumns(\n List<String> inputFields, List<Expression> newExpressions) {\n LinkedHashMap<String, Expression> finalFields = new LinkedHashMap<>();\n\n inputFields.forEach(field -> finalFields.put(field, unresolvedRef(field)));\n newExpressions.forEach(\n expr -> {\n String name = extractName(expr).orElse(expr.toString());\n finalFields.put(name, expr);\n });\n\n return new ArrayList<>(finalFields.values());\n }", "private IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\tFile file = new File(\"src/test/resources/lote.xml\");\r\n\t\tIDataSet dataSet = new FlatXmlDataSet(file);\r\n\t\treturn dataSet;\r\n\t}", "private Dataset createDataset1() {\n final RDF factory1 = createFactory();\n\n final IRI name = factory1.createIRI(\"http://xmlns.com/foaf/0.1/name\");\n final Dataset g1 = factory1.createDataset();\n final BlankNode b1 = createOwnBlankNode(\"b1\", \"0240eaaa-d33e-4fc0-a4f1-169d6ced3680\");\n g1.add(b1, b1, name, factory1.createLiteral(\"Alice\"));\n\n final BlankNode b2 = createOwnBlankNode(\"b2\", \"9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f\");\n g1.add(b2, b2, name, factory1.createLiteral(\"Bob\"));\n\n final IRI hasChild = factory1.createIRI(\"http://example.com/hasChild\");\n g1.add(null, b1, hasChild, b2);\n\n return g1;\n }", "@Override\n\tpublic DataSet getDataSet() {\n\t\treturn mDataSet;\n\t}", "public CategoryDataset createDataset() {\n\t\tfinal DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\tProjectManagement projectManagement = new ProjectManagement();\n\t\tif (this.chartName == \"Earned Value\") {\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getEarnedValue(date), \"Earned Value\", date);\n\t\t\t}\n\t\t} else if (this.chartName == \"Schedule Variance\") {\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getScheduleVariance(date), \"Schedule Variance\", date);\n\t\t\t}\n\n\t\t} else {// Cost Variance\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getCostVariance(date), \"Cost Variance\", date);\n\t\t\t}\n\t\t}\n\t\treturn dataset;\n\t}", "public IRule getCopy()\r\n\t{\r\n\t\tList<ICondition> theConditions = new ArrayList<ICondition>();\r\n\t\ttheConditions.addAll(this.conditions);\r\n\t\tIRule rule = new Rule(theConditions);\r\n\t\treturn rule;\r\n\t}", "public ExprMatrix withCache();", "private Expression transform(Expression exp)\n {\n return UseContracts.execute(exp, fun, callers);\n }", "public Object getExpression();", "@Override\n\tpublic void buildEvaluator(Instances data) throws Exception {\n\t\tthis.instances = data;\n\t}", "public ConditionWithSymptoms clone() {\n ConditionWithSymptoms data = new ConditionWithSymptoms(conditionName, onsetTime, endTime);\n data.symptoms.putAll(this.symptoms);\n return data;\n }", "public void setDataSet(DataSet dataSet) {\r\n dataBinder.setDataSet(dataSet);\r\n }", "public void setDataSets(List<DataSet> dataSets)\n {\n this.dataSets = dataSets;\n }", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "List getExpressions();", "private static MarketDataSet createTestMarketData() {\n final MarketDataSet dataSet = MarketDataSet.empty();\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"AUDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.8);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"NZDUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 2.2);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBPUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), 1.5);\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"GBP1Y\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)),\n ImmutableLocalDateDoubleTimeSeries.builder()\n .putAll(new LocalDate[] {LocalDate.of(2016, 1, 1), LocalDate.of(2016, 1, 2)}, new double[] {0.01, 0.02}).build());\n return dataSet;\n }", "public Dataset from(Iri... iris) {\n\t\taddElements(SparqlBuilder::from, iris);\n\n\t\treturn this;\n\t}", "@Override\n public EnumerableCalc copy( AlgTraitSet traitSet, AlgNode child, RexProgram program ) {\n return new EnumerableCalc( getCluster(), traitSet, child, program );\n }", "@Override\n protected PlanNode clone() throws CloneNotSupportedException {\n NestedLoopsJoinNode node = (NestedLoopsJoinNode) super.clone();\n\n // Clone the predicate.\n if (predicate != null)\n node.predicate = predicate.duplicate();\n else\n node.predicate = null;\n\n return node;\n }", "public void setDataSet(DataSet dataSet) {\r\n\t\tthis.dataSet = dataSet;\r\n\t}", "public List<Expression> getSubExpressions();", "private static ArrayList<Integer> expressionEvaluator(Expression expression, Table tableToApplySelectionOn) throws IOException, ParseException {\n\t\t\n\t\t\n\t\t\n\t\t// this is the actual list of indices that stores the indices of the tuples that satisfy all the conditions\n\t\tArrayList<Integer> listOfIndices = new ArrayList<Integer>();\n\n\t\t// this Table contains the resultant table after applying selection operation\n\t\tTable resultantTable = new Table(tableToApplySelectionOn);\n\t\tresultantTable.tableName = \"resultTable\";\n\n\t\t// the following conditions are to evaluate the EQUAL expression\n\t\tif (expression instanceof EqualsTo) {\n\t\t\t// this extracts the equal to clause in the WHERE clause\n\t\t\tEqualsTo equalsExpression = (EqualsTo) expression;\n\t\t\t\n\t\t\t// this extracts the left and the right expressions in the equal to clause\n\t\t\tExpression leftExpression = ((Expression) equalsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) equalsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(equalsExpression, tableToApplySelectionOn);\n\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\t//System.out.println(tableToApplySelectionOn);\n\t\t\t\t//System.out.println(tableToApplySelectionOn.columnDescriptionList);\n\t\t\t\t//System.out.println(tableToApplySelectionOn.columnIndexMap);\n\t\t\t\t/*System.out.println(leftVal);\n\t\t\t\tSystem.out.println(tableToApplySelectionOn.columnIndexMap.get(leftVal));\n\t\t\t\t*/\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\t\t\t\t\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"string\") || type.equalsIgnoreCase(\"char\") || type.equalsIgnoreCase(\"varchar\")) {\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\tif (array[index].equals(rightArray[rightIndex])) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (array[index].equals(rightArray[rightIndex].substring(1,rightArray[rightIndex].length() - 1))) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) == Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0]) && Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1]) && Integer.parseInt(leftDate[2]) == Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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} else if (expression instanceof NotEqualsTo) {\n\n\t\t\n\t\t\t\n\t\t\t// this extracts the equal to clause in the WHERE clause\n\t\t\tNotEqualsTo equalsExpression = (NotEqualsTo) expression;\n\t\t\t\n\t\t\t// this extracts the left and the right expressions in the equal to clause\n\t\t\tExpression leftExpression = ((Expression) equalsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) equalsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(equalsExpression, tableToApplySelectionOn);\n\n\t\t\t} else {\n\t\t\n\t\t\t\t\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\t\t\t\t\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"string\") || type.equalsIgnoreCase(\"char\") || type.equalsIgnoreCase(\"varchar\")) {\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\tif (!array[index].equals(rightArray[rightIndex])) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\tif (!array[index].equals(rightArray[rightIndex].substring(1,rightArray[rightIndex].length() - 1))) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) != Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) != Integer.parseInt(rightDate[0]) && Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1]) && Integer.parseInt(leftDate[2]) != Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\n\t\telse if (expression instanceof GreaterThanEquals) {\n\t\t\t\n\t\t\tGreaterThanEquals greaterThanEqualsExpression = (GreaterThanEquals) expression;\n\t\t\tExpression leftExpression = ((Expression) greaterThanEqualsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) greaterThanEqualsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(greaterThanEqualsExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) >= Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) < Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) < Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) < Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*if(tableToApplySelectionOn.tableName.equalsIgnoreCase(\"lineitem\") && expression.toString().equals(\"lineitem.receiptdate >= date('1994-01-01')\")){\n\t\t\t\t\t//System.out.println(listOfIndices);\n\t\t\t\t\t}*/\n\t\t\t}\n\t\t} else if (expression instanceof GreaterThan) {\n\t\t\t\n\t\t\tGreaterThan greaterThanExpression = (GreaterThan) expression;\n\t\t\tExpression leftExpression = ((Expression) greaterThanExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) greaterThanExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(greaterThanExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) > Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) < Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) < Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) <= Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\telse if (expression instanceof MinorThan) {\n\t\t\tMinorThan minorThanExpression = (MinorThan) expression;\n\n\t\t\tExpression leftExpression = ((Expression) minorThanExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) minorThanExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression|| rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(minorThanExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) < Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) > Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) > Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) >= Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t/*if(tableToApplySelectionOn.tableName.equalsIgnoreCase(\"lineitem\") && expression.toString().equals(\"lineitem.commitdate < lineitem.receiptdate\")){\n\t\t\t\t\tSystem.out.println(listOfIndices);\n\t\t\t\t\t}*/\n\t\t\t}\n\t\t}\n\t\telse if (expression instanceof MinorThanEquals) {\n\t\t\t\n\t\t\tMinorThanEquals minorEqualsThan = (MinorThanEquals) expression;\n\t\t\tExpression leftExpression = ((Expression) minorEqualsThan.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) minorEqualsThan.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(minorEqualsThan,tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) <= Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) > Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) > Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) > Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (expression instanceof AndExpression) {\n\t\t\t\n\t\t\tAndExpression andExpression = (AndExpression) expression;\n\t\t\tExpression leftVal = ((Expression) andExpression.getLeftExpression());\n\t\t\tExpression rightVal = ((Expression) andExpression.getRightExpression());\n\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftVal, tableToApplySelectionOn);\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightVal, tableToApplySelectionOn);\n\n\t\t\tArrayList<Integer> set = new ArrayList<Integer>();\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tif (rightArr.contains(i)) {\n\t\t\t\t\tset.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlistOfIndices = set;\n\t\t}\n\n\t\telse if (expression instanceof OrExpression) {\n\t\t\t\n\t\t\t\n\t\t\tOrExpression orExpression = (OrExpression) expression;\n\t\t\tExpression leftVal = ((Expression) orExpression.getLeftExpression());\n\t\t\tExpression rightVal = ((Expression) orExpression.getRightExpression());\n\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftVal, tableToApplySelectionOn);\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightVal, tableToApplySelectionOn);\n\t\t\t\t\t\t\n\t\t\tTreeSet<Integer> set = new TreeSet<Integer>();\n\t\t\t\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\tfor (int i : rightArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i : set) {\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if (expression instanceof Parenthesis){\n\t\t\t\n\t\t\tArrayList<Integer> expArr = expressionEvaluator(((Parenthesis)expression).getExpression(), tableToApplySelectionOn);\n\t\t\t\n\t\t\tfor(int i:expArr){\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn listOfIndices;\n\t}", "public Expression simplify() {\r\n return this;\r\n }", "public static <T extends Row> DataSet<T> toDS(List<T> data) {\n return new DataSet<>(data);\n }", "public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }", "Expression getExpression(long id);", "void fit(DataSet dataSet);", "@Override\n\tpublic List<IvisObject> onDataSourceChanged(IvisQuery query_globalSchema,\n\t\t\tList<String> subquerySelectors_globalSchema, List<String> recordIds) throws Exception {\n\t\tIvisQuery query_localSchema = this.transformToLocalQuery(query_globalSchema);\n\n\t\tMap<String, String> subqueries_global_and_local_schema = this\n\t\t\t\t.transformIntoGlobalAndLocalSubqueries(query_globalSchema, subquerySelectors_globalSchema);\n\n\t\t/*\n\t\t * is of type IvisQuery\n\t\t */\n\t\tIvisQuery query_modifiedRecord = (IvisQuery) createQueryForModifiedRecords(recordIds, query_localSchema);\n\n\t\tList<IvisObject> results = this.executeLocalQuery(query_modifiedRecord, subqueries_global_and_local_schema,\n\t\t\t\tquery_globalSchema);\n\n\t\tList<IvisObject> modifiedObjects = new ArrayList<IvisObject>();\n\n\t\tfor (IvisObject ivisObject : results) {\n\n\t\t\tif (this.passesClientFilters(ivisObject, query_localSchema, query_globalSchema))\n\t\t\t\tmodifiedObjects.add(ivisObject);\n\t\t}\n\n\t\treturn modifiedObjects;\n\n\t}", "private XYMultipleSeriesDataset getdemodataset() {\n\t\t\tdataset1 = new XYMultipleSeriesDataset();// xy轴数据源\n\t\t\tseries = new XYSeries(\"温度 \");// 这个事是显示多条用的,显不显示在上面render设置\n\t\t\t// 这里相当于初始化,初始化中无需添加数据,因为如果这里添加第一个数据的话,\n\t\t\t// 很容易使第一个数据和定时器中更新的第二个数据的时间间隔不为两秒,所以下面语句屏蔽\n\t\t\t// 这里可以一次更新五个数据,这样的话相当于开始的时候就把五个数据全部加进去了,但是数据的时间是不准确或者间隔不为二的\n\t\t\t// for(int i=0;i<5;i++)\n\t\t\t// series.add(1, Math.random()*10);//横坐标date数据类型,纵坐标随即数等待更新\n\n\t\t\tdataset1.addSeries(series);\n\t\t\treturn dataset1;\n\t\t}", "Exp join(List<Exp> list) {\n Exp exp = list.get(0);\n\n for (int i = 1; i < list.size(); i++) {\n\n Exp cur = list.get(i);\n\n if (cur.type() == FILTER || exp.type() == FILTER) {\n // and\n if (exp.type() == AND) {\n exp.add(cur);\n } else {\n exp = Exp.create(AND, exp, cur);\n }\n } else {\n // variables that may be bound from environment (e.g. values)\n// exp.setNodeList(exp.getNodes());\n// cur.setNodeList(cur.getNodes());\n exp = Exp.create(JOIN, exp, cur);\n exp.bindNodes();\n }\n }\n\n return exp;\n }", "public Matrix copy() {\n Matrix m = new Matrix(rows, cols);\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n m.getMatrix().get(i)[j] = this.get(i, j);\n }\n }\n return m;\n }", "public List<Dataset> getDatasets();", "public final Data execeuteQueries() throws SQLException {\r\n\r\n\t\tStatement stat = con.createStatement();\r\n\t\tStatement stat2 = con.createStatement();\r\n\t\tStatement stat3 = con.createStatement();\r\n\r\n\t\t// will provide a list of all the parts starting from the one with the\r\n\t\t// highest cost\r\n\t\tResultSet result1 = stat\r\n\t\t\t\t.executeQuery(\"select sp.part_name,sp.cost_in_cents,sp.part_code from supplier_parts sp \"\r\n\t\t\t\t\t\t+ \"ORDER BY cost_in_cents DESC\");\r\n\r\n\t\t// getting all the suppliers\r\n\t\tResultSet result2 = stat2.executeQuery(\"SELECT * from suppliers\");\r\n\r\n\t\t// will provide the list of suppliers with their supplied parts\r\n\t\tResultSet result3 = stat3\r\n\t\t\t\t.executeQuery(\"select s.supplier_id,s.name, sp.part_name,sp.part_code\"\r\n\t\t\t\t\t\t+ \" from supplier_parts sp \"\r\n\t\t\t\t\t\t+ \"INNER JOIN suppliers s ON s.supplier_id = sp.supplier_id\");\r\n\r\n\t\t// adding all the parts to the total parts list\r\n\t\twhile (result1.next()) {\r\n\t\t\tString part_name = result1.getString(\"part_name\");\r\n\t\t\tint cost_of_part = result1.getInt(\"cost_in_cents\");\r\n\t\t\tString part_id = result1.getString(\"part_code\");\r\n\r\n\t\t\t/*\r\n\t\t\t * if (checkIfPartExists(dat, part_name)) {\r\n\t\t\t * System.out.println(\"Multiple records found for the same part\");\r\n\t\t\t * System.out.println(\"Part:\" + part_name +\r\n\t\t\t * \" already exists!! Skipping this part!!\"); } else {\r\n\t\t\t * dat.getParts_list().add( new Parts(part_name, part_id,\r\n\t\t\t * cost_of_part)); }\r\n\t\t\t */\r\n\r\n\t\t\t// assuming that all the parts are distinct\r\n\t\t\tdat.getParts_list()\r\n\t\t\t\t\t.add(new Parts(part_name, part_id, cost_of_part));\r\n\t\t}\r\n\r\n\t\t// adding all the suppliers to the list irrespective of parts supplied;\r\n\t\twhile (result2.next()) {\r\n\t\t\tint id = result2.getInt(\"supplier_id\");\r\n\t\t\tString name = result2.getString(\"name\");\r\n\t\t\tString code = result2.getString(\"code\");\r\n\t\t\tString tele = result2.getString(\"telephone_number\");\r\n\t\t\tString email = result2.getString(\"email_address\");\r\n\t\t\t// not checking for multiple entries because of id as the primary\r\n\t\t\t// key\r\n\t\t\tdat.getSuppliers_list().add(\r\n\t\t\t\t\tnew Supplier(id, name, code, tele, email));\r\n\t\t}\r\n\r\n\t\t// adding the parts to their suppliers\r\n\t\twhile (result3.next()) {\r\n\t\t\tString supplier_name = result3.getString(\"name\");\r\n\t\t\tString part_supplied = result3.getString(\"part_name\");\r\n\t\t\tint supplier_id = result3.getInt(\"supplier_id\");\r\n\t\t\tString part_code = result3.getString(\"part_code\");\r\n\r\n\t\t\tParts part = findPart(part_code, dat);\r\n\t\t\tif (part == null) {\r\n\t\t\t\tpart = new Parts(part_supplied, part_code);\r\n\t\t\t}\r\n\t\t\t// checking if it is a known supplier; if so part is added to the\r\n\t\t\t// supplied parts list\r\n\t\t\t// else new supplier is created with the part supplied\r\n\t\t\tif (checkIfSupplierExists(supplier_id, part, dat) == false) {\r\n\t\t\t\tdat.getSuppliers_list().add(\r\n\t\t\t\t\t\tnew Supplier(supplier_id, supplier_name, part));\r\n\t\t\t}\r\n\t\t}\r\n\t\t// closing all the connections\r\n\t\tstat.close();\r\n\t\tstat2.close();\r\n\t\tstat3.close();\r\n\t\tcon.close();\r\n\t\treturn dat;\r\n\t}", "public void setExpression(Object expression);", "public DatasetBean getDataset(Object ds) {\n DataSet dataset;\n DatasetBean newDatasetBean;\n\n if (ds instanceof DataSet) {\n dataset = (DataSet) ds;\n newDatasetBean = this.createDatasetBean(dataset);\n }\n\n else {\n if (this.datasetMap.get((String) ds) != null) {\n newDatasetBean = this.datasetMap.get(ds);\n } else {\n dataset = this.getOpenBisClient().getFacade().getDataSet((String) ds);\n newDatasetBean = this.createDatasetBean(dataset);\n }\n }\n this.datasetMap.put(newDatasetBean.getCode(), newDatasetBean);\n return newDatasetBean;\n }", "public ParameterSet getParameterSet(String subExpression) {\n ParameterSet result = null;\n String expression = contextNode + \"/\" + subExpression;\n try {\n Node n = (Node)xp.evaluate(expression, source, XPathConstants.NODE);\n result = (ParameterSet)n.getUserData(\"parameterSetObject\");\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n return result;\n }", "public static ArrayList<String> evaluateJoinCondition (Table table1,Table table2,Expression expression)\n\t{\n\t\tArrayList<String> arrayList = new ArrayList<String>();\n\n\t\tHashSet<String> set = extractCond(expression);\n\t\t\n\t\tfor(String s: set)\n\t\t{\n\t\t\tString[] strArr=null;\n\t\t\tif(s.contains(\"=\"))\n\t\t\t{\n\t\t\t\tstrArr=s.split(\"=\");\n\t\t\t\tfor (int i = 0; i < strArr.length; i++) {\n\t\t\t\t\tstrArr[i] = strArr[i].trim();\n\t\t\t\t}\n\t\t\t\tif(!table1.tableName.contains(\"|\"))\n\t\t\t\t{\n\n\t\t\t\t\tif ((strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(table1.tableName) || strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName)) &&\n\t\t\t\t\t\t\t(strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(table1.tableName) || strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName))){\n\n\t\t\t\t\t\tString FirsttableName=table1.tableName;\n\t\t\t\t\t\tString secondtableName=table2.tableName;\n\t\t\t\t\t\tString attr=strArr[0].substring(strArr[0].indexOf(\".\")+1,strArr[0].length());\n\t\t\t\t\t\tarrayList.add(FirsttableName);\n\t\t\t\t\t\tarrayList.add(secondtableName);\n\t\t\t\t\t\tarrayList.add(attr);\n\t\t\t\t\t\treturn arrayList;\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString[] newTableName=table1.tableName.trim().split(\"\\\\|\");\n\t\t\t\t\tfor(int i=0;i<newTableName.length;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif((strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(newTableName[i])&&strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName))||\n\t\t\t\t\t\t\t\t(strArr[1].split(\"\\\\.\")[0].equalsIgnoreCase(newTableName[i])&&strArr[0].split(\"\\\\.\")[0].equalsIgnoreCase(table2.tableName)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString FirsttableName=newTableName[i];\n\t\t\t\t\t\t\tString secondtableName=table2.tableName;\n\t\t\t\t\t\t\tString attr=strArr[0].substring(strArr[0].indexOf(\".\")+1,strArr[0].length());\n\t\t\t\t\t\t\tarrayList.add(FirsttableName);\n\t\t\t\t\t\t\tarrayList.add(secondtableName);\n\t\t\t\t\t\t\tarrayList.add(attr);\n\t\t\t\t\t\t\treturn arrayList;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\treturn arrayList;\n\t}" ]
[ "0.563946", "0.5406028", "0.5323963", "0.50672615", "0.50327474", "0.49858063", "0.49102634", "0.46703047", "0.4659137", "0.46280184", "0.45728564", "0.4549244", "0.45473522", "0.45460242", "0.45243877", "0.44945505", "0.4493215", "0.447499", "0.44692975", "0.44662365", "0.44471473", "0.44207522", "0.4417771", "0.44063565", "0.4380484", "0.43700963", "0.43676117", "0.43596822", "0.4348435", "0.43382883", "0.43281543", "0.43185622", "0.43169734", "0.43153936", "0.43037593", "0.42629477", "0.42598024", "0.4251836", "0.42456475", "0.42387378", "0.42314166", "0.42311972", "0.42235282", "0.4218402", "0.42066994", "0.41844416", "0.41782948", "0.41760713", "0.4175593", "0.4175075", "0.41689113", "0.41676912", "0.41526616", "0.41506124", "0.41496402", "0.41465014", "0.41453737", "0.41304705", "0.4122835", "0.41215876", "0.41166598", "0.41026598", "0.41009107", "0.4096006", "0.40869477", "0.4079935", "0.4079134", "0.4068612", "0.4068175", "0.40661225", "0.4062559", "0.4061335", "0.40604717", "0.40570772", "0.40569183", "0.40458062", "0.4042029", "0.40337312", "0.4031593", "0.40283355", "0.40223768", "0.40121505", "0.40091994", "0.40077913", "0.40065703", "0.40047234", "0.4002461", "0.39983106", "0.3995977", "0.39952517", "0.39907077", "0.39897707", "0.39870593", "0.39755324", "0.39742413", "0.39722168", "0.3968763", "0.39682874", "0.39680955", "0.39669234" ]
0.6364521
0
Returns a copy of given DataSet with values converted to log.
public static DataSet getLogData(DataSet aDataSet, boolean doLogX, boolean doLogY) { // Get DataX DataType dataType = aDataSet.getDataType(); int pointCount = aDataSet.getPointCount(); boolean hasZ = dataType.hasZ(); double[] dataX = new double[pointCount]; double[] dataY = new double[pointCount]; double[] dataZ = hasZ ? new double[pointCount] : null; for (int i=0; i<pointCount; i++) { double valX = aDataSet.getX(i); double valY = aDataSet.getY(i); double valZ = hasZ ? aDataSet.getZ(i) : 0; dataX[i] = doLogX ? ChartViewUtils.log10(valX) : valX; dataY[i] = doLogY ? ChartViewUtils.log10(valY) : valY; if (hasZ) dataZ[i] = valZ; } // Return new DataSet for type and values return DataSet.newDataSetForTypeAndValues(dataType, dataX, dataY, dataZ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataSet toDataSet(Object adaptee);", "public String toLogData() { \n\t return gson.toJson(this);\n\t}", "public void logCopy(Dataset ds, ArrayList<int[]> listSelCell){\n dataProcessToolPanel.logCopy(dataset, listSelCell);\n }", "public void logCut(Dataset ds){\n dataProcessToolPanel.logCut(dataset);\n }", "private DataSet toDataSet(final Collection<TrainingEntry<Login>> trainingDataSet) {\n final int numTimestampsDifferences = getNumberOfInputFeatures(trainingDataSet);\n final IterableRecordReader recordReader = new IterableRecordReader(trainingDataSet);\n return new RecordReaderDataSetIterator(recordReader, trainingDataSet.size(), numTimestampsDifferences, NUM_CATEGORIES).next();\n }", "TraceDataView data();", "@Override\n\tpublic DataSet getDataSet() {\n\t\treturn mDataSet;\n\t}", "public SimpleDataPointImpl(DataSet dataSet){\n\t\tvalues = new HashMap<String, Double>();\n\t\tmDataSet = dataSet;\n\t}", "String getDataSet();", "public void setCaseLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n caseLog.add(new CaseLog(rs.getInt(\"userid\"),\n rs.getInt(\"caseid\"),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public abstract void getDataFromDataLogger();", "@LogValue\n @Override\n public Object toLogValue() {\n return LogValueMapFactory.of(\n \"super\", super.toLogValue(),\n \"Path\", _path,\n \"RrdTool\", _rrdTool);\n }", "public DataSet getDataSet() {\r\n return dataBinder.getDataSet();\r\n }", "private IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\tFile file = new File(\"src/test/resources/lote.xml\");\r\n\t\tIDataSet dataSet = new FlatXmlDataSet(file);\r\n\t\treturn dataSet;\r\n\t}", "@LogValue\n public Object toLogValue() {\n return LogValueMapFactory.builder(this)\n .put(\"sink\", _sink)\n .put(\"serverAddress\", _serverAddress)\n .put(\"serverPort\", _serverPort)\n .put(\"exponentialBackoffBase\", _exponentialBackoffBase)\n .build();\n }", "public static String createArffData(DataSet dataSet){\n StringBuilder sb = new StringBuilder();\n sb.append(\"@data\\n\");\n for(int i = 0; i < dataSet.getRows(); i++){\n for(int j = 0; j < dataSet.getColumns() - 1; j++){\n sb.append(dataSet.getEntryInDataSet(i, j));\n sb.append(\",\");\n }\n sb.append(dataSet.getEntryInDataSet(i, dataSet.getColumns() - 1));\n sb.append(\"\\n\");\n }\n sb.append(\"\\n\");\n return sb.toString();\n }", "DataSet toDataSet(SQLContext context, String tableName);", "Log getHarvestLog(String dsID) throws RepoxException;", "public void setDataSet(DataSet dataSet) {\r\n\t\tthis.dataSet = dataSet;\r\n\t}", "public static void collectDataForLog( Connection connection, GpsLog log ) throws SQLException {\n long logId = log.id;\n\n String query = \"select \"\n + //\n GpsLogsDataTableFields.COLUMN_DATA_LAT.getFieldName() + \",\"\n + //\n GpsLogsDataTableFields.COLUMN_DATA_LON.getFieldName() + \",\"\n + //\n GpsLogsDataTableFields.COLUMN_DATA_ALTIM.getFieldName() + \",\"\n + //\n GpsLogsDataTableFields.COLUMN_DATA_TS.getFieldName()\n + //\n \" from \" + TABLE_GPSLOG_DATA + \" where \"\n + //\n GpsLogsDataTableFields.COLUMN_LOGID.getFieldName() + \" = \" + logId + \" order by \"\n + GpsLogsDataTableFields.COLUMN_DATA_TS.getFieldName();\n\n try (Statement newStatement = connection.createStatement()) {\n newStatement.setQueryTimeout(30);\n ResultSet result = newStatement.executeQuery(query);\n\n while( result.next() ) {\n double lat = result.getDouble(1);\n double lon = result.getDouble(2);\n double altim = result.getDouble(3);\n long ts = result.getLong(4);\n\n GpsPoint gPoint = new GpsPoint();\n gPoint.lon = lon;\n gPoint.lat = lat;\n gPoint.altim = altim;\n gPoint.utctime = ts;\n log.points.add(gPoint);\n }\n }\n }", "@Override\n\tpublic void setDataSet(IDataSet ds) {\n\t\t\n\t}", "public IndexedDataSet<T> getDataSet();", "public ArrayOfLogModel getLogs() {\n return localLogs;\n }", "public ArrayOfLogModel getLogs() {\n return localLogs;\n }", "public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\tV = 0;\r\n\t}", "private Object getDataSetData(MapDataSet dataSet, DataSetColumn column) {\n \t\tif (dataSet.getRowMap().containsKey(new Integer(0))) {\n \t\t\treturn dataSet.getColumnValue(0, column.getName());\n \t\t}\n \t\telse {\n \t\t\treturn dataSet.getData(column);\n \t\t}\n \t}", "public ArrayOfLogModel getArrayOfLogModel() {\n return localArrayOfLogModel;\n }", "public LogFramework copy() {\r\n\t\tLogFramework copy = new LogFramework();\r\n\t\tcopy.importSettings(this);\r\n\t\treturn copy;\r\n\t}", "private static Set<EMailAddress> getDataSetTrackingRecipients(AbstractExternalData dataSet)\n {\n // Recipients are taken from properties of sequencing sample\n // that is a parent of a flow lane sample connected directly with the data set.\n assert dataSet != null;\n return getFlowLaneSampleTrackingRecipients(dataSet.getSample());\n }", "private ChangeLogRecord[] fillChangeLogData( NightliesAdapter na, long dateFrom, long dateTo )\n\t{\n\t\tCursor cur_cl = na.getChangeLogCursor( dateFrom, dateTo );\n\t\tint count_cl = cur_cl.getCount();\n\t\tChangeLogRecord cl;\n\t\tChangeLogRecord[] changelogs = new ChangeLogRecord[count_cl];\n\t\tfor ( int k = 0; k < count_cl && cur_cl.moveToNext(); k++ )\n\t\t{\n\t\t\tcl = new ChangeLogRecord();\n\t\t\tcl.id = cur_cl.getInt( cur_cl.getColumnIndex( NightliesAdapter.CL_ID ) );\n\t\t\tcl.project = cur_cl.getString( cur_cl.getColumnIndex( NightliesAdapter.CL_PROJECT ) );\n\t\t\tcl.subject = cur_cl.getString( cur_cl.getColumnIndex( NightliesAdapter.CL_SUBJECT ) );\n\t\t\tcl.last_updated = new Date( cur_cl.getLong( cur_cl\n\t\t\t\t\t.getColumnIndex( NightliesAdapter.CL_LAST_UPDATED ) ) );\n\t\t\tchangelogs[k] = cl;\n\t\t}\n\t\treturn changelogs;\n\t}", "private IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\tFile file = new File(\"src/test/resources/tipo_identificacion.xml\");\r\n\t\tIDataSet dataSet = new FlatXmlDataSet(file);\r\n\t\treturn dataSet;\r\n\t}", "protected IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\treturn new FlatXmlDataSet(this.getClass().getResourceAsStream(\"dataset_report.xml\"));\r\n\t}", "public void setLogs(ArrayOfLogModel param) {\n localLogsTracker = true;\n\n this.localLogs = param;\n }", "public void setLogs(ArrayOfLogModel param) {\n localLogsTracker = true;\n\n this.localLogs = param;\n }", "public final DataSet getData() {\n return data;\n }", "Source updateDatasourceZ3950Timestamp(Source ds) throws RepoxException;", "public Dataset FilterDataset(Dataset dataset)\n {\n Dataset result = new Dataset();\n for(HashMap<String, Object> row : dataset.dataset){\n if(this.eventExpression.MatchExpression(row))\n result.addRow(row);\n }\n return result;\n }", "private static List<Point> createConvergingDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 400);\r\n add(data, 5, 700);\r\n add(data, 10, 900);\r\n add(data, 15, 1000);\r\n add(data, 20, 1050);\r\n add(data, 25, 1060);\r\n add(data, 30, 1062);\r\n return data;\r\n }", "@Override\n public LogStateColumn copy() {\n LogStateColumn newXCol = new LogStateColumn();\n copy(this, newXCol);\n return newXCol;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.Dataset getDataset() {\n if (datasetBuilder_ == null) {\n if (inputSourceCase_ == 11) {\n return (com.clarifai.grpc.api.Dataset) inputSource_;\n }\n return com.clarifai.grpc.api.Dataset.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 11) {\n return datasetBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.Dataset.getDefaultInstance();\n }\n }", "public LogModel[] getLogModel() {\n return localLogModel;\n }", "public ArrayList<Log> GetLogs(){\n ArrayList<Log> LL = new ArrayList<>();\n try{\n String query = \"Select * from GeneralLog\";\n Statement stm = mssqlConecction.conn.createStatement();\n ResultSet rs = stm.executeQuery(query);\n while(rs.next()){\n Log l = new Log();\n l.action=rs.getString(\"action\");\n l.date = rs.getDate(\"date\");\n l.table = rs.getString(\"table\");\n l.new_value = rs.getString(\"new_value\");\n l.old_Value = rs.getString(\"old_value\");\n l.username = rs.getString(\"username\");\n LL.add(l);\n }\n return LL;\n }catch(Exception e){\n return null;\n }\n }", "public Datum toDatum(Connection paramConnection, String paramString)\n/* */ throws SQLException\n/* */ {\n/* 237 */ if (!this.pickledCorrect)\n/* */ {\n/* */ \n/* */ \n/* 241 */ this.pickled = new ARRAY(ArrayDescriptor.createDescriptor(paramString, paramConnection), paramConnection, getDatumArray(paramConnection));\n/* */ \n/* 243 */ this.pickledCorrect = true;\n/* */ }\n/* 245 */ return this.pickled;\n/* */ }", "public CategoryDataset getUnderlyingDataset() { return this.underlying; }", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void serializeLogs();", "public static CategoryDataset createDataset(DefaultTableModel dtm, ArrayList<BigDecimal> have, BigDecimal goal) {\n \n //Get the data out of the table model\n \tArrayList<DateTime> dates \t\t= TableDataConversion.getDates(dtm);\n \tArrayList<BigDecimal> expected \t= TableDataConversion.getExpectedAmount(dtm);\n \t\n \t//Make the dataset\n \tfinal DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n \t\n \t//Set the print format\n \tDateTimeFormatter formatter = DateTimeFormat.forPattern(\"dd/MM/YY\");\n \t\n \t//Row keys\n final String series1 = \"Expected\";\n final String series2 = \"Have\";\n final String series3 = \"Goal\";\n \t\n \t//Add to the dataset\n \tfor(int i=0; i<dates.size(); i++)\n \t{\n \t\tdataset.addValue(expected.get(i), series1, dates.get(i).toString(formatter));\n \t\tdataset.addValue(have.get(i), series2, dates.get(i).toString(formatter));\n \t\tdataset.addValue(goal, series3, dates.get(i).toString(formatter));\n \t}\n \t\n return dataset;\n \n }", "private ContentValues fromCallLogsData(CallLogsData calllogFileEntry) {\n ContentValues values = new ContentValues();\n// if(!otherPhone){\n// values.put(Phone._ID,calllogFileEntry.id);\n// }\n values.put(CallLog.Calls.NEW, calllogFileEntry.new_Type);\n values.put(\"simid\", calllogFileEntry.simid);\n values.put(CallLog.Calls.TYPE, calllogFileEntry.type);\n// values.put(CallLog.Calls.CACHED_NAME, calllogFileEntry.name);\n values.put(CallLog.Calls.DATE, calllogFileEntry.date);\n values.put(CallLog.Calls.NUMBER, calllogFileEntry.number);\n values.put(CallLog.Calls.DURATION, calllogFileEntry.duration);\n// values.put(CallLog.Calls.CACHED_NUMBER_TYPE, calllogFileEntry.number_type);\n return values;\n }", "public DataSet<T> sort() {\n return toDS(this.getDataStream().sorted());\n }", "public static <T extends Row> DataSet<T> toDS(List<T> data) {\n return new DataSet<>(data);\n }", "public void logData(){\n }", "public void setData(List<E> newDataSet) {\n\t\tdata.addAll(newDataSet);\n\t}", "public DataSet() {\r\n \r\n }", "public LogModel getLogModel() {\n return localLogModel;\n }", "public void logSensorData () {\n\t}", "public void setDataLogging (boolean dataLogging) {\n this.dataLogging = dataLogging;\n }", "public static void setLog(Log log) {\n DatasourceProxy.log = log;\n }", "public DataSet getDataSet() {\r\n return navBinder.getDataSet();\r\n }", "LogRecord saveLog(LogRecord logRecord);", "public DatasetBean getDataset(Object ds) {\n DataSet dataset;\n DatasetBean newDatasetBean;\n\n if (ds instanceof DataSet) {\n dataset = (DataSet) ds;\n newDatasetBean = this.createDatasetBean(dataset);\n }\n\n else {\n if (this.datasetMap.get((String) ds) != null) {\n newDatasetBean = this.datasetMap.get(ds);\n } else {\n dataset = this.getOpenBisClient().getFacade().getDataSet((String) ds);\n newDatasetBean = this.createDatasetBean(dataset);\n }\n }\n this.datasetMap.put(newDatasetBean.getCode(), newDatasetBean);\n return newDatasetBean;\n }", "protected String getDataSet(String tagName) {\n\t\tString result = \"\";\n\t\tString testModuleName = new Throwable().getStackTrace()[1].getClassName().replace(\".\", \"/\").split(\"/\")[1];\n\t\tresult = Common.getCommon().getDataSet(testModuleName, tagName);\n\t\treturn result;\n\t}", "@Override\n\tpublic String[] getLog() {\n\t\tString[] logs = new String[this.log.size()];\n\t\treturn this.log.toArray(logs);\n\t}", "public double[] getData(){\r\n\t\t//make a deeeeeep copy of data\r\n\t\tdouble[] returnData = new double[this.data.length];\r\n\t\t\r\n\t\t//fill with data values\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\treturnData[i] = this.data[i];\r\n\t\t}\r\n\t\t//return a ref to my deep copy\r\n\t\treturn returnData;\r\n\t}", "public static ArrayList<Double> twoDArrToArrList(Double[][] dataSet) {\n List<Double> collection = Arrays.stream(dataSet) \n .flatMap(Arrays::stream)\n .collect(Collectors.toList());\n\n ArrayList<Double> arrList = new ArrayList<Double>(collection); \n return arrList; \n }", "public static String getDataSetResult(IEngUserProfile profile,IDataSet ds, Map parameters) throws Exception {\n\t\tlogger.debug(\"IN\");\n\t\t\n\t\tif (profile == null) {\n\t\t\tprofile = new UserProfile(\"anonymous\", TenantManager.getTenant().getName());\n\t\t}\n\t\t\n\t\tSourceBean rowsSourceBean = null;\n\t\tList colNames = new ArrayList();\n\t\t\n\t\tds.setParamsMap(parameters);\n\t\tds.setUserProfileAttributes(UserProfileUtils.getProfileAttributes(profile));\n\t\tds.loadData();\n\t\tIDataStore ids = ds.getDataStore();\n\t\t\n\t\t/*\n\t\tConfigurableDataSet dsi = new ConfigurableDataSet(ds,profile);\n\t\tHashMap parametersFilled=(HashMap)parameters;\n\t\tdsi.loadData(parametersFilled);\n\t\t\n\t\t\n\t\tIDataStore ids = dsi.getDataStore();\n\t\t*/\n\t\tString resultXml = ids.toXml();\n\t\t\n\t\tlogger.debug(\"OUT\" + resultXml);\n\t\treturn resultXml;\n\t}", "final public static StringBuilder getEntireLog() {\n\t\treturn logger.memoryLog;\n\t}", "private LogData getDefaultLogData(long address) {\n ByteBuf b = Unpooled.buffer();\n Serializers.CORFU.serialize(PAYLOAD_DATA.getBytes(), b);\n LogData ld = new LogData(DataType.DATA, b);\n ld.setGlobalAddress(address);\n ld.setEpoch(1L);\n return ld;\n }", "private static DataSet MakeDataSet( float[][] histograms,\n IEventBinner binner, \n String title, \n String log_message,\n boolean is_ghost )\n {\n DataSet DS = new DataSet( title, log_message );\n\n float[] xs = new float[ binner.numBins() + 1 ];\n for( int i = 0; i < xs.length; i++ )\n xs[i] = (float)binner.minVal( i );\n\n VariableXScale xscl = new VariableXScale( xs );\n\n for( int i = 0; i < histograms.length; i++)\n {\n if ( histograms[i] != null )\n {\n float[] yvals = histograms[i];\n HistogramTable D = new HistogramTable( xscl, yvals, i ) ;\n if ( !is_ghost )\n D.setSqrtErrors( true );\n else\n {\n float[] errors = new float[ yvals.length ];\n D.setErrors( errors );\n }\n DS.addData_entry( D );\n }\n }\n\n DataSetFactory.addOperators( DS );\n return DS;\n }", "private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }", "public ResultObject getLogData(LogDataRequest logDateRequest)throws ParserException;", "public VectorSet getMappedData() {\n\t\tMap<double[], ClassDescriptor> newData = new HashMap<double[], ClassDescriptor>();\n\t\tMap<double[], ClassDescriptor> data = orig.getData();\n\t\t\n\t\t// y = A x\n\t\tfor(double[] x: data.keySet()) {\n\t\t\tnewData.put(mapVector(x), data.get(x));\n\t\t}\n\n\t\tString[] labels = new String[resultDimension];\n\t\tfor(int i = 0; i < resultDimension; i++) {\n\t\t\tlabels[i] = Integer.toString(i + 1);\n\t\t}\n\n\t\treturn new VectorSet(newData, labels);\n\t}", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "DataSet toDataSet(SQLContext context, JavaRDD<?> rdd, Class<?> beanClass);", "public FlatData flatten() {\n\t\tString data;\n\t\tdouble[] coords = coordinateTools.localToCoordinates(this);\n\t\tdata = this.getClass().getName() + \":\";\n\t\tdata += coords[0] + \"#\" + coords[1];\n\t\treturn new FlatData(data);\n\t}", "@Override\n\tpublic Instances dataset() {\n\t\treturn null;\n\t}", "@Override\n public Log map(ResultSet rs, StatementContext ctx) throws SQLException {\n var application = applicationRepository.findById(rs.getInt(1)).orElseThrow();\n return new Log(rs.getInt(1),application.getApp(),application.getPortApp(),application.getPortService(),application.getDockerInstance(),rs.getString(2),rs.getTimestamp(3).toInstant());\n }", "public FlowEventDump(@NonNull FlowEventDump entityToClone) {\n data = FlowEventDumpCloner.INSTANCE.deepCopy(entityToClone.getData());\n }", "public HistogramDataSet getData();", "private boolean setDataSet(DataSet[] db){\n m_db = db;\n return true;\n }", "MeasurementsLog findByUid(int uid);", "public void copyDataFrom(ParamUnit other)\r\n\t{\r\n\t\tif (this.data.row != other.data.row || this.data.col != other.data.col)\r\n\t\t\tthrow new DeepException(\"Cannot copy data from a different dimension.\");\r\n\t\tthis.data.copyFrom(other.data);\r\n\t}", "public static <T extends Row> DataSet<T> actionToNewDS(Stream<T> rowStream) {\n Objects.requireNonNull(rowStream);\n return new DataSet<>(rowStream.collect(Collectors.toList()));\n }", "public Builder dataset(String newDataset) {\n dataset = newDataset;\n return this;\n }", "void addLogToBatch(TelemetryData log) throws IOException;", "@Override\n @XmlElement(name = \"dataset\")\n public synchronized String getDataset() {\n return dataset;\n }", "public DataSet[] getDataSetArray() {\n\t\treturn dataSetArray;\n\t}", "@Override\n\tpublic CreditrepayplanLog getLogInstance() {\n\t\treturn new CreditrepayplanLog();\n\t}", "public void setLOG(Logger newLog)\r\n\t{\r\n\t\tlog = newLog;\r\n\t}", "public void setLogModel(LogModel[] param) {\n validateLogModel(param);\n\n localLogModelTracker = true;\n\n this.localLogModel = param;\n }", "public void setArrayOfLogModel(ArrayOfLogModel param) {\n this.localArrayOfLogModel = param;\n }", "public static DataParameter getCopy(DataParameter dataparameter) {\n\t\tDataParameter copydataparameter = (DataParameter) EcoreUtil.copy(dataparameter);\t\n\t\treturn copydataparameter;\n\t}", "public TimeStampReport toTimeStampReport(){\t\t\n\t\tMap<Integer,PlayerWealthDataReport> wData = new HashMap<>();\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\twData.put(w.ownerID, w.toPlayerWealthDataReport());\n\t\t}\n\n\t\treturn new TimeStampReport(_time,wData);\n\t}", "public java.sql.Timestamp getLogdate()\n {\n return logdate; \n }", "void tryAddLogToBatch(TelemetryData log);", "public void setLogData(boolean enabled) {\n\t\tthis.logData = enabled;\n\t}", "public Object convertToCatalyst (Object a, org.apache.spark.sql.catalyst.types.DataType dataType) ;", "public Builder setDataset(com.clarifai.grpc.api.Dataset value) {\n if (datasetBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n inputSource_ = value;\n onChanged();\n } else {\n datasetBuilder_.setMessage(value);\n }\n inputSourceCase_ = 11;\n return this;\n }", "LogEntryProto getLogEntry();", "public boolean getDataLogging () {\n return dataLogging;\n }", "public T elementLog() {\n T c = createLike();\n ops.elementLog(mat, c.mat);\n return c;\n }" ]
[ "0.5826014", "0.53199404", "0.5142035", "0.5074752", "0.49481937", "0.49348727", "0.4915158", "0.49018356", "0.48900756", "0.4805679", "0.47653437", "0.47614855", "0.47603926", "0.46964365", "0.4643053", "0.46025896", "0.45888084", "0.45711136", "0.45708555", "0.45702678", "0.4569017", "0.45549244", "0.45461732", "0.45461732", "0.4541303", "0.45027155", "0.44983554", "0.4491388", "0.44902408", "0.44880772", "0.4480242", "0.44741917", "0.4470342", "0.4470342", "0.44670874", "0.4459197", "0.44551775", "0.44504708", "0.4449921", "0.4440658", "0.4427846", "0.44194174", "0.44056684", "0.44017807", "0.43992984", "0.43865576", "0.4381708", "0.43716446", "0.43603426", "0.43578014", "0.43326762", "0.43227267", "0.43127206", "0.4310556", "0.4308233", "0.4302221", "0.42986998", "0.4291326", "0.42770153", "0.4276716", "0.42710987", "0.42689818", "0.42540547", "0.4231221", "0.4231207", "0.42233694", "0.4220451", "0.421389", "0.42019823", "0.4200498", "0.41939533", "0.41863242", "0.41818717", "0.41754782", "0.4168089", "0.4164882", "0.41494495", "0.414651", "0.4144578", "0.41399252", "0.4131346", "0.4119508", "0.41085398", "0.4103375", "0.40963936", "0.40961587", "0.40952787", "0.40811458", "0.40768847", "0.40750536", "0.40734354", "0.40713543", "0.40668258", "0.40656576", "0.4065326", "0.4055246", "0.4055116", "0.40468842", "0.40430054", "0.40422812" ]
0.60321623
0
Returns DataSet for given polar type.
public static DataSet getPolarDataForType(DataSet aDataSet, DataType aDataType) { // If already polar, just return if (aDataSet.getDataType().isPolar()) return aDataSet; // Complain if DataType arg isn't polar if (!aDataType.isPolar()) throw new IllegalArgumentException("DataSetUtils.getPolarDataForType: Come on, man: " + aDataType); // Otherwise, get DataX array and create dataT array int pointCount = aDataSet.getPointCount(); double[] dataT = new double[pointCount]; // Get min/max X to scale to polar double minX = aDataSet.getMinX(); double maxX = aDataSet.getMaxX(); double maxAngle = 2 * Math.PI; // 360 degrees // Iterate over X values and convert to 0 - 360 scale for (int i = 0; i < pointCount; i++) { double valX = aDataSet.getX(i); double valTheta = (valX - minX) / (maxX - minX) * maxAngle; dataT[i] = valTheta; } // Get DataR and DataZ double[] dataR = aDataSet.getDataY(); double[] dataZ = aDataSet.getDataType().hasZ() ? aDataSet.getDataZ() : null; if (aDataType.hasZ() && dataZ == null) dataZ = new double[pointCount]; // Create new DataSet for type and values and return DataSet polarData = DataSet.newDataSetForTypeAndValues(aDataType, dataT, dataR, dataZ); polarData.setThetaUnit(DataUnit.Radians); return polarData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getData(HelperDataType type);", "public static DataSet getPolarXYDataForPolar(DataSet aDataSet)\n {\n // If already non-polar, just return\n if (!aDataSet.getDataType().isPolar())\n return aDataSet;\n\n // Get pointCount and create dataX/dataY arrays\n int pointCount = aDataSet.getPointCount();\n double[] dataX = new double[pointCount];\n double[] dataY = new double[pointCount];\n\n // Get whether to convert to radians\n boolean convertToRadians = aDataSet.getThetaUnit() != DataUnit.Radians;\n\n // Iterate over X values and convert to 0 - 360 scale\n for (int i = 0; i < pointCount; i++) {\n\n // Get Theta and Radius\n double dataTheta = aDataSet.getT(i);\n double dataRadius = aDataSet.getR(i);\n if (convertToRadians)\n dataTheta = Math.toRadians(dataTheta);\n\n // Convert to display coords\n dataX[i] = Math.cos(dataTheta) * dataRadius;\n dataY[i] = Math.sin(dataTheta) * dataRadius;\n }\n\n // Get DataZ and DataType\n double[] dataZ = aDataSet.getDataType().hasZ() ? aDataSet.getDataZ() : null;\n DataType dataType = dataZ == null ? DataType.XY : DataType.XYZ;\n\n // Return new DataSet for type and values\n return DataSet.newDataSetForTypeAndValues(dataType, dataX, dataY, dataZ);\n }", "public DataSet getDataset(DataSetType dataSetType) throws IOException{\n DataSet dataset;\n\n switch(dataSetType){\n case CONSTANT: dataset = constantDataSet(); break;\n case NORMAL: dataset = normalDataSet(); break;\n case UNIFORM: dataset = uniformDataSet(); break;\n case CAUCHY: dataset = caucyDataSet(); break;\n case ZIPF: dataset = zipfDataSet(); break;\n case CRYPTO: dataset = cryptoDataSet(); break;\n case FACEBOOK: dataset = facebookDataSet(); break;\n default: throw new RuntimeException(String.format(\"Dataset Type %s, did not match any configured type\", dataSetType));\n }\n dataset.setType(dataSetType);\n\n return dataset;\n }", "private static Data generateDataPoint(String raw, DataType type) {\n Data data = new Data<Boolean>(false);\n //There can be null data. Its marked as a question mark in the datasets.\n\n if(raw.equals(\"?\")) {\n return null;\n }\n\n switch (type) {\n case Boolean:\n if(raw.equals(\"y\")) {\n data = new Data<Boolean>(true);\n }\n else if(raw.equals(\"n\")) {\n data = new Data<Boolean>(false);\n }\n else {\n data = new Data<Boolean>(Boolean.parseBoolean(raw));\n }\n break;\n case Double:\n data = new Data<Double>(Double.parseDouble(raw));\n break;\n case Integer:\n data = new Data<Integer>(Integer.parseInt(raw));\n break;\n case String:\n data = new Data<String>(raw);\n break;\n }\n return data;\n }", "public Dataset getDataset(DatasetType dataType){\n switch(dataType){\n case TEST:\n return test;\n case TRAINING:\n return training;\n default:\n return null;\n }\n }", "@Override\r\n\tpublic NowData getNowdata(String type) {\n\t\treturn totalConsumptionDao.getNowdata(type);\r\n\t}", "public static DataType get(String type)\n {\n return lookup.get(type);\n }", "public int getDatasetType() {\n return datasetType;\n }", "public static Chart getChart(String type){\n\t\tChart chart = new Chart(Quality.Advanced, type);\r\n\t\tchart.getView().setBackgroundColor(Color.BLACK);\r\n\t\tchart.getView().setAxeSquared(true);\r\n\t\tchart.getAxeLayout().setGridColor(Color.WHITE);\r\n\t\tchart.getAxeLayout().setFaceDisplayed(false);\r\n\t\taddLight( chart, new Coord3d(0,-100,100));\r\n\t\tsceneHisto(chart);\t\t\r\n\t\treturn chart;\r\n\t}", "DataPointType createDataPointType();", "private PieDataset createDataset() {\n\t\tDefaultPieDataset result = new DefaultPieDataset();\n\t\tresult.setValue(\"Linux\", 29);\n\t\tresult.setValue(\"Mac\", 20);\n\t\tresult.setValue(\"Windows\", 51);\n\t\treturn result;\n\n\t}", "private PieDataset createDataset() {\n\t\tDefaultPieDataset result = new DefaultPieDataset();\n\n\t\tif (_controler != null) {\n\t\t\tfor (Object cat : _controler.getCategorieData()) {\n\n\t\t\t\tresult.setValue((String) cat, _controler.getTotal((String) cat));\n\n\t\t\t}\n\t\t}\n\t\treturn result;\n\n\t}", "public double[] fetchStatisticsChart(StatisticsType type) {\n double[] fetchedData = null;\n\n switch (type) {\n case SURVEYS_TOTAL_SUCCESS_FAIL_STATS:\n fetchedData = fetchSurveysTotalSuccessFailStats();\n break;\n case POLLS_TOTAL_SUCCESS_FAIL_STATS:\n fetchedData = fetchPollsTotalSuccessFailStats();\n break;\n case POLLS_WITH_CUSTOM_CHOICE:\n fetchedData = fetchPollsWithCustomChoice();\n break;\n }\n\n return fetchedData;\n }", "private DefaultPieDataset getChartDataset() {\n if (this.pieDataset == null) {\n pieDataset = new DefaultPieDataset();\n List<String> model = this.handler.getSchema();\n model.stream().forEach((key) -> {\n pieDataset.setValue(key, 0d);\n });\n }\n return pieDataset;\n }", "String getDataSet();", "public List<Double> getData(String fileName,String sar_device, String sar_type) throws IOException {\n\t\tFileReader fr = new FileReader(\"./temp/\"+fileName);\n\t\tList<Double> resultListA = new ArrayList<Double>();\n\t\t \n\t\t//get the type:rxpck/txpck/rxkB...\n\t\tint i=getType(sar_type);\n\t\t \n\t\tresultListA=getdata(fr,sar_device,i);\n\t\treturn resultListA;\n\t}", "@Override\n\tpublic DataType getDataType() {\n\t\tif (dataType == null) {\n\t\t\tdataType = getDataType(getProgram());\n\t\t}\n\t\treturn dataType;\n\t}", "void getPlanificacion(int tipoPlanificacion);", "public DataType getType() {\n return type;\n }", "public DataBase getDataSet() {\r\n DataBase dataset = null;\r\n try {\r\n Statement stmt = conexion.createStatement();\r\n String sql;\r\n sql = \"SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '\" + schema + \"'\";\r\n ResultSet rs = stmt.executeQuery(sql);\r\n dataset = new DataBase();\r\n while (rs.next()) {\r\n \r\n dataset.setCatalog_name(rs.getString(1));\r\n dataset.setSchema_name(rs.getString(2));\r\n dataset.setCharacter_set(rs.getString(3));\r\n dataset.setCollation_name(rs.getString(4));\r\n dataset.setIssued(getIssuedBD(schema));\r\n\r\n }\r\n ArrayList<Table> tables = getTables(schema);\r\n dataset.setTables(tables);\r\n return dataset;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAOBaseDatos.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }", "private PieDataset createDataset() {\n JOptionPane.showMessageDialog(null, \"teste\"+dados.getEntrada());\r\n \r\n DefaultPieDataset result = new DefaultPieDataset();\r\n result.setValue(\"Entrada\", dados.getEntrada());\r\n result.setValue(\"Saida\", dados.getSaida());\r\n result.setValue(\"Saldo do Periodo\", dados.getSaldo());\r\n return result;\r\n\r\n }", "public static RegionStatisticsResourcesData get(RegionStatistics statistics, RegionStatisticsData data, String type) {\r\n try {\r\n Criteria criteria = new Criteria();\r\n criteria.add(REGION_ID,statistics.getID());\r\n criteria.add(TURN_ID, data.getID());\r\n criteria.add(ITEM_TYPE, type);\r\n criteria.setLimit(1);\r\n List<RegionStatisticsResourcesData> resources = doSelect(criteria);\r\n if (resources != null && resources.size()>0) return resources.get(0);\r\n } catch (Exception exception) {\r\n log.error(exception);\r\n }\r\n return null;\r\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "public ParticipationTypeData getParticipationTypeData(Integer groupPk, Integer typePk) \n { \n Connection con = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n ParticipationTypeData type = null;\n \n try {\n\n //retrieve a Participation Type \n con = DBUtil.getConnection();\n ps = con.prepareStatement(SQL_SELECT_PARTICIPATION_CD_TYPE_BY_TYPE);\n ps.setInt(1, groupPk.intValue());\n ps.setInt(2, typePk.intValue());\n rs = ps.executeQuery();\n \n //put the result into a ParticipationTypeData object\n if (rs.next()) {\n type = new ParticipationTypeData();\n type.setGroupPk(groupPk);\n type.setTypePk(typePk);\n type.setName(rs.getString(\"particip_type_nm\"));\n type.setDescription(rs.getString(\"particip_type_desc\"));\n } \n } catch (SQLException e) {\n throw new EJBException(\"Error retrieving a Participation Type in MaintainParticipationGroupsBean.getParticipationTypeData()\", e);\n } finally {\n DBUtil.cleanup(con, ps, rs);\n }\n \n //return the type data object\n return type;\n }", "public final DataSet getDataSet(final String dataSetType) {\n return DataSetFactory.getDataSet(dataSetType);\n }", "SeriesType createSeriesType();", "private IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\tFile file = new File(\"src/test/resources/tipo_identificacion.xml\");\r\n\t\tIDataSet dataSet = new FlatXmlDataSet(file);\r\n\t\treturn dataSet;\r\n\t}", "@Override\r\n\tpublic List<AsxDataVO> findByType(int type) {\n\t\treturn mongoTemplate.find(new Query(Criteria.where(\"type\").is(type)), AsxDataVO.class);\r\n\t}", "public CategoryDataset createDataset() {\n\t\tfinal DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\tProjectManagement projectManagement = new ProjectManagement();\n\t\tif (this.chartName == \"Earned Value\") {\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getEarnedValue(date), \"Earned Value\", date);\n\t\t\t}\n\t\t} else if (this.chartName == \"Schedule Variance\") {\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getScheduleVariance(date), \"Schedule Variance\", date);\n\t\t\t}\n\n\t\t} else {// Cost Variance\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getCostVariance(date), \"Cost Variance\", date);\n\t\t\t}\n\t\t}\n\t\treturn dataset;\n\t}", "java.lang.String getDataType();", "private XYDataset createDataset(String WellID, String lang) {\n final TimeSeries eur = createEURTimeSeries(WellID, lang);\n final TimeSeriesCollection dataset = new TimeSeriesCollection();\n dataset.addSeries(eur);\n return dataset;\n }", "public Cursor loadRecipesByType(String typeR) {\r\n Cursor c = db.query(recipes.TABLENAME, new String[]{recipes.TITLE, recipes.IMAGE, recipes.INGREDIENTS, recipes.STEPS, recipes.TYPE, recipes.TIME, recipes.PEOPLE, recipes.IDRECIPE}, recipes.TYPE + \"=\" + \"'\" + typeR + \"'\", null, null, null, null);\r\n if (c != null) c.moveToFirst();\r\n return c;\r\n }", "public DataSource(Type type)\n {\n super();\n _type = type;\n }", "public DataTypeManager getDataTypeManager();", "private XYDataset createDataset() {\n\t \tXYSeriesCollection dataset = new XYSeriesCollection();\n\t \t\n\t \t//Definir cada Estacao\n\t\t XYSeries aes1 = new XYSeries(\"Estação1\");\n\t\t XYSeries aes2 = new XYSeries(\"Estação2\");\n\t\t XYSeries aes3 = new XYSeries(\"Estação3\");\n\t\t XYSeries aes4 = new XYSeries(\"Estação4\");\n\t\t XYSeries aes5 = new XYSeries(\"Estação5\");\n\t\t XYSeries aes6 = new XYSeries(\"Estação6\");\n\t\t XYSeries aes7 = new XYSeries(\"Estação7\");\n\t\t XYSeries aes8 = new XYSeries(\"Estação8\");\n\t\t XYSeries aes9 = new XYSeries(\"Estação9\");\n\t\t XYSeries aes10 = new XYSeries(\"Estação10\");\n\t\t XYSeries aes11 = new XYSeries(\"Estação11\");\n\t\t XYSeries aes12 = new XYSeries(\"Estação12\");\n\t\t XYSeries aes13 = new XYSeries(\"Estação13\");\n\t\t XYSeries aes14 = new XYSeries(\"Estação14\");\n\t\t XYSeries aes15 = new XYSeries(\"Estação15\");\n\t\t XYSeries aes16 = new XYSeries(\"Estação16\");\n\t\t \n\t\t //Definir numero de utilizadores em simultaneo para aparece na Interface\n\t\t XYSeries au1 = new XYSeries(\"AU1\");\n\t\t XYSeries au2 = new XYSeries(\"AU2\");\n\t\t XYSeries au3 = new XYSeries(\"AU3\");\n\t\t XYSeries au4 = new XYSeries(\"AU4\");\n\t\t XYSeries au5 = new XYSeries(\"AU5\");\n\t\t XYSeries au6 = new XYSeries(\"AU6\");\n\t\t XYSeries au7 = new XYSeries(\"AU7\");\n\t\t XYSeries au8 = new XYSeries(\"AU8\");\n\t\t XYSeries au9 = new XYSeries(\"AU9\");\n\t\t XYSeries au10 = new XYSeries(\"AU10\");\n\t\t \n\t\t //Colocar estacoes no gráfico\n\t\t aes1.add(12,12);\n\t\t aes2.add(12,37);\n\t\t aes3.add(12,62);\n\t\t aes4.add(12,87);\n\t\t \n\t\t aes5.add(37,12);\n\t\t aes6.add(37,37);\n\t\t aes7.add(37,62);\n\t\t aes8.add(37,87);\n\t\t \n\t\t aes9.add(62,12); \n\t\t aes10.add(62,37);\n\t\t aes11.add(62,62);\n\t\t aes12.add(62,87);\n\t\t \n\t\t aes13.add(87,12);\n\t\t aes14.add(87,37);\n\t\t aes15.add(87,62);\n\t\t aes16.add(87,87);\n\t\t \n\t\t//Para a bicicleta 1\n\t\t \t\n\t\t\t for(Entry<String, String> entry : position1.entrySet()) {\n\t\t\t\t String key = entry.getKey();\n\t\t\t\t \n\t\t\t\t String[] part= key.split(\",\");\n\t\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t\t \n\t\t\t\t au1.add(keyX,keyY);\n\t\t\t }\n\t\t \n\t\t\t //Para a bicicleta 2\n\t\t for(Entry<String, String> entry : position2.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au2.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Para a bicicleta 3\n\t\t for(Entry<String, String> entry : position3.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au3.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position4.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au4.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position5.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au5.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position6.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au6.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position7.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au7.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position8.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au8.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position9.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au9.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position10.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au10.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Add series to dataset\n\t\t dataset.addSeries(au1);\n\t\t dataset.addSeries(au2);\n\t\t dataset.addSeries(au3);\n\t\t dataset.addSeries(au4);\n\t\t dataset.addSeries(au5);\n\t\t dataset.addSeries(au6);\n\t\t dataset.addSeries(au7);\n\t\t dataset.addSeries(au8);\n\t\t dataset.addSeries(au9);\n\t\t dataset.addSeries(au10);\n\t\t \n\t\t \n\t\t dataset.addSeries(aes1);\n\t\t dataset.addSeries(aes2);\n\t\t dataset.addSeries(aes3);\n\t\t dataset.addSeries(aes4);\n\t\t dataset.addSeries(aes5);\n\t\t dataset.addSeries(aes6);\n\t\t dataset.addSeries(aes7);\n\t\t dataset.addSeries(aes8);\n\t\t dataset.addSeries(aes9);\n\t\t dataset.addSeries(aes10);\n\t\t dataset.addSeries(aes11);\n\t\t dataset.addSeries(aes12);\n\t\t dataset.addSeries(aes13);\n\t\t dataset.addSeries(aes14);\n\t\t dataset.addSeries(aes15);\n\t\t dataset.addSeries(aes16);\n\t\t \n\t\t return dataset;\n\t }", "private Object createDataset(final ChartConfiguration config) {\n final CategoryChart chart = (CategoryChart) config.chart;\n for (final Fields key: config.fields) {\n chart.addSeries(key.getLocalizedName(), new double[1], new double[1]);\n }\n populateDataset(config);\n return null;\n }", "public String getDataType() ;", "public DataType getDataType() {\r\n\t\treturn dataType;\r\n\t}", "com.google.cloud.automl.v1beta1.Dataset getDataset();", "public String getDataType() {\r\n return dataType;\r\n }", "protected String getDataType()\n {\n return dataType;\n }", "public String getDataType() {\n return dataType;\n }", "static <R,C> DataFrame<R,C> of(Class<R> rowType, Class<C> colType) {\n return DataFrame.factory().from(Index.of(rowType, 1000), Index.of(colType, 20), Object.class);\n }", "public XYDataset getDataset() {\n\n // Initialize some variables\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series[][][] = new XYSeries[rois.length][images.length][stats.length];\n String seriesname[][][] = new String[rois.length][images.length][stats.length];\n int currentSlice = ui.getOpenMassImages()[0].getCurrentSlice();\n ArrayList<String> seriesNames = new ArrayList<String>();\n String tempName = \"\";\n double stat;\n\n // Image loop\n for (int j = 0; j < images.length; j++) {\n MimsPlus image;\n if (images[j].getMimsType() == MimsPlus.HSI_IMAGE || images[j].getMimsType() == MimsPlus.RATIO_IMAGE) {\n image = images[j].internalRatio;\n } else {\n image = images[j];\n }\n\n // Plane loop\n for (int ii = 0; ii < planes.size(); ii++) {\n int plane = (Integer) planes.get(ii);\n if (image.getMimsType() == MimsPlus.MASS_IMAGE) {\n ui.getOpenMassImages()[0].setSlice(plane, false);\n } else if (image.getMimsType() == MimsPlus.RATIO_IMAGE) {\n ui.getOpenMassImages()[0].setSlice(plane, image);\n }\n\n // Roi loop\n for (int i = 0; i < rois.length; i++) {\n\n // Set the Roi to the image.\n Integer[] xy = ui.getRoiManager().getRoiLocation(rois[i].getName(), plane);\n rois[i].setLocation(xy[0], xy[1]);\n image.setRoi(rois[i]);\n\n // Stat loop\n for (int k = 0; k < stats.length; k++) {\n\n // Generate a name for the dataset.\n String prefix = \"\";\n if (image.getType() == MimsPlus.MASS_IMAGE || image.getType() == MimsPlus.RATIO_IMAGE) {\n prefix = \"_m\";\n }\n if (seriesname[i][j][k] == null) {\n tempName = stats[k] + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName();\n int dup = 1;\n while (seriesNames.contains(tempName)) {\n tempName = stats[k] + prefix + image.getRoundedTitle(true) + \"_r\" + rois[i].getName() + \" (\" + dup + \")\";\n dup++;\n }\n seriesNames.add(tempName);\n seriesname[i][j][k] = tempName;\n }\n\n // Add data to the series.\n if (series[i][j][k] == null) {\n series[i][j][k] = new XYSeries(seriesname[i][j][k]);\n }\n\n // Get the statistic.\n stat = getSingleStat(image, stats[k], ui);\n if (stat > Double.MAX_VALUE || stat < (-1.0) * Double.MAX_VALUE) {\n stat = Double.NaN;\n }\n series[i][j][k].add(((Integer) planes.get(ii)).intValue(), stat);\n\n } // End of Stat\n } // End of Roi\n } // End of Plane\n } // End of Image\n\n // Populate the final data structure.\n for (int i = 0; i < rois.length; i++) {\n for (int j = 0; j < images.length; j++) {\n for (int k = 0; k < stats.length; k++) {\n dataset.addSeries(series[i][j][k]);\n }\n }\n }\n\n ui.getOpenMassImages()[0].setSlice(currentSlice);\n\n return dataset;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.Dataset getDataset() {\n if (inputSourceCase_ == 11) {\n return (com.clarifai.grpc.api.Dataset) inputSource_;\n }\n return com.clarifai.grpc.api.Dataset.getDefaultInstance();\n }", "public DataType getDataType() {\n return this.dataType;\n }", "public int getDataType();", "DataType createDataType();", "public IndexedDataSet<T> getDataSet();", "int getDataType();", "public List<SysDictData> selectDictDataByType(String dictType);", "public static DataTypeDescriptor getBuiltInDataTypeDescriptor(int jdbcType, \r\n int length) {\r\n return getBuiltInDataTypeDescriptor(jdbcType, true, length);\r\n }", "private Dataset createDataSet(RecordingObject recordingObject, Group parentObject, String name) throws Exception\n\t{\n\t\t// dimension of dataset, length of array and 1 column\n\t\tlong[] dims2D = { recordingObject.getYValuesLength(), recordingObject.getXValuesLength() };\n\n\t\t// H5Datatype type = new H5Dataype(CLASS_FLOAT, 8, NATIVE, -1);\n\t\tDatatype dataType = recordingsH5File.createDatatype(recordingObject.getDataType(), recordingObject.getDataBytes(), Datatype.NATIVE, -1);\n\t\t// create 1D 32-bit float dataset\n\t\tDataset dataset = recordingsH5File.createScalarDS(name, parentObject, dataType, dims2D, null, null, 0, recordingObject.getValues());\n\n\t\t// add attributes for unit and metatype\n\t\tcreateAttributes(recordingObject.getMetaType().toString(), recordingObject.getUnit(), dataset);\n\n\t\treturn dataset;\n\t}", "public void setDatasetType(int datasetType) {\n this.datasetType = datasetType;\n }", "private @Nullable Data readData(\n @NotNull Type typeBound,\n @NotNull List<P> projections // non-empty, polymorphic tails respected\n ) throws IOException, JsonFormatException {\n\n if (nextToken() == null) return null;\n return finishReadingData(typeBound, projections);\n }", "public static CategoryDataset createSampleDataset() {\n \t\n \t// row keys...\n final String series1 = \"Expected\";\n final String series2 = \"Have\";\n final String series3 = \"Goal\";\n\n // column keys...\n final String type1 = \"Type 1\";\n final String type2 = \"Type 2\";\n final String type3 = \"Type 3\";\n final String type4 = \"Type 4\";\n final String type5 = \"Type 5\";\n final String type6 = \"Type 6\";\n final String type7 = \"Type 7\";\n final String type8 = \"Type 8\";\n\n // create the dataset...\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\n dataset.addValue(1.0, series1, type1);\n dataset.addValue(4.0, series1, type2);\n dataset.addValue(3.0, series1, type3);\n dataset.addValue(5.0, series1, type4);\n dataset.addValue(5.0, series1, type5);\n dataset.addValue(7.0, series1, type6);\n dataset.addValue(7.0, series1, type7);\n dataset.addValue(8.0, series1, type8);\n\n dataset.addValue(5.0, series2, type1);\n dataset.addValue(7.0, series2, type2);\n dataset.addValue(6.0, series2, type3);\n dataset.addValue(8.0, series2, type4);\n dataset.addValue(4.0, series2, type5);\n dataset.addValue(4.0, series2, type6);\n dataset.addValue(2.0, series2, type7);\n dataset.addValue(1.0, series2, type8);\n\n dataset.addValue(4.0, series3, type1);\n dataset.addValue(3.0, series3, type2);\n dataset.addValue(2.0, series3, type3);\n dataset.addValue(3.0, series3, type4);\n dataset.addValue(6.0, series3, type5);\n dataset.addValue(3.0, series3, type6);\n dataset.addValue(4.0, series3, type7);\n dataset.addValue(3.0, series3, type8);\n\n return dataset;\n \n }", "public int getData_type_id() {\n return data_type_id;\n }", "public abstract MetricDataType getType();", "@Override\n public List<Asset> getAssetsByType(String type) {\n\t \n\t List<Asset> assets = new ArrayList<>();\n\t \n\t ResultSet resultset = null;\n\t \n\t String[] list = {\"id\",\"type\"};\n\t \n\t List<ResultSetFuture> futures = Lists.newArrayListWithExpectedSize(list.length);\n\t \n\t futures.add(session.executeAsync(\"SELECT * FROM \"+cassandra_keyspace+ \".\"+cassandra_table+\" WHERE type = '\"+type+\"'\"));\n\t \n\t for (ListenableFuture<ResultSet> future : futures){\n\t\t try {\n\t\t\t resultset = future.get();\n\t\t }\n\t\t catch (InterruptedException | ExecutionException e) {\n\t\t\t // TODO Auto-generated catch block\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t \n\t }\n\t \n\t for (Row row : resultset) {\n\t\t Asset asset = new Asset();\n\t\t asset.setId(row.getString(\"id\"));\n\t\t asset.setAntivirus(row.getString(\"antivirus\"));\n\t\t asset.setCurrent(row.getLong(\"current\"));\n\t\t asset.setIpAddress(row.getString(\"ipaddress\"));\n\t\t asset.setLatitude(row.getString(\"latitude\"));\n\t\t asset.setLongitude(row.getString(\"longitude\"));\n\t\t asset.setOs(row.getString(\"os\"));\n\t\t asset.setPressure(row.getLong(\"pressure\"));\n \t asset.setFlowRate(row.getLong(\"flowRate\"));\n\t\t asset.setPressure(row.getLong(\"pressure\"));\n\t\t asset.setRotation(row.getLong(\"rotation\"));\n\t\t asset.setTemperature(row.getInt(\"temperature\"));\n\t\t asset.setType(row.getString(\"type\"));\n\t\t asset.setVersion(row.getString(\"version\"));\n\t\t asset.setCreationDate(row.getTimestamp(\"creationDate\"));\n\t\t assets.add(asset);\n\t\t \n\t }\n\t \n\t return assets;\n\t \n }", "double[] getRowForToolType(String toolType) {\n\t\tdouble [] resultArr = {-1, -1, -1, -1}; //initialize all elements to sentinel of negative one\r\n\t\ttry {\r\n\t\t\tint initStatus = initConnection();\r\n\t\t\tif (initStatus == 0) {\r\n\t\t\t\tStatement stmt = conn.createStatement(); //send query to DB\r\n\t\t\t\tResultSet rs = stmt.executeQuery(\"select * from \" + tableName + \" where Tool_Type = '\" + toolType + \"'\");\r\n\t\t\t\t//check to see if we got back any results\r\n\t\t\t\tif (!rs.isBeforeFirst()) { \r\n\t\t\t\t System.out.println(\"No results found in the database.\"); \r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t\twhile (rs.next()) { //add results to array\r\n\t\t\t\t\t\t\tresultArr[0] = rs.getDouble(\"Daily_Rate\");\r\n\t\t\t\t\t\t\tString weekday = rs.getString(\"Weekday\");\r\n\t\t\t\t\t\t\t//convert Y/N to 1/0 for use in Contract's method calculateCosts()\r\n\t\t\t\t\t\t\tresultArr[1] = weekday.equals(\"Y\") ? 1 : 0;\r\n\t\t\t\t\t\t\tString weekend = rs.getString(\"Weekend\");\r\n\t\t\t\t\t\t\tresultArr[2] = weekend.equals(\"Y\") ? 1 : 0;\r\n\t\t\t\t\t\t\tString holiday = rs.getString(\"Holiday\");\r\n\t\t\t\t\t\t\tresultArr[3] = holiday.equals(\"Y\") ? 1 : 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\trs.close();\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tcloseConnection();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error: Query to database for pricing information failed. Please make sure the tool type exists in the database.\");\r\n\t\t\tcloseConnection();\r\n\t\t}\r\n\t\treturn resultArr;\r\n\t}", "public ResponseHeaderDefinition dataType(String type) {\n setDataType(type);\n return this;\n }", "public GTData getDocument(String ID, Type type) throws Exception {\n Get request = new Get.Builder(INDEX_NAME, ID).build();\n\n JestResult result = client.execute(request);\n GTData data = null;\n if (type.equals(Bid.class)) {\n data = result.getSourceAsObject(Bid.class);\n } else if (type.equals(Task.class)) {\n data = result.getSourceAsObject(Task.class);\n } else if (type.equals(User.class)) {\n data = result.getSourceAsObject(User.class);\n } else if (type.equals(Photo.class)) {\n data = result.getSourceAsObject(Photo.class);\n }\n Log.i(\"checkget\",data.toString());\n return data;\n\n\n }", "public ArrayList< LocationHandler >getAllLocationByType (int type){\n\t\tArrayList< LocationHandler> locationList = new ArrayList< LocationHandler>();\n\t\tString selectQuery = \"SELECT * FROM \" + table_location + \" WHERE \" + key_type + \" LIKE \" + \"'\"+ type +\",\"+\"%'\" + \" ORDER BY \" + key_date_entry ; \n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationHandler locationHandlerArray = new LocationHandler();\n\t\t\t\tlocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationHandlerArray.setLongitude(cursor.getDouble(3)); \n\t\t\t\tlocationHandlerArray.setLatitude(cursor.getDouble(4)); \n\t\t\t\tlocationHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationHandlerArray.setType(cursor.getString(6)); \n\t\t\t\tlocationHandlerArray.setSearchTag(cursor.getString(7));\n\t\t\t\tlocationHandlerArray.setAmountables(cursor.getDouble(8));\n\t\t\t\tlocationHandlerArray.setDescription(cursor.getString(9));\n\t\t\t\tlocationHandlerArray.setBestSeller(cursor.getString(10));\n\t\t\t\tlocationHandlerArray.setWebsite(cursor.getString(11));\n\t\t\t\tlocationList.add(locationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdb.close();\n\t\treturn locationList;\n\t}", "public Class<? extends AttributeDescription> getDataType();", "private boolean getData() {\n\t\t\n\t\t// get the resource types\n\t\tif (loanArray == null) {\n\t\t\tLoan searchKey = new Loan(-1, -1, -1, null, null, null, -1, false);\n\t\t\tloanArray = LoanManager.getLoan(searchKey);\n\t\t\tif (loanArray == null)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}", "public List<Dataset> getDatasets();", "public TypeData getTypeData(MigrationType type);", "private XYMultipleSeriesDataset getdemodataset() {\n\t\t\tdataset1 = new XYMultipleSeriesDataset();// xy轴数据源\n\t\t\tseries = new XYSeries(\"温度 \");// 这个事是显示多条用的,显不显示在上面render设置\n\t\t\t// 这里相当于初始化,初始化中无需添加数据,因为如果这里添加第一个数据的话,\n\t\t\t// 很容易使第一个数据和定时器中更新的第二个数据的时间间隔不为两秒,所以下面语句屏蔽\n\t\t\t// 这里可以一次更新五个数据,这样的话相当于开始的时候就把五个数据全部加进去了,但是数据的时间是不准确或者间隔不为二的\n\t\t\t// for(int i=0;i<5;i++)\n\t\t\t// series.add(1, Math.random()*10);//横坐标date数据类型,纵坐标随即数等待更新\n\n\t\t\tdataset1.addSeries(series);\n\t\t\treturn dataset1;\n\t\t}", "private PieData generateDataPie() {\n\n ArrayList<PieEntry> entries = new ArrayList<>();\n String year = year_txt.getText().toString();\n String month1 =Utilities.getMonth(months,month_txt.getText().toString());\n TransactionBeans transactionBeans = transactionDB.getTransactionRecordsYear(month1,year);\n if(transactionBeans!=null) {\n float income = 0;\n float expense = 0;\n try{\n income = (float) (Double.parseDouble(transactionBeans.getIncome()));\n }catch(Exception e){\n income = 0;\n }\n try{\n expense = (float) (Double.parseDouble(transactionBeans.getExpense()));\n }catch(Exception e){\n expense = 0;\n }\n entries.add(new PieEntry(income, \"Income \"));\n entries.add(new PieEntry(expense, \"Expense \"));\n }\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n return new PieData(d);\n }", "public XYMultipleSeriesDataset getDataset() {\n\t\tEnvironmentTrackerOpenHelper openhelper = new EnvironmentTrackerOpenHelper(ResultsContent.context);\n\t\tSQLiteDatabase database = openhelper.getReadableDatabase();\n\t\tString[] columns = new String[2];\n\t\tcolumns[0] = \"MOOD\";\n\t\tcolumns[1] = \"HUE_CATEGORY\";\n\t\tCursor results = database.query(true, \"Observation\", columns, null, null, null, null, null, null);\n\t\t\n\t\t// Make sure the cursor is at the start.\n\t\tresults.moveToFirst();\n\t\t\n\t\tint[] meanMoodCategoryHue = new int[4];\n\t\tint[] nrMoodCategoryHue = new int[4];\n\t\t\n\t\t// Overloop de verschillende observaties.\n\t\twhile (!results.isAfterLast()) {\n\t\t\tint mood = results.getInt(0);\n\t\t\tint hue = results.getInt(1);\n\t\t\t\n\t\t\t// Tel de mood erbij en verhoog het aantal met 1 in de juiste categorie.\n\t\t\tmeanMoodCategoryHue[hue-1] = meanMoodCategoryHue[hue-1] + mood;\n\t\t\tnrMoodCategoryHue[hue-1]++;\n\t\t\tresults.moveToNext();\n\t\t}\n\t\t\n\t\t// Bereken voor elke hue categorie de gemiddelde mood.\n\t\tfor (int i=1;i<=4;i++) {\n\t\t\tif (nrMoodCategoryHue[i-1] == 0) {\n\t\t\t\tmeanMoodCategoryHue[i-1] = 0;\n\t\t\t} else {\n\t\t\t\tmeanMoodCategoryHue[i-1] = meanMoodCategoryHue[i-1]/nrMoodCategoryHue[i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Plaats de gegevens samen in een dataset voor de grafiek.\n\t\tXYMultipleSeriesDataset myData = new XYMultipleSeriesDataset();\n\t XYSeries dataSeries = new XYSeries(\"data\");\n\t dataSeries.add(1,meanMoodCategoryHue[0]);\n\t dataSeries.add(2,meanMoodCategoryHue[1]);\n\t dataSeries.add(3,meanMoodCategoryHue[2]);\n\t dataSeries.add(4,meanMoodCategoryHue[3]);\n\t myData.addSeries(dataSeries);\n\t return myData;\n\t}", "public Dataset findDataset( String name ) {\n if ( name == null )\n return null;\n if ( dataset.getName() != null && name.equals( dataset.getName() ) ) {\n return dataset;\n }\n return findDataset( name, dataset.getDatasets() );\n }", "public Items[] findWhereTypeEquals(String type) throws ItemsDaoException;", "private IDataSet getDataSet() throws IOException, DataSetException {\r\n\t\tFile file = new File(\"src/test/resources/lote.xml\");\r\n\t\tIDataSet dataSet = new FlatXmlDataSet(file);\r\n\t\treturn dataSet;\r\n\t}", "public Object getfacilityData(int facilityTypeId, int sectionId,\n\t\t\tint timePeriodId, int districtId);", "public String getDataType() \n {\n System.out.println(dataType.getValue().toString());\n return dataType.getValue().toString(); \n }", "DatasetFile getDatasetFile();", "Food getByType(String type);", "@Override\n\tpublic IndicatorTypeOverview getIndicatorTypeOverviewData(final ExporterIndicatorQueryData queryData) {\n\t\t// return curatedDataService.getIndicatorTypeOverview(queryData.getIndicatorTypeCode(), queryData.getSourceCode(), queryData.getLanguage());\n\t\tfinal IndicatorTypeOverview indicatorTypeOverview = indicatorTypeOverviewDAO.getIndicatorTypeOverview(queryData.getIndicatorTypeCode(), queryData.getSourceCode());\n\t\treturn indicatorTypeOverview;\n\t}", "public PoliceObject[] getPolice(String type, String startDate, String endDate) {\n LinkedList<PoliceObject> list = new LinkedList<>();\n\n boolean hasType = (!type.equals(\"*\"));\n boolean hasStart = (!startDate.equals(\"*\"));\n boolean hasEnd = (!endDate.equals(\"*\"));\n boolean hasDate = (hasStart && hasEnd);\n\n if (hasType && hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n }\n });\n } else if (hasType) {\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n list.add(e);\n }\n });\n } else if (hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n });\n } else {\n list.addAll(this.policeDB.values());\n }\n\n PoliceObject[] array = new PoliceObject[list.size()];\n for (int i=0; i<list.size(); i++) {\n array[i] = list.get(i);\n }\n\n return array;\n }", "@Override\n\tpublic int getDataType()\n\t{\n\t\treturn dataType;\n\t}", "private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"[email protected]\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }", "@Override\r\n\tpublic LastOneDayList getElectricity(String type) {\n\t\treturn totalConsumptionDao.getElectricity(type);\r\n\t}", "private LineDataSet createSet(){\n LineDataSet set = new LineDataSet(null, \"SPL Db\");\n set.setDrawCubic(true);\n set.setCubicIntensity(0.2f);\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n set.setColor(ColorTemplate.getHoloBlue());\n set.setLineWidth(2f);\n set.setCircleSize(4f);\n set.setFillAlpha(65);\n set.setFillColor(ColorTemplate.getHoloBlue());\n set.setHighLightColor(Color.rgb(244,117,177));\n set.setValueTextColor(Color.WHITE);\n set.setValueTextSize(10f);\n\n return set;\n }", "public Data (String name, int type) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tstream = new MyReader();\n\t}", "public DataImpl getData() {\n RealTupleType domain = overlay.getDomainType();\n TupleType range = overlay.getRangeType();\n \n float[][] setSamples = nodes;\n float r = color.getRed() / 255f;\n float g = color.getGreen() / 255f;\n float b = color.getBlue() / 255f;\n float[][] rangeSamples = new float[3][setSamples[0].length];\n Arrays.fill(rangeSamples[0], r);\n Arrays.fill(rangeSamples[1], g);\n Arrays.fill(rangeSamples[2], b);\n \n FlatField field = null;\n try {\n GriddedSet fieldSet = new Gridded2DSet(domain,\n setSamples, setSamples[0].length, null, null, null, false);\n FunctionType fieldType = new FunctionType(domain, range);\n field = new FlatField(fieldType, fieldSet);\n field.setSamples(rangeSamples);\n }\n catch (VisADException exc) { exc.printStackTrace(); }\n catch (RemoteException exc) { exc.printStackTrace(); }\n return field;\n }", "public DataSet getDataSet() {\r\n return dataBinder.getDataSet();\r\n }", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "DataFactory getDataFactory();", "private CategoryDataset createDataset( )\n\t {\n\t final DefaultCategoryDataset dataset = \n\t new DefaultCategoryDataset( ); \n\t \n\t dataset.addValue(23756.0, \"余杭\", \"闲林\");\n\t dataset.addValue(29513.5, \"余杭\", \"良渚\");\n\t dataset.addValue(25722.2, \"余杭\", \"瓶窑\");\n\t dataset.addValue(19650.9, \"余杭\", \"星桥\");\n\t dataset.addValue(19661.6, \"余杭\", \"崇贤\");\n\t dataset.addValue(13353.9, \"余杭\", \"塘栖\");\n\t dataset.addValue(25768.9, \"余杭\", \"勾庄\");\n\t dataset.addValue(12682.8, \"余杭\", \"仁和\");\n\t dataset.addValue(22963.1, \"余杭\", \"乔司\");\n\t dataset.addValue(19695.6, \"余杭\", \"临平\");\n\t \n\t return dataset; \n\t }", "public abstract DataSet getTablesByType(String catalog, String schema,\r\n String pattern, String type)\r\n throws Exception;", "@java.lang.Override\n public com.clarifai.grpc.api.Dataset getDataset() {\n if (datasetBuilder_ == null) {\n if (inputSourceCase_ == 11) {\n return (com.clarifai.grpc.api.Dataset) inputSource_;\n }\n return com.clarifai.grpc.api.Dataset.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 11) {\n return datasetBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.Dataset.getDefaultInstance();\n }\n }", "public static CategoryDataset createDataset() {\r\n DefaultCategoryDataset dataset = new DefaultCategoryDataset();\r\n dataset.addValue(1.0, \"First\", \"C1\");\r\n dataset.addValue(4.0, \"First\", \"C2\");\r\n dataset.addValue(3.0, \"First\", \"C3\");\r\n dataset.addValue(5.0, \"First\", \"C4\");\r\n dataset.addValue(5.0, \"First\", \"C5\");\r\n dataset.addValue(7.0, \"First\", \"C6\");\r\n dataset.addValue(7.0, \"First\", \"C7\");\r\n dataset.addValue(8.0, \"First\", \"C8\");\r\n dataset.addValue(5.0, \"Second\", \"C1\");\r\n dataset.addValue(7.0, \"Second\", \"C2\");\r\n dataset.addValue(6.0, \"Second\", \"C3\");\r\n dataset.addValue(8.0, \"Second\", \"C4\");\r\n dataset.addValue(4.0, \"Second\", \"C5\");\r\n dataset.addValue(4.0, \"Second\", \"C6\");\r\n dataset.addValue(2.0, \"Second\", \"C7\");\r\n dataset.addValue(1.0, \"Second\", \"C8\");\r\n dataset.addValue(4.0, \"Third\", \"C1\");\r\n dataset.addValue(3.0, \"Third\", \"C2\");\r\n dataset.addValue(2.0, \"Third\", \"C3\");\r\n dataset.addValue(3.0, \"Third\", \"C4\");\r\n dataset.addValue(6.0, \"Third\", \"C5\");\r\n dataset.addValue(3.0, \"Third\", \"C6\");\r\n dataset.addValue(4.0, \"Third\", \"C7\");\r\n dataset.addValue(3.0, \"Third\", \"C8\");\r\n return dataset;\r\n }", "protected Object readData(Layout index, DataType dataType) throws java.io.IOException {\n return IospHelper.readDataFill(raf, index, dataType, null, -1);\n }", "public static Dataclient GetData(){\n return RetrofitClient.getClient(Base_Url).create(Dataclient.class);\n }", "private Dataset getDataset()\n throws XMLParsingException, MissingParameterValueException,\n InvalidParameterValueException, OGCWebServiceException {\n\n Element datasetElement = (Element) XMLTools.getRequiredNode( getRootElement(), PRE_WPVS + \"Dataset\", nsContext );\n Dataset dataset = parseDataset( datasetElement, null, null, null );\n\n return dataset;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List cargarDato(UnidadFuncional tipo) {\n\t\treturn null;\r\n\t}", "default DataType getDataType(DataTypeName id) {return (DataType)this;}", "public Class getDataType() {\n return datatype;\n }", "GetRecordByIdType createGetRecordByIdType();", "public DataSourceType getDataSourceType() {\n return dataSourceType;\n }" ]
[ "0.63008857", "0.6226188", "0.6003403", "0.5887702", "0.58519876", "0.5733374", "0.5731527", "0.5608523", "0.5333179", "0.53155875", "0.51681674", "0.51620305", "0.5154945", "0.5143132", "0.5124487", "0.5124203", "0.51110935", "0.5080083", "0.5058673", "0.50566226", "0.50462985", "0.5045788", "0.50428003", "0.5035242", "0.5009298", "0.50068456", "0.49338192", "0.49218014", "0.49072254", "0.48967314", "0.48958394", "0.48678353", "0.48522002", "0.4843738", "0.48429328", "0.4827955", "0.4826736", "0.480928", "0.48092303", "0.48041314", "0.47791526", "0.4773446", "0.47711667", "0.47646227", "0.47594416", "0.4758847", "0.47507107", "0.47498515", "0.47467652", "0.4743734", "0.47432464", "0.474303", "0.4734923", "0.47245044", "0.47195426", "0.46970782", "0.4675321", "0.46606016", "0.46535003", "0.46503863", "0.46502912", "0.46408084", "0.4638031", "0.46300134", "0.46299586", "0.46210462", "0.46178383", "0.46113074", "0.46105334", "0.46082976", "0.4600723", "0.45964348", "0.45845443", "0.45794153", "0.45765743", "0.45734215", "0.45697713", "0.45584714", "0.45583922", "0.45568088", "0.45544603", "0.45509285", "0.45213947", "0.45187643", "0.45149612", "0.45105165", "0.45070496", "0.44983867", "0.44921836", "0.4492168", "0.4485979", "0.44829902", "0.4482676", "0.44812432", "0.44782892", "0.4475722", "0.44748974", "0.4471221", "0.44661438", "0.44573575" ]
0.6635365
0
Returns DataSet of XY points for given Polar type DataSet. This is probably bogus since it makes assumptions about the XY range.
public static DataSet getPolarXYDataForPolar(DataSet aDataSet) { // If already non-polar, just return if (!aDataSet.getDataType().isPolar()) return aDataSet; // Get pointCount and create dataX/dataY arrays int pointCount = aDataSet.getPointCount(); double[] dataX = new double[pointCount]; double[] dataY = new double[pointCount]; // Get whether to convert to radians boolean convertToRadians = aDataSet.getThetaUnit() != DataUnit.Radians; // Iterate over X values and convert to 0 - 360 scale for (int i = 0; i < pointCount; i++) { // Get Theta and Radius double dataTheta = aDataSet.getT(i); double dataRadius = aDataSet.getR(i); if (convertToRadians) dataTheta = Math.toRadians(dataTheta); // Convert to display coords dataX[i] = Math.cos(dataTheta) * dataRadius; dataY[i] = Math.sin(dataTheta) * dataRadius; } // Get DataZ and DataType double[] dataZ = aDataSet.getDataType().hasZ() ? aDataSet.getDataZ() : null; DataType dataType = dataZ == null ? DataType.XY : DataType.XYZ; // Return new DataSet for type and values return DataSet.newDataSetForTypeAndValues(dataType, dataX, dataY, dataZ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<Point> createLinearDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 100);\r\n add(data, 5, 200);\r\n add(data, 10, 300);\r\n add(data, 15, 400);\r\n return data;\r\n }", "public static DataSet getPolarDataForType(DataSet aDataSet, DataType aDataType)\n {\n // If already polar, just return\n if (aDataSet.getDataType().isPolar())\n return aDataSet;\n\n // Complain if DataType arg isn't polar\n if (!aDataType.isPolar())\n throw new IllegalArgumentException(\"DataSetUtils.getPolarDataForType: Come on, man: \" + aDataType);\n\n // Otherwise, get DataX array and create dataT array\n int pointCount = aDataSet.getPointCount();\n double[] dataT = new double[pointCount];\n\n // Get min/max X to scale to polar\n double minX = aDataSet.getMinX();\n double maxX = aDataSet.getMaxX();\n double maxAngle = 2 * Math.PI; // 360 degrees\n\n // Iterate over X values and convert to 0 - 360 scale\n for (int i = 0; i < pointCount; i++) {\n double valX = aDataSet.getX(i);\n double valTheta = (valX - minX) / (maxX - minX) * maxAngle;\n dataT[i] = valTheta;\n }\n\n // Get DataR and DataZ\n double[] dataR = aDataSet.getDataY();\n double[] dataZ = aDataSet.getDataType().hasZ() ? aDataSet.getDataZ() : null;\n if (aDataType.hasZ() && dataZ == null)\n dataZ = new double[pointCount];\n\n // Create new DataSet for type and values and return\n DataSet polarData = DataSet.newDataSetForTypeAndValues(aDataType, dataT, dataR, dataZ);\n polarData.setThetaUnit(DataUnit.Radians);\n return polarData;\n }", "private static List<Point> createConvergingDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 400);\r\n add(data, 5, 700);\r\n add(data, 10, 900);\r\n add(data, 15, 1000);\r\n add(data, 20, 1050);\r\n add(data, 25, 1060);\r\n add(data, 30, 1062);\r\n return data;\r\n }", "@Override\r\n\tpublic Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) {\n\t\tPoint[] pointsArr = new Point[counter(min, max, axis)];\r\n\t\t//Fill in the array with fitting points\r\n\t\tint ind = 0;\r\n\t\tif(axis){\r\n\t\t\tContainer currX = firstX;\r\n\t\t\twhile (currX!=null){\r\n\t\t\t\tif(((Point)currX.getData()).getX() >= min &&((Point)currX.getData()).getX() <= max){\r\n\t\t\t\t\tpointsArr[ind] = currX.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrX = currX.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tContainer currY = firstY;\r\n\t\t\twhile (currY!=null){\r\n\t\t\t\tif(((Point)currY.getData()).getY() >= min &&((Point)currY.getData()).getY() <= max){\r\n\t\t\t\t\tpointsArr[ind] = currY.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrY = currY.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn pointsArr;\r\n\t}", "@Override\n\tpublic Plot2DDataSet getValues(float xmin, float xmax) throws UnsupportedOperationException {\n\t\tfinal JSONArray arr = new JSONArray();\n\t\tfinal Iterator<Object> it = data.getJSONArray(\"data\").iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tfinal JSONObject point = (JSONObject) it.next();\n\t\t\tfinal long x = point.getLong(\"x\");\n\t\t\t// TODO more efficient way to find first relevant timestamp\n\t\t\tif (x >= xmin && x <= xmax)\n\t\t\t\tarr.put(point);\n\t\t\telse if (x > xmax)\n\t\t\t\tbreak;\n\t\t}\n\t\tfinal JSONObject json = new JSONObject();\n\t\tjson.put(\"label\", id);\n\t\tjson.put(\"data\", arr);\n\t\treturn new ChartjsDataSet(id, json);\n\t}", "@Override\r\n\tpublic Point[] getPointsInRangeOppAxis(int min, int max, Boolean axis) {\n\t\tPoint[] pointsArr = new Point[counter(min, max, axis)];\r\n\t\t//fill in the array\r\n\t\tif(axis){\r\n\t\t\tContainer currY = firstY;\r\n\t\t\tint ind = 0;\r\n\t\t\twhile(currY!=null){\r\n\t\t\t\tif(currY.getData().getX()>=min & currY.getData().getX()<=max){\r\n\t\t\t\t\tpointsArr[ind] = currY.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrY=currY.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tContainer currX = firstX;\r\n\t\t\tint ind = 0;\r\n\t\t\twhile(currX!=null){\r\n\t\t\t\tif(currX.getData().getY()>=min && currX.getData().getY()<=max){\r\n\t\t\t\t\tpointsArr[ind] = currX.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrX=currX.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn pointsArr;\r\n\t}", "public int[] getXPoints ()\n\t{\n\t\tint xPoints [] = {xDimension1, xDimension2, xDimension3};\n\t\treturn xPoints;\n\t}", "private static List<Point> createIncreasingDecreasingDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 400);\r\n add(data, 5, 700);\r\n add(data, 10, 900);\r\n add(data, 15, 1000);\r\n add(data, 20, 900);\r\n add(data, 25, 700);\r\n add(data, 30, 500);\r\n return data;\r\n }", "public double[] GetPointArray() {\n return PointArray;\n }", "private static XYDataset createDataset(Double[] x, Double[] y) {\n\t\tlogger.info(\"Creating Dataset\");\n\t\tXYSeries s1 = new XYSeries(Double.valueOf(1));\n\t\tif (x.length != y.length) {\n\t\t\tlogger.error(\"Error in createDataset of ScatterDialog. \" +\n\t\t\t\t\t\"Could not create a dataset for the scatter plot -- missing data\");\n\t\t\treturn null;\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tif (y[i] != null) {\n\t\t\t\ts1.add(x[i], y[i]);\n\t\t\t}\n\t\t}\n\t\tXYSeriesCollection dataset = new XYSeriesCollection();\n\t\tdataset.addSeries(s1);\n\t\treturn dataset;\n\t}", "PlotPoints(double[] xdata, double[] ydata,\n double xMn, double xMx, double yMn, double yMx) {\n nPts = xdata.length;\n x = new double[nPts];\n y = new double[nPts];\n err = new double[nPts];\n for(int i=0; i<nPts; i++){\n x[i] = xdata[i];\n y[i] = ydata[i];\n }\n xMin = xMn;\n xMax = xMx;\n yMin = yMn;\n yMax = yMx;\n }", "public Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) {\n\t\tint Number = NumInRangeAxis(min, max, axis); //how much points are there ?\n\t\tPoint[] pointsInRange = new Point[Number];\n\t\tif (Number==0) return pointsInRange;\n\t\tint i = 0;\n\t\tif (axis){\n\t\t\tthis.current=this.minx;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX()<=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.current=this.miny;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY()<=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}\n\t\t}\n\t\treturn pointsInRange;\n\t}", "public RMPoint getXY() { return new RMPoint(getX(), getY()); }", "public static PointD[] fillData() {\n ArrayList<PointD> vals = new ArrayList();\n while (scn.hasNextLine()) {\n String[] xandy = scn.nextLine().split(\"\\\\s*,\\\\s*\");\n vals.add(new PointD(Double.parseDouble(xandy[0]), Double.parseDouble(xandy[1])));\n }\n PointD[] vals2 = new PointD[vals.size()];\n for (int x = 0; x < vals.size(); x++) {\n vals2[x] = vals.get(x);\n }\n return vals2;\n }", "public int[] getYPoints ()\n\t{\n\t\tint yPoints [] = {yDimension1, yDimension2, yDimension3};\n\t\treturn yPoints;\n\t}", "public void getSeriesForPoints(){\n\n int lenght = cluster_polygon_coordinates.length;\n\n x_latitude = new Number[lenght];\n y_longitude = new Number[lenght];\n\n //x_latitude[lenght-1] = cluster_polygon_coordinates[0].x;\n //y_longitude[lenght-1] = cluster_polygon_coordinates[0].y;\n for (int i=0;i<lenght;i++) {\n\n x_latitude[i] = cluster_polygon_coordinates[i].x;\n y_longitude[i] = cluster_polygon_coordinates[i].y;\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].x));\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].y));\n// Log.d(TAG, Double.toString(cluster_polygon_coordinates[i].z));\n }\n\n }", "public ArrayList<Point> getAllPoints() {\n return allPoints;\n }", "public Dataset(final int dimensions, final int numPoints) {\n this(dimensions);\n\n for (int i = 0; i < numPoints; i++) {\n double[] point = new double[dimensions];\n addPoint(new DataPoint(point));\n }\n }", "public XYData(double x[], float y[], double resolution)\n\t{\n\t\tthis.resolution = resolution;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tincreasingX = true;\n\t\tnSamples = (x.length < y.length) ? x.length : y.length;\n\t\tif (nSamples > 0)\n\t\t{\n\t\t\txMin = xMax = x[0];\n\t\t\tfor (int i = 1; i < x.length; i++)\n\t\t\t{\n\t\t\t\tif (x[i - 1] > x[i])\n\t\t\t\t{\n\t\t\t\t\tincreasingX = false;\n\t\t\t\t}\n\t\t\t\tif (x[i] > xMax)\n\t\t\t\t\txMax = x[i];\n\t\t\t\tif (x[i] < xMin)\n\t\t\t\t\txMin = x[i];\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Point> getTrios(final LineData lineData) {\n\t\treturn lineData.getPoints();\n\t}", "protected ArrayList<DataFromPoint> getFromPoints() {\n\t\treturn fromPoints.stream().map(e -> e.fromPoint)\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\n\t}", "public static RealPointSampleList< FloatType > createRandomPoints(\n\t\tRealInterval interval, int numPoints )\n\t{\n\t\t// the number of dimensions\n\t\tint numDimensions = interval.numDimensions();\n\n\t\t// a random number generator\n\t\tRandom rnd = new Random( System.currentTimeMillis() );\n\n\t\t// a list of Samples with coordinates\n\t\tRealPointSampleList< FloatType > elements =\n\t\t\tnew RealPointSampleList<>( numDimensions );\n\n\t\tfor ( int i = 0; i < numPoints; ++i )\n\t\t{\n\t\t\tRealPoint point = new RealPoint( numDimensions );\n\n\t\t\tfor ( int d = 0; d < numDimensions; ++d )\n\t\t\t\tpoint.setPosition( rnd.nextDouble() *\n\t\t\t\t\t( interval.realMax( d ) - interval.realMin( d ) ) + interval.realMin( d ), d );\n\n\t\t\t// add a new element with a random intensity in the range 0...1\n\t\t\telements.add( point, new FloatType( rnd.nextFloat() ) );\n\t\t}\n\n\t\treturn elements;\n\t}", "public org.astrogrid.stc.coords.v1_10.beans.Double3Type[] xgetPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n org.astrogrid.stc.coords.v1_10.beans.Double3Type[] result = new org.astrogrid.stc.coords.v1_10.beans.Double3Type[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "public abstract List<Point2D> getInterpolatedPoints();", "public Point[] getPointsInRangeOppAxis(int min, int max, Boolean axis) {\n\t\tint Number = NumInRangeAxis(min, max, axis);\n\t\tPoint[] pointsInRange = new Point[Number];\n\t\tif (Number==0) return pointsInRange;\n\t\tint i = 0;\n\t\tif (axis){ // sorted by axis y\n\t\t\tthis.current=this.miny;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX() <=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}\t\n\t\t}\n\t\telse {// sorted by axis x\n\t\t\tthis.current=this.minx;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY() <=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}\n\t\t}\n\t\treturn pointsInRange;\n\t}", "public XYData(long x[], float y[], double resolution)\n\t{\n\t\tthis.resolution = resolution;\n\t\tthis.xLong = x;\n\t\tthis.y = y;\n\t\tthis.x = new double[x.length];\n\t\tfor (int i = 0; i < x.length; i++)\n\t\t\tthis.x[i] = x[i];\n\t\tincreasingX = true;\n\t\tnSamples = (x.length < y.length) ? x.length : y.length;\n\t\tif (nSamples > 0)\n\t\t{\n\t\t\txMin = xMax = x[0];\n\t\t\tfor (int i = 1; i < x.length; i++)\n\t\t\t{\n\t\t\t\tif (x[i - 1] > x[i])\n\t\t\t\t{\n\t\t\t\t\tincreasingX = false;\n\t\t\t\t}\n\t\t\t\tif (x[i] > xMax)\n\t\t\t\t\txMax = x[i];\n\t\t\t\tif (x[i] < xMin)\n\t\t\t\t\txMin = x[i];\n\t\t\t}\n\t\t}\n\t}", "Collection<Point> getAllCoordinates();", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "public java.util.List[] getPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n java.util.List[] result = new java.util.List[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getListValue();\n return result;\n }\n }", "public Collection <Point> getAllPoints(){\n Collection <Point> points = new ArrayList<>();\n for(int i = 0; i < width; i++){\n for(int j = 0; j < height; j++){\n points.add(new Point(i, j));\n }\n }\n return points;\n }", "List<CalibratedAxis> getAxesPlanar();", "public XYSeries getXYSeries(String serie_name){ \n XYSeries serie = new XYSeries(serie_name); \n Point2D[] points_bezier = getPoint2DArray(); \n for(int j = 0 ; j < points_bezier.length; j++){ \n \n serie.add(points_bezier[j].getX(),points_bezier[j].getY()); \n } \n return serie; \n}", "private XYDataset createDataset() {\n\t \tXYSeriesCollection dataset = new XYSeriesCollection();\n\t \t\n\t \t//Definir cada Estacao\n\t\t XYSeries aes1 = new XYSeries(\"Estação1\");\n\t\t XYSeries aes2 = new XYSeries(\"Estação2\");\n\t\t XYSeries aes3 = new XYSeries(\"Estação3\");\n\t\t XYSeries aes4 = new XYSeries(\"Estação4\");\n\t\t XYSeries aes5 = new XYSeries(\"Estação5\");\n\t\t XYSeries aes6 = new XYSeries(\"Estação6\");\n\t\t XYSeries aes7 = new XYSeries(\"Estação7\");\n\t\t XYSeries aes8 = new XYSeries(\"Estação8\");\n\t\t XYSeries aes9 = new XYSeries(\"Estação9\");\n\t\t XYSeries aes10 = new XYSeries(\"Estação10\");\n\t\t XYSeries aes11 = new XYSeries(\"Estação11\");\n\t\t XYSeries aes12 = new XYSeries(\"Estação12\");\n\t\t XYSeries aes13 = new XYSeries(\"Estação13\");\n\t\t XYSeries aes14 = new XYSeries(\"Estação14\");\n\t\t XYSeries aes15 = new XYSeries(\"Estação15\");\n\t\t XYSeries aes16 = new XYSeries(\"Estação16\");\n\t\t \n\t\t //Definir numero de utilizadores em simultaneo para aparece na Interface\n\t\t XYSeries au1 = new XYSeries(\"AU1\");\n\t\t XYSeries au2 = new XYSeries(\"AU2\");\n\t\t XYSeries au3 = new XYSeries(\"AU3\");\n\t\t XYSeries au4 = new XYSeries(\"AU4\");\n\t\t XYSeries au5 = new XYSeries(\"AU5\");\n\t\t XYSeries au6 = new XYSeries(\"AU6\");\n\t\t XYSeries au7 = new XYSeries(\"AU7\");\n\t\t XYSeries au8 = new XYSeries(\"AU8\");\n\t\t XYSeries au9 = new XYSeries(\"AU9\");\n\t\t XYSeries au10 = new XYSeries(\"AU10\");\n\t\t \n\t\t //Colocar estacoes no gráfico\n\t\t aes1.add(12,12);\n\t\t aes2.add(12,37);\n\t\t aes3.add(12,62);\n\t\t aes4.add(12,87);\n\t\t \n\t\t aes5.add(37,12);\n\t\t aes6.add(37,37);\n\t\t aes7.add(37,62);\n\t\t aes8.add(37,87);\n\t\t \n\t\t aes9.add(62,12); \n\t\t aes10.add(62,37);\n\t\t aes11.add(62,62);\n\t\t aes12.add(62,87);\n\t\t \n\t\t aes13.add(87,12);\n\t\t aes14.add(87,37);\n\t\t aes15.add(87,62);\n\t\t aes16.add(87,87);\n\t\t \n\t\t//Para a bicicleta 1\n\t\t \t\n\t\t\t for(Entry<String, String> entry : position1.entrySet()) {\n\t\t\t\t String key = entry.getKey();\n\t\t\t\t \n\t\t\t\t String[] part= key.split(\",\");\n\t\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t\t \n\t\t\t\t au1.add(keyX,keyY);\n\t\t\t }\n\t\t \n\t\t\t //Para a bicicleta 2\n\t\t for(Entry<String, String> entry : position2.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au2.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Para a bicicleta 3\n\t\t for(Entry<String, String> entry : position3.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au3.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position4.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au4.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position5.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au5.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position6.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au6.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position7.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au7.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position8.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au8.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position9.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au9.add(keyX,keyY);\n\t\t }\n\t\t for(Entry<String, String> entry : position10.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t \n\t\t\t String[] part= key.split(\",\");\n\t\t\t double keyX=Double.valueOf(part[0]);\n\t\t\t double keyY=Double.valueOf(part[1]);\n\t\t\t \n\t\t\t au10.add(keyX,keyY);\n\t\t }\n\t\t \n\t\t //Add series to dataset\n\t\t dataset.addSeries(au1);\n\t\t dataset.addSeries(au2);\n\t\t dataset.addSeries(au3);\n\t\t dataset.addSeries(au4);\n\t\t dataset.addSeries(au5);\n\t\t dataset.addSeries(au6);\n\t\t dataset.addSeries(au7);\n\t\t dataset.addSeries(au8);\n\t\t dataset.addSeries(au9);\n\t\t dataset.addSeries(au10);\n\t\t \n\t\t \n\t\t dataset.addSeries(aes1);\n\t\t dataset.addSeries(aes2);\n\t\t dataset.addSeries(aes3);\n\t\t dataset.addSeries(aes4);\n\t\t dataset.addSeries(aes5);\n\t\t dataset.addSeries(aes6);\n\t\t dataset.addSeries(aes7);\n\t\t dataset.addSeries(aes8);\n\t\t dataset.addSeries(aes9);\n\t\t dataset.addSeries(aes10);\n\t\t dataset.addSeries(aes11);\n\t\t dataset.addSeries(aes12);\n\t\t dataset.addSeries(aes13);\n\t\t dataset.addSeries(aes14);\n\t\t dataset.addSeries(aes15);\n\t\t dataset.addSeries(aes16);\n\t\t \n\t\t return dataset;\n\t }", "private Point[] getPointArray()\n\t{\n\t\treturn this.pointArray; // This should probably be a copy, to maintain security (?)\n\t}", "public abstract ArrayList<STTPoint> getWrappedData();", "public List<String> getDataPoints() {\n Object[] dataPoints = (Object[])configMap.get(DATA_POINT);\n List<String> dps = Utility.downcast( dataPoints );\n return dps;\n }", "public List<Point3D> getPoints() {\n return mPoints;\n }", "public List<Point> getPoints() {\n return pointRepository.findAll()//\n .stream() //\n .sorted((p1, p2) -> Integer.compare(p1.getPosition(), p2.getPosition()))//\n .collect(Collectors.toList());\n }", "java.util.List<com.google.ads.googleads.v6.common.CpvBidSimulationPoint> \n getPointsList();", "public RMPoint getXYP() { return convertPointToShape(new RMPoint(), _parent); }", "public Point getXY()\n\t{\n\t\tPoint newPoint = new Point(x,y);\t\t\t\t\t\t// Create new Point object \n\t\treturn newPoint; \t\t\t\t\t\t\t\t\t\t// Return point's x and y coordinates\n\t}", "List<CalibratedAxis> getAxesNonPlanar();", "private Collection<Point2D> loadAllPoints(Node seriesNode) {\n\t\tlong allPointsCount = 0;\n\t\tCollection<Point2D> allPoints = new LinkedList<Point2D>();\n\t\t\n if (seriesNode.getNodeName().equalsIgnoreCase(SERIES_TAG)) {\n \tNode allPtsNode = seriesNode.getFirstChild();\n \twhile (allPtsNode != null) {\n \t\tif (allPtsNode.getNodeName().equals(ALL_POINTS_TAG)) {\n \t\t\tallPointsCount = Util.getLong(allPtsNode, POSITION_COUNT_TAG);\n \t\t\t\n \t\t\tSystem.out.println(\"Preaparing to load \" + allPointsCount + \" points from the XML node structure.\");\n \t\t\tNode pointNode = allPtsNode.getFirstChild();\n \t\t\twhile (pointNode != null) {\n \t\t\t\tif (pointNode.getNodeName().equals(POSITION_TAG)) {\n \t\t\t\t\tallPoints.add(new Position(pointNode));\n \t\t\t\t}\n \t\t\t\tpointNode = pointNode.getNextSibling();\n \t\t\t} // end while\n \t\t}\n \t\t\tallPtsNode = allPtsNode.getNextSibling();\n \t} // end while\n }\n return allPoints;\n\t}", "public Polygon getPoints() {\n\t\tPolygon points = new Polygon();\n\t\t// Each side of the diamond needs to be DIM pixels long, so there\n\t\t// is more maths this time, involving triangles and that Pythagoras\n\t\t// dude... \n\t\tint radius = this.size * (DIM / 2);\n\t\tint hypotenuse = (int)Math.hypot(radius, radius);\n\t\t// Four points where order is important - screwing up here does\n\t\t// not produce a shape of any sort...\n\t\tpoints.addPoint(this.x, this.y - hypotenuse); // top\n\t\tpoints.addPoint(this.x - hypotenuse, this.y); // left\n\t\tpoints.addPoint(this.x, this.y + hypotenuse); // bottom\t\t\n\t\tpoints.addPoint(this.x + hypotenuse, this.y); // right\n\t\treturn points;\n\t}", "public ArrayList<Point> nullPoint() {\n\t\tArrayList<Point> points = new ArrayList<Point>();\n\t\tfor (int r=0; r<rows(); r=r+1) {\n\t\t\tfor (int c=0; c<cols(); c=c+1) {\n\t\t\t\tPoint p = new Point(r,c);\n\t\t\t\tif(get(p)==null) {\n\t\t\t\t\tpoints.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn points;\n\t}", "Collection<Point> getCoordinates(int... ids);", "protected ArrayList<DataToPoint> getToPoints() {\n\t\treturn toPoints.stream().map(e -> e.toPoint)\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\n\t}", "public XYData(long[] x, float[] y, double resolution, boolean increasingX)\n\t{\n\t\tthis.resolution = resolution;\n\t\tthis.increasingX = increasingX;\n\t\tthis.xLong = x;\n\t\tthis.y = y;\n\t\tthis.x = new double[x.length];\n\t\tfor (int i = 0; i < x.length; i++)\n\t\t\tthis.x[i] = x[i];\n\t\tnSamples = (x.length < y.length) ? x.length : y.length;\n\t}", "public List<Point> getPointListByUserId(String userId)\r\n\t\t\tthrows DataAccessException {\n\t\treturn null;\r\n\t}", "public static vtkPoints createPoints(double[] points)\n\t{\n\t\tvtkPoints vtkPoints = new vtkPoints();\n\t\tvtkDoubleArray d = new vtkDoubleArray();\n\t\td.SetJavaArray(points);\n\t\td.SetNumberOfComponents(3);\n\t\tvtkPoints.SetData(d);\n\t\tdelete(d);\n\t\treturn vtkPoints;\n\t}", "public Vecteur[] getPoints() {\n Vecteur[] points = {this.OA, this.OB};\n return points;\n }", "private XYSeries createSeries() {\r\n return createSeries(0);\r\n }", "public org.astrogrid.stc.coords.v1_10.beans.Double3Type xgetPointArray(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Double3Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Double3Type)get_store().find_element_user(POINT$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n return (org.astrogrid.stc.coords.v1_10.beans.Double3Type)target;\n }\n }", "public java.util.List getPointArray(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POINT$0, i);\n if (target == null)\n {\n throw new IndexOutOfBoundsException();\n }\n return target.getListValue();\n }\n }", "static double[][] makeTestData() {\n double[][] data = new double[21][2];\n double xmax = 5;\n double xmin = -5;\n double dx = (xmax - xmin) / (data.length -1);\n for (int i = 0; i < data.length; i++) {\n double x = xmin + dx * i;\n double y = 2.5 * x * x * x - x * x / 3 + 3 * x;\n data[i][0] = x;\n data[i][1] = y;\n }\n return data;\n }", "public DataPoint getPoint(final int i) {\n if (i >= getNumPoints()) {\n System.err\n .println(\"Error: requested datapoint outside of dataset range\");\n\n return null;\n }\n\n return ntree.get(i);\n }", "private LineDataSet createSet(){\n LineDataSet set = new LineDataSet(null, \"SPL Db\");\n set.setDrawCubic(true);\n set.setCubicIntensity(0.2f);\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n set.setColor(ColorTemplate.getHoloBlue());\n set.setLineWidth(2f);\n set.setCircleSize(4f);\n set.setFillAlpha(65);\n set.setFillColor(ColorTemplate.getHoloBlue());\n set.setHighLightColor(Color.rgb(244,117,177));\n set.setValueTextColor(Color.WHITE);\n set.setValueTextSize(10f);\n\n return set;\n }", "public void addDataPoint2( DataPoint dataPoint ) {\n\t\tif ( dataPoint.x < 50.0 ){\n\t\t\tsumX1 += dataPoint.x;\n\t\t\tsumX1X1 += dataPoint.x*dataPoint.x;\n\t\t\tsumX1Y += dataPoint.x*dataPoint.z;\n\t\t\tsumY += dataPoint.z;\n\t\t\tsumYY += dataPoint.z*dataPoint.z;\n\n\t\t\tif ( dataPoint.x > X1Max ) {\n\t\t\t\tX1Max = (int)dataPoint.x;\n\t\t\t}\n\t\t\tif ( dataPoint.z > YMax ) {\n\t\t\t\tYMax = (int)dataPoint.z;\n\t\t\t}\n\n\t\t\t// 把每個點的具體座標存入 ArrayList中,備用。\n\t\t\txyz[0] = (int)dataPoint.x+ \"\";\n\t\t\txyz[2] = (int)dataPoint.z+ \"\";\n\t\t\tif ( dataPoint.x !=0 && dataPoint.z != 0 ) {\n\t\t\t\ttry {\n\t\t\t\t\tlistX.add( numPoint, xyz[0] );\n\t\t\t\t\tlistZ.add( numPoint, xyz[2] );\n\t\t\t\t} \n\t\t\t\tcatch ( Exception e ) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t++numPoint;\n\t\t}\n\t\telse {\n\t\t\t sumX50 += dataPoint.x;\n\t\t \t sumX50X50 += dataPoint.x*dataPoint.x;\n\t\t\t sumX50Y50 += dataPoint.x*dataPoint.z;\n\t\t\t sumY50 += dataPoint.z;\n\t\t\t sumY50Y50 += dataPoint.z*dataPoint.z;\n\n\t\t\t if ( dataPoint.x > X50Max ) {\n\t\t\t\t X50Max = (int)dataPoint.x;\n\t\t\t }\n\t\t\t if ( dataPoint.z > Y50Max ) {\n\t\t\t\t Y50Max = (int)dataPoint.z;\n\t\t\t }\n\n\t\t\t // 把每個點的具體座標存入 ArrayList中,備用。\n\t\t\t xyz50[0] = (int)dataPoint.x+ \"\";\n\t\t\t xyz50[2] = (int)dataPoint.z+ \"\";\n\t\t\t if ( dataPoint.x !=0 && dataPoint.z != 0 ) {\n\t\t\t\t try {\n\t\t\t\t\t listX50.add( numPoint50, xyz50[0] );\n\t\t\t\t\t listZ50.add( numPoint50, xyz50[2] );\n\t\t\t\t } \n\t\t\t\t catch ( Exception e ) {\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t ++numPoint50;\n\t\t}\n\t\tcoefsValid = false;\n\t}", "public VectorSet getMappedData() {\n\t\tMap<double[], ClassDescriptor> newData = new HashMap<double[], ClassDescriptor>();\n\t\tMap<double[], ClassDescriptor> data = orig.getData();\n\t\t\n\t\t// y = A x\n\t\tfor(double[] x: data.keySet()) {\n\t\t\tnewData.put(mapVector(x), data.get(x));\n\t\t}\n\n\t\tString[] labels = new String[resultDimension];\n\t\tfor(int i = 0; i < resultDimension; i++) {\n\t\t\tlabels[i] = Integer.toString(i + 1);\n\t\t}\n\n\t\treturn new VectorSet(newData, labels);\n\t}", "private XYDataset createDataset(String WellID, String lang) {\n final TimeSeries eur = createEURTimeSeries(WellID, lang);\n final TimeSeriesCollection dataset = new TimeSeriesCollection();\n dataset.addSeries(eur);\n return dataset;\n }", "DataPointType createDataPointType();", "private Line linearRegression(ArrayList<Point> points) {\n double sumx = 0.0, sumz = 0.0, sumx2 = 0.0;\n\n for (int i = 0; i < points.size(); i++) {\n Point curPoint = points.get(i);\n sumx += curPoint.x;\n sumz += curPoint.z;\n sumx2 += curPoint.x*curPoint.x;\n }\n\n double xbar = sumx/((double) points.size());\n double zbar = sumz/((double) points.size());\n\n double xxbar = 0.0, xzbar = 0.0;\n\n for (int i = 0; i < points.size(); i++) {\n Point curPoint = points.get(i);\n xxbar += (curPoint.x - xbar) * (curPoint.x - xbar);\n xzbar += (curPoint.x - xbar) * (curPoint.z - zbar);\n }\n\n double slope = xzbar / xxbar;\n double intercept = zbar - slope * xbar;\n\n return new Line(slope, intercept);\n }", "public Point[] getPoints()\n {\n return getPointsForAlignment(this);\n }", "public interface Series {\n\n\t/**\n\t * @return the number of points in the series\n\t */\n\tint size();\n\n\t/**\n\t * @param i index of the point\n\t * @return the x coordinate of the i'th point\n\t */\n\tdouble x(int i);\n\n\t/**\n\t * @param i index of the point.\n\t * @return the y coordinate of the i'th point\n\t */\n\tdouble y(int i);\n\n\t/**\n\t * @return an Interval object representing the minimum and maximum x-values.\n\t */\n\tInterval xRange();\n\n\t/**\n\t * @return an Interval object representing the minimum and maximum y-values.\n\t */\n\tInterval yRange();\n\n\t/**\n\t * @return an Interval2D object representing the minimum and maximum x and y\n\t * values.\n\t */\n\tInterval2D range();\n}", "public Point3 getPoint(int pointNr);", "public static DataSet getProcessedData(DataSet aDataSet, String exprX, String exprY, String exprZ)\n {\n // If both expressions empty, just return\n boolean isEmptyX = exprX == null || exprX.length() == 0;\n boolean isEmptyY = exprY == null || exprY.length() == 0;\n boolean isEmptyZ = exprZ == null || exprZ.length() == 0;\n if (isEmptyX && isEmptyY && isEmptyZ)\n return aDataSet;\n\n // Get KeyChains\n KeyChain keyChainX = !isEmptyX ? KeyChain.getKeyChain(exprX.toLowerCase()) : null;\n KeyChain keyChainY = !isEmptyY ? KeyChain.getKeyChain(exprY.toLowerCase()) : null;\n KeyChain keyChainZ = !isEmptyZ ? KeyChain.getKeyChain(exprZ.toLowerCase()) : null;\n\n // Get DataX\n DataType dataType = aDataSet.getDataType();\n int pointCount = aDataSet.getPointCount();\n boolean hasZ = dataType.hasZ();\n double[] dataX = new double[pointCount];\n double[] dataY = new double[pointCount];\n double[] dataZ = hasZ ? new double[pointCount] : null;\n Map map = new HashMap();\n for (int i=0; i<pointCount; i++) {\n double valX = aDataSet.getX(i);\n double valY = aDataSet.getY(i);\n double valZ = hasZ ? aDataSet.getZ(i) : 0;\n map.put(\"x\", valX);\n map.put(\"y\", valY);\n if (hasZ)\n map.put(\"z\", valZ);\n\n dataX[i] = isEmptyX ? valX : KeyChain.getDoubleValue(map, keyChainX);\n dataY[i] = isEmptyY ? valY : KeyChain.getDoubleValue(map, keyChainY);\n if (hasZ)\n dataZ[i] = isEmptyZ ? valZ : KeyChain.getDoubleValue(map, keyChainZ);\n }\n\n // Return new DataSet for type and values\n return DataSet.newDataSetForTypeAndValues(dataType, dataX, dataY, dataZ);\n }", "java.util.List<object_detection.protos.Calibration.XYPairs.XYPair>\n getXYPairList();", "public Point2D[] getGivenPoints(){ \n return this.points; \n }", "public Point[] getCoordinates() {\n Point[] temp = new Point[segments.length];\n for (int i = 0; i < segments.length; i++) {\n temp[i] = segments[i].getCoordinates();\n }\n return temp;\n }", "private void getChartPoints(ArrayList<Map<String,Object>> result) {\n lineChart = (LineChart) findViewById(R.id.temperature_chart);\n\n chartPoints = new ArrayList<>();\n chartXLabels = new ArrayList<>();\n\n for (int i = result.size()-1; i >=0; i--) {\n chartPoints.add(new Entry((float) ((double)result.get(i).get(\"CurrentTemp\")), result.size()-1-i));\n chartXLabels.add(result.get(i).get(\"Time\").toString());\n }\n\n LineDataSet dataSet = new LineDataSet(chartPoints, getResources().getString(R.string.temperature_screen_chartLineLabel));\n dataSet.setAxisDependency(YAxis.AxisDependency.LEFT);\n dataSet.setColor(R.color.temperature_chart_line_color);\n dataSet.setCircleColor(R.color.temperature_chart_circle_color);\n\n LineData data = new LineData(chartXLabels, dataSet);\n lineChart.setData(data);\n\n //Chart interaction settings\n lineChart.setTouchEnabled(true);\n\n //Chart layout settings\n lineChart.setDrawGridBackground(false);\n lineChart.setBackgroundColor(getResources().getColor(R.color.temperature_chart_background_color));\n\n lineChart.getXAxis().setEnabled(true);\n lineChart.getXAxis().setDrawGridLines(true);\n lineChart.getXAxis().setTextColor(getResources().getColor(R.color.temperature_chart_XLabels_color));\n lineChart.getXAxis().setGridColor(getResources().getColor(R.color.temperature_chart_XGrid_color));\n lineChart.getXAxis().setAxisLineColor(getResources().getColor(R.color.temperature_chart_XAxis_color));\n lineChart.getXAxis().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_XAxis_labels_dimension));\n lineChart.getXAxis().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_GridWidth_dimension));\n lineChart.getXAxis().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_XAxis_AxisWidth_dimension));\n lineChart.getAxisLeft().setEnabled(true);\n lineChart.getAxisLeft().setDrawGridLines(true);\n lineChart.getAxisLeft().setTextColor(getResources().getColor(R.color.temperature_chart_YLabels_color));\n lineChart.getAxisLeft().setGridColor(getResources().getColor(R.color.temperature_chart_YGrid_color));\n lineChart.getAxisLeft().setAxisLineColor(getResources().getColor(R.color.temperature_chart_YAxis_color));\n lineChart.getAxisLeft().setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_YAxis_labels_dimension));\n lineChart.getAxisLeft().setGridLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_GridWidth_dimension));\n lineChart.getAxisLeft().setAxisLineWidth(getResources().getDimension(R.dimen.temperature_chart_YAxis_AxisWidth_dimension));\n lineChart.getAxisRight().setEnabled(false);\n\n LimitLine minLimit = new LimitLine((float) minTemp, getResources().getString(R.string.temperature_screen_chartMinLimit));\n minLimit.setLineColor(getResources().getColor(R.color.temperature_chart_minLimit_color));\n minLimit.setTextColor(getResources().getColor(R.color.temperature_chart_minLimit_label_color));\n minLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_width_dimension));\n minLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_minLimit_label_dimension));\n LimitLine maxLimit=new LimitLine((float) maxTemp,getResources().getString(R.string.temperature_screen_chartMaxLimit));\n maxLimit.setLineColor(getResources().getColor(R.color.temperature_chart_maxLimit_color));\n maxLimit.setTextColor(getResources().getColor(R.color.temperature_chart_maxLimit_label_color));\n maxLimit.setLineWidth(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_width_dimension));\n maxLimit.setTextSize(getResources().getDimensionPixelSize(R.dimen.temperature_chart_maxLimit_label_dimension));\n lineChart.getAxisLeft().addLimitLine(minLimit);\n lineChart.getAxisLeft().addLimitLine(maxLimit);\n\n //Refreshes chart\n lineChart.invalidate();\n\n //Gets the most recent temperature registered\n TextView currentTempTextView = (TextView)findViewById(R.id.temperature_currentTemp_TextView);\n currentTemp=chartPoints.get(chartPoints.size()-1).getVal();\n currentTempTextView.setText(Float.toString(currentTemp)+\"ºC\");\n\n //Gets the higher and lower temperatures registered\n float higherTemp=-900;\n float lowerTemp=900;\n for (Entry entry:chartPoints)\n {\n if(entry.getVal()>higherTemp)\n higherTemp=entry.getVal();\n if(entry.getVal()<lowerTemp)\n lowerTemp=entry.getVal();\n }\n TextView lowerTempTextView = (TextView)findViewById(R.id.temperature_minTemp2_TextView);\n lowerTempTextView.setText(Float.toString(lowerTemp)+\"ºC\");\n TextView higherTempTextView = (TextView)findViewById(R.id.temperature_maxTemp2_TextView);\n higherTempTextView.setText(Float.toString(higherTemp)+\"ºC\");\n }", "public double getPoints()\r\n {\r\n return points;\r\n }", "public List<List<LineChart>> getLineChartData(int iusid, int timeperiodid,\n\t\t\tint areaId);", "private static Point[] generateRandomPointArray(final int quantity) {\n\t\tfinal int min = -200;\n\t\tfinal int max = 200;\n\t\tfinal Random random = new Random();\n\t\tPoint[] pointArray = new Point[quantity];\n\t\t\n\t\tSystem.out.println(\"Using \" + quantity + \" of random co-linear points.\");\n\t\t\n\t\tfor(int i = 0; i < quantity; i++) {\n\t\t\tint x = random.nextInt(max + 1 - min) + min;\n\t\t\tint y = random.nextInt(max + 1 - min) + min;\n\t\t\tpointArray[i] = new Point(x, y);\n\t\t}\n\t\t\n\t\treturn pointArray;\n\t}", "@Test\n public void test59() throws Throwable {\n Point2D.Double point2D_Double0 = new Point2D.Double();\n point2D_Double0.y = (-365.83);\n point2D_Double0.setLocation(0.0, 0.0);\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n combinedRangeCategoryPlot0.mapDatasetToRangeAxis(1051, 1051);\n boolean boolean0 = combinedRangeCategoryPlot0.isDomainZoomable();\n PlotOrientation plotOrientation0 = PlotOrientation.HORIZONTAL;\n // Undeclared exception!\n try { \n Plot.resolveDomainAxisLocation((AxisLocation) null, plotOrientation0);\n } catch(IllegalArgumentException e) {\n //\n // Null 'location' argument.\n //\n assertThrownBy(\"org.jfree.chart.plot.Plot\", e);\n }\n }", "private List<DataPoint> getDeckPlottingPoints(List<Deck> decks) {\n // List<List<QuizAttempt>> listsToMerge = new ArrayList<>();\n //\n // for (Deck deck : decks) {\n // listsToMerge.add(deck.getQuizAttempts());\n // }\n\n List<DataPoint> ret = new ArrayList<>();\n\n Queue<QuizAttempt> pq = new PriorityQueue<>(Comparator.comparing(QuizAttempt::getTakenAt));\n\n for (Deck deck : decks) {\n for (QuizAttempt qa : deck.getQuizAttempts()) {\n pq.offer(qa);\n }\n }\n\n while (!pq.isEmpty()) {\n QuizAttempt attempt = pq.poll();\n LocalDateTime takenAt = attempt.getTakenAt();\n double scoreInPercentage = attempt.getScore().getScoreInPercentage();\n ret.add(new DataPoint(takenAt, scoreInPercentage));\n }\n\n return ret;\n\n // return mergeSortedListsOfAttempts(listsToMerge);\n }", "private XYDataset createSampleDataset(GradientDescent gd) {\n XYSeries predictedY = new XYSeries(\"Predicted Y\");\n XYSeries actualY = new XYSeries(\"Actual Y\");\n List<BigDecimal> xValues = gd.getInitialXValues();\n List<BigDecimal> yPred = gd.getPredictedY(xValues);\n List<BigDecimal> yActual = gd.getInitialYValues();\n for (int cont = 0; cont < xValues.size(); cont++){\n \tpredictedY.add(xValues.get(cont), yPred.get(cont));\n \tSystem.out.println(\"pred: \" + xValues.get(cont) + \", \" + yPred.get(cont));\n \tactualY.add(xValues.get(cont), yActual.get(cont));\n \tSystem.out.println(\"actual: \" + xValues.get(cont) + \", \" + yActual.get(cont));\n\t\t}\n XYSeriesCollection dataset = new XYSeriesCollection();\n dataset.addSeries(predictedY);\n dataset.addSeries(actualY);\n return dataset;\n }", "Series<double[]> makeSeries(int dimension);", "public ResponseEntityJsonArrayStream[] getPointValues (String xid, Date from, Date to, String rollup, String timePeriodType, Integer timePeriods) throws ApiException {\n Object postBody = null;\n byte[] postBinaryBody = null;\n\n // verify the required parameter 'xid' is set\n if (xid == null) {\n throw new ApiException(400, \"Missing the required parameter 'xid' when calling getPointValues\");\n }\n\n // create path and map variables\n String path = API_VERSION + \"/point-values/{xid}\".replaceAll(\"\\\\{\" + \"xid\" + \"\\\\}\", apiClient.escapeString(xid.toString()));\n\n // query params\n List<Pair> queryParams = new ArrayList<Pair>();\n Map<String, String> headerParams = new HashMap<String, String>();\n Map<String, Object> formParams = new HashMap<String, Object>();\n\n queryParams.addAll(apiClient.parameterToPairs(\"\", \"from\", from));\n queryParams.addAll(apiClient.parameterToPairs(\"\", \"to\", to));\n queryParams.addAll(apiClient.parameterToPairs(\"\", \"rollup\", rollup));\n queryParams.addAll(apiClient.parameterToPairs(\"\", \"timePeriodType\", timePeriodType));\n queryParams.addAll(apiClient.parameterToPairs(\"\", \"timePeriods\", timePeriods));\n\n final String[] accepts = { \"application/json\" };\n\n final String accept = apiClient.selectHeaderAccept(accepts);\n\n final String[] contentTypes = { };\n\n final String contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = getAuthNames();\n\n TypeRef returnType = new TypeRef<ResponseEntityJsonArrayStream[]>() { };\n\n return apiClient.invokeAPI(path, \"GET\", queryParams, postBody, postBinaryBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public Drawable getPoint(final PointData data, final Shape shape) {\n\t\t\treturn new AbstractDrawable() {\n\t\t\t\t/** Version id for serialization. */\n\t\t\t\tprivate static final long serialVersionUID = -1136689797647794969L;\n\n\t\t\t\tpublic void draw(DrawingContext context) {\n\t\t\t\t\tRasterRenderer renderer = RasterRenderer.this;\n\n\t\t\t\t\tAxis axisX = data.axes.get(0);\n\t\t\t\t\tAxis axisY = data.axes.get(1);\n\t\t\t\t\tAxisRenderer axisXRenderer = data.axisRenderers.get(0);\n\t\t\t\t\tAxisRenderer axisYRenderer = data.axisRenderers.get(1);\n\t\t\t\t\tRow row = data.row;\n\n\t\t\t\t\tint colX = renderer.getXColumn();\n\t\t\t\t\tif (colX < 0 || colX >= row.size() || !row.isColumnNumeric(colX)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tint colY = renderer.getYColumn();\n\t\t\t\t\tif (colY < 0 || colY >= row.size() || !row.isColumnNumeric(colY)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tint colValue = renderer.getValueColumn();\n\t\t\t\t\tif (colValue < 0 || colValue >= row.size() || !row.isColumnNumeric(colValue)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tdouble valueX = ((Number) row.get(colX)).doubleValue();\n\t\t\t\t\tdouble valueY = ((Number) row.get(colY)).doubleValue();\n\t\t\t\t\tNumber value = (Number) row.get(colValue);\n\n\t\t\t\t\t// Pixel dimensions\n\t\t\t\t\tdouble xMin = axisXRenderer\n\t\t\t\t\t\t.getPosition(axisX, valueX - 0.5, true, false)\n\t\t\t\t\t\t.get(PointND.X);\n\t\t\t\t\tdouble xMax = axisXRenderer\n\t\t\t\t\t\t.getPosition(axisX, valueX + 0.5, true, false)\n\t\t\t\t\t\t.get(PointND.X);\n\t\t\t\t\tdouble width = Math.abs(xMax - xMin) + 1.0;\n\t\t\t\t\tdouble yMin = axisYRenderer\n\t\t\t\t\t\t.getPosition(axisY, valueY - 0.5, true, false)\n\t\t\t\t\t\t.get(PointND.Y);\n\t\t\t\t\tdouble yMax = axisYRenderer\n\t\t\t\t\t\t.getPosition(axisY, valueY + 0.5, true, false)\n\t\t\t\t\t\t.get(PointND.Y);\n\t\t\t\t\tdouble height = Math.abs(yMax - yMin) + 1.0;\n\n\t\t\t\t\t// Create shape for pixel\n\t\t\t\t\t// The origin of all shapes is (boxX, boxY)\n\t\t\t\t\tRectangle2D shapeBounds = shape.getBounds2D();\n\t\t\t\t\tAffineTransform tx = new AffineTransform();\n\t\t\t\t\ttx.scale(width/shapeBounds.getWidth(), height/shapeBounds.getHeight());\n\t\t\t\t\ttx.translate(-shapeBounds.getMinX(), -shapeBounds.getMinY());\n\t\t\t\t\tShape pixel = tx.createTransformedShape(shape);\n\n\t\t\t\t\t// Paint pixel\n\t\t\t\t\tGraphics2D graphics = context.getGraphics();\n\t\t\t\t\tColorMapper colorMapper = plot.getColors();\n\t\t\t\t\tPaint paint;\n\t\t\t\t\tif (colorMapper instanceof ContinuousColorMapper) {\n\t\t\t\t\t\tpaint = ((ContinuousColorMapper) colorMapper)\n\t\t\t\t\t\t\t.get(value.doubleValue());\n\t\t\t\t\t} else if (colorMapper != null) {\n\t\t\t\t\t\tInteger index = value.intValue();\n\t\t\t\t\t\tpaint = colorMapper.get(index);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpaint = Color.BLACK;\n\t\t\t\t\t}\n\t\t\t\t\tGraphicsUtils.fillPaintedShape(\n\t\t\t\t\t\tgraphics, pixel, paint, pixel.getBounds2D());\n\t\t\t\t}\n\t\t\t};\n\t\t}", "public abstract int[] getCoords();", "public LineData() {\n\t\t\tallPoints = new ArrayList<>(SIZE_OF_ORIGINAL_LIST);\n\t\t}", "public ResponseEntityListDataPointModel getAllDataPoints (Integer limit) throws ApiException {\n Object postBody = null;\n byte[] postBinaryBody = null;\n\n // create path and map variables\n String path = API_VERSION + \"/data-points\";\n\n // query params\n List<Pair> queryParams = new ArrayList<Pair>();\n Map<String, String> headerParams = new HashMap<String, String>();\n Map<String, Object> formParams = new HashMap<String, Object>();\n\n queryParams.addAll(apiClient.parameterToPairs(\"\", \"limit\", limit));\n\n final String[] accepts = { \"application/json\" };\n\n final String accept = apiClient.selectHeaderAccept(accepts);\n\n final String[] contentTypes = { };\n\n final String contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = getAuthNames();\n\n TypeRef returnType = new TypeRef<ResponseEntityListDataPointModel>() { };\n\n return apiClient.invokeAPI(path, \"GET\", queryParams, postBody, postBinaryBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "private static final int[] getPoint(int point) {\n int[] ret = new int[2];\n if (point >= firstPoint && point <= endPoint) {\n ret = getPoint(ruteData[point + 2]);//ruteData[point + 2]);\n }\n return ret;\n }", "private static Data generateDataPoint(String raw, DataType type) {\n Data data = new Data<Boolean>(false);\n //There can be null data. Its marked as a question mark in the datasets.\n\n if(raw.equals(\"?\")) {\n return null;\n }\n\n switch (type) {\n case Boolean:\n if(raw.equals(\"y\")) {\n data = new Data<Boolean>(true);\n }\n else if(raw.equals(\"n\")) {\n data = new Data<Boolean>(false);\n }\n else {\n data = new Data<Boolean>(Boolean.parseBoolean(raw));\n }\n break;\n case Double:\n data = new Data<Double>(Double.parseDouble(raw));\n break;\n case Integer:\n data = new Data<Integer>(Integer.parseInt(raw));\n break;\n case String:\n data = new Data<String>(raw);\n break;\n }\n return data;\n }", "public Object[] plotDS(Object... rhs) throws RemoteException;", "private void testData() {\r\n\r\n // Setup for a function of the type y = c0 + c1*exp(c2*x) + c3*exp(c4*x)\r\n\r\n xSeries[0] = 0;\r\n ySeries[0] = 1 + 2 + 3;\r\n\r\n xSeries[1] = 1;\r\n ySeries[1] = 1 + (2 * Math.exp(-0.3)) + (3*Math.exp(-0.5));\r\n\r\n xSeries[2] = 2;\r\n ySeries[2] = 1 + (2 * Math.exp(-0.6)) + (3*Math.exp(-1.0));\r\n\r\n xSeries[3] = 3;\r\n ySeries[3] = 1 + (2 * Math.exp(-0.9)) + (3 * Math.exp(-1.5));\r\n\r\n xSeries[4] = 4;\r\n ySeries[4] = 1 + (2 * Math.exp(-1.2)) + (3 * Math.exp(-2.0));\r\n }", "public interface PointsGenerator {\r\n\t/**\r\n\t * Creates a <code>Series</code> object, which supplies the points.\r\n\t * \r\n\t * @param dimension dimension of the unit cube from which the points are selected\r\n\t * @return <code>Series</code> iterator\r\n\t * @see de.torstennahm.series.Series\r\n\t */\r\n\tSeries<double[]> makeSeries(int dimension);\r\n}", "public Point2D[] getLineForXVal(double xVal) {\n\t\tint lower = getIndexForXVal(xVal);\n\t\t\n\n\t\tif (lower<0 || lower>=(pointList.size()-1))\n\t\t\treturn null;\n\t\tint upper = lower+1;\n\t\t\n\t\tPoint2D[] line = new Point2D[2];\n\t\tline[0] = pointList.get(lower);\n\t\tline[1] = pointList.get(upper);\n\t\t//System.out.println(\"click data x: \" + xVal + \" lower x: \" + pointList.get(lower).getX() + \" upper x: \" + pointList.get(upper).getX());\n\t\tif (pointList.get(lower).getX() > xVal || pointList.get(upper).getX() < xVal) {\n\t\t\tSystem.err.println(\"Yikes, didn't pick th right index, got \" + lower + \" lower point is : \" + pointList.get(lower));\n\t\t}\n\t\treturn line;\n\t}", "public PlotPanel2D(List<List<Point2D>> plotData, int pointSize)\r\n {\r\n _plotData = plotData;\r\n _plotType = Arrays.asList(new Integer[_plotData.size()]);\r\n Collections.fill(_plotType, PLOT_TYPE_LINE);\r\n _pointSize = pointSize;\r\n }", "public static FeatureDatasetPoint getPointDataset(HttpServletRequest request, HttpServletResponse response, String path) throws IOException {\n TdsRequestedDataset trd = new TdsRequestedDataset(request, null);\n if (path != null) trd.path = path;\n return trd.openAsPointDataset(request, response);\n }", "public static MySet[] arrangeDataP3P4(Integer[][][] data) {\r\n\t\tdataSet = data;\r\n\t\tMySet p3p4Sol = new Set1P3<Integer>();\r\n\t\t\r\n\t\tfor(int i = 0; i < data[0].length; i++) {\r\n\t\t\tfor(int j = 0; j < data.length; j++) {\r\n\t\t\t\t\r\n\t\t\t\tfor(int k = 0; k<data[j][i].length; k++) {\t\t\t\t\t\r\n\t\t\t\t\t\tp3p4Sol.add(data[j][i][k]);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\tMySet[] setp3p4 = new MySet[1];\r\n\t\tsetp3p4[0] = p3p4Sol;\r\n\t\t\r\n\t\treturn setp3p4;\r\n\t\t}", "public static void addDataPoints(DataSet aDataSet, double[] dataX, double[] dataY, double[] dataZ, String[] dataC)\n {\n // Get min length of staged data\n int xlen = dataX != null ? dataX.length : Integer.MAX_VALUE;\n int ylen = dataY != null ? dataY.length : Integer.MAX_VALUE;\n int zlen = dataZ != null ? dataZ.length : Integer.MAX_VALUE;\n int clen = dataC != null ? dataC.length : Integer.MAX_VALUE;\n int len = Math.min(xlen, Math.min(ylen, Math.min(zlen, clen)));\n if (len == Integer.MAX_VALUE)\n return;\n\n // Iterate over data arrays and add to DataSet\n for (int i = 0; i < len; i++) {\n Double valX = dataX != null ? dataX[i] : null;\n Double valY = dataY != null ? dataY[i] : null;\n Double valZ = dataZ != null ? dataZ[i] : null;\n String valC = dataC != null ? dataC[i] : null;\n DataPoint dataPoint = new DataPoint(valX, valY, valZ, valC);\n int index = aDataSet.getPointCount();\n aDataSet.addPoint(dataPoint, index);\n }\n }", "private static void fillDataset(Dataset d){\n try{\n\n BufferedReader in = new BufferedReader(new FileReader(\"src/points.txt\"));\n String str;\n while ((str = in.readLine()) != null){\n String[] tmp=str.split(\",\");\n d.addPoint(new Point(Double.parseDouble(tmp[0]), Double.parseDouble(tmp[1])));\n }\n in.close();\n }\n catch (IOException e){\n System.out.println(\"File Read Error\");\n }\n }", "public double getX() {\n\t\treturn point[0];\n\t}", "com.google.ads.googleads.v6.common.CpvBidSimulationPoint getPoints(int index);", "public static ArrayList<Point> ReadData(String filePath) throws FileNotFoundException{\n \n ArrayList<Point> points = new ArrayList<>();\n\n Scanner inputStream = new Scanner(new File(filePath));\n\n String[] xs = inputStream.nextLine().split(\" \");\n String[] ys = inputStream.nextLine().split(\" \");\n\n int min = Math.min(xs.length, xs.length);\n\n for(int i = 0 ;i < min; i++){\n double x = Float.parseFloat(xs[i]);\n double y = Float.parseFloat(ys[i]);\n points.add(new Point(x,y));\n }\n\n\n\n return points;\n\n }", "Collection<P> getPointsOfInterest ();", "private LineData generateLineData() {\n\n LineData d = new LineData();\n LineDataSet set = new LineDataSet(ReportingRates, \" ARVs (Reporting Rates)\");\n set.setColors(Color.parseColor(\"#90ed7d\"));\n set.setLineWidth(2.5f);\n set.setCircleColor(Color.parseColor(\"#90ed7d\"));\n set.setCircleRadius(2f);\n set.setFillColor(Color.parseColor(\"#90ed7d\"));\n set.setMode(LineDataSet.Mode.CUBIC_BEZIER);\n set.setDrawValues(true);\n\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n d.addDataSet(set);\n\n return d;\n }", "@Test\n public void test40() throws Throwable {\n CategoryAxis categoryAxis0 = new CategoryAxis();\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot(categoryAxis0);\n AxisSpace axisSpace0 = combinedDomainCategoryPlot0.getFixedRangeAxisSpace();\n JFreeChart jFreeChart0 = new JFreeChart(\",q3=\", (Plot) combinedDomainCategoryPlot0);\n PolarChartPanel polarChartPanel0 = null;\n try {\n polarChartPanel0 = new PolarChartPanel(jFreeChart0);\n } catch(IllegalArgumentException e) {\n //\n // plot is not a PolarPlot\n //\n assertThrownBy(\"org.jfree.chart.PolarChartPanel\", e);\n }\n }" ]
[ "0.61773545", "0.5975913", "0.5923326", "0.57036275", "0.5620473", "0.5543019", "0.5458534", "0.53477794", "0.53088003", "0.5301725", "0.5269713", "0.5242551", "0.5235601", "0.5220911", "0.51927", "0.51845235", "0.5166969", "0.511845", "0.5097014", "0.50890374", "0.5088536", "0.5072974", "0.5070444", "0.5060106", "0.50347716", "0.5027703", "0.50262755", "0.50065917", "0.49680173", "0.49559906", "0.49443236", "0.4939295", "0.49237287", "0.48887792", "0.4875498", "0.4859096", "0.48436496", "0.48423707", "0.48293406", "0.4812901", "0.47928426", "0.47767004", "0.47486407", "0.474427", "0.4723507", "0.4720159", "0.47102976", "0.4709858", "0.47027725", "0.46999642", "0.46796042", "0.4674388", "0.46697307", "0.4656993", "0.4654079", "0.46498573", "0.4645694", "0.46318015", "0.46233663", "0.46228766", "0.46105158", "0.46013078", "0.45994687", "0.45940065", "0.45885867", "0.458655", "0.45672086", "0.45450616", "0.4538804", "0.45370406", "0.4531594", "0.453027", "0.45135093", "0.45121655", "0.45120433", "0.45101294", "0.450618", "0.45059767", "0.45056492", "0.4503893", "0.44984695", "0.44777334", "0.4477382", "0.44755808", "0.44715255", "0.44709945", "0.44645134", "0.44600025", "0.44519925", "0.4450377", "0.44476974", "0.44452843", "0.44404814", "0.44360274", "0.4434546", "0.4433771", "0.44295356", "0.44293085", "0.44284338", "0.44224268" ]
0.6826988
0
Returns whether given DataSet is has same X values as this one.
public static boolean isAlignedX(DataSet aDataSet1, DataSet aDataSet2) { // If PointCounts don't match, return false int pointCount = aDataSet1.getPointCount(); if (pointCount != aDataSet2.getPointCount()) return false; // Iterate over X coords and return false if they don't match for (int i = 0; i < pointCount; i++) { double x0 = aDataSet1.getX(i); double x1 = aDataSet2.getX(i); if (!MathUtils.equals(x0, x1)) return false; } // Return true since X coords are aligned return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }", "public boolean equals(Object x){\n if(this==x) {\n return true;\n }\n Matrix L=(Matrix) x;\n for(int i=1;i<L.newsize;i++) {\n List first=L.row[i];\n List second=this.row[i];\n if(first.equals(second)==false)\n return false;\n }\n return true;\n }", "public boolean equals(Object x){\n if (!(x instanceof Matrix)) return false;\n Matrix m = (Matrix) x;\n if(m.nnz != this.nnz){\n return false;\n }\n if(m.matrixSize != this.matrixSize){\n return false;\n }\n for(int i = 0; i<matrixSize; i++){\n if(!(m.rows[i].equals(rows[i]))){\n return false;\n }\n }\n return true;\n }", "public boolean equals(Object obj) {\n/* 319 */ if (obj == this) {\n/* 320 */ return true;\n/* */ }\n/* 322 */ if (!(obj instanceof SlidingCategoryDataset)) {\n/* 323 */ return false;\n/* */ }\n/* 325 */ SlidingCategoryDataset that = (SlidingCategoryDataset)obj;\n/* 326 */ if (this.firstCategoryIndex != that.firstCategoryIndex) {\n/* 327 */ return false;\n/* */ }\n/* 329 */ if (this.maximumCategoryCount != that.maximumCategoryCount) {\n/* 330 */ return false;\n/* */ }\n/* 332 */ if (!this.underlying.equals(that.underlying)) {\n/* 333 */ return false;\n/* */ }\n/* 335 */ return true;\n/* */ }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof DBSeriesData)) {\n return false;\n }\n DBSeriesData other = (DBSeriesData) object;\n if ((this.xvalue == null && other.xvalue != null) || (this.yvalue != other.yvalue)) {\n return false;\n }\n return true;\n }", "public final boolean equal() {\n\t\tif (size > 1) {\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (topMostValue == secondTopMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean checkDuplicates() {\n\t\tboolean[] vals = new boolean[9];\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tfor(int k = 0; k < 3; k++) {\n\t\t\t\tint num = this.getCellNum(i, k);\n\t\t\t\tif(num != 0) {\n\t\t\t\t\tif(!vals[num-1]) {\n\t\t\t\t\t\t//The number hasn't already been found\n\t\t\t\t\t\tvals[num-1] = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//A duplicate number was found\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Dataset)) {\n return false;\n }\n Dataset other = (Dataset) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object x) {\n\t\t\tif (x == this) return true;\n\t\t\tif (x == null) return false;\n\t\t\tif (x.getClass() != this.getClass()) return false;\n\t\t\tGroup3Date that = (Group3Date) x;\n\t\t\treturn (this.month == that.month) && (this.day == that.day) && (this.year == that.year);\n\t\t}", "public boolean equivalent(DataType dataType) {\n return equals(dataType);\n }", "public boolean equals(Stat s){\r\n\t\t\r\n\t\tif (s.getData().length == this.data.length)\r\n\t\t{\r\n\t\t\t//loop to find out if each one is equal\r\n\t\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t\t//if the one at i isn't equal\r\n\t\t\t\tif (s.getData()[i] != data[i]){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse \r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t//assuming they got out of that if statement, it's true\r\n\treturn true;\r\n\t}", "Boolean same(MultiSet<X> s);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Btodset)) {\n return false;\n }\n Btodset other = (Btodset) object;\n if ((this.datasetid == null && other.datasetid != null) || (this.datasetid != null && !this.datasetid.equals(other.datasetid))) {\n return false;\n }\n return true;\n }", "@Override\n public Boolean getValue(Object x)\n {\n if (m_falseCount > 0 && m_width <= 0)\n return false;\n\n allDifferent = true;\n\n // if duplicate entries were found in previous calls\n if (m_falseCount > 0)\n {\n m_falseCount--;\n allDifferent = false;\n }\n\n // compare this entry to every previous one\n for (int i = m_previousInputs.size() - 1; i >= 0; i--)\n {\n if (m_previousInputs.get(i).equals(x))\n {\n // this function will return false at least until this entry is removed\n m_falseCount = Math.max(m_falseCount, i + (m_width - m_previousInputs.size() - 1));\n allDifferent = false;\n break;\n }\n }\n\n // update previous entries\n m_previousInputs.add(x);\n if (m_width > 0 && m_previousInputs.size() >= m_width)\n {\n m_previousInputs.remove();\n }\n\n return allDifferent;\n }", "protected boolean matchData() {\n for (int i = 0; i < itsNumPoints; i++) {\n if (itsValues[i] == null || itsValues[i].getData() == null) {\n return false;\n }\n }\n return true;\n }", "public boolean isXsolution() {\n\t\tfor (int k=1; k<size*size; k++) {\n\t\t\tint count1 = 0;\n\t\t\tint count2 = 0;\n\t\t\tfor (int l=0; l<size*size; l++) {\n\t\t\t\tif (board[l][l]==k) count1++;\n\t\t\t\tif (board[l][size*size-l-1]==k) count2++;\n\t\t\t}\n\t\t\tif (count1!=1 || count2!=1) return false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isEqual(int[] x, int[] y) {\n for (int i = 0; i < 3; i++) {\n if (x[i] != y[i]) {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean equals(Object obj)\n {\n if (obj instanceof A)\n {\n A temp = (A) obj;\n if (temp.xValue == this.xValue)\n {\n return true;\n }\n }\n return false;\n }", "protected boolean datasetExists(URI dataset) {\n return Db.getStatements(dataset, RDF.TYPE, Sparql.namespaced(\"dcat\",\"Dataset\"),true,dataset).size() == 1;\n }", "boolean hasSameAs();", "public boolean equals(Object x) {\n\t\tFastqRecord that = (FastqRecord) x;\n\t\treturn this.defline.equals(that.defline) && this.sequence.equals(that.sequence) && this.quality.equals(that.quality);\n\t}", "@Override\n public boolean equals(Object o) {\n if (!(o instanceof Matrix)) return false;\n Matrix B = (Matrix) o;\n Matrix A = this;\n if (B.M != A.M || B.N != A.N) return false;\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n if (A.data[i][j] != B.data[i][j]) return false;\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof Matrix)) return false;\n\n Matrix matrix = (Matrix) o;\n\n if (m != matrix.m) return false;\n if (n != matrix.n) return false;\n\n return Arrays.deepEquals(data, matrix.data);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tState State = (State) obj;\n\t\tSquare aux = null;\n\t\tboolean isequal = true;\n\t\tif (getTractor().getColumn()!=State.getTractor().getColumn() || getTractor().getRow()!=State.getTractor().getRow())\n\t\t\tisequal = false;\n\t\telse {\n\t\t\tfor (int i = 0;i<getRows() && isequal; i++) {\n\t\t\t\tfor (int j = 0;j < getColumns() && isequal; j++) {\n\t\t\t\t\taux = new Square (i,j);\n\t\t\t\t\tif (cells[i][j].getSand() != State.getSquare(aux).getSand()) \n\t\t\t\t\t\tisequal = false; \n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\treturn isequal;\n\t}", "public static boolean allSameValues(Example[] examples)\n {\n if (examples.length == 0)\n throw new RuntimeException(\"Empty examples set!\");\n double last_value;\n for(int val=0; val<examples[0].values.length;val++)\n {\n last_value = examples[0].values[val];\n for (int idx = 1; idx < examples.length; idx++)\n if( last_value != examples[idx].values[val])\n return false;\n }\n return true;\n }", "public boolean equals (SetADT<T> set);", "@Override\n public boolean equals(Object object) {\n // TODO: Warning - this method won't work in the case the id fields are not set\n if (!(object instanceof DatasetParameterPK)) {\n return false;\n }\n DatasetParameterPK other = (DatasetParameterPK)object;\n if (this.units != other.units && (this.units == null || !this.units.equals(other.units))) return false;\n if (this.name != other.name && (this.name == null || !this.name.equals(other.name))) return false;\n if (this.datasetId != other.datasetId && (this.datasetId == null || !this.datasetId.equals(other.datasetId))) return false;\n return true;\n }", "@Override\r\n\tpublic boolean equals(Object other) {\r\n\t\treturn (this.iD - other.hashCode()) == 0;\r\n\t}", "public boolean checkDuplicate(ResultSet rsData, ResultSet rsWareHouse) {\n\t\ttry {\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= number_colum; i++) {\n\t\t\t\ttry {\n//\t\t\t\t\tSystem.out.println(rsData.getString(i));\n//\t\t\t\t\tSystem.out.println(rsWareHouse.getObject(i + 1));\n\t\t\t\t\tif (!rsData.getString(i).equals(rsWareHouse.getObject(i + 1).toString())) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count > 2) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\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\treturn false;\n\n\t}", "public boolean equals(Object o) {\r\n\t\tElemento e1 = (Elemento) o;\r\n\t\t\r\n\t\treturn this.dimensione==e1.getDimensione();\r\n\t}", "boolean hasDataset();", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof AdDatasetTable)) {\r\n return false;\r\n }\r\n AdDatasetTable other = (AdDatasetTable) object;\r\n if ((this.adDatasetTableId == null && other.adDatasetTableId != null) || (this.adDatasetTableId != null && !this.adDatasetTableId.equals(other.adDatasetTableId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isDuplicateDatasetId(String id) throws VizException {\n\n DbQueryRequest request = new DbQueryRequest();\n HashMap<String, RequestConstraint> constraints = new HashMap<>();\n constraints.put(DATA_SET_ID_TAG, new RequestConstraint(id));\n request.setEntityClass(GridInfoRecord.class);\n request.setConstraints(constraints);\n request.addRequestField(DATA_SET_ID_TAG);\n request.setDistinct(true);\n DbQueryResponse response = (DbQueryResponse) ThriftClient\n .sendRequest(request);\n if (response.getNumResults() > 0) {\n return true;\n }\n return false;\n }", "public boolean hasDuplicateColumnNames() {\n\t\tint nmbrOfColumns = this.getAllSelectColumnNames().size();\n\t\tint nmbrOfcolumnsRemovedDuplicatedColumns = new HashSet<String>(getAllSelectColumnNames()).size();\n\t\tif (nmbrOfColumns == nmbrOfcolumnsRemovedDuplicatedColumns) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean equals(Object obj) {\r\n\t\treturn ( this.getX() == ((Coordinate)obj).getX() && this.getY() == ((Coordinate)obj).getY());\r\n\t}", "@Override\n public boolean equals(Object other) {\n if (this == other) return true; \n \n if (other instanceof Coord3) { // if other is a Coord3 type\n return x == ((Coord3) other).x && y == ((Coord3) other).y && z == ((Coord3) other).z;\n }\n return false;\n }", "@Override\r\n public boolean equals(Object obj) {\r\n if (!(obj instanceof Position))\r\n return false;\r\n Position pos = (Position)obj;\r\n return ((pos.getRowIndex() == this.rowIndex) && (pos.getColumnIndex() == this.colIndex));\r\n }", "boolean hasIsEquivalent();", "public boolean isInDataset() {\n\t\tfor (int i = 0; i < Dna.data.getStatements().size(); i++) {\n\t\t\tif (Dna.data.getStatements().get(i).getStatementTypeId() == this.getStatementTypeId() \n\t\t\t\t\t&& Dna.data.getStatements().get(i).getValues().get(this.variable).equals(this.value)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object obj){\n if(this == obj){\n return true;\n }\n else if(!(obj instanceof Row)){\n return false;\n }\n\n Row row2 = (Row)obj;\n\n return this.index == row2.index && this.spaces.equals(row2.spaces);\n }", "public boolean equals(Object obj)\r\n\t{\r\n\t\tif (obj instanceof FloatDimension)\r\n\t\t{\r\n\t\t\tFloatDimension dimension = (FloatDimension)obj;\r\n\t\t\treturn dimension.width == width && dimension.height == height;\r\n\t\t}\r\n\t\treturn super.equals(obj);\r\n\t}", "public boolean isSymmetric() {\n int nr = data.length, nc = data[0].length;\n if (nr != nc)\n return false;\n\n for (int i = 0; i < nc; i++) {\n for (int j = 0; j < i; j++) {\n if (data[i][j] != data[j][i])\n return false;\n }\n }\n return true;\n }", "@Override public boolean equals(Object o) {\n if (this == o) { return true; }\n if ( !(o instanceof Set) ) { return false; }\n Set that = (Set) o;\n return that.size() == inner.size() &&\n containsAll(that);\n }", "public boolean check_hash() {\n HashSet<E> realSet = new HashSet(this);\n return realSet.size() == this.size();\n }", "public boolean equals(Object other) {\r\n if (!(other instanceof DataTypeDescriptor))\r\n return false;\r\n \r\n DataTypeDescriptor odtd = (DataTypeDescriptor)other;\r\n if (!this.getTypeName().equals(odtd.getTypeName()) ||\r\n this.precision != odtd.getPrecision() ||\r\n this.scale != odtd.getScale() ||\r\n this.isNullable != odtd.isNullable() ||\r\n this.maximumWidth != odtd.getMaximumWidth() ||\r\n ((this.characterAttributes == null) ? (odtd.characterAttributes != null) : !this.characterAttributes.equals(odtd.characterAttributes)))\r\n return false;\r\n else\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n Centroid centroid = (Centroid) o;\n return Double.compare(centroid.xCoordinate, xCoordinate) == 0\n && Double.compare(centroid.yCoordinate, yCoordinate) == 0\n && Objects.equals(dataPoints, centroid.dataPoints);\n }", "private static boolean checkIsTrue() {\n\t\tfor(int i = 0 ; i < n ;i++){\r\n\t\t\tif(col[i]!=colTemp[i]){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < n ;i++){\r\n\t\t\tif(row[i]!=rowTemp[i]){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean equals(Object x) {\n // Check if the board equals an input Board object\n if (x == this) return true;\n if (x == null) return false;\n if (!(x instanceof Board)) return false;\n // Check if the same size\n Board y = (Board) x;\n if (y.tiles.length != n || y.tiles[0].length != n) {\n return false;\n }\n // Check if the same tile configuration\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (this.tiles[i][j] != y.tiles[i][j]) {\n return false;\n }\n }\n }\n return true;\n }", "@Test\n\tpublic void addSameValueTwice() {\n\t\tXSet xset = new XSet(3);\n\t\txset.add(1);\n\t\txset.add(1);\n\t\tassertTrue(xset.getSize() == 1);\n\t}", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n \n final Point other = (Point) obj;\n if( !(Point.memeReel(this.x, other.getX()) && Point.memeReel(this.y, other.getY())) ) {\n return false;\n }\n\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n if (!(obj instanceof XiangqiCoordinate)) return false;\n XiangqiCoordinate coordinate = (XiangqiCoordinate) obj;\n return coordinate.getRank() == rank && coordinate.getFile() == file;\n }", "public boolean equals(Vector other){\n\t\treturn x == other.x && y == other.y && z == other.z;\n\t}", "public boolean equals(Object obj) {\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof CustomXYToolTipGenerator) {\n CustomXYToolTipGenerator generator = (CustomXYToolTipGenerator) obj;\n boolean result = true;\n for (int series = 0; series < getListCount(); series++) {\n for (int item = 0; item < getToolTipCount(series); item++) {\n String t1 = getToolTipText(series, item);\n String t2 = generator.getToolTipText(series, item);\n if (t1 != null) {\n result = result && t1.equals(t2);\n }\n else {\n result = result && (t2 == null);\n }\n }\n }\n return result;\n }\n\n return false;\n\n }", "public boolean equals(Object x) {\n\t\tif (x == this) return true;\n\t\telse if (!(x instanceof Pair)) return false;\n\t\telse {\n\t\t\tPair that = (Pair)x;\n\t\t\treturn equal(this.first, that.first)\n\t\t\t\t&& equal(this.rest, that.rest);\n\t\t}\n\t}", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\tif (other instanceof MaterialType) {\n\t\t\t\tMaterialType otherType = (MaterialType)other;\n\t\t\t\treturn this.material.getId() == otherType.getMaterial().getId() &&\n\t\t\t\t\t(this.data != null ? ((short)this.data)+1 : 0) ==\n\t\t\t\t\t(otherType.getData() != null ? ((short)otherType.getData())+1 : 0);\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "private boolean sameGroup(RowMetaInterface rowMeta, Object[] previous, Object[] rowData) throws KettleValueException\n\t{\n\t\treturn rowMeta.compare(previous, rowData, data.groupnrs)==0;\n\t}", "public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }", "private boolean arePointsRepeated(Point[] points) {\n for (int i = 0; i < points.length; i++) {\r\n for (int j = i + 1; j < points.length; j++) {\r\n if (points[i].compareTo(points[j]) == 0)\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l = v.size();\n else\n ok = (l == v.size()); \n }\n return ok; \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean equals(Object other) {\n\t\tif (!(other instanceof ISet<?>))\n\t\t\treturn false;\n\t\tif (((ISet<?>) other).size() != this.size())\n\t\t\treturn false;\n\t\tboolean check;\n\t\ttry {\n\t\t\tcheck = ((ISet<E>) other).containsAll(this) && this.containsAll((ISet<E>) other);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn check;\n\t}", "public final boolean lessThanEquals() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue <= topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isEqualSet(Collection set1, Collection set2) {\n/* 99 */ if (set1 == set2) {\n/* 100 */ return true;\n/* */ }\n/* 102 */ if (set1 == null || set2 == null || set1.size() != set2.size()) {\n/* 103 */ return false;\n/* */ }\n/* */ \n/* 106 */ return set1.containsAll(set2);\n/* */ }", "@Override\n public final boolean equals(Object obj) {\n if (!(obj instanceof UniqueID))\n return false;\n UniqueID castObj = (UniqueID)obj;\n return this.leastSigBits == castObj.leastSigBits && this.mostSigBits == castObj.mostSigBits;\n }", "public boolean hasSet(ArrayList<Card> cards) {\r\n\t\tCollections.sort(cards);\r\n\t\t/*Once the cards are sorted, then the third card can be\r\n\t\t * used to compare with others\r\n\t\t */\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 3);\r\n\t}", "public boolean equals(Data C) {\n return (this.getLeft() == C.getLeft() && this.getRight() == C.getRight() &&\n this.getTop() == C.getTop() && this.getBottom() == C.getBottom());\n }", "public static boolean same(int[][] list) {\r\n \tfor (int i=1; i<list.length; i++)\r\n \t\tif (!same(list[0], list[i]))\r\n \t\t\treturn false;\r\n \treturn true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n BuildGrid buildGrid = (BuildGrid) o;\n return m_dim_x == buildGrid.m_dim_x && m_dim_y == buildGrid.m_dim_y && Arrays.equals(m_grid, buildGrid.m_grid);\n }", "public boolean equals( Object other ) {\n if ( super.equals( other ) && ( other instanceof Point ) ) {\n \tPoint p = (Point)other;\n boolean flagEq = Math.abs( getX() - p.getX() ) < mute &&\n \t \t\t\t Math.abs( getY() - p.getY() ) < mute;\n if ( getCoordinateDimension() == 3 ) {\n \tflagEq = flagEq && Math.abs( getZ() - p.getZ() ) < mute;\n }\n return flagEq;\n }\n\n return false;\n }", "public boolean equals(Point other) {\r\n return ((this.x == other.getX()) && (this.y == other.getY()));\r\n }", "private boolean alreadySeenSubset(List<Integer> subset,\n\t\t\tList<List<Integer>> prevSeenSubsets) {\n\n\t\tCollections.sort(subset);\n\n\t\tfor (List<Integer> seenSubset : prevSeenSubsets) {\n\t\t\tCollections.sort(seenSubset);\n\n\t\t\tif (subset.size() != seenSubset.size()) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\n\t\t\t\tboolean allValsEqual = true;\n\t\t\t\tfor (int i = 0; i < subset.size(); i++) {\n\t\t\t\t\tif (subset.get(i).intValue() != seenSubset.get(i)\n\t\t\t\t\t\t\t.intValue()) {\n\t\t\t\t\t\tallValsEqual = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (allValsEqual) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean abstractEqualTo(AbstractData that)\n {\n\treturn equalTo((FullPositionVector)that);\n }", "public boolean equals(Object y) {\n if (y == this) return true;\n if (y == null) return false;\n if (y.getClass() != this.getClass()) return false;\n Board that = (Board) y;\n if (this.dimension() != that.dimension()) return false;\n int sz = this.dimension();\n for (int i = 0; i < sz; i++) {\n for (int j = 0; j < sz; j++) {\n if (this.matrix[i][j] != that.matrix[i][j])\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean equals (Object o) {\n if (!(o instanceof Row)) return false;\n\n Row other = (Row)o;\n if(index!=other.getIndex())\n return false;\n for (int i = 0; i < row.size(); i++)\n if (!row.get(i).equals(other.get(i)))\n return false;\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n ResultsMatrices resultsMatrices = (ResultsMatrices) o;\n if (resultsMatrices.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), resultsMatrices.getId());\n }", "public boolean matchSameColumns(Key key);", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }", "public static boolean opposites(Pair[] data){\n HashSet<Pair> hs = new HashSet<>(20, 0.9f);\n for(Pair p : data) {\n if(hs.contains(new Pair(p.b(), p.a())))\n return true;\n hs.add(p);\n }\n return false;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof DatosIndicadores)) {\n return false;\n }\n DatosIndicadores other = (DatosIndicadores) object;\n if ((this.datosIndicadoresPK == null && other.datosIndicadoresPK != null) || (this.datosIndicadoresPK != null && !this.datosIndicadoresPK.equals(other.datosIndicadoresPK))) {\n return false;\n }\n return true;\n }", "public float compare(DataSample ds) {\n \treturn compare(center, ds);\n }", "public Boolean sameCenterPoints(Cell cell) {\r\n int centerX = cell.getcenterX();\r\n int centerY = cell.getcenterY();\r\n for (int i = 0; i < cells.size(); i++) {\r\n Cell currCell = cells.get(i);\r\n if (currCell.getcenterX()==centerX && currCell.getcenterY()==centerY\r\n ) {\r\n return (true);\r\n }\r\n }\r\n return false;\r\n }", "public boolean equals(Object obj)\n {\n if (! (obj instanceof TableRow))\n return false;\n \n return data.equals(((TableRow) obj).data);\n }", "public boolean coordsAreEqual(Cell anotherCell){\n return (getI() == anotherCell.getI()) && (getJ() == anotherCell.getJ());\n }", "public boolean equals(Object obj) {\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof Row) {\n return ((Row) obj).table == table\n && ((Row) obj).position == position;\n }\n\n return false;\n }", "static public boolean setEquals(Set source, Set arg) {\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tIterator it = arg.iterator();\n\t\twhile ( it.hasNext() ) {\n\t\t\tObject elem = it.next();\n\t\t\tif ( !source.contains(elem) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj!=null && obj instanceof Test1){\n\t\t\tTest1 obj2 = (Test1)obj;\n\t\t\tif(x==obj2.x && y==obj2.y){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean equals(DoubleLinkedList other) {\n\n\t\tif (this.elements != other.elements) {\n\t\t\treturn false;\n\t\t}\n\t\tDLNode n = head;\n\t\tDLNode o = other.head;\n\n\t\tint nc = nodeCounter();\n\n\t\tfor (int i = 0; i < nc; i++) {\n\n\t\t\tif (n.val != o.val) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (n.val == Integer.MIN_VALUE) {\n\t\t\t\tboolean check = n.list.equals(o.list);\n\t\t\t\tif (check) {\n\t\t\t\t\treturn check;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tn = n.next;\n\t\t\to = o.next;\n\n\t\t}\n\n\t\treturn true;\n\n\t}", "public boolean inSameSet( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If here, then have non-null root for each input; check if same Node.\n return root1 == root2;\n }", "public boolean equals(Point other) {\n return this.x == other.getX() && this.y == other.getY();\n }", "public boolean equals(Object other) {\r\n if (other == this) return true;\r\n if (other == null) return false;\r\n if (other.getClass() != this.getClass()) return false;\r\n Point2D that = (Point2D) other;\r\n return this.x == that.x && this.y == that.y;\r\n }", "private boolean checkSameHit(TrackerHit hit, TrackerHit trackerHit) {\n List<RawTrackerHit> rawhits = hit.getRawHits();\n List<RawTrackerHit> rawtrackerhits = trackerHit.getRawHits();\n \n //If the rawhits are different array sizes, they can't be the same hit\n if(rawhits.size() != rawtrackerhits.size())\n return false;\n \n boolean[] isSameRawHit = new boolean[rawhits.size()];\n boolean[] isSameRawTrackerHit = new boolean[rawtrackerhits.size()];\n \n //Initialize boolean arrays\n for(int i = 0; i < rawhits.size(); i++){\n isSameRawHit[i] = false;\n }\n for(int i = 0; i < rawtrackerhits.size(); i++){\n isSameRawTrackerHit[i] = false;\n }\n \n int i = 0;\n for(RawTrackerHit rawhit:rawhits){\n int j = 0;\n for(RawTrackerHit rawtrackerhit:rawtrackerhits){\n if(rawhit.equals(rawtrackerhit)){\n isSameRawHit[i] = true;\n isSameRawTrackerHit[j] = true;\n break;\n }\n j++;\n }\n i++;\n }\n \n //If any of the raw hits are not the same, this is not the same 3D hit\n for(int j = 0; j < isSameRawHit.length; j++){\n if(!isSameRawHit[j])\n return false;\n }\n for(int j = 0; j < isSameRawTrackerHit.length; j++){\n if(!isSameRawTrackerHit[j])\n return false;\n }\n return true;\n }", "private boolean containsDuplicate(final int[][] inputarray){\n Set<Integer> cells = new HashSet<Integer>();\n for (int[] i : inputarray){\n for(int values : i){\n if (cells.contains(values) || (values < 1 || values > (inputarray.length*inputarray.length))) return true;\n cells.add(values);\n }\n }\n return false;\n }", "public boolean equals(Object other){\n if(other instanceof Node){\n return ((Node)other).getData().equals(this.data);\n } else {\n return false;\n }\n\n }", "public boolean equals(Object thing)\n {\n // boolean input = super.equals(thing);\n if (thing.equals(this.x()) && thing.equals(this.y()))\n {\n return true;\n }\n return false;\n }", "public boolean isEqualTo (OrderedSet set) {\n if (set==null || size!=set.size)\n return false;\n for (DoubleLinkedList p=first; p!=null; p=p.getNext()) {\n if (set.dictionary.get(p.getInfo()) == null)\n\treturn false;\n }\n for (DoubleLinkedList p=set.first; p!=null; p=p.getNext()) {\n if (dictionary.get(p.getInfo()) == null)\n\treturn false;\n }\n return true;\n }", "boolean hasXYPairs();", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "public boolean hasAdjacentEqualPair()\n { \n \tfor( int i = 0; i < purchases.size()-1; i++ )\n \t{\n \t\tGizmo curr = purchases.get( i );\n \t\tGizmo nxt = purchases.get( i + 1 );\n \t\tif( curr.equals( nxt ) )\n \t\t\treturn true;\n \t}\n \treturn false; \t\n }", "boolean equals(Point other) {\n //System.out.println(\"Calling our equals method now!\");\n return (this.x == other.x) && (this.y == other.y);\n }", "public boolean equals(Object y) {\n if (y == this) \n return true;\n if (y == null)\n return false;\n if (y.getClass() != this.getClass())\n return false;\n Board that = (Board) y;\n if (this.dim != that.dim)\n return false;\n \n for (int i = 0; i < dim; i++) {\n for (int j = 0; j < dim; j++) {\n if (this.board[i][j] != that.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n \n }" ]
[ "0.6501156", "0.6484039", "0.62895715", "0.6236076", "0.6085593", "0.60297585", "0.60014254", "0.60009193", "0.59662604", "0.59636194", "0.5921688", "0.59149224", "0.58594525", "0.584003", "0.578994", "0.57847613", "0.57616884", "0.5758094", "0.5694694", "0.5673458", "0.56547016", "0.5634988", "0.5632204", "0.56248933", "0.56205636", "0.5618069", "0.5575082", "0.55683154", "0.55616087", "0.55542326", "0.5538118", "0.55299336", "0.5524119", "0.5511782", "0.5507131", "0.5503589", "0.5491836", "0.5480077", "0.547607", "0.5455889", "0.54515564", "0.54437906", "0.5441898", "0.5437006", "0.5421048", "0.54006547", "0.53999746", "0.53973687", "0.5396266", "0.53863025", "0.53826624", "0.5369147", "0.5369058", "0.53689325", "0.53673005", "0.5365487", "0.5364813", "0.5364093", "0.5360701", "0.53578234", "0.53548753", "0.534049", "0.53395844", "0.5337002", "0.53318655", "0.53317815", "0.5306588", "0.5303068", "0.52944523", "0.5293675", "0.5293171", "0.52851504", "0.5279201", "0.52747107", "0.52702594", "0.5261194", "0.5259227", "0.5243868", "0.52394503", "0.5239391", "0.5235481", "0.5231276", "0.5230103", "0.5226325", "0.52252257", "0.52224946", "0.5221626", "0.5214424", "0.52117556", "0.52107996", "0.52056545", "0.5202123", "0.51916844", "0.5188409", "0.5186618", "0.51836234", "0.51836234", "0.51832986", "0.51826364", "0.51775986" ]
0.6595996
0
Returns the Y value for given X value.
public static double getYForX(DataSet aDataSet, double aX) { // If empty, just return int pointCount = aDataSet.getPointCount(); if (pointCount == 0) return 0; // Get index for given X value double[] dataX = aDataSet.getDataX(); int index = Arrays.binarySearch(dataX, aX); if (index >= 0) return aDataSet.getY(index); // Get lower/upper indexes int highIndex = -index - 1; int lowIndex = highIndex - 1; // If beyond end, just return last Y if (highIndex >= pointCount) return aDataSet.getY(pointCount - 1); // If before start, just return first Y if (lowIndex < 0) return aDataSet.getY(0); // Otherwise, return weighted average double x0 = aDataSet.getX(lowIndex); double y0 = aDataSet.getY(lowIndex); double x1 = aDataSet.getX(highIndex); double y1 = aDataSet.getY(highIndex); double weightX = (aX - x0) / (x1 - x0); double y = weightX * (y1 - y0) + y0; return y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "public double getYValue(){\n return(yValue);\n }", "public double get(int y, int x);", "public double getY() {\n\t\treturn point[1];\n\t}", "public int getY() {\n return (int) Math.round(y);\n }", "long getY();", "public long getValue(final int x, final int y) {\n return this.dag.getValue(y * this.N + x);\n }", "public double getY() { return y; }", "public double getY()\n\t\t{\n\t\t\treturn this.y[0];\n\t\t}", "float getY();", "float getY();", "float getY();", "float getY();", "float getY();", "float getY();", "public int getY(int node) {\n return ys[node];\n }", "public int getY() { return (int)y; }", "public int getY()\r\n\t{\r\n\t\treturn (int)y;\r\n\t}", "public int getY() {\n return this.coordinate.y;\n }", "int getY();", "int getY();", "int getY();", "int getY();", "int getY();", "public final double getY() {\n return y;\n }", "public double getYValue(){\r\n\t\treturn ((Double)(super.yValue) ).doubleValue(); \r\n\t}", "protected Number getY() {\n return this.yCoordinate;\n }", "double getY() { return pos[1]; }", "public double getY() {\n return y;\n }", "public int getYcoord(){\n\t\treturn this.coordinates[1];\n\t}", "public float getY();", "public float getY();", "public double getY() {\r\n return y;\r\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\r\n }", "public double getY(){\r\n return y;\r\n }", "public final double getY() {\n return y;\n }", "public int getY() {\n\t\treturn this.y_indice * DIM_CASE;\n\t}", "public double getY()\n {\n return y;\n }", "public double getY() {\r\n return this.y;\r\n }", "public double getY()\n\t{\n\t\treturn y;\n\t}", "public int getY() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.y();\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public double GetY(){\n return this._Y;\n }", "public double getY(){\n\t\treturn y;\n\t}", "public int getYint(){\n return (int) y;\n }", "public abstract double getY();", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public String getYx() {\n return yx;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\r\n\t\t return this.yCoord;\r\n\t }", "Float getY();", "public double getY(){\n return y;\n }", "@Basic\n\tpublic double getY() {\n\t\treturn this.y;\n\t}", "public int getY()\r\n {\r\n return yCoord;\r\n }", "public double getY(){\n return this.y;\n }", "public double getY() {\r\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\r\n\t\treturn pY;\r\n\t}", "public Double getY() {\n\t\treturn y;\n\t}", "public int getY() {\n\t\treturn Y;\n\t}", "public double getY() {\n\t\t//throw new UnsupportedOperationException(\"TODO - implement\");\n\t\treturn pY;\n\t}", "public double getValue(int X, int Y)\n {\n return m_grid[X][Y];\n }", "public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}", "public double getY() {\n return mY;\n }", "public int getY() {\n return yCoord;\n }", "public int getY() {\r\n return y;\r\n }", "public int getY() {\r\n return y;\r\n }", "public double getY2()\n\t{\n\t\treturn this.y[2];\n\t}" ]
[ "0.7078041", "0.70173144", "0.70173144", "0.70173144", "0.70173144", "0.70173144", "0.70173144", "0.70173144", "0.70173144", "0.70173144", "0.69630325", "0.6883465", "0.6864026", "0.6852736", "0.6768006", "0.6762585", "0.6759607", "0.6753895", "0.6749338", "0.6749338", "0.6749338", "0.6749338", "0.6749338", "0.6749338", "0.67236674", "0.6721731", "0.67167777", "0.66892314", "0.6686786", "0.6686786", "0.6686786", "0.6686786", "0.6686786", "0.668225", "0.6678614", "0.66676384", "0.66600764", "0.6646973", "0.66428053", "0.66279304", "0.66279304", "0.66171604", "0.6586575", "0.6586575", "0.6586575", "0.6586575", "0.6586575", "0.6586575", "0.6586007", "0.65827674", "0.65798813", "0.65679383", "0.6564733", "0.65544623", "0.6552298", "0.6548622", "0.65400296", "0.65400296", "0.65400296", "0.65397793", "0.65397066", "0.65301704", "0.6530017", "0.6527742", "0.6527742", "0.6527742", "0.6527742", "0.6527742", "0.6527742", "0.6527742", "0.6527674", "0.65212744", "0.65212744", "0.65212744", "0.65212744", "0.65212744", "0.65209574", "0.65197104", "0.65197104", "0.65197104", "0.65147966", "0.65147966", "0.65147966", "0.65147966", "0.6513595", "0.6510396", "0.6501627", "0.6474071", "0.64597017", "0.64432114", "0.64378744", "0.6433166", "0.643067", "0.64275503", "0.642672", "0.6418899", "0.6413888", "0.6412377", "0.64077735", "0.64077735", "0.63964415" ]
0.0
-1
Find the _Fields constant that matches fieldId, or null if its not found.
public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DATAS return DATAS; default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_IDS\n return REFERRAL_LOG_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_ID\n return REFERRAL_LOG_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RECOM_ID\n return RECOM_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // BINDING_PARAMS\n return BINDING_PARAMS;\n case 2: // BIND_SOURCE\n return BIND_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_EMPLOYEE_DOS\n return USER_EMPLOYEE_DOS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RESOURCE_PLAN_NAME\n return RESOURCE_PLAN_NAME;\n case 2: // POOL_PATH\n return POOL_PATH;\n case 3: // ALLOC_FRACTION\n return ALLOC_FRACTION;\n case 4: // QUERY_PARALLELISM\n return QUERY_PARALLELISM;\n case 5: // SCHEDULING_POLICY\n return SCHEDULING_POLICY;\n case 6: // IS_SET_SCHEDULING_POLICY\n return IS_SET_SCHEDULING_POLICY;\n case 7: // NS\n return NS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // PAGE_NUMBER\n return PAGE_NUMBER;\n case 4: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // TOTAL_FILES_MATERIALIZED_COUNT\n return TOTAL_FILES_MATERIALIZED_COUNT;\n case 2: // FILES_MATERIALIZED_FROM_CASCOUNT\n return FILES_MATERIALIZED_FROM_CASCOUNT;\n case 3: // TOTAL_TIME_SPENT_MATERIALIZING_FILES_FROM_CASMILLIS\n return TOTAL_TIME_SPENT_MATERIALIZING_FILES_FROM_CASMILLIS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // SOURCE\n return SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // TIMESPAN\n return TIMESPAN;\n case 4: // PAGE_NUM\n return PAGE_NUM;\n case 5: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMB_INSTRUMENT_ID\n return COMB_INSTRUMENT_ID;\n case 2: // LEG_ID\n return LEG_ID;\n case 3: // LEG_INSTRUMENT_ID\n return LEG_INSTRUMENT_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n default:\r\n return null;\r\n }\r\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACTIVATION_CODEE\n return ACTIVATION_CODEE;\n case 2: // BIND_EMAIL_SOURCE\n return BIND_EMAIL_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // DATA\n return DATA;\n case 2: // FILE_ID\n return FILE_ID;\n case 3: // SIZE\n return SIZE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // FILE_PATH\n return FILE_PATH;\n case 2: // OUTPUT_DIR\n return OUTPUT_DIR;\n case 3: // SUBSET\n return SUBSET;\n case 4: // TYPES\n return TYPES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // PROCESS_ID\n return PROCESS_ID;\n case 3: // APPLICATION_INTERFACE_ID\n return APPLICATION_INTERFACE_ID;\n case 4: // COMPUTE_RESOURCE_ID\n return COMPUTE_RESOURCE_ID;\n case 5: // QUEUE_NAME\n return QUEUE_NAME;\n case 6: // NODE_COUNT\n return NODE_COUNT;\n case 7: // CORE_COUNT\n return CORE_COUNT;\n case 8: // WALL_TIME_LIMIT\n return WALL_TIME_LIMIT;\n case 9: // PHYSICAL_MEMORY\n return PHYSICAL_MEMORY;\n case 10: // STATUSES\n return STATUSES;\n case 11: // ERRORS\n return ERRORS;\n case 12: // CREATED_AT\n return CREATED_AT;\n case 13: // UPDATED_AT\n return UPDATED_AT;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // PARAM_MAP\n return PARAM_MAP;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACCOUNT_IDS\n return ACCOUNT_IDS;\n case 2: // COMMODITY_IDS\n return COMMODITY_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // M_COMMAND_TYPE\n return M_COMMAND_TYPE;\n case 2: // M_BLOCK_IDS\n return M_BLOCK_IDS;\n case 3: // M_FILE_PATH\n return M_FILE_PATH;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACCESS_KEY\n return ACCESS_KEY;\n case 2: // ENTITY_IDS\n return ENTITY_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // PID\n return PID;\n case 2: // CUS_PER_BASE\n return CUS_PER_BASE;\n case 3: // TOTAL_ASSETS\n return TOTAL_ASSETS;\n case 4: // TOTAL_LIAB\n return TOTAL_LIAB;\n case 5: // FAMILY_ASSETS\n return FAMILY_ASSETS;\n case 6: // YEAR_PAY\n return YEAR_PAY;\n case 7: // MONTH_WAGE\n return MONTH_WAGE;\n case 8: // FAMILY_INCOME\n return FAMILY_INCOME;\n case 9: // FAMILY_CONTROL\n return FAMILY_CONTROL;\n case 10: // STATUS\n return STATUS;\n case 11: // ASSETS_DETAIL\n return ASSETS_DETAIL;\n case 12: // LIAB_DETAIL\n return LIAB_DETAIL;\n case 13: // MONTHLY_PAYMENT\n return MONTHLY_PAYMENT;\n case 14: // OVERDRAFT\n return OVERDRAFT;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // NOME\n return NOME;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // NOME\n return NOME;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // FILE_PATH\n return FILE_PATH;\n case 2: // DIR_NAME\n return DIR_NAME;\n case 3: // FILE_LENGTH\n return FILE_LENGTH;\n case 4: // DK_FILE_CONF\n return DK_FILE_CONF;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // FILE_PATH\n return FILE_PATH;\n case 2: // DIR_NAME\n return DIR_NAME;\n case 3: // FILE_LENGTH\n return FILE_LENGTH;\n case 4: // DK_FILE_CONF\n return DK_FILE_CONF;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // LOG_INFO\n return LOG_INFO;\n case 2: // PARAMS\n return PARAMS;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // LOG_INFO\n return LOG_INFO;\n case 2: // PARAMS\n return PARAMS;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // LOG_INFO\n return LOG_INFO;\n case 2: // PARAMS\n return PARAMS;\n default:\n return null;\n }\n }" ]
[ "0.79869914", "0.7915354", "0.78808534", "0.78808534", "0.78808534", "0.78808534", "0.78808534", "0.78808534", "0.77862614", "0.7779145", "0.77291805", "0.7727816", "0.7721567", "0.77125883", "0.77125883", "0.7709597", "0.7708822", "0.7701162", "0.7699386", "0.76957756", "0.7687628", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76785046", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.76718855", "0.766961", "0.766961", "0.7663572", "0.76630384", "0.76630384", "0.76630384", "0.76630384", "0.76630384", "0.76630384", "0.76630384", "0.7648934", "0.7644055", "0.764325", "0.7634706", "0.76222456", "0.76209694", "0.7618461", "0.76121426", "0.76118654", "0.76118654", "0.760653", "0.760217", "0.760217", "0.760217", "0.760217", "0.760217", "0.7600617", "0.75965196", "0.75965196", "0.75958437", "0.75958437", "0.7593029", "0.7593029", "0.7593029" ]
0.0
-1
Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_IDS\n return REFERRAL_LOG_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_ID\n return REFERRAL_LOG_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RECOM_ID\n return RECOM_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // PROCESS_ID\n return PROCESS_ID;\n case 3: // APPLICATION_INTERFACE_ID\n return APPLICATION_INTERFACE_ID;\n case 4: // COMPUTE_RESOURCE_ID\n return COMPUTE_RESOURCE_ID;\n case 5: // QUEUE_NAME\n return QUEUE_NAME;\n case 6: // NODE_COUNT\n return NODE_COUNT;\n case 7: // CORE_COUNT\n return CORE_COUNT;\n case 8: // WALL_TIME_LIMIT\n return WALL_TIME_LIMIT;\n case 9: // PHYSICAL_MEMORY\n return PHYSICAL_MEMORY;\n case 10: // STATUSES\n return STATUSES;\n case 11: // ERRORS\n return ERRORS;\n case 12: // CREATED_AT\n return CREATED_AT;\n case 13: // UPDATED_AT\n return UPDATED_AT;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // PID\n return PID;\n case 2: // EXCEPTION_ID\n return EXCEPTION_ID;\n case 3: // USER_ID\n return USER_ID;\n case 4: // REPORT_DATE\n return REPORT_DATE;\n case 5: // UN_ASSURE_CONDITION\n return UN_ASSURE_CONDITION;\n case 6: // HOUSE_PROPERY_CONDITION\n return HOUSE_PROPERY_CONDITION;\n case 7: // REMARK\n return REMARK;\n case 8: // CREATE_DATE\n return CREATE_DATE;\n case 9: // CREATE_ID\n return CREATE_ID;\n case 10: // UPDATE_DATE\n return UPDATE_DATE;\n case 11: // UPDATE_ID\n return UPDATE_ID;\n case 12: // PROJECT_ID\n return PROJECT_ID;\n case 13: // LEGAL_LIST\n return LEGAL_LIST;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // SOURCE\n return SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_EMPLOYEE_DOS\n return USER_EMPLOYEE_DOS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // PAGE_NUMBER\n return PAGE_NUMBER;\n case 4: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // TIMESPAN\n return TIMESPAN;\n case 4: // PAGE_NUM\n return PAGE_NUM;\n case 5: // PAGE_SIZE\n return PAGE_SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // BINDING_PARAMS\n return BINDING_PARAMS;\n case 2: // BIND_SOURCE\n return BIND_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // USER_ID\n return USER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // USER_ID\n return USER_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // CUSTOM_VALUES\n return CUSTOM_VALUES;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ACTIVATION_CODEE\n return ACTIVATION_CODEE;\n case 2: // BIND_EMAIL_SOURCE\n return BIND_EMAIL_SOURCE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EMPLOYEE_ID\n return EMPLOYEE_ID;\n case 2: // POSITION_ID\n return POSITION_ID;\n case 3: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 0: // SUCCESS\n return SUCCESS;\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // APP_CODE\n \treturn APP_CODE;\n case 2: // REQUEST_DATE\n \treturn REQUEST_DATE;\n case 3: // SIGN\n \treturn SIGN;\n case 4: // SP_ID\n \treturn SP_ID;\n case 5: // OUT_ORDER_ID\n \treturn OUT_ORDER_ID;\n case 6: // DEVICE_NO\n \treturn DEVICE_NO;\n case 7: // DEVICE_TYPE\n \treturn DEVICE_TYPE;\n case 8: // PROVINCE_ID\n \treturn PROVINCE_ID;\n case 9: // CUST_ID\n \treturn CUST_ID;\n case 10: // NUM\n \treturn NUM;\n case 11: // REMARK\n \treturn REMARK;\n case 12: // ACTIVE_ID\n \treturn ACTIVE_ID;\n case 13: // EXP_TIME\n \treturn EXP_TIME;\n default:\n \treturn null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // DATA\n return DATA;\n case 2: // FILE_ID\n return FILE_ID;\n case 3: // SIZE\n return SIZE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByThriftId(int fieldId) {\r\n switch(fieldId) {\r\n case 1: // ID\r\n return ID;\r\n case 2: // ID_CURSA\r\n return ID_CURSA;\r\n case 3: // NR_LOC\r\n return NR_LOC;\r\n case 4: // CLIENT\r\n return CLIENT;\r\n default:\r\n return null;\r\n }\r\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EXEC_TRADE_ID\n return EXEC_TRADE_ID;\n case 2: // SUB_ACCOUNT_ID\n return SUB_ACCOUNT_ID;\n case 3: // SLED_CONTRACT_ID\n return SLED_CONTRACT_ID;\n case 4: // EXEC_ORDER_ID\n return EXEC_ORDER_ID;\n case 5: // TRADE_PRICE\n return TRADE_PRICE;\n case 6: // TRADE_VOLUME\n return TRADE_VOLUME;\n case 7: // EXEC_TRADE_DIRECTION\n return EXEC_TRADE_DIRECTION;\n case 8: // CREATE_TIMESTAMP_MS\n return CREATE_TIMESTAMP_MS;\n case 9: // LASTMODIFY_TIMESTAMP_MS\n return LASTMODIFY_TIMESTAMP_MS;\n case 10: // SLED_COMMODITY_ID\n return SLED_COMMODITY_ID;\n case 11: // CONFIG\n return CONFIG;\n case 12: // ORDER_TOTAL_VOLUME\n return ORDER_TOTAL_VOLUME;\n case 13: // LIMIT_PRICE\n return LIMIT_PRICE;\n case 14: // SOURCE\n return SOURCE;\n case 15: // TRADE_ACCOUNT_ID\n return TRADE_ACCOUNT_ID;\n case 16: // TRADE_TIMESTAMP_MS\n return TRADE_TIMESTAMP_MS;\n case 17: // ASSET_TRADE_DETAIL_ID\n return ASSET_TRADE_DETAIL_ID;\n case 18: // SUB_USER_ID\n return SUB_USER_ID;\n case 19: // SLED_ORDER_ID\n return SLED_ORDER_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // RESOURCE_PLAN_NAME\n return RESOURCE_PLAN_NAME;\n case 2: // POOL_PATH\n return POOL_PATH;\n case 3: // ALLOC_FRACTION\n return ALLOC_FRACTION;\n case 4: // QUERY_PARALLELISM\n return QUERY_PARALLELISM;\n case 5: // SCHEDULING_POLICY\n return SCHEDULING_POLICY;\n case 6: // IS_SET_SCHEDULING_POLICY\n return IS_SET_SCHEDULING_POLICY;\n case 7: // NS\n return NS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // CONF\n return CONF;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // CONTRACT_ADDRESS\n return CONTRACT_ADDRESS;\n case 2: // OBJECT\n return OBJECT;\n case 3: // STATE_CAN_MODIFY\n return STATE_CAN_MODIFY;\n default:\n return null;\n }\n }", "public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // EX\n return EX;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // ID\n return ID;\n case 2: // TYPE\n return TYPE;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // COMPANY_ID\n return COMPANY_ID;\n default:\n return null;\n }\n }" ]
[ "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7541919", "0.75344586", "0.74417484", "0.74417484", "0.74417484", "0.74417484", "0.74417484", "0.74417484", "0.7428648", "0.7428648", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7427518", "0.7423571", "0.7423369", "0.7403485", "0.7394984", "0.7394108", "0.7391513", "0.73827726", "0.73782563", "0.7376256", "0.7372693", "0.73629117", "0.73629117", "0.7350967", "0.7350967", "0.7342082", "0.7342082", "0.7342082", "0.73345006", "0.73275083", "0.7317537", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7315645", "0.7308824", "0.7288882", "0.72863466", "0.72711205", "0.72704643", "0.72680724", "0.7256801", "0.72550267", "0.72543365", "0.7249658", "0.7249658", "0.7247689", "0.7247689", "0.7247689", "0.7247689", "0.7247689" ]
0.0
-1
Find the _Fields constant that matches name, or null if its not found.
public static _Fields findByName(String name) { return byName.get(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }", "public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}", "@org.apache.thrift.annotation.Nullable\n\t\tpublic static _Fields findByName(java.lang.String name) {\n\t\t\treturn byName.get(name);\n\t\t}" ]
[ "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.76308644", "0.76308644", "0.76308644", "0.76308644", "0.76308644", "0.76308644", "0.76308644", "0.76308644", "0.76308644", "0.7578759", "0.7578759", "0.7571673", "0.7571673", "0.756394", "0.756394" ]
0.0
-1
Performs a deep copy on other.
public DTO(DTO other) { if (other.isSetDatas()) { Map<String,String> __this__datas = new HashMap<String,String>(other.datas); this.datas = __this__datas; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Prototype makeCopy();", "public void copy (WorldState other)\n\t{\n\t\tresetProperties();\n\t\t//Iterate through other state and clone it's properties into this states properties\n\t\tCollection<WorldStateProperty> otherProperties = other.properties.values();\n\t\tfor (WorldStateProperty property : otherProperties)\n\t\t{\n\t\t\tproperties.put(property.key, property.clone());\n\t\t}\n\t}", "public void copyDataFrom(ParamUnit other)\r\n\t{\r\n\t\tif (this.data.row != other.data.row || this.data.col != other.data.col)\r\n\t\t\tthrow new DeepException(\"Cannot copy data from a different dimension.\");\r\n\t\tthis.data.copyFrom(other.data);\r\n\t}", "private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}", "@Override\n\tprotected void copy(Object source, Object dest) {\n\t\t\n\t}", "public void copy() {\n\n\t}", "public abstract B copy();", "public CMObject copyOf();", "public T cloneDeep();", "public void copy(BlastGraph<HitVertex, ValueEdge> graphToCopy) {\n\t\t// empty this graph\n\t\tthis.empty();\n\n\t\t// union this empty graph with graphToCopy\n\t\tthis.union(graphToCopy);\n\t}", "public void mirror(Dataset other) {\n clear();\n this.ntree.addAll(other.ntree);\n }", "Model copy();", "public abstract INodo copy();", "static void setCopying(){isCopying=true;}", "Nda<V> shallowCopy();", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "T copy();", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "public void copy(DataRequest original){\n\t\t//potential problems with object sharing\n\t\tfilters = \toriginal.get_filters();\n\t\tsort_by = \toriginal.get_sort_by();\n\t\tcount = \toriginal.get_count();\n\t\tstart = \toriginal.get_start();\n\t\tsource = \toriginal.get_source();\n\t\tfieldset =\toriginal.get_fieldset();\n\t\trelation = \toriginal.get_relation();\n\t}", "Component deepClone();", "public Data assign(Data other) {\r\n this.setDimension(other.dimension);\r\n this.distanz = other.distanz;\r\n //for (int i = 0; i < this.dimension; ++i)\r\n for (int i = 0; i < this.dimension * 2; ++i) {\r\n this.data[i] = other.data[i];\r\n }\r\n this.id = other.id;\r\n return this;\r\n }", "@Override\n public int deepCopy(AbstractRecord other)\n {\n return 0;\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "@Override\n public void copyValues(final fr.jmmc.oiexplorer.core.model.OIBase other) {\n final View view = (View) other;\n\n // copy type, subsetDefinition (reference):\n this.type = view.getType();\n this.subsetDefinition = view.getSubsetDefinition();\n }", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public abstract Node copy();", "protected void copy(Writable other) {\n\t\tif (other != null) {\n\t\t\ttry {\n\t\t\t\tDataOutputBuffer out = new DataOutputBuffer();\n\t\t\t\tother.write(out);\n\t\t\t\tDataInputBuffer in = new DataInputBuffer();\n\t\t\t\tin.reset(out.getData(), out.getLength());\n\t\t\t\treadFields(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IllegalArgumentException(\"map cannot be copied: \" +\n\t\t\t\t\t\te.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"source map cannot be null\");\n\t\t}\n\t}", "protected void copyInto(Schedule other) {\r\n\t\tfor(int i = MIN_WEEKDAY; i <= MAX_WEEKDAY; i++)\r\n\t\t\tfor(int j = MIN_SEGMENT; j <= MAX_SEGMENT; j++)\r\n\t\t\t\tother.schedule[i][j] = schedule[i][j];\t\t\r\n\t}", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "Object clone();", "Object clone();", "@Override\n public FieldEntity copy()\n {\n return state.copy();\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "Nda<V> deepCopy();", "@Override\n public LocalStore<V> copy() {\n return this;\n }", "public abstract TreeNode copy();", "@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "@Override\n\tpublic void copyReferences() {\n\t\tlateCopies = new LinkedHashMap<>();\n\n\t\tsuper.copyReferences();\n\n\t\tputAll(lateCopies);\n\t\tlateCopies = null;\n\t}", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "@Test\n\tpublic void testCopy2() {\n\n\t\tint[] arr = { 1, 2, 3, 7, 8 }; // this list\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet copied = listObj2.copy();\n\t\tcopied.add(-1);\n\t\tString expectedObj2 = \"1, 2, 3, 7, 8\";\n\t\tString expectedCopied = \"-1, 1, 2, 3, 7, 8\";\n\t\tint expectedObj2Size = 5;\n\t\tint expectedCopiedSize = 6;\n\n\t\tassertEquals(expectedObj2Size, listObj2.getSize());\n\t\tassertEquals(expectedObj2, listObj2.toString());\n\n\t\tassertEquals(expectedCopiedSize, copied.getSize());\n\t\tassertEquals(expectedCopied, copied.toString());\n\n\t}", "public Data copy(Object value) {\n if (mValue instanceof Data) {\n ((Data) mValue).copy(value);\n } else {\n mValue = value;\n }\n return this;\n }", "public void\n\tcopy( Vector3 other )\n\t{\n\t\tdata[0] = other.data[0];\n\t\tdata[1] = other.data[1];\n\t\tdata[2] = other.data[2];\n\t}", "private static void copy(List<? super Number> dest, List<? extends Number> src) {\n for (int i = 0; i < src.size(); i++) {\n dest.set(i, src.get(i));\n //dest.add(src.get(i));\n }\n }", "private ImmutablePerson(ImmutablePerson other) {\n firstName = other.firstName;\n middleName = other.middleName;\n lastName = other.lastName;\n nickNames = new ArrayList<>(other.nickNames);\n }", "public abstract void copy(Result result, Object object);", "protected AbstractChartModel copy(AbstractChartModel aCopy) {\n aCopy.title = title;\n aCopy.xAxisTitle = xAxisTitle;\n aCopy.yAxisTitle = yAxisTitle;\n aCopy.xRangeMax = xRangeMax;\n aCopy.xRangeMin = xRangeMin;\n aCopy.xRangeIncr = xRangeIncr;\n aCopy.yRangeMax = yRangeMax;\n aCopy.yRangeMin = yRangeMin;\n aCopy.yRangeIncr = yRangeIncr;\n aCopy.simModel = simModel;\n ArrayList list = new ArrayList();\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource) dataSources.get(i);\n list.add(ds.copy());\n }\n aCopy.dataSources = list;\n\n return aCopy;\n }", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }", "public Game copy();", "public void pasteFrom(Flow other)\n\t\t{\n\t\tunits.addAll(other.units);\n\t\tconns.addAll(other.conns);\n\t\t}", "@Override\r\n\tpublic LogicalValue copy() {\r\n\t\treturn new Pointer(target);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "public CFExp deepCopy(){\r\n return this;\r\n }", "DataContext copy();", "@Override\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS(this.ga);//create the copy graph via copy constructor\n return copy;\n }", "@Override\n\tpublic SecuredRDFList copy();", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public O copy() {\n return value();\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public abstract Object clone();", "public Function clone();", "public abstract Type treeCopy();", "public Tree<K, V> copy(Tree<K, V> t, Tree<K, V> copy) {\n\t\tcopy = copy.add(key, value);\n\t\tcopy = left.copy(left, copy);\n\t\tcopy = right.copy(right, copy);\n\t\treturn copy;\n\t}", "public Results copy()\n {\n Results copy = new Results();\n for(Object object : results) {\n copy.add( object );\n }\n return copy;\n }", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "@Override\r\n\tpublic void copy(Property p) {\n\t\t\r\n\t}", "public directed_weighted_graph deepCopy() {\n DWGraph_DS copyGraph = new DWGraph_DS(this); //create a new graph with the original graph data (only primitives)\n HashMap<Integer, node_data> copyNodesMap = new HashMap<>(); //create a new nodes HashMap for the new graph\n for (node_data node : nodes.values()) { //loop through all nodes in the original graph\n copyNodesMap.put(node.getKey(), new NodeData((NodeData) node)); //makes a duplicate of the original HashMap\n }\n copyGraph.nodes = copyNodesMap; //set the new graph nodes to the new HashMap we made.\n return copyGraph;\n }", "public Object clone() {\n return this.copy();\n }", "@Override\n public Operator visitCopy(Copy operator)\n {\n throw new AssertionError();\n }", "@Test\n\tpublic void copy() {\n\t\tBody b1 = new Body();\n\t\tBodyFixture b1f1 = b1.addFixture(Geometry.createCircle(0.5));\n\t\t\n\t\tCollisionItemAdapter<Body, BodyFixture> c1 = this.item.copy();\n\t\tTestCase.assertNull(c1.getBody());\n\t\tTestCase.assertNull(c1.getFixture());\n\t\t\n\t\tthis.item.set(b1, b1f1);\n\t\tCollisionItemAdapter<Body, BodyFixture> c2 = this.item.copy();\n\t\tTestCase.assertEquals(b1, c2.getBody());\n\t\tTestCase.assertEquals(b1f1, c2.getFixture());\n\t\t\n\t\t// make sure it's a deep copy\n\t\tc1.set(null, null);\n\t\tTestCase.assertNull(c1.getBody());\n\t\tTestCase.assertNull(c1.getFixture());\n\t\tTestCase.assertEquals(b1, c2.getBody());\n\t\tTestCase.assertEquals(b1f1, c2.getFixture());\n\t}", "public abstract Object clone() ;", "public Object clone() {\n \ttry {\n \tMyClass1 result = (MyClass1) super.clone();\n \tresult.Some2Ob = (Some2)Some2Ob.clone(); ///IMPORTANT: Some2 clone method called for deep copy without calling this Some2.x will be = 12\n \t\n \treturn result;\n \t} catch (CloneNotSupportedException e) {\n \treturn null; \n \t}\n\t}", "public PaginationVO(PaginationVO other) {\n __isset_bitfield = other.__isset_bitfield;\n this.pageSize = other.pageSize;\n this.pageNo = other.pageNo;\n this.upPage = other.upPage;\n this.nextPage = other.nextPage;\n this.totalCount = other.totalCount;\n this.totalPage = other.totalPage;\n if (other.isSetPageUrl()) {\n this.pageUrl = other.pageUrl;\n }\n if (other.isSetParams()) {\n this.params = other.params;\n }\n if (other.isSetDatas()) {\n List<BlogPostVO> __this__datas = new ArrayList<BlogPostVO>();\n for (BlogPostVO other_element : other.datas) {\n __this__datas.add(new BlogPostVO(other_element));\n }\n this.datas = __this__datas;\n }\n }", "public WorldState (WorldState other)\n\t{\n\t\tproperties = new HashMap<String, WorldStateProperty>();\t\t\n\t\tcopy(other);\n\t}", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "protected void copy(){\n\t\tthis.model.copy(this.color.getBackground());\n\t}", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "@Override\n public INDArray copy(INDArray x, INDArray y) {\n //NativeBlas.dcopy(x.length(), x.data(), 0, 1, y.data(), 0, 1);\n JavaBlas.rcopy(x.length(), x.data(), x.offset(), 1, y.data(), y.offset(), 1);\n return y;\n }", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "public Object detachCopy(Object po)\n{\n\treturn po;\n}", "public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}", "@Override\r\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS();\r\n for (node_info curr : this.Graph.getV()) { //The loop passes through all the ver' of the graph\r\n Nodes t = new Nodes(curr); //create new node\r\n copy.addNode(t.key); //copy the the old node to the new node\r\n }\r\n for (node_info curr0 : this.Graph.getV()) {\r\n for (node_info curr1 : this.Graph.getV(curr0.getKey())) { //this loops pass over the all nodes and copy the connection\r\n double i = this.Graph.getEdge(curr0.getKey(), curr1.getKey());\r\n if (i != -1) {\r\n copy.connect(curr0.getKey(), curr1.getKey(), i);\r\n }\r\n }\r\n }\r\n return copy;\r\n\r\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public static void main(String[] args) throws CloneNotSupportedException\n {\n ArrayList<String> companies = new ArrayList<String>();\n companies.add(\"Baidu\");\n companies.add(\"Tencent\");\n companies.add(\"Ali\");\n WorkExprience workExprience = new WorkExprience(companies);\n String nameString = new String(\"Tom\");\n String genderString = new String(\"male\");\n Resume resume = new Resume(nameString, 23, genderString, workExprience);\n System.out.println(\"Source Resume\");\n resume.printResum();\n \n ArrayList<String> companies1 = new ArrayList<String>();\n companies1.add(\"Google\");\n companies1.add(\"Microsoft\");\n companies1.add(\"Oracle\");\n Resume copyResume = (Resume)resume.clone();\n String nameString1 = new String(\"Jerry\");\n String genderString1 = new String(\"Fmale\");\n copyResume.setName(nameString1);\n copyResume.setAge(20);\n copyResume.setGender(genderString1);\n copyResume.getWorkExprience().setCompanyArrayList(companies1);\n System.out.println();\n System.out.println(\"Source Resume\");\n resume.printResum();\n System.out.println();\n System.out.println(\"Copy Resume\");\n copyResume.printResum();\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "protected void deepCloneReferences(uka.transport.DeepClone _helper)\n throws CloneNotSupportedException\n {\n //Cloning the byte array\n\t this.value = _helper.doDeepClone(this.value);\n //byte[] value_clone = new byte[this.value.length]; \n //System.arraycopy(this.value, 0, value_clone, 0, this.value.length);\n //this.value = value_clone;\n }", "static void setNotCopying(){isCopying=false;}", "void copy(DependencyRelations deps){\n if (deps == null)\n throw new IllegalArgumentException(\"the source is null.\");\n\n size_ = deps.size_;\n for(int i = 0; i < size_ ; i++){\n if (nodes_[i] == null)\n nodes_[i] = new Node();\n nodes_[i].copy(deps.nodes_[i]);\n }\n }", "@SuppressWarnings(\"All\")\n public <T> void copy(MyList<? super T> to, MyList<? extends T> from) {\n\n System.out.println(\"from size \" + from.size);\n for (int i = 0; i < from.getSize(); i++) {\n to.add(from.getByIndex(i));\n }\n }", "public void copy(Posts that) {\r\n\t\tsetId(that.getId());\r\n\t\tsetTitle(that.getTitle());\r\n\t\tsetContent(that.getContent());\r\n\t\tsetShareDate(that.getShareDate());\r\n\t\tsetIsPrivate(that.getIsPrivate());\r\n\t\tsetUsers(that.getUsers());\r\n\t\tsetCommentses(new java.util.LinkedHashSet<com.ira.domain.Comments>(that.getCommentses()));\r\n\t}", "@Override\n public TopicObject copy() {\n return new TopicObject(this);\n }" ]
[ "0.7214815", "0.6982586", "0.6743959", "0.66792786", "0.6563397", "0.6549605", "0.65230364", "0.652084", "0.64842516", "0.64743775", "0.6450891", "0.6438907", "0.64186275", "0.640633", "0.6403375", "0.63743764", "0.6373319", "0.6358263", "0.6322797", "0.63214344", "0.62839", "0.6270614", "0.6265534", "0.6262602", "0.6245396", "0.6226707", "0.62195224", "0.6199828", "0.61679715", "0.61505216", "0.6141201", "0.6141201", "0.613657", "0.61238766", "0.6113572", "0.6078777", "0.6067093", "0.6051407", "0.60489607", "0.60435355", "0.6034403", "0.6030665", "0.603029", "0.6002317", "0.5987207", "0.5984917", "0.59831345", "0.5962016", "0.5931717", "0.59043086", "0.58999294", "0.58940864", "0.5888768", "0.5887435", "0.5887003", "0.5872753", "0.58715606", "0.5867456", "0.5854781", "0.5835268", "0.5833011", "0.58237326", "0.58237326", "0.58237326", "0.58237326", "0.5821464", "0.5818652", "0.5814066", "0.57974726", "0.579667", "0.5792226", "0.57900447", "0.57734174", "0.57581633", "0.5751797", "0.57507133", "0.5744841", "0.5744065", "0.5744024", "0.5743795", "0.5740732", "0.57376605", "0.5736934", "0.5736099", "0.5727886", "0.5727659", "0.5714002", "0.5700601", "0.56953377", "0.5689013", "0.5682943", "0.5676875", "0.56736434", "0.56729144", "0.567041", "0.5669635", "0.56651294", "0.56643426", "0.5662451", "0.5647604" ]
0.6194176
28
Returns true if field datas is set (has been assigned a value) and false otherwise
public boolean isSetDatas() { return this.datas != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean is_set_data() {\n return this.data != null;\n }", "public boolean is_set_data() {\n return this.data != null;\n }", "public boolean isSetData() {\n return this.data != null;\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case DATAS:\n return isSetDatas();\n }\n throw new IllegalStateException();\n }", "public boolean isSetValue() {\n return this.value != null;\n }", "public boolean isSetValue() {\n return this.value != null;\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case DATA:\n return isSetData();\n case FILE_ID:\n return isSetFileID();\n case SIZE:\n return isSetSize();\n }\n throw new java.lang.IllegalStateException();\n }", "boolean isSetValue();", "boolean isSetValue();", "public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }", "public boolean isSetFields() {\n return this.fields != null;\n }", "public boolean hasDataFields() {\n\t\tif (this.dataFields.size() > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isDataValid() {\r\n boolean dataValid = true;\r\n\r\n if (this.needDefaultValue) {\r\n try {\r\n this.getDefaultValue();\r\n } catch (Exception e) {\r\n dataValid = false;\r\n }\r\n }\r\n\r\n if (this.nameTextField.getText() == null || this.nameTextField.getText().length() == 0) {\r\n dataValid = false;\r\n }\r\n\r\n return dataValid;\r\n\r\n }", "public boolean isSet() {\n\t\treturn false;\n\t}", "private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case EXTRA_DATA_MAP:\n return isSetExtraDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case TYPE:\n return isSetType();\n case POSTSID:\n return isSetPostsid();\n case USERID:\n return isSetUserid();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case STATUS:\n return is_set_status();\n case DATA:\n return is_set_data();\n case SUMMARY:\n return is_set_summary();\n case FEATURE:\n return is_set_feature();\n case PREDICT_RESULT:\n return is_set_predictResult();\n case MSG:\n return is_set_msg();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDENTIFIER:\n return isSetIdentifier();\n case KEY:\n return isSetKey();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ATTRS:\n return isSetAttrs();\n }\n throw new IllegalStateException();\n }", "boolean hasField4();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case NOME:\n return isSetNome();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case NOME:\n return isSetNome();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case FIELD:\r\n return isSetField();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case DEST_APP:\n return is_set_destApp();\n case DEST_PELLET:\n return is_set_destPellet();\n case DATA:\n return is_set_data();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJ_ID:\r\n return isSetObjId();\r\n case SYMBOL:\r\n return isSetSymbol();\r\n case POSITION_X:\r\n return isSetPositionX();\r\n case POSITION_Y:\r\n return isSetPositionY();\r\n }\r\n throw new IllegalStateException();\r\n }", "boolean hasField3();", "private boolean fieldsAreFilled(){\n return !textboxName.isEnabled() && !textboxInitialValue.isEnabled();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case NAME:\n return isSetName();\n case PLUGIN:\n return isSetPlugin();\n case PACKAGENAME:\n return isSetPackagename();\n case STATUS:\n return isSetStatus();\n case SIZE:\n return isSetSize();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n case NUM:\n return isSetNum();\n }\n throw new IllegalStateException();\n }", "public boolean fieldsAreFilled(){\r\n boolean filled = true;\r\n if(txtFName.getText().trim().isEmpty() | txtFEmail.getText().trim().isEmpty() | txtFPhone.getText().trim().isEmpty()){\r\n filled = false;\r\n }\r\n return filled;\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case HEADER_TRANSPORT:\n return isSetHeaderTransport();\n case UUID_FICHA:\n return isSetUuidFicha();\n case TP_CDS_ORIGEM:\n return isSetTpCdsOrigem();\n case TURNO:\n return isSetTurno();\n case CNS_CIDADAO:\n return isSetCnsCidadao();\n case CNS_RESPONSAVEL_FAMILIAR:\n return isSetCnsResponsavelFamiliar();\n case DATA_REALIZACAO_TESTE_OLHINHO:\n return isSetDataRealizacaoTesteOlhinho();\n case CO_RESULTADO_TESTE_OLHINHO:\n return isSetCoResultadoTesteOlhinho();\n case DATA_REALIZACAO_EXAME_FUNDO_OLHO:\n return isSetDataRealizacaoExameFundoOlho();\n case CO_RESULTADO_EXAME_FUNDO_OLHO:\n return isSetCoResultadoExameFundoOlho();\n case DATA_REALIZACAO_TESTE_ORELHINHA:\n return isSetDataRealizacaoTesteOrelhinha();\n case CO_RESULTADO_TESTE_ORELHINHA:\n return isSetCoResultadoTesteOrelhinha();\n case DATA_REALIZACAO_USTRANSFONTANELA:\n return isSetDataRealizacaoUSTransfontanela();\n case CO_RESULTADO_US_TRANSFONTANELA:\n return isSetCoResultadoUsTransfontanela();\n case DATA_REALIZACAO_TOMOGRAFIA_COMPUTADORIZADA:\n return isSetDataRealizacaoTomografiaComputadorizada();\n case CO_RESULTADO_TOMOGRAFIA_COMPUTADORIZADA:\n return isSetCoResultadoTomografiaComputadorizada();\n case DATA_REALIZACAO_RESSONANCIA_MAGNETICA:\n return isSetDataRealizacaoRessonanciaMagnetica();\n case CO_RESULTADO_RESSONANCIA_MAGNETICA:\n return isSetCoResultadoRessonanciaMagnetica();\n case CPF_CIDADAO:\n return isSetCpfCidadao();\n case CPF_RESPONSAVEL_FAMILIAR:\n return isSetCpfResponsavelFamiliar();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case KEY:\n return isSetKey();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case KEY:\n return isSetKey();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case EMAIL_ID:\n return isSetEmailId();\n case NAME:\n return isSetName();\n case PASSWORD:\n return isSetPassword();\n case COUNTRY:\n return isSetCountry();\n case PHONE:\n return isSetPhone();\n case LAST_LOGGED_IN:\n return isSetLastLoggedIn();\n case ACTIVE:\n return isSetActive();\n case NEWSLETTER:\n return isSetNewsletter();\n case REGISTERED:\n return isSetRegistered();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ID:\r\n return isSetId();\r\n case NAME:\r\n return isSetName();\r\n case ARTISTS:\r\n return isSetArtists();\r\n case RELEASE_DATE:\r\n return isSetRelease_date();\r\n case GENRES:\r\n return isSetGenres();\r\n case TRACK_NAMES:\r\n return isSetTrack_names();\r\n case TEXT:\r\n return isSetText();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case STAFF_ID:\n return isSetStaffId();\n case LOGIN_TYPE:\n return isSetLoginType();\n case LOGIN_ID:\n return isSetLoginId();\n case LOGIN_PASS:\n return isSetLoginPass();\n case LOGIN_PASS_ENCRYPT:\n return isSetLoginPassEncrypt();\n case PHONE_NUMBER:\n return isSetPhoneNumber();\n case STAFF_TYPE:\n return isSetStaffType();\n case STATUS:\n return isSetStatus();\n case CERT_STATUS:\n return isSetCertStatus();\n case AVG_SCORE:\n return isSetAvgScore();\n case TAG:\n return isSetTag();\n case FINISH_ORDER_COUNT:\n return isSetFinishOrderCount();\n case ASSIGN_ORDER_COUNT:\n return isSetAssignOrderCount();\n case EXTRA_DATA1:\n return isSetExtraData1();\n case EXTRA_DATA2:\n return isSetExtraData2();\n case CREATE_TIME:\n return isSetCreateTime();\n case UPDATE_TIME:\n return isSetUpdateTime();\n case REGISTER_TIME:\n return isSetRegisterTime();\n case LAST_RECEPTION_TIME:\n return isSetLastReceptionTime();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCESS_KEY:\n return isSetAccessKey();\n case DATA_MAP:\n return isSetDataMap();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case FILE_NAME:\n return isSetFileName();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case FILE_NAME:\n return isSetFileName();\n }\n throw new IllegalStateException();\n }" ]
[ "0.7934651", "0.7934651", "0.77464455", "0.77464455", "0.74981475", "0.7402354", "0.7378717", "0.73549044", "0.7341075", "0.7225458", "0.7225458", "0.7189815", "0.709653", "0.7096029", "0.7053636", "0.70366156", "0.70239", "0.7007464", "0.6899203", "0.6894836", "0.68872166", "0.6886887", "0.6869723", "0.6864647", "0.6864647", "0.68612653", "0.68583214", "0.68505186", "0.6848302", "0.68407476", "0.68243974", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6821223", "0.6816769", "0.6814856", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6813168", "0.6805478", "0.6799273", "0.6799273", "0.67964876", "0.6792956", "0.67843944", "0.6780641", "0.6780641", "0.6780641", "0.6780641", "0.6780641", "0.6780641", "0.6780641", "0.6780641", "0.6780414", "0.6780414", "0.6780414", "0.6780414", "0.6776194", "0.6776194" ]
0.75033844
5
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DATAS: return isSetDatas(); } throw new IllegalStateException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(int fieldID) {\n switch (fieldID) {\n case NAME:\n return isSetName();\n case PASSWORD:\n return isSetPassword();\n case SELECT_PRIV:\n return isSetSelect_priv();\n case INSERT_PRIV:\n return isSetInsert_priv();\n case CREATE_PRIV:\n return isSetCreate_priv();\n case DROP_PRIV:\n return isSetDrop_priv();\n case GRANT_PRIV:\n return isSetGrant_priv();\n case ALTER_PRIV:\n return isSetAlter_priv();\n case CREATE_USER_PRIV:\n return isSetCreate_user_priv();\n case SUPER_PRIV:\n return isSetSuper_priv();\n default:\n throw new IllegalArgumentException(\"Field \" + fieldID + \" doesn't exist!\");\n }\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDS:\n return isSetIds();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n case NUM:\n return isSetNum();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case FIELD:\r\n return isSetField();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case PARAMS:\n return isSetParams();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJ_ID:\r\n return isSetObjId();\r\n case SYMBOL:\r\n return isSetSymbol();\r\n case POSITION_X:\r\n return isSetPositionX();\r\n case POSITION_Y:\r\n return isSetPositionY();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case USER_ID:\n return isSetUserId();\n }\n throw new IllegalStateException();\n }", "boolean hasField4();", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case OBJECT_ID:\r\n return isSetObjectId();\r\n case SOURCE_ID:\r\n return isSetSourceId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case TYPE:\n return isSetType();\n case POSTSID:\n return isSetPostsid();\n case USERID:\n return isSetUserid();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IDENTIFIER:\n return isSetIdentifier();\n case KEY:\n return isSetKey();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case POST_ID:\n return isSetPostId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ENTITY_ID:\r\n return isSetEntityId();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case RECORD:\n return isSetRecord();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case RECORD:\n return isSetRecord();\n }\n throw new IllegalStateException();\n }", "boolean hasFieldId();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case NUM:\n return isSetNum();\n }\n throw new java.lang.IllegalStateException();\n }", "boolean hasField0();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case PARENT_ID:\n return isSetParentId();\n case TYPE:\n return isSetType();\n case VALUE:\n return isSetValue();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case INSTITUTION_ID:\n return isSetInstitutionID();\n case PRODUCTIDS:\n return isSetProductids();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case DATA:\n return isSetData();\n case FILE_ID:\n return isSetFileID();\n case SIZE:\n return isSetSize();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case BROKER_ID:\n return isSetBrokerID();\n case ACCOUNT_ID:\n return isSetAccountID();\n case ALGORITHM:\n return isSetAlgorithm();\n case MEMO:\n return isSetMemo();\n case CURRENCY_ID:\n return isSetCurrencyID();\n }\n throw new IllegalStateException();\n }", "public boolean isSetFields() {\n return this.fields != null;\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ID:\r\n return isSetId();\r\n case NAME:\r\n return isSetName();\r\n case ARTISTS:\r\n return isSetArtists();\r\n case RELEASE_DATE:\r\n return isSetRelease_date();\r\n case GENRES:\r\n return isSetGenres();\r\n case TRACK_NAMES:\r\n return isSetTrack_names();\r\n case TEXT:\r\n return isSetText();\r\n }\r\n throw new IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case RELATED_ID:\n return isSetRelatedId();\n case COMPANY_ID:\n return isSetCompanyId();\n case COMPANY_GROUP_ID:\n return isSetCompanyGroupId();\n case MACHINE_ID:\n return isSetMachineId();\n case ACTIVE_START_TIMESTAMP:\n return isSetActiveStartTimestamp();\n case ACTIVED_END_TIMESTAMP:\n return isSetActivedEndTimestamp();\n case MACHINE_INNER_IP:\n return isSetMachineInnerIP();\n case MACHINE_OUTER_IP:\n return isSetMachineOuterIP();\n case CREATE_TIMESTAMP:\n return isSetCreateTimestamp();\n case LASTMODIFY_TIMESTAMP:\n return isSetLastmodifyTimestamp();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ACCOUNT_IDS:\n return isSetAccountIds();\n case COMMODITY_IDS:\n return isSetCommodityIds();\n }\n throw new IllegalStateException();\n }", "boolean hasField1();", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case TYPE:\n return isSetType();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case TYPE:\n return isSetType();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case X:\n return isSetX();\n case Y:\n return isSetY();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case PAGE_NO:\n return isSetPageNo();\n case PAGE_SIZE:\n return isSetPageSize();\n case USER_ID:\n return isSetUserId();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case STAFF_ID:\n return isSetStaffId();\n case LOGIN_TYPE:\n return isSetLoginType();\n case LOGIN_ID:\n return isSetLoginId();\n case LOGIN_PASS:\n return isSetLoginPass();\n case LOGIN_PASS_ENCRYPT:\n return isSetLoginPassEncrypt();\n case PHONE_NUMBER:\n return isSetPhoneNumber();\n case STAFF_TYPE:\n return isSetStaffType();\n case STATUS:\n return isSetStatus();\n case CERT_STATUS:\n return isSetCertStatus();\n case AVG_SCORE:\n return isSetAvgScore();\n case TAG:\n return isSetTag();\n case FINISH_ORDER_COUNT:\n return isSetFinishOrderCount();\n case ASSIGN_ORDER_COUNT:\n return isSetAssignOrderCount();\n case EXTRA_DATA1:\n return isSetExtraData1();\n case EXTRA_DATA2:\n return isSetExtraData2();\n case CREATE_TIME:\n return isSetCreateTime();\n case UPDATE_TIME:\n return isSetUpdateTime();\n case REGISTER_TIME:\n return isSetRegisterTime();\n case LAST_RECEPTION_TIME:\n return isSetLastReceptionTime();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case EXAM_ID:\n return isSetExam_id();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\r\n if (field == null) {\r\n throw new java.lang.IllegalArgumentException();\r\n }\r\n\r\n switch (field) {\r\n case ID:\r\n return isSetId();\r\n case ID_CURSA:\r\n return isSetIdCursa();\r\n case NR_LOC:\r\n return isSetNrLoc();\r\n case CLIENT:\r\n return isSetClient();\r\n }\r\n throw new java.lang.IllegalStateException();\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case COMB_INSTRUMENT_ID:\n return isSetCombInstrumentID();\n case LEG_ID:\n return isSetLegID();\n case LEG_INSTRUMENT_ID:\n return isSetLegInstrumentID();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case PID:\n return isSetPid();\n case EXCEPTION_ID:\n return isSetExceptionId();\n case USER_ID:\n return isSetUserId();\n case REPORT_DATE:\n return isSetReportDate();\n case UN_ASSURE_CONDITION:\n return isSetUnAssureCondition();\n case HOUSE_PROPERY_CONDITION:\n return isSetHouseProperyCondition();\n case REMARK:\n return isSetRemark();\n case CREATE_DATE:\n return isSetCreateDate();\n case CREATE_ID:\n return isSetCreateId();\n case UPDATE_DATE:\n return isSetUpdateDate();\n case UPDATE_ID:\n return isSetUpdateId();\n case PROJECT_ID:\n return isSetProjectId();\n case LEGAL_LIST:\n return isSetLegalList();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n case PATIENT_ID:\n return isSetPatient_id();\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case IS_STAR:\n return isSetIs_star();\n case IS_DISTINCT:\n return isSetIs_distinct();\n case OP:\n return isSetOp();\n }\n throw new IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new java.lang.IllegalArgumentException();\n }\n\n switch (field) {\n }\n throw new java.lang.IllegalStateException();\n }" ]
[ "0.79056656", "0.79056656", "0.78333884", "0.78036314", "0.77937067", "0.7780796", "0.7780796", "0.7780796", "0.7780796", "0.76468164", "0.754723", "0.75451803", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.7542179", "0.75237954", "0.7519931", "0.7519931", "0.7518171", "0.7517334", "0.7517334", "0.7517334", "0.7517334", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.7516493", "0.75077486", "0.74782556", "0.7463401", "0.7450414", "0.74464494", "0.74464494", "0.7432297", "0.74118006", "0.7392036", "0.7386285", "0.7381753", "0.7379419", "0.7373811", "0.7371855", "0.73575383", "0.73532623", "0.7346856", "0.73463356", "0.7345177", "0.7345177", "0.73431945", "0.7337974", "0.7333134", "0.7332566", "0.73245287", "0.7323758", "0.7319723", "0.7318809", "0.7317446", "0.7308939", "0.7308939", "0.7308939", "0.7308939", "0.7308939" ]
0.73933053
74
check for required fields check for substruct validity
public void validate() throws org.apache.thrift.TException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validate() throws org.apache.thrift.TException {\n if (institutionID == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'institutionID' was not present! Struct: \" + toString());\n }\n if (productids == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'productids' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (is_null == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'is_null' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (partition_exprs == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_exprs' was not present! Struct: \" + toString());\n }\n if (partition_infos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_infos' was not present! Struct: \" + toString());\n }\n if (rollup_schemas == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'rollup_schemas' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_destApp()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destApp' is unset! Struct:\" + toString());\n }\n\n if (!is_set_destPellet()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destPellet' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetResourcePlanName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resourcePlanName' is unset! Struct:\" + toString());\n }\n\n if (!isSetPoolPath()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'poolPath' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'id' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_inputs()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'inputs' is unset! Struct:\" + toString());\n }\n\n if (!is_set_streams()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'streams' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (emailId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'emailId' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (classification == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'classification' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetColName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'colName' is unset! Struct:\" + toString());\n }\n\n if (!isSetColType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'colType' is unset! Struct:\" + toString());\n }\n\n if (!isSetStatsData()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statsData' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (code == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'code' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (op == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'op' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUserProfileId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'userProfileId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityType' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (limb == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'limb' was not present! Struct: \" + toString());\n }\n if (pos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'pos' was not present! Struct: \" + toString());\n }\n if (ori == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'ori' was not present! Struct: \" + toString());\n }\n if (speed == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'speed' was not present! Struct: \" + toString());\n }\n if (angls == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'angls' was not present! Struct: \" + toString());\n }\n if (mode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'mode' was not present! Struct: \" + toString());\n }\n if (kin == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'kin' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (pos != null) {\n pos.validate();\n }\n if (ori != null) {\n ori.validate();\n }\n if (speed != null) {\n speed.validate();\n }\n if (angls != null) {\n angls.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (key_column_name == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_name' was not present! Struct: \" + toString());\n }\n if (key_column_type == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_type' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'is_preaggregation' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (parseId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'parseId' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'constituentIndex' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (parseId != null) {\n parseId.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUuidFicha()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'uuidFicha' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (headerTransport != null) {\n headerTransport.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (statusCode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statusCode' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void fillMandatoryFields() {\n\n }", "public void checkFields(){\n }", "public void validate() throws org.apache.thrift.TException {\n if (tableType == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableType' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'numCols' because it's a primitive and you chose the non-beans generator.\n // alas, we cannot check 'numClusteringCols' because it's a primitive and you chose the non-beans generator.\n if (tableName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableName' was not present! Struct: \" + toString());\n }\n if (dbName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'dbName' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (hdfsTable != null) {\n hdfsTable.validate();\n }\n if (hbaseTable != null) {\n hbaseTable.validate();\n }\n if (dataSourceTable != null) {\n dataSourceTable.validate();\n }\n }", "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.heightValue, \" Рост: \", b) ||\n !CalendarHelper.isFieldValid(startProgramDateValue, \" Старт программы: \", b) ||\n !new ComboBoxFieldHelper<Client>().isFieldValid(clientFIOValue, \" Клиент: \", b))\n {\n result = false;\n }\n\n return result;\n }", "public static boolean checkMandatoryFields(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private void fillMandatoryFields_custom() {\n\n }", "private void checkRequiredFields() {\n // check the fields which should be non-null\n if (configFileName == null || configFileName.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configFileName' should not be null.\");\n }\n if (configNamespace == null || configNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configNamespace' should not be null.\");\n }\n if (searchBundleManagerNamespace == null\n || searchBundleManagerNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'searchBundleManagerNamespace' should not be null.\");\n }\n if (entityManager == null) {\n throw new DAOConfigurationException(\n \"The 'entityManager' should not be null.\");\n }\n }", "public static boolean checkMandatoryFieldsRegistration(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private void setupRequiredValidation() {\n requiredMafExpressions.put(FIELD_HUGO_SYMBOL, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_HUGO_SYMBOL, \"may not be blank\");\r\n requiredMafExpressions.put(FIELD_ENTREZ_GENE_ID, Pattern.compile(\"\\\\d+\")); // number\r\n requiredFieldDescriptions.put(FIELD_ENTREZ_GENE_ID, \"must be an integer number\");\r\n requiredMafExpressions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_TUMOR_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_TUMOR_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_VALIDATION_STATUS, Pattern.compile(\"Valid|Wildtype|Unknown|\\\\S?\"));\r\n requiredFieldDescriptions.put(FIELD_VALIDATION_STATUS, \"must be Valid, Wildtype, Unknown, or blank\");\r\n requiredMafExpressions.put(FIELD_CHROMOSOME, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_CHROMOSOME, \"must be one of: X, Y, M, 1-22, or full name of unassigned fragment\");\r\n setupMafSpecificChecks();\r\n }", "private void validateFields() {\n\t\t// TODO validate ID\n\t\tboolean valid = (mEdtAddress.getText().length() > 2)\n\t\t\t\t&& (mEdtPassword.getText().length() > 0);\n\t\tmBtnNext.setEnabled(valid);\n\t}", "private void validateData() {\n }", "public interface FieldValidator {\n static boolean validateStringIfPresent(Object o, int len) {\n return o == null || o instanceof String && !((String) o).isEmpty() && ((String) o).length() < len;\n }\n\n static boolean validateString(Object o, int len) {\n return !(o == null || !(o instanceof String) || ((String) o).isEmpty() || (((String) o).length() > len));\n }\n\n static boolean validateInteger(Object o) {\n if (o == null) {\n return false;\n }\n try {\n Integer.valueOf(o.toString());\n } catch (NumberFormatException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateDateWithFormat(Object o, DateTimeFormatter formatter, boolean allowedInPast) {\n if (o == null) {\n return false;\n }\n try {\n LocalDate date = LocalDate.parse(o.toString(), formatter);\n if (!allowedInPast) {\n return date.isAfter(LocalDate.now());\n }\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateJsonIfPresent(Object o) {\n return o == null || o instanceof JsonObject && !((JsonObject) o).isEmpty();\n }\n\n static boolean validateJson(Object o) {\n return !(o == null || !(o instanceof JsonObject) || ((JsonObject) o).isEmpty());\n }\n\n static boolean validateJsonArrayIfPresent(Object o) {\n return o == null || o instanceof JsonArray && !((JsonArray) o).isEmpty();\n }\n\n static boolean validateJsonArray(Object o) {\n return !(o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty());\n }\n\n static boolean validateDeepJsonArrayIfPresent(Object o, FieldValidator fv) {\n if (o == null) {\n return true;\n } else if (!(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n } else {\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static boolean validateDeepJsonArray(Object o, FieldValidator fv) {\n if (o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n }\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n return true;\n }\n\n static boolean validateBoolean(Object o) {\n return o != null && o instanceof Boolean;\n }\n\n static boolean validateBooleanIfPresent(Object o) {\n return o == null || o instanceof Boolean;\n }\n\n static boolean validateUuid(Object o) {\n try {\n UUID uuid = UUID.fromString((String) o);\n return true;\n } catch (IllegalArgumentException e) {\n return false;\n }\n }\n\n static boolean validateUuidIfPresent(String o) {\n return o == null || validateUuid(o);\n }\n\n boolean validateField(Object value);\n\n Pattern EMAIL_PATTERN =\n Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\n static boolean validateEmail(Object o) {\n Matcher matcher = EMAIL_PATTERN.matcher((String) o);\n return matcher.matches();\n }\n}", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean checkDataStructure(Data data) throws ImportitException {\n\t\tdata.setDatabase(39);\n\t\tdata.setGroup(3);\n\t\tboolean validDb = checkDatabaseName(data);\n\t\tboolean validHead = false;\n\t\tboolean validTable = false;\n\t\tboolean existImportantFields = false;\n\t\tif (validDb) {\n\t\t\tList<Field> headerFields = data.getHeaderFields();\n\t\t\tList<Field> tableFields = data.getTableFields();\n\t\t\tvalidHead = false;\n\t\t\tvalidTable = false;\n\t\t\ttry {\n\n\t\t\t\tvalidHead = checkWarehouseGroupProperties(headerFields, data.getOptionCode().useEnglishVariables());\n\t\t\t\tvalidTable = checkFieldList(tableFields, 39, 3, false, data.getOptionCode().useEnglishVariables());\n\t\t\t\tString[] checkDataCustomerPartProperties = checkDataWarehouseGroupProperties(data);\n\t\t\t\texistImportantFields = checkDataCustomerPartProperties.length == 2;\n\n\t\t\t} catch (ImportitException e) {\n\t\t\t\tlogger.error(e);\n\t\t\t\tdata.appendError(Util.getMessage(\"err.structure.check\", e.getMessage()));\n\t\t\t}\n\t\t}\n\t\tif (validTable && validHead && validDb & existImportantFields) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }", "@Override\n\tprotected Boolean isValid(String[] fields) {\n\t\t//check - evnet_id, yes, maybe, invited, no\n return (fields.length > 4);\n\t}", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "@Override\n\tpublic boolean isValid(SchemaField field, Data data) {\n\t\treturn false;\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "private void validateFields () throws ModelValidationException\n\t\t\t{\n\t\t\t\tString pcClassName = getClassName();\n\t\t\t\tModel model = getModel();\n\t\t\t\t// check for valid typed public non-static fields\n\t\t\t\tList keyClassFieldNames = model.getAllFields(keyClassName);\n\t\t\t\tMap keyFields = getKeyFields();\n\n\t\t\t\tfor (Iterator i = keyClassFieldNames.iterator(); i.hasNext();)\n\t\t\t\t{\n\t\t\t\t\tString keyClassFieldName = (String)i.next();\n\t\t\t\t\tObject keyClassField = \n\t\t\t\t\t\tgetKeyClassField(keyClassName, keyClassFieldName);\n\t\t\t\t\tint keyClassFieldModifiers = \n\t\t\t\t\t\tmodel.getModifiers(keyClassField);\n\t\t\t\t\tString keyClassFieldType = model.getType(keyClassField);\n\t\t\t\t\tObject keyField = keyFields.get(keyClassFieldName);\n\n\t\t\t\t\tif (Modifier.isStatic(keyClassFieldModifiers))\n\t\t\t\t\t\t// we are not interested in static fields\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif (!model.isValidKeyType(keyClassName, keyClassFieldName))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ModelValidationException(keyClassField,\n\t\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\t\"util.validation.key_field_type_invalid\", //NOI18N\n\t\t\t\t\t\t\tkeyClassFieldName, keyClassName));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!Modifier.isPublic(keyClassFieldModifiers))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ModelValidationException(keyClassField,\n\t\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\t\"util.validation.key_field_public\", //NOI18N\n\t\t\t\t\t\t\tkeyClassFieldName, keyClassName));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keyField == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (!keyClassFieldType.equals(model.getType(keyField)))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new ModelValidationException(keyClassField,\n\t\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\t\"util.validation.key_field_type_mismatch\", //NOI18N\n\t\t\t\t\t\t\tkeyClassFieldName, keyClassName, pcClassName));\n\t\t\t\t\t}\n\n\t\t\t\t\t// remove handled keyField from the list of keyFields\n\t\t\t\t\tkeyFields.remove(keyClassFieldName);\n\t\t\t\t}\n\n\t\t\t\t// check whether there are any unhandled key fields\n\t\t\t\tif (!keyFields.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tObject pcClass = model.getClass(pcClassName);\n\t\t\t\t\tString fieldNames = StringHelper.arrayToSeparatedList(\n\t\t\t\t\t\tnew ArrayList(keyFields.keySet()));\n\n\t\t\t\t\tthrow new ModelValidationException(pcClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_field_missing\", //NOI18N\n\t\t\t\t\t\tpcClassName, keyClassName, fieldNames));\n\t\t\t\t}\n\t\t\t}", "@Test\n\tpublic void testCheckForEmptyFields() {\n\t\t\n\t\t// Case 1: when all fields are present\n\t\tRequestData requestDataObj1 = new RequestData();\n\t\trequestDataObj1.setDomain(\"PBTV\");\n\t\trequestDataObj1.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj1.setSourceSystemName(\"CDI\");\n\t\tboolean expectedResponse1 = true;\n\t\tboolean response1 = tokenisationMainObj.checkForEmptyFields(requestDataObj1);\n\t\tassertEquals(response1, expectedResponse1);\n\n\t\t// Case 2: when any of them is empty\n\t\tRequestData requestDataObj2 = new RequestData();\n\t\trequestDataObj2.setDomain(\"PBTV\");\n\t\trequestDataObj2.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj2.setSourceSystemName(\"\");\n\t\tboolean expectedResponse2 = false;\n\t\tboolean response2 = tokenisationMainObj.checkForEmptyFields(requestDataObj2);\n\t\tassertEquals(response2, expectedResponse2);\n\t}", "public static boolean checkMandatoryFieldsUpdateUser(Object obj) {\n\n\t\tif (obj instanceof UpdateUserDTO) {\n\n\t\t\tUpdateUserDTO updateUserDTO = (UpdateUserDTO) obj;\n\n\t\t\tif (updateUserDTO.getFirstName().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getLastName().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getAddress1().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getCity().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getState().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getZipCode().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getNewEmailId().trim().isEmpty()\n\n\t\t\t) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}", "public abstract List<String> requiredFields();", "public void partValidation () throws ValidationException {\n\n // checks for a name to be entered\n if (getPartName().isEmpty() || !getPartName().matches(\"^[a-zA-Z0-9_ ]*$\")){\n throw new ValidationException(\"Name field is invalid. Can't be blank. Must be alphanumeric\");\n\n // checks that minimum stock isn't less than 0\n }else if (getPartStockMin() < 0) {\n throw new ValidationException(\"Inventory minimum can't be less than 0\");\n\n } else if (getPartStockMax() < 0) {\n throw new ValidationException(\"Inventory max must be greater than 0\");\n\n // checks to make sure max stock is not less than the minimum\n }else if (getPartStockMax() < getPartStockMin()) {\n throw new ValidationException(\"Max inventory can't be less than the minimum\");\n\n // checks that stock on hadn is not less than the minimum\n } else if (getPartStock() < getPartStockMin()){\n throw new ValidationException(\"Part inventory can't be less than the minimum\");\n\n // part price can't be 0 or less\n }else if (getPartPrice() < 0){\n throw new ValidationException(\"Price has to be a positive number\");\n\n // max stock can't be less than what you already have\n }else if (getPartStockMax() < getPartStock()){\n throw new ValidationException(\"Max inventory can't be less than what you have on hand\");\n\n // check stock is between min and max\n } else if (getPartStock() < getPartStockMin() || getPartStock() > getPartStockMax()){\n throw new ValidationException(\"Inventory level must be between min and max\");\n\n }\n }", "private void validateFields() throws InvalidConnectionDataException {\n if (driver == null) throw new InvalidConnectionDataException(\"No driver field\");\n if (address == null) throw new InvalidConnectionDataException(\"No address field\");\n if (username == null) throw new InvalidConnectionDataException(\"No username field\");\n if (password == null) throw new InvalidConnectionDataException(\"No password field\");\n }", "void validateState() throws EPPCodecException {\n // add/chg/rem\n if ((addDsData == null) && (chgDsData == null) && (remKeyTag == null)) {\n throw new EPPCodecException(\"EPPSecDNSExtUpdate required attribute missing\");\n }\n \n // Ensure there is only one non-null add, chg, or rem\n\t\tif (((addDsData != null) && ((chgDsData != null) || (remKeyTag != null)))\n\t\t\t\t|| ((chgDsData != null) && ((addDsData != null) || (remKeyTag != null)))\n\t\t\t\t|| ((remKeyTag != null) && ((chgDsData != null) || (addDsData != null)))) {\n\t\t\tthrow new EPPCodecException(\"Only one add, chg, or rem is allowed\");\n\t\t}\n }", "protected void doExtraValidation(Properties props) {\n /* nothing by default */\n }", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "boolean hasFieldNested();", "private boolean checkFields() {\n boolean test = true;\n if (fname.isEmpty()) {\n test = false;\n }\n if (lname.isEmpty()) {\n test = false;\n }\n if (cin.isEmpty()) {\n test = false;\n }\n if (typeCompte.equals(\"Bancaire\")) {\n if (decouvertNF.isEmpty())\n test = false;\n } else if (typeCompte.equals(\"Epargne\")) {\n if (tauxInteretNF.isEmpty())\n test = false;\n }\n if (s_datePK.getValue() == null) {\n s_datePK.setStyle(\"-fx-border-color:red;-fx-border-radius:3px;-fx-border-size: 1px;\");\n test = false;\n }\n\n return test;\n }", "public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "boolean hasNestedField();", "protected abstract List<TemporalField> validFields();", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "public void validate() {\n if (valid) return;\n \n layer = getAttValue(\"layer\").getString();\n hasFrame = getAttValue(\"hasframe\").getBoolean();\n\n valid = true;\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "boolean hasNestedOuterField();", "private boolean checkFields() {\n if (editTxtName.getText().equals(\"\")) return false;//name\n if (editTxtDesc.getText().equals(\"\")) return false;//desc\n if (editClrColor.getValue() == null) return false;//color\n if (oldEnvironment == null) return false;//environment is null\n return true;//everything is valid\n }", "@Override\n public JsonNode required(String fieldName) {\n return _reportRequiredViolation(\"Node of type %s has no fields\",\n ClassUtil.nameOf(getClass()));\n }", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\r\n public void validate() {\r\n }", "public boolean hasFieldErrors();", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private void checkRep() {\n\t\tassert (this != null) : \"this Edge cannot be null\";\n\t\tassert (this.label != null) : \"this Edge's label cannot be null\";\n\t\tassert (this.child != null) : \"this Edge's child cannot be null\";\n\t}", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }", "private boolean Validate() {\n EditText titleText = findViewById(R.id.register_movie_title_txt);\n EditText yearText = findViewById(R.id.register_movie_year_txt);\n EditText ratingText = findViewById(R.id.register_movie_rating_txt);\n\n\n boolean is_filled_required_fields = false;\n is_filled_required_fields = titleText.getText().toString().length() > 0\n && yearText.getText().toString().length() > 0\n && ratingText.getText().toString().length() > 0;\n\n if (!is_filled_required_fields) {\n Snackbar mySnackbar = Snackbar.make(findViewById(R.id.activity_register_base_layout), \"Please fill required fields\", BaseTransientBottomBar.LENGTH_SHORT);\n mySnackbar.show();\n }\n return is_filled_required_fields;\n }", "public void check(ResourceMemberInterface resource) {\n\t\tassert resource.getParent() != null;\r\n\t\tassert resource.getName() != null;\r\n\t\tassert resource.getLabel() != null;\r\n\t\tassert resource.getTLModelObject() != null;\r\n\t\tassert resource.getTLModelObject().getListeners() != null;\r\n\t\tassert !resource.getTLModelObject().getListeners().isEmpty();\r\n\t\tassert Node.GetNode(resource.getTLModelObject()) == resource;\r\n\t\tresource.getFields(); // don't crash\r\n\t}", "protected void validate()\r\n\t{\r\n\t\tif( this.mapper==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the Mapper of this dataset.\");\r\n\t\tif( this.input_format==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the InputFormat of this dataset.\");\r\n\t\tif( this.inputs==null || this.inputs.size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the input path(s) of this dataset\");\r\n\t\tif ( this.getSchema()==null || this.getSchema().size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the schema of this dataset first\");\r\n\t}", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "@Test (priority = 2)\n\tpublic void TC2_CheckAllFields_Exisit ()\n\n\t{\n\t\tCreateUserPage UserObj = new CreateUserPage (driver);\n\n\t\t// This is to Validate If all fields of create user page are existing\n\t\tUserObj.Validate_AllFields_Exsist();\n\t\n\n\t}", "public void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tif (MappingClassElement.VERSION_CONSISTENCY == \n\t\t\t\t\tmappingClass.getConsistencyLevel())\n\t\t\t\t{\n\t\t\t\t\tMappingFieldElement versionField =\n\t\t\t\t\t\t validateVersionFieldExistence();\n\t\t\t\t\tString className = mappingClass.getName();\n\t\t\t\t\tString fieldName = versionField.getName();\n\t\t\t\t\tString columnName = null;\n\t\t\t\t\tColumnElement column = null;\n\n\t\t\t\t\tif (versionField instanceof MappingRelationshipElement)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.version_field_relationship_not_allowed\");//NOI18N\n\t\t\t\t\t}\n\t\t\t\t\telse if (MappingFieldElement.GROUP_DEFAULT != \n\t\t\t\t\t\tversionField.getFetchGroup()) // must be in DFG\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow constructFieldException(fieldName, \n\t\t\t\t\t\t\t\"util.validation.version_field_fetch_group_invalid\");//NOI18N\n\t\t\t\t\t}\n\n\t\t\t\t\tvalidatePersistenceFieldAttributes(className, fieldName);\n\t\t\t\t\tcolumnName = validateVersionFieldMapping(versionField);\n\t\t\t\t\tcolumn = validateTableMatch(className, fieldName, columnName);\n\t\t\t\t\tvalidateColumnAttributes(className, fieldName, column);\n\t\t\t\t}\n\t\t\t}", "private boolean checkIfHasRequiredFields(BoxItem shareItem){\n return shareItem.getSharedLink() != null && shareItem.getAllowedSharedLinkAccessLevels() != null;\n }", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "boolean isValidSubResource(Object fieldValue) {\n return fieldValue != null\n && BaseEntity.class.isAssignableFrom(fieldValue.getClass())\n && fieldValue.getClass().getDeclaredAnnotation(Sensible.class) == null;\n }", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "protected void validate() {\n // no op\n }", "protected boolean isValidData() {\n return true;\n }", "@Override\n\t\tpublic void checkPreconditions() {\n\t\t}", "public boolean isRequired();", "public void validate() throws org.apache.thrift.TException {\n if (levelInfo != null) {\r\n levelInfo.validate();\r\n }\r\n }", "public void validate() {\n\t\tClass<?> clazz = this.getModelObject().getClass();\n\t\tif (!ArenaUtils.isObservable(clazz)) {\n\t\t\tthrow new RuntimeException(\"La clase \" + clazz.getName() + \" no tiene alguna de estas annotations \" + ArenaUtils.getRequiredAnnotationForModels() + \" que son necesarias para ser modelo de una vista en Arena\");\n\t\t}\n\t\t// TODO: Validate children bindings?\n\t}", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void validate() {\n\t}", "void checkValid();", "private void validateInputParameters(){\n\n }", "public boolean validate(Struct data) {\r\n\t\tif (data == null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tif (this.options.size() == 0) {\r\n\t\t\tOperationContext.get().errorTr(437, data);\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.options.size() == 1) \r\n\t\t\treturn this.options.get(0).validate(data);\r\n\t\t\r\n\t\tfor (DataType dt : this.options) {\r\n\t\t\tif (dt.match(data)) \r\n\t\t\t\treturn dt.validate(data);\r\n\t\t}\r\n\t\t\r\n\t\tOperationContext.get().errorTr(438, data);\t\t\t\r\n\t\treturn false;\r\n\t}", "private void validate() throws BaseException\n {\n boolean okay = true;\n\n //TODO: check the bases in seq for validity\n // If the type is RNA, the base T is not allowed\n // If the type is DNA, the base U is not allowed\n // If a disallowed type is present, set okay to false.\n \n if (!okay)\n {\n throw new BaseException();\n }\n }", "@Override\r\n\tprotected void validate() {\n\t}", "public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }", "public boolean validateInputFields(){\n if(titleText.getText().isEmpty() || descriptionText.getText().isEmpty()){\n showError(true, \"All fields are required. Please complete.\");\n return false;\n }\n if(locationCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a location.\");\n return false;\n }\n if(contactCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a contact.\");\n return false;\n }\n if(typeCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select the type.\");\n return false;\n }\n if(customerCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a customer.\");\n return false;\n }\n if(userCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a user.\");\n return false;\n }\n return true;\n }", "public void validate() {}" ]
[ "0.75401354", "0.74719286", "0.7333375", "0.7304861", "0.72982836", "0.729518", "0.72577775", "0.7225706", "0.71371984", "0.7129901", "0.7116786", "0.7092598", "0.70728713", "0.70518136", "0.70367175", "0.70314413", "0.69580764", "0.690188", "0.68602306", "0.6692948", "0.66799486", "0.66016793", "0.6531198", "0.6201798", "0.61862105", "0.6125509", "0.60847056", "0.6062816", "0.6039728", "0.600999", "0.59966576", "0.5976531", "0.59758466", "0.5965871", "0.5947064", "0.59223855", "0.5922278", "0.58906883", "0.58834726", "0.5867908", "0.5825018", "0.58205366", "0.57992554", "0.5780987", "0.57802767", "0.5757422", "0.5754295", "0.5752983", "0.57528615", "0.57414174", "0.5738411", "0.57320136", "0.57320136", "0.57320136", "0.5725357", "0.5719012", "0.5706793", "0.5690102", "0.5678541", "0.5659636", "0.5639797", "0.5627573", "0.56135464", "0.5606204", "0.5589754", "0.55717397", "0.5568869", "0.5565506", "0.55608743", "0.55607665", "0.5547348", "0.5544268", "0.55411816", "0.55269957", "0.5522637", "0.5516646", "0.5516371", "0.55138063", "0.55137813", "0.5500658", "0.5499726", "0.54987335", "0.5498394", "0.5496379", "0.54960924", "0.5473159", "0.54723763", "0.54722196", "0.546883", "0.54670763", "0.54607475", "0.54482555", "0.5445599", "0.5433513", "0.54323035", "0.54323", "0.542701", "0.54248434", "0.54239476", "0.5421569", "0.5419966" ]
0.0
-1
For given integer x, find out after binary conversion, how many ones it will have 6 = 0b110 > 2
public static void main(String[] args) { int x = 7; System.out.println(new BinaryNumberOfOnes().convert(x)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int ones()\n {\n char[] binArray = binary.toCharArray();\n int count = 0;\n int max = 0; \n for(int i = 0; i < binary.length(); i++)\n {\n if(binArray[i] == '0'){\n count = 0;\n }else {\n count++;\n max = Math.max(max, count);\n }\n }\n return max;\n }", "private int getNumDigits(int x) {\n int ans = 1;\n for (int digit = 9; digit >=0; digit--) {\n int power_of_ten = (int) Math.pow(10, digit);\n if (x / power_of_ten > 0) {\n ans = digit + 1;\n break;\n }\n }\n \n return ans;\n }", "static int bitLengthForInt(int n) {\n return 32 - Integer.numberOfLeadingZeros(n);\n }", "public static void main(String[] args) {\n\t\tString binary = Integer.toBinaryString(5);\r\n int count=0;\r\n int max=0;\r\n for(int i=0; i<binary.length();i++){\r\n \tif(binary.charAt(i)=='1'){\r\n count++;\r\n if(count>max)\r\n max=count;\r\n }else{\r\n count=0;\r\n }\r\n }\r\n System.out.println(max);\r\n\r\n\t}", "public int howManyBits(int value) {\n\t\t// TODO: Implement this method.\n\t\treturn 0;\n\t}", "private int count1_bitcount(int [] ix, EChannel cod_info) {\n\t\tint p, i, k;\n\t\tint signbits;\n\t\tint sum0 = 0, sum1 = 0;\n\t\tint count1End = bigvalues_region + count1_region;\n\n\t\tfor(i = bigvalues_region, k=0; k < count1End; i+=4, k++) {\n\t\t\tv = Math.abs(ix[i]);\n\t\t\tw = Math.abs(ix[i+1]);\n\t\t\tx = Math.abs(ix[i+2]);\n\t\t\ty = Math.abs(ix[i+3]);\n\n\t\t\tp = signbits = 0;\n\t\t\tif(v!=0) { signbits++; p |= 1; }\n\t\t\tif(w!=0) { signbits++; p |= 2; }\n\t\t\tif(x!=0) { signbits++; p |= 4; }\n\t\t\tif(y!=0) { signbits++; p |= 8; }\n\n\t\t\tsum0 += signbits;\n\t\t\tsum1 += signbits;\n\n\t\t\tsum0 += hlen[32][p];\n\t\t\tsum1 += hlen[33][p];\n\t\t}\n\n\t\tif(sum0 < sum1) {\n\t\t\tcod_info.count1table_select = 0;\n\t\t\treturn sum0;\n\t\t} else {\n\t\t\tcod_info.count1table_select = 1;\n\t\t\treturn sum1;\n\t\t}\n\t}", "static int count8(int n) {\n if (n == 0)\n return 0;\n if (n % 10 == 8) {\n // RC1: if two rightmost digits is 88, count as 2, and recurse on rest\n if (n % 100 == 88)\n return 2 + count8(n / 10);\n else\n // RC2: if rightmost digit is just one 8, standard--count as 1 and recurse on rest\n return 1 + count8(n / 10);\n } else\n // RC3: if rightmost not 8, recurse on rest\n return count8(n / 10);\n }", "public static int alldigits(int x) {\n count1=0;\n do {\n x = x / 10;\n count1++;\n } while (x != 0);\n return count1;\n }", "static int countSetBits(int n)\r\n {\r\n int count = 0;\r\n while (n > 0) {\r\n count += n & 1;\r\n n >>= 1;\r\n }\r\n return count;\r\n }", "int nextBits(int bits);", "public static int nextPowerOfTwo(int x) {\n if (x == 0) return 1;\n x--;\n x |= x >> 1;\n x |= x >> 2;\n x |= x >> 4;\n x |= x >> 8;\n return (x | x >> 16) + 1;\n }", "private static int getCountOfSetBit(int num){\n int c =0;\n while(num>0){\n c += (num & 1);\n num >>=1;\n }\n return c;\n }", "public static int bitCount(long i) {\r\n // HD, Figure 5-14\r\n\t\ti = i - ((i >>> 1) & 0x5555555555555555L);\r\n\t\ti = (i & 0x3333333333333333L) + ((i >>> 2) & 0x3333333333333333L);\r\n\t\ti = (i + (i >>> 4)) & 0x0f0f0f0f0f0f0f0fL;\r\n\t\ti = i + (i >>> 8);\r\n\t\ti = i + (i >>> 16);\r\n\t\ti = i + (i >>> 32);\r\n\t\treturn (int)i & 0x7f;\r\n }", "static int beautifulBinaryString(String b) {\n int index = b.indexOf(\"010\", 0) ;\n int change = 0;\n while (index != -1) {\n change++;\n index = b.indexOf(\"010\", index + 3) ;\n }\n return change;\n }", "private static short\n \tnumBitsInLastByte(int bits)\n \t{\n \t\tint modulo = bits % 8;\n \t\treturn (short)((modulo == 0) ?\n \t\t\t\t((bits == 0) ? 0 : 8) :\n \t\t\t\tmodulo);\n \t}", "private boolean isPowerOfTwo(int x) {\n return (x & (x - 1)) == 0;\n }", "private static int batoi(byte[] inp) {\n int len = inp.length>4?4:inp.length;\n int total = 0;\n for (int i = 0; i < len; i++) {\n total += (inp[i]<0?256+inp[i]:(int)inp[i]) << (((len - 1) - i) * 8);\n }\n return total;\n }", "public long bits() {\n\t\tlong x = n;\n\t\tif (x > 0) {\n\t\t\tlong msw = get(x - 1) & 0xffffffffL;\n\t\t\tx = (x - 1) * BPU;\n\t\t\tx = x & 0xffffffffL;\n\t\t\tlong w = BPU;\n\t\t\tdo {\n\t\t\t\tw >>= 1;\n\t\t\t\tif (msw >= ((1 << w) & 0xffffffffL)) {\n\t\t\t\t\tx += w;\n\t\t\t\t\tx = x & 0xffffffffL;\n\t\t\t\t\tmsw >>= w;\n\t\t\t\t}\n\t\t\t} while (w > 8);\n\t\t\tx += bittab[(int) msw];\n\t\t\tx = x & 0xffffffffL;\n\t\t}\n\t\treturn x;\n\t}", "public static int[] countbits(int n) {\n // res[i] denotes set bits in i\n int[] res = new int[n + 1];\n // set bits in 0 is 0\n res[0] = 0;\n\n // we fill up the table in bottom up manner\n for (int i = 1; i <= n; i++) {\n // if the number is odd then the no. of set bits in it will be 1 + no. of set\n // bits in i/2;\n if (i % 2 != 0) {\n res[i] = 1 + res[i / 2];\n }\n // if the no. is even then the number of set bits will be equal to set in in i/2\n else {\n res[i] = res[i / 2];\n }\n }\n\n // return the final array\n return res;\n }", "static int bitLen(int w)\n {\n // Binary search - decision tree (5 tests, rarely 6)\n return (w < 1 << 15 ? (w < 1 << 7\n ? (w < 1 << 3 ? (w < 1 << 1\n ? (w < 1 << 0 ? (w < 0 ? 32 : 0) : 1)\n : (w < 1 << 2 ? 2 : 3)) : (w < 1 << 5\n ? (w < 1 << 4 ? 4 : 5)\n : (w < 1 << 6 ? 6 : 7)))\n : (w < 1 << 11\n ? (w < 1 << 9 ? (w < 1 << 8 ? 8 : 9) : (w < 1 << 10 ? 10 : 11))\n : (w < 1 << 13 ? (w < 1 << 12 ? 12 : 13) : (w < 1 << 14 ? 14 : 15)))) : (w < 1 << 23 ? (w < 1 << 19\n ? (w < 1 << 17 ? (w < 1 << 16 ? 16 : 17) : (w < 1 << 18 ? 18 : 19))\n : (w < 1 << 21 ? (w < 1 << 20 ? 20 : 21) : (w < 1 << 22 ? 22 : 23))) : (w < 1 << 27\n ? (w < 1 << 25 ? (w < 1 << 24 ? 24 : 25) : (w < 1 << 26 ? 26 : 27))\n : (w < 1 << 29 ? (w < 1 << 28 ? 28 : 29) : (w < 1 << 30 ? 30 : 31)))));\n }", "private int xtimes(int x){\r\n\t\tx = x << 1;\r\n\t\tif(x >= 0x100)\r\n\t\t\tx = x ^ 0x14d;\r\n\t\treturn x;\r\n\t}", "private static int setBits(int n) {\r\n int highestBitValue = 1;\r\n int c = 0;\r\n\r\n while (highestBitValue < n) {\r\n highestBitValue = highestBitValue * 2;\r\n }\r\n\r\n \r\n int currentBitValue = highestBitValue;\r\n while (currentBitValue > 0) {\r\n if (currentBitValue <= n) {\r\n\r\n n -= currentBitValue;\r\n c++;\r\n }\r\n currentBitValue = currentBitValue / 2;\r\n }\r\n\r\n return c;\r\n }", "public static void main(String[] args) {\r\n\r\n\t\tint n=439;\r\n\r\n\t\tint count = 1;\r\n\t\tint binary[] = new int[32];\r\n\t\tint i = 0;\r\n\t\twhile (n > 0) {\r\n\t\t\tbinary[i] = n % 2;\r\n\t\t\tn = n / 2;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\r\n\t\t\tString str = String.valueOf(i);\r\n\t\t\t\r\n\t\tString ar[]=str.split(\"0\");\r\n\t\t\t\r\n\t\tif(ar.length>1)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/*\t\r\n\t\t\tif (binary[j] == 1 && binary[j + 1] == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.print(binary[j]);\r\n*/\r\n\t\t}\r\n\t\tSystem.out.print(count);\r\n\t\t/*scanner.close();*/\r\n\t}", "private int bitToInt(char bit) {\n return bit == '0' ? 0 : 1;\n }", "static int[] countBits(int num){\n\t\t\n\t\tint[] result = new int[num+1];\n\t\t\n\t\tfor(int i = 0 ; i <= num; i++){\n\t\t\tresult[i] = countEach(i);\n\t\t\tSystem.out.print(result[i]+\" \");\n\t\t}\n\t\treturn result;\n\t}", "public static int getBitsNumber(int n) {\r\n\t\treturn (int) (Math.log(n) / Math.log(2.0) + 0.9999);\r\n\t}", "private int bigv_bitcount(int [] ix, EChannel gi) {\n\t\tint bits = 0;\n\n\t\tif ( gi.window_switching_flag != 0 && gi.block_type == 2 ) {\n\t\t\t/*\n Within each scalefactor band, data is given for successive\n time windows, beginning with window 0 and ending with window 2.\n Within each window, the quantized values are then arranged in\n order of increasing frequency...\n\t\t\t */\n\t\t\tint sfb = 0, window, line, start, end;\n\n\t\t\tif ( gi.mixed_block_flag != 0 ) {\n\t\t\t\tint tableindex;\n\n\t\t\t\tif ( (tableindex = gi.table_select[0]) != 0 )\n\t\t\t\t\tbits += count_bit( ix, 0, gi.address1, tableindex );\n\t\t\t\tsfb = 2;\n\t\t\t}\n\n\t\t\tfor ( ; sfb < 13; sfb++ ) {\n\t\t\t\tint tableindex = 100;\n\n\t\t\t\tstart = scalefac_band_short[ sfb ];\n\t\t\t\tend = scalefac_band_short[ sfb+1 ];\n\n\t\t\t\tif ( start < 12 )\n\t\t\t\t\ttableindex = gi.table_select[ 0 ];\n\t\t\t\telse\n\t\t\t\t\ttableindex = gi.table_select[ 1 ];\n\n\t\t\t\tbits += count_bit_short(ix, start, end, tableindex);/*\n for ( line = start; line < end; line += 2 ) {\n for ( window = 0; window < 3; window++ ){\n x = (ix[line * 3 + window ]);\n y = (ix[(line + 1) * 3 + window]);\n\n // x = (i192_3[ line ][ window ]);\n // y = (i192_3[ line + 1 ][ window]);\n\n bits += HuffmanCode( tableindex, x, y );\n }\n }*/\n\t\t\t}\n\t\t} else {\n\n\t\t\tint table;\n\n\t\t\tif( (table = gi.table_select[0] )>=0) // region0\n\t\t\tbits += count_bit(ix, 0, gi.address1, table );\n\t\t\tif( (table = gi.table_select[1])>=0) // region1\n\t\t\t\tbits += count_bit(ix, gi.address1, gi.address2, table );\n\t\t\tif( (table = gi.table_select[2])>=0) // region2\n\t\t\t\tbits += count_bit(ix, gi.address2, gi.address3, table );\n\t\t}\n\n\t\treturn bits;\n\t}", "public int countBinarySubstrings(String s) {\n\t int total = 0;\n\t for (int i=0; i < s.length(); i++) {\n\t for (int len=2; i+len <= s.length(); len +=2) {\n\t int zeroes=0, ones=0;\n\t for (int j=i; j < i+len; j++) {\n\t if (s.charAt(j) == '1') {\n\t ones ++;\n\t } else {\n\t zeroes++;\n\t }\n\t }\n\t if (zeroes != 0 && zeroes == ones) {\n\t total++;\n\t }\n\t }\n\t }\n\t return total;\n\t }", "@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }", "public int countBinarySubstrings(String s) {\n int result = 0;\n int[] count = new int[2];\n int cur = s.charAt(0) - '0';\n count[cur]++;\n for (int i = 1; i < s.length(); i++) {\n \tchar c = s.charAt(i);\n \tif (c - '0' == cur) count[cur]++;\n \telse {\n \t\tresult += Math.min(count[0], count[1]);\n \t\tcur = c - '0';\n \t\tcount[cur] = 1;\n \t}\n }\n result += Math.min(count[0], count[1]);\n return result;\n }", "public int[] countBits(int num) {\n int[] res = new int[num + 1];\n res[0] = 0;\n \n for(int i = 1; i <= num; i++){\n if(i % 2 == 0){\n //if i is even then last bit is zero\n //i : 101010101010\n //i >> 1: 10101010101\n //ans for res[i] is same as res[i >> 1]\n res[i] = res[i >> 1];\n }\n else{\n //if i is odd then the last bit is one\n //so answer for res[i] is same as res[i-1] which is the prev num(i.e a even number) + 1\n res[i] = res[i - 1] + 1;\n }\n }\n return res;\n }", "BigInteger getCount();", "private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}", "static int findBinaryStringBrutForce(int[] arr){\n int numOfZeros;\n int numOfOnes;\n int maxLength = 0;\n for(int i=0; i<arr.length; i++) {\n numOfZeros=0;\n numOfOnes=0;\n for(int j=i; j<arr.length; j++) {\n if(arr[j] == 0)\n numOfZeros++;\n else\n numOfOnes++;\n if( numOfZeros == numOfOnes )\n maxLength = Math.max(maxLength, numOfZeros*2 );\n }\n }\n return maxLength;\n }", "public int countBinarySubstrings(String s) {\n\n int pre = 0, cur = 1, res = 0;\n for (int i = 1; i < s.length(); i++) {\n if (s.charAt(i) == s.charAt(i - 1)) {\n cur++;\n } else {\n res += Math.min(cur, pre);\n pre = cur;\n cur = 1;\n }\n }\n res += Math.min(cur, pre);\n return res;\n }", "public static int countOne(int number) {\r\n\t\tint count = 0;\r\n\t\tfor (int i = 0; i < 32; i++) {\r\n\t\t\tif ((number & 1) == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tnumber = number >>> 1;\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public void binarycon()\n \t {\n\n\t int i,j,k,t;\n \t int temp[]=new int[10];\n\t int m=0;\n for(i=0;i<600000;i++)\n binary[i]=0;\n int b[]=new int[32];\n int dum;\n dum=max;\n i=0;\n while(dum!=0)\n {\n b[i]=dum%2;\n i=i+1;\n dum/=2;\n }\n j=24-i;\n for(k=j,t=i-1;k<(i+j);k++,t--)\n binary[k]=b[t];\n dum=73;\n i=0;\n while(dum!=0)\n {\n b[i]=dum%2;\n i=i+1;\n dum/=2;\n }\n j=32-i;\n for(k=j,t=i-1;k<32;k++,t--)\n binary[k]= b[t];\n m=32;\n for( i=0 ; i < max ; i++)\n \t {\n j=0;\n while( bytes[i]!= 0 )\n {\n temp[j++]=bytes[i]%2;\n bytes[i]=bytes[i]/2;\n\n\n\n }\n for( k=0;k<8-j ; k++)\n binary[m++]=0;\n for(k=j-1; k >=0 ; k--)\n binary[m++]=temp[k];\n }\n \t maxbinary=m;\n }", "int count_bit_short( int [] ix, int start, int end, int table ) {\n\t\tint i, sum;\n\t\tint x,y;\n\n\t\tif(table < 0 || table > 34)\n\t\t\treturn 0;\n\n\t\tsum = 0;\n\n\t\tint ylen = this.ylen[table];\n\t\tint linbits = this.linbits[table];\n\n\t\tfor ( int line = start; line < end; line += 2 ) {\n\t\t\tfor ( int window = 0; window < 3; window++ ){\n\t\t\t\tx = Math.abs(ix[line * 3 + window ]);\n\t\t\t\ty = Math.abs(ix[(line + 1) * 3 + window]);\n\n\t\t\t\tif(table > 15){\n\n\t\t\t\t\tif(x > 14) {\n\t\t\t\t\t\tx = 15;\n\t\t\t\t\t\tsum += linbits;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(y > 14) {\n\t\t\t\t\t\ty = 15;\n\t\t\t\t\t\tsum += linbits;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsum += hlen[table][(x*ylen)+y];\n\t\t\t\tif(x!=0) sum++;\n\t\t\t\tif(y!=0) sum++;\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public static int countBits(int[] data) {\n\t\tint sum = 0;\n\t\tfor (int d : data) {\n\t\t\tfor (int i = 0; i < 32; i++) {\n\t\t\t\tsum += (d & (1 << i)) > 0 ? 1 : 0;\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public int countDigitOne(int n) {\n int res = 0;\n for(long i = 1 ; i <= n; i *= 10){\n long k = n/i, r = n % i;\n res += (k + 8) / 10 * i + ((k%10 == 1)?(r+1):0);\n }\n return res;\n }", "int getHighBitLength();", "private static byte int2(int x) { return (byte)(x >> 16); }", "public static long nextPowerOfTwo(long x) {\n if (x == 0) return 1;\n x--;\n x |= x >> 1;\n x |= x >> 2;\n x |= x >> 4;\n x |= x >> 8;\n x |= x >> 16;\n return (x | x >> 32) + 1;\n }", "private int positiveBinToInt(String binary) {\n int w = 0;\n for (int i = binary.length() - 1, j = 0; i > 0; i--, j++) {\n w += (int) Math.pow(2, j) * bitToInt(binary.charAt(i));\n }\n return w;\n }", "private int Sum1(int x) {\n int a = ROTR(6, x);\n int b = ROTR(11, x);\n int c = ROTR(25, x);\n int ret = a ^ b ^ c;\n return ret;\n }", "public static void main(String[] args) {\n\t\tint x = ~0;\r\n\t\tSystem.out.println(Integer.toBinaryString(x));\r\n\t\tint y = x>>>8;\r\n\t\tSystem.out.println(Integer.toBinaryString(y));\r\n\t\tSystem.out.println(x+\" \"+y);\r\n\t\t\r\n\t\tint N = 1<<31;\r\n\t\tint M = 0b11;\r\n\t\tint j=2;\r\n\t\tint i=1;\r\n\t\tSystem.out.println(Integer.toBinaryString(N));\r\n\t\tSystem.out.println(Integer.toBinaryString(M));\r\n\t\tSystem.out.println(Integer.toBinaryString(insertMIntoNFromJtoI(M, N, j, i)));\r\n\t\t\r\n\t}", "public static int getBitMask(int x) {\n return (0x01 << x);\n }", "public static int stringToBits(String s) {\n if (s.length() > 32) throw new RuntimeException(\"Cannot handle more than 32 bits. input='\" + s + \"'\");\n\n int retVal = 0;\n for (int i = 0; i <= (s.length() - 1); i++) {\n if (s.charAt(i) == '1') {\n retVal = retVal + 1;\n }\n if (i < (s.length() - 1))\n retVal <<= 1;\n }\n return retVal;\n }", "public static int convertToBinary(int input)\n {\n /*create a variable for remainder of input divided by 2 (will be either 0 or 1);\n this is the least significant digit of the binary string\n */\n int remainder = input % 2; \n \n //base case, return input if input is 0 or 1 (smallest two possibilities)\n if (input == 0 || input == 1) \n return input; \n \n /* if input is not 0 or 1, then return remainder + (value returned by \n convertToBinary(input/2) multiplied by ten); note that if there are n \n recursive method calls, then the return value of the final recursive \n method call is the value of the bit in the 2^ns place; when the stack is \n popped, that value is then multiplied by ten in order to move it one position\n leftward (because this method technically returns a base ten integer, and we\n are simply interpreting it as a binary string), and then the remainder is added to \n give the value of the least significant bit, and this process repeats until\n the initial method call is reached, at which point the remainder is the \n least significant bit\n */\n \n else\n { \n //System.out.println(\"\\nreturn \" + remainder + \" + convert(\"+input/2+\") * 10\");\n return remainder + (convertToBinary(input/2)*10);\n }\n \n }", "String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }", "public static int decimalToBinary(int s){\n\t\tString result=\"\";\n\t\tif (s<=0){\n\t\t\treturn 0;\n\t\t}\n\t\tfor (int i = 2; s> 0; s/=2){\n\t\t\tresult=result + s%2; \n\t\t}\n\t\tString p1= \"\";\n\t\tfor (int i=0; i<result.length(); i++){\n\t\t\tString l=result.substring(i, i+1);\n\t\t\tp1=p1+l;\n\t\t}\n\t\t\n\t\treturn lib.Change.StringToInt(p1, -1);\n\t\n\t}", "public static int countBinaryStrings(int i)\n {\n if (i==1) //f1\n { return 2;\n }\n if (i==2) //f2\n { return 3;\n }\n return countBinaryStrings(i-1) + countBinaryStrings(i-2); //fn= fn-1 + fn-2\n }", "public static int sizeBits_counter() {\n return 32;\n }", "static void countChanLe(int [] x) {\n\t\tint countC = 0;\n\t\tint countL = 0;\n\t\t\n\t\tfor(int i = 0 ; i < x.length ; i++) {\n\t\t\tif(x[i] % 2 == 0) {\n\t\t\t\tcountC++;\n\t\t\t}\telse {\n\t\t\t\tcountL++;\n\t\t\t\t}\n\t\t}\n\t\tSystem.out.printf(\"Mang co so so chan la: %d, Co so so le la %d\\n \",countC,countL);\n\t}", "private int intLength() {\n return (bitLength() >>> 5) + 1;\n }", "@Ignore\n @Test\n public void testgetMostSignificantSevenBits() {\n final int v = MidiReceiver.getMsbOf14ValidBits(0b11111111);\n assertEquals(0b1, v);\n }", "public int decToBin(int input) {\r\n\t String Binary = Integer.toBinaryString(input);\t\r\n\t\treturn Integer.valueOf(Binary);\t\t\r\n\t}", "private static int toDecimal(String binary) {\n\t\tint decimal = 0;\n\n\t\tfor(int i = binary.length()-1; i >= 0; i--) {\n\t\t\tif(i == 4) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 1;}\n\t\t\t}\n\t\t\telse if(i == 3) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 2;}\n\t\t\t}\n\t\t\telse if(i == 2) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 4;}\n\t\t\t}\n\t\t\telse if(i == 1) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 8;}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 16;}\n\t\t\t}\n\t\t}\n\n\t\treturn decimal;\n\t}", "public int numSetBits1(long a) {\n int count=0;\n while (a>0){\n count++;\n a = a & (a-1); //(x & (x - 1)) will unset the last set bit in x (which is why x&(x-1) is 0 for powers of 2).\n }\n\n return count;\n\t}", "public int hexToBin(String input) {\r\n\t\treturn Integer.valueOf(new BigInteger(input, 16).toString(2));\t\t\r\n\t}", "private int Sigma1(int x) {\n int a = ROTR(17, x);\n int b = ROTR(19, x);\n int c = x >>> 10;\n int ret = a ^ b ^ c;\n return ret;\n }", "static\nint\ncountSeq(\nint\nn, \nint\ndiff) \n{ \n\n// We can't cover difference of more \n\n// than n with 2n bits \n\nif\n(Math.abs(diff) > n) \n\nreturn\n0\n; \n\n\n// n == 1, i.e., 2 bit long sequences \n\nif\n(n == \n1\n&& diff == \n0\n) \n\nreturn\n2\n; \n\nif\n(n == \n1\n&& Math.abs(diff) == \n1\n) \n\nreturn\n1\n; \n\n\nint\nres = \n// First bit is 0 & last bit is 1 \n\ncountSeq(n-\n1\n, diff+\n1\n) + \n\n\n// First and last bits are same \n\n2\n*countSeq(n-\n1\n, diff) + \n\n\n// First bit is 1 & last bit is 0 \n\ncountSeq(n-\n1\n, diff-\n1\n); \n\n\nreturn\nres; \n}", "public void count(int x) {\n\t\tif (x > 0) {\n\t\t\tint last_out;\n\t\t\tif (x % 2 == 1){\n\t\t\t\tlast_out = x;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlast_out = x-1;\n\t\t\t}\n\t\t\tfor (int i = 1; i < last_out; i++) {\n\t\t\t\tif (i % 2 == 1) {\n\t\t\t\t\tSystem.out.println(i + \"...\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(last_out + \"!\");\n\t\t}\n\t}", "int next(int bits);", "String getIndexBits();", "public int solution(int N) {\n String n = Integer.toBinaryString(N);\n char[] cn = n.toCharArray();\n int cnt = 0;\n int ans = 0;\n for(char c: cn) {\n if(c == '0') {\n cnt++;\n } else {\n if(ans < cnt) {\n ans = cnt;\n } \n cnt = 0;\n }\n }\n return ans;\n }", "static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}", "public int count_decoding_improved(char[] digits, int n){\n// if(n==0 || n==1)\n// return 1;\n\n int[] count = new int[n+1];\n\n count[0] = 1;\n count[1] = 1;\n //int count = 0;\n\n for(int i = 2; i <= n; i++){\n if(digits[i-1] > '0')\n count[i] = count[i-1];\n\n if(digits[i-2]=='1' || digits[i-2] == '2' && digits[i-1] < '7')\n count[i] += count[i-2];\n }\n\n\n\n return count[n];\n }", "public int[] countBits(int num) {\n int[] m = new int[num+1];\n for (int i = 1; i <= num; i++) {\n m[i] = m[i/2] + (i & 1);\n }\n return m;\n }", "public static int hammingWeight(int n) {\n if(n == 0) return 0;\n\n String s = n + \"\";\n int counter = 0;\n char[] chars = s.toCharArray();\n for(int i = 0; i < chars.length; i++)\n {\n if(chars[i] == '1')\n {\n counter++;\n }\n }\n return counter;\n }", "public static int getSumFrom1toX (int x){\n int sum = 0 ;\n for (int i = 1; i <=x ; i++) {\n sum += i ;\n\n }\n return sum ;\n\n }", "private static int numBytesFromBits(int bits) {\n \t\treturn (bits + 7) >> 3;\n \t}", "public static String num2Bin(int a) {\n StringBuilder sb = new StringBuilder();\n for (int bitPow2 = 1, i = 0; i < Integer.SIZE; bitPow2 <<= 1,\n ++i) {\n if ((a & bitPow2) == bitPow2) {\n sb.append(\"1\");\n } else {\n sb.append(\"0\");\n }\n }\n return sb.reverse().toString();\n }", "public abstract int getBitSize();", "private static String hexDigit(byte x) {\n StringBuffer sb = new StringBuffer();\n char c;\n c = (char) ((x >> 4) & 0xf);\n if (c > 9) {\n c = (char) ((c - 10) + 'a');\n } else {\n c = (char) (c + '0');\n }\n sb.append(c);\n c = (char) (x & 0xf);\n if (c > 9) {\n c = (char) ((c - 10) + 'a');\n } else {\n c = (char) (c + '0');\n }\n sb.append(c);\n return sb.toString();\n }", "public int numSetBits(long a) {\n\t \n\t \tint count = 0;\n\t\twhile(a > 0) {\n\t\t\t\n\t\t\tif((a & 1) == 1) {// a & 1 == 1 if lsb is 1\n\t\t\t\n\t\t\t\tcount = count+1;\n\t\t\t}\n\t\t a = a >> 1; // right shift LSB by 1 to underflow 1 in LSB\n\t\t}\t\t\n\t\treturn count;\n\t}", "public static int binaryToDecimal(int s){\n\t\tint multiplier= 1;\t\n\t\tint result=0;\n\t\twhile(s>0){\n\t\t\tint binaryDigit= s%10;\n\t\t\tresult= result+ binaryDigit*multiplier;\n\t\t\tmultiplier= multiplier*2; \n\t\t\ts= s/10;\n\t\t} \n\t\treturn result;\n\t}", "private int Sigma0(int x) {\n int a = ROTR(7, x);\n int b = ROTR(18, x);\n int c = x >>> 3;\n int ret = a ^ b ^ c;\n return ret;\n }", "public static int offsetBits_counter() {\n return 8;\n }", "@Test\n public void computeDigits()\n {\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 1.0));\n assertEquals(1, BinaryEncoder.computeDigits(1.0, 1.0));\n assertEquals(1, BinaryEncoder.computeDigits(2.0, 1.0));\n assertEquals(2, BinaryEncoder.computeDigits(3.0, 1.0));\n assertEquals(2, BinaryEncoder.computeDigits(4.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(4.5, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(5.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(6.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(7.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(8.0, 1.0));\n assertEquals(4, BinaryEncoder.computeDigits(9.0, 1.0));\n\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 0.1));\n assertEquals(4, BinaryEncoder.computeDigits(1.0, 0.1));\n assertEquals(5, BinaryEncoder.computeDigits(2.0, 0.1));\n assertEquals(5, BinaryEncoder.computeDigits(3.0, 0.1));\n assertEquals(6, BinaryEncoder.computeDigits(4.0, 0.1));\n\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 0.01));\n assertEquals(7, BinaryEncoder.computeDigits(1.0, 0.01));\n assertEquals(8, BinaryEncoder.computeDigits(2.0, 0.01));\n assertEquals(9, BinaryEncoder.computeDigits(3.0, 0.01));\n assertEquals(9, BinaryEncoder.computeDigits(4.0, 0.01));\n\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(1.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(2.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(3.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(4.0, 10.0));\n assertEquals(2, BinaryEncoder.computeDigits(30.0, 10.0));\n assertEquals(2, BinaryEncoder.computeDigits(40.0, 10.0));\n }", "public int countOfOnes() {\r\n\t\tbyte one = (byte) 1;\r\n\t\tint count = 0;\r\n\r\n\t\tfor (byte b : values) {\r\n\t\t\tif (b == one) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count;\r\n\t}", "private int Sum0(int x) {\n int a = ROTR(2, x);\n int b = ROTR(13, x);\n int c = ROTR(22, x);\n int ret = a ^ b ^ c;\n return ret;\n }", "private int nn(int x)\n {\n return x > 0 ? 1 : 0;\n }", "private int updataChessBoardScoreBinary(Point x, final int[][] chessData,\r\n\t\t\tint color) {\n\t\tint res = 0;\r\n\t\tint combo = 0;\r\n\t\t// System.out.println(\"\"+x.x+\",\"+x.y);\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tLineState pre = getLineStateBinary(x, chessData, i, color, 2, true);\r\n\t\t\tLineState las = getLineStateBinary(x, chessData, i + 4, color, 2,\r\n\t\t\t\t\tfalse);\r\n\r\n\t\t\tint ax = (pre.line << (las.length)) | las.line;\r\n\t\t\tint buf[] = tanslateStateToScoreBinary(new LineState(ax, las.length\r\n\t\t\t\t\t+ pre.length));\r\n\t\t\tres += calculateScore2(buf);\r\n\t\t\tcombo += buf[0] < 0 ? buf[0] : 0;\r\n\r\n\t\t}\r\n\t\tcombo *= -1;\r\n\t\tres += combo > 600 ? combo : 0;\r\n\t\t// System.out.println(\"res:\"+res);\r\n\t\treturn res;\r\n\r\n\t}", "private static String convertP(int value)\n {\n String output = Integer.toBinaryString(value);\n\n for(int i = output.length(); i < 6; i++) // pad zeros\n output = \"0\" + output;\n\n return output;\n }", "static boolean isBitPalindrome(int x) {\n\t\tint y = 0, count = 0;\n\n\t\t// count the # of effectively bits of x\n\t\tint t = x;\n\t\twhile (t != 0) {\n\t\t\tt >>= 1;\n\t\t\tcount++;\n\t\t}\n\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\t// left move y for the next bit\n\t\t\ty <<= 1;\n\t\t\t// the least significant bit of x is 1, then update y's.\n\t\t\tSystem.out.printf(\"x & 1 [%d]: %d y:%d\\n\", i, x & 1, y);\n\t\t\tif ((x & 1) > 0) { // remeber & operator should in parentheses\n\t\t\t\ty |= 1;\n\t\t\t}\n\t\t\t// decrease x, e.g. 11001 -> 1100\n\t\t\tx >>= 1;\n\n\t\t\t// Since x is keep decreasing and y is keep increasing, we can but\n\t\t\t// the loop early once x <= y\n\t\t\tif (x <= y)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (count % 2 != 0)\n\t\t\ty >>= 1;\n\n\t\tSystem.out.println(x + \" \" + y);\n\t\treturn x == y;\n\t}", "private int rs(final int x) {\n assert(! leaf(x));\n return Math.min(2*x+2, n);\n }", "public static boolean bitTester(int x, int k) {\n\t\tx = x >> k;\n\t\treturn (x & 1) == 1; // x's kth bit\n\t}", "public int findIntegers(int n) {\n int[][]template=new int[32][2];\n\n //when the max length the array is one, we know that whether the max bit is one or zero, the arr value is 1\n template[1][0]=1;\n template[1][1]=1;\n\n for (int i = 2; i < 32; i++) {\n template[i][0]=template[i-1][0]+template[i-1][1];\n template[i][1]=template[i-1][0];\n }\n\n int answ=0;\n int pre=0;\n\n //we need to change n to binary expression\n List<Integer>binaryExpression=new ArrayList<>();\n int current=n;\n while (current!=0)\n {\n binaryExpression.add(current&1);\n current=current>>1;\n }\n for (int i = binaryExpression.size()-1; i>=0; i--) {\n Integer currentBit = binaryExpression.get(i);\n for (int j = 0; j < currentBit; j++) {\n answ+=template[i+1][j];\n }\n if (currentBit==1&&pre==1)\n {\n break;\n }\n pre=currentBit;\n if (i==0)\n {\n answ++;\n }\n }\n return answ;\n }", "@Test\n public void calculationOnElevenDigitMsgIsCorrect() {\n final String msg = \"00110001110\";\n final int[] expectedMsg = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n\n // When\n int[] transformedMsg = HammingAlgorithm.calculate(msg);\n\n // Then\n assertThat(transformedMsg).isEqualTo(expectedMsg);\n }", "int getBitAsInt(int index);", "public int getAnalysisBits();", "public static int countLE(Node n, int x) {\n if (n == null) return 0;\n if (n.parent != null && n.parent.left == n && n.parent.v <= x) {\n return n.count;\n } else {\n int ret = countLE(n.left, x);\n if (n.v <= x) ret += n.dup;\n if (n.v < x) ret += countLE(n.right, x);\n return ret;\n }\n }", "public static int binaryToDecimal(long number){\n int result = 0;\n int length = String.valueOf(number).length();\n for (int i = 0; i < length; i++) {\n //take the last number and multiply it by 2^(0,1,2,3,4,5)\n result+=(number%10)*Math.pow(2,i);\n //just make it less by one point dividing by 10\n number/=10;\n }\n return result;\n }", "public static int voltear(int x){\r\n int numReves = 0;\r\n \r\n while (x > 0) {\r\n numReves = (numReves * 10) + (x % 10);\r\n x = x / 10;\r\n }\r\n \r\n return numReves;\r\n }", "public static void main(String[] args) {\r\n\r\n\t\tint N = 15;\r\n\t\tint reminder;\r\n\t\tint temp = 0;\r\n\t\tStringBuilder binaryValue = new StringBuilder();\r\n\t\tfor (int i = 0; N != 1; i++) {\r\n\t\t\treminder = N % 2;\r\n\r\n\t\t\tN = N / 2;\r\n\t\t\tbinaryValue = binaryValue.append(reminder);\r\n\t\t}\r\n\t\tif (N == 1) {\r\n\t\t\tbinaryValue.append(1);\r\n\t\t}\r\n\r\n\t\tbinaryValue = binaryValue.reverse();\r\n\t\t\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < binaryValue.length(); i++) {\r\n\r\n\t\t\tif (binaryValue.charAt(i)=='1') {\r\n\t\t\t\tif (counter > temp) {\r\n\t\t\t\t\ttemp = counter;\r\n\t\t\t\t}\r\n\t\t\t\tcounter = 0;\r\n\t\t\t} else {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t if(temp==0) {\r\n\t\t\t System.out.println(\"No Binary space\");\r\n\t\t }else {\r\n\t\t\t System.out.println(\"Binary space of given number is \" + temp); \r\n\t\t }\r\n\t\t\r\n\t}", "private int convertBinaryToDecimal(int binaryValueOfBitMap){\r\n\t\r\n\tint decimalValue = 0;\r\n\ttry {\r\n\t\t int num = binaryValueOfBitMap; \r\n\t\t int dec_value = 0; \t\t \r\n\t\t // Initializing base \r\n\t\t // value to 1, i.e 2^0 \r\n\t\t int base = 1; \r\n\t\t \r\n\t\t int temp = num; \r\n\t\t while (temp > 0) \r\n\t\t { \r\n\t\t int last_digit = temp % 10; \r\n\t\t temp = temp / 10; \r\n\t\t \r\n\t\t dec_value += last_digit * base; \r\n\t\t \r\n\t\t base = base * 2; \r\n\t\t } \r\n\t\t decimalValue = dec_value;\r\n\t}\r\n\tcatch(Exception e) {\r\n\t\tSystem.out.println(\"Exception occurred \"+e);\r\n\r\n\t}\r\n\treturn decimalValue;\r\n\t\t\r\n}", "public int bitAt(int i) {\n // PUT YOUR CODE HERE\n }", "public static int toInteger(BitSet bits) {\n int i, value;\n value = 0;\n i = bits.nextSetBit(0);\n while (i >= 0) {\n value += Math.pow(2, i);\n i = bits.nextSetBit(i + 1);\n }\n return value;\n }", "int getLowBitLength();", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n int int0 = JavaCharStream.hexval('b');\n assertEquals(11, int0);\n }" ]
[ "0.65348864", "0.63511753", "0.63481236", "0.62826127", "0.6260107", "0.6255478", "0.6244229", "0.6170179", "0.61675453", "0.61420065", "0.6113849", "0.61088854", "0.60984623", "0.60852915", "0.60752445", "0.60017776", "0.59986407", "0.598645", "0.5962516", "0.595966", "0.5950169", "0.59404945", "0.5903516", "0.58623976", "0.58518714", "0.5843069", "0.5842345", "0.5839915", "0.5838005", "0.58334196", "0.58024347", "0.5727947", "0.57085186", "0.56823385", "0.5677585", "0.56600875", "0.5654752", "0.5653154", "0.5652735", "0.5641923", "0.5630522", "0.5627071", "0.5626523", "0.561525", "0.5606167", "0.5604157", "0.55960405", "0.55870694", "0.55825096", "0.55755275", "0.5564795", "0.55472153", "0.5546366", "0.55458474", "0.55423814", "0.5540633", "0.5535369", "0.55331403", "0.5528239", "0.5528129", "0.5524647", "0.55239344", "0.5514526", "0.5497649", "0.54958045", "0.5486562", "0.5481974", "0.54781836", "0.54780436", "0.5462943", "0.54586095", "0.5457024", "0.5456272", "0.5430854", "0.54275465", "0.5425889", "0.5423428", "0.5416276", "0.5415768", "0.54144526", "0.5413101", "0.54120314", "0.54054946", "0.5405029", "0.540287", "0.5398601", "0.53943926", "0.53813", "0.53652316", "0.5355513", "0.5354995", "0.5353669", "0.5335968", "0.5332513", "0.533012", "0.5324642", "0.5318908", "0.53162754", "0.53108305", "0.53076035", "0.5298785" ]
0.0
-1
Get the items to list
public Item[] getItems() { return items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Item> getItemList();", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "Object getTolist();", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "java.util.List<java.lang.Integer> getItemsList();", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "java.util.List<java.lang.Integer> getItemList();", "public List<Item> getItems(){\n\t\treturn data;\n\t}", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public List getList();", "public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }", "public List<T> getItems() {\n return SerDes.unmirrorList(getElement().getItems(), getItemClass());\n }", "private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }", "public ArrayList<Item> getItems() {\r\n\t\titems.clear();\r\n\t\tCursor cursor = db.query(SkyleConstants.TABLE_ITEMS, allColumns, null, null, null, null, null);\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\twhile (!cursor.isAfterLast()) {\r\n\t\t\tString ID = cursor.getString(cursor.getColumnIndex(SkyleConstants.KEY_ID));\r\n\t\t\tString type = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_TYPE));\r\n\t\t\tString date = cursor.getString(cursor.getColumnIndex(SkyleConstants.DATE_NAME));\r\n\t\t\tString path = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_PATH));\r\n\t\t\t\r\n\t\t\tLog.i(TAG, \"elements: \"+type+\", \"+path);\r\n\t\t\t\r\n\t\t\tItem item = new Item(ID, type, date, path);\t\t\t\r\n\t\t\titems.add(item);\r\n\t\t\tcursor.moveToNext();\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tLog.i(TAG, \"arraylist: \"+items.toString());\r\n\t\treturn items;\r\n\t}", "public Item[] getList() {\n\t\treturn list;\n\t}", "public String[] listItems() {\n \n\t\tif (itemCount==0) {\n\t\t\tSystem.out.println(\"\\tNo items available.\\n\");\n\t\t}\n\t\telse {\n\t\t\tfor(int index = 1; index<=itemCount; index++) {\n VendItem s = stock[index-1];\n itemList[index-1]=(s.getName());\n\t\t\t}\n System.out.println();\n \n }\n return itemList;\n\n }", "ArrayList<IItem> getItems(Position position);", "java.util.List<java.lang.String> getContentsList();", "java.util.List<java.lang.String>\n getQueryItemsList();", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "public Object[] getItems()\n {\n return items.toArray();\n }", "@SuppressWarnings (\"rawtypes\") public java.util.List getItems(){\n return this.items;\n }", "public List<T> items() {\n return items;\n }", "public List<Items> list() {\n\t\treturn itemDao.list();\r\n\t}", "public List<GeneralItem> getList() {\n return stList;\n }", "public List<TaskItemBean> getItemList(){\n return itemList;\n }", "com.rpg.framework.database.Protocol.Item getItems(int index);", "public List<Item> getAllItemsAvailable();", "public ArrayList<Collectable> getItems(){\n return items;\n }", "@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}", "public List<Item> listItems() {\n return this.items;\n }", "protected Object[] getList() {\n return list;\n }", "public List<SubItem> getListaItems() {\n\t\tfecha = new Date();\n\t\tcargarDatosLogeado();\n\t\tTimestamp fecha_ahora = new Timestamp(fecha.getTime());\n\t\tList<SubItem> a = managergest.findItems();\n\t\tList<SubItem> l1 = new ArrayList<SubItem>();\n\t\tfor (SubItem t : a) {\n\t\t\tif (t.getItemGanadorDni() == null && t.getItemEstado().equals(\"A\")\n\t\t\t\t\t&& t.getItemFechaSubastaFin().after((fecha_ahora)))\n\t\t\t\tl1.add(t);\n\t\t}\n\t\treturn l1;\n\t}", "public ArrayList<Item> getAllItems(){\n\t\treturn itemList; \n\t}", "protected List<View> getItems() {\n return items;\n }", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "List<Item> getItems(IDAOSession session);", "public List<Item> getItems() {\n return items;\n }", "public List<Item> getItems() {\n return items;\n }", "private String getItems(long listid){\n \tString theItems = \"\";\n \titemDbAdapter.open();\n \titemCursor = itemDbAdapter.fetchAllItemsFromList(LIST_ID);\n startManagingCursor(itemCursor);\n int cursorRows = itemCursor.getCount();\n \n for ( int i = 0; i < cursorRows; i++) {\n \titemCursor.moveToPosition(i);\n \tString title = itemCursor.getString(itemCursor.getColumnIndexOrThrow(ItemsDbAdapter.KEY_TITLE));\n \ttheItems = theItems + title + \"\\n\";\n }\n \titemDbAdapter.close();\n \treturn theItems;\n }", "public List<K> getItems() {\n\t\t\treturn items;\n\t\t}", "public Item[] getItems() {\n/* 3068 */ if (this.vitems != null) {\n/* 3069 */ return this.vitems.getAllItemsAsArray();\n/* */ }\n/* 3071 */ return emptyItems;\n/* */ }", "protected abstract List<E> getList();", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "java.util.List<protocol.Data.Friend.FriendItem> \n getFriendList();", "@Override\n public Set<T> getItems() {\n return items;\n }", "public synchronized List<Item> getItems()\n\t{\n\t\t/**\n\t\t * TODO Q: Deep copy override clone in Item?\n\t\t * pre-condition: List not null;\n\t\t * Invariant:size list of active items cannot more than server capacity\n\t\t * post-condition:return the copy of items in the list.\n\t\t * Exception: list size more than server capacity.\n\t\t */\n\t\t// TODO: IMPLEMENT CODE HERE\n\t\t// Some reminders:\n\t\t// Don't forget that whatever you return is now outside of your control.\n\t\treturn new ArrayList<>(itemsUpForBidding);\n\t}", "public ArrayList<String> readItem();", "public DesktopClient printItemList() {\n String uri = \"http://localhost:8080/api/items\";\n RestTemplate restTemplate = new RestTemplate();\n ResponseEntity<Item[]> result = restTemplate.getForEntity(uri, Item[].class);\n Item[] items = result.getBody();\n List<Item> itemList = new ArrayList<>();\n if (items != null) {\n itemList.addAll(Arrays.asList(items));\n\n for (Item item :\n itemList) {\n System.out.println(item.toString());\n }\n } else {\n System.out.println(\"Didn't get items.\");\n }\n\n return this;\n }", "public abstract java.util.List extractListItems (Object obj, String countProp, String itemProp) \n\t throws SAFSException;", "public Item getItems() {\n return items;\n }", "private void getItems() {\n getComputers();\n getPrinters();\n }", "public ArrayList<String> returnItems() {\n ArrayList<String> itemNames = new ArrayList<>();\n\n if (toDoList.getItems().isEmpty()) {\n itemNames.add(\"No More Tasks! Yay!!\");\n }\n\n int i = 1;\n for (Item item : toDoList.getItems()) {\n Categories c = item.getCategory();\n itemNames.add(i + \". \" + item.getTitle() + \" due in \" + item.getDaysBeforeDue() + \" days, \" + c);\n i++;\n }\n\n return itemNames;\n }", "private ArrayList<ItemData> GetDataForList(Context context) {\n Log.i(TAG, \"Get kuv list in Offer\");\n\n // get offer list from database\n // ArrayList<EkData> kuvList = EkDatabaseHelper.getCategoryHelper(\n //getApplicationContext()).getKuvList();\n ArrayList<EkData> kuvList = new ArrayList<EkData>();\n //Collections.reverse(kuvList);\n\n // map offer list to list view\n ArrayList<ItemData> arrayList = new ArrayList<ItemData>();\n for (EkData kuv : kuvList) {\n ItemData item = new ItemData(kuv.getMessage(), \"\");\n item.setId(\"\");\n arrayList.add(item);\n }\n\n arrayList.add(new ItemData(\"City\",\"\"));\n arrayList.add(new ItemData(\"District\",\"\"));\n arrayList.add(new ItemData(\"Street\",\"\"));\n\n return arrayList;\n }", "public List<Item> getAllItems() {\r\n\t\tList<Item> itemList = new ArrayList<Item>();\r\n\t\tif(this.itemMap != null) {\r\n\t\t\tfor(Category2ItemMap map : this.itemMap) {\r\n\t\t\t\titemList.add(map.getItem());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn itemList;\r\n\t}", "public List<BaseObject> getAllItems() {\n ArrayList<BaseObject> list = new ArrayList<BaseObject>(ufos);\n list.add(ship);\n list.addAll(bombs);\n list.addAll(rockets);\n return list;\n }", "private void readItems() {\n }", "public ArrayList<Item> getItems()\n {\n return items;\n }", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "public ArrayList<ToDoList> getAllItems() {\n ArrayList<ToDoList> itemsList = new ArrayList<ToDoList>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n ToDoList item = new ToDoList(cursor.getString(1), cursor.getString(2), cursor.getInt(0));\n itemsList.add(item);\n } while (cursor.moveToNext());\n }\n return itemsList;\n }", "public synchronized List<ShoppingCartItem> getItems(){\n List<ShoppingCartItem> cart = new ArrayList<ShoppingCartItem>();\n \n for(ShoppingCartItem cartItem : carrito){\n if(cartItem!=null)\n cart.add(cartItem);\n }\n \n return cart;\n }", "public List<PlayerItem> getAll();", "public abstract List<String> getInventory();", "public List<StockItem> getStockList();", "public java.util.List<com.rpg.framework.database.Protocol.Item> getItemsList() {\n if (itemsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(items_);\n } else {\n return itemsBuilder_.getMessageList();\n }\n }", "@NotNull\n @Deprecated\n protected abstract List<? extends ListItem> readItems();", "public abstract List<T> getList();", "public String getItems(String name){\n return \"\";\n }", "@Override\n\tpublic List<Marca> listaporitem() {\n\t\treturn marcadao.listaporitem();\n\t}", "public List<T> getItems() {\n if (items == null) {\n items = this.ejbFacade.findAll();\n }\n return items;\n }", "@Override\n\tpublic void listAllItems() {\n\t\t\n\t}", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "public List getList() throws HibException;", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public List<Item> getAllItems() {\r\n \t\tList<Item> items = persistenceManager.getAllItems();\r\n \t\tCollections.sort(items, Comparators.ITEM_COMPARATOR);\r\n \t\treturn items;\r\n \t}", "public List<Item> getItems() {\n return Collections.unmodifiableList(items);\n }", "private void getTravelItems() {\n String[] columns = Columns.getTravelColumnNames();\n Cursor travelCursor = database.query(TABLE_NAME, columns, null, null, null, null, Columns.KEY_TRAVEL_ID.getColumnName());\n travelCursor.moveToFirst();\n while (!travelCursor.isAfterLast()) {\n cursorToTravel(travelCursor);\n travelCursor.moveToNext();\n }\n travelCursor.close();\n }", "public abstract List<String> getUserInventory();", "public ArrayList<Item> getItems(){\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\t\tcreateFile(itemsFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(itemsFile));\n\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\n\t\t\t\tItem item = new Item(Integer.parseInt(data[0]), data[1],data[2],Integer.parseInt(data[3]), data[4], data[5], data[6],data[7]);\n\t\t\t\titems.add(item);\n\n\t\t\t}\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t\treturn items;\n\t}", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "edu.usfca.cs.dfs.StorageMessages.List getList();", "public java.util.List<com.rpg.framework.database.Protocol.Item> getItemsList() {\n return items_;\n }", "List<String> getSelectedItems();", "List<Product> getProductsList();", "abstract List<T> getReuslt();", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "public List<BusinessObject> getItems(Package pkg);", "public static Items[] listAllItems() {\r\n List<Items> items = dao().listAllItems();\r\n return items.toArray(new Items[items.size()]);\r\n }", "public List<Item> getItems() {\n\t\treturn Collections.unmodifiableList(items);\n\t}", "List<Goods> getGoodsList();", "public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }", "public List<String> get_all_items(int index) {\n List<String> list = new ArrayList<>();\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n JSONArray array = (JSONArray) jsonObject.get(\"skin\");\n JSONObject subObject = (JSONObject) array.get(index);\n JSONArray item_list = (JSONArray) subObject.get(\"item_list\");\n Iterator<String> iterator = item_list.iterator();\n while (iterator.hasNext()) {\n list.add(iterator.next());\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return list;\n }", "TaskList getList();", "java.util.List<Res.Msg>\n getMsgList();", "private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}", "@RequestMapping(method=RequestMethod.GET, value = \"/item\", produces = \"application/json\")\n public List<Item> getItems()\n {\n return this.itemRepository.getItems();\n }", "public static final ArrayList list (Object ... items) {\r\n ArrayList sequence = new ArrayList();\r\n for (int i=0; i<items.length; i++) {\r\n sequence.add(items[i]);\r\n }\r\n return sequence;\r\n }", "public List<Item> getItems() {\n throw new OurBadException(\"Item '\" + this.serialize() + \"' is not an array.\");\n }", "@SuppressWarnings(\"unchecked\")\n public <T> List<T> list() {\n return (List<T>) journal\n .retrieve(BarbelQueries.all(id), queryOptions(orderBy(ascending(BarbelQueries.EFFECTIVE_FROM))))\n .stream().map(d -> processingState.expose(context, (Bitemporal) d)).collect(Collectors.toList());\n }", "java.util.List<? extends com.rpg.framework.database.Protocol.ItemOrBuilder> \n getItemsOrBuilderList();" ]
[ "0.7854103", "0.7770162", "0.7604487", "0.7448821", "0.7275085", "0.7122336", "0.7008993", "0.69570434", "0.69254035", "0.69109595", "0.6902568", "0.68922406", "0.689025", "0.6854865", "0.684677", "0.6841828", "0.6815964", "0.68084383", "0.6788104", "0.67611533", "0.6739802", "0.67328995", "0.672321", "0.66993827", "0.66965246", "0.6689449", "0.6673739", "0.66680163", "0.6655939", "0.6644572", "0.66319764", "0.66087306", "0.65917414", "0.65878606", "0.6584519", "0.6577507", "0.657625", "0.65649533", "0.65649533", "0.6562448", "0.6471211", "0.64640266", "0.64580595", "0.6453597", "0.64534694", "0.6445754", "0.64416087", "0.6440436", "0.64296454", "0.6417291", "0.6414604", "0.6402548", "0.6402373", "0.64020467", "0.64005035", "0.6394134", "0.6379506", "0.6378385", "0.63721895", "0.6352831", "0.6350673", "0.6347468", "0.63436365", "0.6339391", "0.6327539", "0.63274014", "0.6320945", "0.63200843", "0.63164896", "0.63105243", "0.6307233", "0.62941015", "0.629189", "0.6275514", "0.62732685", "0.62667286", "0.6257102", "0.6255449", "0.62490124", "0.6247575", "0.6216084", "0.6212239", "0.6210408", "0.6207529", "0.6206206", "0.6202832", "0.6199002", "0.61970055", "0.61942536", "0.61931306", "0.61925703", "0.6187093", "0.61855924", "0.6183652", "0.61834365", "0.6179638", "0.61790097", "0.61767983", "0.617248", "0.6170949" ]
0.6370086
59
Set the items to list
public void setItems(Item[] itemsIn) { items = itemsIn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setList(List<T> items);", "public void setNewList(List<Item> items) {\n if (mUseIdDistributor) {\n IdDistributor.checkIds(items);\n }\n mItems = new ArrayList<>(items);\n mapPossibleTypes(mItems);\n getFastAdapter().notifyAdapterDataSetChanged();\n }", "public void setListItems(List<String> lit) { mItems = lit; }", "public void setItems(List<T> items) {\n log.debug(\"set items called\");\n synchronized (listsLock){\n filteredList = new ArrayList<T>(items);\n originalList = null;\n updateFilteringAndSorting();\n }\n }", "public void setList(List<ListItem> list) {\n this.items = list;\n\n Log.d(\"ITEMs\",items+\"\");\n }", "public void setItems(){\n }", "public void setItems(List<T> value) {\n getElement().setItems(SerDes.mirror(value).cast());\n }", "public void set(List<Item> items) {\n if (mUseIdDistributor) {\n IdDistributor.checkIds(items);\n }\n\n //first collapse all items\n getFastAdapter().collapse();\n\n //get sizes\n int newItemsCount = items.size();\n int previousItemsCount = mItems.size();\n int itemsBeforeThisAdapter = getFastAdapter().getItemCount(getOrder());\n\n //make sure the new items list is not a reference of the already mItems list\n if (items != mItems) {\n //remove all previous items\n if (!mItems.isEmpty()) {\n mItems.clear();\n }\n\n //add all new items to the list\n mItems.addAll(items);\n }\n\n //map the types\n mapPossibleTypes(items);\n\n //now properly notify the adapter about the changes\n if (newItemsCount > previousItemsCount) {\n if (previousItemsCount > 0) {\n getFastAdapter().notifyAdapterItemRangeChanged(itemsBeforeThisAdapter, previousItemsCount);\n }\n getFastAdapter().notifyAdapterItemRangeInserted(itemsBeforeThisAdapter + previousItemsCount, newItemsCount - previousItemsCount);\n } else if (newItemsCount > 0 && newItemsCount < previousItemsCount) {\n getFastAdapter().notifyAdapterItemRangeChanged(itemsBeforeThisAdapter, newItemsCount);\n getFastAdapter().notifyAdapterItemRangeRemoved(itemsBeforeThisAdapter + newItemsCount, previousItemsCount - newItemsCount);\n } else if (newItemsCount == 0) {\n getFastAdapter().notifyAdapterItemRangeRemoved(itemsBeforeThisAdapter, previousItemsCount);\n } else {\n getFastAdapter().notifyAdapterDataSetChanged();\n }\n }", "public void fillList()\n {\n for (Category item : itemsList)\n {\n item.setSelected(true);\n }\n notifyDataSetChanged();\n }", "public void setItems(ItemList items) {\r\n this.items = items;\r\n }", "@Override\n\tpublic void setItems(List<WhiteListInfo> items) {\n\t\tif (adapter == null) {\n\t\t\tadapter = new WhiteListAdapter(this, items);\n\t\t\tmListView.setAdapter(adapter);\n\t\t}\n\t\telse{\n\t\t\tadapter.setList(items);\n\t\t\tadapter.notifyDataSetChanged();\n\t\t}\n\t}", "public void setItems(Item items) {\n this.items = items;\n }", "public void setItems(ArrayList<Item> items) {\n\t\tthis.items = items;\n\t}", "public abstract java.util.Vector setDB2ListItems();", "private void setToDoLists(){\n\n ArrayList<String> groceries = new ArrayList<String>();\n groceries.add(\"groceries\");\n groceries.add(\"apples\");\n groceries.add(\"gogurts\");\n groceries.add(\"cereal\");\n groceries.add(\"fruit roll ups\");\n groceries.add(\"lunch meat\");\n groceries.add(\"milk\");\n groceries.add(\"something for dessert\");\n groceries.add(\"steak\");\n groceries.add(\"milksteak\");\n groceries.add(\"cookies\");\n groceries.add(\"brewzongs\");\n\n ArrayList<String> bills = new ArrayList<String>();\n bills.add(\"bills\");\n bills.add(\"car loan\");\n bills.add(\"cable\");\n bills.add(\"rent\");\n\n ArrayList<String> emails = new ArrayList<String>();\n emails.add(\"emails\");\n\n ArrayList<ArrayList<String>> tmpMyList;\n tmpMyList = new ArrayList<ArrayList<String>>();\n\n tmpMyList.add(groceries);\n tmpMyList.add(bills);\n tmpMyList.add(emails);\n\n myList = tmpMyList;\n\n }", "public void updateItemsList(List<Image> list) {\n\n\t\tthis.itemsList = list;\n\n\t}", "public void setItems(String items)\n {\n _items = items;\n }", "private void populateItems (ObservableList<Item> itemList) throws ClassNotFoundException {\n\t\ttblResult.setItems(itemList);\n\t}", "public void populateList() {\n }", "public void setRandomItems(ArrayList<RandomItem> items);", "public ListItems() {\n itemList = new ArrayList();\n }", "@Before\r\n\tpublic void setList() {\r\n\t\tthis.list = new DoubleList();\r\n\t\tfor (int i = 0; i < 15; i++) {\r\n\t\t\tlist.add(new Munitions(i, i + 1, \"iron\"));\r\n\t\t}\r\n\t}", "public void setFoods(List<Food> list){\n foodList = list;\n notifyDataSetChanged();\n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "public void setItems(List<PickerItem> items) {\n this.items = items;\n initViews();\n selectChild(-1);\n }", "public void setItem(\r\n @NonNull\r\n final List<SalesOrderItem> value) {\r\n if (toItem == null) {\r\n toItem = Lists.newArrayList();\r\n }\r\n toItem.clear();\r\n toItem.addAll(value);\r\n }", "private void initList() {\n\n }", "@Override\r\n protected void setItems(ObservableList otherTreeItems) {\r\n setAllItems(otherTreeItems);\r\n }", "public void init(List<ClientDownloadItem> list) {\n if (list != null) {\n mItemlist.clear();\n mItemlist.addAll(list);\n Log.i(TAG, \"mItemlist.size = \" + mItemlist.size());\n notifyDataSetChanged();\n }\n }", "@RequestMapping(method=RequestMethod.PUT, value = \"/item\", produces = \"application/json\")\n public void setItems(ArrayList<Item> itemsToSet)\n {\n this.itemRepository.setItems(itemsToSet);\n }", "public void initAttributes(ObservableList<Item> items) {\n this.items = items;\n }", "public static void putCraftableItemInArrayList() {\n\n craftableItem.addItemToCraftableList(campfire);\n craftableItem.addItemToCraftableList(raft);\n craftableItem.addItemToCraftableList(axe);\n craftableItem.addItemToCraftableList(spear);\n }", "private void setItems(Set<T> items) {\n Assertion.isNotNull(items, \"items is required\");\n this.items = items;\n }", "@Test\n public void testSetListItems() {\n System.out.println(\"setListItems\");\n List listItems = null;\n DataModel instance = new DataModel();\n instance.setListItems(listItems);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void updateList() {\r\n\t\tlistaStaff.setItems(FXCollections.observableArrayList(service\r\n\t\t\t\t.getStaff()));\r\n\t}", "public void setItemList(String item)\n {\n this.itemLinkedList.add(new Item(item));\n }", "public void setList(ArrayList<Song> theSongs) {\n songs1 = theSongs;\n songsNumber = songs1.size();\n }", "private void setListAndResetSelection(JList list, List<String> items, java.util.List selection) {\n Map<String,Integer> str_to_i = new HashMap<String,Integer>();\n String as_str[] = new String[items.size()]; for (int i=0;i<as_str.length;i++) { as_str[i] = items.get(i); str_to_i.put(as_str[i], i); }\n list.setListData(as_str);\n if (selection.size() > 0) {\n List<Integer> ints = new ArrayList<Integer>(); \n // Find the indices for the previous settings\n for (int i=0;i<selection.size();i++)\n if (str_to_i.containsKey(selection.get(i))) \n\t ints.add(str_to_i.get(selection.get(i)));\n // Convert back to ints\n int as_ints[] = new int[ints.size()];\n for (int i=0;i<as_ints.length;i++) as_ints[i] = ints.get(i);\n list.setSelectedIndices(as_ints);\n }\n }", "private void setUpList() {\n\n\n Contents s1 = new Contents(R.drawable.bishist,\"Bishisht Bhatta\",\"+977-9849849525\", Color.parseColor(\"#074e87\"));\n list.add(s1);\n Contents s2 = new Contents(R.drawable.sagar,\"Sagar Pant\",\"+977-9865616888\",Color.parseColor(\"#074e87\"));\n list.add(s2);\n Contents s3 = new Contents(R.drawable.rabins,\"Rabin Nath\",\"+977-9848781007\",Color.parseColor(\"#074e87\"));\n list.add(s3);\n\n\n }", "private void setItems(ArrayList<NameId> values) {\n\t\tif (values == null || values.isEmpty()) {return;}\n\t\tint row = 0;\n\t\tCollections.sort(values);\n\t\tGrid.RowFormatter fmtRow = field.getRowFormatter();\n\t\tGrid.CellFormatter fmtCell = field.getCellFormatter();\n\t\tfield.resize(values.size(), 3);\n\t\tfmtCell.addStyleName(row, 1, CSS.cbtMultilistFieldNull());\n\t\tfor (NameId value : values) {\n\t\t\tfield.setText(row, 0, value.getName());\n\t\t\tfield.setText(row, 1, value.getId());\n\t\t\tCheckBox cb = new CheckBox();\n\t\t\tcb.addClickHandler(this);\n\t\t\tfield.setWidget(row, 2, cb);\n\t\t\tfmtCell.addStyleName(row, 1, CSS.cbtMultilistFieldNull());\n\t\t\tfmtRow.addStyleName(row++, CSS.cbtMultilistFieldValue());\n\t\t}\n\t}", "private void filllist() {\n mAlLocationBox.clear();\n DatabaseHandler databaseHandler=new DatabaseHandler(this);\n ArrayList<ArrayList<Object>> data = databaseHandler.listIitems();\n\n for (int p = 0; p < data.size(); p++) {\n mLocationBox = new LocationBox();\n ArrayList<Object> temp = data.get(p);\n Log.e(\"List\", temp.get(0).toString());\n Log.e(\"List\", temp.get(1).toString());\n Log.e(\"List\", temp.get(2).toString());\n Log.e(\"List\", temp.get(3).toString());\n mLocationBox.setId(Integer.valueOf(temp.get(0).toString()));\n mLocationBox.setName(temp.get(1).toString());\n mLocationBox.setMode(temp.get(2).toString());\n mLocationBox.setStatus(temp.get(3).toString());\n mAlLocationBox.add(mLocationBox);\n }\n LocationBoxAdapter locationBoxAdapter = new LocationBoxAdapter(LocationBoxListActivity.this,mAlLocationBox);\n listcontent.setAdapter(locationBoxAdapter);\n }", "public void setItems(ObservableList<T> value) {\n\n this.getWrappedControl().setItems(value);\n }", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "public ItemListDTO(LinkedList<QuantifiedItemDTO> itemList) {\r\n\t\titems = itemList;\r\n\t}", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "void setListProperty(Object name, List<Object> list) throws JMSException;", "public void setArrayList(ArrayList<Chalet> arrayList) {\n this.arrayList.addAll(arrayList);\n notifyDataSetChanged();// to update the sutats\n }", "public void setValues(List<Object> values);", "public void setAs(ElementList<E> list) {\r\n\t\tthis.makeEmpty();\r\n\t\theader.next = list.first();\r\n\t\tlast = list.last;\r\n\t}", "public void refresh(List<T> list) {\n this.items = list;\n notifyDataSetChanged();\n }", "public void setItems(Object[] newItems)\n {\n items = new Vector(newItems.length);\n for (int i=0; i < newItems.length; i++)\n {\n items.addElement(newItems[i]);\n }\n }", "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "private void populatesetlist() {\n\t\tmyset.add(new set(\"Password\", R.drawable.passwordop, \"hello\"));\n\t\tmyset.add(new set(\"Help\", R.drawable.helpso4, \"hello\"));\n\t\tmyset.add(new set(\"About Developers\", R.drawable.aboutusop2, \"hello\"));\n\t\tmyset.add(new set(\"Home\", R.drawable.homefi, \"hello\"));\n\t}", "public void initializeList() {\n listitems.clear();\n int medicationsSize = Medications.length;\n for(int i =0;i<medicationsSize;i++){\n Medication Med = new Medication(Medications[i]);\n listitems.add(Med);\n }\n\n }", "public void refershData(ArrayList<SquareLiveModel> contents) {\n\t\tlistData = contents;\n\t\tnotifyDataSetChanged();\n\t}", "public void setListProperty(List<Integer> t) {\n\n\t\t}", "@Override\n public void setItems(List<ExplanationOrReadingItem> items) {\n progressDialog.dismiss();\n mlist.setAdapter(new ExplanationOrReadingAdapter(items));\n mlist.setOnItemClickListener(this);\n }", "public void setData(java.util.List data) {\r\n this.data = data;\r\n }", "MyAdapter(List<FakeNews> myList) {\n list = myList;\n }", "public MyOrdersRecyclerViewAdapter(List<OrdersContent> items){\n mValues = items;\n }", "@Override\n public void writeToParcel(Parcel dest, int flags)\n {\n dest.writeTypedList(mItems);\n }", "public void setToDoListTitles() {\n\n ArrayList<String> toDoListTitlesSetter = new ArrayList<String>();\n for (int i = 0; i < myList.size(); i++) {\n toDoListTitlesSetter.add(myList.get(i).get(0));\n }\n toDoListTitlesTemp.clear();\n for(int i = 0; i < toDoListTitlesSetter.size(); i++){\n toDoListTitlesTemp.add(toDoListTitlesSetter.get(i));\n }\n\n Log.i(TAG, \"we have set the list titles\");\n }", "private void setItems(DataRelationModelDto dto, List<DataRelationModelItemDto> itemDtos) {\n\t\tList<String> dpdNameList = new ArrayList<>();\n\t\tList<String> targetDpdNameList = new ArrayList<>();\n\t\tfor (DataRelationModelItemDto itemDto : itemDtos) {\n\t\t\tdpdNameList.add(itemDto.getDpd().getDpdName());\n\t\t\ttargetDpdNameList.add(itemDto.getTargetDpd().getDpdName());\n\t\t}\n\t\tdto.setDpdNameList(dpdNameList);\n\t\tdto.setTargetDpdNameList(targetDpdNameList);\n\t}", "public void setList(ArrayList<Item> inventory) {\r\n\t\tthis.inventory = inventory;\r\n\t}", "@Override\n public void refreshList(ArrayList<String> newList){\n }", "void setList(ArrayList<UserContactInfo> contactDeatailsList);", "private void fillList(JList aListComponent,ArrayList<String> theList) {\n DefaultListModel itsModel = new DefaultListModel();\n aListComponent.setModel(itsModel);\n for(String anItem : theList){\n itsModel.addElement(anItem);\n }\n aListComponent.setModel(itsModel);\n }", "@Override\n public void setListData() {}", "private void setList() {\n Log.i(LOG,\"+++ setList\");\n txtCount.setText(\"\" + projectTaskList.size());\n if (projectTaskList.isEmpty()) {\n return;\n }\n\n projectTaskAdapter = new ProjectTaskAdapter(projectTaskList, darkColor, getActivity(), new ProjectTaskAdapter.TaskListener() {\n @Override\n public void onTaskNameClicked(ProjectTaskDTO projTask, int position) {\n projectTask = projTask;\n mListener.onStatusUpdateRequested(projectTask,position);\n }\n\n\n });\n\n mRecyclerView.setAdapter(projectTaskAdapter);\n mRecyclerView.scrollToPosition(selectedIndex);\n\n }", "public void setCarItems(){\r\n\t\tComboItem[] comboItems;\r\n\t\t//array list is used as interim solution due to the fact that regular arrays size is immutable\r\n\t\tArrayList<ComboItem> itemList = new ArrayList<ComboItem>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//Query database and populate array list with values. \r\n\t\t\tResultSet result = COMPANY_CAR_OPTIONS.executeQuery();\r\n\t\t\twhile(result.next()){\r\n\t\t\t\titemList.add(new ComboItem(result.getInt(1), result.getString(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Initialise new array with needed size\r\n\t\t\tcomboItems = new ComboItem[itemList.size()];\r\n\t\t\t//convert arraylist object into array\r\n\t\t\tcomboItems = itemList.toArray(comboItems);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t//initialise empty array to be returned\r\n\t\t\tcomboItems = new ComboItem[0];\r\n\t\t\tlogger.log(Level.SEVERE, e.getMessage());\r\n\t\t} \r\n\t\tthis.car_options = comboItems;\r\n\t}", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "public void setItem(Item[] param) {\r\n validateItem(param);\r\n\r\n localItemTracker = true;\r\n\r\n this.localItem = param;\r\n }", "public void setList(List<Integer> list) {\n this.list = list;\n }", "public void setList(DOCKSList param) {\r\n localListTracker = param != null;\r\n\r\n this.localList = param;\r\n }", "public ListState(DartObjectImpl[] elements) {\n this.elements = elements;\n }", "private void populateUserList() {\n UserAdapter userAdapter = new UserAdapter(this, users.toArray((Map<String, String>[]) new Map[users.size()]));\n lstUsers.setAdapter(userAdapter);\n }", "public void setList(LinkedBlockingQueue<Item> list) {\n Iterator it = list.iterator();\n int i = 0;\n Object[][] data = new Object[list.size()][4];\n while(it.hasNext()) {\n Item item = (Item) it.next();\n data[i][0]=item.getItem_id();\n data[i][1]= item.getItem_name();\n data[i][2]= item.getItem_price();\n data[i][3]= item.getItem_quantity();\n \n i++;\n \n \n System.out.println(\"client: adding item to gui: \" + item.getItem_name());\n }\n TableModel model = new DefaultTableModel(data, colomnNames);\n sorter = new TableRowSorter<TableModel>(model);\n \n JTable table = new JTable(model);\n table.setRowSorter(sorter);\n \n JScrollPane pane = new JScrollPane(table);\n pane.setBounds(0,100, this.getWidth(), 300);\n table.setFillsViewportHeight(true);\n add(pane);\n \n setSearch();\n \n \n System.out.println(\"client: added all items to gui\");\n this.revalidate();\n this.repaint();\n }", "void setListData(int list, int data) {\n\t\tm_lists.setField(list, 5, data);\n\t}", "public void setCompletionItems(List<CompletionItem> items) {\r\n this.textItemsProperty.setValue(FXCollections.observableArrayList(items));\r\n }", "@Override\n public void updateLists(ItemList userItemList, ItemList auctionItemList) {\n this.auctionItemList = auctionItemList;\n this.userItemList = userItemList;\n updateJList();\n }", "public void setListView() {\n arr = inSet.toArray(new String[inSet.size()]);\n adapter = new ArrayAdapter(SetBlock.this, android.R.layout.simple_list_item_1, arr);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n adapter.notifyDataSetChanged();\n listView.setAdapter(adapter);\n }\n });\n }", "public void setCurrentItems(ArrayList<Item> currentItems) {\n this.currentItems = currentItems;\n }", "@Override\r\n protected void setAllItems(ObservableList treeItems) {\r\n getRootChildren().setAll(treeItems);\r\n }", "public List<Item> getItemList();", "public void prepareBooks(ArrayList<Book> list) {\n\n bookList.clear();\n for(Book book : list) {\n bookList.add(book);\n }\n adapter.notifyDataSetChanged();\n }", "@DebugLog\n public void setItems(ArrayList<Update> items) {\n if (items != null) {\n for (Update item : items) {\n mItems.add(new OverviewItem(item));\n }\n }\n notifyDataSetChanged();\n //Remove the isloading\n if (getBasicItemCount() <= 0) return;\n try {\n OverviewItem overviewItem = mItems.get(getBasicItemCount() - items.size() - 1);\n if (overviewItem.isLoadingItem) {\n mItems.remove(getBasicItemCount() - items.size() - 1);\n notifyDataSetChanged();\n }\n }catch(ArrayIndexOutOfBoundsException e)\n {\n //theres no loading overview\n return;\n }\n\n }", "public void setRoomList (ArrayList<ItcRoom> roomList)\r\n\t {\r\n\t //this.roomList = roomList;\r\n\t }", "@Override\n protected void set(java.util.Collection<org.tair.db.locusdetail.ILocusDetail> list) {\n loci = list;\n // Add the primary keys to the serialized key list if there are any.\n if (loci != null) {\n for (com.poesys.db.dto.IDbDto object : loci) {\n lociKeys.add(object.getPrimaryKey());\n }\n }\n }", "public void setList(java.util.List newAktList) {\n\t\tlist = newAktList;\n\t}", "public void populate() {\n populate(this.mCurItem);\n }", "private void loadLists() {\n }", "public void updateList() {\n\t\tthis.myList.clear();\n\t\tIterator<String> item = this.myHashMap.keySet().iterator();\n\n\t\twhile (item.hasNext())\n\t\t{\n\t\t\tString name = (String)item.next();\n\t\t\tthis.myList.add(name);\n\t\t}\n\t\tthis.nameId = -1;\n\t\t\n\t}", "public void setList(DList2 list1){\r\n list = list1;\r\n }", "private void setUpList() {\n\t\tRoomItemAdapter adapter = new RoomItemAdapter(getApplicationContext(),\n\t\t\t\trName, rRate);\n\t\tlistView.setAdapter(adapter);\n\n\t\tlistView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\thandleClick(position);\n\t\t\t}\n\t\t});\n\t}", "private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void prepareTheList()\n {\n int count = 0;\n for (String imageName : imageNames)\n {\n RecyclerUtils pu = new RecyclerUtils(imageName, imageDescription[count] ,images[count]);\n recyclerUtilsList.add(pu);\n count++;\n }\n }", "public void setRoomItems(ArrayList<Item> newRoomItems) {\n roomItems = newRoomItems;\n }", "public void setItems(List<PickerItem> items, int selectedIndex) {\n setItems(items);\n selectChild(selectedIndex);\n }", "public void setData(List<Business> list) {\n }", "public static void restoreList() {\n\n if (copyList.isEmpty())\n return;\n\n\n getList().clear();\n\n for (Map<String, ?> item : copyList) {\n getList().add(item);\n }\n\n copyList.clear();\n //Log.d(\"test\", \"After restore: Champlist size \" + getSize() + \" copylist size \" + copyList.size());\n\n }" ]
[ "0.7668621", "0.74790853", "0.7381361", "0.73339784", "0.73263603", "0.7250509", "0.722824", "0.7002588", "0.6851791", "0.68489504", "0.67998445", "0.6780601", "0.6772303", "0.672641", "0.6589865", "0.6588322", "0.65838337", "0.65568733", "0.6551191", "0.65459937", "0.65315", "0.6528431", "0.6523225", "0.65146124", "0.64094007", "0.6401445", "0.6393687", "0.63650596", "0.6353081", "0.6334694", "0.63230294", "0.6307335", "0.6285655", "0.6275494", "0.6254205", "0.62447035", "0.6232278", "0.6220648", "0.6215182", "0.6205884", "0.61710346", "0.61702925", "0.61697304", "0.61656713", "0.6150219", "0.61478853", "0.6138703", "0.61380357", "0.61260563", "0.6114152", "0.6105893", "0.6104089", "0.60912967", "0.60809577", "0.6080937", "0.60806245", "0.6068289", "0.60573137", "0.60459065", "0.6026553", "0.60258716", "0.6022139", "0.60215497", "0.6020447", "0.6017769", "0.6013908", "0.60050035", "0.6002117", "0.5994485", "0.59814113", "0.59813356", "0.5978332", "0.5965252", "0.5954816", "0.5946897", "0.5940997", "0.59366363", "0.59364533", "0.59319556", "0.5929958", "0.59264445", "0.59207964", "0.5917014", "0.59121376", "0.5909532", "0.5903717", "0.5894502", "0.5889047", "0.5888092", "0.5887489", "0.58864295", "0.5886053", "0.587666", "0.58677685", "0.5866334", "0.5864574", "0.58606124", "0.58558357", "0.58539003", "0.5843561" ]
0.70653486
7
Get the row to highlight null or 1 for no row
public String getHighlightrow() { return String.valueOf(highlightRow); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n private int getHighlightedRows() {\n int rowNumber = 0;\n // first check if any rows have been clicked on\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n //if (backColor == rowHighlightColor) continue;\n if (backColor == rowSelectColor) {\n rowNumber = rowNumber + 1;\n }\n }\n }\n return rowNumber;\n }", "@Override\n\tpublic CellStyle getRowStyle() {\n\t\treturn null;\n\t}", "public R getSingleSelection()\r\n {\r\n final ListSelectionModel lsm = jTable.getSelectionModel();\r\n if( lsm.isSelectionEmpty() == false )\r\n {\r\n final int row = lsm.getLeadSelectionIndex(); // or use .getJTable().getSelectedRow() for single or lsm.isSelectedIndex() for multiple selection\r\n if( row != Util.INVALID_INDEX )\r\n {\r\n final int xlatedRow = jTable.convertRowIndexToModel( row ); // has to be done with auto-sorter\r\n return provideRow( xlatedRow );\r\n }\r\n }\r\n\r\n return null;\r\n }", "int getRow();", "private IssuePost getSingleSelectedRow() {\n ListSelectionModel selectionModel = table.getSelectionModel();\n int selectedIndex = selectionModel.getLeadSelectionIndex();\n if (selectedIndex != NOT_SELECTED) {\n return table.getRowData(selectedIndex);\n }\n return null;\n }", "public int getRow(){\r\n // return statement\r\n return row;\r\n }", "boolean hasRow();", "R getFirstRowOrThrow();", "public Color getRowColour(int row) {\n return Color.BLACK;\n }", "@Override\r\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {\n JLabel l = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);\r\n\r\n //Get the status for the current row.\r\n TimeTable tableModel = (TimeTable) table.getModel();\r\n \r\n if ((int)tableModel.getValueAt(row, col)!=0) {\r\n l.setBackground(Color.GREEN);\r\n } else {\r\n l.setBackground(Color.RED);\r\n }\r\n\r\n //Return the JLabel which renders the cell.\r\n return l;\r\n }", "public int getRow() {\n // YOUR CODE HERE\n return this.row;\n }", "public native Boolean anyCellSelected() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var retVal =self.anyCellSelected();\r\n if(retVal == null || retVal === undefined) {\r\n return null;\r\n } else {\r\n return @com.smartgwt.client.util.JSOHelper::toBoolean(Z)(retVal);\r\n }\r\n }-*/;", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle getFirstRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(FIRSTROW$22, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int getRow()\n {\n return row;\n }", "public int getRowNum(){ return this.rowNum; }", "int atRow();", "public int getRowspan() \n {\n return 1;\n }", "public boolean getHighlight();", "public int getRow() { return _row; }", "public Component getTableCellRendererComponent\n (JTable table, Object value, boolean selected, boolean focused, int row, int column)\n {\n if(String.valueOf(jTable1.getValueAt(row,4)).equals(\"10\")) setForeground(Color.blue);\n // SI NO ES ACTIVO ENTONCES COLOR ROJO\n else setForeground(Color.red);\n \n super.getTableCellRendererComponent(table, value, selected, focused, row, column);\n return this;\n }", "int getRowIndex();", "public int getSelectedLayer ()\n {\n return _table.getSelectedRow();\n }", "public Integer getRowNumber() {\n\t\tif (isRowNumber) {\n\t\t\treturn (int) lineId;\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n public int getRow() {\r\n return this.row;\r\n }", "public int getMinRow();", "protected int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow()\r\n {\r\n return row;\r\n }", "public int getRow()\n {\n return row;\n }", "private org.gwtbootstrap3.client.ui.Row get_f_Row1() {\n return build_f_Row1();\n }", "public Integer getRowNo() {\n return rowNo;\n }", "int getCellStatus(int x, int y);", "public int getRow(){\r\n\t\treturn this.row;\r\n\t}", "public int getExperimentColorIndex(int row);", "public int getRow() {\r\n return this.row;\r\n }", "public int getRow() {\r\n return row;\r\n }", "private Color getColorForRow(int row) {\n \tif (row < 2) return Color.RED;\n \tif (row < 4) return Color.ORANGE;\n \tif (row < 6) return Color.YELLOW;\n \tif (row < 8) return Color.GREEN;\n \treturn Color.CYAN;\n }", "public int getProbeColorIndex(int row);", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "private int getUnmatchedRow(){\n for (int i = 0; i < rows; i++)\n if(chosenInRow[i] < 0) return i;\n\n return -1;\n }", "public int getRow() {\n return this.row;\n }", "public int getRow() {\n return this.row;\n }", "public int getRow()\r\n\t{\r\n\t\treturn this.row;\r\n\t}", "public int getRowNo() {\n return rowIndex+1;\n }", "public int row();", "private int checkRow() {\n for (int i = 0; i < 3; i++) {\n if ((this.board[0][i] == this.board[1][i]) && (this.board[0][i] == this.board[2][i])) {\n return this.board[0][i];\n }\n }\n return 0;\n }", "public abstract String getCurrentRow();", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "protected Object calcRightNullRow()\n {\n return null;\n }", "public int getRow() {\n\t\treturn row; \n\t}", "public int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public int getStartRow();", "public int getRowNumber()\r\n\t{\r\n\t\treturn this.rowNumber;\r\n\t}", "public int getRowSpan() {\n/* 3003 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getRow() {\n return mRow;\n }", "@Override\r\n\tpublic Color getBorderHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "public int getselectedLFRow()\r\n\t{\r\n\t\treturn selectedLFRow;\r\n\t}", "public Row getRow() {\n\treturn new Row(rowIndex); \n }", "Boolean getBoolean(int col_num);", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public int getRow() {\n\t\treturn i;\n\t}", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "public int getColorCode (int row)\n\t{\n\t\t// TODO expose these through interface\n\t\t// (i.e. make public class member variables)\n\t\tfinal int valPositive = 1;\n\t\tfinal int valNegative = -1;\n\t\tfinal int valOtherwise = 0;\n\t\tObject data;\n\t\tint cmp = valOtherwise;\n\n\t\tif (m_colorColumnIndex == -1)\n\t\t{\n\t\t\treturn valOtherwise;\n\t\t}\n\n\t\tdata = getModel().getDataAt(row, m_colorColumnIndex);\n\n\t\t//\tWe need to have a Number\n\t\tif (data == null)\n\t\t{\n\t\t\treturn valOtherwise;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tif (data instanceof Timestamp)\n\t\t\t{\n\t\t\t\tif ((m_colorDataCompare == null)\n\t\t\t\t\t|| !(m_colorDataCompare instanceof Timestamp))\n\t\t\t\t{\n\t\t\t\t\tm_colorDataCompare = new Timestamp(System.currentTimeMillis());\n\t\t\t\t}\n\t\t\t\tcmp = ((Timestamp)m_colorDataCompare).compareTo((Timestamp)data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((m_colorDataCompare == null)\n\t\t\t\t\t|| !(m_colorDataCompare instanceof BigDecimal))\n\t\t\t\t{\n\t\t\t\t\tm_colorDataCompare = Env.ZERO;\n\t\t\t\t}\n\t\t\t\tif (!(data instanceof BigDecimal))\n\t\t\t\t{\n\t\t\t\t\tdata = new BigDecimal(data.toString());\n\t\t\t\t}\n\t\t\t\tcmp = ((BigDecimal)m_colorDataCompare).compareTo((BigDecimal)data);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception)\n\t\t{\n\t\t\treturn valOtherwise;\n\t\t}\n\n\t\tif (cmp > 0)\n\t\t{\n\t\t\treturn valNegative;\n\t\t}\n\t\telse if (cmp < 0)\n\t\t{\n\t\t\treturn valPositive;\n\t\t}\n\n\t\treturn valOtherwise;\n\t}", "private int getRowForField(String predicate) {\n for (int row = 1; row < fieldTable.getRowCount(); row++ ) {\n Label l = (Label) fieldTable.getWidget(row, 0);\n if (predicate.equals(l.getTitle())) {\n return row;\n }\n }\n return -1;\n }", "private WebElement chooseFirstRow() {\n return getRowsFromTable().get(0);\n\n }", "R getOneRowOrThrow();", "RowFunction getRowFunction();", "public int getMinInSingleRow() {\n return minInSingleRow;\n }", "public Integer getrowStatus() {\n byte entityState = this.getEntity(0).getEntityState();\n return new Integer(entityState);\n// return (Integer) getAttributeInternal(ROWSTATUS);\n }", "public byte affected() {\n\t\tbyte a = 0;\n\t\t// Top row does not affect bottom row\n\t\tif (up() == null) {\n\t\t\ta |= (byte) (SW.flags | S.flags | SE.flags);\n\t\t}\n\t\t// Bottom row does not affect top row\n\t\tif (down() == null) {\n\t\t\ta |= (byte) (NW.flags | N.flags | NE.flags);\n\t\t}\n\t\t// Right row does not affect left row\n\t\tif (right() == null) {\n\t\t\ta |= (byte) (NW.flags | W.flags | SW.flags);\n\t\t}\n\t\t// Left row does not affect right row\n\t\tif (left() == null) {\n\t\t\ta |= (byte) (NE.flags | E.flags | SE.flags);\n\t\t}\n\t\treturn (byte) ~a;\n\t}", "public int getMinRow() {\n return minRow;\n }", "@Override\n public Collection<T_ROW_ELEMENT_PM> getSelectedRows() {\n return null;\n }", "public Color getHighlight();", "public int getRow()\n\t\t{\n\t\t\treturn m_row;\n\t\t}", "@Override\n public void mouseEntered(MouseEvent evt) {\n Cell cell = (Cell) evt.getSource();\n preActionColor = cell.getBackground();\n\n // Highlight Valid Cells\n for (Cell aCell : view.getGamePanel().getViewCellList()) {\n if (cell.getPosition().getRow() == aCell.getPosition().getRow()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getColumn() == aCell.getPosition().getColumn()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getSubgrid() == aCell.getPosition().getSubgrid()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n }\n\n cell.setBackground(APP_GREEN);\n }", "@Override\r\n\tpublic Color getNodeHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "public int getRow() {\n\t\t\treturn rowNumber;\n\t\t}", "public int GetRow(){\n return row;\n }", "public int getRowNumber() {\n\t\treturn rowNumber;\n\t}", "@Override\r\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {\n JLabel l = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);\r\n\r\n //Get the status for the current row.\r\n DayPanelTableModel tableModel = (DayPanelTableModel) table.getModel();\r\n Color getColor = tableModel.rowColor(row);\r\n if (getColor != null) {\r\n l.setBackground(getColor);\r\n if (getColor.equals(Color.CYAN)) {\r\n l.setForeground(Color.BLACK);\r\n } else if (getColor.equals(Color.ORANGE)) {\r\n l.setForeground(Color.BLACK);\r\n } else if (getColor.equals(Color.GREEN)) {\r\n l.setForeground(Color.BLACK);\r\n } else {\r\n l.setForeground(Color.WHITE);\r\n }\r\n } else {\r\n l.setBackground(Color.WHITE);\r\n l.setForeground(Color.BLACK);\r\n }\r\n\r\n //Return the JLabel which renders the cell.\r\n return l;\r\n\r\n }", "boolean isHighlighted();", "public native int getEventRow() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n return self.getEventRow();\r\n }-*/;", "private SimpleHashtable.TableEntry<K, V> findNextNonNullTableRowEntry() {\r\n\t\t\tcurrentRow++;\r\n\r\n\t\t\twhile (currentRow < table.length) {\r\n\t\t\t\tif (table[currentRow] != null) {\r\n\t\t\t\t\treturn table[currentRow];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentRow++;\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t}", "RowCoordinates getRowCoordinates();", "@Override\n\tpublic Component prepareRenderer(TableCellRenderer renderer, int row, int column)\n\t{\n Component c = super.prepareRenderer(renderer, row, column);\n if (!c.getBackground().equals(getSelectionBackground()))\n {\n String type = (String)getModel().getValueAt(row, column);\n //if this value is not in the known data file\n if(session.isMispelled(type, column-1))\n {\n \t session.markCellAsMispelled(row, column);\n \t c.setBackground(Color.RED);\n \t c.addMouseListener(rightClickListener);\n }\n \n else\n {\n \t session.markCellAsNotMispelled(row, column);\n \t c.setBackground(Color.WHITE);\n \t c.removeMouseListener(rightClickListener);\n }\n }\n return c;\n\t}" ]
[ "0.66681", "0.6309199", "0.61275417", "0.6083232", "0.6054937", "0.598251", "0.59759104", "0.59587336", "0.5912342", "0.5868616", "0.5844666", "0.5823883", "0.5808743", "0.58077186", "0.58029985", "0.5796033", "0.5795772", "0.5784609", "0.57794654", "0.5756417", "0.57512665", "0.5741472", "0.5732861", "0.5712876", "0.56930083", "0.567892", "0.56748044", "0.5670094", "0.5665924", "0.5630946", "0.56181777", "0.5607755", "0.56041783", "0.55432004", "0.5541835", "0.55344397", "0.5533217", "0.5528215", "0.5528215", "0.5528215", "0.5528215", "0.5528215", "0.5528215", "0.55237967", "0.55237967", "0.55237967", "0.551651", "0.55079967", "0.55079967", "0.54961365", "0.5477868", "0.5469976", "0.54648143", "0.5464254", "0.54627395", "0.54627395", "0.54564995", "0.5454067", "0.5445442", "0.54307073", "0.54307073", "0.54302824", "0.54208237", "0.54152447", "0.5414605", "0.54072225", "0.5393832", "0.5371436", "0.53489107", "0.5332771", "0.5332771", "0.53282976", "0.5325467", "0.5325467", "0.5325467", "0.5325467", "0.5325467", "0.5325083", "0.52930015", "0.5285837", "0.52838755", "0.52764565", "0.5271174", "0.5260324", "0.5253974", "0.5253685", "0.5249457", "0.52486545", "0.52479684", "0.52408", "0.52368325", "0.5230247", "0.5229405", "0.521617", "0.5212422", "0.52070695", "0.51958305", "0.51955026", "0.519214", "0.5182861" ]
0.6898954
0
Set the row to highlight
public void setHighlightrow(String highlightRowIn) { if (highlightRowIn == null || highlightRowIn.equals("")) { highlightRow = -1; } else { try { highlightRow = Integer.parseInt(highlightRowIn); } catch(NumberFormatException nfe) { highlightRow = -1; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "public void setHighlight(boolean high);", "default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted', 'true')\", element());\n }", "public void setHighlight() {\n _highlight = HighlightMode.NORMAL;\n \n _input.setHighlightIntern();\n _output.setHighlightIntern();\n \n _isHighlighted = true;\n \n }", "public void highlightTile() {\n\t\tclearHighlightTile();\n\t\trectangle.setStrokeType(StrokeType.INSIDE);\n\t\trectangle.setStrokeWidth(2.0);\n\t\trectangle.setStroke(Color.RED);\n\t}", "public void setRowForeground(int row, RGB rgbColor){\n\t\tcheckRowIndex(row);\t\n\t\ttableViewer.getTable().getItem(row).setForeground(\n\t\t\t\tCustomMediaFactory.getInstance().getColor(rgbColor));\n\t}", "public void setRowBackground(int row, RGB rgbColor){\n\t\tcheckRowIndex(row);\t\n\t\ttableViewer.getTable().getItem(row).setBackground(\n\t\t\t\tCustomMediaFactory.getInstance().getColor(rgbColor));\n\t}", "public void setLineHighlightEnabled(boolean highlight) {\n }", "public void highlight(){\n myRectangle.setFill(HIGHLIGHT);\n }", "@Override\n\tpublic void setRowStyle(CellStyle arg0) {\n\t\t\n\t}", "public void highlight(Graphics g) {\n\t\tg.setColor(Color.CYAN);\n\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t}", "@Override\n\tpublic void highlight(boolean highlight) {\n\t\tif (JGraphRendering.erroneousStyle.updateStyle(visualization, highlight))\n\t\t\tgetObservable().notify(new MarkChangedEvent<Cell>(this));\n\n\t}", "public void setHighlight(boolean highlight) {\r\n\t\tthis._highlight = highlight;\r\n\t}", "public void setHighlight(TileStatus highlight){\r\n highLight = highlight;\r\n }", "public void enableTableCellSelection() {\n\t\tmyTable.setCellSelectionEnabled(true);\n\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\n\t\t\t\t\ttableTransactions.setSelectionForeground(Color.WHITE);\n\t\t\t\t}", "public void highlight(int from, int to) {\n this.array.highlightCell(from, to, null, this.highlightDelay);\n }", "private void highlight(final CellView cellView) {\r\n if (cellView != null) {\r\n highlight.setBounds(getHighlightBounds(cellView));\r\n if (highlight.getParent() == null) {\r\n GraphComponent.this.add(highlight);\r\n highlight.setVisible(true);\r\n }\r\n } else {\r\n if (highlight.getParent() != null) {\r\n highlight.setVisible(false);\r\n highlight.getParent().remove(highlight);\r\n }\r\n }\r\n }", "@Override\n public void mousePressed(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n int rowUnderMouse = getTable().rowAtPoint(e.getPoint());\n// if (rowUnderMouse != -1 && !getTable().isRowSelected(rowUnderMouse)) {\n// selected = rowUnderMouse;\n// }\n selected = rowUnderMouse;\n }\n }", "public void highlight(boolean highlighted) {\n\n if (highlighted) {\n objCanvas.setCursor(Cursor.HAND);\n if (curObjLabel != null) {\n curObjLabel.setStroke(Color.KHAKI);\n curObjLabel.setHighlighted(highlighted);\n oldStroke = curObjLabel.initStroke();\n }\n\n //make sure do de hightlight the previous label if over bound\n if (preObjLabel != null) {\n preObjLabel.setStroke(preObjLabel.initStroke());\n preObjLabel.setHighlighted(false);\n preObjLabel.getTreeItem().setExpanded(false);\n }\n } else {\n objCanvas.setCursor(Cursor.DEFAULT);\n if (curObjLabel != null) {\n curObjLabel.setStroke(oldStroke);\n curObjLabel.setHighlighted(highlighted);\n }\n\n //make sure to de hightlight the previous label\n if (preObjLabel != null) {\n preObjLabel.setStroke(preObjLabel.initStroke());\n preObjLabel.setHighlighted(highlighted);\n }\n }\n }", "public void activate()\n {\n this.setBackground(GUIConstants.TABLE_COLOR);\n repaint();\n }", "@Override\n public void mouseEntered(MouseEvent evt) {\n Cell cell = (Cell) evt.getSource();\n preActionColor = cell.getBackground();\n\n // Highlight Valid Cells\n for (Cell aCell : view.getGamePanel().getViewCellList()) {\n if (cell.getPosition().getRow() == aCell.getPosition().getRow()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getColumn() == aCell.getPosition().getColumn()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n if (cell.getPosition().getSubgrid() == aCell.getPosition().getSubgrid()) {\n aCell.setBackground(APP_GREEN.darker().darker());\n }\n }\n\n cell.setBackground(APP_GREEN);\n }", "public void setHighlightColor(Color c) {\n this.highlightColor = c;\n }", "public Component getTableCellRendererComponent\n (JTable table, Object value, boolean selected, boolean focused, int row, int column)\n {\n if(String.valueOf(jTable1.getValueAt(row,4)).equals(\"10\")) setForeground(Color.blue);\n // SI NO ES ACTIVO ENTONCES COLOR ROJO\n else setForeground(Color.red);\n \n super.getTableCellRendererComponent(table, value, selected, focused, row, column);\n return this;\n }", "public String getHighlightrow()\n {\n return String.valueOf(highlightRow);\n }", "public void setRowSelectionEnabled(boolean b) {\r\n\t\t// AttrSession.logPrintln(this+\": setRowSelectionEnabled(\"+b+\")\");\r\n\t\tif (b) {\r\n\t\t\t// Selecting of rows, not columns:\r\n\t\t\tthis.tableView.setRowSelectionAllowed(true);\r\n\t\t\tthis.tableView.setColumnSelectionAllowed(false);\r\n\r\n\t\t\t// Just one row at a time:\r\n\t\t\tthis.tableView.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\r\n\t\t\t// Listen to selection events:\r\n\t\t\tif (!this.rowSelectionEnabled) {\r\n\t\t\t\tthis.rowSelectionEnabled = true;\r\n\t\t\t\tthis.tableView.getSelectionModel().addListSelectionListener(this);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Selecting of neither rows nor columns:\r\n\t\t\tthis.tableView.setRowSelectionAllowed(false);\r\n\t\t\tthis.tableView.setColumnSelectionAllowed(false);\r\n\r\n\t\t\t// Stop listening to selection events:\r\n\t\t\tif (this.rowSelectionEnabled) {\r\n\t\t\t\tthis.rowSelectionEnabled = false;\r\n\t\t\t\tthis.tableView.getSelectionModel().removeListSelectionListener(this);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "public void setSelectedRow(String s) {\n\t\tuRow = s;\n\t}", "void setRowSelection(int index, String value) {\r\n int val;\r\n try {\r\n val = ( (Integer) nameToIndexMap.get(value)).intValue();\r\n }\r\n catch (Exception e) {\r\n return;\r\n }\r\n ySelections[index] = val;\r\n\r\n // now, for all the plots in this row, update the objectives\r\n for (int i = 0; i < 2; i++) {\r\n plots[index][i].setObjectives(xSelections[i], val);\r\n /////////////////////////////////\r\n plots[index][i].redraw();\r\n /////////////////////////////////\r\n }\r\n fireTableDataChanged();\r\n }", "@SuppressWarnings(\"unchecked\")\n private int getHighlightedRows() {\n int rowNumber = 0;\n // first check if any rows have been clicked on\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n //if (backColor == rowHighlightColor) continue;\n if (backColor == rowSelectColor) {\n rowNumber = rowNumber + 1;\n }\n }\n }\n return rowNumber;\n }", "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }", "public void setRow(int value) {\n this.row = value;\n }", "public void setRow(int r) {\n\t\tthis.row = r;\n\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tActionCell.this.setBackground(new Color(.35f, .58f, .92f));\n\t\t\t}", "public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\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 }", "public void setRow(int row) {\n\t\tthis.row = row; \n\t}", "public void setRow(int row)\n\t{\n\t\tthis.row = row;\n\t}", "public void setRow(int row)\n\t{\n\t\tthis.row = row;\n\t}", "private void setSelectedWord() {\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n if (backColor == rowSelectColor) {\n final TextView descriptionView = (TextView) row.findViewById(R.id.wordDescription);\n final TextView glossView1 = (TextView) row.findViewById(R.id.wordGloss1);\n if (descriptionView != null) selectedWords = descriptionView.getText().toString();\n if (glossView1 != null) selectedSynset = glossView1.getText().toString();\n }\n }\n }\n }", "public void setRow(int row) {\n\t\tthis.row = row;\n\t}", "public void setRow(int row) {\n\t\tthis.row = row;\n\t}", "@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }", "@Override\r\n public void elementHighlighted(Object source, int... data) {\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tTableRow tr1=(TableRow)v;\n\t\t\t\t\t\tTextView tv1= (TextView)tr1.getChildAt(0);\n\t\t\t\t\t\tString a = tv1.getText().toString();\n\t\t\t\t\t\t//tr1.setBackgroundColor(Color.BLACK);\n\t\t\t\t\t\tfirstname_et.setText(a);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(),tv1.getText().toString()+\" Selected\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t}", "@Override\n public void setSelected(int value) {\n super.setSelected(value);\n EditableLabel columnLabel = getFigure().getLabel();\n columnLabel.setSelected(value != EditPart.SELECTED_NONE);\n if (false) {\n IFigure rightPanel = getFigure().getRightPanel();\n if (rightPanel instanceof EditableLabel) {\n ((EditableLabel) rightPanel).setSelected(value != EditPart.SELECTED_NONE);\n }\n }\n columnLabel.repaint();\n\n if (value != EditPart.SELECTED_NONE) {\n if (this.getViewer() instanceof ERDGraphicalViewer && associatedRelationsHighlighing == null) {\n Color color = UIUtils.getColorRegistry().get(ERDUIConstants.COLOR_ERD_FK_HIGHLIGHTING);\n associatedRelationsHighlighing = ((ERDGraphicalViewer) this.getViewer()).getEditor().getHighlightingManager().highlightAttributeAssociations(this, color);\n }\n } else if (associatedRelationsHighlighing != null) {\n associatedRelationsHighlighing.release();\n associatedRelationsHighlighing = null;\n }\n }", "public void setHighlight(boolean shouldHighlight) {\n this.setHighlight(shouldHighlight, Color.web(\"green\"));\n }", "public boolean getHighlight();", "public void setBackground(Color col){\n\t\tmodel.setChosenColor(index, col);\n\t}", "public void setRow(int row) {\n\t\t\tif (row > 0)\n\t\t\t\tthis.row = row;\n\t\t}", "public void setDrawHighlightIndicators(boolean enabled) {\n/* 51 */ setDrawVerticalHighlightIndicator(enabled);\n/* 52 */ setDrawHorizontalHighlightIndicator(enabled);\n/* */ }", "void setAddHighlightListener(AddHighlightListener listener);", "public native void selectRow(int row) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.selectRow(row);\n }-*/;", "public Color getHighlight();", "public void widgetSelected(SelectionEvent e) {\n table.setSelection(new TableItem[]{cursor.getRow()});\n }", "void setSelected(boolean selected) {\n if (selected == isSelected()) {\n return;\n }\n if (selected) {\n highlight();\n } else {\n unhighlight();\n }\n this.selected = selected;\n }", "private void addTableRow(String[] cols){\n final TableRow tr = (TableRow) inflater.inflate(R.layout.word_table_row, tableLayout, false);\n tr.setClickable(true);\n final TableRow tr1 = (TableRow) inflater.inflate(R.layout.word_table_row1, tableLayout, false);\n //tr1.setClickable(true);\n final TextView posView = (TextView)tr.findViewById(R.id.wordPos);\n final TextView descriptionView = (TextView)tr.findViewById(R.id.wordDescription);\n final TextView glossView = (TextView) tr1.findViewById(R.id.wordGloss);\n final TextView glossView1 = (TextView) tr1.findViewById(R.id.wordGloss1);\n\n // set the background color to indicate if the row was selected\n View.OnClickListener clickListener = new View.OnClickListener() {\n public void onClick(View v) {\n Drawable background = posView.getBackground();\n int backColor = ContextCompat.getColor(context, R.color.row_background);\n if ((background instanceof ColorDrawable)) {\n int currentBackColor = ((ColorDrawable) background).getColor();\n if (currentBackColor == rowSelectColor)\n backColor = rowBackColor;\n //else if (currentBackColor == rowHighlightColor)\n // backColor = rowHighlightColor;\n else\n backColor = rowSelectColor;\n }\n posView.setBackgroundColor(backColor);\n descriptionView.setBackgroundColor(backColor);\n glossView.setBackgroundColor(backColor);\n tr.setBackgroundColor(backColor);\n tr1.setBackgroundColor(backColor);\n }\n };\n\n tr.setOnClickListener(clickListener);\n tr1.setOnClickListener(clickListener);\n\n // set the background color and text of the table row\n int backColor = rowBackColor;\n posView.setText(fromHtml(cols[0])); posView.setBackgroundColor(backColor);\n descriptionView.setText(fromHtml(cols[1])); descriptionView.setBackgroundColor(backColor);\n glossView.setText(fromHtml(cols[2])); glossView.setBackgroundColor(backColor);\n glossView1.setText(cols[3]);\n rows.add(tr); // save the collection of rows\n rows.add(tr1);\n tableLayout.addView(tr);\n tableLayout.addView(tr1);\n }", "private void repaintRow(int index, boolean value){\n\t\ttry{\n\t\t\tView temp=PollSelectionTable.this.getChildAt(index);\n\t\t\tCheckBox cbTemp=(CheckBox)temp.findViewById(R.id.chk);\n\t\t\tTextView txtTemp=(TextView)temp.findViewById(R.id.txtChoice);\n\t\t\tcbTemp.setChecked(value);\n\t\t\ttxtTemp.setTextColor(value?getResources().getColor(R.color.green_slider):getResources().getColor(R.color.gray));\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setSelectionBackground( final Color color ) {\n checkWidget();\n selectionBackground = color;\n }", "public JAnnotationCheckBox(){\n super();\n this.setOpaque(true);\n /*//this.setVerticalTextPosition(0);\n selectionBorderColor = UIManager.getColor(\"Tree.selectionBorderColor\");\n selectionForeground = UIManager.getColor(\"Tree.selectionForeground\");\n selectionBackground = UIManager.getColor(\"Tree.selectionBackground\");\n textForeground = UIManager.getColor(\"Tree.textForeground\");\n textBackground = UIManager.getColor(\"Tree.textBackground\");\n\n if (isHighlighted){\n\n this.setForeground(selectionForeground);\n this.setBackground(selectionBackground);\n } else {\n this.setForeground(textForeground);\n this.setBackground(textBackground);\n }*/\n\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tTableLayout table = (TableLayout) v.getParent();\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0;i<table.getChildCount();i++){\n\t\t\t\t\t\tTableRow row = (TableRow) table.getChildAt(i);\n\t\t\t\t\t\trow.setSelected(false);\n\t\t\t\t\t}\n\n\t\t\t\t\tTableRow row = (TableRow) v;\n\t\t\t\t\trow.setSelected(true);\n\t\t\t\t}", "public void modify( CellStyle style );", "public void setBorderHighlightColor(Color c) {\n this.borderHighlightColor = c;\n updateFigureForModel(nodeFigure);\n }", "private void highlightText(int start) {\n editor.setCaretPosition(editor.getText().length());\n editor.moveCaretPosition(start);\n }", "public void setSelectionColorWidth(int highlightWidth)\n\t{\n\t\tgetObject().setSelectionColorWidth(highlightWidth);\n\t\treturn;\n\t}", "public void selectHighlight(PHighlight highlight) {\n getLock().getReadLock();\n try {\n centerOffsetInDisplay(highlight.getStartIndex());\n select(highlight.getStartIndex(), highlight.getEndIndex());\n } finally {\n getLock().relinquishReadLock();\n }\n }", "public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }", "public void setHighlightLineWidth(float width) { this.mHighlightLineWidth = Utils.convertDpToPixel(width); }", "public void focusAtRow(int index) {\n getSelectionModel().setSelectionInterval(index, index);\n }", "@Override\r\n public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {\n JLabel l = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);\r\n\r\n //Get the status for the current row.\r\n TimeTable tableModel = (TimeTable) table.getModel();\r\n \r\n if ((int)tableModel.getValueAt(row, col)!=0) {\r\n l.setBackground(Color.GREEN);\r\n } else {\r\n l.setBackground(Color.RED);\r\n }\r\n\r\n //Return the JLabel which renders the cell.\r\n return l;\r\n }", "public void setDrawHorizontalHighlightIndicator(boolean enabled) { this.mDrawHorizontalHighlightIndicator = enabled; }", "public void highlight(){\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\t//if(!clicked){\t\n\t\t\t\t\n\t\t\t\tfirsttime=true;\n\t\t\t\tclicked=true;\n\t\t\t\tif(piece!=null){\n\t\t\t\t\txyMovment=piece.xyPossibleMovments(xPosition, yPosition);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void fireTableRowSelected(Object source, int iRowIndex, int iSelectionType);", "public void setCellBackground(int row, int col, RGB rgbColor){\n\t\tcheckRowIndex(row);\t\n\t\tcheckColumnIndex(col);\n\t\ttableViewer.getTable().getItem(row).setBackground(\n\t\t\t\tcol, CustomMediaFactory.getInstance().getColor(rgbColor));\n\t}", "public void chooseCellColor(){\n currentCellColor = cellColorPicker.getValue();\n draw();\n }", "private static void highlight(Graphics2D g, int x, int y, int startX){\r\n g.setColor(Color.RED);\r\n g.fillRect(startX * x + 1, startX * y + 1, startX - 1, startX - 1);\r\n }", "public void setHighlightCurrentBlock(boolean highlightCurrentBlock){\n this.mHighlightCurrentBlock = highlightCurrentBlock;\n if(!mHighlightCurrentBlock) {\n mCursorPosition = -1;\n }else{\n mCursorPosition = findCursorBlock();\n }\n invalidate();\n }", "@Override\n\tpublic Component prepareRenderer(TableCellRenderer renderer, int row, int column)\n\t{\n Component c = super.prepareRenderer(renderer, row, column);\n if (!c.getBackground().equals(getSelectionBackground()))\n {\n String type = (String)getModel().getValueAt(row, column);\n //if this value is not in the known data file\n if(session.isMispelled(type, column-1))\n {\n \t session.markCellAsMispelled(row, column);\n \t c.setBackground(Color.RED);\n \t c.addMouseListener(rightClickListener);\n }\n \n else\n {\n \t session.markCellAsNotMispelled(row, column);\n \t c.setBackground(Color.WHITE);\n \t c.removeMouseListener(rightClickListener);\n }\n }\n return c;\n\t}", "public void highlightTile(ArrayList<Position> positions) {\n\t\thighlightTile();\n\t\tfor(Position p : positions) {\n\t\t\tfor(int i = 0;i < 8;i++) {\n\t\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\t\tif(p.getX() == i && p.getY() == j){\n\t\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\t\trect.setStrokeWidth(2.0);\n\t\t\t\t\t\trect.setStroke(Color.RED);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public final void setStartRow(java.lang.Integer startrow)\r\n\t{\r\n\t\tsetStartRow(getContext(), startrow);\r\n\t}", "void highlightSquare(boolean highlight, Button button, int row, int column, ChessPiece piece);", "public void setRows () {\n\t\t\n\t}", "public void setRowIndex(int rowIndex) {\r\n\t\tthis.rowIndex = rowIndex;\r\n\t}", "public void setrowStatus(Integer value){\n\t}", "public void highlightTile(float xTile, float yTile, int color)\r\n/* 236: */ {\r\n/* 237:262 */ if (tileInBounds(xTile, yTile)) {\r\n/* 238:264 */ this.highlight[((int)xTile)][((int)yTile)] = color;\r\n/* 239: */ }\r\n/* 240: */ }", "@Kroll.method\n\tpublic void selectRow(int index)\n\t{\n\t\tscrollToIndex(index, null);\n\n\t\tfinal TableViewRowProxy row = getRowByIndex(index);\n\n\t\tif (row != null) {\n\t\t\tfinal TiTableView tableView = getTableView();\n\n\t\t\tif (tableView != null) {\n\t\t\t\tfinal Runnable action = () -> {\n\t\t\t\t\tfinal SelectionTracker tracker = tableView.getTracker();\n\t\t\t\t\tfinal TiUIView rowView = row.peekView();\n\t\t\t\t\tfinal boolean visible = rowView != null && rowView.getNativeView().isShown();\n\n\t\t\t\t\tif (!visible) {\n\t\t\t\t\t\tscrollToIndex(index, null);\n\t\t\t\t\t}\n\t\t\t\t\tif (tracker != null) {\n\t\t\t\t\t\ttracker.select(row);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// This is a workaround for when `EDITING` mode is set, as it recreates the TableView.\n\t\t\t\t// We need to listen for when it has updated before testing visibility/scrolling.\n\t\t\t\tif (!tableView.getHasLaidOutChildren()) {\n\t\t\t\t\ttableView.addOnLayoutChangeListener(new View.OnLayoutChangeListener()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onLayoutChange(View view, int i, int i1, int i2, int i3, int i4, int i5, int i6,\n\t\t\t\t\t\t\t\t\t\t\t\t int i7)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taction.run();\n\t\t\t\t\t\t\ttableView.removeOnLayoutChangeListener(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\taction.run();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setProbesColor(int[] rows, Color color);", "@Override\r\n\tpublic void mousePressed(MouseEvent e) {\r\n\t\tJTable table = (JTable) e.getSource();\r\n\t\tthis.selectedRow = table.getSelectedRow();\r\n\t}", "@Override\n public void onRowClicked(int position) {\n }", "public Color getHighlightColor() {\n return highlightColor;\n }", "public Color getRowColour(int row) {\n return Color.BLACK;\n }", "@Override\n public Color getHighlightedColor() { return getLine().getMapColor(); }", "protected void setHighlightFlag(EntityInstance src, EntityInstance dst, RelationClass rc)\r\n\t{\r\n\t\tVector\t\t\t srcLiftedList = src.getSrcLiftedList();\r\n\t\tRelationInstance ri;\r\n\t\tint\t\t\t\t i;\r\n\r\n\t\tif (srcLiftedList != null) {\r\n\t\t\tfor (i = srcLiftedList.size(); --i >= 0; ) {\r\n\t\t\t\tri = (RelationInstance) srcLiftedList.elementAt(i);\r\n\t\t\t\tif (ri.getDrawDst() == dst && ri.getRelationClass() == rc) {\r\n\t\t\t\t\tsetHighlightFlag(ri);\r\n\t\t\t\t\tbreak;\r\n\t}\t}\t}\t}", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "private void initHighlightLines()\r\n\t{\t\t\r\n\t\tfofHighlightRect = lang.newRect(new Offset(-2, -2, \"sourceCode\", AnimalScript.DIRECTION_NW), new Offset(2, 13*21, \"sourceCode\", AnimalScript.DIRECTION_NE), \"fofHighlightRect\", null, fofSourceCodeHighlightRect);\r\n\t\taddAdjHighlightRect = lang.newRect(new Offset(0, 5, \"fofHighlightRect\", AnimalScript.DIRECTION_SW), new Offset(2, 2, \"sourceCode\", AnimalScript.DIRECTION_SE), \"addAdjHighlightRect\", null, addAdjSourceCodeHighlightRect);\r\n\t\t\r\n\t\tfofHighlightRect.hide();\r\n\t\taddAdjHighlightRect.hide();\r\n\t}", "public abstract void setCurBackground(Color colr);", "public void setRow(int i) {\n\t\tif (row != Integer.MIN_VALUE) explicitRow = true; \n\t\trow = i;\t\t\n\t}" ]
[ "0.6849174", "0.676253", "0.66380703", "0.6470737", "0.6469678", "0.64327145", "0.64210445", "0.63877094", "0.6329672", "0.63197166", "0.6317775", "0.6256638", "0.62213975", "0.61982626", "0.6150764", "0.61233413", "0.6117668", "0.6086459", "0.6046237", "0.603099", "0.5990713", "0.5986923", "0.5967581", "0.5963017", "0.59207064", "0.5905783", "0.58857876", "0.5866227", "0.58613026", "0.58257276", "0.57891953", "0.57521003", "0.5749778", "0.5740014", "0.5739494", "0.57308334", "0.57015496", "0.56933904", "0.56933904", "0.5676402", "0.5669975", "0.5669975", "0.5654409", "0.5653054", "0.5646422", "0.56383854", "0.5628796", "0.5601483", "0.5590628", "0.55673766", "0.55637056", "0.5557572", "0.55473346", "0.5544104", "0.5530857", "0.55303484", "0.55135405", "0.55090654", "0.5508873", "0.55067694", "0.55036026", "0.54937196", "0.54818743", "0.54716897", "0.54682994", "0.54521185", "0.54482955", "0.5437835", "0.54334164", "0.5430813", "0.54282516", "0.54223436", "0.5418408", "0.5415837", "0.54136235", "0.541339", "0.53933024", "0.5381741", "0.53809893", "0.53805906", "0.5379229", "0.5376769", "0.53713655", "0.5367241", "0.5361789", "0.53594404", "0.53591377", "0.5355533", "0.53549826", "0.5344992", "0.53398514", "0.5334513", "0.53318805", "0.53196615", "0.53196615", "0.53196615", "0.53196615", "0.5315288", "0.5314998", "0.5314456" ]
0.6752674
2
Get the column to emphasise "title", "date" or null
public String getEmphcolumn() { return emphColumn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String getColumn()\n\t{\n\t\treturn null;\n\t}", "@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }", "String getColumnField(String javaField) throws NullPointerException;", "public String getColumnForPrimaryKey() {\n return null;\n }", "public StrColumn getDetails() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"details\", StrColumn::new) :\n getBinaryColumn(\"details\"));\n }", "public StrColumn getDetails() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"details\", StrColumn::new) :\n getBinaryColumn(\"details\"));\n }", "public StrColumn getDetails() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"details\", StrColumn::new) :\n getBinaryColumn(\"details\"));\n }", "public StrColumn getTitle() {\n return delegate.getColumn(\"title\", DelegatingStrColumn::new);\n }", "@Override\n\tprotected String getColumns()\n\t{\n\t\treturn null;\n\t}", "public String getTitle() {\n/* 354 */ return getTitle((String)null);\n/* */ }", "public StrColumn getBookTitle() {\n return delegate.getColumn(\"book_title\", DelegatingStrColumn::new);\n }", "java.lang.String getColumn();", "public String getNullColumnString() {\n \t\treturn \"\";\n \t}", "@Override\r\n\tpublic String[] getCol(String[] sql) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tprotected String defineColumn(ColumnDefinition columnDefinition) {\n\t\treturn null;\r\n\t}", "public String getValueColumn() {\n if (!isDate()) {\n return \"sort_text_value\";\n } else {\n return \"text_value\";\n }\n }", "private TableColumn<Object, ?> fillColumns() {\n\t\t\n\t\treturn null;\n\t}", "Column getCol();", "public StrColumn getDate() {\n return delegate.getColumn(\"date\", DelegatingStrColumn::new);\n }", "@Override\n\tpublic java.lang.String getDefaultData() {\n\t\treturn _expandoColumn.getDefaultData();\n\t}", "@NotNull\r\n @Column(name = \"title\")\r\n public String getTitle() {\n return title;\r\n }", "public StringDt getTitle() { \n\t\tif (myTitle == null) {\n\t\t\tmyTitle = new StringDt();\n\t\t}\n\t\treturn myTitle;\n\t}", "@Override\n public ColumnInfo getColumnInfo() {\n return columnInfo;\n }", "@Override\n\tpublic String getColumnName(int arg0) {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getColumnName(int arg0) {\n\t\treturn null;\n\t}", "public StrColumn getDateOfMrRelease() {\n return delegate.getColumn(\"date_of_mr_release\", DelegatingStrColumn::new);\n }", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "protected String getDefaultColumnName(int col)\r\n {\n return \"\";\r\n }", "public String getTitle( ) {\n return null;\r\n }", "@Override\r\n\t\tpublic String getTitle()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic String[] getTableColumns() {\n\t\treturn null;\n\t}", "String getColumnName();", "public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }", "public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }", "public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }", "public StrColumn getDetails() {\n return delegate.getColumn(\"details\", DelegatingStrColumn::new);\n }", "@Override\n\tpublic String getColumnName(int columnIndex) {\n\t\t\n\t\tif(columnIndex == 0)\n\t\t\treturn \"#\";\n\n\t\telse if(columnIndex == 1)\n\t\t\treturn \"Name\";\n\n\t\telse if(columnIndex >= 2 && columnIndex < (writtenWorkList.size() + 2))\n\t\t\treturn writtenWorkList.get(columnIndex - 2).getwrittenWorks_title();\n\t\t\n\t\telse if(columnIndex >= writtenWorkList.size() + 2 && columnIndex < (writtenWorkList.size() + performanceTaskList.size() + 2))\n\t\t\treturn performanceTaskList.get(columnIndex - (writtenWorkList.size() + 2)).getPerformanceTasks_title();\n\t\t\n\t\telse if(columnIndex >= writtenWorkList.size() + performanceTaskList.size() + 2 && columnIndex < (writtenWorkList.size() + performanceTaskList.size() + quarterlyAssessmentList.size() + 2))\n\t\t\treturn quarterlyAssessmentList.get(columnIndex - (writtenWorkList.size() + performanceTaskList.size() + 2)).getquarterlyAssessment_title();\n\t\t\n\t\telse\n\t\t\treturn null;\n\n\t}", "protected abstract String getFavoriteColumnName();", "private String getIntroduzione(StrutturaDati _cell) {\n\t\tfor (StrutturaDati testo : _cell.getAttributi()) {\n\t\t\tif (testo.isText()) {\n\t\t\t\treturn testo.getNome().trim();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getColumnone() {\n return columnone;\n }", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),DBSAResourceBundle.res.getString(\"mark\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"duplicate\"), \"dlsName\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "@Override\r\n\tpublic String getTitle() {\n\t\treturn null;\r\n\t}", "public String getCertainColumn(ResultSet rs, String columnName) throws SQLException\n {\n String result=\"\";\n while (rs.next())\n {\n\n String temp = rs.getString(columnName);\n result+=\"<p>\"+temp+\"</p>\";\n }\n return result;\n }", "private String getAllColumnName() {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// .append(COLUMN_id).append(\"=?,\").\n\t\tbuilder.append(\"user_id\").append(\"=?,\");\n\t\tbuilder.append(\"lib_book_id\").append(\"=?,\");\n\t\tbuilder.append(\"lending_date\").append(\"=?,\");\n\t\tbuilder.append(\"return_date\").append(\"=?,\");\n\t\tbuilder.append(\"returned_date\").append(\"=?,\");\n\t\tbuilder.append(\"status\").append(\"=?\");\n\t\t\n\t\treturn builder.toString();\n\t}", "private String getNullValueText() {\n return getNull();\n }", "public String getTitle() {\n return null;\n }", "@Override\n public String getPlaceholderValueString(Column col) {\n return super.getPlaceholderValueString(col) + \" AS \"\n + getTypeName(col);\n }", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "ColumnInfoTransformer getColumnInfoTransformer();", "public StringDt getTitleElement() { \n\t\tif (myTitle == null) {\n\t\t\tmyTitle = new StringDt();\n\t\t}\n\t\treturn myTitle;\n\t}", "@NotNull\n\tpublic StringBuilder getMetadata() {\n\t\tStringBuilder metadata = new StringBuilder();\n\t\tif (title != null)\n\t\t\tmetadata.append(title).append(\" \");\n\t\tif (authors != null)\n\t\t\tfor (String author : authors)\n\t\t\t\tmetadata.append(author).append(\" \");\n\t\tif (miscMetadata != null)\n\t\t\tfor (String metadata0 : miscMetadata)\n\t\t\t\tmetadata.append(metadata0).append(\" \");\n\t\treturn metadata;\n\t}", "public M csolTitleNull(){if(this.get(\"csolTitleNot\")==null)this.put(\"csolTitleNot\", \"\");this.put(\"csolTitle\", null);return this;}", "public String getColumnNameOne(){\n return columnNameOneLbl.getText();\n }", "@Override\r\n\t\tpublic DatabaseMetaData getMetaData() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "@Override\r\n public String getTitle()\r\n {\n return null;\r\n }", "@Override\n\tpublic JDBCMetaData getMetaData() throws SQLException {\n\t\treturn null;\n\t}", "public String getColumnName();", "ColumnFull createColumnFull();", "boolean isNeedColumnInfo();", "Column createColumn();", "@Override\n public String getColumnName(int column) {\n if (column > colunas.length || column < 0) {\n return null;\n }\n return colunas[column];\n\n }", "public String toString()\n {\n final String NEWLINE = System.getProperty(\"line.separator\");\n StringBuffer result = new StringBuffer(table).append(NEWLINE);\n for (Iterator iterator = data.keySet().iterator();\n iterator.hasNext(); )\n {\n String column = (String) iterator.next();\n result\n .append(\"\\t\")\n .append(column)\n .append(\" = \")\n .append(isColumnNull(column) ? \"NULL\" : data.get(column))\n .append(NEWLINE)\n ;\n }\n \n return result.toString();\n }", "String getColumn();", "private String _columnInfo(int i, DBField f, boolean isDefined)\n {\n String ndx = StringTools.format(i,\"00\");\n String name = StringTools.leftAlign(f.getName(),22);\n String desc = isDefined? (\": \" + f.getTitle(null)) : \"\";\n String type = f.getSqlType();\n if (f.isPrimaryKey()) { type += \" key\"; }\n if (f.isAlternateKey()) { type += \" altkey\"; }\n if (f.isAutoIncrement()) { type += \" auto\"; }\n if (f.isUTF8()) { type += \" utf8\"; }\n type = StringTools.leftAlign(type, 32);\n return ndx + \") \" + name + \" \" + type + desc;\n }", "public String getDuplicateUpdateColumnString() {\n return null;\n }", "@Override\n\tprotected String getTitle()\n\t{\n\t\treturn null;\n\t}", "@KeepForSdk\n public abstract String getPrimaryDataMarkerColumn();", "@Override\n public Watermark getNullableResult(ResultSet rs, String columnName) throws SQLException {\n return new Watermark();\n }", "@Override\n\tpublic CharSequence getTitle() {\n\t\treturn null;\n\t}", "public int getColumnCount() {\r\n return this.title.length;\r\n }", "private SafeHtml getDataTypeColumnToolTip(String columnText, StringBuilder title, boolean hasImage) {\n\t\tif (hasImage) {\n\t\t\tString htmlConstant = \"<html>\"\n\t\t\t\t\t+ \"<head> </head> <Body><img src =\\\"images/error.png\\\" alt=\\\"Arugment Name is InValid.\\\"\"\n\t\t\t\t\t+ \"title = \\\"Arugment Name is InValid.\\\"/>\" + \"<span tabIndex = \\\"0\\\" title='\" + title + \"'>\"\n\t\t\t\t\t+ columnText + \"</span></body>\" + \"</html>\";\n\t\t\treturn new SafeHtmlBuilder().appendHtmlConstant(htmlConstant).toSafeHtml();\n\t\t} else {\n\t\t\tString htmlConstant = \"<html>\" + \"<head> </head> <Body><span tabIndex = \\\"0\\\" title='\" + title + \"'>\"\n\t\t\t\t\t+ columnText + \"</span></body>\" + \"</html>\";\n\t\t\treturn new SafeHtmlBuilder().appendHtmlConstant(htmlConstant).toSafeHtml();\n\t\t}\n\t}", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "public String getColumnComment(int pos) { return columns[pos].getComment(); }", "public StrColumn getDateStructFact() {\n return delegate.getColumn(\"date_struct_fact\", DelegatingStrColumn::new);\n }", "@Override\n public boolean supportsNonNullableColumns() {\n return false;\n }", "public String extraInfo(){\n return by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "@Override\r\n\tpublic String getColumnText(Object element, int columnIndex) {\n\t\tif (element instanceof MonitorInfo) {\r\n\t\t\tMonitorInfo m = (MonitorInfo) element;\r\n\t\t\tif (columnIndex==0) {\r\n\t\t\t\treturn m.getStatus();\r\n\t\t\t}else if(columnIndex==1){\r\n\t\t\t\treturn m.getMonitorname();\r\n\t\t\t}else if(columnIndex==2){\r\n\t\t\t\treturn m.getDesc();\r\n\t\t\t}else if(columnIndex==3){\r\n\t\t\t\treturn m.getLastupdateDate();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic DefaultTableModel GetDTMAll() throws SQLException {\n\t\treturn null;\n\t}", "protected String getTableColumn()\n\t\t{\n\t\t\treturn Column ;\n\t\t}", "@Override\n\t\t\tpublic ColumnMetaData getColumnMetaData() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\t\"If you want to use val() to create a real\"\n\t\t\t\t\t\t\t\t+ \" column within a tuple, give it a name (i.e. use val(obj, name))!\");\n\t\t\t}", "public String buildColumnHeader() {\n if (padder == null) {\n return this.destColumnName;\n }\n return padder.doPadding(this.destColumnName);\n }", "public StrColumn getTitleSuppression() {\n return delegate.getColumn(\"title_suppression\", DelegatingStrColumn::new);\n }", "public Image getColumnImage(Object arg0, int arg1) {\n\t\t\t\treturn null;\r\n\t\t\t\t\r\n\t\t\t}", "public String getColumnText(Object arg0, int arg1) {\n\t\t\t\tRoom room=(Room)arg0;\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString roomInfoQueryStr=\"select * from RoomType where Type='\"+room.getType()+\"'\";\r\n\t\t\t\tResultSet rs;\r\n\t\t\t\trs=ado.executeSelect(roomInfoQueryStr);\r\n\t\t\t\tint peopleNum=0;\r\n\t\t\t\tfloat price=0;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(rs.next()){\r\n\t\t\t\t\t\tpeopleNum=rs.getInt(\"PeopleNums\");\r\n\t\t\t\t\t\tprice=rs.getFloat(\"Price\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tif(arg1==0)\r\n\t\t\t\t\treturn room.getRoomNo();\r\n\t\t\t\tif(arg1==1)\r\n\t\t\t\t\treturn room.getType();\r\n\t\t\t\t\r\n\t\t\t\tif(arg1==2)\r\n\t\t\t\t\treturn peopleNum+\"\";\r\n\t\t\t\tif(arg1==3)\r\n\t\t\t\t\treturn price+\"\";\r\n\t\t\t\tif(arg1==4)\r\n\t\t\t\t\treturn room.getRemarks();\r\n\t\t\t\tSystem.out.println(room.getType()+room.getState()+room.getRoomNo());\r\n\t\t\t\treturn null;\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n public String getColumnName(int column) {\n if (column == COL_ID) {\n return \"Código\";\n } else if (column == COL_NAME) {\n return \"Nome\";\n }\n return \"\";\n }" ]
[ "0.6328313", "0.6099074", "0.60845315", "0.6010741", "0.59672844", "0.59672844", "0.59672844", "0.5956391", "0.589012", "0.58705956", "0.58393466", "0.58188444", "0.5775984", "0.5731566", "0.5714624", "0.5685421", "0.56757313", "0.5622899", "0.5601071", "0.5581193", "0.5559803", "0.5546886", "0.55258447", "0.5525557", "0.5525557", "0.55083156", "0.55004036", "0.544717", "0.5434911", "0.5427811", "0.5411415", "0.5410027", "0.54036987", "0.54036987", "0.54036987", "0.54036987", "0.5393141", "0.5383345", "0.5380026", "0.53716284", "0.536902", "0.5351076", "0.5348421", "0.5348406", "0.5347855", "0.5344227", "0.5336448", "0.533117", "0.533117", "0.533117", "0.53283435", "0.53090966", "0.5307105", "0.5300461", "0.52929103", "0.528273", "0.52785766", "0.52661705", "0.5265562", "0.5260403", "0.52583176", "0.5257367", "0.52533555", "0.52428204", "0.52410686", "0.5233566", "0.5230889", "0.5201277", "0.51966125", "0.5188266", "0.5180333", "0.5159918", "0.51586366", "0.5157128", "0.51566714", "0.5142469", "0.51417893", "0.51368487", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5115775", "0.5114268", "0.5111471", "0.51055616", "0.5101044", "0.5099932", "0.5097831", "0.5093013", "0.5088574", "0.50846016" ]
0.5452516
27
Set the column to emphasise "title", "date" or null
public void setEmphcolumn(String emphColumnIn) { emphColumn = emphColumnIn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String getColumn()\n\t{\n\t\treturn null;\n\t}", "private void setColumnNullInternal(String column)\n {\n data.put(canonicalize(column), NULL_OBJECT);\n }", "private TableColumn<Object, ?> fillColumns() {\n\t\t\n\t\treturn null;\n\t}", "@Override\r\n\tprotected String defineColumn(ColumnDefinition columnDefinition) {\n\t\treturn null;\r\n\t}", "public void setColumnNull(String column)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n setColumnNullInternal(canonicalize(column));\n }", "public M csolTitleNull(){if(this.get(\"csolTitleNot\")==null)this.put(\"csolTitleNot\", \"\");this.put(\"csolTitle\", null);return this;}", "Column(String name, @Nullable String title) {\r\n this(null, name, title, false);\r\n }", "Column(@Nullable Field recordField, String name, @Nullable String title) {\r\n this(recordField, name, title, true);\r\n }", "public void setNull (JaqyPreparedStatement stmt, int column, ParameterInfo paramInfo) throws Exception;", "public void setColumn(String column, String s)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n data.put(canonicalize(column), s == null ? NULL_OBJECT : s);\n }", "void setValueOfColumn(ModelColumnInfo<Item> column, @Nullable Object value);", "@Override\n\tprotected String getColumns()\n\t{\n\t\treturn null;\n\t}", "@Override\n public boolean supportsNonNullableColumns() {\n return false;\n }", "private void setNull() {\n\n this.txtExamDate.setDate(null);\n this.txtCourseName.setText(null);\n this.txtCourseName.requestFocus();\n }", "@Override\n\tprotected String getTitle()\n\t{\n\t\treturn null;\n\t}", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "public void setTitle(String title) {\r\n this.title = title == null ? null : title.trim();\r\n }", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTitle() {\n\t\treturn null;\n\t}", "private void nullColumns(List columns)\n {\n for (Iterator iterator = columns.iterator(); iterator.hasNext(); )\n {\n setColumnNullInternal((String) iterator.next());\n }\n }", "@Override\n public void setNull() {\n\n }", "@Override\r\n\t\tpublic String getTitle()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "public void setTitle(String title) {\n this.title = title == null ? null : title.trim();\n }", "@NotNull\r\n @Column(name = \"title\")\r\n public String getTitle() {\n return title;\r\n }", "@Override\r\n\tpublic String getTitle() {\n\t\treturn null;\r\n\t}", "@Override\r\n public String getTitle()\r\n {\n return null;\r\n }", "public void setColumnone(String columnone) {\n this.columnone = columnone == null ? null : columnone.trim();\n }", "@Override\npublic void refillColumnTitle(CompositeAdapter firstRowAdapter) {\n\t\n}", "@Override\n\tpublic void setNotificationTitle(@Nullable CharSequence title) {\n\t\tif (title == null) {\n\t\t\ttitleLabel.setText(\"\");\n\t\t} else {\n\t\t\ttitleLabel.setText(title.toString());\n\t\t}\n\t}", "void setNeedColumnInfo(boolean needColumnInfo);", "public void addColumn(Date value, int align)\n {\n if (value != null)\n {\n addColumn(getDetailCell(value, align));\n }\n else\n {\n addColumn(\"\", Element.ALIGN_LEFT);\n }\n }", "public M csseRemarkNull(){if(this.get(\"csseRemarkNot\")==null)this.put(\"csseRemarkNot\", \"\");this.put(\"csseRemark\", null);return this;}", "@Override\n\tpublic CharSequence getTitle() {\n\t\treturn null;\n\t}", "public void setColumn(String column, java.util.Date d)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n if (d == null)\n {\n setColumnNull(canonicalize(column));\n return;\n }\n \n \n data.put(canonicalize(column), d);\n }", "private void initializeColumns() {\n\n // nameColumn\n nameColumn.setCellValueFactory(record -> new ReadOnlyStringWrapper(\n record.getValue().getFullName()\n ));\n\n // ageColumn\n organColumn.setCellValueFactory(record -> new ReadOnlyStringWrapper(\n record.getValue().getOrgan()));\n\n // genderColumn\n regionColumn.setCellValueFactory(record -> new\n ReadOnlyStringWrapper(record.getValue().getRegion()));\n\n // dateColumn. Depends on the given string\n dateColumn.setCellValueFactory(record -> new ReadOnlyStringWrapper(\n TransplantWaitingList.formatCreationDate(record.getValue().getTimestamp())));\n\n }", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "protected String getDefaultColumnName(int col)\r\n {\n return \"\";\r\n }", "public M csseDescNull(){if(this.get(\"csseDescNot\")==null)this.put(\"csseDescNot\", \"\");this.put(\"csseDesc\", null);return this;}", "public StrColumn getTitle() {\n return delegate.getColumn(\"title\", DelegatingStrColumn::new);\n }", "Column(@Nullable Field recordField, String name, @Nullable String title, boolean toggleable) {\r\n this.recordField = recordField;\r\n this.columnName = name;\r\n this.title = title;\r\n this.toggleable = toggleable;\r\n }", "private void writeNullCommitMetaData() {\n writer.println(\"commit_NULL:\");\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"author:\");\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"modified:\");\n writeSpacesCorrespondingToNestedLevel(COMMIT_METADATA_NEST_LEVEL);\n writer.println(\"removed:\");\n }", "public String getNullColumnString() {\n \t\treturn \"\";\n \t}", "@Override\n\tpublic java.lang.String getDefaultData() {\n\t\treturn _expandoColumn.getDefaultData();\n\t}", "@Test(expected = NullPointerException.class)\n public void givenNullValueShouldReturnNullPointerException() {\n transpose.setString(null);\n }", "public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }", "@SuppressWarnings(\"serial\")\n\tprivate void tableFiller(Container container,Table table)\n\t{\n\t\ttable.setWidth(\"100%\");\n\t\ttable.setHeight(\"100%\");\n\t\t\n\t\ttable.setColumnWidth(\"Description\", 140);\n\t\ttable.setColumnWidth(\"View\", 60);\n\t\ttable.setColumnWidth(\"Edit\", 60);\n\t\ttable.setColumnWidth(\"Delete\", 65);\n\t\ttable.setPageLength(table.size());\n\t\t \n\t\ttable.setContainerDataSource(container);\n\t\ttable.setConverter(\"Start Date\", new StringToDateConverter()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic DateFormat getFormat(Locale locale)\n\t\t\t{\n\t\t\t\treturn new SimpleDateFormat(\"d/M/y\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t\ttable.setConverter(\"End Date\", new StringToDateConverter()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic DateFormat getFormat(Locale locale)\n\t\t\t{\n\t\t\t\treturn new SimpleDateFormat(\"d/M/y\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t\ttable.setConverter(\"Deadline\", new StringToDateConverter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic DateFormat getFormat(Locale locale)\n\t\t\t{\n\t\t\t\t\n\t\t\t\treturn new SimpleDateFormat(\"d/M/y\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "public void fillEntry(BlogEntry entry) {\n\t\tif(this.id.isEmpty()) {\n\t\t\tentry.setId(null);\n\t\t} else {\n\t\t\tentry.setId(Long.valueOf(this.id));\n\t\t}\n\t\t\n\t\tentry.setLastModifiedAt(new Date());\n\t\tentry.setTitle(this.title);\n\t\tentry.setText(this.text);\n\t}", "@Override\n\tpublic IColumns createColumns() {\n\t\treturn null;\n\t}", "@Override\n\tpublic IColumns createColumns() {\n\t\treturn null;\n\t}", "public ColumnMetaData(String header, int align, int autoWrap) {\n \tlabel = header;\n \tinitialWidth = header.length();\n \twidth = initialWidth;\n \talignment = align;\n \tdisplay = true;\n autoWrapCol = autoWrap;\n }", "public void setTableToDefault() {\n TableColumnModel tcm = table.getColumnModel();\n\n for (int i = 0; i < msbQTM.getColumnCount(); i++) {\n tcm.getColumn(i).setPreferredWidth(-1);\n }\n\n table.setColumnModel(tcm);\n }", "public String getTitle( ) {\n return null;\r\n }", "public String getTitle() {\n/* 354 */ return getTitle((String)null);\n/* */ }", "public M csolRemarkNull(){if(this.get(\"csolRemarkNot\")==null)this.put(\"csolRemarkNot\", \"\");this.put(\"csolRemark\", null);return this;}", "void setNull(int index, int sqlType) throws SQLException;", "public void setDate(Date date) {\n setDate(date, null);\n }", "public void setTitle(String[] title) {\r\n this.title = title;\r\n fireTableStructureChanged();\r\n }", "public void prepareTitle()\n {\n DuelTitle title = new DuelTitle();\n addObject(title, 539, 186);\n }", "public DateColumn() {\n\t\t// default constructor.\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.HOUR_OF_DAY,0);\n\t\tcal.set(Calendar.MINUTE,0);\n\t\tcal.set(Calendar.SECOND,0);\n\t\tcal.set(Calendar.MILLISECOND,0);\n\t\tint dayOfTheWeek = cal.get(Calendar.DAY_OF_WEEK);\n\n\t displayStr = ScheduleManager.dayNames[dayOfTheWeek-1];\n\t}", "public void setAtitle(String atitle) {\n this.atitle = atitle == null ? null : atitle.trim();\n }", "public String getTitle() {\n return null;\n }", "public void setCreationDefaultValues()\n {\n this.setDescription(this.getPropertyID()); // Warning: will be lower-case\n this.setDataType(\"\"); // defaults to \"String\"\n this.setValue(\"\"); // clear value\n //super.setRuntimeDefaultValues();\n }", "public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}", "public static void displayTableTitle()\r\n {\n }", "public void setColNull(Boolean colNull) {\r\n\t\tthis.colNull = colNull;\r\n\t}", "public void setNextColumn() {\n if (nextSelectedCarTitleLabel.getText().isEmpty()) {\n setNextColumnTitle();\n } else {\n nextSelectedCarTitleLabel.setText(\"\");\n setNextColumnTitle();\n }\n\n }", "Column createColumn();", "@Override\n public void prepareTransient() {\n fixDates();\n logTimeDate = assignDateField(logTime);\n }", "@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }", "@Override\n\tpublic String getTitle() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "public Builder setColumn(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n column_ = value;\n onChanged();\n return this;\n }", "public Builder clearTitle() {\n \n title_ = getDefaultInstance().getTitle();\n onChanged();\n return this;\n }", "ColumnFull createColumnFull();", "public void setMainDocumentInfo(Date date, String title) {\n if (mainDocument != null) {\n RenderableDataItem row = new RenderableDataItem();\n\n row.add(_documentItem);\n row.add(new RenderableDataItem(title));\n row.add(new RenderableDataItem(date));\n mainDocument.rowData = row;\n } else {\n documentTitle = title;\n documentDate = date;\n }\n }", "@Override\n\t\t\tpublic ColumnMetaData getColumnMetaData() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\t\"If you want to use val() to create a real\"\n\t\t\t\t\t\t\t\t+ \" column within a tuple, give it a name (i.e. use val(obj, name))!\");\n\t\t\t}", "public StringDt getTitle() { \n\t\tif (myTitle == null) {\n\t\t\tmyTitle = new StringDt();\n\t\t}\n\t\treturn myTitle;\n\t}", "@Override\n public boolean isNoTitle() {\n return true;\n }", "public Builder clearTitle() {\n title_ = getDefaultInstance().getTitle();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "public final void setTableHeader() {\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.date\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.percent.solved\"));\n this.addColumn(java.util.ResourceBundle.\n getBundle(\"swt/client/module/game/resources/GameLogTableModel\").\n getString(\"column.log.type\"));\n }", "@Override\n\tpublic String[] getTableColumns() {\n\t\treturn null;\n\t}", "@Override\r\n\tprotected void createTableColumns(Table table) {\r\n\t\t// 1st column\r\n\t\tTableColumn column = new TableColumn(table, SWT.CENTER, 0);\r\n\t\tcolumn.setText(\"\");\r\n\t\tcolumn.setWidth(25);\r\n\r\n\t\tfor (int i = 1; i < columnNames.length; i++) {\r\n\t\t\t// n-te column with task Description\r\n\t\t\tcolumn = new TableColumn(table, SWT.LEFT, i);\r\n\t\t\tcolumn.setText((String) columnNames[i]);\r\n\t\t\tcolumn.setWidth(140);\r\n\t\t}\r\n\t}", "public String getDuplicateUpdateColumnString() {\n return null;\n }", "public Builder clearTitle() {\n \n title_ = getDefaultInstance().getTitle();\n onChanged();\n return this;\n }", "public Builder clearTitle() {\n \n title_ = getDefaultInstance().getTitle();\n onChanged();\n return this;\n }", "public Builder clearTitle() {\n \n title_ = getDefaultInstance().getTitle();\n onChanged();\n return this;\n }", "protected void setTableColumn(String column)\n\t\t{\n\t\t\tColumn = column ;\n\t\t}" ]
[ "0.61805063", "0.6064831", "0.58797526", "0.58178973", "0.5746482", "0.5728074", "0.56495184", "0.55980724", "0.54824466", "0.5477846", "0.5425134", "0.5393129", "0.53890425", "0.5376512", "0.5370681", "0.5350847", "0.5350847", "0.5350847", "0.5350847", "0.53435", "0.53435", "0.53435", "0.532484", "0.5315466", "0.5308848", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5308179", "0.5300161", "0.5296381", "0.52941185", "0.52920943", "0.5269855", "0.52575505", "0.5253041", "0.5243694", "0.5237158", "0.5205566", "0.51688325", "0.5162501", "0.50578517", "0.50494766", "0.5019297", "0.50190395", "0.50077635", "0.4992845", "0.49888057", "0.49832082", "0.49684322", "0.49453798", "0.49442473", "0.49396417", "0.49181846", "0.49181846", "0.49150315", "0.49110815", "0.49107143", "0.4904755", "0.4885691", "0.48756808", "0.48711106", "0.4859562", "0.48567843", "0.48476407", "0.48443106", "0.48377523", "0.48330447", "0.48318738", "0.48313445", "0.48261595", "0.48253036", "0.48197848", "0.48174858", "0.48154783", "0.48032483", "0.47928843", "0.47796026", "0.47773865", "0.47723433", "0.4762954", "0.47601405", "0.47520292", "0.4745138", "0.4744379", "0.4738912", "0.4735485", "0.4732407", "0.47298273", "0.47298273", "0.47298273", "0.47263998" ]
0.5304334
37
INVOCATIONS (WHERE THIS VISITOR DOES ITS JOB)
public void registerInvocation(Invocation inv) { if(inv == null) return; //If it is already used we were already here boolean alreadyChecked = inv.isUsed(); //The invocation is used indeed inv.use(); AbstractFunction invocationTarget = inv.getWhichFunction(); //XPilot: invocationTarget is null for default constructors if(invocationTarget == null) return; if(!alreadyChecked&&invocationTarget.getScope().getInclusionType() != AndromedaFileInfo.TYPE_NATIVE) { //Only check it if it is no function defined in blizzard's libs invocationTarget.getDefinition().accept(parent); } //Check if we can inline this function call int inlineType = InlineDecider.decide(inv); if(inlineType != InlineDecider.INLINE_NO) { invocationTarget.addInline(); throw new Error("inline not yet supported."); } else { invocationTarget.addInvocation(); //visit(invocationTarget); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void beforeJobExecution() {\n\t}", "public interface WorkflowExecutionListener {}", "@Override\n\t\t\t\t\t\tpublic void onInvateComplet() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "@Override\n public void scanActuatorsParked() {\n }", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "private void scheduleJob() {\n\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}", "@Override\n\tpublic void beforeJob(JobExecution arg0) {\n\t\t\n\t}", "public interface ExecutorListener {\n\n void invokeMethod(int id, ExecutorObject object, ExecuteRunType type, User user, String uniqueMethodId, Method method);\n\n}", "@Override\n\tpublic void doJob() {\n\t\tSystem.out.println(\"Studying\");\n\t}", "public void scheduleJobs();", "@Pointcut(\"execution(public * *(..))\")\r\n\tpublic void allPublicOperations(){}", "@Override\r\n public void nodeActivity() {\n }", "@Override\n\tpublic void activity() {\n\t\tSystem.out.println(\"studying\");\n\t}", "interface Blank extends WithJobAgent {\n }", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "public void actionPerformed(ActionEvent ev)\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tviewJob();\t\t\t\t\r\n \t\t\t}", "@Override\n public void run() {\n setPointActions(host.getUnlockedStages());\n }", "public void menuJobTest() throws Exception;", "public void intialRun() {\n }", "public interface TIOADExecutorListeners{\n void OnStart();\n void OnStarting(double pro);\n void OnError(int error);\n void OnSuccess();\n}", "@Override\n\t\t\tpublic void beforeJob(JobExecution jobExecution) {\n\t\t\t\t\n\t\t\t}", "public void startExecuting() {}", "@Override\n\tprotected void execute() {\n\t\tRobot.collector.setMawOpen(Robot.oi.getCollectorOpen());\n\t\tRobot.collector.setIntakeSpeed(Robot.oi.getCollectorSpeed());\n\t\tRobot.collector.setWristStageOneRetracted(Robot.oi.getWristStageOneRetracted());\n\t\tRobot.collector.setWristStageTwoRetracted(Robot.oi.getWristStageTwoRetracted());\n\t}", "private void viewPendingRequests() {\n\n\t}", "@Override\n public void Execute() {\n\n }", "@Override\n public void execute(IEnvironment env)\n {\n \n }", "@Override\n public void execute(RuntimeStep exe, RuntimePlan plan) {\n }", "public void invokeEvents() {\n\t\tIntent i = alertMe.createIntentFromSession();\n\t\ti.setClass(this, AlertMeEventHistory.class);\n\t\ti.putExtra(AlertMeConstants.INTENT_REQUEST_KEY, AlertMeConstants.INVOKE_HISTORY);\n startActivityForResult(i, AlertMeConstants.INVOKE_HISTORY);\n }", "public void atender(){\n\n }", "default void interactWith(Lever lever) {\n\t}", "@Override\r\n\tpublic void Visit(YellowShot shot) {\n\r\n\t}", "@Override\r\n\tpublic void doBeforeJob() {\n\r\n\t}", "@Pointcut(\"within(com.wipro.despar..*manager*..*)\")\r\n\tpublic void inManagerLayer(){}", "public GetJobs() {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void myWork() {\n\t\t\n\t}", "@Override\r\n\tpublic void executer() {\n\t}", "public RunProcDefJob() {\n\t}", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "public void execute(){\n\t\t\n\t}", "@Override\r\n public void execute(Command command) {\n\r\n }", "@Override\n\tpublic void resAuditJobEmployee(int je_id, String caller) {\n\n\t}", "public void act() \n {\n verificaClique();\n }", "public void Execute() {\n\n }", "public void launchNewSession(){\r\n framework.launchNewMAV(getArrayMappedToData(), this.experiment, \"Multiple Experiment Viewer - Cluster Viewer\", Cluster.GENE_CLUSTER);\r\n }", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "cn.infinivision.dataforce.busybee.pb.meta.Execution getExecution();", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void onProcessChanges(IDuccWork job, IDuccProcess left, IDuccProcess right);", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "public interface IUserActionsManaged\n{\n void startCurving(PointF point, float pressure);\n void curving(PointF point, float pressure);\n void completeCurving(PointF point, float pressure);\n void cancelCurving(PointF point, float pressure);\n\n void startResizing();\n void resizing(PointF[] points);\n void completeResizing();\n\n void startDragging(PointF point);\n void dragging(PointF point);\n void completeDragging(PointF point);\n\n void showMenu();\n}", "@Override\n\tpublic Object privateExecuteIn(final IScope scope) throws GamaRuntimeException {\n\t\tif ( GAMA.getClock().getCycle() == 0 ) {\n\t\t\tintegrated_times.clear();\n\t\t\tintegrated_values.clear();\n\t\t}\n\n\t\tequaAgents.clear();\n\t\tfor ( int i = 0, n = equations.size(); i < n; i++ ) {\n\t\t\tequaAgents.add(scope.getAgentScope());\n\t\t}\n\t\tif ( simultan != null ) {\n\t\t\tequaAgents_ext.clear();\n\t\t\tfinal Object t = simultan.value(scope);\n\t\t\tif ( t != null ) {\n\t\t\t\tif ( t instanceof GamaList ) {\n\n\t\t\t\t\tfinal GamaList lst = (GamaList) t;\n\t\t\t\t\tfor ( int i = 0; i < lst.size(); i++ ) {\n\t\t\t\t\t\tfinal Object o = lst.get(i);\n\t\t\t\t\t\tif ( o instanceof IAgent ) {\n\t\t\t\t\t\t\tfinal IAgent remoteAgent = (IAgent) o;\n\n\t\t\t\t\t\t\tif ( !remoteAgent.dead() && !remoteAgent.equals(scope.getAgentScope()) &&\n\t\t\t\t\t\t\t\t!equaAgents_ext.contains(remoteAgent) ) {\n\t\t\t\t\t\t\t\tequaAgents_ext.add(remoteAgent);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// else if (o instanceof IPopulation){\n\t\t\t\t\t\t// final Iterator<? extends IAgent> ia = ((IPopulation) o).iterator();\n\t\t\t\t\t\t// while (ia.hasNext()) {\n\t\t\t\t\t\t// final IAgent remoteAgent = ia.next();\n\t\t\t\t\t\t// if ( !remoteAgent.dead() && !remoteAgent.equals(scope.getAgentScope()) && !equations_ext.contains(remoteAgent) ) {\n\t\t\t\t\t\t// equations_ext.add(remoteAgent);\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t// }\n\t\t\t\t\t\telse if ( o instanceof GamlSpecies ) {\n\n\t\t\t\t\t\t\tfinal Iterator<? extends IAgent> ia = ((GamlSpecies) o).iterable(scope).iterator();\n\t\t\t\t\t\t\twhile (ia.hasNext()) {\n\t\t\t\t\t\t\t\tfinal IAgent remoteAgent = ia.next();\n\t\t\t\t\t\t\t\tif ( !remoteAgent.dead() && !remoteAgent.equals(scope.getAgentScope()) &&\n\t\t\t\t\t\t\t\t\t!equaAgents_ext.contains(remoteAgent) ) {\n\t\t\t\t\t\t\t\t\t// GuiUtils.informConsole(scope.getAgentScope()+\" simul \"+remoteAgent);\n\n\t\t\t\t\t\t\t\t\tequaAgents_ext.add(remoteAgent);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tif ( !equaAgents_ext.contains(t) ) {\n\t\t\t\t\t\tequaAgents_ext.add((IAgent) t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// GuiUtils.informConsole(\"equations_ext \"+scope.getAgentScope()+\" \"+equations_ext);\n\t\t}\n\n\t\treturn super.privateExecuteIn(scope);\n\t}", "public void setJobObserver(JobObserver jO) {\n\r\n\t}", "public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}", "public void ventilationServices() {\n\t\tSystem.out.println(\"FH----overridden method from hospital management--parent class of fortis hospital\");\n\t}", "@Override\r\n\tpublic void work() {\n\t\tSystem.out.println( aname + \"Berkerja\");\r\n\t}", "public void notifyJoueurActif();", "public interface AlertRelatedCommand {\n\n}", "public interface RemoteExecutionListener {\n\n /**\n * Called when a remote execution starts\n * \n * @param method\n * the method which will be executed remotely\n * @param invoker\n * the invoker to be invoked\n * @param args\n * the args to be passed to method\n * @return true if this execution should run remotely, false if it should be\n * run locally\n */\n public boolean onRemoteExecutionStart(Method method, Object invoker, Object[] args);\n\n /**\n * Called when a remote execution completes\n * \n * @param method\n * the method which is executed remotely\n * @param invoker\n * the invoker to be invoked\n * @param args\n * the args to be passed to the method\n * @param returnValue\n * the value which will be returned, or null if execution fails\n * @param isSuccess\n * if the execution is successful\n * @param exception\n * the exception that is thrown if execution fails\n */\n public void onRemoteExecutionComplete(Method method, Object invoker, Object[] args, Object returnValue,\n boolean isSuccess, Throwable exception);\n\n}", "public void projectRunnableChanged() { }", "public void projectRunnableChanged() { }", "@Override\n public void onExecuted(CmdResult result) {\n reportManager.cmdReportSync(cmd.getId(), CmdStatus.EXECUTED, result);\n\n for (ProcListener listener : extraProcEventListeners) {\n listener.onExecuted(result);\n }\n }", "public void startExecuting()\n {\n super.startExecuting();\n }", "public interface KnowledgeSource extends Runnable {\n\n boolean isInterested(BlackBoardObject bbo, BlackBoard bb);\n\n BlackBoardObject process(BlackBoardObject bbo);\n\n void updateBlackBoardObject(BlackBoardObject bbo);\n}", "@Override\n protected void doAct() {\n }", "public interface RunActionRunningListener\n{\n public static RunActionRunningListener[] EMPTY_ARRAY = {};\n public static Class THIS_CLASS = RunActionRunningListener.class;\n\n /**\n * called when test runner availability changes\n * @param isRunning\n */\n public void onRunActionRunnerAvailabilityChange(boolean isRunning);\n}", "public void execute() {\n\t\t\n\t}", "@Override\n public void act() {\n }", "protected void afterJobExecution() {\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void execute() {\n\n\n /* container.swerveControllerCommand =\n new SwerveControllerCommand(\n trajectory,\n drivetrain::getCurrentPose, \n DrivetrainConstants.DRIVE_KINEMATICS,\n\n // Position controllers\n new PIDController(DrivetrainConstants.P_X_Controller, 0, 0),\n new PIDController(DrivetrainConstants.P_Y_Controller, 0, 0),\n container.thetaController,\n drivetrain::setModuleStates, //Not sure about setModuleStates\n drivetrain);*/\n\n// Reset odometry to the starting pose of the trajectory.\ndrivetrain.resetOdometry(trajectory.getInitialPose());\n\n\n}", "public void execute() {\n\n\t}", "public static void main(String[] args) {\n \tString writer=\"\";\n \tString vehicleReader=\"\";\n \tString platoonReader=\"\";\n \tString roadReader=\"\";\n String writerLog =\"\";\n\n VanetFSM fsm = new VanetFSM(writer, writerLog,null,null,null,null); \n ArrayList<VanetProperty> props = new ArrayList<VanetProperty>();\n props.add(new Property1());\n props.add(new Property2());\n props.add(new Property3());\n props.add(new Property4());\n props.add(new Property5());\n executeAndMonitor(fsm, props);\n }", "public void execute() {\r\n\t\r\n\t}", "public void onPowerSaveWhitelistedChanged(AppStateTracker sender) {\n updateAllJobs();\n }", "public void act() {\n\t}", "public void action() {\n try {\n //System.out.println(\"LoadAgent\"+neighId[i]);\n DFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n sd.setName(\"DSO agent\");\n template.addServices(sd);\n DFAgentDescription[] result = DFService.search(myAgent, template);\n AgentAIDs[0] = result[0].getName();\n sd.setName(\"PV Agent\");\n template.addServices(sd);\n result = DFService.search(myAgent, template);\n AgentAIDs[2] = result[0].getName();\n sd.setName(\"Load Agent\");\n template.addServices(sd);\n result = DFService.search(myAgent, template);\n AgentAIDs[3] = result[0].getName();\n\n } catch (FIPAException ex) {\n Logger.getLogger(CurtailAgent.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //initializa GUI and add listeners\n appletVal = new SetCellValues();\n appletVal.playButton.addActionListener(new listener());\n appletVal.playButton.setEnabled(true);\n appletVal.resetButton.addActionListener(new listener());\n appletVal.resetButton.setEnabled(true);\n //operate microgrid\n addBehaviour(operate);\n\n }", "static void jcmd() {\n\n }", "public void onRunActionRunnerAvailabilityChange(boolean isRunning);", "void launch();", "void launch();", "void launch();", "public interface BadgeCommand {\n\t\n\tpublic void undo();\n\n\tpublic void execute();\n\n}", "@Override\n\tpublic void action() {\n\n\t}", "public void ejecutaMetodo() {\n\t\r\n}", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "public void doInteract()\r\n\t{\n\t}", "public interface GuiNestInterface {\r\n \r\n // Agent call from backend\r\n // Takes a candy from the lane and places it in the last position of the CandyQueue\r\n public void DoPutInNest(Holdable p);\r\n\r\n // Agent call from backend\r\n // Moves the candy at the front of the queue\r\n public void DoRemoveFromNest(Holdable p);\r\n \r\n}", "public interface Launch {\r\n\tvoid Launch();\r\n}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public interface OperateListener {\n Object oper(Object obj);\n\n}", "interface ViewListener extends OnToolBarNavigationListener {\n\n /**\n * On build queue\n *\n * @param isPersonal - Is personal flag\n * @param queueToTheTop - Queue to the top\n * @param cleanAllFiles - Clean all files in the checkout directory\n */\n void onBuildQueue(boolean isPersonal,\n boolean queueToTheTop,\n boolean cleanAllFiles);\n\n /**\n * On agent selected in the dialog list\n *\n * @param agentPosition - item position which was selected\n */\n void onAgentSelected(int agentPosition);\n\n /**\n * On add parameter button click\n */\n void onAddParameterButtonClick();\n\n /**\n * On clear all parameters button click\n */\n void onClearAllParametersButtonClick();\n\n /**\n * On parameter added\n *\n * @param name - parameter name\n * @param value - parameter value\n */\n void onParameterAdded(String name, String value);\n }", "public void work() {\n\t}", "public void work() {\n\t}" ]
[ "0.5736508", "0.5736413", "0.56973654", "0.5660386", "0.55624413", "0.55579937", "0.550343", "0.5423401", "0.5423401", "0.5423401", "0.54213023", "0.54202914", "0.5382581", "0.53599787", "0.53331363", "0.5318362", "0.5300663", "0.52865726", "0.526689", "0.526689", "0.5256421", "0.5237914", "0.5234601", "0.52334756", "0.52329195", "0.5213", "0.5209317", "0.52076524", "0.52071834", "0.52025163", "0.5183023", "0.51645166", "0.516221", "0.5153747", "0.5150283", "0.51423377", "0.51422995", "0.5140675", "0.51387906", "0.51330084", "0.5128949", "0.5126823", "0.51210535", "0.5120048", "0.5103535", "0.51020974", "0.5097524", "0.5087535", "0.50861573", "0.50845706", "0.5063548", "0.5062573", "0.5050273", "0.5044467", "0.504316", "0.50342315", "0.5033977", "0.5024269", "0.50201553", "0.50196266", "0.5019027", "0.5016192", "0.50129116", "0.5012855", "0.5012855", "0.5011215", "0.5008663", "0.500861", "0.50081515", "0.5006136", "0.5004033", "0.49984837", "0.49981037", "0.4994255", "0.4994255", "0.4994255", "0.49895394", "0.49860582", "0.49850413", "0.49838462", "0.49817377", "0.497419", "0.4972451", "0.49718732", "0.4966186", "0.4965433", "0.4965433", "0.4965433", "0.49633133", "0.4960815", "0.49578795", "0.49548638", "0.4953043", "0.4948818", "0.49459746", "0.49424034", "0.49424034", "0.49387082", "0.49359617", "0.49340573", "0.49340573" ]
0.0
-1
number of valid moves sprites have made on the grid. Constructor for a new Grid.
public Grid() { this.moveCtr = 0; listOfSquares = new ArrayList<Square>(); //populating grid array with squares for(int y = 0; y < GridLock.HEIGHT; y++) { for(int x = 0; x < GridLock.WIDTH; x++) { //square coordinates go from (0,0) to (5,5) Square square; //Setting up a square which has index values x,y and the size of square. square = new Square(x, y, GridLock.SQUARE_SIZE, GridLock.SQUARE_SIZE); grid[x][y] = square; listOfSquares.add(square); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Grid ()\n {\n mGrid = new Move[3][3];\n for (int row = 0; row < 3; row++)\n for (int column = 0; column < 3; column++)\n mGrid[row][column] = new Move(Player.NONE, row, column);\n }", "Board() {\n this(INITIAL_PIECES, BLACK);\n _countBlack = 12;\n _countWhite = 12;\n _moveHistory = new ArrayList<Move>();\n _movesMade = 0;\n }", "protected void initNumOfMoves() {\n\t\tthis.numOfMoves = 0;\n\t}", "public Board()\r\n\t{\r\n\t\tthis.grid = new CellState[GRID_SIZE][GRID_SIZE];\r\n\t\tthis.whiteMarblesCount = MARBLES_COUNT;\r\n\t\tthis.blackMarblesCount = MARBLES_COUNT;\r\n\t\t\r\n\t\t/**\r\n\t\t * Initializes the board with empty value\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < GRID_SIZE; indexcol++)\r\n\t\t{\r\n\t\t\tfor (int indexrow = 0; indexrow < GRID_SIZE; indexrow++)\r\n\t\t\t{\r\n\t\t\t\tthis.grid[indexrow][indexcol] = CellState.EMPTY;\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Sets marbles on the board with default style\r\n\t\t */\r\n\t\tfor (int indexcol = 0; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[0][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[8][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 0; indexcol < 6; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[1][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[7][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tfor (int indexcol = 2; indexcol < 5; indexcol++)\r\n\t\t{\r\n\t\t\tthis.grid[2][indexcol] = CellState.WHITE_MARBLE;\r\n\t\t\tthis.grid[6][8 - indexcol] = CellState.BLACK_MARBLE;\r\n\t\t}\r\n\t\tthis.grid[3][8] = CellState.INVALID;\r\n\t\tthis.grid[2][7] = CellState.INVALID;\r\n\t\tthis.grid[1][6] = CellState.INVALID;\r\n\t\tthis.grid[0][5] = CellState.INVALID;\r\n\t\tthis.grid[5][0] = CellState.INVALID;\r\n\t\tthis.grid[6][1] = CellState.INVALID;\r\n\t\tthis.grid[7][2] = CellState.INVALID;\r\n\t\tthis.grid[8][3] = CellState.INVALID;\r\n\t}", "public Grid()\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tgrid[x]=0;\n }", "public Board() {\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n this.grid[row][col] = 0;\n }\n }\n }", "public Grid()\n {\n height = 4;\n\twidth = 4;\n\tcases = new Case[height][width];\n }", "public BattleshipGrid(int numRows, int numCols){\n \t/*\n \t//get random length for ships\n \tAIRCRAFT_CARRIER_LENGTH = 2 + rnd.nextInt(3);\n \tBATTLESHIP_LENGTH = 2 + rnd.nextInt(3);\n \tDESTROYER_LENGTH = 2 + rnd.nextInt(3);\n \tSUBMARINE_LENGTH = 2 + rnd.nextInt(3);\n \tPATROL_BOAT_LENGTH = 2 + rnd.nextInt(3);\n \t*/\n \t//set number of rows and columns\n \tNUM_ROWS = numRows;\n NUM_COLS = numCols;\n\n // initialize the grid so all cells are EMPTY\n initializeGrid();\n\n // determine the total number of hits required to win\n calculateTotalHitsRequired();\n\n // randomly place all of the ships on the grid\n placeAllShips();\n }", "GameState() {\n this.board = new int[SIZE][SIZE];\n this.prevMoves = \"\";\n this.rank = setRank();\n }", "Grid(int width, int height) {\n this.width = width;\n this.height = height;\n\n // Create the grid\n grid = new Cell[width][height];\n\n // Populate with dead cells to start\n populateGrid(grid);\n }", "public Board(int[][] tiles) {\n _N = tiles.length;\n _tiles = new int[_N][_N];\n _goal = new int[_N][_N];\n for (int i = 0; i < _N; i++) {\n for (int j = 0; j < _N; j++) {\n _tiles[i][j] = tiles[i][j];\n _goal[i][j] = 1 + j + i * _N;\n }\n }\n _goal[_N-1][_N-1] = 0;\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public Grid() { //Constructs a new grid and fills it with Blank game objects.\r\n\t\tthis.grid = new GameObject[10][10];\r\n\t\tthis.aliveShips = new Ships[4];\r\n\t\tfor (int i = 0; i < this.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.grid[i].length; j++) {\r\n\t\t\t\tthis.grid[i][j] = new Blank(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void initializeBoard(){\r\n checks =new int[][]{{0,2,0,2,0,2,0,2},\r\n {2,0,2,0,2,0,2,0},\r\n {0,2,0,2,0,2,0,2},\r\n {0,0,0,0,0,0,0,0},\r\n {0,0,0,0,0,0,0,0},\r\n {1,0,1,0,1,0,1,0},\r\n {0,1,0,1,0,1,0,1},\r\n {1,0,1,0,1,0,1,0}};\r\n }", "public GameBoard(){\r\n boardCells = new GameCell[NUMBER_OF_CELLS];\r\n for( int i= 0; i< NUMBER_OF_CELLS; i++ ){\r\n boardCells[i] = new GameCell(i);//\r\n }\r\n }", "public Grid(int[][] grid) {\n this.grid = grid;\n }", "public void setValidMoves(){\r\n int row = (int)this.space.getX();\r\n int column = (int)this.space.getY();\r\n int max = puzzleSize-1;\r\n if (row < max)\r\n this.validMoves.add(new Point(row+1, column));\r\n if (row > 0)\r\n this.validMoves.add(new Point(row-1, column));\r\n if (column < max)\r\n this.validMoves.add(new Point(row, column+1));\r\n if (column > 0)\r\n this.validMoves.add(new Point(row, column-1));\r\n }", "public Board() {\r\n\t\tthis.size = 4;\r\n\t\tthis.gameBoard = createBoard(4);\r\n\t\tthis.openTiles = 16;\r\n\t\tthis.moves = 0;\r\n\t\tthis.xValues = new boolean[4][4];\r\n\t\tthis.yValues = new boolean[4][4];\r\n\t\tthis.complete = false;\r\n\t}", "public Board(int rows, int cols) {\n\t\t_board = new ArrayList<ArrayList<String>>();\n\t\t_rand = new Random();\n\t\t_colorFileNames = new ArrayList<String>();\n\t\tfor (int i=0; i<MAX_COLORS; i=i+1) {\n\t\t\t_colorFileNames.add(\"Images/Tile-\"+i+\".png\");\n\t\t}\n\t\tfor (int r=0; r<rows; r=r+1) {\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tfor (int c=0; c<cols; c=c+1) {\n\t\t\t\trow.add(_colorFileNames.get(_rand.nextInt(_colorFileNames.size())));\n\t\t\t}\n\t\t\t_board.add(row);\n\t\t\t\n\t\t\tif(_board.size()==rows) { //board is complete\n\t\t\t\tboolean istrue = false;\n\t\t\t\tif(match(3).size()>0 || end()){ //(1)there are match //(2)there is no valid move\n\t\t\t\t\tistrue = true;\n\t\t\t\t}\n\t\t\t\tif (istrue) {\n\t\t\t\t\t_board.clear();\t\t// if istrue clear the board\n\t\t\t\t\tr=-1;\t\t\t\t// restart; r=-1, at the end of loop will add 1\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\t\t\n\t}", "Board(int rows, int cols, double ratio) {\n\n colCount = cols;\n rowCount = rows;\n\n isRunning = true;\n isWon = false;\n\n board = new Cell[rowCount][colCount];\n\n do {\n boolean hasMine;\n Random r = new Random();\n r.setSeed(System.currentTimeMillis());\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < colCount; j++) {\n hasMine = (r.nextGaussian() > ratio);\n board[i][j] = new Cell(i, j, hasMine);\n }\n }\n\n int surroundingMineCount;\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < colCount; j++) {\n if (!board[i][j].hasMine()) {\n surroundingMineCount = 0;\n\n // check surrounding fields\n for (int m = -1; m <= 1; m++) {\n for (int n = -1; n <= 1; n++) {\n if (m != 0 || n != 0) { // ignore same cell\n if (i + m >= 0 && i + m < rowCount\n && j + n >= 0 && j + n < colCount) {\n if (board[i + m][j + n].hasMine()) surroundingMineCount++;\n }\n }\n }\n }\n\n board[i][j].setSurroundingMines(surroundingMineCount);\n }\n }\n }\n\n } while(!hasBlanks());\n\n setRandomCellActive();\n }", "public Chess() {\n\t\t// TODO Auto-generated constructor stub\n\t\tchessBoard = new int[BOARD_LENGTH][BOARD_LENGTH];\n\t\tpieces = new AbstractPiece[BOARD_NUM_PIECES];\n\t\toldPosition = new Point();\n\t\tokToMove = false;\n\t\tpieceCounter = 0;\n\t\tpieceChosen = 0;\n\t\tnumClicks = 0; \n\t}", "public TicTacToeBoard() {\n grid = new Cell[N][N];\n\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++)\n grid[i][j] = new Cell(i, j, '-');\n }\n }", "@Override\n\tpublic int size() {\n\t\treturn grid.length;\n\t}", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "public Grid() {\n }", "public Board(int[][] tiles) {\n N = tiles.length; // Store dimension of passed tiles array\n this.tiles = new int[N][N]; // Instantiate instance grid of N x N size\n for (int i = 0; i < N; i++)\n this.tiles[i] = tiles[i].clone(); // Copy passed grid to instance grid\n }", "public Board() {\n tiles = new int[3][3];\n int[] values = genValues(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 0});\n\n int offset;\n for (int i = 0; i < 3; i++) {\n offset = 2 * i;\n tiles[i] = Arrays.copyOfRange(values, i + offset, i + offset + 3);\n }\n }", "public TicTacToeBoard() {board = new int[rows][columns];}", "public UIBoard()\r\n\t{\r\n\t\t//Creates a 10x10 \"Board\" object\r\n\t\tsuper(10,10);\r\n\t\tgrid = new int[getLength()][getWidth()];\r\n\t\t\r\n\t\t//Sets all coordinates to the value 0, which corresponds to \"not hit yet\"\r\n\t\tfor(int i=0; i<grid.length; i++)\r\n\t\t\tfor(int j=0; j<grid[i].length; j++)\r\n\t\t\t\tgrid[i][j] = 0;\t\t\r\n\t}", "public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }", "public void init(){\n this.grid[7][6].setWall(ERRGameMove.DOWN, false);\n this.grid[8][6].setWall(ERRGameMove.DOWN, false);\n this.grid[7][9].setWall(ERRGameMove.UP, false);\n this.grid[8][9].setWall(ERRGameMove.UP, false);\n \n this.grid[6][7].setWall(ERRGameMove.RIGHT, false);\n this.grid[6][8].setWall(ERRGameMove.RIGHT, false);\n this.grid[9][7].setWall(ERRGameMove.LEFT, false);\n this.grid[9][8].setWall(ERRGameMove.LEFT, false);\n }", "void initializeGrid() {\n int maxBombs = GridHelper.getMaxBombs((int)Math.pow(hiddenGrid.length, 2.0)); // A: How many bombs CAN this have?\n bombsPlaced = 0; // B: How many bombs DOES this have?\n int cycleCap = randomCycleCap(); // C: Sets cycleCap to a randomly generated number between 0 and 15,\n int cycleCellCount = 0; // D: cycleCap starts at zero and goes up\n\n for (int i = 0; i < hiddenGrid.length; i++) {\n for (int j = 0; j < hiddenGrid[i].length; j++) {\n\n if (hiddenGrid[i][j] == null) {\n setCell(i, j, 0); // a: initializes the null value to 0\n }\n if((cycleCellCount == cycleCap) && (bombsPlaced < maxBombs)){\n placeBomb(i, j, -1); // a: turns this cell into a bomb, increments cells around it\n cycleCellCount = 0; // b: Restarts the 'cycle counter'\n cycleCap = randomCycleCap(); // c: Gives us a new number to 'count down' to, to place the next bomb\n } else{\n ++cycleCellCount; // a. Moves to the next cell in the 'cycle' having done nothing\n }\n }\n }\n System.out.println(\"Bombs placed: \" + bombsPlaced);\n }", "public int getTotalNumberOfSprites() {\n return this.getRows() * this.getColumns();\n }", "public Board(int[][] tiles) {\n this.tiles = tiles;\n n = tiles.length;\n ham = 0;\n man = 0;\n zero = new int[2];\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (tiles[i][j] == 0) {\n zero[0] = i;\n zero[1] = j;\n continue;\n }\n if (i*n+j+1 != tiles[i][j]) {\n int val = tiles[i][j]-1;\n man += Math.abs(i-val/n) + Math.abs(j-val%n);\n ham++;\n }\n }\n }\n }", "public OthelloBoard (int height, int width){\n super(height, width);\n m_Pieces = new OthelloPiece[WIDTH][HEIGHT];\n m_PieceCount+=4;\n \n }", "public Board(ArrayList<Piece> pieces)\n {\n squares = new Square[Chess.ROWS][Chess.COLUMNS];\n setLayout(new GridLayout(Chess.ROWS,Chess.COLUMNS,0,0));\n firstSelected = null;\n mainBoard=true;\n turn = 0;\n fiftyMove = 0;\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n {\n squares[i][j] = new Square(i,j,this);\n for (Piece p: pieces)\n if (p.getOrigin().equals(new Location(i,j)))\n squares[i][j].setPiece(p);\n add(squares[i][j]);\n }\n positions = new ArrayList<>();\n positions.add(toString());\n }", "public Board(int[][] tiles) {\n n = tiles.length;\n this.tiles = deepCopy(tiles);\n }", "public GameOfLife(int rows, int cols) {\n\n\t\tgameGrid = new int [rows][cols];//arrayCell represents the number of rows and columns in the game of life\n\t\trowCount = rows;\n\t\tcolCount = cols;\n\t}", "public Game() {\n board = new TileState[BOARD_SIZE][BOARD_SIZE];\n for(int i=0; i<BOARD_SIZE; i++)\n for(int j=0; j<BOARD_SIZE; j++)\n board[i][j] = TileState.BLANK;\n movesPlayed = 0;\n playerOneTurn = true;\n gameOver = false;\n }", "private Board()\r\n {\r\n this.grid = new Box[Config.GRID_SIZE][Config.GRID_SIZE];\r\n \r\n for(int i = 0; i < Config.NB_WALLS; i++)\r\n {\r\n this.initBoxes(Wall.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_CHAIR; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_PLAYER; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n }", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public Board(int[][] saved_grid, int turn, int moves)\n {\n current_board = new int[7][6];\n for (int i = 0; i < saved_grid.length; i++)\n current_board[i] = saved_grid[i].clone();\n player_turn = turn;\n total_moves = moves;\n }", "public int getNumberOfMoves();", "public int getNumMoves() {\n\t\treturn numMoves;\n\t}", "public GameBoard(int numLanes, int yPos, int laneLength, int maxObjects){\n super(BULLET_DEPTH); //all attacks will be drawn at a depth of 20\n attacks = new ArrayList<AttackObject>(maxObjects);\n attacksToDelete = new LinkedList<>();\n attacksToAdd = new LinkedList<>();\n this.laneTopPosition = yPos;\n this.numLanes = numLanes;\n this.laneLength = laneLength;\n this.maxObjects = maxObjects;\n this.clearing = false;\n }", "public Board() {\n\t\tdimension = 9;\n\t\tpuzzle = new int[dimension][dimension];\n\t}", "public TileBoard(int n){\n\t\tsize = n;\n\t\tinitTiles();\n\t\torganizeTiles();\n\t\tsetUpInputListenerDelegator();\n\t}", "public void initializeGrid() {\n resetGrid(_lifeGrid);\n\n _lifeGrid[8][(WIDTH / 2) - 1] = 1;\n _lifeGrid[8][(WIDTH / 2) + 1] = 1;\n _lifeGrid[9][(WIDTH / 2) - 1] = 1;\n _lifeGrid[9][(WIDTH / 2) + 1] = 1;\n _lifeGrid[10][(WIDTH / 2) - 1] = 1;\n _lifeGrid[10][(WIDTH / 2)] = 1;\n _lifeGrid[10][(WIDTH / 2) + 1] = 1;\n\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public AIPlayer(Board board) {\n cells = board.squares;\n }", "private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }", "public int getBoardSize(){\n\t\treturn grids.getRows();\n\t}", "public Grid(int h,int w)\n {\n height = h;\n\twidth = w;\n\tcases = new Case[height][width];\n }", "public Board() {\n this.x = 0;\n this.o = 0;\n }", "Board() {\n this.ones = -1; // 1\n this.twos = -1; // 2\n this.threes = -1; // 3\n this.fours = -1; // 4\n this.fives = -1; // 5\n this.sixes = -1; // 6\n this.threeOfAKind = -1; // 7\n this.fourOfAKind = -1; // 8\n this.smallStraight = -1;// 9\n this.longStraight = -1; // 10\n this.fullHouse = -1; // 11\n this.yahtzee = -1; // 12\n }", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public Board(int[][] b) {\n neighbors = new LinkedList<>();\n tiles = b;\n n = b.length;\n goal = new int[n][n];\n\n int counter = 1;\n for(int x = 0; x < n; x++){\n for(int y = 0; y < n; y++){\n goal[x][y] = counter;\n counter++;\n }\n }\n goal[n-1][n-1] = 0;\n }", "public Board(int n){\n attackLeftDiag = new boolean[2*n - 1];\n attackRightDiag = new boolean[2*n - 1];\n attackSide = new boolean[n];\n \n sizeOfBoard = n;\n numberOfQueensPlaced = 0;\n \n rowUsedByColNumber = new int[n];\n validConfigOfQueens = new ArrayList<String[]>();\n QueenInRow = generatePositions();\n }", "public Board() {\n\t\tthis.table = new int[Constants.SIZE][Constants.SIZE];\n\t\tthis.P1Movable = new boolean[Constants.SIZE][Constants.SIZE];\n\t\tthis.P2Movable = new boolean[Constants.SIZE][Constants.SIZE];\n\t\tP1turn = true;\n\t\tnumPieces = 0;\n\t\t\n\t\tfor(int i=0; i<table.length; i++) {\n\t\t\tfor(int j=0; j<table[i].length; j++) {\n\t\t\t\ttable[i][j] = Constants.EMPTY;\n\t\t\t\tP1Movable[i][j] = true;\n\t\t\t\tP2Movable[i][j] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Board(int dimensions){\n this.dimensions = dimensions;\n createBoard(dimensions);\n this.status = Status.CREATED;\n this.hitsLeft = 15;\n }", "public Grid(int[] intBoard)\n\t{\n\t\tfor (int x =0;x<=8;x++)\n\t\t\tthis.grid[x]= intBoard[x];\n\t}", "public GameCheck(int[][] grid,int turn)\n {\n this.grid=grid;\n this.turn=turn;\n }", "public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }", "public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}", "public GameBoard (int height, int width)\n {\n mHeight = height;\n mWidth = width;\n }", "public int getNumberOfMoves() {\r\n return numberOfMoves;\r\n }", "public Board() {\n\n for(int row = 0; row < size; row++) {\n for(int col = 0; col < size; col++) {\n\n grid[row][col] = \"-\";\n\n }\n }\n\n }", "public Board(int n){\n openPositions = new boolean[n][n];\n numberOfQueensPlaced = 0;\n rowUsedByColNumber = new int[n];\n validConfigOfQueens = new ArrayList<String[]>();\n sizeOfBoard = n;\n QueenInRow = generatePositions();\n }", "public Board()\n\t{\n\t\tcols = DEFAULT_WIDTH;\n\t\trows = DEFAULT_HEIGHT;\n\t\t\n\t\tpieces = new int[rows][cols];\n\t\tif (pieces.length > 0)\n\t\t{\n\t\t\tfor (int i = 0; i < pieces.length; i++)\n\t\t\t\tfor (int j = 0; j < pieces[0].length; j++)\n\t\t\t\t\tpieces[i][j] = -1;\n\t\t}\n\t}", "public int getNumYTiles() { \r\n return numRows;\r\n }", "public Board(int rows, int columns) throws Exception {\n\t\tif (rows >= 8 && columns >= 8) {\n\t\t\tthis.rows = rows;\n\t\t\tthis.columns = columns;\n\t\t\tboard = new int[rows][columns];\n\t\t\tthis.bombs = (rows * columns) / 3;\n\t\t\tfillBoard();\n\t\t} else {\n\t\t\tthrow new Exception(\"Minesweeper dimensions invalid:\\nWidth: from 8 to 100\\nHeight: from 8 to 100\\nBombs: 1 to 1/3 of squares\");\n\t\t}\n\t}", "public Board()\r\n {\r\n board = new Piece[8][8];\r\n xLength = yLength = 8;\r\n }", "int getNumberOfStonesOnBoard();", "public RegularGrid() {\r\n }", "@Override\r\n\t@Basic\r\n\tpublic int getNbSquares() {\r\n\t\treturn squares.size();\r\n\t}", "private void initializeBoard() {\n\n squares = new Square[8][8];\n\n // Sets the initial turn to the White Player\n turn = white;\n\n final int maxSquares = 8;\n for(int i = 0; i < maxSquares; i ++) {\n for (int j = 0; j < maxSquares; j ++) {\n\n Square square = new Square(j, i);\n Piece piece;\n Player player;\n\n if (i < 2) {\n player = black;\n } else {\n player = white;\n }\n\n if (i == 0 || i == 7) {\n switch(j) {\n case 3:\n piece = new Queen(player, square);\n break;\n case 4:\n piece = new King(player, square);\n break;\n case 2:\n case 5:\n piece = new Bishop(player, square);\n break;\n case 1:\n case 6:\n piece = new Knight(player, square);\n break;\n default:\n piece = new Rook(player, square);\n }\n square.setPiece(piece);\n } else if (i == 1 || i == 6) {\n piece = new Pawn(player, square);\n square.setPiece(piece);\n }\n squares[j][i] = square;\n }\n }\n }", "public int getMoveCount() {\r\n return this.moveCount;\r\n }", "public void initGrid()\n {\n\tfor (int y=0; y<cases.length; y++)\n \t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tcases[y][x] = new Case();\n }\n\t}\n\t\n\tint pos_y_case1 = customRandom(4);\n\tint pos_x_case1 = customRandom(4);\n\t\n\tint pos_y_case2 = customRandom(4);\n\tint pos_x_case2 = customRandom(4);\n\t\t\n\twhile ((pos_y_case1 == pos_y_case2) && (pos_x_case1 == pos_x_case2))\n\t{\n pos_y_case2 = customRandom(4);\n pos_x_case2 = customRandom(4);\n\t}\n\t\t\n\tcases[pos_y_case1][pos_x_case1] = new Case(true);\n\tcases[pos_y_case2][pos_x_case2] = new Case(true);\n }", "private void initializeCMNGame() {\n\t\t// populate the moveList with all the possible moves for the\n\t\t// given values of C,M,N\n\n\t\tNUMBER_OF_MOVES = MM + 1;\n\n\t\tmoves1 = new TreeSet<CMNMove>();\n\t\tmoves2 = new TreeSet<CMNMove>();\n\t\tmovesLeft = new TreeSet<CMNMove>();\n\n\t\tfor (int i = 0; i < NUMBER_OF_MOVES; i++)\n\t\t\tmoveList.add(new CMNMove(i));\n\n\t\tmoves1.clear();\n\t\tmoves2.clear();\n\t\tmovesLeft.clear();\n\t\tmovesLeft.addAll(moveList);\n\n\t\tsetWinningTuples();\n\t}", "public GameState(Cell[][] board, int difficulty, int mines) {\n\t\tthis.board = board;\n\t\tthis.dimensions = board.length;\n\t\tthis.difficulty = difficulty;\n\t\tthis.mines = mines;\n\t}", "@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }", "public Cell()\n\t{\n\t\tthis.alive = 0;\n\t\tthis.neighbors = 0;\n\t}", "public int getGridRows() \n { \n return gridRows; \n }", "public Board(int boardHeight, int boardWidth) {\n this.boardWidth = boardHeight+1;\n this.boardHeight = boardWidth+1;\n this.board = new char[this.boardHeight][this.boardWidth];\n this.numShips = 0;\n boardInit();\n }", "public MapGrid(){\n\t\tthis.cell = 25;\n\t\tthis.map = new Node[this.width][this.height];\n\t}", "public Board(int[][] grid, Tetrimino piece) {\n //initComponents();\n this.grid = grid;\n this.piece = piece;\n setLayout(new GridLayout(grid.length-4, grid[0].length));\n init();\n }", "public Board2048model() {\r\n\t\tsuper(4, 4);\r\n\t\tgame = new Cell2048[this.rows_size][this.columns_size];\r\n\t\tscore = 0;\r\n\t\t\r\n\t\tfor(int i = 0 ; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\tgame[i][j] = new Cell2048();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\tint value1 = rand.nextInt(this.columns_size);\r\n\t\tint value2 = rand.nextInt(this.rows_size);\r\n\t\tint value3 = rand.nextInt(this.columns_size);\r\n\t\tint value4=rand.nextInt(this.rows_size); \r\n\t\t\r\n\t\twhile ( (value1 == value3) && (value2 == value4) ) {\r\n\t\t\tvalue3 = rand.nextInt(this.columns_size);\r\n\t\t\tvalue4=rand.nextInt(this.rows_size); \r\n\t\t}\r\n\t\tthis.game[value1][value2].setValue(randomValue());\r\n\t\tthis.game[value3][value4].setValue(randomValue());\r\n\t\tscore = 0;\r\n\t\tfreeCells -= 2;\r\n\t\ttakenCells += 2;\r\n\t\t\r\n\t}", "public Board() {\n for (int y = 0; y < spaces.length; y++) {\n for (int x = 0; x < spaces[0].length; x++) {\n spaces[y][x] = new SubBoard();\n wonBoards[y][x] = ' ';\n }\n }\n }", "public int getMoveCount() {\r\n\t\treturn moveCount;\r\n\r\n\t}", "public Board() {\n playerNumber = 2;\n deadBlackCount = 0;\n deadWhiteCount = 0;\n deadRedCount = 0;\n deadBlueCount = 0;\n\n fields = new Field[DIMENSION][DIMENSION];\n // init fields\n for (int i = 0; i < DIMENSION; i++) {\n for (int j = 0; j < DIMENSION; j++) {\n fields[i][j] = new Field();\n fields[i][j].setX(i);\n fields[i][j].setY(j);\n }\n }\n }", "void raiseNumberOfStonesOnBoard();", "public PositionInTheGameBoard()\r\n\t{\r\n\t\tthis.X = new Random().nextInt(PositionInTheGameBoard.max_X);\r\n\t\tthis.Y = new Random().nextInt(PositionInTheGameBoard.max_Y);\r\n\t}", "public int getMoveCount() {\n\t\treturn moveCount;\n\t}", "public Board() {\n\t\tintializeBoard(_RowCountDefault, _ColumnCountDefault, _CountToWinDefault);\n\t}", "int movesMade() {\n return _moves.size();\n }", "public int getWidth(){\r\n\t\treturn grid.length;\r\n\t}", "public void initializeBoard() {\r\n int x;\r\n int y;\r\n\r\n this.loc = this.userColors();\r\n\r\n this.board = new ArrayList<ACell>();\r\n\r\n for (y = -1; y < this.blocks + 1; y += 1) {\r\n for (x = -1; x < this.blocks + 1; x += 1) {\r\n ACell nextCell;\r\n\r\n if (x == -1 || x == this.blocks || y == -1 || y == this.blocks) {\r\n nextCell = new EndCell(x, y);\r\n } else {\r\n nextCell = new Cell(x, y, this.randColor(), false);\r\n }\r\n if (x == 0 && y == 0) {\r\n nextCell.flood();\r\n }\r\n this.board.add(nextCell);\r\n }\r\n }\r\n this.stitchCells();\r\n this.indexHelp(0, 0).floodInitStarter();\r\n }", "public TicTacToe(int n) {\n board = new int[n][n];\n this.n = n;\n }" ]
[ "0.67594737", "0.6539017", "0.6443412", "0.64267164", "0.63723236", "0.6292118", "0.6260198", "0.61590594", "0.6156941", "0.6154743", "0.61312705", "0.61196333", "0.60799706", "0.6022006", "0.60191107", "0.59889024", "0.5985234", "0.5973324", "0.59695023", "0.5968636", "0.5952841", "0.5941704", "0.59370047", "0.59295774", "0.59214085", "0.59051394", "0.5903301", "0.58826596", "0.5859637", "0.58595043", "0.5859233", "0.5852416", "0.58498996", "0.58461136", "0.5843255", "0.5835793", "0.58301073", "0.5823751", "0.58172035", "0.5815375", "0.5814089", "0.5812536", "0.5805714", "0.5805478", "0.5793384", "0.57928914", "0.5792483", "0.57861966", "0.5785708", "0.57853734", "0.57841873", "0.5780877", "0.57747436", "0.5766008", "0.5764833", "0.5756243", "0.57504666", "0.57327217", "0.57287514", "0.5722291", "0.57201225", "0.5718376", "0.57139313", "0.5707883", "0.569932", "0.5698327", "0.56915206", "0.5691308", "0.56816036", "0.5680075", "0.56791687", "0.5669747", "0.56683964", "0.56630766", "0.5661306", "0.564313", "0.56425625", "0.56374556", "0.5631976", "0.563193", "0.56314933", "0.5629098", "0.562814", "0.56237584", "0.56235296", "0.5623254", "0.56185234", "0.56080526", "0.5605238", "0.55979925", "0.55902696", "0.5588116", "0.5582087", "0.55806637", "0.5579836", "0.55718946", "0.55678594", "0.5565808", "0.5561092", "0.5560049" ]
0.6823967
0
Getter method for the squares in the grid.
public ArrayList<Square> getListOfSquares(){ return this.listOfSquares; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Square> getSquareGrid();", "public Square[][] getSquares()\n {\n return squares;\n }", "public Square[][] getSquares() {\n \treturn squares;\n }", "public Square[][] getGrid() {\n\t\treturn this.grid;\n\t}", "@Override\r\n\t@Basic\r\n\tpublic Collection<Square> getSquares() {\r\n\t\treturn squares.values();\r\n\t}", "public SmartList<Square> getSquares() {\n return new SmartList<Square>(this.squares).freeze();\n }", "public ArrayList<Square> getSquares(){\n return bSquares;\n }", "public Box[][] getGrid() {\n return this.grid;\n }", "public Grid grid() { return grid; }", "public GRect getSquare() {\n\t\treturn square;\n\t}", "public Rectangle getSquare(){\n\t\treturn this.square;\n\t}", "@Override\n public Tile[][] getGrid() { return grid; }", "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "@Override\r\n\t@Basic\r\n\tpublic int getNbSquares() {\r\n\t\treturn squares.size();\r\n\t}", "private ArrayList<GameSquare> getAdjacentSquares()\n {\n ArrayList<GameSquare> list = new ArrayList<GameSquare>();\n for (int r = row - 1; r <= row + 1; r++)\n {\n if (r >= 0 && r < grid.length)\n {\n for (int c = col - 1; c <= col + 1; c++)\n {\n if (c >= 0 && c < grid[0].length)\n {\n list.add(grid[r][c]);\n }\n }\n }\n }\n return list;\n }", "public ArrayList<PathSquare> getSquares() {\n\t\treturn new ArrayList<PathSquare>(pathSquares);\n\t}", "public Grid getGrid()\n {\n \treturn puzzle;\n }", "public int[][] getGrid()\n {\n return grid;\n }", "public Cell[][] getGrid() {\n return grid;\n }", "Square getSquare(int x, int y){\n return board[x][y];\n }", "public Square getSquare() {\n\t\treturn new Square(y, x);\n\t}", "protected BattleGrid getGrid() {\n return grid;\n }", "public Grid getGrid() {\n return myGrid;\n }", "protected BoardGrid getGrid() {\n return GameController.getInstance().getGrid();\n }", "public TetrisGrid getGrid()\r\n\t{\r\n\t\treturn grid;\r\n\t}", "public GameCell[] getBoardCells(){\r\n return this.boardCells;\r\n }", "public abstract Grid<?> getGrid();", "public Grid getGrid() {\n \t\treturn grid;\n \t}", "public Square getfield(int number){\n return this.mySquares[number];\n }", "public static ArrayList<Grid> getGrids() {\n\n return grids;\n }", "public ArrayList<MahjongSolitaireTile>[][] getTileGrid() \n { \n return tileGrid; \n }", "public int getGridRows() \n { \n return gridRows; \n }", "public Square getSquareAtPosition(int x, int y) {\n\t\treturn this.grid[x][y];\n\t}", "public Pawn[][] getBoardGrid() {\n\t\treturn boardGrid;\n\t}", "Square getSquare(int x, int y);", "public Piece[][] getCells() {\n return cells;\n }", "public GridPane getGrid(){\n\t\treturn myGrid;\n\t}", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "public GridDisplay getGrid(){\n\t\treturn this.display.gridDisplay;\n\t\t//return this.grid;\n\t}", "private int squareHeight() {\n return (int) getSize().getHeight() / BOARD_HEIGHT;\n }", "public int getSquareNumber() {\n\t\treturn squareNumber;\n\t}", "public GridPane getGrid() {\n return grid;\n }", "public InventoryRange getGrid() {\n \t\treturn this.grid;\n \t}", "public int getGridColumns() \n { \n return gridColumns; \n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public final Paint getGridPaint() {\n return gridPaint;\n }", "public Square getSquare(int[] coords) {\n return squares[coords[0]][coords[1]];\n }", "public int getSquareLocation()\n\t\t{\n\t\t\treturn location; // return location of square\n\t\t}", "public Square getSquare(Location loc)\n {\n return squares[loc.getRow()][loc.getCol()];\n }", "public Square getCircleSquare(){\n return circleSquare;\n }", "public Grid() {\n\t\tthis.moveCtr = 0; \n\t\tlistOfSquares = new ArrayList<Square>();\n\t\t//populating grid array with squares\n\t\tfor(int y = 0; y < GridLock.HEIGHT; y++) {\n\t \tfor(int x = 0; x < GridLock.WIDTH; x++) { //square coordinates go from (0,0) to (5,5)\n\t \tSquare square;\n\t \t//Setting up a square which has index values x,y and the size of square.\n\t\t\t\t\tsquare = new Square(x, y, GridLock.SQUARE_SIZE, GridLock.SQUARE_SIZE); \n\t\t\t\t\tgrid[x][y] = square;\n\t\t\t\t\tlistOfSquares.add(square);\n\t \t\t\t\t\t\n\t \t\t}\n\t \t}\n \t\n }", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "public interface Grid {\n /**\n * @name getCell\n * @desc Ritorna la cella specificata dai parametri.\n * @param {int} x - Rappresenta la coordinata x della cella.\n * @param {int} y - Rappresenta la coordinata y della cella.\n * @returns {Client.Games.Battleship.Types.Cell}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell getCell(int x, int y);\n /**\n * @name getHeigth\n * @desc Ritorna l'altezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getHeight();\n /**\n * @name getLength\n * @desc Ritorna la lunghezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getLength();\n /**\n * @name Equals\n * @desc Ritorna true se i grid sono uguali.\n * @returns {boolean}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public boolean equals(Grid grid);\n /**\n * @name getGrid\n * @desc Ritorna la la griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell [][] getCells();\n}", "public Creature[][] getGrid()\n\t{\n\t\treturn grid;\n\t}", "public int[][] get() {\r\n return gameBoard;\r\n }", "public abstract Regionlike getGridBounds();", "final Piece get(Square s) {\r\n return get(s.col(), s.row());\r\n }", "public FloorTile[][] getBoard(){\r\n return board;\r\n }", "public boolean getGrid(int x, int y){\n\t\treturn grid[x][y];\n\t}", "public int getGridWidth() { return gridWidth; }", "public int getSquareNumber(int x, int y){\n return board[x][y].getNumber();\n }", "public ArrayList<Location> getLocations()\n {\n ArrayList<Location> locs = new ArrayList<>();\n for (int row = 0; row < squares.length; row++)\n {\n for (int col = 0; col < squares[0].length; col++)\n {\n locs.add(new Location(row,col));\n }\n }\n return locs;\n }", "public GridSize getGridSize()\n {\n return this.gridSize.clone();\n }", "public SquareAbstract getSquare(int row, int col){\n\n try {\n return squares.get(row).get(col);\n }\n catch (IndexOutOfBoundsException e){\n return null;\n }\n\n }", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }", "public Square getSquareAt(int row, int col) {\n return playingBoard[row][col];\n }", "public char getGrid(int x ,int y){\n\t\treturn Grid[x][y] ;\n\t}", "public boolean getGrid(int x, int y) {\n\t\tif ((x < 0) || (x > width)) {\n\t\t\treturn true;\n\t\t} else if ((y < 0) || (y > height)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn grid[x][y]; // YOUR CODE HERE\n\t\t}\n\t}", "Square kingPosition() {\r\n return king;\r\n }", "public void createSquares() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n playingBoard[row][col] = new Square();\n }\n }\n }", "@Override\r\n\tpublic Integer getCell(Integer x, Integer y) {\n\t\treturn game[x][y];\r\n\t}", "public GridAlg getGrid() {\n\t\treturn grid;\n\t}", "boolean isPaintedSquare(int row, int col) {\n return grid[row][col];\n }", "public GridShape getGridShape() {\n \n // Ensure that we have a grid shape\n if(mGridShape == null) {\n \n // Create a grid shape\n mGridShape = new GridShape();\n \n // Ensure the grid is the correct size\n mGridShape.resize( getActualWidthInTiles(), getActualHeightInTiles() );\n mGridShape.setCellSize( getActualTileWidth(), getActualTileHeight() );\n \n // Update the color information\n for(int x = 0; x < getActualWidthInTiles(); x++) {\n for(int y = 0; y < getActualHeightInTiles(); y++) {\n \n PathTile tile = mPathTiles[ (y * getActualWidthInTiles()) + x];\n Color col;\n \n if(tile.blockAir() && tile.blockLand() && tile.blockSea()) {\n col = Color.BLACK();\n }else if(tile.blockAir()) { col = Color.BLUE(); }\n else if(tile.blockLand()) { col = Color.RED(); }\n else if(tile.blockSea()) { col = Color.GREEN(); }\n else {\n col = Color.WHITE();\n }\n \n col.setAlpha( 128 );\n \n mGridShape.setColor(x, y, col);\n \n }\n }\n \n }\n \n return mGridShape;\n }", "public Tile[][] getBoard() {\r\n return board;\r\n }", "public int[][] getRawGrid()\n\t{\n\t\treturn grid;\n\t}", "@Override\r\n\t@Basic\r\n\tpublic Square getSquareAt(Point position) {\r\n\t\t// get() does an equality check, not a reference check\r\n\t\treturn squares.get(position);\r\n\t}", "public Color getGridColor() {\n return this.gridColor;\n }", "public int getGridDimensions() {\n return GRID_DIMENSIONS;\n }", "public abstract float getSquareSize();", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "public Grid() {\n setPreferredSize(new Dimension(960, 640));\n setBounds(0, 0, 960, 640);\n setLayout(null);\n setBackground(Color.black);\n this.size = 30;\n squares = new Square[size][20];\n }", "public RadarGrid getRadarGrid() {\n return rangeRings;\n }", "public SquareGrid(int width, int height) {\n this.width = width;\n this.height = height;\n }", "@Override\n public Square getSquare() {\n return null;\n }", "public GridCoord getCoord() {\n return coord;\n }", "public Square getSquare(int row, int col) {\n Assert.isTrue(validateCoordinates(row, col));\n\n return this.squares.get(row * this.width + col);\n }", "@Override\r\n\tpublic SquareIterator iterator() {\r\n\t\treturn new SquareIterator() {\r\n\t\t\t/**\r\n\t\t\t * Check whether this iterator has a next element\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tpublic boolean hasNext() {\r\n\t\t\t\treturn master.hasNext();\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * Retrieve the next element in iteration.\r\n\t\t\t * @return a square that also belong to this dungeon.\r\n\t\t\t * \t\t| hasAsSquare(result)\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tpublic Square next() {\r\n\t\t\t\treturn master.next().getValue();\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * Retrieve the next entry in iteration.\r\n\t\t\t * @return A key value pair that hold a square and its position in this dungeon.\r\n\t\t\t * \t\t| getPositionOfSquare(result.getValue()) == result.getKey()\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tpublic SimpleEntry<Point, Square> nextEntry() {\r\n\t\t\t\tMap.Entry<Point, Square> e = master.next();\r\n\t\t\t\treturn new SimpleEntry<Point, Square>(e.getKey(), e.getValue());\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * The remove operation is not implemented\r\n\t\t\t */\r\n\t\t\t@Override\r\n\t\t\tpublic void remove() {\r\n\t\t\t\tthrow new UnsupportedOperationException();\r\n\t\t\t}\r\n\r\n\t\t\tprivate Iterator<Map.Entry<Point, Square>> master = squares.entrySet().iterator();\r\n\t\t};\r\n\t}", "public CellGrid getCellGrid() {\n return cellGrid;\n }", "public abstract Rectangle getSnapshotSquareBounds();", "public Square getSquare(int x, int y) {\n\t\tif (x < 0 || y < 0 || x > width - 1 || y > height - 1) {\n\t\t\tthrow new IllegalArgumentException(\"Array index out of bounds.\");\n\t\t}\n\n\t\treturn squares[y][x];\n\t}", "int getBoardSize() {\n return row * column;\n }", "public int[][] getBoard();", "public List<Grid> getGrids() {\n\tList<Grid> grids = new ArrayList<Grid>();\n\tList<Line> currentLines = _path;\n\twhile(currentLines.size()>1) {\n\t Grid grid = new Grid();\n\t grids.add(grid);\n\t List<Line> nonOverlappingLines = grid.overlapping(currentLines);\n\t \t \n\t Double[] xs = grid.xs();\n\t Double[] ys = grid.ys();\n\t \n\t if (xs.length>3 && ys.length>3) {\n\t\tDouble minx = xs[0];\n\t\tDouble maxx = xs[xs.length-1];\n\t\t\n\t\tDouble miny = ys[0];\n\t\tDouble maxy = ys[ys.length-1];\n\t\t\n\t\tfor(int i=0; i<xs.length; i++) {\n\t\t System.out.println(\"Line: \" + xs[i].toString() + \",\" + miny.toString() + \",\" + xs[i].toString() + \",\" + maxy.toString());\n\t\t}\n\t\tfor(int i=0; i<ys.length; i++) {\n\t\t System.out.println(\"Line: \" + minx.toString() + \",\" + ys[i].toString() + \",\" + maxx.toString() + \",\" + ys[i].toString());\n\t\t}\n\t }\n\n\t currentLines = nonOverlappingLines;\n\t}\n\treturn grids;\n }", "public int getReuseGrid()\n {\n return this.reuseGrid;\n }", "public Piece[][] getBoard() {\n return _board;\n }", "public final Stroke getGridStroke() {\n return gridStroke;\n }", "private void drawSquares() {\n for (Square square : gui.game) {\n new SquareRenderer(gui, g2, square);\n }\n }", "public static int[][] GetValues() {\n\t\t\treturn gridValues;\n\t\t}" ]
[ "0.8242964", "0.78479904", "0.7811558", "0.770363", "0.7616684", "0.74297106", "0.72383183", "0.7145604", "0.71284384", "0.7085531", "0.7033413", "0.70132256", "0.69985026", "0.6942467", "0.69003755", "0.6887692", "0.6884769", "0.6877283", "0.6848207", "0.682364", "0.6774689", "0.67376715", "0.6689861", "0.6679447", "0.665259", "0.6642707", "0.6632098", "0.6631567", "0.6626197", "0.6556179", "0.655142", "0.6547865", "0.65194196", "0.64828664", "0.6439789", "0.6437464", "0.6421711", "0.6385124", "0.6367908", "0.636403", "0.6350222", "0.63372767", "0.6327277", "0.6306451", "0.63056606", "0.63023376", "0.6301038", "0.6299367", "0.6296839", "0.627707", "0.6268499", "0.6268187", "0.6266964", "0.62647545", "0.6264587", "0.62600327", "0.6241031", "0.62322193", "0.62291324", "0.6188092", "0.6179043", "0.617583", "0.6170736", "0.6151207", "0.6148508", "0.6134827", "0.61320364", "0.6124642", "0.61229193", "0.61155844", "0.61145645", "0.61078924", "0.61026525", "0.609418", "0.6079683", "0.6073451", "0.6065372", "0.606509", "0.604936", "0.60397756", "0.6025912", "0.60169005", "0.60086626", "0.6003253", "0.60008013", "0.5997731", "0.59921247", "0.59908426", "0.5990111", "0.5987239", "0.59820676", "0.5977088", "0.59701264", "0.5968352", "0.59677804", "0.59635067", "0.59466785", "0.59304416", "0.5926953", "0.59239984" ]
0.7101618
9
Getter method for the grid array itself.
public Square[][] getGrid() { return this.grid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Tile[][] getGrid() { return grid; }", "public int[][] getGrid()\n {\n return grid;\n }", "public Cell[][] getGrid() {\n return grid;\n }", "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "public Box[][] getGrid() {\n return this.grid;\n }", "public Grid grid() { return grid; }", "public int[][] getRawGrid()\n\t{\n\t\treturn grid;\n\t}", "public Grid getGrid() {\n return myGrid;\n }", "public Grid getGrid() {\n \t\treturn grid;\n \t}", "protected BoardGrid getGrid() {\n return GameController.getInstance().getGrid();\n }", "public abstract Grid<?> getGrid();", "public int getGridRows() \n { \n return gridRows; \n }", "public GridPane getGrid() {\n return grid;\n }", "public GridPane getGrid(){\n\t\treturn myGrid;\n\t}", "public Creature[][] getGrid()\n\t{\n\t\treturn grid;\n\t}", "public ArrayList<MahjongSolitaireTile>[][] getTileGrid() \n { \n return tileGrid; \n }", "public Grid getGrid()\n {\n \treturn puzzle;\n }", "protected BattleGrid getGrid() {\n return grid;\n }", "public TetrisGrid getGrid()\r\n\t{\r\n\t\treturn grid;\r\n\t}", "public GridDisplay getGrid(){\n\t\treturn this.display.gridDisplay;\n\t\t//return this.grid;\n\t}", "public int getGridColumns() \n { \n return gridColumns; \n }", "@Override\n public Object getNDArray() {\n NDArray<?>[] arr = new NDArray[2];\n arr[0] = new NDArray<>(getMagGrid().getFloats(), getMagGrid().getYdim(),\n getMagGrid().getXdim());\n arr[1] = new NDArray<>(getDirGrid().getFloats(), getDirGrid().getYdim(),\n getDirGrid().getXdim());\n return arr;\n }", "public abstract ArrayList<Cell> getSelfArray();", "public int[] getCurrentPieceGridPosition() {\n\t\treturn currentPieceGridPosition; \n\t}", "public int[][] get() {\r\n return gameBoard;\r\n }", "public CellGrid getCellGrid() {\n return cellGrid;\n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public double[][] getM_grid() {\n return m_grid;\n }", "public GameCell[] getBoardCells(){\r\n return this.boardCells;\r\n }", "public GridAlg getGrid() {\n\t\treturn grid;\n\t}", "public GridCoord getCoord() {\n return coord;\n }", "public Color getGridColor() {\n return this.gridColor;\n }", "public Marker[][] getBoard() { return board; }", "public Move getGridElement (int row, int column)\n {\n return mGrid[row][column];\n }", "public static int[][] GetValues() {\n\t\t\treturn gridValues;\n\t\t}", "public FloorTile[][] getBoard(){\r\n return board;\r\n }", "public Pawn[][] getBoardGrid() {\n\t\treturn boardGrid;\n\t}", "public GoLCell[][] getCellArray() {\n return gameBoard;\n }", "public int getGridWidth() { return gridWidth; }", "public final Paint getGridPaint() {\n return gridPaint;\n }", "public double[] getOrdinateGrid() {\n return yArr.clone();\n }", "public InventoryRange getGrid() {\n \t\treturn this.grid;\n \t}", "public Cube[][] getCubeGrid() {\n return cubeGrid;\n }", "public int getReuseGrid()\n {\n return this.reuseGrid;\n }", "public int getGridX() {\r\n\t\treturn gridX;\r\n\t}", "public boolean getGrid(int x, int y){\n\t\treturn grid[x][y];\n\t}", "public Tile[][] getBoard() {\r\n return board;\r\n }", "public GridSize getGridSize()\n {\n return this.gridSize.clone();\n }", "public char getGrid(int x ,int y){\n\t\treturn Grid[x][y] ;\n\t}", "public Cell[][] getCells() {\n return cells;\n }", "public Piece[][] getCells() {\n return cells;\n }", "public GoLCell[][] getCells()\n\t{\n\t\treturn this.myGoLCell;\n\t}", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "public int getCell() {\n return this.cell;\n }", "public int getWidth(){\r\n\t\treturn grid.length;\r\n\t}", "public GridCoord getCoord() {\n\t\treturn this.coord;\n\t}", "@Deprecated\n\tprotected CellPaneGrid<T> getGrid() {\n\t\treturn grid;\n\t}", "public JsonArray getGridInfo() {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"/wapi/v2.3/grid\");\r\n\t\tsb.append(\"?_return_type=json\");\r\n\t\t\r\n\t\tString value = restClient.Get(sb.toString(), null);\r\n\t\t\r\n\t\tif (value == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// Change unescape-unicode\r\n\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\r\n\t\t// JsonArray Parser\r\n\t\treturn JsonUtils.parseJsonArray(value);\r\n\t}", "public List<Square> getSquareGrid();", "public int[] getCol() { return _col; }", "public static ArrayList<Grid> getGrids() {\n\n return grids;\n }", "public int getHeight(){\r\n\t\treturn grid[0].length;\r\n\t}", "public Integer[][] GetCurrentBoard()\n {\n return new Integer[2][3];\n }", "protected Integer getGridHeight () {\n\t\treturn null ; \n\t}", "public int getGridDimensions() {\n return GRID_DIMENSIONS;\n }", "public float[][][] getFluidGrid() {\n return fluidGrid;\n }", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public Pane getPane() {\n return grid;\n }", "Piece[][] getPieces() {\n return _pieces;\n }", "public boolean[][] getCells() {\n return cells;\n }", "public int[] getRow() { return _row; }", "public int[][] getBoard();", "protected Object[][] getContents() {\r\n return contents;\r\n }", "public int getArrayIndex(){\n return squareIndex * 9 + position;\n }", "public Integer[][] getBoard() {\n\t\treturn _board;\n\t}", "public interface Grid {\n /**\n * @name getCell\n * @desc Ritorna la cella specificata dai parametri.\n * @param {int} x - Rappresenta la coordinata x della cella.\n * @param {int} y - Rappresenta la coordinata y della cella.\n * @returns {Client.Games.Battleship.Types.Cell}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell getCell(int x, int y);\n /**\n * @name getHeigth\n * @desc Ritorna l'altezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getHeight();\n /**\n * @name getLength\n * @desc Ritorna la lunghezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getLength();\n /**\n * @name Equals\n * @desc Ritorna true se i grid sono uguali.\n * @returns {boolean}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public boolean equals(Grid grid);\n /**\n * @name getGrid\n * @desc Ritorna la la griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell [][] getCells();\n}", "public Color getMajorGridColor() {\r\n return majorGridColor;\r\n }", "public double[] getAbscissaGrid() {\n return xArr.clone();\n }", "@Override\n\tpublic int size() {\n\t\treturn grid.length;\n\t}", "public Piece[][] getBoard() {\n return _board;\n }", "public RadarGrid getRadarGrid() {\n return rangeRings;\n }", "public double[] element() {\n\t\treturn _coordinates;\n\t}", "public JSONArray getGridData() {\r\n\t\t/*\r\n\t\t * Must be overridden\r\n\t\t */\r\n\t\treturn null;\r\n\t}", "public GridLocation(){ //of the grid at the moment\n charactersOccupiedTheLocation=new Object[4];\n }", "public int[][] getBoard() {\r\n\t\treturn board;\r\n\t}", "public int getGridY() {\r\n\t\treturn gridY;\r\n\t}", "public boolean getData(int x,int y){\r\n\t\treturn grid[x][y];\r\n\t}", "protected Object[] getArray(){\r\n\t \treturn array;\r\n\t }", "public abstract Regionlike getGridBounds();", "public double getValue(int X, int Y)\n {\n return m_grid[X][Y];\n }", "public Marble getCellGridMarket(int i, int j){\n return market.getCellGrid(i,j);\n }", "public Grid2DByte getWeatherGrid() {\n if (useCache && (cacheId != null)) {\n try {\n @SuppressWarnings(\"unchecked\")\n ICache<IGrid2D> diskCache = CacheFactory.getInstance()\n .getCache(\"GFE\");\n\n return (Grid2DByte) diskCache.getFromCache(cacheId);\n } catch (CacheException e) {\n statusHandler.handle(Priority.ERROR,\n \"Unable to load data from GFE cache.\", e);\n }\n }\n\n return this.weatherGrid;\n }", "public int[][] getBoard() {\n\t\treturn board;\n\t}", "public abstract int[] getCoords();", "public Piece[][] getBoard(){\r\n\t\treturn this.board;\r\n\t}", "public String getGridName() {\n return gridName;\n }", "public int[] getInnerArray() {\n\t\treturn data;\n\t}", "Color get(int col, int row) {\n return _board[row][col]; // FIXED.\n }", "public short getGridSize() {\n\t\treturn gridSize;\n\t}", "public int[] getBoard() {\n\t return board;\n }" ]
[ "0.77397084", "0.7696455", "0.7583141", "0.7541405", "0.7375339", "0.734105", "0.7163139", "0.7127359", "0.70839804", "0.69659585", "0.69587535", "0.69456553", "0.6944357", "0.6943914", "0.6937089", "0.6925997", "0.68601525", "0.68540025", "0.6844777", "0.6842089", "0.68347913", "0.68267125", "0.6724855", "0.67199844", "0.6708835", "0.6703157", "0.66976595", "0.6697651", "0.66367126", "0.657354", "0.65690845", "0.65645623", "0.6482961", "0.64732426", "0.6471051", "0.64699686", "0.6469456", "0.646192", "0.64486927", "0.6408747", "0.6404315", "0.639321", "0.6389908", "0.6369571", "0.63690066", "0.62863827", "0.62723786", "0.6260504", "0.62503546", "0.6247316", "0.62446", "0.62279975", "0.6218505", "0.6203203", "0.6202505", "0.61844337", "0.6176599", "0.61750174", "0.61437255", "0.61430603", "0.6141734", "0.6130284", "0.6109583", "0.61078405", "0.6092213", "0.6084407", "0.60826784", "0.60792464", "0.60735387", "0.6040331", "0.601552", "0.60147136", "0.60079974", "0.60001224", "0.59958106", "0.59944755", "0.5992442", "0.5988386", "0.59805006", "0.5963321", "0.5958789", "0.5958681", "0.5958341", "0.59577906", "0.59543306", "0.5952662", "0.594109", "0.5925636", "0.59130514", "0.59108865", "0.59067035", "0.59060293", "0.58994013", "0.5896951", "0.5895046", "0.588883", "0.5886323", "0.5878613", "0.58776087", "0.5877312" ]
0.72462237
6
Getter method for the square object at the index coordinates
public Square getSquareAtPosition(int x, int y) { return this.grid[x][y]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t@Basic\r\n\tpublic Square getSquareAt(Point position) {\r\n\t\t// get() does an equality check, not a reference check\r\n\t\treturn squares.get(position);\r\n\t}", "Square getSquare(int x, int y);", "Square getSquare(int x, int y){\n return board[x][y];\n }", "public GeometricalObject getObject(int index);", "GeometricalObject getObject(int index);", "public Square getSquare(int[] coords) {\n return squares[coords[0]][coords[1]];\n }", "public Square getSquare() {\n\t\treturn new Square(y, x);\n\t}", "public int x (int index) { return coords[index][0]; }", "public Square getfield(int number){\n return this.mySquares[number];\n }", "public int getSquareLocation()\n\t\t{\n\t\t\treturn location; // return location of square\n\t\t}", "public GeoSquare getSquare(int latIndex, int longIndex) {\r\n\tif (squares.containsKey(latIndex)) {\r\n\t if (squares.get(latIndex).containsKey(longIndex))\r\n\t\treturn squares.get(latIndex).get(longIndex);\r\n\t}\r\n\treturn new GeoSquare();\r\n }", "public int getArrayIndex(){\n return squareIndex * 9 + position;\n }", "public int y (int index) { return coords[index][1]; }", "Coordinates getCoordinates(int rowIndex);", "private static int getSquarePosition(int index) {\n return (((index/3)%3)+1)+3*(((index/9)/3)+1);\n }", "public Square getSquare(Location loc)\n {\n return squares[loc.getRow()][loc.getCol()];\n }", "public Square getElement(int index) {\n Square tmp = this.head;\n for (int i = 0; i < index; i++) {\n tmp = tmp.getNext();\n }\n return tmp;\n }", "Square getCurrentPosition();", "public Rectangle getSquare(){\n\t\treturn this.square;\n\t}", "public Square getSquare(int x, int y) {\n\t\tif (x < 0 || y < 0 || x > width - 1 || y > height - 1) {\n\t\t\tthrow new IllegalArgumentException(\"Array index out of bounds.\");\n\t\t}\n\n\t\treturn squares[y][x];\n\t}", "public Coordinate getCoordinate() {\n\t\treturn super.listCoordinates().get(0);\n\t}", "public int getCoordinates(int i) {\n return this.coordinates[i];\n }", "public SquareAbstract getSquare(int row, int col){\n\n try {\n return squares.get(row).get(col);\n }\n catch (IndexOutOfBoundsException e){\n return null;\n }\n\n }", "Square kingPosition() {\r\n return king;\r\n }", "public abstract AwtCell get(int y, int x);", "public int getX(){\n return this.position[0];\n }", "public GRect getSquare() {\n\t\treturn square;\n\t}", "public Object get(int index);", "public Object get(int index);", "public double getCoord(int index) {\n\t\treturn point[index];\n\t}", "final Piece get(Square s) {\r\n return get(s.col(), s.row());\r\n }", "public int getSquareNumber(int x, int y){\n return board[x][y].getNumber();\n }", "private Object getObjet(int coordX, int coordY){\r\n if(!this.positionValide(coordX, coordY))\r\n return null;\r\n\r\n return this.tabCellules[coordY][coordX];\r\n }", "Object get(int index);", "Object get(int index);", "public GridCoord getCoord() {\n return coord;\n }", "abstract public Object getValue(int index);", "@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }", "public List<Square> getSquareGrid();", "public Square getSquare(int row, int col) {\n Assert.isTrue(validateCoordinates(row, col));\n\n return this.squares.get(row * this.width + col);\n }", "public RatPoly get(int index) {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->get() unimplemented!\\n\");\n }", "public int getX() { return loc.x; }", "public Object getValue(int index);", "public float get (int idx)\n {\n switch (idx) {\n case 0: return x;\n case 1: return y;\n }\n throw new IndexOutOfBoundsException(Integer.toString(idx));\n }", "public Square[][] getSquares()\n {\n return squares;\n }", "public int getX();", "Cell getCellAt(Coord coord);", "public Square getCircleSquare(){\n return circleSquare;\n }", "public PointF get(int index)\n {\n int realIndex = wrap(index, size());\n return Geometry.clone(points.get(realIndex));\n }", "double getX() { return pos[0]; }", "public Object get( int index )\n {\n\treturn _data[index];\n }", "public Square getSquareAt(int row, int col) {\n return playingBoard[row][col];\n }", "public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}", "public abstract int[] getCoords();", "double getValueAt(int x, int y);", "public int getX() {\n return this.coordinate.x;\n }", "Object getElementAt(int index);", "public Square getSquare(Square cell) {\n\t\treturn (Square) cells[cell.getRow()][cell.getColumn()];\n\t}", "@Override\r\n\t@Basic\r\n\tpublic Point getPositionOfSquare(Square square) {\r\n\t\tfor (Map.Entry<Point, Square> e : squares.entrySet()) {\r\n\t\t\tif (e.getValue() == square)\r\n\t\t\t\treturn e.getKey();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Integer getCell(Integer x, Integer y) {\n\t\treturn game[x][y];\r\n\t}", "public E get(int index) {\n\t\tcheckBounds(index);\r\n\t\treturn getNode(index).getData();\r\n\t}", "public Coordinate getCoordinate() {\n return coordinate;\n }", "public Square[][] getSquares() {\n \treturn squares;\n }", "public int getCoord(int i) {\r\n return coords[i-1];\r\n }", "public int getSquareNumber() {\n\t\treturn squareNumber;\n\t}", "@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }", "public Object get(final int index) {\n return super.get(index);\n }", "public Coordinate coordinate() {\n\t\treturn coordinate;\n\t}", "public GPoint get(int index) {\n\t\treturn points.get(index);\n\t}", "public Tile access(int x, int y) {\r\n\t\treturn layout.get(x)[y];\r\n\t}", "public GridCoord getCoord() {\n\t\treturn this.coord;\n\t}", "public Square getStartSquare() {\n\t\treturn squares.get(0);\n\t}", "public int getX(){ return xPosition; }", "public int get(int xcord, int ycord) {\n\t\treturn grid[xcord][ycord];\n\t}", "@Override\n public SquareTile getTile(int x, int y) {\n // Check that the location is inside the grid\n if (x < 0 || x >= width || y < 0 || y >= height)\n return null;\n\n return tiles[x * width + y];\n }", "public int getIndex() { return this.index; }", "int getCell(int x, int y) {\n try {\n return hiddenGrid[x][y];\n } catch (IndexOutOfBoundsException hiddenIndex) {}\n return hiddenGrid[x][y];\n }", "public double get(int y, int x);", "public Coordinate getPosition();", "@Override\r\n public Object getElementAt(int index) {\n return vs.get(index);\r\n }", "public Point2D getPoint(int index) {\n return(_pts[index]);\n }", "public Ship get(int index) {\n\t\tif ((index < 0) || (index > ships.size() - 1)) {\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Index out of Bounds.\");\n\t\t}\n\t\treturn ships.get(index);\n\n\t}", "public Object getProperty (String index) ;", "@Test\n\tpublic void testGettingIndexEmptySquare()\n\t{\n\t\t// arrange\n\t\tData d = new Data();\n\t\n\t\t// act\n\t\tint index = d.getIndex(1);\t // shouldn't be in the array, as it is an empty square\n\n\t\t// assert\n\t\tassertEquals(index, -1); //-1 means not found\n\t}", "public BoxContainer getElement(int x, int y){\n\t\t\tArrayList<Integer> coordinates = new ArrayList<Integer>();\n\t\t\tcoordinates.add(x);\n\t\t\tcoordinates.add(y);\n\t\t\tBoxContainer point = map.get(coordinates);\n\t\t\tif (point == null){\n\t\t\t\treturn BoxContainer.Unkown;\n\t\t\t} else {\n\t\t\t\treturn point;\n\t\t\t}\n\t\t}", "public abstract E get(int index);", "public int getX() { return position.x; }", "public int get(int x, int y){\n return matriz[x][y];\n }", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "public abstract Object get(int pos) throws IndexOutOfBoundsException;", "public abstract Tile getTileAt(int x, int y);", "public Coords getCoord() {\r\n\t\treturn coord;\r\n\t}", "public final Position get(final int index) {\n return points.get(index);\n }", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public Object get(int index) {\r\n return entry(index).element;\r\n }", "public Object getObject(int pos) {\n return elements.get(pos);\n }", "public E get(int index) {\n return this.elements[index];\n }", "public int getIndex();", "public int getIndex();" ]
[ "0.7046468", "0.70306396", "0.7021676", "0.69531554", "0.6901677", "0.6885568", "0.68677485", "0.68475825", "0.68200797", "0.6706159", "0.66986245", "0.6659595", "0.6604921", "0.6599298", "0.6593995", "0.65772736", "0.65243894", "0.6510934", "0.6466463", "0.63836074", "0.6333318", "0.6311187", "0.6286792", "0.62790394", "0.62641597", "0.6256943", "0.6236397", "0.6232479", "0.6232479", "0.62140226", "0.6178992", "0.6148303", "0.61365527", "0.61348766", "0.61348766", "0.61343783", "0.6131634", "0.6121627", "0.6121072", "0.60997844", "0.60960805", "0.6085266", "0.6080536", "0.60802275", "0.60744363", "0.60727215", "0.607173", "0.60714936", "0.60596097", "0.6048084", "0.6045055", "0.6041972", "0.60347587", "0.60342395", "0.60328645", "0.60317487", "0.602102", "0.60169685", "0.6013506", "0.6013031", "0.6012849", "0.60122645", "0.60111916", "0.6009819", "0.6005195", "0.5989805", "0.5987907", "0.598478", "0.5980957", "0.59737337", "0.5971335", "0.59444916", "0.59430325", "0.59374136", "0.5936643", "0.59270066", "0.5917025", "0.5914255", "0.5909841", "0.58953154", "0.58908206", "0.5890312", "0.5886281", "0.5868931", "0.5866517", "0.5850885", "0.58504915", "0.5849742", "0.5838998", "0.58337307", "0.5828143", "0.58264583", "0.5822885", "0.5814573", "0.5814573", "0.58087695", "0.58075553", "0.58059984", "0.58057165", "0.58057165" ]
0.6853462
7
Convert the pixel/position on the main panel to a grid square index
public double toGrid(double pixel) { return (pixel + GridLock.SQUARE_SIZE / 2) / GridLock.SQUARE_SIZE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "public static int getGridPosition(int x, int y, int width){\n\t\treturn (y*width)+x;\n\t}", "private int matrixRowToGridCol(int i) \n {\n return (i % dimSquared) / gDim + 1;\n }", "private int xyToOneD(int row, int col) {\n return ((row - 1) * grid.length) + (col - 1);\n }", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "private int ufindex(int row, int col) {\n return grid.length * (row - 1) + col - 1;\n }", "private Point2D getBoardPosition() {\n double size = getCellSize();\n double x = canvas.getWidth() / 2 - board.getWidth() * size / 2;\n double y = canvas.getHeight() / 2 - board.getHeight() * size / 2;\n\n return new Point2D(x, y);\n }", "private int colPos(int pos) {\r\n return pos % squareDimension;\r\n }", "public int[] getCurrentPieceGridPosition() {\n\t\treturn currentPieceGridPosition; \n\t}", "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 static int getSquarePosition(int index) {\n return (((index/3)%3)+1)+3*(((index/9)/3)+1);\n }", "private int matrixRowToGridVal(int i) \n {\n return i % gDim + 1;\n }", "private int xyTo1D(int i, int j) {\n return (mGridSize * (i - 1) + j);\n }", "private int xyTo1D(int row, int col)\n {\n validate(row, col);\n return (row-1) * gridSize + col-1;\n }", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "private int calculateNewIndex(float x, float y) {\n final float cellWidth = mGrid.getWidth() / mGrid.getColumnCount();\n final int column = (int)(x / cellWidth);\n\n // calculate which row to move to\n final float cellHeight = mGrid.getHeight() / mGrid.getRowCount();\n final int row = (int)Math.floor(y / cellHeight);\n\n // the items in the GridLayout is organized as a wrapping list\n // and not as an actual grid, so this is how to get the new index\n int index = row * mGrid.getColumnCount() + column;\n if (index >= mGrid.getChildCount()) {\n index = mGrid.getChildCount() - 1;\n }\n\n return index;\n }", "public int getArrayIndex(){\n return squareIndex * 9 + position;\n }", "private int rowPos(int pos) {\r\n return pos / squareDimension;\r\n }", "protected abstract void position(int[][] gameboard, int col, int row);", "void setGridX(int i);", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }", "private int calculateNewIndex(float x, float y) {\n final float cellWidth = homeViewForAdapter.getWidth() / homeViewForAdapter.getColumnCount();\n final int column = (int) (x / cellWidth);\n\n // calculate which row to move to\n final float cellHeight = homeViewForAdapter.getHeight() / homeViewForAdapter.getRowCount();\n final int row = (int) Math.floor(y / cellHeight);\n\n // the items in the GridLayout is organized as a wrapping list\n // and not as an actual grid, so this is how to get the new index\n int index = row * homeViewForAdapter.getColumnCount() + column;\n if (index >= homeViewForAdapter.getChildCount()) {\n index = homeViewForAdapter.getChildCount() - 1;\n }\n\n return index;\n }", "private void updateGridWithPosition(Pair<Integer, Integer> position) {\n int x = position.getValue0();\n int y = position.getValue1();\n int ox = origin.getValue0();\n int oy = origin.getValue1();\n while (ox + Math.abs(x) >= grid[0].length || oy + Math.abs(y) >= grid.length) {\n reallocateGrid();\n }\n if (x >= 0 && y >= 0) {\n grid[oy + y][ox + x] = '#';\n } else if (x >= 0) {\n grid[oy - Math.abs(y)][ox + x] = '#';\n } else if (y >= 0) {\n grid[oy + y][ox - Math.abs(x)] = '#';\n } else {\n grid[oy - Math.abs(y)][ox - Math.abs(x)] = '#';\n }\n }", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "private int matrixRowToGridRow(int i) \n {\n return i / dimSquared + 1;\n }", "private static int layoutToBoard(int layoutCoordinate) {\n return ROOM_SIZE * layoutCoordinate;\n }", "public char getGrid(int x ,int y){\n\t\treturn Grid[x][y] ;\n\t}", "void setGridY(int i);", "private int site2index(int row, int col) {\n validate(row, col);\n return (row - 1) * this.n + col;\n }", "private short computeLocationValue(short row, short column) {\n\t\treturn (short) (gridSize * row + column);\n\t}", "private Cell[][] updateCellLocation(Cell[][] grid) {\n\n //Iterate through the grid\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n grid[x][y].setXCord(x); //Set the new X co-ordinate\n grid[x][y].setYCord(y); //Set the new Y co-ordinate\n }\n }\n\n return grid;\n }", "public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }", "public int calculateGridCellRow(int y)\n {\n float topEdge = miniGame.getBoundaryTop();\n y = (int)(y - topEdge);\n return y / TILE_IMAGE_HEIGHT;\n }", "public boolean onGrid(int xValue, int yValue);", "public void updateGridX();", "Square getCurrentPosition();", "private int hitWhichSquare(float testX, float testY) {\r\n int row = 0;\r\n int col = 0;\r\n\r\n // width of each square in the board\r\n float tileWidth = scaleFactor * width / 4;\r\n float tileHeight = scaleFactor * height / 4;\r\n\r\n // where is the top and left of the board right now\r\n float leftX = dx + (1-scaleFactor) * width / 2;\r\n float topY = dy + (1-scaleFactor) * height / 2;\r\n\r\n\r\n for (int i = 0; i < 4; i += 1) {\r\n // test if we are in column i (between the i line and i+1 line)\r\n // leftmost vertical line = line 0\r\n // example: if we are between line 2 and line 3, we are in row 2\r\n if (testX < (i+1) * tileWidth + leftX && i * tileWidth + leftX < testX) {\r\n col = i;\r\n }\r\n\r\n // test if we are in row i (between the i line and i+1 line)\r\n // topmost horizontal line = line 0\r\n // example: if we are between line 0 and line 1, we are in row 0\r\n if (testY < (i+1) * tileHeight + topY && i * tileHeight + topY < testY) {\r\n row = i;\r\n }\r\n }\r\n return row * 4 + col;\r\n }", "public int[] convertRowcolsToPixelsCentered(int row, int col) {\n\t\tint[] px_position = convertRowcolsToPixels(row, col);\n\t\tpx_position[0] = px_position[0] + (config.getLevelBoxSize() / 2) ;\n\t\tpx_position[1] = px_position[1] + (config.getLevelBoxSize() / 2) ;\n\t\treturn px_position;\n\t}", "private int coordinateConvertFrom(int i, int j) {\n return size * (i - 1) + j;\n }", "public int[] getPositionInGrid( int tile )\n\t{\n\t\tint[] position = new int[2];\n\t\t\n\t\tfor ( int y = 0; y < height; y++ )\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\tif ( grid[x][y] == tile ) \n\t\t\t\t{\n\t\t\t\t\tposition[0] = x;\n\t\t\t\t\tposition[1] = y;\n\t\t\t\t\t\n\t\t\t\t\t// Should break but meh\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn position;\n\t}", "public int[] convertRowcolsToPixels(int row, int col) {\n\t\tint[] px_position = new int[2];\n\t\tpx_position[0] = col * config.getLevelBoxSize();\n\t\tpx_position[1] = row * config.getLevelBoxSize();\n\t\treturn px_position;\n\t}", "private int getPosition(int row, int col) {\n\t\treturn (side * (row - 1)) + (col - 1);\n\t}", "public int getGridX() {\r\n\t\treturn gridX;\r\n\t}", "public void updateGridY();", "private int getIndex(int row, int column) {\n \n int pos;\n \n pos = (row*getVariables().size()*4)+(column*4);\n return pos;\n}", "private int rowToX(int r) { \n\t\treturn r * getHeight() / BOARD_LENGTH - (BOARD_PIECE_LENGTH); // why - 50 ?\n\t}", "public List<Square> getSquareGrid();", "private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int getCell(int x, int y) {\n try {\n return hiddenGrid[x][y];\n } catch (IndexOutOfBoundsException hiddenIndex) {}\n return hiddenGrid[x][y];\n }", "int getTileGridYOffset(Long id) throws RemoteException;", "public int getLocation(int x, int y) {\n\t\treturn grid[x][y];\n\t}", "public int snapToGridVertically(int p)\r\n {\r\n return p;\r\n }", "public int I(int x, int y, int z){\n //gets typeGrid index from location\n return x*yDim*zDim+y*zDim+z;\n }", "private int getIndex(int row, int col) {\n return (row - 1) * getSize() + col;\n }", "private int xyTo1D(final int row, final int col) {\n return (row - 1) * size + (col - 1);\n }", "private int convertRowColToIndex(int row, int col) {\n return (row - 1) * this.size + (col - 1);\n }", "public int getX() {\r\n return ix % numCols;\r\n }", "public int get(int xcord, int ycord) {\n\t\treturn grid[xcord][ycord];\n\t}", "private int colToY(int c) { \n\t\treturn c * getWidth() / BOARD_LENGTH - (BOARD_PIECE_LENGTH);\n\t}", "private Point2D.Float toGridPoint(int x, int y) {\n return new Point2D.Float((float)((x - centreX)*scale), (float)((centreY - y)*scale));\n }", "public int getY() {\r\n return ix / numCols;\r\n }", "int getTileGridXOffset(Long id) throws RemoteException;", "public Spatial boardCentre() {\r\n return tiles[2][2].tile;\r\n }", "public int getGridY() {\r\n\t\treturn gridY;\r\n\t}", "public int calculateGridCellColumn(int x)\n {\n float leftEdge = miniGame.getBoundaryLeft();\n x = (int)(x - leftEdge);\n return x / TILE_IMAGE_WIDTH;\n }", "public List<Pair> calculateShipTileIndices() {\n List<Pair> shipTileIndices = new ArrayList<>();\n for (int i = 0; i < shipSize; i++) {\n if (orientation == Orientation.HORIZONTAL) {\n shipTileIndices.add(new Pair(startX + i, startY));\n } else {\n shipTileIndices.add(new Pair(startX, startY + i));\n }\n }\n return shipTileIndices;\n }", "private int getColPixelCoords(int col, int row) {\r\n\t\t\tint pixelCol;\r\n\t\t\t//If it's an odd numbered row it needs to be shifted along\r\n\t\t\tif (row % 2 == 0) {\r\n\t\t\t\tpixelCol = (col * HEX_WIDTH);// - hexWidth / 2;\r\n\t\t\t} else {\r\n\t\t\t\tpixelCol = ((col * HEX_WIDTH) - HEX_WIDTH / 2) + HEX_WIDTH;\r\n\t\t\t}\r\n\t\t\treturn pixelCol;\r\n\t\t}", "public abstract int findRowForWindow(int y);", "public Move getGridElement (int row, int column)\n {\n return mGrid[row][column];\n }", "Coordinate[] getTilePosition(int x, int y) {\n\t\treturn guiTiles.get(y).get(x).getBoundary();\n\t}", "public int getCurrentPawnColumn(){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\treturn curPos.getWhitePosition().getTile().getColumn();\n\t\t\n\t\t} else {\n\t\t\treturn curPos.getBlackPosition().getTile().getColumn();\n\t\t}\r\n }", "@Override\n public int getTileGridXOffset() {\n return this.tileGridXOffset;\n }", "private ArrayList<Integer> getRegularPointsIndex(float ratio) {\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize = (int) (size * ratio);\n double len = Math.sqrt((double) size / (double) newNListSize);\n\n int nx = (int) Math.round(width / len);\n int ny = (int) Math.round(height / len);\n dim.width = nx;\n dim.height = ny;\n\n // find evenly spaced margin\n double mx, my;\n if (nx * len > width) {\n mx = (len - (nx * len - width)) / 2.0;\n } else {\n mx = (len + (width - nx * len)) / 2.0;\n }\n if (ny * len > height) {\n my = (len - (ny * len - height)) / 2.0;\n } else {\n my = (len + (height - ny * len)) / 2.0;\n }\n mx = Math.floor(mx);\n my = Math.floor(my);\n\n // create points of array, which are regularly distributed\n ArrayList<Point> pts = new ArrayList<Point>();\n for (double y = my; Math.round(y) < height; y += len) {\n for (double x = mx; Math.round(x) < width; x += len) {\n pts.add(new Point((int) Math.round(x), (int) Math.round(y)));\n }\n }\n\n // convert points to index list\n ArrayList<Integer> newNList = cnvPoints2IndexList(pts);\n\n return newNList;\n }", "void locate(int pos, int [] ind)\n\t{\n\t\tind[0] = (int) pos / dimy; // x\n\t\tind[1] = pos % dimy; // y\t\n\t}", "private int rowColToIndex(int row, int col) {\n row = row - 1;\n col = col - 1;\n int index = row * side + col;\n if (index >= side*side || index < 0 || row < 0 || row >= side || col < 0 || col >= side)\n throw new IndexOutOfBoundsException();\n return index;\n }", "public int getSquareMoveNumber(int row, int col) {\n return playingBoard[row][col].getMoveNumber();\n }", "private int getRowPixelCoords(int row) {\r\n\t\treturn row * (HEX_HEIGHT - HEX_ANGLE_HEIGHT);\r\n\t}", "@Override\n\tpublic Piece view(Position boardPosition) {\n\t\tPiece temp;\n\t\ttemp = grid[boardPosition.row][boardPosition.col];\n\t\treturn temp;\n\t}", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "public int[][] getGrid()\n {\n return grid;\n }", "public int I(double x, double y, double z){\n //gets typeGrid index from location\n return (int)Math.floor(x)*yDim*zDim+(int)Math.floor(y)*zDim+(int)Math.floor(z);\n }", "private int getArrayPos(int x, int y) {\n int position = (y - 1) * this.yDimension + x - 1;\n return position;\n }", "private void getTileNumber() {\r\n int xtile = (int) Math.floor((coordinates.getLon() + 180) / 360 * (1 << zoom));\r\n int ytile = (int) Math.floor((1 - Math.log(Math.tan(Math.toRadians(coordinates.getLat())) + 1 / Math.cos(Math.toRadians(coordinates.getLat()))) / Math.PI) / 2 * (1 << zoom));\r\n\r\n if (xtile < 0) xtile = 0;\r\n\r\n if (xtile >= (1 << zoom)) xtile = ((1 << zoom) - 1);\r\n\r\n if (ytile < 0) ytile = 0;\r\n\r\n if (ytile >= (1 << zoom)) ytile = ((1 << zoom) - 1);\r\n\r\n this.xtile = xtile;\r\n this.ytile = ytile;\r\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "private int findG(int currentIndex){\r\n int mapCol = _map.get_mapCol();\r\n int currentRow = currentIndex / mapCol;\r\n int currentCol = currentIndex % mapCol;\r\n\r\n int startRow = _startIndex / mapCol;\r\n int startCol = _startIndex % mapCol;\r\n\r\n return Math.abs(currentRow - startRow) + Math.abs(currentCol - startCol);\r\n }", "Coordinates getCoordinates(int rowIndex);", "private void paintGridSquare(final Graphics2D theGraphics, final int theX, final int theY,\n final int theIdx) {\n theGraphics.setPaint(COLOR_MAP.get(myBoardString.charAt(theIdx)));\n theGraphics.fill(new Rectangle2D.Double(theX, theY, BLOCK_SIZE, BLOCK_SIZE));\n\n // paint outline on tetris blocks only\n if (myBoardString.charAt(theIdx) != ' ') {\n theGraphics.setStroke(new BasicStroke(STROKE_WIDTH));\n theGraphics.setPaint(Color.WHITE);\n // make height and width of outline one pixel smaller so the outline\n // sits inside the bounds of the already filled shape\n theGraphics.draw(new Rectangle2D.Double(theX, theY, BLOCK_SIZE, BLOCK_SIZE));\n }\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 }", "public int getCurrentPawnRow(){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\treturn curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\treturn curPos.getBlackPosition().getTile().getRow();\n\t\t}\r\n }", "private int findH(int currentIndex){\r\n int mapCol = _map.get_mapCol();\r\n int currentRow = currentIndex / mapCol;\r\n int currentCol = currentIndex % mapCol;\r\n\r\n int endRow = _endIndex / mapCol;\r\n int endCol = _endIndex % mapCol;\r\n\r\n return Math.abs(currentRow - endRow) + Math.abs(currentCol - endCol);\r\n }", "Point2D getDrawCoordinates(int counter) {\n int x = counter % drawWidth;\n int y = (counter / drawWidth) % drawHeight;\n\n x += drawOffsetX;\n y += drawOffsetY;\n\n return new Point2D.Double(x, y);\n }", "public int nodeToPixelIndex(Node node) {\n Point p = nodeToPixelPoint(node);\n return ((p.y * WIDTH) + p.x);\n }", "public int getSquareLocation()\n\t\t{\n\t\t\treturn location; // return location of square\n\t\t}", "Tile getPosition();", "@Test\n\t//Testing the calcIndex function \n\tpublic void testcalcIndex() {\n\t\tassertEquals(0, board.calcIndex(0, 0));\n\t\tassertEquals(NUM_COLUMNS-1, board.calcIndex(0, NUM_COLUMNS-1));\n\t\tassertEquals(483, board.calcIndex(NUM_ROWS-1, 0));\n\t\tassertEquals(505, board.calcIndex(NUM_ROWS-1, NUM_COLUMNS-1));\n\t\t// Test a couple others\n\t\tassertEquals(24, board.calcIndex(1, 1));\n\t\tassertEquals(66, board.calcIndex(2, 20));\n\t}", "public int y (int index) { return coords[index][1]; }", "private ArrayList<GameSquare> getAdjacentSquares()\n {\n ArrayList<GameSquare> list = new ArrayList<GameSquare>();\n for (int r = row - 1; r <= row + 1; r++)\n {\n if (r >= 0 && r < grid.length)\n {\n for (int c = col - 1; c <= col + 1; c++)\n {\n if (c >= 0 && c < grid[0].length)\n {\n list.add(grid[r][c]);\n }\n }\n }\n }\n return list;\n }", "protected abstract void paintBoard() throws TilePixelOutOfRangeException;", "private void createSquare(int x, int y, int row, int column) {\r\n grid[row][column] = new JLabel();\r\n grid[row][column].setOpaque(true);\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n grid[row][column].setBorder(SQUARE_BORDER);\r\n this.getContentPane().add(grid[row][column]);\r\n grid[row][column].setBounds(x,y,SQUARE_SIZE,SQUARE_SIZE);\r\n }", "public int getGridWidth() { return gridWidth; }" ]
[ "0.6778018", "0.67694056", "0.67242634", "0.6519112", "0.6490065", "0.6487237", "0.64357334", "0.6393307", "0.6358643", "0.63492244", "0.63272554", "0.63040394", "0.6280771", "0.62524027", "0.621621", "0.6203746", "0.6188251", "0.6098176", "0.6085764", "0.60679394", "0.6049394", "0.60224885", "0.60090435", "0.59975845", "0.5992656", "0.59908855", "0.59622115", "0.59545916", "0.5918165", "0.5908381", "0.59043235", "0.5898086", "0.58926094", "0.58526874", "0.5848306", "0.5825652", "0.5821307", "0.58154655", "0.5784303", "0.5780726", "0.57752997", "0.5763187", "0.5762188", "0.57608736", "0.57467705", "0.5740133", "0.57245284", "0.5717756", "0.57155967", "0.57119715", "0.57105863", "0.57090896", "0.57048565", "0.5697174", "0.56937546", "0.56885546", "0.56802034", "0.56692266", "0.56687313", "0.5652902", "0.5647913", "0.5645327", "0.56438774", "0.56422263", "0.5636613", "0.56262696", "0.5608238", "0.5603463", "0.5589077", "0.5569455", "0.5564224", "0.5564004", "0.5560949", "0.5559004", "0.5556783", "0.55530345", "0.5549309", "0.5543399", "0.5542607", "0.5534923", "0.55339414", "0.55201066", "0.55146927", "0.5510282", "0.5509409", "0.55088717", "0.55085605", "0.55066675", "0.5502174", "0.54934174", "0.54891884", "0.5474955", "0.5473222", "0.5472865", "0.54727113", "0.54671955", "0.54658824", "0.5465788", "0.54651797", "0.5452033" ]
0.55910337
68
Remove a sprite from the grid by resetting the spriteID's of the squares it used to occupy.
public void removeSpriteOnGrid(Sprite s, int x, int y) { int i; int id=-1; if(s.getDirection()==Sprite.Direction.HORIZONTAL) { for(i=0; i<s.getSize(); i++) { //set squares occupied by the length of the sprite, starting at grid[x][y] to sprite id -1 to //signal they are now free grid[x+i][y].setSpriteID(id); } }else { for(i=0; i<s.getSize(); i++) { grid[x][y+i].setSpriteID(id); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeSprites(){\r\n\r\n\t}", "public void resetSprites() {\n\t\tSPRITE_LIST.clear();\n\t}", "public void removeSprite(Sprite s) {\r\n sprites.removeSprite(s);\r\n }", "public void removeSprite(Sprite s) {\n this.sprites.removeSprite(s);\n }", "public void removeSprite(Sprite thisSprite) {\n\t\tthis.removalList.add(thisSprite);\n\t\t\n\t}", "public void removeSprite(Sprite sprite) {\n\t\tsprites.remove(sprite);\n\t}", "@Override\n\tpublic void removeFromLayer(Sprite sprite) {\n\t\trenderList.remove(sprite);\n\t}", "public void remove(String spriteKey) {\n\t\tspritesByKey.remove(spriteKey);\n\t}", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "public void clear() {\n int var1 = 0;\n if(field_759 || var1 < this.spritePixels.length) {\n do {\n this.spritePixels[var1] = null;\n this.field_736[var1] = 0;\n this.field_737[var1] = 0;\n this.spriteColoursUsed[var1] = null;\n this.spriteColourList[var1] = null;\n ++var1;\n } while(var1 < this.spritePixels.length);\n\n }\n }", "public void removeFromGame(Game g) {\r\n g.removeSprite(this);\r\n }", "public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}", "public void removePawn(Position position) {\n\t\tboardGrid[position.getRow()][position.getColumn()] = new Empty();\n\t}", "public void remove(int indx) {\n\t\tgameObjects.remove(indx);\n\t}", "public void removeNumber(int x, int y) {\r\n\t\tupdateMoves();\r\n\t\tsetOpenTiles(getOpenTiles() + 1);\r\n\t\tint[][] temp = getGameBoard();\r\n\t\tboolean[][] tempX = getXValues();\r\n\t\tboolean[][] tempY = getYValues();\r\n\t\ttempX[x][temp[y][x]] = tempY[y][temp[y][x]] = false;\r\n\t\ttemp[y][x] = 0;\r\n\t\tsetXValues(tempX);\r\n\t\tsetYValues(tempY);\r\n\t\tsetGameBoard(temp);\r\n\t}", "public void empty() {\n\t\tempty.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = empty;\n\t}", "private void cleanUpTile(ArrayList<Move> moves)\n {\n for(Move m1 : moves)\n {\n gb.getTile(m1.getX(),m1.getY()).setStyle(null);\n gb.getTile(m1.getX(),m1.getY()).setOnMouseClicked(null);\n }\n gb.setTurn(gb.getTurn() + 1);\n }", "public void removeFromGame(GameLevel g) {\r\n g.removeSprite(this);\r\n }", "void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "private void removeShip(){\n mainPanel.remove(this);\n gbc.gridheight=1;\n gbc.gridwidth=1;\n int placeX = getMy_x();\n int placeY = getMy_y();\n for(int i=0;i<getMy_length();i++){ //put free spaces by the length of the ship.\n if(getMy_dir().equals(\"Horizontal\")){\n placeX = getMy_x()+i;\n }\n if(getMy_dir().equals(\"Vertical\")){\n placeY = getMy_y()+i;\n }\n gbc.gridx = placeX;\n gbc.gridy = placeY;\n freeSpaceButton freeSpace = new freeSpaceButton(new Point(placeX,placeY));\n freeSpace.setPreferredSize(new Dimension(58,58));\n mainPanel.add(freeSpace,gbc); //add free space to the board.\n }\n mainPanel.revalidate();\n mainPanel.repaint();\n }", "public void removeTile(Tile tile) {\n ownedTiles.remove(tile);\n }", "@Override\r\n public void update() {\r\n // Animate sprite\r\n if (this.spriteTimer++ >= 4) {\r\n this.spriteIndex++;\r\n this.spriteTimer = 0;\r\n }\r\n if (this.spriteIndex >= this.animation.length) {\r\n this.destroy();\r\n } else {\r\n this.sprite = this.animation[this.spriteIndex];\r\n }\r\n }", "public void removePiece(int x, int y)\r\n {\r\n if(isValidSqr(x, y)) board[x][y] = null;\r\n }", "@Override\r\n\tpublic void removeAsSquareAt(Point position) {\r\n\t\tif (position != null) {\r\n\t\t\tSquare removed = squares.remove(position);\r\n\t\t\tif (removed != null) {\r\n\t\t\t\t// Neighbors are removed in all directions.\r\n\t\t\t\tfor (Direction d : Direction.values()){\r\n\t\t\t\t\tremoved.removeNeighbor(d);\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tremoved.setDungeon(null);\r\n\t\t\t\t} catch (IllegalDungeonException e) {\r\n\t\t\t\t\t// never happens\r\n\t\t\t\t\tassert false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void resetUnitSprite() {\r\n\t\tswitch (GameManager.getInstance().getSelectedUnit()) {\r\n\t\tcase 0:\r\n\t\t\tGameManager.getInstance().setSelectedUnit(3);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 1:\r\n\t\t\tUnit1SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 2:\r\n\t\t\tUnit2SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(2);\r\n\t\tcase 3:\r\n\t\t\tUnit3SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(3);\r\n\t\tcase 4:\r\n\t\t\tUnit4SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 5:\r\n\t\t\tUnit5SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 6:\r\n\t\t\tUnit6SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\t}\r\n\t}", "public void removeFromGame(){\n this.isInGame = false;\n }", "public void removeSmile(Pane gamePane){\r\n\r\n\t\t\tsmile.remove(gamePane);\r\n\r\n\t}", "public void clearItem(final int x, final int y) {\r\n\t\tfor (int i = 2; i < LAYERS; i ++) {\r\n\t\t\tsetTile(x, y, i, Tile.getEmptyTile());\r\n\t\t}\r\n\t}", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }", "void clearCell(int x, int y);", "public void cleanBoard(){\n\n for(PositionInBoard position : positionsThatArePainted){\n int i = position.row();\n int j = position.column();\n if ((i+j)%2==0) {\n board[i][j].setBackground(Color.BLACK);\n }\n else {\n board[i][j].setBackground(Color.WHITE);\n }\n\n board[i][j].setText(null);\n board[i][j].setIcon(null);\n }\n positionsThatArePainted.clear();\n }", "public void clearTiles() {\r\n\r\n for (int i = 0; i < 16; i += 1) {\r\n tiles[i] = 0;\r\n }\r\n boardView.invalidate();\r\n placedShips = 0;\r\n }", "private void resetBackgroundSprite(Texture newSpriteTexture) {\n backgroundSprite = new Sprite(newSpriteTexture);\n backgroundSprite.setSize(screenWidth, screenHeight);\n backgroundSprite.setPosition(0, 0);\n }", "public void removePawn() {\n lives = 0;\n }", "public void detachSprite(Sprite detachS){\n \tfor (Iterator<Sprite> iterator = graphicsElements.iterator(); iterator.hasNext();) {\n\t\t\tSprite s = (Sprite)iterator.next();\n\t\t\t\n\t\t\t/* Find and remove of element list */\n\t\t\tif(s == detachS){\n\t\t\t\tgraphicsElements.remove(s);\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n }", "public void removeFromGame(GameLevel g) {\n if (g != null) {\n g.removeSprite(this);\n g.getBallCounter().decrease(1);\n }\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "private void removeEnemy(int e_num){\n\t\tint i;\n\t\tfor(i=e_num;i<enemy_num-1;i++){\n\t\t\tenemy[i][0] = enemy[i+1][0];\n\t\t\tenemy[i][1] = enemy[i+1][1];\n\t\t\tenemy[i][2] = enemy[i+1][2];\n\t\t\tenemy_arrow_num[i] = enemy_arrow_num[i+1];\n\t\t\tenemy_arrows[i] = enemy_arrows[i+1];\n\t\t}\n\t\tenemy_num -= 1;\n\t\tenemy[i][0] = 0;\n\t\tenemy[i][1] = 0;\n\t\tenemy[i][2] = 0;\n\t\tenemy_arrow_num[i] = 0;\n\t\t\n\t\t\n\t\n\t}", "void moveToSprite(Sprite s) {\n _x = s._x;\n _y = s._y;\n }", "@Test\r\n public void testRemoveNodeByRowColumnIndex2() {\r\n System.out.println(\"removeNodeByRowColumnIndex2\");\r\n int row = 0;\r\n int column = 0;\r\n GridPane gridPane = new GridPane();\r\n ImageView img = null;\r\n ChessMain instance = new ChessMain();\r\n instance.removeNodeByRowColumnIndex2(row, column, gridPane);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "public abstract int removeStone(int whoseTurn, int numberToRemove, int upperBound, int currentStone,\n\t\t\tint initialStones, Scanner scanner);", "public void removeCell(int x, int y) {\n\t\tMap<Integer, Cell<C>> xCol = cellLookup.get(x);\n\t\tif (null != xCol) {\n\t\t\tcells.remove(xCol.remove(y));\n\t\t}\n\t}", "public void clearPieces(){\n for(int i =0; i<WIDTH;i++){\n for(int j = 0 ; j<HEIGHT;j++){\n piecesToSwap[i][j]=null;\n }\n }\n }", "public void resetGame() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tboard[i][j] = 0;\n\t\t\t\tgetChildren().remove(renders[i][j]);\n\t\t\t\trenders[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "public void remove(){\n\t\tqueueArray[1][0] = null;\n\t\tqueueArray[1][1] = null;\n\t}", "private void reset() {\n\n\n spaceShips.clear();\n playerOne = null;\n playerTwo = null;\n friendlyBullets.clear();\n enemyBullets.clear();\n powerUps.clear();\n enemyGenerator.reset();\n difficulty.reset();\n Bullets.BulletType.resetSpeed();\n\n for (int i = 0; i < enemies.size(); i++) {\n enemies.get(i).getEnemyImage().delete();\n }\n enemies.clear();\n }", "void removeFromAvailMoves(int x, int y) {\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tavailMoves[x][y][i] = false;\n\t\t}\n\t}", "public void removeTile(Tile tile) {\r\n frame.remove(tile);\r\n }", "public void eraseCell(int x, int y) {\n \n //Sets cell to empty\n gameBoard[x][y] = 0;\n }", "public void removeBoat (int index) {\n Boat b = getBoatAt(index);\n int startX = Math.min(b.getStartX(), b.getEndX());\n System.out.println(\"removeBoat(): startX = \" + startX);\n int startY = Math.min(b.getStartY(), b.getEndY());\n System.out.println(\"removeBoat(): startY = \" + startY);\n int endX = Math.max(b.getStartX(), b.getEndX());\n System.out.println(\"removeBoat(): endX = \" + endX);\n int endY = Math.max(b.getStartY(), b.getEndY());\n System.out.println(\"removeBoat(): endY = \" + endY);\n \n //reset cells in grid.\n if (startX == endX) { \n for (int j = startY; j <= endY; j++) {\n System.out.println(\"removeBoat(): X constant. Changing coordinate: \" + j);\n grid[startX-1][j-1].setHasBoat(false);\n System.out.println(\"removeBoat(): Cell: \" + grid[startX-1][j-1]);\n } \n } else if (startY == endY) {\n for (int i = startX; i <= endX; i++) {\n System.out.println(\"removeBoat(): Y constant. Changing coordinate: \" + i);\n grid[i-1][startY-1].setHasBoat(false);\n System.out.println(\"removeBoat(): Cell: \" + grid[i-1][startY-1]);\n }\n }\n \n //reset boat\n b.setStartX(INVALID); \n b.setStartY(INVALID); \n b.setEndX(INVALID); \n b.setEndY(INVALID);\n \n }", "public void removeTile(Tile a_tile){\n for(int i = 0; i < playerHand.size(); i++){\n if(playerHand.get(i).getRight() == a_tile.getRight() && playerHand.get(i).getLeft() == a_tile.getLeft()){\n playerHand.remove(i);\n break;\n }\n }\n }", "public void unsetSeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SECELL$18, 0);\n }\n }", "public void unsetSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWCELL$20, 0);\n }\n }", "void clear_missiles() {\n // Remove ship missiles\n ship.missiles.clear();\n for (ImageView ship_missile_image_view : ship_missile_image_views) {\n game_pane.getChildren().remove(ship_missile_image_view);\n }\n ship_missile_image_views.clear();\n\n // Remove alien missiles\n Alien.missiles.clear();\n for (ImageView alien_missile_image_view : alien_missile_image_views) {\n game_pane.getChildren().remove(alien_missile_image_view);\n }\n alien_missile_image_views.clear();\n }", "public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }", "private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }", "public void RmPlayer(int j){\n\t\tint i;\n\t\tfor(i=j;i<player_num-1;i++){\n\t\t\tplayers[i][0] = i;\n\t\t\tplayers[i][1] = players[i+1][1];\n\t\t\tplayers[i][2] = players[i+1][2];\n\t\t\tarrow_num[i] = arrow_num[i+1];\n\t\t}\n\t\tplayer_num --;\n\t\t\n\t}", "public void remove(GameObject go) {\r\n table[go.hashCode() % table.length].remove(go);\r\n }", "public void removeFromGame(GameLevel game) {\r\n game.removeCollidable(this);\r\n game.removeSprite(this);\r\n }", "public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void removeEditedTile(GroundTile tile) {\n this.editedTiles.remove(tile);\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 }", "void removeTiles(Map<Location, SurfaceEntity> map, int x, int y, int width, int height) {\r\n\t\tfor (int i = x; i < x + width; i++) {\r\n\t\t\tfor (int j = y; j > y - height; j--) {\r\n\t\t\t\tmap.remove(Location.of(x, y));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void removeGameObj(GameObject obj){\n display.getChildren().remove(obj.getDisplay());\n }", "private void fadeOutandDetachSprites() {\n\t\t\t\t\tdetachChild(greenTick);\t\n\t\t\t\t\tdetachChild(redx);\n\t\t\t\t\tdetachChild(sprite1);\n\t\t\t\t\tdetachChild(sprite2);\n\t\t\t\t\tdetachChild(sprite3);\n\t\t\t\t\tdetachChild(sprite4);\n\n\t\t\t\t}", "public void removeTile(int i)\n {\n int c = 0;\n for(Tile t: tiles)\n {\n if(t != null)\n c += 1;\n }\n c -=1;\n \n \n if(!(c < 2))\n {\n if(i == c)\n {\n tiles[i] = null;\n previews[i] = null;\n previewGradients[i] = null;\n previewHover[i] = false;\n activeTile = i-1;\n createPreviewGradients();\n return;\n }\n else\n {\n int last = 0;\n for(int j = i; j < c; j++)\n {\n tiles[j] = tiles[j+1];\n if(tiles[j] != null)\n tiles[j].setTileLevel(j);\n previews[j] = previews[j+1];\n previewGradients[j] = previewGradients[j+1];\n previewHover[j] = previewHover[j+1];\n last = j;\n }\n last += 1;\n tiles[last] = null;\n previews[last] = null;\n previewGradients[last] = null;\n previewHover[last] = false;\n createPreviewGradients();\n \n return;\n }\n }\n \n }", "private void undoPosition() {\r\n String undoingBoard = listOfBoards.pop();\r\n listOfMoves.pop();\r\n for (Square sq : map.keySet()) {\r\n char piece = undoingBoard.charAt(sq.index() + 1);\r\n if (piece == '-') {\r\n map.put(sq, EMPTY);\r\n }\r\n if (piece == 'B') {\r\n map.put(sq, BLACK);\r\n }\r\n if (piece == 'W') {\r\n map.put(sq, WHITE);\r\n }\r\n if (piece == 'K') {\r\n map.put(sq, KING);\r\n }\r\n board[sq.col()][sq.row()] = map.get(sq);\r\n }\r\n _moveCount -= 1;\r\n _turn = _turn.opponent();\r\n _repeated = false;\r\n }", "public void undoLastMove()\n {\n if (inProgress() && stackTiles.size() > 1)\n {\n // TAKE THE TOP 2 TILES\n MahjongSolitaireTile topTile = stackTiles.remove(stackTiles.size()-1);\n MahjongSolitaireTile nextToTopTile = stackTiles.remove(stackTiles.size() - 1);\n \n // SET THEIR DESTINATIONS\n float boundaryLeft = miniGame.getBoundaryLeft();\n float boundaryTop = miniGame.getBoundaryTop();\n \n // FIRST TILE 1\n int col = topTile.getGridColumn();\n int row = topTile.getGridRow();\n int z = tileGrid[col][row].size();\n float targetX = this.calculateTileXInGrid(col, z);\n float targetY = this.calculateTileYInGrid(row, z);\n topTile.setTarget(targetX, targetY);\n movingTiles.add(topTile);\n topTile.startMovingToTarget(MAX_TILE_VELOCITY);\n tileGrid[col][row].add(topTile);\n \n // AND THEN TILE 2\n col = nextToTopTile.getGridColumn();\n row = nextToTopTile.getGridRow();\n z = tileGrid[col][row].size();\n targetX = this.calculateTileXInGrid(col, z);\n targetY = this.calculateTileYInGrid(row, z);\n nextToTopTile.setTarget(targetX, targetY);\n movingTiles.add(nextToTopTile);\n nextToTopTile.startMovingToTarget(MAX_TILE_VELOCITY);\n tileGrid[col][row].add(nextToTopTile);\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.UNDO_AUDIO_CUE.toString(), false); \n }\n }", "private void muerte(){\r\n\t\t for(Icon i:sprites.elementAt(4))\r\n\t \t {\r\n\t \t\t grafico.setIcon(i);\r\n\t \t\t try {\r\n\t\t\t\tThread.sleep(300);\r\n\t\t\t} catch (InterruptedException 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 }\r\n\t \t grafico.setIcon(null);\r\n\t}", "private void removeItemByCoordinates(int nodeX, int nodeY) {\n world.removeUnequippedInventoryItemByCoordinates(nodeX, nodeY);\n }", "@Override\r\n\tpublic void remover(int id) {\n\t\tfor(int i=0;i<TAMANHO;i++) {\r\n\t\t\tif(perfis[i] != null) {\r\n\t\t\t\tif(perfis[i].getId() == id) {\r\n\t\t\t\t\tperfis[i] = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public void undoMove()\n {\n positions.remove(positions.size()-1);\n String position = positions.get(positions.size()-1);\n ArrayList<Piece> pieces = Chess.stringToPieces(position.substring(4));\n setTurn(Integer.parseInt(position.substring(0,2)));\n setFiftyMove(Integer.parseInt(position.substring(2,4)));\n for (int i = 0; i < Chess.ROWS; i++)\n for (int j = 0; j < Chess.COLUMNS; j++)\n {\n squares[i][j].setPiece(null);\n for (Piece p: pieces)\n if (p.getOrigin().equals(new Location(i,j)))\n squares[i][j].setPiece(p);\n }\n setFirstSelected(null);\n squares[0][0].deselectSquares();\n if (getTurn()<20)\n frame.setOptionVisibility(false);\n \n DefaultTableModel d = (DefaultTableModel)frame.getNotation().getModel();\n if (colorGoing()==PieceColor.BLACK)\n d.setValueAt(\"\",turn/2,1);\n else\n d.removeRow((turn+1)/2);\n frame.getSide().getDrawBox().setSelected(false);\n updateUI();\n }", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void removePanel() \n\t{\n\t\tgame.remove(this);\n\t}", "void removeAllSpawn();", "public void remove(){\n\t\tsetBounds(800, 600, WIDTH, HEIGHT);\n\t}", "@Override\n\tpublic void removeCell(Cell arg0) {\n\t\t\n\t}", "public void clear ()\n {\n for (int row = 0; row < 3; row++)\n for (int column = 0; column < 3; column++)\n mGrid[row][column] = new Move(row, column);\n Move.clear();\n }", "public void reset()\t{\n\t\tthis.snake.clear();\r\n\t\tdir = 1;\r\n\t\tthis.snake.add(new Dimension(2,5));\r\n\t\tthis.snake.add(new Dimension(2,6));\r\n\t\tthis.snake.add(new Dimension(2,7));\r\n\t}", "public void clear() {\n for (int row = 0; row < 8; ++row) {\n for (int col = 0; col < 8; ++col) {\n board[row][col] = null;\n }\n }\n whitePieces = new LinkedList<Piece>();\n blackPieces = new LinkedList<Piece>();\n }", "public void removeUnit(){\r\n tacUnit = null;\r\n }", "@Override\n\tpublic void delImgrep(int num) {\n\t\tdao.delete(num);\n\t}", "void removeBall(Coordinates at);", "public void clearBoard() {\r\n\t\tbody.removeAll();\r\n\t\tpiece.clear();\r\n\t\t\r\n\t\t// Assign1, Remove 'K' label of all pieces\r\n\t\tfor (int i=0; i<blackPieces.length; i++) {\r\n\t\t\tblackPieces[i].setText(null);\r\n\t\t}\r\n\t\tfor (int i=0; i<whitePieces.length; i++) {\r\n\t\t\twhitePieces[i].setText(null);\r\n\t\t}\r\n\t\tbody.repaint();\r\n\t}", "public void clearTiles() {\n \tfor (int x = 0; x < (mAbsoluteTileCount.getX()); x++) {\n for (int y = 0; y < (mAbsoluteTileCount.getY()); y++) {\n setTile(0, x, y);\n }\n }\n }", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "private static void clearGridPosition(int pos) {\n for (int f = 0; f < ColorFrames.FRAMES_DIM; ++f)\n clearGridPositionFrame(pos, f);\n }", "public void clear(String name) {\n/* 95 */ this.texturesLinear.remove(name);\n/* 96 */ this.texturesNearest.remove(name);\n/* */ }", "public void resetGame() {\n frameRate(framerate);\n w = width;\n h = height;\n if (width % pixelSize != 0 || height % pixelSize != 0) {\n throw new IllegalArgumentException();\n }\n\n this.resetGrid();\n this.doRespawn = false;\n this.runGame = true;\n\n spawns = new HashMap();\n spawns.put(\"RIGHT\", new Location(50, (h - topHeight) / 2)); // LEFT SIDE\n spawns.put(\"LEFT\", new Location(w-50, (h - topHeight) / 2)); // RIGHT SIDE\n spawns.put(\"DOWN\", new Location(w/2, topHeight + 50)); // TOP SIDE\n spawns.put(\"UP\", new Location(w/2, h - 50)); // BOTTOM SIDE\n}", "public void setSprite(Sprite sprite_)\n\t{\n\t\tsprite=sprite_;\n\t}", "@Override\r\n\tpublic void destroy(Sprite collider) {\n\t}", "@Test\r\n public void testRemoveNodeByRowColumnIndex() {\r\nSystem.out.println(\"removeNodeByRowColumnIndex\");\r\n int row = 0;\r\n int column = 0;\r\n GridPane gridPane = new GridPane();\r\n ImageView img = null;\r\n ChessMain instance = new ChessMain();\r\n instance.removeNodeByRowColumnIndex(row, column, gridPane, img);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }", "private void removePiece(int row, int col, int storedRow, int storedCol){\r\n int pieceRow = -1;\r\n int pieceCol = -1;\r\n if(col > storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col-1;\r\n }\r\n if(col > storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col-1;\r\n }\r\n if(col < storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col+1;\r\n }\r\n if(col < storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col+1;\r\n }\r\n checks[pieceRow][pieceCol] = 0;\r\n if(isGame) nextPlayer.subCheck();\r\n }", "@Test\n public void testClearTileOccupied()\n {\n try\n {\n Square s = new Square();\n s.setTile(Tile.A);\n s.clearTile();\n assertNull(s.getTile());\n assertFalse(s.isOccupied());\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when removing a tile from an occupeid square.\");\n }\n }" ]
[ "0.7347875", "0.7163991", "0.7085277", "0.6906521", "0.653507", "0.65152", "0.64482796", "0.64274895", "0.6418103", "0.6376821", "0.61186093", "0.6009125", "0.5998343", "0.5934923", "0.5864485", "0.5810112", "0.5801661", "0.57912636", "0.5730423", "0.57110524", "0.57110524", "0.57110524", "0.5707047", "0.56915325", "0.56731516", "0.5650134", "0.5640619", "0.56349677", "0.5634429", "0.56047505", "0.5603844", "0.55959976", "0.55935913", "0.55875075", "0.5559797", "0.5550298", "0.55498284", "0.5518507", "0.5510315", "0.5497694", "0.5470719", "0.5468633", "0.54677504", "0.54557836", "0.5441166", "0.5426905", "0.542389", "0.5416024", "0.53820974", "0.53704506", "0.53696877", "0.53658247", "0.5352892", "0.5345288", "0.53441", "0.5342081", "0.53398454", "0.5337649", "0.5332296", "0.5314291", "0.52830285", "0.52824205", "0.5273367", "0.52633584", "0.526168", "0.5256524", "0.52555907", "0.5255258", "0.5250978", "0.52400726", "0.52379405", "0.52206165", "0.52178097", "0.52175784", "0.5211733", "0.51914287", "0.51900667", "0.5182763", "0.5179998", "0.5177289", "0.5172682", "0.5170076", "0.51698565", "0.5168374", "0.5165855", "0.5160341", "0.5158441", "0.5155156", "0.51504236", "0.51492333", "0.5147764", "0.5147278", "0.5144243", "0.5142534", "0.51285166", "0.5126659", "0.5125239", "0.51225", "0.51150703", "0.51147074" ]
0.78818125
0
Compute the farthest y coordinate that the sprite can move to before collision.
public double furthestMoveYdirection(Sprite s, int oldX,int oldY, boolean upwards ) { int id=s.getID(); //id of our sprite int y; //moving up if(upwards) { //going upwards, y coordinates decrease to 0 for(y=oldY; y>=0; y--) { //find where the front end of the sprite meets another sprite if(grid[oldX][y].getSpriteID()!=-1 && grid[oldX][y].getSpriteID()!=id) { //System.out.println("upward detected at y coord "+ y); return y+1; } } return 0; //no collisions detected so the farthest y-coordinate position for the top of the sprite is y=0 }else { //going downwards, y coordinates increase for(y=oldY; y<= GridLock.WIDTH- s.getSize(); y++) { //find where the tail end of the sprite meets another sprite if(grid[oldX][y].getSpriteID()!=-1 &&grid[oldX][y].getSpriteID()!=id) { //System.out.println("downard collision detected at y coord "+ y); return y-1; } //check length of sprite after its first square //to prevent dragging part-way over another sprite. for(int k=0; k<s.getSize(); k++) { if(grid[oldX][y+k].getSpriteID()!=id && grid[oldX][y+k].getSpriteID()!=-1 ) { return (y+k)-s.getSize() < 0? 0: (y+k)-s.getSize(); } } } //maximum y position for the top/first square of the sprite going downwards is when it's tail touches the //bottom of the grid. return GridLock.WIDTH- s.getSize(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getBiggestY() {\r\n double y = 0;\r\n List<Enemy> enemyLowest = this.lowestLine();\r\n if (enemyLowest.size() > 0) {\r\n y = enemyLowest.get(0).getCollisionRectangle().getBoundaries().getLowY();\r\n for (Enemy e: enemyLowest) {\r\n if (e.getCollisionRectangle().getBoundaries().getLowY() > y) {\r\n y = e.getCollisionRectangle().getBoundaries().getLowY();\r\n }\r\n }\r\n return y;\r\n }\r\n return y;\r\n }", "public int getMaxTileY() {\n return convertYToTileY(getMaxY() - 1);\n }", "public double getMaxY() { return getY() + getHeight(); }", "public final int getMaxY() {\n return getMinY() + getHeight();\n }", "Coordinate getMinY();", "public final int getY()\n\t{\n\t\treturn pos.y;\n\t}", "public double getUserFriendlyYPos(){\n return myGrid.getHeight()/ HALF-yPos;\n }", "public double getMaximumY () {\n return minimumY + height;\n }", "public float getY()\n {\n return getBounds().top + positionAnchor.y;\n }", "public int getY() {\n synchronized (this.yLock) {\n return (int) this.movementComposer.getYPosition();\n }\n }", "@Override\n public int getMinTileY() {\n return convertYToTileY(getMinY());\n }", "public int getY() {\n return (int) yPos;\n }", "public double getPositionY() {\n\t\treturn this.tilePositionY;\n\t}", "public int getY()\n\t{\n\t\treturn m_nPosY;\n\t}", "public int getY() {\n\t\t\tint lastRobot = (state[2 * k] + k - 1) % k;\n\t\t\treturn state[lastRobot + k];\n\t\t}", "public int getY() {\n if (this.coordinates == null)\n return -1;\n return this.coordinates.y();\n }", "public float getRelY() {\n return y + (getReferenceY()-Controller.getMap().getChunkCoords(0)[1]) * Chunk.getGameDepth();\n }", "public Integer getYOffset() {\n\t\tdouble frameHeight = this.pixy.getFrameHeight();\n\t\tdouble blockY = this.getY();\n\n\t\treturn (int) (frameHeight / 2 + blockY);\n\t}", "public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}", "public static int getEndYCoordinate(){\n\tint y = getThymioEndField_Y(); \n\t\t\n\t\tif(y == 0){\n\t\t\n \t}else{\n \t y *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}", "public float getY(){\n return hitBox.top;\n }", "public int getY() {\n return (int) this.center.getY();\n }", "int getYPos() {\n if (new Random().nextBoolean()) {\n return CollectTheFruit.height - 35;\n } \n else {\n return CollectTheFruit.height - 200;\n }\n }", "public int getAbsoluteY() {\r\n return getAbsoluteTop() - getParent().getAbsoluteTop();\r\n }", "public int getYPosition() {\n\t\treturn this.position.y;\n\t}", "@Override\n\tpublic int getY() {\n\t\treturn logicY;\n\t}", "protected double getReferenceY() {\n if (isYAxisBoundsManual() && !mGraphView.getGridLabelRenderer().isHumanRoundingY()) {\n if (Double.isNaN(referenceY)) {\n referenceY = getMinY(false);\n }\n return referenceY;\n } else {\n // starting from 0 so that the steps have nice numbers\n return 0;\n }\n }", "@Override\n\tpublic float getY() {\n\t\treturn lilyPosY;\n\t}", "public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}", "public int getTileY()\n\t{\n\t\treturn this.tileY;\n\t}", "public double getY() { return _height<0? _y + _height : _y; }", "public int setObjYCoord() {\n\t\tint objY = ThreadLocalRandom.current().nextInt(1, getRoomLength() - 1);\r\n\t\treturn objY;\r\n\t}", "public int getTheYPosition(int y){\n\t\tif(y>=1 && y<=4){\n\t\t\treturn 7;\n\t\t}\n\t\telse if(y>=5 && y<=8){\n\t\t\treturn 6;\n\t\t}\n\t\telse if(y>=9 && y<=12){\n\t\t\treturn 5;\n\t\t}\n\t\telse if(y>=13 && y<=16){\n\t\t\treturn 4;\n\t\t}\n\t\telse if(y>=17 && y<=20){\n\t\t\treturn 3;\n\t\t}\n\t\telse if(y>=21 && y<=24){\n\t\t\treturn 2;\n\t\t}\n\t\telse if(y>=25 && y<=28){\n\t\t\treturn 1;\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t}", "public int getY() {\n return (int) center.getY();\n }", "public int getYPos();", "public float getY() {\n return pos.y;\n }", "public int getTileY() {\n\t\treturn tileY;\n\t}", "public int getY() {\n\treturn baseYCoord;\n}", "public final float getPositionY() {\r\n\t\treturn getState(false).getPositionY();\r\n\t}", "public int getY()\r\n\t{\r\n\t\treturn (int)y;\r\n\t}", "public int getY() {\r\n return (int) center.getY();\r\n }", "public int getY() {\n return pos_y;\n }", "@Override\r\n\tpublic int getY() {\n\t\treturn (int)y;\r\n\t}", "long getY();", "public int getY() {\n\t\t\n\t\treturn yPosition;\t\t// Gets the y integer\n\t}", "public int getY() {\n return posY;\n }", "public double getHighestChildY() {\n\t\t/* Aucun enfant => aucune contrainte en y vers le bas */\n\t\tif (childrenEdges == null)\n\t\t\treturn Double.MAX_VALUE;\n\t\t\n\t\tdouble minY = Double.MAX_VALUE;\n\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t/*\n\t\t\t * Recherche de l'extrémité la plus basse de l'arête (la plus haute étant le noeud\n\t\t\t * courant)\n\t\t\t */\n\t\t\tEdge currentEdge = childrenEdges.elementAt(i);\n\t\t\tdouble y1 = currentEdge.getSource().getShape().getY();\n\t\t\tdouble y2 = currentEdge.getDestination().getShape().getY();\n\t\t\tdouble y = (y1 > y2) ? y1 : y2;\n\t\t\t\n\t\t\t/* Recherche de l'extrémité la plus haute parmi toutes les extrémités basses */\n\t\t\tif (y < minY)\n\t\t\t\tminY = y;\n\t\t}\n\t\t\n\t\treturn minY;\n\t}", "public int getY() {\n return (int) Math.round(y);\n }", "public final int getPositionY() {\r\n return (int) position.y();\r\n }", "private double findMaxY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble max = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (max<pointList.get(i).getY())\n\t\t\t\tmax = pointList.get(i).getY();\n\t\treturn max;\n\t}", "public int getMaxY() {\n return scroller.getMaxY();\n }", "public int getMovementY() {\r\n return movementY;\r\n }", "double getYPosition();", "public int getMaxY() {\n return maxY;\n }", "public int yPos() {\r\n\t\treturn this.yPos;\r\n\t}", "public int yPos() {\r\n\t\treturn this.yPos;\r\n\t}", "public int getYPos() {\r\n\t\treturn this.cameraY;\r\n\t}", "public double getChannelYPositionLast() {\n double max = 0.0;\n for (ChannelGraphic channelGraphic : channelGraphics) {\n if (channelGraphic.getyPosition() > max) {\n max = channelGraphic.getyPosition();\n }\n }\n return max;\n }", "public int get_Y_Coordinate()\n {\n return currentBallY;\n }", "public int getY()\r\n\t{\r\n\t\treturn this.Y;\r\n\t}", "public int getPos_y(){\n\t\treturn pos_y;\n\t}", "public int getCoordY() \r\n {\r\n \treturn this.coordY;\r\n }", "public int getSpawnY() {\n\t\treturn spawnY;\n\t}", "public int getEnemyMoveIntentY() {\n return enemyMoveIntentY;\n }", "public int getMaxY() {\n\t\treturn maxY;\n\t}", "public int getBlockY()\n\t {\n\t\t if(y >= 0.0) return (int)y;\n\t\t return -1 + (int)(y);\n\t }", "public int getY() { return (int)y; }", "int getBoundsY();", "public int getCurrentAbilityTargetY() {\n return currentAbilityTargetY;\n }", "public final int getY()\n{\n\treturn _y;\n}", "public int getYPos() {\n\t\treturn yPos;\n\t}", "public double getFrameMaxY() { return isRSS()? getFrame().getMaxY() : getMaxY(); }", "public int getY()\r\n {\r\n return yLoc;\r\n }", "public float max2DY() {\n return Math.max(stop2D.y, start2D.y);\n }", "private float getMaxY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxY = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxY = Math.max(maxY, point [1]);\n } \n return maxY;\n }", "public int getY() {\r\n\t\treturn this.y;\r\n\t}", "public int getY()\n\t{\n\t\treturn this.y;\n\t}", "public int getY()\n\t{\n\t\treturn this.y;\n\t}", "public double getPlayerYPos() {\r\n return jumper.getYposition();\r\n }", "public int getY()\n\t{\n\t\treturn mY;\n\t}", "public double getY() {\n return collider.getY();\n }", "public float setYMax(){\n\t\tif (game.getDifficulty() == 0)\n\t\t\treturn 72;\n\t\telse if (game.getDifficulty() == 1)\n\t\t\treturn 108;\n\t\telse\n\t\t\treturn 144;\n\t}", "public int getY() {\r\n\t\treturn ycoord;\r\n\t}", "public int getyPos() \n\t{\n\t\treturn yPos;\n\t}", "public int getYfinal(int pos){\n\t\treturn yc[pos];\n\t}", "public int getyCoord() {\r\n\t\treturn yCoord;\r\n\t}", "protected float getY(float y) {\r\n\t\treturn this.getHeight() - ((y - viewStart.y) * parent.pixelsPerUnit);\r\n\t}", "protected Number getY() {\n return this.yCoordinate;\n }", "public int getY() {\n\t\treturn this.y;\n\t}", "public int getY() {\n\t\treturn this.y;\n\t}", "public int getY() {\n\t\treturn this.y;\n\t}", "public double getMaxY() {\n\t\treturn my;\n\t}", "int getY() {\n return yPos;\n }", "public double getYPos() {\n\t\treturn this.position[1];\n\t}", "public double getCardPosY(){\r\n return getY();\r\n }", "public int getCurrentY() {\n return currentY;\n }", "public int getY()\r\n {\r\n return yCoord;\r\n }", "public double getY() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble y = bounds.getY() + (_yt * bounds.getHeight());\n\t\treturn y;\n\t}", "public int getY()\r\n\t{\r\n\t\treturn y;\r\n\t}", "public int getY() {\r\n return this.y;\r\n }" ]
[ "0.72014576", "0.69716203", "0.6950355", "0.6873473", "0.683227", "0.673946", "0.67242193", "0.6708904", "0.6702272", "0.6674799", "0.65973735", "0.6594858", "0.6569892", "0.6569695", "0.65406233", "0.6537872", "0.65187216", "0.64890236", "0.6485847", "0.64837265", "0.6448694", "0.64396894", "0.6413802", "0.6398026", "0.6396167", "0.6391984", "0.6390652", "0.63853097", "0.6375328", "0.63752055", "0.6369764", "0.63461137", "0.63454646", "0.63403994", "0.6339445", "0.6339411", "0.63375604", "0.6329947", "0.63228476", "0.63147485", "0.6305671", "0.629415", "0.6292744", "0.6291146", "0.6291059", "0.628804", "0.62828624", "0.62802964", "0.62799853", "0.6279215", "0.6278786", "0.6278164", "0.6271964", "0.6270503", "0.6266155", "0.6266155", "0.6265596", "0.62616706", "0.6260678", "0.62590045", "0.62546915", "0.6250498", "0.62437433", "0.624163", "0.62405574", "0.6236942", "0.62358147", "0.6231291", "0.62239176", "0.621708", "0.6214843", "0.6209115", "0.6208358", "0.6202214", "0.6201967", "0.6200129", "0.6197425", "0.6197425", "0.61970615", "0.6194505", "0.6193569", "0.6191404", "0.61864775", "0.61826277", "0.6178981", "0.61767364", "0.61752117", "0.6170885", "0.61684483", "0.61684483", "0.61684483", "0.61674577", "0.6166438", "0.61633587", "0.6160753", "0.6160291", "0.61568856", "0.61512667", "0.61416334", "0.61408293" ]
0.6328368
38
Resets the moveCtr to 0, for when a game is reset.
public void resetMoveCtr() { moveCtr=0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetMoveCount() {\r\n\t\tmoveCount = 0;\r\n\t}", "public void resetMove() {\n pointer = 0;\n }", "public void resetMove() {\n\t\tthis.moveMade = false;\n\t}", "public void resetMove(Move move) {\n board[move.x * LENGTH + move.y] = Player.None;\n numMoves--;\n }", "public void ResetPlayer() {\n\t\tfor (int i = 0; i < moveOrder.length; i++) {\n\t\t\tmoves.add(moveOrder[i]);\n\t\t}\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tthis.movesMade = 0;\n\t\tthis.face = 1;\n\t}", "public synchronized void reset(){\n\t\tif(motor.isMoving())\n\t\t\treturn;\n\t\tmotor.rotateTo(0);\n\t}", "public void resetMovementAttempts() {\r\n\t\tmovementAttempts = 0;\r\n\t}", "private void resetValidMove()\n {\n validMoves = null;\n setToValidMoveColor = false;\n validMoveFlag = false;\n }", "public void resetBoard() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tnew GameBoard();\n\t}", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "@Override\n public void reset() {\n mMoveButtonActive = true;\n mMoveButtonPressed = false;\n mFireButtonPressed = false;\n droidHitPoints = 0;\n totalKillCollectPoints = 0;\n totalCollectNum = 0;\n// mCoinCount = 0;\n// mRubyCount = 0;\n mTotalKillCollectPointsDigits[0] = 0;\n mTotalKillCollectPointsDigits[1] = -1;\n mTotalCollectNumDigits[0] = 0;\n mTotalCollectNumDigits[1] = -1;\n totalKillCollectPointsDigitsChanged = true;\n totalCollectNumDigitsChanged = true;\n// mCoinDigits[0] = 0;\n// mCoinDigits[1] = -1;\n// mRubyDigits[0] = 0;\n// mRubyDigits[1] = -1;\n// mCoinDigitsChanged = true;\n// mRubyDigitsChanged = true;\n \n levelIntro = false;\n// mLevelIntro = false;\n \n mFPS = 0;\n mFPSDigits[0] = 0;\n mFPSDigits[1] = -1;\n mFPSDigitsChanged = true;\n mShowFPS = false;\n for (int x = 0; x < mDigitDrawables.length; x++) {\n mDigitDrawables[x] = null;\n }\n// mXDrawable = null;\n mFadePendingEventType = GameFlowEvent.EVENT_INVALID;\n mFadePendingEventIndex = 0;\n }", "public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "protected void resetMotion(){\n \tisMoving = false;\n \tframesForCurrentMove = 0;\n \ttargetMainCellCoordinates = getCurrentMainCellCoordinates();\n }", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "public void reset() {\n\tthis.contents = \"\";\n\tthis.isLegalMove = false;\n }", "private void resetTurn(){\r\n lastRow = 0;\r\n lastCol = 0;\r\n selected = false;\r\n nextMove = new int[8][8];\r\n moveList = new Stack<>();\r\n repaint();\r\n System.out.println(toString());\r\n }", "public void reset(){\r\n\t\tif (moveTimer != null) moveTimer.stop();\r\n\t\tmySnake = new Snake(MAX_WIDTH/2, MAX_HEIGHT/2, MAX_WIDTH, MAX_HEIGHT);\r\n\t\tmoveSpeed = mySnake.getList().size();\r\n\t\tmoveTimer = new Timer(1000/moveSpeed, new MoveTimerHelper());\r\n\t\tmoveTimer.start();\r\n\t\tshrooms = new ArrayList<Mushroom>();\r\n\r\n\t\tignoreStrokes = 0;\r\n\t\t\r\n\t\tif (lives <= 0){\r\n\t\t\tgameOver = true;\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public void reset() {\n\t\t// SimpleTools.processTrackingOutput(\"Resetting TicTacToe.\");\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard[0].length; j++) {\n\t\t\t\tcheckerboard[i][j] = EMPTY;\n\t\t\t} // Of for j\n\t\t} // Of for i\n\t\tcurrentState = 0;\n\t\tcurrentRouteLength = 1;\n\n\t\t// White first\n\t\tcurrentPlayer = WHITE;\n\t}", "public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "private void resetGame()\n {\n createRooms();\n createItems();\n createCharacters();\n\n int itemsToAdd = getRandomNumber(10,items.size());\n addRoomItems(itemsToAdd);\n winItem = createWinItem();\n\n moves = 1;\n currentRoom = getRoom(STARTROOM); // Player's start location.\n }", "public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void resetGame(){\n initBoard(ROWS, COLS, rand);\n }", "private void resetAfterGame() {\n }", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "public void reset() {\n position = 0;\n }", "public void reset() {\n\t\t//reset player to 0\n\t\tplayer = 0;\n\t\t\n\t\tfor(int row = size - 1; row >= 0; row --)\n\t\t\tfor(int col = 0; col < size; col ++)\n\t\t\t\tfor(int dep = 0; dep < size; dep ++)\n\t\t\t\t\t//goes through all board positions and sets to -1\n\t\t\t\t\tboard[row][col][dep] = -1;\n\t}", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "public void resetRenderer() {\n\n\t\tanimationComplete = true;\n\t\tif (pieceMove != null) {\n\t\t\tpieceMove.setPiece(null);\n\t\t\tpieceMove.setSquares(-99);\n\t\t}\n\t\tpieceMove = null;\n\t\tmoveFinalIndex = -999;\n\t\tmoveTempIndex = -999;\n\t\tmoveCount = -999;\n\t\tmoveCountHomeSq = 0;\n\t\trestMovedToStart = false;\n\t\tmovedToRest = false;\n\t\thomeSqMovedToHome = false;\n\n\t\tmoveToRestSq = null;\n\t\tmoveToHome = null;\n\n\t\tdiceList = new ArrayList<>();\n\t\tfor (int d = 0; d < selectedPlayer.getRuleEngine().dicePerGame(); d++) {\n\t\t\tDice newDice = createDiceInstance();\n\t\t\tnewDice.setShake(true);\n\t\t\tdiceList.add(newDice);\n\t\t}\n\n\t}", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "public void reset() {\n\t board = new int[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,\n 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0,\n 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2};\n\t currentPlayer = 1;\n\t turnCount = 0;\n\t for (int i=0; i<81; i++) {\n\t \n\t\t hash ^= rand[3*i+board[i]]; //row-major order\n\t \n\t }\n }", "private void reset() {\n\n try {\n if (playerOne.win() || playerTwo.win()) {\n Stage stage = application.getPrimaryStage();\n stage.setScene(new EndScene(application, playerOne, playerTwo));\n } else {\n ball.setLayoutX(WIDTH / 2 - LAYOUT / 2);\n ball.setLayoutY(HEIGHT / 2 - LAYOUT / 2);\n\n ball.randomiseDirection(new Random().nextInt(4));\n ball.resetMovementSpeed();\n\n playerOnePaddle.setLayoutY(HEIGHT / 2 - playerOnePaddle.getHeight() / 2);\n playerTwoPaddle.setLayoutY(playerOnePaddle.getLayoutY());\n\n countdown = 50;\n }\n } catch (Exception ex) {\n Logger.getLogger(GameScene.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++)\r\n\t\t\t\tgame[i][j].Clear();\r\n\t\t}\r\n\t\tcomputerTurn();\r\n\t\tcomputerTurn();\r\n\t\tfreeCells = rows_size*columns_size - 2;\r\n\t\ttakenCells = 2;\r\n\t}", "public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }", "public void reset()\n {\n currentPosition = 0;\n }", "public void resetXMovement() {\n this.xVel = 0;\n this.xTargetSpeed = 0;\n }", "public void resetBoard(){\n totalmoves = 0;\n this.board = new Cell[3][3];\n //fill the board with \"-\"\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board[i][j]=new Cell(new Coordinates(i,j), \"-\");\n }\n }\n }", "public void ResetCounter()\r\n {\r\n counter.setCurrentValue(this.startValue);\r\n }", "public void resetCounters() {\n\t\t//RobotMap.leftEncoder.reset();\n\t\t//RobotMap.rightEncoder.reset();\n\t\tRobotMap.ahrs.zeroYaw();\n\t\tRobotMap.talonLeft.setSelectedSensorPosition(0, 0, 10);\n\t\tRobotMap.talonRight.setSelectedSensorPosition(0, 0, 10);\n\t\tbearing = 0;\n\t}", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "private void softReset() {\n // variables\n lapMap.clear();\n // ui\n sessionTView.setText(\"\");\n positionTView.setText(\"-\");\n currentLapTView.setText(\"--:--:---\");\n lastLapTView.setText(\"--:--:---\");\n bestLapTView.setText(\"--:--:---\");\n currentLapNumberTView.setText(\"-\");\n gapTView.setText(\" -.---\");\n fastestDriver = Float.MAX_VALUE;\n fastestDriverName = null;\n fastestDriverTView.setText(\"--:--:---\");\n fastestDriverNameTView.setText(\"Fastest lap\");\n Log.d(TAG, \"SOFT Reset: between game states\");\n }", "public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }", "void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "@Override\n\tpublic void resetMoved() {\n\t\tthis.moved = false;\n\t}", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "public void resetDrag(){\n\t\tsetCurrentPosition( new Point(0,0) );\n\t\tsetScale(1);\n\t\tlengthsYShift = defaultYShift;\n\t}", "void reset() {\n myIsJumping = myNoJumpInt;\n setRefPixelPosition(myInitialX, myInitialY);\n setFrameSequence(FRAME_SEQUENCE);\n myScoreThisJump = 0;\n // at first the cowboy faces right:\n setTransform(TRANS_NONE);\n }", "public void reset()\n {\n currentScore = 0;\n }", "public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}", "public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "void resetGame() {\r\n if (GameInfo.getInstance().isWin()) {\r\n GameInfo.getInstance().resetDots();\r\n MazeMap.getInstance().init();\r\n GameInfo.getInstance().resetFruitDisappearTime();\r\n MazeMap.getInstance().updateMaze(GameInfo.getInstance().getMode());\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.PACMAN)) {\r\n pcs.removePropertyChangeListener(Constants.PACMAN, pcl);\r\n }\r\n for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners(Constants.GHOSTS)) {\r\n pcs.removePropertyChangeListener(Constants.GHOSTS, pcl);\r\n }\r\n PacMan pacMan = initPacMan();\r\n initGhosts(pacMan);\r\n }", "private void resetGame() {\r\n SCORE = 0;\r\n defaultState();\r\n System.arraycopy(WordCollection.WORD, 0, tempWord, 0, WordCollection.WORD.length);\r\n }", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}", "void clear() {\n _whoseMove = WHITE;\n _gameOver = false;\n\n for (int i = 0; i <= MAX_INDEX; i += 1) {\n set(i, BLACK);\n }\n for (int i : _initWhite) {\n set(i, WHITE);\n }\n set(12, EMPTY);\n _history.clear();\n\n setInitialDirection(MAX_INDEX);\n\n setChanged();\n notifyObservers();\n }", "public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }", "protected void initNumOfMoves() {\n\t\tthis.numOfMoves = 0;\n\t}", "private void resetGame(){\n\n }", "public void resetPlayerPosition() {\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\t}", "public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}", "public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }", "public void reset() {\n\t\tscore = 0;\n\t}", "private void resetGame() {\n game.resetGame();\n round_score = 0;\n\n // Reset values in views\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n round_score_view.setText(String.valueOf(round_score));\n String begin_label = \"Round \" + game.getRound() + \" - Player's Turn\";\n round_label.setText(begin_label);\n\n getTargetScore();\n }", "public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\n }", "public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\n\t}", "public void reset() {\n\t\tArrays.fill(distance,0);\n\t\tused.clear();\n\t}", "@Override\n\tpublic void reset() {\n\t\tfor(int i=0; i<mRemainedCounters; i++){\n\t\t\tfinal ICounter counter = this.mCounters.getFirst();\n\t\t\tcounter.reset();\n\t\t\tthis.mCounters.removeFirst();\n\t\t\tthis.mCounters.addLast(counter);\n\t\t}\n\t\tthis.mRemainedCounters = this.mCounters.size();\n\t}", "private void reset() {\n\t\tmVelocityTracker.clear();\n\t\tmSwiping = false;\n\t\tmAbleToSwipe = false;\n\t}", "public void reset( )\n\t{\n\t\tint count = 1;\n\t\tthis.setMoves( 0 );\n\t\tfor( int i = 0; i < this.getSize(); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth(); j++ )\n\t\t\t{\n\t\t\t\tthis.setTile( count++, i, j );\n\t\t\t\tif( i == getSize( ) - 1 && j == getWidth( ) - 1 ) {\n\t\t\t\t\tthis.setTile( -1, i, j );\n\t\t\t\t\tlocationX = i;\n\t\t\t\t\tlocationY = j;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public synchronized void reset()\n\t{\n\t\tm_elapsed = 0;\n\t}", "public void reset()\t{\n\t\tthis.snake.clear();\r\n\t\tdir = 1;\r\n\t\tthis.snake.add(new Dimension(2,5));\r\n\t\tthis.snake.add(new Dimension(2,6));\r\n\t\tthis.snake.add(new Dimension(2,7));\r\n\t}", "@Override\n public void reset(MiniGame game) {\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "protected void setMove(int _move)\t\t{\tmove = _move;\t\t}", "public void reset()\n\t{\n\t\t\n\t\tif (lifeCount > 1)\n\t\t{\n\t\t\tthis.setCollisionOn(false);\n\t\t\tthis.setEingabe(false);\n\t\t\tthis.reduceLifeCount();\n\t\t\timg.setRotation(0);\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY + 105);\n\t\t\tthis.spdX = startSpdX;\n\t\t\tthis.setSpdY(-60);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tsetRupeesInBag(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t * When Gameover\n\t\t\t */\n\t\t\t\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tthis.reduceLifeCount();\n\t\t}\n\t}", "public void resetScreen(){\n\t\tGame_Map_Manager.infoVisible= false;\n\t\tGame_PauseMenu.actorManager.open = false;\n\t\tPlayerGoals.open = false;\n\t\tGame_Shop.actorManager.open = false;\n\t\tTrainDepotUI.actorManager.open = false;\n\t\tGameScreenUI.resourcebarexpanded =false;\n\t\tGoalMenu.open= false;\n\t\t\n\t\t//CARDS\n\t\tGame_CardHand.actorManager.open=false;\n\t\tGame_CardHand.actorManager.cardactors.clear();;\n\t\t\n\t\t//Map\n\t\tGame_StartingSequence.reset();\n\t\tGame_Map_Manager.resetMap();\n\t}", "public void reset()\n {\n this.timeToCook = 0;\n this.startTime = 0;\n }", "public void gameReset() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setText(\"\");\r\n\t\t\t\tsquares[n][m].setBackground(Color.BLUE);\r\n\t\t\t\tsquares[n][m].setEnabled(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(true);\r\n\t\t\tbuttons[a].setBackground(Color.BLACK);\r\n\r\n\t\t}\r\n\t\tif (gameType == 2) {\r\n\t\t\tboard();\r\n\t\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\t\tindex[i] = 6;\r\n\t\t\t}\r\n\r\n\t\t} else if (gameType == 1) {\r\n\t\t\tcompAI.setUpArray(ROW, COL);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void reset(){\n\t\tstate.reset();\n\t\toldState.reset();\n\t\treturnAction = new boolean[Environment.numberOfButtons]; \n\t\trewardSoFar = 0;\n\t\tcurrentReward = 0;\n\t}", "@Override\r\n\tpublic void resetTurn() {\r\n\t\tmoveDistanceRemaining = 3;\r\n\t\thasAttackedOrDefended = false;\r\n\t\tif (isRested) {\r\n\t\t\thealth += Math.floor(Math.random()*(6)+5); // add between 5 and 10 health to character\r\n\t\t\thealth = Math.min(health, 100);\r\n\t\t}\r\n\t}", "public void restartGame() {\n game.level = 1;\n game.overallMoves = 0;\n f.score.setText(\"Overall Score: 0\");\n restartLevel();\n }", "protected void reInitialize() {\n leftSpeed = 0;\n rightSpeed = 0;\n leftPosition = 0;\n rightPosition = 0;\n }", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "public void reset() {\n\t\tplayerModelDiff1.clear();\n\t\tplayerModelDiff4.clear();\n\t\tplayerModelDiff7.clear();\n\t\tif(normalDiffMethods)\n\t\t{\t\n\t\tupdatePlayerModel();\n\t\tdisplayReceivedRewards();\n\t\t}\n\t\tint temp_diffsegment1;\n\t\tint temp_diffsegment2;\n\t\tif (currentLevelSegment == 0) {\n\t\t\t//System.out.println(\"-you died in the first segment, resetting to how you just started\");\n\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(0);\n\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(1);\n\t\t}\n\t\telse {\n\t\t\t//System.out.println(\"-nextSegmentAlreadyGenerated:\" + nextSegmentAlreadyGenerated);\n\t\t\tif (nextSegmentAlreadyGenerated) {\n\t\t\t\t//because the next segment is already generated (and so the previous does not exist anymore),\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//because the next segment is not yet generated\n\t\t\t\ttemp_diffsegment1 = (int) plannedDifficultyLevels.get(currentLevelSegment-1);\n\t\t\t\ttemp_diffsegment2 = (int) plannedDifficultyLevels.get(currentLevelSegment);\n\t\t\t}\n\t\t}\n\t\tplannedDifficultyLevels.clear();\n\n\t\t//System.out.println(\"-resetting to: \" + temp_diffsegment1 + \", \" + temp_diffsegment2);\n\t\tplannedDifficultyLevels.add(temp_diffsegment1);\n\t\tplannedDifficultyLevels.add(temp_diffsegment2);\n\t\tcurrentLevelSegment = 0;\n\n\t\tpaused = false;\n\t\tSprite.spriteContext = this;\n\t\tsprites.clear();\n\n\t\ttry {\n\t\t\tlevel2 = level2_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tlevel3 = level3_reset.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n fixborders();\n\t\tconjoin();\n\n\t\tlayer = new LevelRenderer(level, graphicsConfiguration, 320, 240);\n\t\tfor (int i = 0; i < 2; i++)\n\t\t{\n\t\t\tint scrollSpeed = 4 >> i;\n\t\tint w = ((level.getWidth() * 16) - 320) / scrollSpeed + 320;\n\t\tint h = ((level.getHeight() * 16) - 240) / scrollSpeed + 240;\n\t\tLevel bgLevel = BgLevelGenerator.createLevel(w / 32 + 1, h / 32 + 1, i == 0, levelType);\n\t\tbgLayer[i] = new BgRenderer(bgLevel, graphicsConfiguration, 320, 240, scrollSpeed);\n\t\t}\n\n\t\tdouble oldX = 0;\n\t\tif(mario!=null)\n\t\t\toldX = mario.x;\n\n\t\tmario = new Mario(this);\n\t\tsprites.add(mario);\n\t\tstartTime = 1;\n\n\t\ttimeLeft = 200*15;\n\n\t\ttick = 0;\n\n\t\t/*\n\t\t * SETS UP ALL OF THE CHECKPOINTS TO CHECK FOR SWITCHING\n\t\t */\n\t\t switchPoints = new ArrayList<Double>();\n\n\t\t//first pick a random starting waypoint from among ten positions\n\t\tint squareSize = 16; //size of one square in pixels\n\t\tint sections = 10;\n\n\t\tdouble startX = 32; //mario start position\n\t\tdouble endX = level.getxExit()*squareSize; //position of the end on the level\n\t\t//if(!isCustom && recorder==null)\n level2.playValues = this.valueList[0];\n\t\t\trecorder = new DataRecorder(this,level3,keys);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.COINS); //Sander disable\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_COINS);\n\t\t\t////System.out.println(\"\\n enemies LEFT : \" + recorder.level.BLOCKS_POWER);\n\t\t\tgameStarted = false;\n\t}" ]
[ "0.78231126", "0.7685235", "0.7538618", "0.724573", "0.711485", "0.70544523", "0.70250946", "0.6985235", "0.6918685", "0.68746006", "0.6758075", "0.6757468", "0.67031866", "0.6693166", "0.6684023", "0.66086245", "0.6597311", "0.65569055", "0.6552043", "0.65498114", "0.6535743", "0.6528111", "0.65030706", "0.6498546", "0.64939463", "0.6493147", "0.6492956", "0.6423063", "0.64035994", "0.639329", "0.63931954", "0.6388355", "0.63749635", "0.63681746", "0.63597286", "0.6357706", "0.6352746", "0.6332546", "0.6311683", "0.63042283", "0.62658095", "0.6265692", "0.6255478", "0.6254645", "0.62466145", "0.62410104", "0.62363285", "0.62339836", "0.6231855", "0.62274814", "0.622655", "0.6215069", "0.62105674", "0.6206415", "0.62006766", "0.61965406", "0.6196531", "0.61929363", "0.61844534", "0.61739975", "0.61633843", "0.61608446", "0.6142926", "0.61391026", "0.61358476", "0.61288446", "0.6127028", "0.6118866", "0.6113508", "0.6094202", "0.6088499", "0.6083785", "0.608166", "0.60771674", "0.6074099", "0.6070787", "0.60704494", "0.6041961", "0.6038966", "0.6023445", "0.601693", "0.6013021", "0.6003255", "0.6002084", "0.6000877", "0.5990824", "0.59907264", "0.59888", "0.59864104", "0.59863013", "0.5985118", "0.59755296", "0.5974873", "0.5966645", "0.5963556", "0.5963275", "0.5958973", "0.59399784", "0.5938685", "0.59305423" ]
0.89203906
0
Getter method for number of moves that Sprites have made on the grid.
public int getMovectr() { return moveCtr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberOfMoves();", "public int getNumberOfMoves() {\r\n return numberOfMoves;\r\n }", "public int moves()\n {\n return numberOfMoves;\n }", "public int getNumMoves() {\n\t\treturn numMoves;\n\t}", "public int getTotalNumberOfSprites() {\n return this.getRows() * this.getColumns();\n }", "public int getMoveCount() {\r\n return this.moveCount;\r\n }", "public int getMoveCount() {\r\n\t\treturn moveCount;\r\n\r\n\t}", "public int getMoveCount() {\n\t\treturn moveCount;\n\t}", "int getNumberOfStonesOnBoard();", "public int getNumMoving() {\n int numMoving = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n if (single.getState() == SingleState.MOVING ||\n single.getState() == SingleState.CATCHING_UP ||\n single.getState() == SingleState.ROUTING) {\n numMoving += 1;\n }\n }\n return numMoving;\n }", "int moveCount() {\r\n return _moveCount;\r\n }", "int movesMade() {\n return _moves.size();\n }", "public int getBoardSize(){\n\t\treturn grids.getRows();\n\t}", "public int moves() {\n return moves;\n }", "public int moves() {\n return moves;\n }", "public int totalSteps() {\n return moves.size();\n }", "public int moves() {\n\n return initialSolvable ? solutionNode.numberOfMovesMade : -1;\n }", "public int moves()\n {\n return moves;\n }", "public int moves() {\n return goal == null ? -1 : goal.numMoves;\n }", "public static Integer getNumberOfships() {\n\t\treturn NUMBEROFSHIPS;\n\t}", "public int getNumYTiles() { \r\n return numRows;\r\n }", "int moves() {\n return moves;\n }", "public int getNumOfPlayerPieces() {\n return playerPiecePositions.length;\n }", "int getCellsCount();", "public static int getCount()\n\t{\n\t\treturn projectileCount;\n\t}", "int getBoardSize() {\n return row * column;\n }", "public int moves() {\n\t\tif (goal == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn goal.moves;\n\t}", "public int moves() {\n return moveMin;\n }", "public int moves()\n {\n\n if (goalNode!=null && goalNode.board.isGoal()){\n return goalNode.moves;\n }\n return -1;\n }", "public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }", "public int getMoves(){\r\n return moves;\r\n }", "public int getNumberObstacles() {\n return numberObstacles;\n }", "public int getMoves(){\n return moves;\n }", "public int moves() {\n return isSolvable() ? finalMove.moves : -1;\n }", "@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);\n\n for (int curRow = rowStart; curRow <= rowFinish; curRow++) {\n for (int curCol = colStart; curCol <= colFinish; curCol++) {\n if (grid[curRow][curCol].getType() == Tile.MINE) count++;\n }\n }\n return count;\n }", "public int getNumNotHit()\n {\n return shipCoordinates.size() - hitCoordinates.size();\n }", "@Override\r\n\t@Basic\r\n\tpublic int getNbSquares() {\r\n\t\treturn squares.size();\r\n\t}", "public void incrementNumMoves() {\n\t\tthis.moveMade = true;\n\t\tthis.numMoves++;\n\t}", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public int tilesRemain() {\n return tiles.size();\n }", "public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }", "public int getBoardWidth(){\n return Cols;\n }", "void raiseNumberOfStonesOnBoard();", "int getMonstersCount();", "int getMonstersCount();", "public int moves() {\n if (!isSolvable()) return -1;\n return realMoves;\n }", "public int size()\r\n\t{\r\n\t\treturn _tiles.size();\r\n\t}", "public int getNbPawns(Player player) {\n Pawn aPawn;\n int Size, nbPawn;\n Size = getSize();\n nbPawn = 0;\n\n for (int numLine = 0; numLine < Size; numLine++) {\n for (int numCol = 0; numCol < Size; numCol++) {\n\n aPawn = field[numLine][numCol];\n if (aPawn != null) {\n if (aPawn.getPlayer() == player) nbPawn++; //if the pawn belong to player\n }\n\n }\n }\n\n return nbPawn;\n }", "public int moves() {\r\n if (solution != null) {\r\n return solution.size() - 1;\r\n } else {\r\n return -1;\r\n }\r\n }", "public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }", "protected int getCellCount() {\n return this.cellCountStack.getLast();\n }", "public void incrementMoves()\n {\n moves ++;\n }", "int getNumberOfStonesLeftToPlace();", "public int getTilesMoved () {\r\n\t\treturn this.tilesMoved;\r\n\t}", "@Override\n\tpublic int size() {\n\t\treturn grid.length;\n\t}", "public int moves() {\n return solution.size() - 1;\n }", "public int getGridRows() \n { \n return gridRows; \n }", "public int getPlayerMoveAmount() {\n return 3;\n }", "public int getNonMovers();", "public int getWidth(){\r\n\t\treturn grid.length;\r\n\t}", "public int getShipPieces() {\r\n\t\treturn shipPiecesFound;\r\n\t}", "public int getCellsCount() {\n return cells_.size();\n }", "public int getSize() {\n return board.getSize();\n }", "public int getNumberOfShips() {\r\n\t\treturn numberOfShips;\r\n\t}", "public abstract int getNumberOfLivingNeighbours(int x, int y);", "public static int size() {\n return cells.size();\n }", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "public int moves() {\n \tif (!isSolvable) return -1;\n \treturn solutionNode.getMoves();\n }", "public int getNumberShips();", "@Override\n\tpublic int numOfCollisions() {\n\n\t\treturn this.collision;\n\t}", "public int getPieceCount () {\n return m_PieceCount;\n\t}", "@Override\r\n\tpublic int getPegCount() {\r\n\t\tint shipSize = 3;\r\n\t\treturn shipSize;\r\n\t}", "public int getShipsAlive() {\n return this.numberOfShips;\n }", "public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }", "@Override\n public int getNumXTiles() {\n return getMaxTileX() - getMinTileX() + 1;\n }", "int numOfPillars() {\n // there are one more coordinate line than blocks in each direction\n // since each block must be hinged on a coordinate line on each side\n return (ni+1) * (nj+1);\n }", "public int moves() {\n if (!isSolvable()) {\n return -1;\n } else {\n return minNode.getMove();\n }\n\n }", "@Override\n public int getNumYTiles() {\n return getMaxTileY() - getMinTileY() + 1;\n }", "public int numberOfBalls() {\r\n return 3;\r\n }", "public int moves() {\n\t\tif (!isSolvable())\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn result.size() - 1;\n\t}", "public int getRows() {\n\t\treturn myGrid.getRows();\n\t}", "public int numberOfBalls() {\n this.numberOfBalls = 4;\n return 4;\n }", "public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }", "public int numTurnsUntilMove(GameState gm, Player p) {\n\t\tint count = 0;\n\t\t\n\t\tcount = gm.getPlayers().indexOf(p)-gm.getPlayers().indexOf(this);\n\t\tif (count < 0) {\n\t\t\treturn count + gm.getPlayers().size();\n\t\t}\n\t\telse {\n\t\t\treturn count;\n\t\t}\n\t}", "public int getValue(State state) {\n if (state.isGoal())\n return 0;\n\n int count = 1;\n int cx = state.getVariablePosition(0);\n int cy = puzzle.getFixedPosition(0);\n\n int grid[][] = state.getGrid();\n int gn = puzzle.getGridSize();\n\n for (int i = cx; i < gn; i++) {\n for (int j = 0; j < gn; j++) {\n if (grid[i][j] != -1)\n count++;\n }\n }\n\n return count;\n }", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public int getWidthOfBoard() {\r\n return board[0].length;\r\n }", "public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}", "public int getProjectileCount() {\n\t\treturn projectileCount;\n\t}", "public int numberOfBoxesInPile()\n {\n if (aboveBox != null)\n {\n return 1 + aboveBox.numberOfBoxesInPile();\n }\n else\n {\n return 1;\n }\n }", "public int size() {\r\n return cells.size();\r\n }", "int getPointsCount();", "public int getBoardSize() {\n\t\treturn board.length;\n\t}", "public int getBoardLength() {\n return boardLength;\n }", "private int totalBeginning(int row, int col) { //function that determines number of moves\n int count = 0;\n for (int i = 0; i < OPTIONS.length; i += 2) {\n int newRow = row + OPTIONS[i];\n int newCol = col + OPTIONS[i + 1];\n if (newRow >= 0 && newRow < rows && newCol >= 0 && newCol < cols) {\n count++;\n }\n }\n return count;\n }", "public void updateMoves(){\r\n\t\tthis.moves = getMoves() + 1;\r\n\t}", "public int moveScore(long move) {\r\n return popcount(compute_winning_position(bitboard | move, mask));\r\n }", "public int countPlayers(){\n return players.size();\n }", "static int numberAmazonTreasureTrucks(int rows, int column,\n\t\t\t\t\t\t\t\t List<List<Integer> > grid)\n {\n // WRITE YOUR CODE HERE\n int count = 0;\n for(int i=0;i<rows;i++) {\n for(int j=0;j<column;j++) {\n if(grid.get(i).get(j) == 1) {\n count++;\n markNeighbours(grid, i, j, rows, column);\n }\n }\n }\n return count;\n }", "int getNumYTiles(Long id) throws RemoteException;", "public int getNumWins() {\n\t\treturn this.numWins;\n\t}" ]
[ "0.7884831", "0.7602669", "0.7532383", "0.75242245", "0.74487317", "0.73931867", "0.7240287", "0.7236959", "0.7110805", "0.71100044", "0.7092237", "0.6970754", "0.68792266", "0.6832487", "0.6832487", "0.68275267", "0.6788025", "0.6765113", "0.6751633", "0.6701675", "0.6689524", "0.6670726", "0.66416216", "0.663473", "0.66174746", "0.66046697", "0.65801513", "0.6575788", "0.654833", "0.6543488", "0.65256506", "0.65211064", "0.64969033", "0.64941853", "0.64918596", "0.6485085", "0.64801127", "0.64738536", "0.64721715", "0.6465786", "0.6462729", "0.64615875", "0.6460663", "0.64462537", "0.64462537", "0.64451903", "0.6442695", "0.6427207", "0.64195603", "0.6416516", "0.6412481", "0.64076734", "0.6403623", "0.640125", "0.639275", "0.6385327", "0.6384779", "0.6381565", "0.63756394", "0.6361088", "0.63604563", "0.6342504", "0.6340665", "0.6334078", "0.6333546", "0.63303804", "0.6325876", "0.6313353", "0.6309162", "0.6306316", "0.6282505", "0.62760496", "0.6256745", "0.62561965", "0.62524784", "0.62514853", "0.62346995", "0.6217264", "0.6186831", "0.6182108", "0.6181926", "0.617273", "0.61477304", "0.6141405", "0.6117649", "0.6117147", "0.61101705", "0.6100864", "0.61006516", "0.60991204", "0.60988975", "0.6097403", "0.60894674", "0.60846823", "0.6079717", "0.60751283", "0.6073828", "0.6073101", "0.6072438", "0.60718256", "0.6071259" ]
0.0
-1