Interface Converter<F,​T>

Type Parameters:
F - The accepted type of objects to convert from
T - The type to convert to
All Known Implementing Classes:
ChainedConverter, EnumParser, ExprAI, ExprAltitude, ExprArmorSlot, ExprArrowKnockbackStrength, ExprArrowPierceLevel, ExprArrowsStuck, ExprAttackCooldown, ExprBalance, ExprBed, ExprBlockData, ExprBlockHardness, ExprBookAuthor, ExprBookTitle, ExprClientViewDistance, ExprCompassTarget, ExprCoordinate, ExprCreeperMaxFuseTicks, ExprCursorSlot, ExprCustomModelData, ExprDifficulty, ExprDurability, ExprEnchantmentOfferCost, ExprEnderChest, ExprEntityTamer, ExprExhaustion, ExprExplosiveYield, ExprEyeLocation, ExprFacing, ExprFallDistance, ExprFlightMode, ExprGlidingState, ExprGlowing, ExprGravity, ExprHighestSolidBlock, ExprHotbarSlot, ExprHumidity, ExprItemAmount, ExprItemFrameSlot, ExprLanguage, ExprLastAttacker, ExprLastColor, ExprLastDamage, ExprLastLoginTime, ExprLastResourcePackResponse, ExprLeashHolder, ExprLength, ExprLevel, ExprLevelProgress, ExprMaxDurability, ExprMaxHealth, ExprMaxMinecartSpeed, ExprMaxStack, ExprMiddleOfLocation, ExprMinecartDerailedFlyingVelocity, ExprName, ExprNoDamageTicks, ExprPing, ExprPlayerlistHeaderFooter, ExprPlayerWeather, ExprPrefixSuffix, ExprProjectileBounceState, ExprProjectileCriticalState, ExprRedstoneBlockPower, ExprRemainingAir, ExprSeaLevel, ExprSkull, ExprSlotIndex, ExprSpawnerType, ExprSpectatorTarget, ExprSpeed, ExprTemperature, ExprTimePlayed, ExprTimeSince, ExprTypeOf, ExprUnixDate, ExprUnixTicks, ExprUUID, ExprVectorLength, ExprVectorSquaredLength, ExprVectorXYZ, ExprVehicle, ExprVelocity, ExprYawPitch, Getter, SerializableGetter, SimplePropertyExpression

public interface Converter<F,​T>
Converts data from type to another.
See Also:
Converters.registerConverter(Class, Class, Converter)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    holds information about a converter
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Disallow all chaining.
    static int
     
    static int
    Disallow other converters from being chained to this.
    static int
    Disallow chaining this with other converters.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable T
    convert​(F f)
    Converts an object from the given to the desired type.
  • Field Details

    • NO_LEFT_CHAINING

      static final int NO_LEFT_CHAINING
      Disallow other converters from being chained to this.
      See Also:
      Constant Field Values
    • NO_RIGHT_CHAINING

      static final int NO_RIGHT_CHAINING
      Disallow chaining this with other converters.
      See Also:
      Constant Field Values
    • NO_CHAINING

      static final int NO_CHAINING
      Disallow all chaining.
      See Also:
      Constant Field Values
    • NO_COMMAND_ARGUMENTS

      static final int NO_COMMAND_ARGUMENTS
      See Also:
      Constant Field Values
  • Method Details

    • convert

      @Nullable T convert(F f)
      Converts an object from the given to the desired type.
      Parameters:
      f - The object to convert.
      Returns:
      the converted object