text
stringlengths
14
410k
label
int32
0
9
public boolean continueStream() { if( this.eoiReached || this.isClosed ) return false; if( this.stopMarkReachedIndex == -1 ) return true; for( int i = this.stopMarkReachedIndex; i >= 0; i-- ) { // true means: override EOI // because: the underlying stream(s) returned -1 because a stop mark ...
4
@SuppressWarnings("unused") private boolean canReachForwards( Node from, Node to, int version ) { while ( from != null && from != to ) { Arc a = from.pickOutgoingArc( version ); if ( a.versions.cardinality() != 1 ) return false; if ( from != null ) from = a.to; } return from == to; }
4
private String createInsert() { StringBuilder sb = new StringBuilder(); sb.append( "\n" ); sb.append( TAB + "<insert id=\"create\" parameterType=\"" + table.getPackage() + ".domain." + table.getDomName() + "\">\n" ); // if the 1st column does not have: sequence disabled...
5
private static void loadPackedNPCCombatDefinitions() { try { RandomAccessFile in = new RandomAccessFile(PACKED_PATH, "r"); FileChannel channel = in.getChannel(); ByteBuffer buffer = channel.map(MapMode.READ_ONLY, 0, channel.size()); while (buffer.hasRemaining()) { int npcId = buffer.getShort() & ...
7
@SuppressWarnings ("unchecked") protected final void append(final BaseItem item) throws NullPointerException, IllegalArgumentException { switch (item.state()) { case Item.CREATE_STATE: case Item.REMOVE_STATE: case Item.UPDATE_STATE: if (!this.equals(item.pool())) throw new IllegalArgumentException(); ...
5
public void move(long time) { if (list.size() > 0) { for (Message message : list) { message.move(time); } for (Message message : list) { if (message.state == DeliverState.delivered) continue; if (message.stat...
5
public static void main(String[] args){ Base game = new Base(); if(!windowed){ game.frame.setExtendedState(JFrame.MAXIMIZED_BOTH); game.frame.setUndecorated(true); } game.frame.setResizable(false); game.frame.setTitle(game.title); game.frame.add(game); game.frame.pack(); game.frame.setDefaultClose...
1
public int getIdTpv() { return idTpv; }
0
@Override public boolean equals(Object obj){ if (obj == null || getClass() != obj.getClass()){ return false; }else{ final EnsEtat other = (EnsEtat) obj; if(this.isEmpty() && other.isEmpty()) return true; for(Etat etat : this){ if(other.getEtat(etat.hashCode()) == null) return false; } for(E...
8
public static ArrayList<LinkedList<TreeNode>> level(TreeNode root) { if (root == null) { return null; } int level = 0; ArrayList<LinkedList<TreeNode>> result = new ArrayList<LinkedList<TreeNode>>(); LinkedList<TreeNode> levelList = new LinkedList<TreeNode>(); // Added root to the level list so that it ca...
6
@Override public void messageReceived(IoSession session, Object message) throws Exception { String text = UTFCoder.decode(message); System.out.printf("Recieved : %s \n", text); String[] parameter = parse(text); if(parameter.length>=2){ if (parameter[0].equalsIgnoreCase("prepare")) { this.sendPromise(par...
3
@SuppressWarnings("unchecked") public static void main(String[] args) throws Exception { // The Magic Words are Squeamish Ossifrage String M = "f20bdba6ff29eed7b046d1df9fb7000058b1ffb4210a580f748b4ac714c001bd4a61044426fb515dad3f21f18aa577c0bdf302936266926ff37dbf7035d5eeb4"; String M1 = "f20b...
9
private static SphereCluster calculateCenter(ArrayList<Cluster> cluster, int dimensions) { double[] res = new double[dimensions]; for (int i = 0; i < res.length; i++) { res[i] = 0.0; } if (cluster.size() == 0) { return new SphereCluster(res, 0.0); } ...
7
public void setHasConnected(boolean hasconnected){ this.HasConnected = hasconnected; }
0
private void writeFile(String data, boolean isAppend) { if (!exists()) { try { createNewFile(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } BufferedWriter bfWriter = null; try { FileWriter flWriter = null; if (isAppend) { flWriter = new Fi...
7
public String toString() { final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw, true); pw.println("Context of caches in CachingBloatContext..."); pw.println(" Class Infos"); Iterator iter = classInfos.keySet().iterator(); while (iter.hasNext()) { final Object key = it...
9
public final void init() throws IOException, ZipException { boolean downloadSDK = false; logger.log(Level.INFO, "Initializing SDK Manager. Checking for SDK directories..."); logger.log(Level.INFO, "Checking downloads dir..."); if (!new File(toolkitDir.getAbsolu...
7
public NPC getCurrent() { Filter<NPC> i = new Filter<NPC>() { public boolean accept(NPC entity) { return (entity.getId() == 7138 || entity.getId() == 7139 || entity.getId() == 7140) && entity.getInteracting() != null && entity.getInteracting().equals(Players.getL...
5
public static boolean checkSignature(String signature, String timestamp, String nonce) { String[] arr = new String[] { token, timestamp, nonce }; // tokentimestampnonceֵ Arrays.sort(arr); StringBuilder content = new StringBuilder(); for (int i = 0; i < arr.length; i++) ...
3
public Canvas(Paint paint) { // setBackground(new Color(Color.TRANSLUCENT)); // use buffered image b/c when you call repaint the canvas will clear - // so need to draw to image and then draw that to canvas // A = alpha = transparent pixels layers = new BufferedImage[4]; for (int i = 0; i < 4; i++) { la...
1
@Override public void paint(Graphics g) { if (gameScreen != null) { do { try { g = bs.getDrawGraphics(); paintBackground(g); gameScreen.paint(g); } catch (Exception e) { e.printStackTrace(); } bs.show(); g.dispose(); } while (bs.contentsLost()); } }
3
public long get(long key) { int hash = hashFn(key); int initialHash = -1; while (hash != initialHash && (table[hash] == DeletedEntry.getUniqueDeletedEntry() || table[hash] != null && table[hash].getKey() != key)) { ...
7
public static int PretvoriCharUInt(String in){ if (in.length() == 4){ // mora biti jedan od ovih if (in.charAt(2) != 't') return (int)('\t'); if (in.charAt(2) != 'n') return (int)('\n'); if (in.charAt(2) != '0') return (int)('\0'); if (in.charAt(2) != '\'') return (int)('\''); if (in.charAt(2) != '"...
7
public void roque(Piece p, Point point) { if (point.equals(new Point(6, 0)) || point.equals(new Point(6, 7))) { deplacementPetitRoque(p); } if (point.equals(new Point(2, 0)) || point.equals(new Point(2, 7))) { deplacementGrandRoque(p); } }
4
public static void main(String[] args) { // TODO code application logic here boolean validar=true; int valor1=0; int valor2=0; double resultado; char continuar; int opcion=0; Scanner teclado=new Scanner(System.in); Operaciones oOp...
9
public static void writeBottomSection(org.powerloom.PrintableStringWriter stream) { stream.print("<input TYPE=button NAME=\"show\" VALUE=\"Show\" onClick=\"loadContextURL('content', 'show', this.form)\">\n"); if (OntosaurusUtil.savingAllowedP()) { stream.print("<input TYPE=button NAME=\"save\" VALUE=\"S...
9
public static Class<?> resolveClassName(String className, ClassLoader classLoader) throws IllegalArgumentException { try { return forName(className, classLoader); } catch (ClassNotFoundException ex) { throw new IllegalArgumentException("Cannot find class [" + className + "]", ex); } catch (LinkageEr...
3
public Noeud getClicked(MouseEvent e) { if (plan == null) return null; List<Noeud> noeuds = plan.getNoeuds(); Noeud selected = null; // Pour tous les noeuds for (Noeud n : noeuds) { int x = screenX(n.getX()); int y = screenY(n.getY()); // on regarde si le click de la souris est contenu dans la zon...
6
public static void lagElevliste() { //Lager en Arraylist til tilleggsklassen "Elev" ArrayList<Elev> Elevliste = new ArrayList<Elev>(); //Oppretter String og Int variabler String Fornavn, Etternavn; int nivaaElev, flereOrd; int flereord=0; while (true){ //Er dette riktig? int elevTellerer=0; try{...
3
public static void main(String[] args) { LinkedStack<String> lss = new LinkedStack<String>(); for (String s : "Phasers on stun!".split(" ")) lss.push(s); String s; while ((s = lss.pop()) != null) System.out.println(s); }
2
public boolean firespell(int castID, int casterY, int casterX, int offsetY, int offsetX, int angle, int speed, int movegfxID,int startHeight, int endHeight, int finishID, int enemyY,int enemyX, int Lockon) { fcastid = castID; fcasterY = casterY; fcasterX = casterX; foffsetY = offsetY; foffsetX = offsetX; fangle = angl...
7
public void setPaused(final boolean p) { paused.set(p); if (isPaused()) { SoundStore.get().pauseLoop(); } else { setMusicPlaying(musicPlaying); } }
1
public void setCommandButtonFont(String font) { if ((font == null) || font.equals("")) { this.buttonComFont = UIFontInits.COMBUTTON.getFont(); } else { this.buttonComFont = font; } somethingChanged(); }
2
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerQuit(PlayerQuitEvent e) { Player quitPlr = e.getPlayer(); if(quitPlr.hasPermission("combattag.ignore.pvplog")){ return; } if (quitPlr.isDead()) { plugin.entityListener.onPlayerDeath(quitPlr); } else if (plugin.inTagg...
5
@Override public void keyReleased(KeyEvent e) { switch (e.getKeyCode()) { case KeyEvent.VK_UP: System.out.println("Stop moving up"); break; case KeyEvent.VK_DOWN: currentSprite = anim.getImage(); robot.setDucked(false); break; case KeyEvent.VK_LEFT: robot.stopLeft(); break; case KeyEv...
6
@Override public String getColumnName(int columnIndex) { switch (COLUMNS.values()[columnIndex]) { case ID: return java.util.ResourceBundle.getBundle("cz/muni/fi/pv168/autorental/gui/Bundle").getString("customers_table_id"); case FIRSTNAME: return java.util.ResourceBundle.getBundle("cz/muni/fi/pv168/a...
5
@Override public void keyTyped(KeyEvent e) { switch (e.getKeyChar()) { case 's': case 'S': case 'w': case 'W': getScreen().switchInputMode(new ShootingMode(getScreen(), this)); getScreen().getCurrentInputMode().keyTyped(e); break; case 'j': case 'J': getScreen().jump(); break; case KeyEv...
9
public SpiderMask() { setTitle("Super Web Crawler"); JPanel panel = new JPanel(); JTextArea area = new JTextArea("text area"); area.setPreferredSize(new Dimension(100, 100)); // JFileChooser fc = new JFileChooser(); // panel.add(fc); JLabel urlL...
0
public void zeroLessThan(float cutOff) { for(int i=0; i < data.length; i++) { float[] block = data[i]; for(int j=0; j < block.length; j++) { if (block[j] != 0.0f && block[j] < cutOff) block[j] = 0.0f; } } }
4
public void execute(String content, boolean isAdmin) { if (requiresAdmin) { if (isAdmin) runCommand(content); } else runCommand(content); }
2
public int[] searchRange0(int[] nums, int target) { int[] pos = new int[]{-1, -1}; int start = 0, end = nums.length-1; while(start <= end) { int mid = start + (end-start)/2; if(nums[mid] == target) { for(int i = mid-1; i >= -1; i--) { ...
9
private ConfigurationObjectProperties parseConfigurationObject() throws InterruptedException, SAXException { AttributeMap attributes = _xmlStream.pullStartElement().getAttributes(); final String pid = attributes.getValue("pid"); final String id = attributes.getValue("id"); long idValue = 0; final String trimm...
7
private boolean compareDates(GregorianCalendar gc) { return ((gc != null) && (get(GregorianCalendar.DAY_OF_MONTH) == gc.get(DAY_OF_MONTH)) && (get(GregorianCalendar.MONTH) == gc.get(GregorianCalendar.MONTH)) && (get(GregorianCalendar.YEAR) == gc .get(GregorianCalendar.YEAR))); ...
3
@Override public boolean accept(SceneObject obj) { return obj.getId() == Constants.IVY_ID[0] || obj.getId() == Constants.IVY_ID[1] || obj.getId() == Constants.IVY_ID[2] || obj.getId() == Constants.IVY_ID[3]; }
3
public VectorMatrixView(IMatrix matrix) { if (matrix.getColsCount() != 1 || matrix.getRowsCount() !=1) { throw new IncompatibleOperandException( "Can not convert matrix to vector."); } this.matrix = matrix; dimension = matrix.getColsCount() == 1 ? matrix.getRowsCount() : matrix.getColsCount(); ro...
4
private final void FillBuff () throws java.io.IOException { // Buffer fill logic: // If there is at least 2K left in this buffer, just read some more // Otherwise, if we're processing a token and it either // (a) starts in the other buffer (meaning it's filled both part of //...
9
@Override public void setSelect (boolean select) { this.select = select; }
0
public String get(int n) { if (capitalword_) return null; int len = grams_.length(); if (n < 1 || n > 3 || len < n) return null; if (n == 1) { char ch = grams_.charAt(len - 1); if (ch == ' ') return null; return Character.toString(ch); } else ...
6
public static void main(String[] args) { Scanner dictionaryInput = new Scanner( TestAutoComplete.class.getResourceAsStream( "dictionary.txt" ) ); List<String> dictionary = new ArrayList<String>(); long t0 = System.nanoTime(); while (dictionaryInput.hasNextLine()) { dict...
3
public static void noSpace(String string) throws JSONException { int i, length = string.length(); if (length == 0) { throw new JSONException("Empty string."); } for (i = 0; i < length; i += 1) { if (Character.isWhitespace(string.charAt(i))) { throw...
3
@Override public void endElement(String uri, String localName, String qName) throws SAXException { if(!open_tag.equals(qName)){ throw new SAXParseException("XML malformed, missmatched '"+ open_tag +"' tag in XML file." , null); } switch (qName) { case "color": this.color = new BeadColor(this.c...
7
@Override public String getColumnName(int column) { if (column == CHECK_COLUMN_INDEX) { return "Ausgewählt"; } String line1, line2; switch (column) { case ID_MANDAT_COLUMN_INDEX: line1 = "MandatsID"; bre...
9
public void tryAgain(Displayable form) { Alert error = new Alert("Login Incorrect", "Please try again", null, AlertType.ERROR); error.setTimeout(900); // error.setImage(imge); Form login = (Form) form; TextField userName; TextField password; for (int i = 0; i ...
2
public RegPumpingLemmaChooser() { myList = new ArrayList(); //old languages myList.add(new AnBn()); myList.add(new NaNb()); myList.add(new Palindrome()); myList.add(new ABnAk()); myList.add(new AnBkCnk()); myList.add(new AnBlAk()); myL...
0
@Override public List<Action> process(Board board) { List<Action> actions = new ArrayList<Action>(); for (int x = 0; x < board.w; x++) for (int y = 0; y < board.h; y++) { if (!board.cells[x][y]) continue; // Get best square from here int radius = getBestSquare(board, x, y); actions.add(n...
3
public void sendReplyFlooding(){ //Dispara o flooding das respostas dos nodos com papel BORDER e RELAY if ((getRole() == NodeRoleOldBetHopSbet.BORDER) || (getRole() == NodeRoleOldBetHopSbet.RELAY)) { this.setColor(Color.GRAY); //Pack pkt = new Pack(this.hops, this.pathsToSink, this.ID, 1, this.sBet, TypeMes...
2
public int getFollowingGlieder() { return nextGlied != null ? nextGlied.getFollowingGlieder() + 1 : 1; }
1
@Test public void testTargetLocationLastVisited(){ ComputerPlayer player = new ComputerPlayer(); player.setLastVistedRoom('B'); int enteredRoom = 0; int loc_7_5Tot = 0; board.calcTargets(6, 7, 3); //pick a location with at least one room as a target that already been visited for(int i = 0; i < 100; i++) ...
3
public void connectDb() { startSQL(); try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection(url, user, password); st = con.createStatement(); } catch (Exception e) { e.printStackTrace(); } }
1
private void checkInvariants() { assert elements[tail] == null; assert head == tail ? elements[head] == null : (elements[head] != null && elements[(tail - 1) & (elements.length - 1)] != null); assert elements[(head - 1) & (elements.length - 1)] == null; }
2
public boolean getBoolean(int index) throws JSONException { Object o = get(index); if (o.equals(Boolean.FALSE) || (o instanceof String && ((String)o).equalsIgnoreCase("false"))) { return false; } else if (o.equals(Boolean.TRUE) || (o in...
6
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { MOB target=mob; if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB)) target=(MOB)givenTarget; if(target.fetchEffect(this.ID())!=null) { mob.tell(target,null,null,L("<S-NAME> alread...
9
private static void createTopology(ArrayList gisList, ArrayList resList, ArrayList userList) throws Exception { int i = 0; double baud_rate = 1e8; // 100 Mbps double propDelay = 10; // propagation delay in millisecond int mtu = 1500; ...
3
public boolean available() { return this.seen > 0; }
0
public void firstQuery() throws SQLException { String errorMessages = ""; ConnectToDatabaseSys connectDB = new ConnectToDatabaseSys(); int errorCount = 0; //FORMAT orno = validateInputs.formatStringSpaces(orno); ordetail = validateInputs.formatStringSpaces(or...
8
@Override public Grid generate() { List<PowerFailure> effects = getPowerFailureList(); for(PowerFailure p : effects) { grid.addEffectToGrid(p); factory.addObservable(p); factory.addObserver(p); } factory.registerToNewObservables(); return grid; }
1
public void actionPerformed(ActionEvent ae) { if ("Hit".equals(ae.getActionCommand())) { if (playerSum < 21) { player.playersHand.addACard(table.deal()); repaint(); playerSum = player.playersHand.getTotalValue(); } if (playerSum > 21) { setWallet(getWallet()); score....
8
@Override public void addUnsearchQueue(WebPage unsearchQueue) { // TODO Auto-generated method stub }
0
public String[] getElementsLineEnder() { return this.ELEMENTS_LINE_ENDER; }
0
private static void addSomeMetadata( OtuWrapper wrapper, BufferedReader reader, BufferedWriter writer) throws Exception { writer.write("sampleID\tpatientID\truralUrban\ttimepoint\tshannonDiversity\tshannonEveness\tunRarifiedRichness"); String[] topSplits = reader.readLine().split("\t"); for( int x=1;...
7
public void addUndoQueueListener(UndoQueueListener l) { undoQueueListeners.add(l); }
0
public Location placeShip(int size, boolean retry) throws ArrayIndexOutOfBoundsException, InputMismatchException { shipSize = size; randomRow = (int) (Math.random() * (SIZE - 2)); randomCol = (int) (Math.random() * (SIZE - 2)); Random random = new Random(); horizontal = random.nextBoolean(); // System...
7
@Override public boolean isSavingNotRequired() { Path p; try { p = Paths.get(getChildrenSaveTo()); if (Files.isDirectory(p)) return true; } catch (IOException e) { Main.log(Level.WARNING,null,e); } return false; }
2
protected Pane addMenuButtons() { GridPane mainPane = new GridPane(); mainPane.setVgap(20); HBox chartGroupPane = new HBox(); chartGroupPane.setAlignment(Pos.CENTER); //Stworzenie przycisków do wyboru typu wykresu (liniowy, świecowy) final ToggleGroup chartGroup = new ...
9
public void postLogin(String userId, ModelAndView view) { int deptId = m_user.getDepartment(); String viewName = null; if (deptId == 10) viewName = "employee"; else if (deptId == 20) viewName = "manager"; else if (deptId == 30) viewName = "hrdepartment"; else if(deptId == 40) viewName = "trainin...
4
public Message(@NotNull MessageType type, String title, @NotNull String content, Runnable yes) { String path = null; yesAction = yes; buttons = new ArrayList<GuiButton>(); switch (type) { case INFO: path = "message/infoLogo"; break; ...
7
public static int minJump(int[] input) { if(input == null || input.length == 0 || input[0] == 0){ return -1; } int[] minJump = new int[input.length+1]; minJump[0] = 0; for(int i = 1; i<= input.length; i++) { minJump[i] = Integer.MAX_VALUE; f...
7
private void updateCart() { shoppingCartArea.clear(); if (currentCart.size() == 0) { shoppingCartArea.add(emptyLabel); } else { int price = 0; for (final Product p : currentCart) { if (p.getInCurrentCart() == 0) { cartRemoveTemp.add(p); price += p.getPrice() * p.getInCurrentCart(); ...
3
public CheckResultMessage error(String message) { return new CheckResultMessage(message, CheckResultMessage.CHECK_ERROR); }
0
static void realRead(InputStream is, byte[] buffer, int bytesToRead) throws IOException { int read = 0, value; while (read < bytesToRead) { value = is.read(); if (value < 0) { throw new RuntimeException("EOF!"); } buffer[read++] = (byte) value; read += is.read(buffer, read, bytesToRead - read); ...
2
public void copyFile(File source, File dest) throws IOException { BufferedInputStream bis = null; BufferedOutputStream bos = null; FileInputStream fis = null; FileOutputStream fos = null; try { fis = new FileInputStream(source); fos = new FileOutputStream...
9
public String getName() { return name; }
0
private Door[] sortDoors(int whichWall) { ArrayList<Door> doorTempList = new ArrayList<>(); doorTempList.addAll(doors.get(whichWall)); //copy doors into temp list Door[] temp = new Door[doors.get(whichWall).size()]; if (temp.length > 0) { for (int i = 0; i < temp...
4
@Override public boolean generate(World world, Random random, int i, int k, int j) { // TODO Auto-generated method stub if (world.getBlockId(i, k, j) != VoidMod.hardenSpaceTimeStructure.blockID) { return false; } // size Generator int aid = random.nextInt(3) + ...
8
@Override public void render(float delta) { Gdx.gl.glClearColor(0.56f, 0.165f, 0.1f, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); timeElapsed += delta; gameOverView.render(delta); /** * If the round score is higher than the highscore it will be saved * as new highscore * */ if(!doneCheckingFor...
5
public void deleteTheSame() { // - Parcours de matrixb à la recherche des boules identifiées // comme appartenant à une famille. // - Suppression des boules corrrespondantes (remise à zéro dans matrix) for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { if (matrixb[i][j]) matrix[i][j] = 0;...
3
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
@Override public void run() { while (popups != null) { console.displayMsg("Update"); synchronized (popups) { while (popups.isEmpty()) { try { popups.wait(); } catch (InterruptedException ex) { ex.printStackTrace(); } } for (int i = 0; i < popups.size(); i++) {...
6
public boolean equals(Object obj) { try { if (!obj.getClass().equals(audioClass.class)) { throw new Exception(); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return (obj != null) && ((audioClass) obj).toString().equals(this.filePath) && ((audioClass...
4
@Override public MultiMenuPlacePlanetChoices doSelection(Factory factory) { updateState(); while (state != -1) { Menu<?> menu = getMenu(state, factory); switch (state) { case 1: choices.setChosenPlanet((Planet) menu.selectChoice(false)); break; case 2: rotatePlanetChoice = (StaticChoice) m...
9
public int getBoardWidth() { return this.w; }
0
@Override protected void deserialize_() throws IOException { if (this.in == null) { return; } this.io.startProgress("Reading data base of previous run", -1); // init this.in.registerProgressMonitor(this.io); this.io.setProgressTitle("Reading data base of previous run"); // set // message...
7
public static void disposeImages() { // dispose loaded images { for (Image image : m_imageMap.values()) { image.dispose(); } m_imageMap.clear(); } // dispose decorated images for (int i = 0; i < m_decoratedImageMap.length; i++) { Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decora...
5
public void run() { while (mRun) { try { EventDescriptorObject lObject = mDataStorage.getData(); if (lObject == null) { mRun = false; } // if if (mRun) { EventObject lEventObject = mDataOperator.readEvent(lObject .getType(), lObject.getIndex()); String lMessa...
9
@Override public boolean canAttack(Board board, Field currentField, Field occupiedField) { return this.validSetupForAttack(currentField, occupiedField) && currentField.inDiagonalPathWith(occupiedField) && board.clearPathBetween(currentField, occupiedField); }
2
public static void figureOutParamDeclarations(PrintStream w, Object... comps) { Map<String, Access> m = new HashMap<String, Access>(); for (Object c : comps) { ComponentAccess cp = new ComponentAccess(c); // System.out.println("// Parameter from " + objName(cp)); // ...
7
public E get(int index) throws IndexOutOfBoundsException { if(index >= size || index < 0) throw new IndexOutOfBoundsException(); int count; Node temp; //Occurs if index is towards the end of the list if(index > size/2){ count = size; temp = tail; while(--count >= index) temp = temp.prev; r...
5
public ExcFile(File f) throws IOException { srgMethodName2ExcData = new HashMap<String, ExcData>(); srgParamName2ExcData = new HashMap<String, ExcData>(); // example lines: // net/minecraft/util/ChunkCoordinates=CL_00001555 // net/minecraft/world/chunk/storage/AnvilChunkLoade...
9
public MapData(int a_data,int b_data){ this.a_data = a_data; this.b_data = b_data; }
0
public void decreaseKey(int i, Key key) { if (i < 0 || i >= NMAX) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException("index is not in the priority queue"); if (keys[i].compareTo(key) <= 0) throw new IllegalArgumentException("Calling decreaseKey() with given...
4