text
stringlengths
14
410k
label
int32
0
9
@Test public void compareHands_HighCardHandsHaveSameCards_HandsAreEqual() { Hand p1 = Hand.HighCard(Rank.King, Rank.Jack, Rank.Nine, Rank.Six, Rank.Five); Hand p2 = Hand.HighCard(Rank.King, Rank.Jack, Rank.Nine, Rank.Six, Rank.Five); assertTrue(p1.compareTo(p2) == 0); }
0
private void btnExportarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportarActionPerformed String NombreArchivo = tfNombreArchivo.getText(); if(!NombreArchivo.equals("")){ //ORIGEN Y GRUPO NO DEBEN ESTAR VACIOS if(selectOrigen.getSelectedIndex()!=0 || s...
4
private static Vector3i loadTexture(String fileName, int minFilter, int magFilter) { String path = "res" + File.separator + "textures" + File.separator + fileName; try { System.out.println("Loading Texture: " + fileName); BufferedImage bimg = null; try{ bimg = ImageIO.read(new FileInput...
6
public void renderSprite(int xp, int yp, int scale, int color, Sprite sprite){ int size = sprite.size; for(int y = 0; y < size * scale; y++){ int ya = y + yp; for(int x = 0; x < size * scale; x++){ int xa = x + xp; if(xa < 0 || ya < 0 || xa >= width || ya >= height) continue; int col = sprite.pixe...
9
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Ensemble other = (Ensemble) obj; if (members == null) { if (other.members != null) return false; } else if (!members.equals(other.member...
9
public boolean isDone() { //Iterate through the list of restrictions //Check to see if it's empty if(restrictions.size() > 0) { boolean allRestrictionsDone = true; for(int i=0; i<restrictions.size(); i++) { if(!restrictions.get(i).done) allRestrictionsDone= false; } //If even a singl...
3
public void SetDirection(char newDirection) { this.direction = newDirection; }
0
public void calcFine(){ int total = 0; int minOver = minutesParked - minutesPuchased; int hour = minOver / 60; int partOfHour = minOver % 60; boolean firstTime = true; if(hour > 0){ total += 25; --hour; firstTime = false; ...
4
public static void loadFont(String key, String ref) { if(fonts.get(ref) == null) { if(fonts.isEmpty()) fonts.put("DEFAULT", new GameFont(ref)); if(!key.matches("DEFAULT")) { fonts.put(key, new GameFont(ref)); } } }
3
public static String toUTF8(String str){ if(str == null){ return null; } StringBuffer sb = new StringBuffer(); for (int i=0; i< str.length(); i++) { char c = str.charAt(i); if(c >= 0 && c <= 256){ sb.append(c); } else{ try{ byte[] b = Character.toString(c).getBytes("UTF-8"); for...
7
@Override public void move() { updateCounter = (updateCounter + 1) % (rotationSpeedLimiter - speedOfRotation); if(!isOnScreen) return; y += speed; if(y >= SpaceWarrior.HEIGHT) { isOnScreen = false; } if(updateCounter % 10 == 0) { if(currentImage == 7) y += (height * 0.2); currentImage = (cu...
5
@Override public void run() { for (Player player : Bukkit.getServer().getOnlinePlayers()) { if (this.plugin.getNCDatabase().hasHIV(player.getName())) { EffectFactory.getInstance().applyHivEffect(player); player.sendMessage("You have HIV."); } } }
2
public V get(Object key) { CachedValue<V> val = cache.get((K)key); if (val == null) { return null; } if (val.isExpired()) { cache.remove((K)key); return null; } return val.get(); }
2
public CheckResultMessage checkTotal4(int i){ return checkReport1.checkTotal4(i); }
0
@Override public void handleProgressNotification(ProgressNotification pn) { loading.update(pn.getProgress()); }
0
public void stopPlaying() { try { if(stream != null) { lg.logD("AudioPlayer: Try to stop the audio player with the stream: "+stream.name); } mainGui.setTitleForAudioPlayer(stream.name ,"",false); outStream.write("stop\n"); outStream.flush(); if(stream != null) { lg.logD...
3
public int getValue(){ if(this.v_code.charAt(0) == 'A') return 1; if(this.v_code.charAt(0) == '2') return 2; if(this.v_code.charAt(0) == '3') return 3; if(this.v_code.charAt(0) == '4') return 4; if(this.v_code.charAt(0) == '5') return 5; if(this.v_code.charAt(0) == '6') return 6; if(this.v_code.charAt(0) ...
9
public static void sort(int[] source) { int len = source.length; if (len == 0 || len == 1) { System.out.println("\nEmpty or only one element!"); return; } for (int i = 0; i < source.length - 1; i++) { int minIndex = i; for (int j = i + 1; j < source.length; j++) { if (source[j] < source[minIn...
5
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 fe...
6
public static void main(String[] args) { String filename = args[0]; String delim = args[1]; StringGraph sg = new StringGraph(filename, delim); System.out.println(filename + " : Key in your Query"); Graph G = sg.G(); while (StdIn.hasNextLine()) { String s = StdIn.readLine(); if (sg.contains(s)) ...
3
public String getTamanhoIntuitivo() { final int KB = 1024; final int MB = 1024 * 1024; final int GB = 1024 * 1024 * 1024; String str = new String(); double tam = tamanho; if(tamanho < KB) { str = Long.toString(tamanho) + " bytes"; } else if...
6
public static void main(String[] args) { final String[] strings = {"7 6 5 9 8 4 3 2 1 0", "3 2 1 0 4 5 6 7 8 9", "2 3 1 5 0 6 7 4 8 9", "0 1 2 4 3 6 5 9 8 7", "0 1 2 4 5 6 7 9 3 8"}; for (String string : strings) { final String[] split = string.split(" "); int[] o...
6
@Override public double escapeTime(Complex point, Complex seed) { // Keep iterating until either n is reached or divergence is found int i = 0; while (point.modulusSquared() < escapeSquared && i < iterations) { // Z(i+1) = (|ReZ(i)| * i|ImZ(i)|) + c double newReal = M...
2
public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); }
0
public static void main(String[] args) { if (args.length < 2){ System.out.println("need two args - letter and filename"); } String letter = args[0]; String filename = args[1]; BukvoReader r = new BukvoReader(letter); List<Word> result = r.doRead(filename); ...
5
public static DynamicArray<String> generateSmoother(int size) { DynamicArray<String> array = new DynamicArray(); for (int i = 0; i < size; i++) { String line = ""; int l = 0; for (int j = 0; j < size; j++) { if (j < i + 4) { line +=...
5
public static double phi(double z)///phi(z), see [3] P439 { if(z<=0 || z>1) return -1; if(z<0.5) return -1*phi(1-z); for(int i=1;i<normalTable.length;i++){ if(normalTable[i-1]<=z && z<=normalTable[i]){ double n1 = 0.1*((int)(i-1)/10)+0.01*((int)(i-1)%10); double n2 = n1 + 0.01; if(i+1<normalTable.len...
9
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (value instanceof Boolean) { setSelected(((Boolean)value).booleanValue()); if(column == 3) { if(PigeonSDK.Mouse1TileID == Integer.parseInt(table.getValueAt(row, 2).toStr...
6
public Player createPlayer(int hp, int level, String name) { Player newPlayer = new Player(playerCanvas); Sprite newSprite = new Sprite(); URL spriteURL = null; try { spriteURL = this.getClass().getClassLoader().getResource("sprites/sprite_fr1.png"); newSprite._setSpriteImage(spriteURL); } catch(...
1
private static Device getDefaultDevice () throws IOException { Vector devices = getDevices (); switch (devices.size ()) { case 1: return (Device) devices.elementAt (0); case 0: System.err.println ("no de FX2 devices"); break; default: System.err.println ("which FX2 device?"); list...
2
public boolean replaceSubExpression(Expression original, Expression replacement) { boolean found = false; if (select == original) { select = replacement; found = true; } for (int i = 0; i < sortKeyDefinitions.length; i++) { if (sortKeyDefinitions[i].ge...
9
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean isFocused, int row, int column) { Component cell = super.getTableCellRendererComponent(table, value, isSelected, isFocused, row, column); if (!isSelected && !isFocused) { ...
2
public void setProperty(String name, String value) { if(!new File(PROP_FILE).exists()) { PROP_FILE = "/usr/share/tomcat7/.jenkins/jobs/PlagiatsJaeger/workspace/WebContent/WEB-INF/classes/config.properties"; } Properties prop = new Properties(); try { prop.load(new FileInputStream(PROP_FILE)); ...
2
protected String getChannelsValue(final HTTPRequest httpReq, final String index) { final String name=httpReq.getUrlParameter("CHANNEL_"+index+"_NAME"); final String mask=httpReq.getUrlParameter("CHANNEL_"+index+"_MASK"); final String colors=httpReq.getUrlParameter("CHANNEL_"+index+"_COLORS"); if((name!=null)&&...
7
private void createSong() { try { String title; String artist; String categoryId; String filename; System.out.println("Enter title: "); title = Keyboard.readString(); System.out.println("Enter artist: "); ...
1
public static void main(String[] args) { //Initialize objects Random randObj = new Random(); //Initialize constants final double side = 6; //Initialize radius and number of trials with command-line arguments double radius = Integer.parseInt(args[0]); int trials = Integer.parseInt(args[1]); //Choose li...
8
@Override public void keyPressed(int i, char c) { if (i == Input.KEY_DOWN){ selection++; } else if (i == Input.KEY_UP){ selection--; } else if (i == Input.KEY_ENTER) { MenuButton.buttonAction(selection, container, menu); } if (sel...
5
public void stateChanged(ChangeEvent e) { final JSlider source = (JSlider)e.getSource(); if (e.getSource() == sliderLaser1 && ready) { valueSliderLaser1 = (int)source.getValue(); labelSliderLaser1.setText("Power L1 : " + valueSliderLaser1 + " %"); process.laserManu(valueSliderLaser...
7
private void awaitAsyncRollback(Future<?> async) throws ProcessRollbackException { try { async.get(); } catch (ExecutionException ex) { // thread returned an exception if (ex.getCause() instanceof ProcessRollbackException) { throw (ProcessRollbackException) ex.getCause(); } } catch (Exception ex)...
4
public boolean prompt() { System.out.print("Would you like to begin a new adventure? <y/n>\n==========================================\n You:"); BufferedReader input = new BufferedReader( new InputStreamReader(System.in) ); String response = ""; //Reads input. If response is not y or n, ask again. try { ...
4
private void findfocus() { /* XXX: Might need to check subwidgets recursively */ focused = null; for (Widget w = lchild; w != null; w = w.prev) { if (w.autofocus) { focused = w; focused.hasfocus = true; w.gotfocus(); break; } } }
2
public float getRightAngleOrientation() { float theta = getOrientation(); float pi = (float)Math.PI; if (theta > 2 * pi) theta -= 2 * pi; if (theta >= 0 && theta < pi * 0.25) { return 0; } else if (theta >= pi * 0.25 && theta < pi * 0.75) { return pi * 0.5f; } else if (theta >= pi * 0.75 && theta < pi...
9
public String getName() { return name; }
0
@Override public boolean containsKey(K key) { if (key == null) { return false; } for (Entry entry : this.array) { if (entry != null && key.equals(entry.key) && !entry.isDeleted) { return true; } } return false; }
5
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; OrderItem other = (OrderItem) obj; if (count != other.count) return false; if (id != other.id) return false; if (item == null) { if ...
8
private void agregarAnuncio(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_agregarAnuncio cal.add(Calendar.DATE, Integer.parseInt(jComboBox2.getSelectedItem().toString().replace(" días", ""))); boolean nuevo = true; if (buttonGroup2.getSelection() == jRadioButton4) { nuevo = fals...
6
public UnrestrictedTreeNode(String text) { super(text); this.text = text; }
0
public void actionPerformed(ActionEvent event) { Object target = event.getSource(); if (target == fJoinButton || target == fDeleteButton || target == fRoomName) { if (fRoomName.getText().length() > 0) { setVisible(false); if (fJoinButton != null) ...
7
public int compare(String o1, String o2) { String s1 = (String)o1; String s2 = (String)o2; int thisMarker = 0; int thatMarker = 0; int s1Length = s1.length(); int s2Length = s2.length(); while (thisMarker < s1Length && thatMarker < s2Length) { ...
8
public static String getTokenName(int tokenType) { // Get all the fields of the lexical analyser - will be the token type // variables Field[] fields = EsperLexer.class.getFields(); // Iterate through the fields for (Field field : fields) { if (field.getType() == int.class) { try { // If the fiel...
5
public boolean logIn() throws UnknownHostException, IOException { String message; String total = ""; @SuppressWarnings("resource") Scanner us = new Scanner(System.in); try { String userInput; System.out.print("Username: "); String userSend = us.next(); out.println(userSend); System.out.print(...
7
public ArrayList<String> traerListaDeptos(int codEdif){ conn = Conector.conectorBd(); String sql = "select * from departamento where codedi="+codEdif+""; try { pst = conn.prepareStatement(sql); ArrayList<String> ls = new ArrayList<String>(); ...
2
public void setValues(String[] itemInfo) { if (labels == null) return; if (values == null) values = new String[labels.length]; int numItems = Math.min(values.length, itemInfo.length); for(int i = 0; i < numItems; i++) { values[i] = itemInfo[i]; } }
3
public Configuration loadEmbeddedConfig(final String resource) { final YamlConfiguration config = new YamlConfiguration(); final InputStream defaults = this.getResource(resource); if (defaults == null) return config; final InputStreamReader reader = new InputStreamReader(defaults, Custo...
3
@Override public void mouseEntered(MouseEvent e) { if(e.getSource()==recordBut){ recordBut.setIcon(recordOverIcon); }else if(e.getSource()==playBut){ playBut.setIcon(playOverIcon); }else if(e.getSource()==stopBut){ stopBut.setIcon(stopOverIcon); }else if(e.getSource()==saveBut){ saveBut.setIcon(sav...
6
private static SpeechNBestList buildSpeechNBestList(List<String> correctSentence, BufferedReader wordReader, BufferedReader scoreReader, Set vocabulary) throws IOException { List<Double> scoreList = readScores(scoreReader); List<List<String>> sentenceList = readSentences(wordReader); List<List<String>...
9
public int getChannelAccess() { return channelAccess; }
0
private boolean checkCardForUnique (String motherLangWord, String translation) throws SQLException { Connection conn = null; ResultSet resSet = null; try { conn = DriverManager.getConnection(Utils.DB_URL); PreparedStatement pStat = conn.prepareStatement("SELECT id FROM wo...
1
public static void main(String[] args) throws IOException { loadFromFile(); writeToFile(Scheduler.getUsers().values()); }
0
public void DFS(int[] state, int m, int n) { if (state[0] == m-1 && state[1] == n-1) { pathcount++; return; } else if (state[0] == m) { return; } else if (state[1] == n) { return; } else if (state[0] == m-1 && state[1] < n-1) { ...
8
void readZrlePackedPixels(int tw, int th, int[] palette, int palSize) throws Exception { int bppp = ((palSize > 16) ? 8 : ((palSize > 4) ? 4 : ((palSize > 2) ? 2 : 1))); int ptr = 0; for (int i = 0; i < th; i++) { int eol = ptr + tw; int b = 0; int nbits = 0; while (ptr < eol) { if (nbit...
7
public GUISignup() { setResizable(false); portServer = 2223; setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 378, 249); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); txtUserName = new JText...
0
private void removeDropTransfer(Transfer transfer){ if (dropTypes.length == 1) { dropTypes = new Transfer[0]; } else { int index = -1; for(int i = 0; i < dropTypes.length; i++) { if (dropTypes[i] == transfer) { index = i; break; } } if (index == -1) return; Transfer[] newTypes = new Transfer...
5
public static void main(String[] args) { for (String input : Arrays.asList("0", "50", "-10", "1000", "x", null)) { String output; try { Integer out = LIMIT_FIELD.validate(input); output = out == null ? null : out.toString(); } catch (ValidationException e) { output = "ERRO...
3
public void print_resultSet(ResultSet rs){ if (rs != null){ ResultSetMetaData md = null; int nombreColumns = 0; try { md = rs.getMetaData(); nombreColumns = md.getColumnCount(); String[] nomColumns = new String[nombreColumns]; ...
5
public PastMeeting getPastMeeting(int id) { PastMeeting returner = null; for (int i = 0; i < pastMeetingList.size(); i++) { if (pastMeetingList.get(i).getID() == id) { returner = (PastMeeting) pastMeetingList.get(i); } } if (returner == null) { System.out.println("There is no such past meeting")...
3
public void tick(World w) { if(life <= 0) return; if(vel.x > this.maxPositiveVX) { vel.x = this.maxPositiveVX; } if(vel.x < this.maxNegativeVX) { vel.x = this.maxNegativeVX; } if(vel.y > this.maxPositiveVY) ...
9
public void writeMap(String fn) throws IOException { FileOutputStream fout = new FileOutputStream(fn); DataOutputStream out = new DataOutputStream(fout); out.writeInt(_map[0].length-1); out.writeInt(_map.length-1); out.writeFloat(_map.length-1); out.writeFloat(_map[0].length-1); out.writeFloat(_map.length...
2
public UserFollowers get(Integer key) { UserFollowers res = hashMap.get(key); if (res == null) missCnt.incrementAndGet(); total.incrementAndGet(); return res; }
1
public String toString() { final StringBuilder sql = new StringBuilder(1024); // first off if there are no entries in the where column list AND // there is NO additional freeform where clause short circuit the logic // and just return an empty string since there is nothing to proces...
9
public String format(String pattern) { SimpleDateFormat parser; String buffer; String temp; int n; if(pattern == null) return "Invalid pattern"; if(pattern.charAt(0) == 'B') { // Special case - binary seconds from reference year int year; long seconds; long milli; long diff; if...
9
public final Pino etsiPolku(int alkuX, int alkuY, int loppuX, int loppuY) { kaymattomatNoodit = new Keko(11); kaydytNoodit = new LinkedList<T>(); kaymattomatNoodit.lisaa(noodit[alkuX][alkuY]); valmis = false; T valittu; while (!valmis) { /** Ha...
6
@Override public void addWord(String s) { // Equivalent of rho function int nbTrailingZeros = Integer.numberOfTrailingZeros(func.hashString(s)); // Consider only words whose hash value begins with more than b zeros. if (nbTrailingZeros >= b) { LinkedList<Occurrence> l = strTab.get(nb...
3
private boolean r_factive() { int among_var; // (, line 132 // [, line 133 ket = cursor; // substring, line 133 among_var = find_among_b(a_7, 2); if (among_var == 0) { ...
8
public void keyPressed(int key, char c){ if(key == Input.KEY_UP){ startMenu.movePointer(Utility.Direction.UP); }else if(key == Input.KEY_DOWN){ startMenu.movePointer(Utility.Direction.DOWN); }else if(key == Input.KEY_ENTER){ startMenu.performAction(); } }
3
private boolean isConnectedTo(LightTrailPart that) { final List<LightTrailPart> lightTrailParts = lightTrail.getLightTrailParts(); final int index = lightTrailParts.indexOf(this); if ((index > 0 && lightTrailParts.get(index - 1).equals(that)) || (index < lightTrailParts.size() - 1 && lightTrailParts.get(index + 1...
4
public final synchronized void mouseReleased(MouseEvent mouseevent) { anInt7428++; int button = getMouseButton(mouseevent); if ((button & buttonMask ^ 0xffffffff) == -1) button = buttonMask; if ((button & 0x1 ^ 0xffffffff) != -1) addEvent(3, mouseevent.getY(), mouseevent.getX(), mouseevent.getClickCount()...
5
private static int decodeByte(byte b) { if (b >= 'A' && b <= 'Z') { return b - 'A'; } else if (b >= 'a' && b <= 'z') { return b - 'a' + 26; } else if (b >= '0' && b <= '9') { return b - '0' + 52; } else if (b == '+') { return 62; } ...
9
public void put(Telegram telegram) throws InterruptedException { if(_closed) return; final int length = telegram.getSize(); if(length <= 0) throw new IllegalArgumentException("Telegrammlänge muss größer 0 sein, ist aber " + length + ": " + telegram); final byte priority = telegram.getPriority(); synchronized(...
8
protected void alterneigh(int rad, int i, int b, int g, int r) { int j, k, lo, hi, a, m; int[] p; lo = i - rad; if (lo < -1) lo = -1; hi = i + rad; if (hi > netsize) hi = netsize; j = i + 1; k = i - 1; m = 1; while ((j < hi) || (k > lo)) { a = radpower[m++]; if (j < hi) { p = netw...
8
public SignatureVisitor visitInterface() { if (state != SUPER) { throw new IllegalStateException(); } SignatureVisitor v = sv == null ? null : sv.visitInterface(); return new CheckSignatureAdapter(TYPE_SIGNATURE, v); }
2
public static int getPort(String vncServerName) { int colonPos = vncServerName.lastIndexOf(':'); while (colonPos > 0 && vncServerName.charAt(colonPos - 1) == ':') colonPos--; if (colonPos == -1 || colonPos == vncServerName.length() - 1) return 5900; if (vncServerName.charAt(colonPos + 1) == ...
6
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { config = plugin.getConfig(); if (args.length == 1 ){ if (sender instanceof Player) { if (sender.hasPermission("darkcommand.bitchslap")){ if (commandLabel.equalsIgnoreCase("bitchslap")){ Player player ...
6
public static void main(String[] args) { int op; do{ System.out.println("1- Agregar plan"); System.out.println("2- Pagar"); System.out.println("3- Editar Email"); System.out.println("4- Agregar Amigo"); System.out.println(...
6
public byte getTileID(int x, int y) { if (x < 0 | x >= getWidth()) { return LevelTexture.CENTER; } else if (y < 0) { return LevelTexture.AIR; } else if (y >= getHeight()) { if (tileSet[x][getHeight() - 1] == LevelTexture.AIR) { return tileSet[x][0]; } else { return LevelTexture.CENTER; } ...
4
public void createControlPanel(Composite parent) { super.createControlPanel(parent); if (nextNumber < 1) nextNumber = startNumber; // add selection listener to reset nextNumber after // the sequence has completed playItem.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event)...
5
@SuppressWarnings("unchecked") public void handle(HttpExchange exchange) throws IOException { long start = System.currentTimeMillis(); Map<String, Object> params = (Map<String, Object>)exchange.getAttribute("parameters"); Map<String, String[]> headers = (Map<String,String[]>)exchange.getAttribute("headers"); S...
7
public Integer[] nextIntArray() throws Exception { String[] line = reader.readLine().trim().split(" "); Integer[] out = new Integer[line.length]; for (int i = 0; i < line.length; i++) { out[i] = Integer.valueOf(line[i]); } return out; }
1
public void printAmbiguousTemporalConclusions(Map<Literal, TreeMap<Temporal, Map<ConclusionType, Set<String>>>> conclusions[]) { if (null == conclusions) return; StringBuilder sb = new StringBuilder(); for (int i = 0; i < conclusions.length; i++) { String str = getAmbiguousTemporalConclusionString("ambiguous t...
7
public int getTileID(int x, int y){ if(x < 0 || y < 0 || x >= worldWidth || y >= worldHeight) return -1; return mapData.get((y * worldWidth) + x); }
4
public void visit_dneg(final Instruction inst) { stackHeight -= 2; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } stackHeight += 2; }
1
public Logon(String name, String pwd) { username = name; password = pwd; }
0
private void IntervenantsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IntervenantsActionPerformed // TODO add your handling code here: switch(etat){ case Debut: donner1.frame_Intervenant(); this.donner1.setVisible(true); ...
8
public boolean offer(Position p){ boolean notfull = super.offer(p); if (notfull){ this.clear(); super.offer(p); } return true; }
1
final public Temporal temporalStamp() throws ParseException { Token startNegation=null, endNegation=null; Token startTime=null,endTime=null; Token negInf=null; jj_consume_token(TEMPORAL_START); if (jj_2_35(7)) { if (jj_2_34(7)) { startNegation = jj_consume_token(MINUS); } else { ;...
8
public ISOCountry( String id2, String id3, String shortName, String ext ) { if ( id2 != null ) { iso = id2.toUpperCase() ; // 2 letter iso } else { iso = "" ; } iso3 = id3 ; // 3 letter iso name = shortName ; if ( ext == null ) { extension = "" ; } ...
5
public static SettingsDialog getInstance() { return instance; }
0
public GregorianCalendar getDate() { return date; }
0
public void checkProduction(Production production) { if (!ProductionChecker.isRestrictedOnLHS(production)){ javax.swing.JOptionPane.showMessageDialog(null, "Your production is unrestricted on the left hand side."); throw new IllegalArgumentException( "The production is unrestri...
1
@CanReturnNull public static Command getCommandByName(String commandName) { Command toRet = null; ArrayList<Class<?>> availableCommands = (ArrayList<Class<?>>) ReflectionHelper.getCommandClasses(); for(Class<?> comm:availableCommands) { try { Command currComm = (Command)comm.newInstance(); if(cu...
6