text
stringlengths
14
410k
label
int32
0
9
protected Icon getIcon() { java.net.URL url = getClass().getResource("/ICON/undo2.jpg"); return new javax.swing.ImageIcon(url); }
0
public static String convertStringToHexComma(String plain, boolean appendNullSigns) { if(plain == null || plain.trim().length() == 0) return plain; StringBuffer strBuf = new StringBuffer(); for(int x = 0; x != plain.length(); x++) { if(x > 0) strBuf.append(","); strBuf.append...
5
public String toString(){ StringBuffer sb = new StringBuffer(); switch(type){ case TYPE_VALUE: sb.append("VALUE(").append(value).append(")"); break; case TYPE_LEFT_BRACE: sb.append("LEFT BRACE({)"); break; case TYPE_RIGHT_BRACE: sb.append("RIGHT BRACE(})"); break; case TYPE_LEFT_SQUARE: ...
8
@Override public int read() throws IOException { // Read buffer empty: read and decode a new base64-encoded 4-byte group if(bytesLeft==0) { int read; int nbRead = 0; while(nbRead<4) { read = in.read(); // EOF reached ...
9
boolean matchesLetter() { if (isEmpty()) return false; char c = input[pos]; return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); }
4
public void disablePlugin(CommandSender sender, String[] args) { if (args.length == 1) { sender.sendMessage(pre + red + specifyPlugin); return; } if ("all".equalsIgnoreCase(args[1]) || "*".equalsIgnoreCase(args[1])) { for (Plugin pl : Bukkit.getPluginManager...
6
public JSONObject increment(String key) throws JSONException { Object value = this.opt(key); if (value == null) { this.put(key, 1); } else if (value instanceof Integer) { this.put(key, (Integer) value + 1); } else if (value instanceof Long) { this.put(...
5
public String toString(){ String out=""; out+="name = "+name+"\n"; out+="host = "+host+"\n"; out+="minAbsolute = "; if(minAbsolute==null){ } else{ out+=minAbsolute; } out+="\n"; out+="maxAbsolute = "; if(maxAbsolute==null){ } else{ out+=maxAbsolute; } out+="\n"; out+="minRelativeToNowIn...
2
@Override public void putAll(Grid<? extends V> grid) { if (grid == null) { throw new IllegalArgumentException("Grid must nor be null"); } for (Cell<? extends V> cell : grid.cells()) { put(cell.getRow(), cell.getColumn(), cell.getValue()); } }
4
@Test public void testSendDataToServer() { System.out.println("sendDataToServer"); try { Server s = ServerImpl.initNewServer(5251); Client c = ClientImpl.initNewClient(5253); try { c.sendDataToServer(null); fail("Should have failed...
7
protected void exportDone(JComponent c, Transferable data, int action) { //Only do this if cutting, not copying if (action != MOVE) { return; } //Make sure there is a valid selection if ((p0 != null) && (p1 != null) && (p0.getOffset() != p1.getOffset())) { ...
5
public static void main(String[] args) throws Exception { InetAddress address = InetAddress.getLocalHost(); System.out.println(address); address = InetAddress.getByName("www.baidu.com"); System.out.println(address); }
0
@Override public boolean MoveLeft() { undodata.addLast(dataClone()); undoscore.addLast(scoreClone()); initFlag(); win = false; noMoreMoves = false; boolean flag = true; int count = 0; while (flag == true) { flag = false; for(int i=0; i<N; i++) { for(int j=1; j<N; j++) { if (data...
9
public void registerCommands(final Set<Command> commands) { for (final Command c : commands) { if (c.getCommandText().equals("help")) { helpCommands.put(null, (HelpCommand) c); if (c.getCommandText().startsWith("help ")) helpCommands.put(c.getCommandText().replaceFirst("help ", ""), (HelpCommand) c); ...
4
public String sample_frequency_string() { switch (h_sample_frequency) { case THIRTYTWO: if (h_version == MPEG1) return "32 kHz"; else if (h_version == MPEG2_LSF) return "16 kHz"; else // SZD return "8 kHz"; case FOURTYFOUR_POINT_ONE: if (h_version == MPEG1) return "...
9
@Override public final boolean perform(AbstractComponent performer) throws IllegalAccessException { if (!isPerformable()) { throw new IllegalAccessException("Can't perform an abstract action"); } if (isCompleted()) { // stop performing if completed return true; } if (!initialized) { if (!preAc...
7
@Override public int hashCode() { int hash = 3; hash = 89 * hash + (this.name != null ? this.name.hashCode() : 0); hash = 89 * hash + (this.password != null ? this.password.hashCode() : 0); hash = 89 * hash + Arrays.deepHashCode(this.groups); return hash; }
2
@Override public String remove(Object keyObject) { String key = (String) keyObject; Map.Entry<String,String> toRemove = null; for (Map.Entry<String, String> e : entries) { if (key == null) { if (e.getKey() == null) { toRemove = e; break; } } else if (key.equalsIgnoreCase(e.ge...
5
public static OS getPlatform() { String osName = System.getProperty("os.name").toLowerCase(); if (osName.contains("win")) { return OS.windows; } if (osName.contains("mac")) { return OS.macos; } if (osName.contains("solaris")) { return O...
6
public WallGridFactory(Grid grid) { if (grid == null) throw new IllegalArgumentException("Grid can't be null!"); this.grid = grid; }
1
@Override public void insertFilter(int index, PropertyFilter filter) throws IndexOutOfBoundsException { if (filter != null) { filters.add(index, filter); } else { throw new IllegalArgumentException("Provided PropertyFilter was null."); } }
1
public void addEdge(Vertex start, Vertex end) { adjacencyList.get(indexOf(start)).insertLast(end); }
0
@EventHandler public void WolfWeakness(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getWolfConfig().getDouble("Wolf.Weakness.Dod...
6
@Override public Success<Expression> parse(String s, int p) { StringBuilder sb = new StringBuilder(); // Read in digits until there are none left. while (Character.isDigit(s.charAt(p))) sb.append(s.charAt(p++)); // If we didn't find any digits, this ain't an int. ...
7
public int willRLookback( int optInTimePeriod ) { if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) ) optInTimePeriod = 14; else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) return -1; return (optInTimePeriod-1); }
3
public void setQuantity(Integer quantity) { this.quantity = quantity; }
0
public List<Interval> getIntervals() { List<Interval> result=new ArrayList<>(); if(treeSet.isEmpty()){ return result; } Node worker=treeSet.first(); while (worker!=null){ Interval interval=new Interval(worker.value,worker.seqNex...
2
private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 423, 144); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); textField_Integer = new JTextField(); textField_Integer.setBounds(110, 41, 99, 21); frame.getContentPane().add(textField_I...
4
@Override public void clear() { for (int i = 0; i < size; i++) { data[i] = null; } size = 0; }
1
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed imgIndicator--; jButton2.setEnabled(true); jButton4.setEnabled(true); if (imgIndicator == 0) { jButton1.setEnabled(false); jButton3.setEnabled(false); ...
1
public void saveConfig() { File folder = getDataFolder(); if (!folder.exists()) { folder.mkdir(); } File config = new File(folder, "config.cfg"); if (!config.exists()) { try { config.createNewFile(); Console.log("Created config.cfg!"); FileWriter fw = new FileWriter(config); BufferedW...
3
public Ranking(boolean needsAnswer){ items = new HashMap<Integer, String>(); hasAnswer = needsAnswer; prompt = InputHandler.getString("Enter the prompt for your Multiple Choice question:"); int numChoices = InputHandler.getInt("Enter the number of items: "); for (int i=1; i<=numChoices; i++){ String item =...
2
public void dispose() { if (tabs != null) { for (int i = 0; i < tabs.length; i++) { GraphicsTab tab = tabs[i]; tab.dispose(); } } tabs = null; if (resources != null) { for (int i = 0; i < resources.size(); i++) { if (resources.get(i) instanceof Resource) { resources.get(i).dispose(); } } } ...
6
private static void sort(Node[] src, Node[] dest, int low, int high) { int length = high - low; if (length < 7) { for (int i = low + 1; i < high; i++) for (int j = i, k = i - 1; j > low && (dest[k].weight > dest[j].weight); --j, --k) { Node t = dest[j]; dest[j] = dest[k]; ...
8
protected String getDataType() { int offset = getOffsetInDataHeaderForDataName(); int maxLength = getDataNameMaxLength(); int nameLength = 0; // skip first 0 while ( (0 != dataHeader[offset + nameLength]) && (nameLength < maxLength) ) nameLength++; ...
7
public boolean simpleAddBlock(Polyominos p) { int hauteur=p.getHauteur(); int largeur= p.getLargeur(); // boucle de parcour du tableau for (int ligne = 0; ligne <= taille; ligne++) { for (int col = 0; col <= taille; col++) { // si il y a de la place pour pose en largeur et en hauteur if (((ligne + ...
8
@Override public void actionPerformed(ActionEvent e) { Color color = display.getBackground(); int red = color.getRed(); int green = color.getGreen(); int blue = color.getBlue(); if (e.getActionCommand().equals("red")) { if (red == 0) { red = 255; } else { red = 0; } } if (e.getActionC...
6
@Override protected void printScriptContents() { int nrOfClusters = clusters.size(); for (int i = 0; i < nrOfClusters; i++) { String rgbColourSpec = getRgbColourSpec(i); List<Integer> timeSeriesIndexes = clusters.get(i).getTimeSeriesIndexes(); int nrOfElementsInCluster = timeSeriesIndexes.size(); ...
4
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
public boolean isOuter() { if (classType instanceof ClassInterfacesType) { ClassInfo clazz = ((ClassInterfacesType) classType).getClassInfo(); ClassAnalyzer ana = methodAnalyzer.getClassAnalyzer(); while (true) { if (clazz == ana.getClazz()) return true; if (ana.getParent() == null) break; ...
8
@Override protected ArrayList<PossibleTile> getLazyTiles(Board b) { King clone = this.clone(); clone.canCastle = false; ArrayList<PossibleTile> possibleTiles = new ArrayList<PossibleTile>(); ArrayList<PossibleTile> superLazyTile = new ArrayList<PossibleTile>(); superLazyTile.add(new PossibleTile(clone.getX()...
9
@Transactional @Override public String delete(Long objectId, Class clazz) { SimpleEntity object = (SimpleEntity) sessionFactory.getCurrentSession().get(clazz, objectId); //usuwam powiązania dla produktów, które odnoszą się do usuwanego typu if(clazz.equals(Type.class) && ((Type...
9
@Test public void testJoin() { Runnable r1 = new Runnable(){ @Override public void run() { assertTrue(!r1Completed && !r2Completed); try { Thread.sleep(3000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } r...
7
public void createGameTab() { JPanel drawimagepanel; JLabel downfacelabel; JPanel drawbuttonslabel; JLabel laydownlabel; JPanel discardbuttonlabel; Icon upfaceicon; gametab = new JPanel(); gametab.setPreferredSize(new Dimension(1100,800)); gametab.setLayout(new GridLayout(5,1)); drawimagepane...
9
private int calculateTeachersLectureWindowForIIIAndIV() { int penaltyPoints = 0; List<LinkedHashMap> teachersAllDay = getAllDaysTeacherTimeTable(); for (LinkedHashMap<String, LinkedHashMap> daysTimeTable : teachersAllDay) { Collection<String> teacherNames = daysTimeTable.keySet(); ...
8
public String getSourceType() { return SOURCE_TYPE; }
0
public boolean equals(Object other) { try { if(other == null) return false; if(!(other instanceof KundeDTO)) return false; KundeDTO o = (KundeDTO)other; if (o.getNr() != this.getNr()) return false; ...
6
@EventHandler public void SpiderSlow(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getSpiderConfig().getDouble("Spider.Slow.Dodge...
6
public synchronized void bestowCurses(MOB mob) { norecurse=true; try { if(numCurses()>0) { mob.location().show(this,mob,CMMsg.MSG_OK_VISUAL,L("You feel the wrath of <S-NAME> in <T-NAME>.")); if(mob.charStats().getCurrentClass().baseClass().equals("Cleric") ||(CMSecurity.isASysOp(mob))) { ...
8
public void parseFromJsonFile(File json) { try { String s = readFile(json); if(s.trim().length()!=0) { JSONObject jsonO = new JSONObject(s); if(jsonO.has("title")) { name = jsonO.getString("title"); } if(...
6
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ZState other = (ZState) obj; if (!Objects.equals(this.id, other.id)) { return false; ...
3
public void parseParams(String[] args) { if (args == null || args.length == 0) return; for (String s : args) { // split on "=" int splitIndex = s.indexOf('='); if (splitIndex < 0) throw new IllegalArgumentException( "Parameter '" + s + "' is ill-formed. It should be of the fo...
7
@Override public void display(String[] playersName) { JButton confirmButton = createButton(250, 400, "Confirm"); addListeners(confirmButton); panel.add(confirmButton); createVoteList(180, 30); panel.add(voteList); int x = 80, y = 70; for (String player : playe...
1
public Boolean balance(privAVLNode x) { if(checkBalance(x) == true) return true; int test0 = 0; int test1 = 0; if(x.getChild(0) != null) test0 = x.getChild(0).getHeight() + 1; if(x.getChild(1) != null) test1 = x.getChild(1).getHeight() + 1; int hld1; if(test0 > test1) hld1 = 0...
7
@Override public Object getValueAt(int r, int c) { TableElement te = _data.get( _filter.get(r) ); switch(c) { case 0: return te.getUniqueID(); case 1: return te.getCoords()[0]; case 2: return te.getCoords()[1]; case 3: return te.getPlateInfo()[0]; case 4: return te.getPlateInfo()[1]; case 5: retu...
7
public int divide(int dividend, int divisor) { boolean positive = true; if((dividend>0&&divisor<0)||(dividend<0&&divisor>0)) positive = false; long did,dis; did = dividend>=0?(long)dividend:-(long)dividend; dis = divisor>=0?(long)divisor:-(long)divisor; int re...
7
public static void main(String[] args) throws UnknownHostException, InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, IllegalArgumentException, InvocationTargetException{ List<TaoItem> tiList = new ArrayList<TaoItem>(); Mongo mongo = new Mongo(); for(String dbName : mo...
6
protected String escapeString(final String csvElement) { if( csvElement.isEmpty() ) { return ""; } currentColumn.delete(0, currentColumn.length()); // reusing builder object final int delimiter = preference.getDelimiterChar(); final char quote = (char) preference.getQuoteChar(); final char space = ...
8
void send(ConduitMessage msg) { try { msg.send(mClientOutput); } catch (Exception exception) { shutdown(); } }
1
protected Duration restReduced() { Duration gap = lastWeekRest(); if (gap.isShorterThan(Rest.NORMAL.getValue())) { return null; } return Utils.safeMinus(Rest.REDUCED.getValue(), intervals.lastGap()); }
1
protected TableModel createModel(Transition transition) { final MooreTransition t = (MooreTransition) transition; return new AbstractTableModel() { String s[] = new String[] {t.getLabel()}; public Object getValueAt(int r, int c) {return s[c];} ...
0
public Region get(int x,int z){ int i = 0; while(i < regions.size()){ if(regions.get(i).getX()==x&&regions.get(i).getZ()==z)return regions.get(i); i++; } return null; }
3
@Override public boolean execute(MOB mob, List<String> commands, int metaFlags) throws java.io.IOException { String parm = (commands.size() > 1) ? CMParms.combine(commands,1) : ""; if((!mob.isAttributeSet(MOB.Attrib.AUTOGOLD) && (parm.length()==0))||(parm.equalsIgnoreCase("ON"))) { mob.setAttribute(MOB.At...
8
public int candy(int[] ratings) { int n = ratings.length; if(n==0) return 0; if(n==1) return 1; int[] candys = new int[n]; if(ratings[0]<=ratings[1]) candys[0] = 1; if(ratings[n-1]<=ratings[n-2]) candys[n-1] = 1; for(int i=1; i<n;i++){ ...
8
private boolean bruteForceSolver(int index) { boolean solvable = false; NakedCandidates candidate = nakeds.get(index); for (int i=0; i < candidate.values.size() && !solvable; i++) { if (!board.duplicateEntryColumn(candidate.y, candidate.values.get(i)) && !board.duplicateEntryRow(candidate.x, candi...
7
public String getEntitySystemId(String ename) { Object entity[] = (Object[]) entityInfo.get(ename); if (entity == null) { return null; } else { return (String) entity[2]; } }
1
private static void moveChars(int len){ String str = "abcdefg"; char[] sa = str.toCharArray(); char s; if(len > 0){ //拆为两部分,分别反转,然后再整体反转,表现为左移 for (int i = 0; i < len >> 1; i++ ) { s = sa[i]; sa[i] = sa[len -i - 1]; ...
7
public void run(){ try { while(true){ rcv(); } } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }
2
public MouseHandler()//Check again later { cX = Game.fieldWidth + Game.xOff; cY = Game.fieldWidth + Game.yOff; }
0
public void getChunkByOff(long off) { //TODO int[] rpos = new int[vsize.length]; long toff = off; for (int i = vsize.length -1 ; i >=0 ; i--) { rpos[i] =(int)toff % vsize[i]; toff /= vsize[i]; } int cnum = 0; int ichunk = 0; for (int i = 0 ; i < vsize.length ; i++) { cnum = cnum *(( vsize...
4
public URL getURL() throws NotFoundException { URL url = classPool.find(getName()); if (url == null) throw new NotFoundException(getName()); else return url; }
1
@Override protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { DatabaseManager manager=DatabaseManager.getManager(); try { Room room = manager.getRoomDao().queryForId( Integer.parseInt(request.getParameter(ID))); String title=request.getPara...
5
private boolean versionCheck(String title) { if(type != UpdateType.NO_VERSION_CHECK) { String version = plugin.getDescription().getVersion(); if(title.split(" v").length == 2) { String remoteVersion = title.split(" v")[1].split(" ")[0]; // Get the ...
6
public void move(Direction dir) { if(dir == null) return; if(dir.equals(Direction.North)) { y--; last = Direction.North; visited.add(new Location(x , y)); } else if(dir.equals(Direction.East)) { x++; last = Direction.East; visited.add(new Location(x , y)); } else if(dir.equals(Dire...
5
private void rectangleSelectHandler(Page currentPage, Point mouseLocation) { // detect L->R or R->L if (currentPage != null && currentPage.isInitiated()) { // get page text PageText pageText = currentPage.getViewText(); if (pageText != null) { ...
9
@Override public void execute() { if (Game.getClientState() != Game.INDEX_MAP_LOADED) { AIOsmelter.stop = 1000; } if (Game.getClientState() == Game.INDEX_MAP_LOADED && AIOsmelter.stop == 1000) { AIOsmelter.stop = 50; } if (AIOsmelter.client != Bot.client()) { WidgetCache.purge(); Bot.context(...
8
private void spinner_x2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinner_x2StateChanged if(hitbox_index_selected!=-1 || click_target_flag) { click_target_flag=true; if(hitbox_index_selected!=-1) { int i=0; for(Node hitboxes_node=current_fr...
9
public HeroSlot() { // create slot with all basic at first hero = CharacterFactory.create().buyCharacter(Constants.CHARACTER_DEFAULT); weaponSlot = new WeaponSlots(); headArmorSlot = new HeadArmorSlots(); bodyArmorSlot = new BodyArmorSlots(); }
0
public int GetAverageNumberOfPersons() { return averageNumberOfPersons; }
0
@Override public void write(Writer writer) throws IOException { writer.write('['); Iterator<JSONValue> it = values.iterator(); while (it.hasNext()) { it.next().write(writer); if (it.hasNext()) { writer.write(", "); } } writer.write(']'); }
2
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OpenBitSet)) return false; OpenBitSet a; OpenBitSet b = (OpenBitSet)o; // make a the larger set. if (b.wlen > this.wlen) { a = b; b=this; } else { a=this; } // check for any set ...
7
private int ROMSize() { if (addressMax <= 24576) return 24576; // The amount needed is less than/equal to 24K, return 24K int size = 24576; // Start off w/ 24KB addressMax -= 24576; // Remove 24KB from the overall size while (addressMax > 0) { addressMax -= 8192; // Iterate ...
2
public static Performance createNew(Connection con, int userID, int phrase) { Performance perf = null; try { PreparedStatement ps = con.prepareStatement( "INSERT INTO " + tableInfo.tableName + " (UserID, Phrase, Success, RevSuccess, LastSuccess, RevLastSuccess , LastFail, RevLastFail) VALUES (?, ?, ...
2
public Point[] simplifiedCurve(){ if(!this.simplifyDone){ if(!this.tolerenceEntered){ throw new IllegalArgumentException("No tolerance has been entered"); } else{ this.douglasPeucker(); } } return this.simplifiedPoin...
2
public void setjTextAreaBilan(JTextArea jTextAreaBilan) { this.jTextAreaBilan = jTextAreaBilan; }
0
public void test_append_nullParser() { try { DateTimeFormatterBuilder bld2 = new DateTimeFormatterBuilder(); bld2.append((DateTimeParser) null); fail(); } catch (IllegalArgumentException ex) { // expected } }
1
protected static Level getLog4jLevel(final int level) { switch(level) { case SyslogConstants.LEVEL_DEBUG: return Level.DEBUG; case SyslogConstants.LEVEL_INFO: return Level.INFO; case SyslogConstants.LEVEL_NOTICE: return Level.INFO; case SyslogConstants.LEVEL_WARN: return Level.WARN; case SyslogConstants...
8
private boolean isMyTurn() { return myColor.isPresent() && myColor.get() == turnOfColor; }
1
public void setK(float k) { this.k = k; }
0
public boolean posnEquals(Point p1, Point p2) { return p1.x == p2.x && p1.y == p2.y; }
1
public void addGtfsData(List<Object> data){ if(fields==null || data==null) return; if(fields.size()!=data.size()) return; CoordSystemPointConversion conversion = new CoordSystemPointConversion("PROJCS[\"Albers Conical Equal Area [Florida Geographic Data Library]\"," + "GEOGCS[\"GCS_North_American_1...
5
public Matrix4f InitIdentity() { for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (i == j) matrix[i][j] = 1; else matrix[i][j] = 0; return this; }
3
public String getId() { return id; }
0
protected int getMaxSizeX(final JComponent[] components) { int max = 0; for (final JComponent component : components) { final Dimension dimension = component.getMaximumSize(); if (dimension != null) { if ((dimension.width > max) && (dimension.width != Integer.MAX_VALUE)) { max = dimension.wid...
4
public void acquirePowerUp(PowerUp powerUp) { // remove it from the map map.removeSprite(powerUp); if (powerUp instanceof PowerUp.Star) { // do something here, like give the player points score += 50; municiones += 1; soundManager.play(prizeSound)...
3
public EdgeReorderer(ArrayList<Edge> origEdges, Class criterion) { if (criterion != Vertex.class && criterion != Site.class) { throw new Error("Edges: criterion must be Vertex or Site"); } _edges = new ArrayList(); _edgeOrientations = new ArrayList(); if (origEdges.si...
3
public void testGetPeriodConverter() { PeriodConverter c = ConverterManager.getInstance().getPeriodConverter(new Period(1, 2, 3, 4, 5, 6, 7, 8)); assertEquals(ReadablePeriod.class, c.getSupportedType()); c = ConverterManager.getInstance().getPeriodConverter(new Duration(123L)); ...
1
public AnimState getCurrentState() { AnimState ret = new AnimState(); for (AnimMultipleLine line : lines) { AnimState state = line.getCurrentState(); if (line.myPos) ret.pos = state.pos; if (line.myColor) ret.color = state.color; if (line.myAngle) ret.angle = state.angle; if (line.myScale) { ret....
5
public ServerConnectionHandler(Socket sock, DtoExtractor dtoExtractor) { this.localSock = sock; this.dtoExtractor = dtoExtractor; }
0
public byte[] getEraseSequence(int eraseFunc) { byte[] sequence = null; switch (eraseFunc) { case TerminalIO.EEOL: sequence = new byte[3]; sequence[0] = ESC; sequence[1] = LSB; sequence[2] = LE; break; ...
6