text
stringlengths
14
410k
label
int32
0
9
public boolean isRespawnSafe(ArrayList<SpaceJunk> spaceJunk, ArrayList<Planet> planets) { double x, y, h; boolean ret = true; for (int i = 0; i < spaceJunk.size(); i++) { SpaceJunk sj = spaceJunk.get(i); x = sj.xPosition - Game.SPACE_WIDTH / 2; y = sj.yPositio...
6
public byte[] getPackedCode(int bit) { assert ((bit == 0) || (bit == 1)) : "getPackedCode: input isn't a bit!"; byte[] packed_code = new byte[NBYTESG + 1]; int i; if (bit == 0) { packed_code[0] = (byte) (perm + 1); // +1 to escape the leading 0 problem for (i =...
4
public RecordList getRecordList() { return recordList; }
0
public static void main( String[] args ) { // Create game window... JFrame app = new JFrame(); app.setIgnoreRepaint( true ); app.setUndecorated( true ); // Add ESC listener to quit... app.addKeyListener( new KeyAdapter() { public void keyPressed( KeyEvent e ...
8
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FinderModeConfig other = (FinderModeConfig) obj; if (mode != other.mode) return false; if (radiusSquared != other.radiusSquared...
7
public void add(Component comp, Object constraints) { super.add(comp, constraints); componentsByContraints.put(constraints, comp); contraintsByComponents.put(comp, constraints); if(comp instanceof ToolBarPanel) { ToolBarPanel panel = (ToolBarPanel) comp; if(constraints.equals(BorderLayout.EAST) || constra...
7
public void update(float tslf) { switch (gamestate) { case 0: menu.update(tslf); break; case 1: world.update(tslf); if(Keyboard.isKeyPressed(KeyEvent.VK_ESCAPE)) gamestate = 0; break; default: break; } world.update(tslf); }
3
private Operator findI(O O, ArrayList<I> Iids){ for(I I:Iids){ if(I.id.equals(O.id)){ return I; } } Operator curr = O.next; while(curr != null){ if(curr.type == Operator.Type.I && O.id.equals(curr.id)){ ...
5
@Override public int hashCode() { long longBits = Double.doubleToLongBits(this.value); return (int)(longBits ^ longBits >>>32); }
0
public int calcTotalAmount() { totalAmount = 0; for (Account account : accounts) { totalAmount += account.getAmount(); } return totalAmount; }
1
private void prepareMatrix() { for (int i = 0; i < K + 1; i++) { M[i][0] = 1l; M[i][i] = 1l; for (int j = 1; j < i; j++) { M[i][j] = M[i - 1][j] + M[i - 1][j - 1]; if (M[i][j] >= mod) M[i][j] -= mod; } } for (int j...
5
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); String userName = "", password = ""; userName = request.getParameter("userName"); password = request.g...
3
@SuppressWarnings("unchecked") public static <K, V> Map<K, V> getMap(List<MapHelper> list, Class<K> classK, Class<V> classV) { Map<K, V> map = new HashMap<K, V>(); if (list != null) { for (MapHelper h : list) { Object en = h.getValue(); if (en instanceof String) { String svalue = (String) en; ...
8
public boolean isLaying() { Layered layered = gob().getattr(Layered.class); if (layered != null) { return layered.containsLayerName("gfx/borka/body/dead/"); } return false; }
1
public Set<Map.Entry<Double,Double>> entrySet() { return new AbstractSet<Map.Entry<Double,Double>>() { public int size() { return _map.size(); } public boolean isEmpty() { return TDoubleDoubleMapDecorator.this.isEmpty(); } ...
8
public NewCharNameCheckResult finishNameCheck(String login, String ipAddress) { if((CMProps.getIntVar(CMProps.Int.MUDTHEME)==0) ||((CMSecurity.isDisabled(CMSecurity.DisFlag.LOGINS)) &&(!CMProps.isOnWhiteList(CMProps.WhiteList.LOGINS, login)) &&(!CMProps.isOnWhiteList(CMProps.WhiteList.LOGINS, ipAddress)))) ...
9
public Collection<File> getClassPath(OperatingSystem os, File base) { Collection<Library> libraries = getRelevantLibraries(); Collection result = new ArrayList(); for (Library library : libraries) { if (library.getNatives() == null) { result.add(new File(base, "launcher/" + library.getArtifac...
2
public static Object retCheck(Object obj) throws NotSerializableException { Object ret = obj; /* Check if return object is serializable, if the return object is null, * we should still pass it back, no matter a non-return method or the * return value is null */ if ( (obj != null) && !(obj instanceof Seriali...
5
public Blog getBlogDetail(long pBlogId) { return (Blog) this.blogModelDao.findByPrimaryKey(pBlogId); }
0
public CourseFilterFrame(CourseModel model) { super("Filter", model); Dimension dim = new Dimension(200, 200); this.setMinimumSize(dim); this.setSize(dim); model.addListener(this); // Make a root node initTree(); treeModel = new FilterTreeModel(root); tree = new JTree(treeModel) { public boolean ...
3
public void setDefaultColor(Color c) { if (c == null) c = Color.black; if (! c.equals(defaultColor)) { defaultColor = c; setBackground(c); forceRedraw(); } }
2
public static void main(String[] args) { Sleeper sleepy = new Sleeper("Sleepy", 1500), grumpy = new Sleeper("Grumpy", 1500); Joiner dopey = new Joiner("Dopey", sleepy), doc = new Joiner("Doc", grumpy); grumpy.interrupt(); }
0
public static SectionState state(FragKind kind ) { switch ( kind ) { case merged: return SectionState.merged; case almost: return SectionState.almost; default: case inserted: case aligned: return disjoint; } ...
4
public EntityFactionsList() { setTitle("Factions List"); setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); setBounds(100, 100, 325, 500); getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentP...
3
private List<String> getAllJCheckBoxValue(JFrame ct){ List<String> list=new ArrayList<String>(); Component[] cs = ct.getContentPane().getComponents();//遍历内容控制面版 for(Component item : cs){ if(item instanceof JCheckBox){ if(((JCheckBox) item).isSelected()){ list.add(((JCheckBox) i...
3
public int getMaxArena() { return config.getInt("CommonOption.MaxArena",5); }
0
public void render(Bitmap b) { if(dir == 0) { ImageManager.renderFromImage(entityType, b, (int)x, (int)y, 0, 16, ((animation_frame == 0) ? 1 : 0)); } else if (dir == 1) { ImageManager.renderFromImage(entityType, b, (int)x, (int)y, 1, 16, ((animation_frame == 0) ? 1 : 0)); } else if (dir == 2) { ImageMana...
8
public int getIdCliente() { return idCliente; }
0
public int getPage() { return page; }
0
public void geraMatrizScors(ArrayList<FieldCandidate> shortRecord, ArrayList<ArrayList<FieldCandidate>> rowsCadidates, int idealNumColumn) { ArrayList<ArrayList<FieldCandidate>> correctColumns = new ArrayList<ArrayList<FieldCandidate>>(); Score score = Score.getInstance(); Line line...
9
public void run() { for (JButton b:controllers) b.setEnabled(false); while (year<endYear) tick(); for (JButton b:controllers) b.setEnabled(true); System.out.println("History through "+year); }
3
public static void showTokens(List<Token> tokens) { if(janelaLexico == null) janelaLexico = new JanelaAnaliseLexica(tokens); else janelaLexico.refresh(tokens); janelaLexico.setVisible(true); }
1
private void initProfiles() throws IOException { if (profilespath.isEmpty()) return; profiles = Profiles.read(new File(profilespath)); // Group the packages to be documented by the lowest profile (if any) // in which each appears Map<Profile, List<PackageDoc>> inter...
8
public DefaultComboBoxModel<String> buildFrameBox() { DefaultComboBoxModel<String> frameBoxModel = new DefaultComboBoxModel<String>(); hitboxes = new Rectangle[maxDir * maxFrame]; for(int x = 0; x<hitboxes.length; x++) { frameBoxModel.addElement("Rect " + (x / maxDir) + ", " + (x % maxFrame)); hitboxes[x...
1
public boolean removeEntry(String variable, String lookahead, String expansion) { int[] r = getLocation(variable, lookahead); boolean removed = entries[r[0]][r[1]].remove(expansion); fireTableCellUpdated(r[0], r[1] + 1); return removed; }
0
public static String makeTitle(HashMap<String,String> mp3, String template){ String x = template; x = x.replaceFirst("%Track%", mp3.get("TrackNum")!=null ? mp3.get("TrackNum") : "NA"); x = x.replaceFirst("%Artist%", mp3.get("ArtistName")!=null||!mp3.get("ArtistName").isEmpty() ? mp3.get("ArtistName"):""); x ...
6
@RequestMapping(value = "/new", method = RequestMethod.POST) public String newPostItem(@ModelAttribute("contentForm") ContentForm contentForm, BindingResult result, HttpSession session) { if (!result.hasErrors()) { Content content = new...
1
@Override public boolean equals(Object obj) { if(!super.equals(obj)) { return false; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final SpdyFrameSynStream other = (SpdyFrameSynStre...
7
public void weaponCardFromInt(int inputWeapon) { switch (inputWeapon) { case 1: this.weapon =(Weapons.candlestick); break; case 2: this.weapon =(Weapons.crowbar); break; case 3: this.weapon =(Weapons.dagger); break;...
6
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } @SuppressWarnings("rawtypes") Pair other = (Pair) obj; if (first == null) { if (other.first != null) { return false; } } else if ...
9
private Component cycle(Component currentComponent, int delta) { int index = -1; loop : for (int i = 0; i < m_Components.length; i++) { Component component = m_Components[i]; for (Component c = currentComponent; c != null; c = c.getParent()) { if (component == c) { index = i; break loop; } ...
8
public void disposeFontResources() { Set<Reference> test = refs.keySet(); Object tmp; for (Reference ref:test) { tmp = refs.get(ref); if (tmp instanceof Font || tmp instanceof FontDescriptor) { refs.remove(ref); } }...
3
public BounceFrame() { setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); setTitle("BounceThread"); comp = new BallComponent(); add(comp, BorderLayout.CENTER); JPanel buttonPanel = new JPanel(); addButton(buttonPanel, "Start", new ActionListener() { public void actionPe...
0
@Override public V remove(Object key) { int temp = index((K) key); Entry<K, V> list = table[temp]; if (list != null) { if (list.getKey().equals((K) key)) { table[temp] = list.next; list.next = null; return list.getValue(); } else { while (list.next != null) { if (list.next.getKey().equ...
4
@Override public List<Action> process(Board board) { List<Action> actions = new ArrayList<Action>(); for (int w = 0; w < board.w; w++) for (int h = 0; h < board.h; h++) if (board.cells[w][h]) actions.add(new PaintAction(w,h,0)); return actions; }
3
@Override public String toString() { return "isPrivate()"; }
0
public String getDoctorID(){ return doctorID; }
0
private void animate() { new Thread(new Runnable() { public void run() { while(m_panel.getAnimationThread().isAlive()){ } m_panel.updatePieces(getGame().getPieces()); if (!getGame().boardIsFull()) { ...
3
public void testPropertyCompareToHour() { Partial test1 = new Partial(TYPES, VALUES1); Partial test2 = new Partial(TYPES, VALUES2); assertEquals(true, test1.property(DateTimeFieldType.hourOfDay()).compareTo(test2) < 0); assertEquals(true, test2.property(DateTimeFieldType.hourOfDay()).com...
2
public Grammar getGrammar() { Production[] p = editingGrammarModel.getProductions(); try { p = CNFConverter.convert(p); } catch (UnsupportedOperationException e) { JOptionPane.showMessageDialog(this, e.getMessage(), "CNF Conversion Error", JOptionPane.ERROR_MESSAGE); return null; } try { Gra...
2
public void compactEnd() { final int compactSize = compactIndexUsed.cardinality(); if (compactSize == map.size()) { return; } for (int i = 1; i < list.size(); i++) { if (compactIndexUsed.get(i)) continue; // to be removed T t = list.get(i); list.set(i, null); map.remo...
4
public static IEncrypterDecryptor getInstance(ALGORITHMS algorithm) throws NoSuchAlgorithmException, NoSuchPaddingException { if (algorithm.equals(ALGORITHMS.TRIPLEDES)) { if (tripleDescDESEncrypter == null) { tripleDescDESEncrypter = new TripleDESEncrypter(); } return tripleDescDESEncrypter; } else...
5
public void fromByteHelper(Node currentNode, Bits bits) { if (currentNode != null) { if (currentNode.parent != null) { if (currentNode.parent.right != null) { bits.offerFirst(currentNode.parent.right == currentNode); } else if (currentNode.parent.left != null) { bits.offerFirst(currentNode.parent...
4
private String obtemIdentificador(HttpServletRequest req) throws RecursoSemIdentificadorException{ String requestURI = req.getRequestURI(); String[] pedacosDaUri = requestURI.split("/"); boolean contextoCervejasEncontrado = false; for(String contexto : pedacosDaUri){ if(contexto.equals("cervejas")){ cont...
4
public void testWithers() { LocalTime test = new LocalTime(10, 20, 30, 40); check(test.withHourOfDay(6), 6, 20, 30, 40); check(test.withMinuteOfHour(6), 10, 6, 30, 40); check(test.withSecondOfMinute(6), 10, 20, 6, 40); check(test.withMillisOfSecond(6), 10, 20, 30, 6); che...
2
public Map<Integer, BigDecimal> getPrices() { return prices; }
0
public void searchOneWayFlights() { try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { System.out.println("Where is your MySQL JDBC Driver?"); e.printStackTrace(); } PreparedStatement ps = null; Connection con ...
6
private boolean checkOptimumInfini(Matrice delta) { boolean optimumIsInfini = true; for(int i = 0; i<delta.getNbColumns(); i++) { if(delta.getValueAt(0, i) < 0) { for(int j = 0; j<this.Abarre.getNbLines(); j++) { ...
5
public static Stella_Object access_SampleContents_Slot_Value(SampleContents self, Symbol slotname, Stella_Object value, boolean setvalueP) { if (slotname == Sample.SYM_SAMPLE_sampleAttr) { if (setvalueP) { self.sampleAttr = ((StringWrapper)(value)).wrapperValue; } else { value = St...
6
public void deactivate() { try { socket.getInputStream().close(); socket.getOutputStream().close(); socket.close(); GUI.println("Socket closed!!!"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
1
private char[] insertCharToStr(char ch, char[] s, int pos) { int newLen = s.length + 1; char[] result = new char[newLen]; // copy anything before position for (int i = 0; i < pos; i++) { result[i] = s[i]; } for (int j = pos; j < s.length; j++) { result[j + 1] = s[j]; } result[pos] = ch; return...
2
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
@EventHandler public void onSignChange(SignChangeEvent evt){ if(evt.getLine(0).contains("Arena-") && Util.isNumeric(evt.getLine(0).replace("Arena-", ""))){ Arena a = ArenaManager.getManager().getArena(Integer.parseInt(evt.getLine(0).replace("Arena-", ""))); if(a != null){ String line2 = a.getSize() + " / "...
4
public static int searchInsert(int[] source, int target) { int start = 0; int end = source.length; int guard = end; int index = 0; if (end == 0) { return index; } while (end >= start) { // 防止end与start相加之后超过int的最大值 int middle = start + (end - start) / 2; if (middle < guard) { int temp = s...
6
private String getUpdateSetClause(String dbColumnName, Object value) { if (value instanceof Date) { return dbColumnName + "='" + DaoUtils.DATE_FORMATTER.format(value) + "'"; } else if (value.getClass().isEnum()) { return dbColumnName + "=" + EnumUtils.getId(value) + ""; } else if (value instanceof Str...
3
public Member getMember() { return member; }
0
public static boolean isMatchForPassword(String password, String confPassword) { if (password == null || confPassword == null) return false; return password.equals(confPassword); }
2
public void executeRemotely(Command<?>... commands) { CommandFacade facade = context.getBean("commandFacade", CommandFacade.class); List<Command<?>> incomeCommands = Arrays.asList(commands); CommandList commandsToServer = new CommandList(incomeCommands); Command<List<...
8
@Override public void run() { Date dte = new Date(); Timestamp ts = new Timestamp(dte.getTime()); while (true) { try { while (true) { Thread.sleep(20000); lastRTime = (ts.getTime()/1000) + 20000; ...
3
private static int getCoordinateOfCell(Field field, char coordinateName){ Scanner scanner = new Scanner(System.in); int coordinate = 0; System.out.println("Please enter cell " + coordinateName + " coordinate:"); while(true){ if(scanner.hasNextInt()) { coordina...
4
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Projeto)) { return false; } Projeto other = (Projeto) object; if ((this.id == null && other.id != null) || (thi...
5
@Override public void paint(Graphics g) { super.paint(g); if (cache == null) cache = bufferOwner.getWaveData(); if (cache == null || cache.length == 0) { g.drawString("No wave data available at this time.",0,200); return; } g.drawString(Integer.toString(cache.length),0,30); final int height = 128,...
5
@Override public QueryResult updateQuery(Query q) { Statement st = null; if(!q.isParsed()) { q.parse(); } try { st = con.createStatement(); st.executeUpdate(q.getParsedQuery()); }catch (SQLException e) { plugin.getLogger().log(Level.SEVERE, " Could not execute query!"); if(this.dbg) { ...
6
private void dribbleAwayOtherGoal(){ turnTowardBall(); if(distanceBall < 0.7){ if(canSeeOtherGoal){ if(distanceOtherGoal < 30) {getPlayer().kick(100, directionOtherGoal); } else{ getPlayer().kick(40, directionOtherGoal+5); ...
3
public static String getWebINFPath() { String path = getWebClassesPath(); if (path.indexOf("WEB-INF") > 0) { path = path.substring(1, path.indexOf("WEB-INF") + 8); path = path.replace("/", File.separator); return path; } return null; }
1
public void newCustomer() { Database db = dbconnect(); try { String query = "INSERT INTO customer (firstName, lastName, username, password, telephone, email) VALUES " + "(?,?,?,?,?,?)"; db.prepare(query); db.bind_param(1, this.c_firstname); db...
1
@Override public void run(DetAdv da, GameVars gameVars) { Scanner inputReader = saveAndGetScanner(gameVars); if (policeStationState == JUST_ENTERED) { System.out.println("The police force has been riddled with worthless cases lately.\nPeople will call the police over such stupid things nowadays."); DetUti...
8
public boolean isOpen() { return this.open; }
0
protected AttributeClassObserver newNumericClassObserver() { switch (this.numericEstimatorOption.getChosenIndex()) { case 0: return new GaussianNumericAttributeClassObserver(10); case 1: return new GaussianNumericAttributeClassObserver(100); ca...
9
public static void setB(Node[][] nodes){ for (int br=0;br<3;br++){ for (int bc=0;bc<3;bc++){ for (int n=0;n<9;n++){ int index1=(br*3+bc)*9+n+81*3; for (int r=0;r<3;r++){ for (int c=0;c<3;c++){ int index2=(r+br*3)*81+(c+bc*3)*9+n; nodes[index1][index2]=new Node(1); } } ...
5
public void resize() { if (getPrefWidth() > 0 && getPrefHeight() > 0) { if (resizeable) { size = getPrefWidth() < getPrefHeight() ? getPrefWidth() : getPrefHeight(); setPrefSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR); } ...
4
private void jTextArea2KeyPressed(java.awt.event.KeyEvent evt) { if (KeyEvent.VK_ESCAPE == evt.getKeyCode()) {// 按ESC键,关闭聊天窗口 this.dispose(); } else if (KeyEvent.VK_ENTER == evt.getKeyCode()) { enter = true; } else if (KeyEvent.VK_CONTROL == evt.getKeyCode()) { ctrl = true; } if (enter && ctrl) {// 如...
5
private Node<K,V> floor( V value ) { if(value == null) return null; Node<K,V> node = mRoot; Node<K,V> ret = null; if(mValueComparator != null) { Comparator<? super V> comp = mValueComparator; while(node != null) { ...
9
private static Image createIcon(Component component, Color color) { int rgb = color.getRGB(); int[] pix = new int[12 * 12]; for (int x = 0; x < 12; x++) { for (int y = 0; y < 12; y++) { pix[x + y * 12] = ((x > 0) && (x < 11) && (y > 0) && (y < 11)) ? rgb : 0xff666666; } } return component.creat...
6
public String getIssueNo() { return issueNo; }
0
public DalcSong() { try { mConnection = DBConnection.getConnection(); } catch (SQLServerException ex) { } }
1
private void login_buttonActionPerformed(ActionEvent evt) { /* * Pass the user name and password to the login system. The login system * will indicate whether the login succeeded. If it did, hide the login * screen and show the splash page according to the user's Role. */ String name =...
9
@Override public int read(ByteBuffer buffer) throws IOException { if (engine.isInboundDone()) { // We can skip the read operation as the SSLEngine is closed, // instead, propagate EOF one level up return -1; } decryptedIn.clear(); int pos = decry...
9
public final void restart() { environmentStack = new Stack<FunctionEnvironmentRecord>(); environmentStack.add(new FunctionEnvironmentRecord()); savedEnvironmentStackSize = environmentStack.size(); savedArgs = new ArrayList<Integer>(); reasonForStopping = ""; stepOverPendi...
0
public String listaDeUsuarios(){ String lista= ""; for(int i = 0; i < usuarios.size(); i++){ lista = lista + usuarios.get(i).getNombre() + "<BR>"; } return lista; }
1
void insert(Object number, int timesPresent){ if(head == null){ Node newNode = new Node(number,timesPresent); head = newNode; tail = newNode; }else{ Node temp = head; if(size() != maxLength){ while(true){ if(temp.timesPresent < timesPresent){ Node newNode = new Node(number,timesPresen...
9
@Override public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { if (qName.equals("rowset")) { String name = getString(attrs, "name"); oldRoles = name.equals("oldRoles"); newRoles = name.equals("newRoles"); } else if (qName.equals("row")) { if (oldR...
4
public boolean isObjectWithinRange(Placeable obj, Placeable obj2) { if (obj.distanceTo(obj2) <= range) { return true; } return false; }
1
public void loadImagesFile(String fnm) /* Formats: o <fnm> // a single image n <fnm*.ext> <number> // a numbered sequence of images s <fnm> <number> // an images strip g <name> <fnm> [ <fnm> ]* // a group of images and blank lines and comment lines. ...
8
public void gestionDuClavier(KeyEvent ke) { if(ke.getKeyCode() == KeyEvent.VK_RIGHT) this.serpent.setNouvelleDirection(Serpent.Direction.VERS_LA_DROITE); else if(ke.getKeyCode() == KeyEvent.VK_LEFT) this.serpent.setNouvelleDirection(Serpent.Direction.VERS_LA_GAUCHE); ...
4
@Override @SuppressWarnings({"unchecked","rawtypes"}) public final boolean equals(final Object o) { if (o==this) return true; if (!super.equals(o)) return false; if (o instanceof LegacyNumericRangeQuery) { final LegacyNumericRangeQuery q=(LegacyNumericRangeQuery)o; return ( (q....
9
private boolean actualizar(){ // Buffer que permite evitar el parpadeo cada vez que se limpia la pantalla, // además es el objeto donde se intaran los sprites BufferedImage pantalla=new BufferedImage(this.getWidth(),this.getHeight(), BufferedImage.TYPE_INT_RGB); pantalla.getGraph...
8
public void update() { Set<LivraisonGraphVertex> tree = new HashSet<>(); for(Chemin chemin : chemins) { tree.add(chemin.getOrigine()); tree.add(chemin.getDestination()); } this.noeuds = new ArrayList<>(tree); this.idToIndex = new HashMap<>(); int ...
5
public boolean isComment (char c) throws IOException { char temp = (char)sourceFile.read(); if ((c=='/') && temp=='/') { sourceFile.unread(temp); return true; } sourceFile.unread(temp); return false; }
2
@Override public WebSocketResponse endFirstUnitPlacement(GameClient gameClient, JSONObject value) { //System.out.println("end first unitplacement"); int clientId = gameClient.getIdentifyer(); List<ClientMapChange> clientMapChanges = new LinkedList(); Iterator mapCha...
4