List of usage examples for org.apache.commons.lang3 StringUtils isNumeric
public static boolean isNumeric(final CharSequence cs)
Checks if the CharSequence contains only Unicode digits.
From source file:com.glaf.dts.util.XmlReader.java
protected void readField(Element elem, ColumnDefinition field) { List<?> attrs = elem.attributes(); if (attrs != null && !attrs.isEmpty()) { Map<String, Object> dataMap = new java.util.HashMap<String, Object>(); Iterator<?> iter = attrs.iterator(); while (iter.hasNext()) { Attribute attr = (Attribute) iter.next(); dataMap.put(attr.getName(), attr.getStringValue()); field.addProperty(attr.getName(), attr.getStringValue()); }/*ww w. jav a 2s . c om*/ Tools.populate(field, dataMap); } field.setName(elem.attributeValue("name")); field.setType(elem.attributeValue("type")); field.setColumnName(elem.attributeValue("column")); field.setTitle(elem.attributeValue("title")); field.setValueExpression(elem.attributeValue("valueExpression")); /** * */ if ("true".equals(elem.attributeValue("required"))) { field.setRequired(true); } String length = elem.attributeValue("length"); if (StringUtils.isNotEmpty(length) && StringUtils.isNumeric(length)) { field.setLength(Integer.parseInt(length)); } String nullable = elem.attributeValue("nullable"); if (StringUtils.isNotEmpty(nullable)) { if (StringUtils.equalsIgnoreCase(nullable, "true")) { field.setNullable(true); field.setNullableField("true"); } else { field.setNullable(false); field.setNullableField("false"); } } String position = elem.attributeValue("position"); if (StringUtils.isNotEmpty(position) && StringUtils.isNumeric(position)) { field.setPosition(Integer.parseInt(position)); } String precision = elem.attributeValue("precision"); if (StringUtils.isNotEmpty(precision) && StringUtils.isNumeric(precision)) { field.setPrecision(Integer.parseInt(precision)); } }
From source file:forge.game.staticability.StaticAbilityContinuous.java
/** * Apply the effects of a static ability that apply in a particular layer to * a predefined set of cards.//from ww w . j ava 2 s . c o m * * @param stAb * a {@link StaticAbility}. * @param affectedCards * a {@link CardCollectionView} of cards that are to be affected. * @param layer * the {@link StaticAbilityLayer} of effects to apply. * @return a {@link CardCollectionView} of cards that have been affected, * identical to {@code affectedCards}. */ public static CardCollectionView applyContinuousAbility(final StaticAbility stAb, final CardCollectionView affectedCards, final StaticAbilityLayer layer) { final Map<String, String> params = stAb.getMapParams(); final Card hostCard = stAb.getHostCard(); final Player controller = hostCard.getController(); final List<Player> affectedPlayers = StaticAbilityContinuous.getAffectedPlayers(stAb); final Game game = hostCard.getGame(); final StaticEffect se = game.getStaticEffects().getStaticEffect(stAb); se.setAffectedCards(affectedCards); se.setAffectedPlayers(affectedPlayers); se.setParams(params); se.setTimestamp(hostCard.getTimestamp()); String changeColorWordsTo = null; String addP = ""; int powerBonus = 0; String addT = ""; int toughnessBonus = 0; String setP = ""; int setPower = -1; String setT = ""; int setToughness = -1; int keywordMultiplier = 1; String[] addKeywords = null; String[] addHiddenKeywords = null; String[] removeKeywords = null; String[] addAbilities = null; String[] addReplacements = null; String[] addSVars = null; String[] addTypes = null; String[] removeTypes = null; String addColors = null; String[] addTriggers = null; String[] addStatics = null; List<SpellAbility> addFullAbs = null; boolean removeAllAbilities = false; boolean removeSuperTypes = false; boolean removeCardTypes = false; boolean removeSubTypes = false; boolean removeCreatureTypes = false; boolean controllerMayLookAt = false; boolean controllerMayPlay = false, mayPlayWithoutManaCost = false, mayPlayIgnoreColor = false; //Global rules changes if (layer == StaticAbilityLayer.RULES && params.containsKey("GlobalRule")) { final StaticEffects effects = game.getStaticEffects(); effects.setGlobalRuleChange(GlobalRuleChange.fromString(params.get("GlobalRule"))); } if (layer == StaticAbilityLayer.TEXT && params.containsKey("ChangeColorWordsTo")) { changeColorWordsTo = params.get("ChangeColorWordsTo"); } if (layer == StaticAbilityLayer.SETPT && params.containsKey("SetPower")) { setP = params.get("SetPower"); setPower = AbilityUtils.calculateAmount(hostCard, setP, stAb); } if (layer == StaticAbilityLayer.SETPT && params.containsKey("SetToughness")) { setT = params.get("SetToughness"); setToughness = AbilityUtils.calculateAmount(hostCard, setT, stAb); } if (layer == StaticAbilityLayer.MODIFYPT && params.containsKey("AddPower")) { addP = params.get("AddPower"); powerBonus = AbilityUtils.calculateAmount(hostCard, addP, stAb); if (!StringUtils.isNumeric(addP) && !addP.equals("AffectedX")) { se.setXValue(powerBonus); } } if (layer == StaticAbilityLayer.MODIFYPT && params.containsKey("AddToughness")) { addT = params.get("AddToughness"); toughnessBonus = AbilityUtils.calculateAmount(hostCard, addT, stAb); if (!StringUtils.isNumeric(addT) && !addT.equals("AffectedX")) { se.setYValue(toughnessBonus); } } if (layer == StaticAbilityLayer.ABILITIES2 && params.containsKey("KeywordMultiplier")) { final String multiplier = params.get("KeywordMultiplier"); if (multiplier.equals("X")) { se.setXValue(AbilityUtils.calculateAmount(hostCard, "X", stAb)); } else { keywordMultiplier = Integer.valueOf(multiplier); } } if (layer == StaticAbilityLayer.ABILITIES2 && params.containsKey("AddKeyword")) { addKeywords = params.get("AddKeyword").split(" & "); final Iterable<String> chosencolors = hostCard.getChosenColors(); for (final String color : chosencolors) { for (int w = 0; w < addKeywords.length; w++) { addKeywords[w] = addKeywords[w].replaceAll("ChosenColor", color.substring(0, 1).toUpperCase().concat(color.substring(1, color.length()))); } } final String chosenType = hostCard.getChosenType(); for (int w = 0; w < addKeywords.length; w++) { addKeywords[w] = addKeywords[w].replaceAll("ChosenType", chosenType); } final String chosenName = hostCard.getNamedCard(); final String hostCardUID = Integer.toString(hostCard.getId()); // Protection with "doesn't remove" effect for (int w = 0; w < addKeywords.length; w++) { if (addKeywords[w].startsWith("Protection:")) { addKeywords[w] = addKeywords[w].replaceAll("ChosenName", "Card.named" + chosenName) .replace("HostCardUID", hostCardUID); } } if (params.containsKey("SharedKeywordsZone")) { List<ZoneType> zones = ZoneType.listValueOf(params.get("SharedKeywordsZone")); String[] restrictions = params.containsKey("SharedRestrictions") ? params.get("SharedRestrictions").split(",") : new String[] { "Card" }; List<String> kw = CardFactoryUtil.sharedKeywords(addKeywords, restrictions, zones, hostCard); addKeywords = kw.toArray(new String[kw.size()]); } } if (layer == StaticAbilityLayer.RULES && params.containsKey("AddHiddenKeyword")) { addHiddenKeywords = params.get("AddHiddenKeyword").split(" & "); } if (layer == StaticAbilityLayer.ABILITIES2 && params.containsKey("RemoveKeyword")) { removeKeywords = params.get("RemoveKeyword").split(" & "); } if (layer == StaticAbilityLayer.ABILITIES1 && params.containsKey("RemoveAllAbilities")) { removeAllAbilities = true; } if (layer == StaticAbilityLayer.ABILITIES2 && params.containsKey("AddAbility")) { final String[] sVars = params.get("AddAbility").split(" & "); for (int i = 0; i < sVars.length; i++) { sVars[i] = hostCard.getSVar(sVars[i]); } addAbilities = sVars; } if (layer == StaticAbilityLayer.ABILITIES2 && params.containsKey("AddReplacementEffects")) { final String[] sVars = params.get("AddReplacementEffects").split(" & "); for (int i = 0; i < sVars.length; i++) { sVars[i] = hostCard.getSVar(sVars[i]); } addReplacements = sVars; } if (layer == StaticAbilityLayer.ABILITIES2 && params.containsKey("AddSVar")) { addSVars = params.get("AddSVar").split(" & "); } if (layer == StaticAbilityLayer.TYPE && params.containsKey("AddType")) { addTypes = params.get("AddType").split(" & "); if (addTypes[0].equals("ChosenType")) { final String chosenType = hostCard.getChosenType(); addTypes[0] = chosenType; se.setChosenType(chosenType); } else if (addTypes[0].equals("ImprintedCreatureType")) { if (hostCard.hasImprintedCard()) { final Set<String> imprinted = hostCard.getImprintedCards().getFirst().getType() .getCreatureTypes(); addTypes = imprinted.toArray(new String[imprinted.size()]); } } } if (layer == StaticAbilityLayer.TYPE && params.containsKey("RemoveType")) { removeTypes = params.get("RemoveType").split(" & "); if (removeTypes[0].equals("ChosenType")) { final String chosenType = hostCard.getChosenType(); removeTypes[0] = chosenType; se.setChosenType(chosenType); } } if (layer == StaticAbilityLayer.TYPE) { if (params.containsKey("RemoveSuperTypes")) { removeSuperTypes = true; } if (params.containsKey("RemoveCardTypes")) { removeCardTypes = true; } if (params.containsKey("RemoveSubTypes")) { removeSubTypes = true; } if (params.containsKey("RemoveCreatureTypes")) { removeCreatureTypes = true; } } if (layer == StaticAbilityLayer.COLOR) { if (params.containsKey("AddColor")) { final String colors = params.get("AddColor"); if (colors.equals("ChosenColor")) { addColors = CardUtil.getShortColorsString(hostCard.getChosenColors()); } else { addColors = CardUtil .getShortColorsString(new ArrayList<String>(Arrays.asList(colors.split(" & ")))); } } if (params.containsKey("SetColor")) { final String colors = params.get("SetColor"); if (colors.equals("ChosenColor")) { addColors = CardUtil.getShortColorsString(hostCard.getChosenColors()); } else { addColors = CardUtil .getShortColorsString(new ArrayList<String>(Arrays.asList(colors.split(" & ")))); } se.setOverwriteColors(true); } } if (layer == StaticAbilityLayer.ABILITIES2) { if (params.containsKey("AddTrigger")) { final String[] sVars = params.get("AddTrigger").split(" & "); for (int i = 0; i < sVars.length; i++) { sVars[i] = hostCard.getSVar(sVars[i]); } addTriggers = sVars; } if (params.containsKey("AddStaticAbility")) { final String[] sVars = params.get("AddStaticAbility").split(" & "); for (int i = 0; i < sVars.length; i++) { sVars[i] = hostCard.getSVar(sVars[i]); } addStatics = sVars; } } if (layer == StaticAbilityLayer.ABILITIES1 && params.containsKey("GainsAbilitiesOf")) { final String[] valids = params.get("GainsAbilitiesOf").split(","); List<ZoneType> validZones = new ArrayList<ZoneType>(); validZones.add(ZoneType.Battlefield); if (params.containsKey("GainsAbilitiesOfZones")) { validZones.clear(); for (String s : params.get("GainsAbilitiesOfZones").split(",")) { validZones.add(ZoneType.smartValueOf(s)); } } CardCollectionView cardsIGainedAbilitiesFrom = game.getCardsIn(validZones); cardsIGainedAbilitiesFrom = CardLists.getValidCards(cardsIGainedAbilitiesFrom, valids, hostCard.getController(), hostCard); if (cardsIGainedAbilitiesFrom.size() > 0) { addFullAbs = new ArrayList<SpellAbility>(); for (Card c : cardsIGainedAbilitiesFrom) { for (SpellAbility sa : c.getSpellAbilities()) { if (sa instanceof AbilityActivated) { SpellAbility newSA = ((AbilityActivated) sa).getCopy(); newSA.setIntrinsic(false); newSA.setTemporary(true); CardFactoryUtil.correctAbilityChainSourceCard(newSA, hostCard); addFullAbs.add(newSA); } } } } } if (layer == StaticAbilityLayer.RULES) { // These fall under Rule changes, as they don't fit any other category if (params.containsKey("MayLookAt")) { controllerMayLookAt = true; } if (params.containsKey("MayPlay")) { controllerMayPlay = true; if (params.containsKey("MayPlayWithoutManaCost")) { mayPlayWithoutManaCost = true; } else if (params.containsKey("MayPlayIgnoreColor")) { mayPlayIgnoreColor = true; } } if (params.containsKey("IgnoreEffectCost")) { String cost = params.get("IgnoreEffectCost"); buildIgnorEffectAbility(stAb, cost, affectedPlayers, affectedCards); } } // modify players for (final Player p : affectedPlayers) { // add keywords if (addKeywords != null) { for (int i = 0; i < keywordMultiplier; i++) { p.addChangedKeywords(addKeywords, removeKeywords == null ? new String[0] : removeKeywords, se.getTimestamp()); } } if (layer == StaticAbilityLayer.RULES) { if (params.containsKey("SetMaxHandSize")) { String mhs = params.get("SetMaxHandSize"); if (mhs.equals("Unlimited")) { p.setUnlimitedHandSize(true); } else { int max = AbilityUtils.calculateAmount(hostCard, mhs, stAb); p.setMaxHandSize(max); } } if (params.containsKey("RaiseMaxHandSize")) { String rmhs = params.get("RaiseMaxHandSize"); int rmax = AbilityUtils.calculateAmount(hostCard, rmhs, stAb); p.setMaxHandSize(p.getMaxHandSize() + rmax); } if (params.containsKey("ManaColorConversion")) { AbilityUtils.applyManaColorConversion(p, params); } } } // start modifying the cards for (int i = 0; i < affectedCards.size(); i++) { final Card affectedCard = affectedCards.get(i); // Gain control if (layer == StaticAbilityLayer.CONTROL && params.containsKey("GainControl")) { affectedCard.addTempController(hostCard.getController(), hostCard.getTimestamp()); } // Change color words if (changeColorWordsTo != null) { final byte color; if (changeColorWordsTo.equals("ChosenColor")) { if (hostCard.hasChosenColor()) { color = MagicColor.fromName(Iterables.getFirst(hostCard.getChosenColors(), null)); } else { color = 0; } } else { color = MagicColor.fromName(changeColorWordsTo); } if (color != 0) { final String colorName = MagicColor.toLongString(color); affectedCard.addChangedTextColorWord("Any", colorName, se.getTimestamp()); } } // set P/T if (layer == StaticAbilityLayer.SETPT) { if (params.containsKey("CharacteristicDefining")) { if (setPower != -1) { affectedCard.setBasePower(setPower); } if (setToughness != -1) { affectedCard.setBaseToughness(setToughness); } } else if ((setPower != -1) || (setToughness != -1)) { // non CharacteristicDefining if (setP.startsWith("AffectedX")) { setPower = CardFactoryUtil.xCount(affectedCard, AbilityUtils.getSVar(stAb, setP)); } if (setT.startsWith("AffectedX")) { setToughness = CardFactoryUtil.xCount(affectedCard, AbilityUtils.getSVar(stAb, setT)); } affectedCard.addNewPT(setPower, setToughness, hostCard.getTimestamp()); } } // add P/T bonus if (layer == StaticAbilityLayer.MODIFYPT) { if (addP.startsWith("AffectedX")) { powerBonus = CardFactoryUtil.xCount(affectedCard, AbilityUtils.getSVar(stAb, addP)); se.addXMapValue(affectedCard, powerBonus); } if (addT.startsWith("AffectedX")) { toughnessBonus = CardFactoryUtil.xCount(affectedCard, AbilityUtils.getSVar(stAb, addT)); se.addXMapValue(affectedCard, toughnessBonus); } affectedCard.addSemiPermanentPowerBoost(powerBonus); affectedCard.addSemiPermanentToughnessBoost(toughnessBonus); } // add keywords // TODO regular keywords currently don't try to use keyword multiplier // (Although nothing uses it at this time) if ((addKeywords != null) || (removeKeywords != null) || removeAllAbilities) { affectedCard.addChangedCardKeywords(addKeywords, removeKeywords, removeAllAbilities, hostCard.getTimestamp()); } // add HIDDEN keywords if (addHiddenKeywords != null) { for (final String k : addHiddenKeywords) { for (int j = 0; j < keywordMultiplier; j++) { affectedCard.addHiddenExtrinsicKeyword(k); } } } // add SVars if (addSVars != null) { for (final String sVar : addSVars) { String actualSVar = hostCard.getSVar(sVar); String name = sVar; if (actualSVar.startsWith("SVar:")) { actualSVar = actualSVar.split("SVar:")[1]; name = actualSVar.split(":")[0]; actualSVar = actualSVar.split(":")[1]; } affectedCard.setSVar(name, actualSVar); } } if (addFullAbs != null) { for (final SpellAbility ab : addFullAbs) { affectedCard.addSpellAbility(ab); } } // add abilities if (addAbilities != null) { for (String abilty : addAbilities) { if (abilty.contains("CardManaCost")) { StringBuilder sb = new StringBuilder(); int generic = affectedCard.getManaCost().getGenericCost(); if (generic > 0) { sb.append(generic); } for (ManaCostShard s : affectedCard.getManaCost()) { ColorSet cs = ColorSet.fromMask(s.getColorMask()); if (cs.isColorless()) continue; sb.append(' '); sb.append(s); } abilty = abilty.replace("CardManaCost", sb.toString().trim()); } else if (abilty.contains("ConvertedManaCost")) { final String costcmc = Integer.toString(affectedCard.getCMC()); abilty = abilty.replace("ConvertedManaCost", costcmc); } if (abilty.startsWith("AB") || abilty.startsWith("ST")) { // grant the ability final SpellAbility sa = AbilityFactory.getAbility(abilty, affectedCard); sa.setTemporary(true); sa.setIntrinsic(false); sa.setOriginalHost(hostCard); affectedCard.addSpellAbility(sa); } } } // add Replacement effects if (addReplacements != null) { for (String rep : addReplacements) { final ReplacementEffect actualRep = ReplacementHandler.parseReplacement(rep, affectedCard, false); actualRep.setIntrinsic(false); affectedCard.addReplacementEffect(actualRep).setTemporary(true); ; } } // add Types if ((addTypes != null) || (removeTypes != null)) { affectedCard.addChangedCardTypes(addTypes, removeTypes, removeSuperTypes, removeCardTypes, removeSubTypes, removeCreatureTypes, hostCard.getTimestamp()); } // add colors if (addColors != null) { affectedCard.addColor(addColors, !se.isOverwriteColors(), hostCard.getTimestamp()); } // add triggers if (addTriggers != null) { for (final String trigger : addTriggers) { final Trigger actualTrigger = TriggerHandler.parseTrigger(trigger, affectedCard, false); actualTrigger.setIntrinsic(false); affectedCard.addTrigger(actualTrigger).setTemporary(true); } } // add static abilities if (addStatics != null) { for (String s : addStatics) { if (s.contains("ConvertedManaCost")) { final String costcmc = Integer.toString(affectedCard.getCMC()); s = s.replace("ConvertedManaCost", costcmc); } StaticAbility stat = affectedCard.addStaticAbility(s); stat.setTemporary(true); stat.setIntrinsic(false); } } // remove triggers if ((layer == StaticAbilityLayer.ABILITIES2 && (params.containsKey("RemoveTriggers")) || removeAllAbilities)) { for (final Trigger trigger : affectedCard.getTriggers()) { trigger.setTemporarilySuppressed(true); } } // remove activated and static abilities if (removeAllAbilities) { for (final SpellAbility ab : affectedCard.getSpellAbilities()) { ab.setTemporarilySuppressed(true); } for (final StaticAbility stA : affectedCard.getStaticAbilities()) { stA.setTemporarilySuppressed(true); } for (final ReplacementEffect rE : affectedCard.getReplacementEffects()) { rE.setTemporarilySuppressed(true); } } if (controllerMayLookAt) { affectedCard.setMayLookAt(controller, true); } if (controllerMayPlay) { affectedCard.setMayPlay(controller, mayPlayWithoutManaCost, mayPlayIgnoreColor); } affectedCard.updateStateForView(); } return affectedCards; }
From source file:com.moviejukebox.plugin.poster.MovieDbPosterPlugin.java
private String getId(Identifiable ident) { String response = Movie.UNKNOWN; if (ident != null) { String imdbID = ident.getId(TheMovieDbPlugin.IMDB_PLUGIN_ID); String tmdbID = ident.getId(TheMovieDbPlugin.TMDB_PLUGIN_ID); // First look to see if we have a TMDb ID as this will make looking the film up easier if (StringTools.isValidString(tmdbID)) { response = tmdbID;/* w w w. j a v a2s .co m*/ } else if (StringTools.isValidString(imdbID)) { // Search based on IMDb ID MovieInfo moviedb; try { moviedb = tmdb.getMovieInfoImdb(imdbID, languageCode); } catch (MovieDbException ex) { LOG.warn("Failed to get TMDB ID for {} - {}", imdbID, ex.getMessage()); return response; } if (moviedb != null) { tmdbID = String.valueOf(moviedb.getId()); if (StringUtils.isNumeric(tmdbID)) { response = tmdbID; } else { LOG.info("No TMDb ID found for movie!"); } } } } return response; }
From source file:com.moviejukebox.model.Codec.java
public void setCodecChannels(String codecChannels) { if (StringUtils.isNumeric(codecChannels)) { this.codecChannels = Integer.parseInt(codecChannels); }// w w w . j a va 2s .co m }
From source file:de.serverfrog.pw.ui.MainViewController.java
/** * * @param event event//from w ww .j a v a 2 s . co m */ @FXML public void onPasswordLengthKeyTyped(KeyEvent event) { if (!StringUtils.isNumeric(event.getCharacter())) { event.consume(); } }
From source file:com.hortonworks.streamline.streams.security.service.SecurityCatalogResource.java
@POST @Path("/roles/{roleNameOrId}/users") @Timed// ww w .ja v a 2 s.c o m public Response addRoleUsers(@PathParam("roleNameOrId") String roleNameOrId, Set<String> userNamesOrIds, @Context SecurityContext securityContext) { SecurityUtil.checkRole(authorizer, securityContext, ROLE_SECURITY_ADMIN); Long roleId = StringUtils.isNumeric(roleNameOrId) ? Long.parseLong(roleNameOrId) : getIdFromRoleName(roleNameOrId); Set<Long> userIds = new HashSet<>(); for (String userNameOrId : userNamesOrIds) { if (StringUtils.isNumeric(userNameOrId)) { userIds.add(Long.parseLong(userNameOrId)); } else { userIds.add(catalogService.getUser(userNameOrId).getId()); } } return addRoleUsers(roleId, userIds); }
From source file:com.qcadoo.view.api.utils.NumberGeneratorService.java
private Collection<Long> extractNumericValues(final Iterable<Entity> numberProjections) { List<Long> numericValues = Lists.newArrayList(); for (Entity projection : numberProjections) { String numberFieldValue = projection.getStringField(NumberGeneratorModelHelper.NUM_PROJECTION_ALIAS); if (StringUtils.isNumeric(numberFieldValue)) { numericValues.add(Long.valueOf(numberFieldValue)); }//from w w w . j a v a2 s . com } return numericValues; }
From source file:gov.nih.nci.caintegrator.web.action.query.ManageQueryAction.java
/** * {@inheritDoc}/*from w w w . j ava 2s .c om*/ */ @Override public boolean acceptableParameterName(String parameterName) { boolean retVal = true; if (parameterName != null) { if (parameterName.startsWith("d-")) { retVal = false; if (parameterName.endsWith("-e")) { setExport(true); } } else if (StringUtils.isNumeric(parameterName.substring(0, 1))) { retVal = false; } } return retVal; }
From source file:com.bekwam.examples.javafx.oldscores.ScoresDialogController.java
@FXML public void updateMath1995() { if (logger.isDebugEnabled()) { logger.debug("[UPD 1995]"); }//from w w w . j a va 2s . c o m if (dao == null) { throw new IllegalArgumentException( "dao has not been set; call setRecenteredDAO() before calling this method"); } String recenteredScore_s = txtMathScoreRecentered.getText(); if (StringUtils.isNumeric(recenteredScore_s)) { Integer scoreRecentered = NumberUtils.toInt(recenteredScore_s); if (withinRange(scoreRecentered)) { if (needsRound(scoreRecentered)) { scoreRecentered = round(scoreRecentered); txtMathScoreRecentered.setText(String.valueOf(scoreRecentered)); } resetErrMsgs(); Integer score1995 = dao.lookup1995VerbalScore(scoreRecentered); txtMathScore1995.setText(String.valueOf(score1995)); } else { errMsgMathRecentered.setVisible(true); } } else { errMsgMathRecentered.setVisible(true); } }
From source file:com.nuvolect.securesuite.data.SqlIncSync.java
/** * Return text string with the last time the device was updated as an incoming companion. * @return/*w w w. ja v a 2 s . c om*/ */ public String getIncomingUpdate() { /** * Previous versions saved an entire formatted time, current only stores time * as a String long. It formatted for use on demand. */ String s = Cryp.get(CConst.LAST_INCOMING_UPDATE, "0"); if (StringUtils.isNumeric(s)) { String time = TimeUtil.friendlyTimeMDYM(Long.valueOf(s)); s = "Incoming update: " + time; } return s; }