text
stringlengths
14
410k
label
int32
0
9
public void move(int xa, int ya){ if(xa != 0 && ya != 0){ move(xa, 0); move(0, ya); numSteps--; return; } numSteps++; if(!hasCollided(xa, ya)){ if(ya < 0) { movingDir = 0; } if(ya > 0){ movingDir = 1; } if(xa < 0){ movingDir = 2; } if(xa > 0){ movingDir = 3; }...
7
@Override public void setValue(Object o) { this.nativeValue=this.convertObject(o); }
0
@Override public String execute() { String actionResult = ""; Map<String, Object> session = ActionContext.getContext().getSession(); User user = (User) session.get("USER"); if (user != null) { setCurrentUserName(user.getFname() + " " + user.getLname() + " [G]"); ...
7
public static String save(Component parent, String filestring) { if (FileDialogs.hasFileAccess()) { URL url = ClassLoader.getSystemResource("circuits"); String urlName = url.getFile().substring(1); if (FileDialogs.fc == null) { FileDialogs.fc = new JFileChooser(urlName); } FileDialogs.fc.setFileFi...
6
Deck() { // Used to assign values to each card rank. Integer cardValue = new Integer(1); String suitRank; /** * Assign a unique <"rank-suit", cardValue> mapping for each card and store it into the 'cardValueMap', which * will be the main data structure to represent our deck of cards. */ f...
3
public static int mySearch(int[] arr, int number) { int i=0; for (i=0; i<arr.length; i++) { if (arr[i]==number){return i;} } return i; }
2
private static String[] split(String data, String splits, boolean trim) { // System.out.println("Split called: '" + data + "' <?> " + splits); Vector strings = new Vector(); int lastPos = 0; int mode = 0; for (int i = 0, n = data.length(); i < n; i++) { char c = data.charAt(i); if (split...
8
private Area recursiveGetAreaByName(Area root, String name) { if (root.toString().indexOf(name) != -1) //TODO ??? return root; else { for (int i = 0; i < root.getChildCount(); i++) { Area ret = recursiveGetAreaByName(root.getChildArea(i), n...
3
public static String rightTrim(String str) { if (str == null) { return ""; } int length = str.length(); for (int i = length - 1; i >= 0; i--) { if (str.charAt(i) != 0x20) { break; } length--; } return str.substring(0, length); }
3
public void paint(Graphics g) { Font helvetica = new Font("Helvetica", Font.BOLD, 18); g.setFont(helvetica); g.setColor(Color.WHITE); //draws the number of sitted people on the center of a table... //moves the text 10 units up to avoid being covered by the sitted fellas i...
7
public static long calProfit(int[] prices) { if (prices == null || prices.length < 2) { return 0; } int len = prices.length; Stack<Integer> highes = new Stack<Integer>(); int localHigh = prices[len-1]; for (int i=len-2; i>=0; i--) { if (prices[i] <...
9
private void save(CompoundTag tag) { File file = new File(path + player.getName() + ".dat"); File temp; FileOutputStream output_stream; NBTOutputStream nbt_output; if (!file.exists()) { if (file.getParent() != null) file.getParentFile().mkdirs(); try { file.createNewFile(); } catc...
8
protected void initialize() { Robot.driveTrain.clearEncoder(); }
0
public static void run() { System.out.println("\n\n--|Advanced Dice|--------------------------------------------------------------"); System.out.println("Roll 3d6 with only ONE call to the RNG"); // load a hat with our chance weights Hat<Integer> dice = new Hat<Integer>(); int chances[]={1, 3, 6...
2
public void put(String atrName, Object val) { if (atrName.equals(LABEL)) { v.setLabel((String) val); } else if (atrName.equals(SHAPE)) { v.setShape((GShape) val); } else if (atrName.equals(BORDER)) { v.setShapeStroke((GStroke) val); } else if (atrName....
9
@SuppressWarnings("unchecked") public <T> T createDao(Class<T> clazz) throws Exception { T instance = (T) proxyCache.get(clazz); if (instance == null) { DataAccessInterceptor interceptor = newDataAccessInterceptor(); detectDataAccessMethod(clazz, interceptor); instance = (T) Enhancer.create(clazz, interce...
1
public static SyslogLevel mapStringToSyslog(String level) { level = level.toLowerCase().trim(); if (level.equals("debug")) { return SyslogLevel.DEBUG; } else if (level.equals("info")) { return SyslogLevel.INFO; } else if (level.equals("notice")) { retu...
9
public int GetCLWoodcutting(int ItemID) { if (ItemID == 10764) { return 100; } if (ItemID == 10766) { return 100; } if (ItemID == -1) { return 1; } String ItemName = GetItemName(ItemID); if (ItemName.startsWith("Woodcut. cape")) { return 100; } if (ItemName.startsWith("Woodcutting hood")) { ...
5
public PerformanceTester() { }
0
private static void print(ResultSet s, int actIndex) { String resString = ""; try { while (s.next()) { resString += "\nName: " + s.getString("c_vorname") + " " + s.getString("c_nachname") + "\nGebdat: " + (s.getDate("c_gebdat", GregorianCalendar.getInstance())).toString(...
7
public ProjCoordinate projectInverse(double xyx, double xyy, ProjCoordinate out) { double th; th = xyy * ( xyy < 0. ? RYCS : RYCN); if (Math.abs(th) > 1.) if (Math.abs(th) > ONETOL) throw new ProjectionException("I"); else th = th > 0. ? ProjectionMath.HALFPI : - ProjectionMath.HALFPI; else th = Mat...
8
private String spaceSet(Set set) { Iterator it = set.iterator(); boolean first = true; StringBuffer sb = new StringBuffer(); while (it.hasNext()) { if (!first) sb.append(" "); String s = (String) it.next(); sb.append(s.equals("") ? "!" : s); first = false; } return sb.toString(); }
3
public void close() throws IOException { if(r != null) { r = null; ogg.close(); ogg = null; } if(w != null) { w.bufferPacket(info.write(), true); w.bufferPacket(comment.write(), false); w.bufferPacket(setup.write(), true); ...
6
private Interceptor[] createInterceptors(Before beforeAnnotation) { if (beforeAnnotation == null) return null; Interceptor[] result = null; @SuppressWarnings("unchecked") Class<Interceptor>[] interceptorClasses = (Class<Interceptor>[]) beforeAnnotation.value(); if (interceptorClasses != null && inte...
6
private void writeParameters(ObjectOutputStream dout, Object[] params) throws IOException { int n = params.length; dout.writeInt(n); for (int i = 0; i < n; ++i) if (params[i] instanceof Proxy) { Proxy p = (Proxy)params[i]; dout.writeObject(...
2
public void execute() { m_random = new Random(m_rowNumber * 11); m_dataGenerator.setSeed(m_rowNumber * 11); m_result = new RemoteResult(m_rowNumber, m_panelWidth); m_status.setTaskResult(m_result); m_status.setExecutionStatus(TaskStatusInfo.PROCESSING); try { m_numOfSamplesPerGenerator =...
7
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name, email, userName, password, bMonth, bDate, bYear, gender, mobile, securityKey; name = request.getParameter("name"); email = request.getPar...
1
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
@Test public void testInfixToPostfix5() throws DAIllegalArgumentException, DAIndexOutOfBoundsException, ShouldNotBeHereException, BadNextValueException, UnmatchingParenthesisException { try { infix.addLast("/"); infix.addLast("5"); QueueInterface<String> postFix = calc.infixToPostfix(infix); String...
5
void load() { observer = ObserverType.getNewInstance(this, model.settings.getObserverType()); Vertex.randomInit.autoInitial(); savedRandomInitiation = Vertex.randomInit.getInitial() != 0; if (savedRandomInitiation) { if (model.settings.getInit() == InitType.one) { ...
6
public static int treeSize(IntBTNode root) { if (root == null) return 0; else return 1 + treeSize(root.left) + treeSize(root.right); }
1
public E peek(){ return (E)element[top]; }
0
public void easterEgg16(){ RoketUtils.submitAchievement(RoketGamerData.ACHIEVEMENT_DAVE); NewWindowManager wm = nm.getWorld().getGame().getWindows(); new TutorialWindow(wm,"You have","summoned the","fire nation","to do battle!","Prepare to die!"); ai.reset(); int startRow = PavoHelper.getGameHeight(nm.g...
9
public void render(){ if(x == DownGame.GAME_WIDTH/2){ StickManImage_Left.draw(x,y,WIDTH,HEIGHT); } else if(x > DownGame.GAME_WIDTH/2 && x <= 3*DownGame.GAME_WIDTH/4){ StickManImage_JumpfromLeft.draw(x,y,WIDTH,HEIGHT); } else if(x > 3*DownGame.GAME_WIDTH/4 && x < DownGame.GAME_WIDTH)...
6
public void menu() { Integer option; String s; boolean exit = false; while (!exit) { UI.printHeader(); System.out.println("Selecciona una acción a continuación:"); System.out.println("1) Ver servicios activos"); System.out.println("2) Añadir un servicio"); System.out.println("3) Probar un servi...
8
public Writer write(Writer writer) throws JSONException { try { boolean commanate = false; Iterator keys = keys(); writer.write('{'); while (keys.hasNext()) { if (commanate) { writer.write(','); } ...
5
@Override public boolean accept(File f) { if (f.isDirectory()) { return true; } String suffixe = null; String s = f.getName(); int i = s.lastIndexOf('.'); if (i > 0 && i < s.length() - 1) { suffixe = s.substring(i + 1).toLowerCase(); } ...
4
private void backClicked() { WindowStack ws = WindowStack.getLastInstance(); if (ws != null) { ws.pop(); } }
1
public boolean addEdge(int srcval,int destval){ Node src=new Node(srcval); Node dest=new Node(destval); if(!nodes.contains(src) || !nodes.contains(dest)){ return false; }else{ Edge temp=new Edge(dest); ArrayList<Edge> tmp=adjacenyList.get(src); if(tmp==null){ tmp=new ArrayList<Edge>(); adjac...
4
public int numTrees(int n) { if (n < result.size()) return result.get(n); int temp = 0; for (int i = 0; i < n; i++) { temp += numTrees(i) * numTrees(n - 1 - i); } result.add(temp); return temp; }
2
public boolean accept(File file) { if (file.isDirectory()) { return true; } else if (extension(file).equalsIgnoreCase(ImageFormat)) { return true; } else { return false; } }
2
public String getComplementString(String stringToComplement) { String complement = ""; for (int i = 0; i < stringToComplement.length(); i++) { Character complementChar = stringToComplement.charAt(i); if (complementChar.equals('A')) { complement = complement + "T";...
5
@Override public void actionPerformed(ActionEvent e) { collapseToParent((OutlinerDocument) Outliner.documents.getMostRecentDocumentTouched()); }
0
public void printDirections() { if(canGoNorth()) { System.out.println("You can go north."); } if(canGoEast()) { System.out.println("You can go east."); } if(canGoSouth()) { System.out.println("You can go south."); } if(canGoWest()) { System.out.println("You can go west."); } }
4
public Piece askMove(Player J,Piece[] Board,int[] mW,ChessGame G){ String L = null; boolean moveisok = false; boolean pieceisok = false; while (!moveisok) { //Partie 1 : Origin do { System.out.println("Write a position fo a piece to move."); while(((L=sc.nextLine()).length())!=2) { ...
7
public static void main(String[] args) throws Throwable{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); for (int i = 0, N = parseInt(in.readLine().trim()); i < N; i++) { int C = parseInt(in.readLine().trim()), sum = 0; ArrayList<Integer> monedas = new A...
8
public void searchTicket(String date) { HttpResponse response = null; String info = null; OrderParameter orderParameter = null; try { URIBuilder builder = new URIBuilder(); builder.setScheme("https") .setHost("dynamic.12306.cn") .setPath("/otsweb/order/querySingleAction.do") .setParameter("...
9
private boolean isFileNeedToSync(String path, String md5) { File f = new File(ConfigManager.getInstance().pathToJar + path); try { if (!f.exists() || !md5.equals(Md5Checksum.getMD5Checksum(f.getPath()))) { return true; } } catch (Exception ex) { ...
3
public void writeFromArrayList(String path, ArrayList<String> lines, String format, String style, boolean override) { try { FileOutputStream fos; BufferedWriter bw; if (override) { fos = new FileOutputStream(path); if (Check.NULLCheck(format)) ...
9
public static IntNode listPosition(IntNode head, int position) { IntNode cursor; int i; if (position <= 0) throw new IllegalArgumentException("position is not positive"); cursor = head; for (i = 1; (i < position) && (cursor != null); i++) cursor = curso...
3
public void mouseWheelMoved(MouseWheelEvent e) { if(e.getWheelRotation() < 0) //scrolled up { } else if(e.getWheelRotation() > 0) //scrolled down { } }
2
public Dijkstra(Graph graph) { this.graph = graph; this.adjacency = graph.getAdjacencyList(); this.vertices = graph.getVertices(); this.edges = graph.getEdges(); this.heap = new BinaryHeap(); }
0
public String toString() { String affiche = "message deplacement 2"; return affiche; }
0
protected List<T> executeQuery(String sql) throws SQLException{ List<T> returnList = new ArrayList<T>(); Connection connection= null; Statement statement= null; ResultSet rs= null; try{ connection = getConnection(); statement = connection.createStatement(); rs = statement.executeQuery(sql); whil...
4
private String threeDigitString(int timeValue) { String result = Integer.toString(timeValue); if (result.length() == 1) { result = "00" + result; } else if (result.length() == 2) { result = "0" + result; } return result; ...
2
private String getDescription() { String desc = "@MongoInsert(" + this.getParsedShell().getOriginalExpression() + ")"; if (!StringUtils.isEmpty(globalCollectionName)) { desc = ",@MongoCollection(" + globalCollectionName + ")"; } return desc; }
1
public void cal_price_items() { int paid_count = Paid_MaSP.size(); double temp_price; giaS_mode = select_price.isSelected(); if(giaS_mode) { select_price.setText("Bán giá Sỹ"); select_price.setToolTipText("GIÁ SỸ"); } else { ...
5
public void addGetMethod(Field field, Method method) { if(field == null) { throw new IllegalArgumentException("Field cannot be null"); } FieldStoreItem item = store.get(FieldStoreItem.createKey(field)); if(item != null) { item.setGetMethod(method); } else ...
2
public void analyze() { if (GlobalOptions.verboseLevel > 0) GlobalOptions.err.println("Reachable: " + this); ClassInfo[] ifaces = info.getInterfaces(); for (int i = 0; i < ifaces.length; i++) analyzeSuperClasses(ifaces[i]); analyzeSuperClasses(info.getSuperclass()); }
2
public ArrayList<PalavraChave> listar(long pesquisaId) throws Exception { String sql = "SELECT * FROM Pesquisapalavras_chave WHERE id1 = ?"; ArrayList<PalavraChave> listaPalavraChave = new ArrayList<PalavraChave>(); if (pesquisaId > 0) { try { PreparedStatement stmt = ConnectionFactory.getConn...
3
protected void sendRequests() throws Exception{ Session _session=getSession(); Request request; if(agent_forwarding){ request=new RequestAgentForwarding(); request.request(_session, this); } if(xforwading){ request=new RequestX11(); request.request(_session, this); } ...
6
public Player getPlayer() { if(player == null) { player = Plugin.plug.getServer().getPlayer(pName); } return player; }
1
public void useGravity(BlackHole bh) { calculateGravity(bh); if (x + FONT_SIZE/2 < bh.getX() + bh.getWidth() / 2) { vx += gravity; } if (x + FONT_SIZE/2 > bh.getX() + bh.getWidth() / 2) { vx -= gravity; } if (y + FONT_SIZE/2 < bh.getY() + bh.get...
4
public int getPixel(int nx, int ny) { if (hflip) nx = 7 - nx; if (vflip) ny = 7 - ny; int val = 0; int rowAddr = addr + (2 * ny); int xMask = 0x80 >> nx; val |= ((PPU.vram[rowAddr] & xMask) != 0) ? 0x01 : 0; val |= ((PPU.vram[rowAddr + 1] & xMask) != 0) ? 0x02 : 0; val |= ((PPU.vram[rowAddr + 16] & x...
6
public static Method getMethod(String name, Class<?> clazz, Class<?>... paramTypes) { Class<?>[] t = toPrimitiveTypeArray(paramTypes); for (Method m : clazz.getMethods()) { Class<?>[] types = toPrimitiveTypeArray(m.getParameterTypes()); if (m.getName().equals(name) && equalsTypeArray(types, t)) return m; ...
7
public static ArrayList getPesquisa2(String prod, String data_in, Integer gmp) throws SQLException, ClassNotFoundException { ArrayList<bConsulta> sts = new ArrayList<bConsulta>(); Connection conPol = conMgr.getConnection("PD"); ResultSet rs; if (conPol == null) { throw new SQ...
3
public static boolean isColumnValid(Board board, int column) { boolean valid = true; if ((column > board.getWidth()) || (column < Board.MINWIDTH)) { valid = false; } return valid; }
2
public void setModel(MDModel mod) { if (mod == null) { model = null; return; } if (!(mod instanceof MolecularModel)) throw new IllegalArgumentException("Can't accept non-molecular model"); model = (MolecularModel) mod; super.setModel(mod); model.addBondChangeListener(this); atom = model.getAtom...
8
@Override public PermissionType getType() { return PermissionType.CONSOLE; }
0
private int nextRowDiagonalColumn(Piece[][] pieces, int from_x, int from_y, int to_x, int to_y) { if(color.equals("black")) { if(to_x - from_x == 1 && Math.abs(to_y - from_y) == 1 && isOccupiedByAnOpponent(pieces[to_x][to_y])) { if(to_x == 7) { ...
9
ControlPanel() { setBounds(0, 0, 150, 250); setLayout(null); CreateButtons = new CreatePokemonButton[CreateButtonSize]; for (int i = 0; i < CreateButtonSize; ++i) { CreateButtons[i] = new CreatePokemonButton("res/Creation/" + ((Integer) (11 + i)).toString() + ".png", "res/Creation/" ...
2
public static void main(String[] args) { PlayerData.load(); Level level = new Level(); byte[][] byteArr = new byte[][] { new byte[] { 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0 }, new byte[...
2
private void setDefaultDestination(int destination) { defaultDestination = destination; if (otherPunctuationDestination == Integer.MAX_VALUE) otherPunctuationDestination = destination; if (spaceDestination == Integer.MAX_VALUE) spaceDestination = destination; if (numDestination == Integer.MAX_VALUE) num...
3
private static String convertNewLines(String text, String newLine) { if (text == null) return ""; // NOI18N if (newLine == null) return text; StringBuilder newText = new StringBuilder(); for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (c == '...
7
public synchronized void endThreadAccess() { Object requestingUser = Thread.currentThread(); if (m_oCurrentUser == null) { this.notifyAll(); } else if (m_oCurrentUser == requestingUser) { m_oCurrentUser = null; this.notifyAll(); ...
3
public Resolution newOrder() { HttpSession session = context.getRequest().getSession(); if (shippingAddressRequired) { shippingAddressRequired = false; return new ForwardResolution(SHIPPING); } else if (!isConfirmed()) { return new ForwardResolution(CONFIRM_ORDER); } else if (getOrder...
3
public static Digraph rootedInDAG(int V, int E) { if (E > (long) V*(V-1) / 2) throw new IllegalArgumentException("Too many edges"); if (E < V-1) throw new IllegalArgumentException("Too few edges"); Digraph G = new Digraph(V); SET<Edge> set = new SET<Edge>(); // fi...
7
public String toSource(String className, Instances data) throws Exception { StringBuffer result; boolean[] numeric; boolean[] nominal; String[] modes; double[] means; int i; result = new StringBuffer(); // determine what attributes were processed numeric = new ...
8
private int jjMoveStringLiteralDfa25_0(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjMoveNfa_0(0, 24); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return jjMoveNfa_0(0, 24); } switch(curChar) { case 48: return jjMoveStringLiter...
4
public void buildIndices() { if ((allIndices == null) || allIndices.isEmpty()) { return; } for (String indexName : allIndices.keySet()) { indexMap = allIndices.get(indexName); indexGlobal.setSubscriptCount(0); indexGlobal.appendSubscript(indexName)...
6
public Component getTableCellRendererComponent( JTable table, Object color, boolean isSelected, boolean hasFocus, int row, int column) { Color newColor = (Color)color; setBackground(newColor); if (isBordered) { if (isSelected) { if (selectedBorder == null) { selectedBorder = BorderFactory.cre...
4
@Override public boolean removeSpecialTile(Tile tile) { if(tile == null) return true; Iterator<Tile> it = specials.iterator(); while(it.hasNext()){ Tile next = it.next(); if(next.getName().equals(tile.getName())){ it.remove(); return true; } } return false; }
3
public void Save() throws IOException { if (!new File("levels").exists()) new File("levels").mkdir(); FileOutputStream fos = new FileOutputStream("levels/" + name + ".ggs"); GZIPOutputStream gos = new GZIPOutputStream(fos); ObjectOutputStream out = new ObjectOutputStream(gos); out.writeLong(serialVersionUI...
1
private static void copy(File f1, File f2) { try { InputStream in = new FileInputStream(f1); OutputStream out = new FileOutputStream(f2); byte[] buf = new byte[4096]; int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); ...
2
public int bufferRight(int ori) { int buff = 0; int width = getTiles()[0].length == 9 ? 3 : 4; // get width (3 or 4) of piece width = getTiles()[0].length == 4 ? 2 : width; for(int j = width-1; j >= 0; --j){ boolean tmp = true; for(int i = 0; i < width; ++i){ if(tiles[ori][i*width+j]) { tmp = fa...
6
protected void changeSelection() { ListSelectionModel model = table.getSelectionModel(); int min = model.getMinSelectionIndex(), max = model .getMaxSelectionIndex(); drawer.clearSelected(); if (min == -1) { convertPane.getAutomatonPane().repaint(); return; } for (; min <= max; min++) { if (!mod...
5
private void updateGroups() { if (user != null) { groups = new HashMap<>(); groupIdNameMap = new HashMap<>(); //get their groups ArrayList<Integer> temp = user.getGroups(); if (temp != null) { groupNames = new String[temp.size()]; ...
5
public Object getFieldValue(_Fields field) { switch (field) { case LEFT_RHINO_ID: return Long.valueOf(getLeftRhinoId()); case LEFT_TITAN_ID: return Long.valueOf(getLeftTitanId()); case RIGHT_RHINO_ID: return Long.valueOf(getRightRhinoId()); case RIGHT_TITAN_ID: return Long...
6
public void setbossoldclass(HeroClass hc) { this.oldclass = hc; }
0
public void run() { while (true) { try { String[] nextCommand; try { nextCommand = dialogue.getUserInput("Enter command:").split(" "); } catch (IOException e) { throw new SystemCommandException( "Error while reading most recent command.", e); } String commandName = nextCom...
6
public void treeNodesRemoved(TreeModelEvent e) { invalidate(); }
0
public void remove(Armor a){ switch(a.getType()){ case HEAD: armorList[0] = null; break; case SHOULDERS: armorList[1] = null; break; case BREAST: armorList[2] = null; break; case GLOVES:armorList[3] = null; break; case BELT: armorList[4] = null; break; case PANTS: armorList[5] = null; break; ...
7
public boolean equals(Object configuration) { if(configuration == this) return true; try { MealyConfiguration config = (MealyConfiguration) configuration; return super.equals(config) && myUnprocessedInput.equals(config.myUnprocessedInput) ...
4
public HUDQuickBar(HUDManager hm, Registry rg, int x, int y, int w, int h) { super(hm, rg, x, y, w, h); setImage("HUD/QuickBar/BG"); HUDArea hudArea = null; //slots int slotX = 0; for (int i = 0; i < SLOTS; i++) { slotX = SLOT_START_X + (i * SLOT_WIDTH) + (...
2
public static ctrlTaller getInstance() { if (INSTANCE == null) { creaInstancia(); } return INSTANCE; }
1
public JTextField getjTextFieldVilleCP() { return jTextFieldVilleCP; }
0
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof Lap)) { return false; } final Lap lap = (Lap) o; if (id != null ? !id.equals(lap.id) : lap.id != null) { return false; } if (rawDataSet != null ? !rawDataSet.equals(lap.rawDataSet) : lap.rawD...
6
public static <E extends Comparable<E>> void sortWithQueue(IMyQueue<E> queue) { if(queue.isEmpty()) { return; } IMyQueue<E> auxQue = new MyLinkedQueue<E>(); while(!queue.isEmpty()) { // First get current element from queue E element = queue.poll(); // Then, get current smallest item (CSI) // i...
9
public void addRequierField(String requierField) { if (this.requireFields == null) { this.requireFields = new ArrayList<String>(); this.requireFields.add(requierField); } else this.requireFields.add(requierField); }
1
@Override public int compareTo(Apple o) { if (id > o.getId()) { return 1; } else if (id == o.getId()) { return 0; } else { return -1; } }
2