• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java StringUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.dsh105.commodus.StringUtil的典型用法代码示例。如果您正苦于以下问题:Java StringUtil类的具体用法?Java StringUtil怎么用?Java StringUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StringUtil类属于com.dsh105.commodus包,在下文中一共展示了StringUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getPromptText

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
public String getPromptText(ConversationContext context) {
    String name = (String) context.getSessionData("name");
    boolean success = this.pet.setPetName(name, false);
    if (success) {
        return this.admin ? Lang.ADMIN_NAME_PET.toString()
                .replace("%player%", this.pet.getNameOfOwner())
                .replace("%type%", StringUtil.capitalise(this.pet.getPetType().toString().replace("_", " ")))
                .replace("%name%", name)

                : Lang.NAME_PET.toString()
                .replace("%type%", StringUtil.capitalise(this.pet.getPetType().toString().replace("_", " ")))
                .replace("%name%", name);
    } else {
        return Lang.NAME_NOT_ALLOWED.toString().replace("%name%", name);
    }
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:18,代码来源:NameSuccessPrompt.java


示例2: setRider

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
public void setRider(IPet newRider){
	if(!isSpawned()) return;
	if(!EchoPet.getOptions().allowRidersFor(this.getPetType())){
		Lang.sendTo(this.getOwner(), Lang.RIDERS_DISABLED.toString().replace("%type%", StringUtil.capitalise(this.getPetType().toString())));
		return;
	}
	if(this.isOwnerRiding()){
		this.ownerRidePet(false);
	}
	if(this.rider != null){
		this.removeRider(true, true);
	}
	if(!newRider.isSpawned()) newRider.spawnPet(getOwner(), false);
	this.rider = (Pet) newRider;
	this.rider.setRider();
	EchoPet.getPlugin().getSpawnUtil().setPassenger(0, getCraftPet(), this.rider.getCraftPet());
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:18,代码来源:Pet.java


示例3: createPet

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
  public IPet createPet(Player owner, PetType petType, PetType riderType) {
      if (ReflectionUtil.BUKKIT_VERSION_NUMERIC == 178 && (petType == PetType.HUMAN) || riderType == PetType.HUMAN) {
          Lang.sendTo(owner, Lang.HUMAN_PET_DISABLED.toString());
          return null;
      }
      removePets(owner, true);
      if (!WorldUtil.allowPets(owner.getLocation())) {
          Lang.sendTo(owner, Lang.PETS_DISABLED_HERE.toString().replace("%world%", StringUtil.capitalise(owner.getWorld().getName())));
          return null;
      }
      if (!EchoPet.getOptions().allowPetType(petType)) {
          Lang.sendTo(owner, Lang.PET_TYPE_DISABLED.toString().replace("%type%", StringUtil.capitalise(petType.toString())));
          return null;
      }
      IPet pi = petType.getNewPetInstance(owner);
      if (pi == null) {
          Lang.sendTo(owner, Lang.PET_TYPE_NOT_COMPATIBLE.toString().replace("%type%", StringUtil.capitalise(petType.toString())));
          return null;
      }
pi.createRider(riderType, true);
      forceAllValidData(pi);
      pets.add(pi);
      return pi;
  }
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:26,代码来源:PetManager.java


示例4: generatePetInfo

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
public static ArrayList<String> generatePetInfo(IPet pt) {
    ArrayList<String> info = new ArrayList<String>();
    info.add(ChatColor.GOLD + " - Pet Type: " + ChatColor.YELLOW + StringUtil.capitalise(pt.getPetType().toString()));
    info.add(ChatColor.GOLD + " - Name: " + ChatColor.YELLOW + pt.getPetName());
    if (pt instanceof IAgeablePet) {
        info.add(ChatColor.GOLD + " - Baby: " + ChatColor.YELLOW + ((IAgeablePet) pt).isBaby());
    }
    if (pt.getPetType() == PetType.ZOMBIE) {
        info.add(ChatColor.GOLD + " - Baby: " + ChatColor.YELLOW + ((IZombiePet) pt).isBaby());
    }
    if (pt.getPetType() == PetType.PIGZOMBIE) {
        info.add(ChatColor.GOLD + " - Baby: " + ChatColor.YELLOW + ((IPigZombiePet) pt).isBaby());
    }
    info.addAll(generatePetDataInfo(pt));

    if (pt.getRider() != null) {
        info.add(ChatColor.RED + "Rider:");
        info.addAll(generatePetInfo(pt.getRider()));
    }

    return info;
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:23,代码来源:PetUtil.java


示例5: onTouch

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
public void onTouch(Player who, Action action) {
    String command = this.command.replace("%name%", who.getName());
    command = command.replace("%world%", who.getWorld().getName());

    if (command.startsWith("server ")) {
        String serverName = StringUtil.combineSplit(1, command.split(" "), " ");
        ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(byteOutput);
        try {
            out.writeUTF("Connect");
            out.writeUTF(serverName);
            who.sendPluginMessage(HoloAPI.getCore(), "BungeeCord", byteOutput.toByteArray());
            return;
        } catch (IOException ignored) {
        }
    }

    if (this.shouldPerformAsConsole()) {
        HoloAPI.getCore().getServer().dispatchCommand(HoloAPI.getCore().getServer().getConsoleSender(), command);
    } else {
        who.performCommand(command);
    }
}
 
开发者ID:DSH105,项目名称:HoloAPI,代码行数:25,代码来源:CommandTouchAction.java


示例6: set

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Command(
        command = "visibility <id> <type>",
        description = "Set the visibility of a particular hologram",
        permission = "holoapi.holo.visibility.set",
        help = {"Valid types for HoloAPI are: all, permission.", "Visibility types dynamically registered using the API may be defined using this command.", "See the Wiki for more information"}
)
public boolean set(CommandEvent event) {
    Hologram hologram = HoloAPI.getManager().getHologram(event.variable("id"));
    if (hologram == null) {
        event.respond(Lang.HOLOGRAM_NOT_FOUND.getValue("id", event.variable("id")));
        return true;
    }

    Visibility visibility = HoloAPI.getVisibilityMatcher().get(event.variable("type"));
    if (visibility == null) {
        event.respond(Lang.INVALID_VISIBILITY.getValue("visibility", event.variable("type")));
        event.respond(Lang.VALID_VISIBILITIES.getValue("vis", StringUtil.combine(", ", HoloAPI.getVisibilityMatcher().getValidVisibilities().keySet())));
        return true;
    }

    hologram.setVisibility(visibility);
    event.respond(Lang.HOLOGRAM_VISIBILITY_SET.getValue("id", event.variable("id"), "visibility", event.variable("type")));
    return true;
}
 
开发者ID:DSH105,项目名称:HoloAPI,代码行数:25,代码来源:VisibilityCommand.java


示例7: clearType

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Command(
        command = "clear <type>",
        description = "Clear all holograms of a certain type",
        permission = "holoapi.holo.clear",
        help = "Valid types are: COMPLEX, SIMPLE, ALL"
)
public boolean clearType(CommandEvent event) {
    if (!VALID_TYPES.contains(event.variable("type").toLowerCase())) {
        event.respond(Lang.INVALID_CLEAR_TYPE.getValue("type", event.variable("type"), "valid", StringUtil.combine(", ", VALID_TYPES)));
        return true;
    }
    clear(event.variable("type"));
    if (event.variable("type").equalsIgnoreCase("COMPLEX")) {
        event.respond(Lang.COMPLEX_HOLOGRAMS_CLEARED.getValue());
    } else if (event.variable("type").equalsIgnoreCase("SIMPLE")) {
        event.respond(Lang.SIMPLE_HOLOGRAMS_CLEARED.getValue());
    } else {
        event.respond(Lang.ALL_HOLOGRAMS_CLEARED.getValue());
    }
    return true;
}
 
开发者ID:DSH105,项目名称:HoloAPI,代码行数:22,代码来源:ClearCommand.java


示例8: dispatch

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
public <T extends S> boolean dispatch(T sender, String... arguments) {
    String input = StringUtil.combineArray(" ", arguments).trim();

    Controller controller = match(input);

    if (controller != null) {
        return preDispatch(sender, controller, input);
    }

    // command not found - do something else with it
    manager.respond(sender, manager.getMessage(MessagePurpose.COMMAND_NOT_FOUND, "<command>", manager.getCommandPrefix() + input), ResponseLevel.SEVERE);

    Suggestion suggestion = new Suggestion(manager, input, 3);
    if (!suggestion.getSuggestions().isEmpty()) {
        String suggestions = StringUtil.combine("{c1}, {c2}", suggestion.getSuggestions());
        manager.respond(sender, manager.getMessage(MessagePurpose.SUGGESTIONS, "<suggestions>", suggestions), ResponseLevel.SEVERE);
    }
    return true;
}
 
开发者ID:DSH105,项目名称:Influx,代码行数:20,代码来源:Dispatcher.java


示例9: getSpawnEgg

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
// This is kind of a dumb way to do this.. But I'm too lazy to fix my reflection
public org.bukkit.inventory.ItemStack getSpawnEgg(org.bukkit.inventory.ItemStack i, String entityTag){
	ItemStack is = CraftItemStack.asNMSCopy(i);
	NBTTagCompound nbt = is.getTag();
	if(nbt == null) nbt = new NBTTagCompound();
	if(!nbt.hasKey("EntityTag")) nbt.set("EntityTag", new NBTTagCompound());
	entityTag = EntityUtil.newToOldEggEntityName(StringUtil.capitalise(entityTag.replace("_", " ")).replace(" ", ""));
	nbt.getCompound("EntityTag").setString("id", entityTag);
	return CraftItemStack.asCraftMirror(is);
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:12,代码来源:SpawnUtil.java


示例10: createRider

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
public Pet createRider(final PetType pt, boolean sendFailMessage){
	if(pt == PetType.HUMAN){
		if(sendFailMessage){
			Lang.sendTo(this.getOwner(), Lang.RIDERS_DISABLED.toString().replace("%type%", StringUtil.capitalise(this.getPetType().toString())));
		}
		return null;
	}
	if(!EchoPet.getOptions().allowRidersFor(this.getPetType())){
		if(sendFailMessage){
			Lang.sendTo(this.getOwner(), Lang.RIDERS_DISABLED.toString().replace("%type%", StringUtil.capitalise(this.getPetType().toString())));
		}
		return null;
	}
	if(this.isOwnerRiding()){
		this.ownerRidePet(false);
	}
	if(this.rider != null){
		this.removeRider(true, true);
	}
	IPet newRider = pt.getNewPetInstance(this.getOwner());
	if(newRider == null){
		if(sendFailMessage){
			Lang.sendTo(getOwner(), Lang.PET_TYPE_NOT_COMPATIBLE.toString().replace("%type%", StringUtil.capitalise(getPetType().toString())));
		}
		return null;
	}
	if(isSpawned()) newRider.spawnPet(getOwner(), false);
	this.rider = (Pet) newRider;
	this.rider.setRider();
	if(isSpawned()) EchoPet.getPlugin().getSpawnUtil().setPassenger(0, getCraftPet(), newRider.getCraftPet());
	EchoPet.getSqlManager().saveToDatabase(rider, true);

	return this.rider;
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:36,代码来源:Pet.java


示例11: givePet

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
/**
 * Gives a {@link com.dsh105.echopet.api.pet.Pet} to the specified {@link Player}
 * <p/>
 * Pets will be spawned immediately next to the target player, linked until it is removed.
 *
 * @param player      the {@link org.bukkit.entity.Player} that will be provided with a {@link
 *                    com.dsh105.echopet.api.pet.Pet}
 * @param petType     the {@link com.dsh105.echopet.compat.api.entity.PetType} (type of {@link
 *                    com.dsh105.echopet.api.pet.Pet}) that will be given to the player
 * @param sendMessage defines if the plugin sends a message to the target {@link Player}
 * @return the {@link com.dsh105.echopet.api.pet.Pet} created
 */
public IPet givePet(Player player, PetType petType, boolean sendMessage) {
    if (player != null && petType != null) {
        IPet pet = EchoPet.getManager().createPet(player, petType, sendMessage);
        if (pet == null) {
            EchoPet.LOG.severe("Failed to give " + petType.toString() + " to " + player.getName() + " through the EchoPetAPI. Maybe this PetType is disabled in the Config.yml?");
            return null;
        }
        if (sendMessage) {
            Lang.sendTo(player, Lang.CREATE_PET.toString().replace("%type%", StringUtil.capitalise(petType.toString())));
        }
        return pet;
    }
    return null;
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:27,代码来源:EchoPetAPI.java


示例12: onPlayerTeleport

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
  public void onPlayerTeleport(final PlayerTeleportEvent event) {
final Player p = event.getPlayer();
final IPet pi = EchoPet.getManager().getPet(p);
Iterator<IPet> i = EchoPet.getManager().getPets().iterator();
while(i.hasNext()){
	IPet pet = i.next();
	if(pet.getEntityPet() instanceof IEntityPacketPet && ((IEntityPacketPet) pet.getEntityPet()).hasInititiated()){
		if(GeometryUtil.getNearbyEntities(event.getTo(), 50).contains(pet)){
			((IEntityPacketPet) pet.getEntityPet()).updatePosition();
		}
	}
}
if(pi != null && pi.isSpawned()){
	if(!WorldUtil.allowPets(event.getTo())){
		Lang.sendTo(p, Lang.PETS_DISABLED_HERE.toString().replace("%world%", StringUtil.capitalise(event.getTo().getWorld().getName())));
		pi.removePet(false, false);
	}else{
		pi.setAsHat(false);
		if(event.getCause() != TeleportCause.UNKNOWN){// This will probably cause issues.. I don't know why more causes don't exist.
			pi.ownerRidePet(false);
			pi.removePet(false, false);
			new BukkitRunnable(){

				@Override
				public void run(){
					if(pi != null){
						if(WorldUtil.allowPets(event.getTo())){
							pi.spawnPet(p, false);
						}
					}
				}
			}.runTaskLater(EchoPet.getPlugin(), 20L);// could be reduced
		}
	}
}
  }
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:38,代码来源:PetOwnerListener.java


示例13: open

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
public void open(boolean sendMessage){
	PetMenuOpenEvent menuEvent = new PetMenuOpenEvent(this.pet.getOwner(), PetMenuOpenEvent.MenuType.MAIN);
	EchoPet.getPlugin().getServer().getPluginManager().callEvent(menuEvent);
	if(menuEvent.isCancelled()){ return; }
	InventoryView view = this.pet.getOwner().openInventory(this.inv);
	pet.setInventoryView(view);
	if(sendMessage){
		Lang.sendTo(this.pet.getOwner(), Lang.OPEN_MENU.toString().replace("%type%", StringUtil.capitalise(this.pet.getPetType().toString().replace("_", " "))));
	}
}
 
开发者ID:Borlea,项目名称:EchoPet,代码行数:11,代码来源:PetMenu.java


示例14: showPotionHologram

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
private void showPotionHologram(Entity e, Collection<PotionEffect> effects) {
    for (PotionEffect effect : effects) {
        int amp = (effect.getAmplifier() < 1 ? 1 : effect.getAmplifier()) + 1;
        String content = Settings.INDICATOR_FORMAT.getValue("potion", effect.getType().getName().toLowerCase());
        content = content.replace("%effect%", StringUtil.capitalise(effect.getType().getName().replace("_", " "))).replace("%amp%", "" + new RomanNumeral(amp));
        Location l = e.getLocation().clone();
        l.setY(l.getY() + Settings.INDICATOR_Y_OFFSET.getValue("potion"));
        HoloAPI.getManager().createSimpleHologram(l, Settings.INDICATOR_TIME_VISIBLE.getValue("potion"), true, content);
    }
}
 
开发者ID:DSH105,项目名称:HoloAPI,代码行数:11,代码来源:IndicatorListener.java


示例15: info

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
protected static void info(CommandSender sender, Collection<Hologram> holograms) {
    for (Hologram hologram : holograms) {
        ArrayList<String> list = new ArrayList<>();
        list.add(ChatColor.GOLD + "" + ChatColor.UNDERLINE + "Hologram Preview:");
        if (hologram instanceof AnimatedHologram) {
            AnimatedHologram animatedHologram = (AnimatedHologram) hologram;
            if (animatedHologram.isImageGenerated() && (HoloAPI.getAnimationLoader().exists(animatedHologram.getAnimationKey())) || HoloAPI.getAnimationLoader().existsAsUnloadedUrl(animatedHologram.getAnimationKey())) {
                list.add(ChatColor.YELLOW + "" + ChatColor.ITALIC + animatedHologram.getAnimationKey() + " (ANIMATION)");
            } else {
                Collections.addAll(list, animatedHologram.getFrames().get(0).getLines());
            }
        } else {
            if (hologram.getLines().length > 1) {
                for (StoredTag tag : hologram.serialise()) {
                    if (tag.isImage()) {
                        if (HoloAPI.getConfig(ConfigType.MAIN).getBoolean("images." + tag.getContent() + ".requiresBorder", false)) {
                            for (String s : HoloAPI.getImageLoader().getGenerator(tag.getContent()).getLines()) {
                                list.add(HoloAPI.getTagFormatter().formatBasic(ChatColor.WHITE + s));
                            }
                        } else {
                            list.add(ChatColor.YELLOW + "" + ChatColor.ITALIC + tag.getContent() + " (IMAGE)");
                        }
                    } else {
                        list.add(HoloAPI.getTagFormatter().formatBasic(ChatColor.WHITE + tag.getContent()));
                    }
                }
            } else {
                list.add(HoloAPI.getTagFormatter().formatBasic(hologram.getLines()[0]));
            }
        }
        if (list.size() > 1) {
            new PowerMessage("•• " + ChatColor.AQUA + hologram.getSaveId() + ChatColor.DARK_AQUA + " at " + (int) hologram.getDefaultX() + ", " + (int) hologram.getDefaultY() + ", " + (int) hologram.getDefaultZ() + ", " + hologram.getWorldName()).tooltip(list.toArray(StringUtil.EMPTY_STRING_ARRAY)).suggest("/holo teleport " + hologram.getSaveId()).send(sender);
        }
    }
}
 
开发者ID:DSH105,项目名称:HoloAPI,代码行数:36,代码来源:InfoCommand.java


示例16: info

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Command(
        command = "touch info <id>",
        description = "Add an action to perform when a certain hologram is touched",
        permission = "holoapi.holo.touch.info"
)
public boolean info(CommandEvent event) {
    Hologram hologram = HoloAPI.getManager().getHologram(event.variable("id"));
    if (hologram == null) {
        event.respond(Lang.HOLOGRAM_NOT_FOUND.getValue("id", event.variable("id")));
        return true;
    }

    if (hologram.getAllTouchActions().isEmpty()) {
        event.respond(Lang.NO_TOUCH_ACTIONS.getValue("id", hologram.getSaveId()));
        return true;
    }

    event.respond(Lang.TOUCH_ACTIONS.getValue("id", hologram.getSaveId()));
    for (TouchAction action : hologram.getAllTouchActions()) {
        if (action instanceof CommandTouchAction) {
            event.respond("•• " + "{c1}Command {c2}/" + ((CommandTouchAction) action).getCommand() + " {c1}" + (((CommandTouchAction) action).shouldPerformAsConsole() ? "as console" : "as player"));
            continue;
        }

        if (action.getSaveKey() == null) {
            event.respond("•• {c1}Unidentified TouchAction");
        } else {
            event.respond("•• {c2}" + StringUtil.capitalise(action.getSaveKey().replace("_", " ")));
        }
    }
    return true;
}
 
开发者ID:DSH105,项目名称:HoloAPI,代码行数:33,代码来源:TouchCommand.java


示例17: getStringHelpFor

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
public List<String> getStringHelpFor(Controller controller) {
    List<String> help = new ArrayList<>();
    E helpEntry = getHelpEntry(controller);
    if (helpEntry != null) {
        help.add("Aliases (" + controller.getCommand().getAliases().size() + "): " + StringUtil.combine("{c1}, {c2}", controller.getCommand().getReadableStringAliases()));
        Collections.addAll(help, helpEntry.getLongDescription());
    }
    return help;
}
 
开发者ID:DSH105,项目名称:Influx,代码行数:10,代码来源:HelpProvider.java


示例18: Suggestion

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
public Suggestion(InfluxManager<?> manager, String input, int maximumAllowed) {
    this.manager = manager;
    this.input = input;
    this.suggestions = new ArrayList<>();

    for (Controller controller : this.manager.getMappedCommands()) {
        if (this.suggestions.size() > maximumAllowed) {
            break;
        }

        if (!this.suggestions.contains(controller.getCommand().getAcceptedStringSyntax())) {
            Command command = controller.getCommand();
            String[] parts = command.getStringSyntax().split("\\s+");
            String[] parts2 = command.getAcceptedStringSyntax().split("\\s+");

            int maxIndex = command.getIndexOf(command.getFirstVariable(), false);
            if (maxIndex < 0) maxIndex = parts.length;
            int maxIndex2 = command.getIndexOf(command.getFirstVariable(), false);
            if (maxIndex2 < 0) maxIndex2 = parts2.length;

            String suggestion = StringUtil.combineArray(0, maxIndex, " ", parts);
            String suggestion2 = StringUtil.combineArray(0, maxIndex2, " ", parts);
            if (this.input.startsWith(suggestion) || this.input.startsWith(suggestion2)) {
                this.suggestions.add(command.getAcceptedStringSyntax());
            }
        }
    }
}
 
开发者ID:DSH105,项目名称:Influx,代码行数:29,代码来源:Suggestion.java


示例19: convert

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
public SpongePosition convert(ContextualVariable variable) throws ConversionException {
    try {
        SpongePosition position = SpongeUtil.readLocation(0, variable.getConsumedArguments());
        if (position == null) {
            throw new ConversionException("Invalid location coordinates provided: " + StringUtil.combineArray(0, 4, ", ", variable.getConsumedArguments()));
        }
        return position;
    } catch (IllegalStateException e) {
        throw new ConversionException("World does not exist:" + variable.getConsumedArguments()[0]);
    }
}
 
开发者ID:DSH105,项目名称:Influx,代码行数:13,代码来源:SpongeConverters.java


示例20: convert

import com.dsh105.commodus.StringUtil; //导入依赖的package包/类
@Override
public UUID convert(ContextualVariable variable) throws ConversionException {
    try {
        return StringUtil.convertUUID(variable.getConsumedValue());
    } catch (IllegalArgumentException e) {
        throw new ConversionException("\"" + variable.getConsumedValue() + "\" is not a valid UUID.", e);
    }
}
 
开发者ID:DSH105,项目名称:Influx,代码行数:9,代码来源:Converters.java



注:本文中的com.dsh105.commodus.StringUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Group类代码示例发布时间:2022-05-22
下一篇:
Java GelfMessageBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap