{@inheritDoc}

@throws SuperCsvCellProcessorException if value is null or not a ZoneId
543714
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		if( !(value instanceof ZoneId) ) {
			throw new SuperCsvCellProcessorException(ZoneId.class, value, context, this);
		}
		final ZoneId zoneId = (ZoneId) value;
		final String result;
		if (textStyle != null && locale != null) {
			result = zoneId.getDisplayName(textStyle, locale);
		} else {
			result = zoneId.toString();
		}
		return next.execute(result, context);
	}
694050
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		final Class<T> ourType = getType();
		if( !(value.getClass().equals(ourType)) ) {
			throw new SuperCsvCellProcessorException(ourType, value, context, this);
		}
		final TemporalAccessor timeType = ourType.cast(value);
		try {
			if( formatter != null ) {
				return formatter.format(timeType);
			} else {
				return timeType.toString();
			}
		}
		catch(DateTimeException | IllegalArgumentException e) {
			throw new SuperCsvCellProcessorException(
				String.format("Failed to format value as a %s", ourType.getSimpleName()), context, this, e);
		}
	}
498472
@Override
    public ChronoZonedDateTime<D> atZone(ZoneId zone) {
        return ChronoZonedDateTimeImpl.ofBest(this, zone, null);
    }
117602
static public function notIsInstanceOf($value, $className, $message = null, $propertyPath = null)
        {
            if ($value instanceof $className) {
                $message = $message ?: sprintf(
                    'Class "%s" was not expected to be instanceof of "%s".',
                    static::stringify($value),
                    $className
                );

                throw static::createException($value, $message, static::INVALID_NOT_INSTANCE_OF, $propertyPath, array('class' => $className));
            }
        }
1245483
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		if( !encounteredElements.add(value) ) {
			throw new SuperCsvConstraintViolationException(String.format("duplicate value '%s' encountered", value), context, this);
		}
		
		return next.execute(value, context);
	}
883978
@Override public Object transform(Object value) {
        if (value == null) {
            return value;
        } else if (value instanceof Boolean) {
            return value;
        } else if (value instanceof String) {
            return value;
        } else if (value instanceof Number) {
            return InternalUtils.toBigDecimal((Number)value);
        } else if (value instanceof byte[]) {
            return value;
        } else if (value instanceof ByteBuffer) {
            return copyBytesFrom((ByteBuffer)value);
        } else if (value instanceof Set) {
            @SuppressWarnings("unchecked")
            Set<Object> set = (Set<Object>) value;
            if (set.size() == 0)
                return value;
            Object element = set.iterator().next();
            if (element instanceof String) {
                return value;
            } else if (element instanceof BigDecimal) {
                return value;
            } else if (element instanceof Number) {
                @SuppressWarnings("unchecked")
                Set<Number> in = (Set<Number>) value;
                Set<BigDecimal> out = new LinkedHashSet<BigDecimal>(set.size());
                for (Number n : in)
                    out.add(InternalUtils.toBigDecimal(n));
                return out;
            } else if (element instanceof byte[]) {
                return value;
            } else if (element instanceof ByteBuffer) {
                @SuppressWarnings("unchecked")
                Set<ByteBuffer> bs = (Set<ByteBuffer>) value;
                Set<byte[]> out = new LinkedHashSet<byte[]>(bs.size());
                for (ByteBuffer bb: bs)
                    out.add(copyBytesFrom(bb));
                return out;
            } else {
                throw new UnsupportedOperationException("element type: "
                        + element.getClass());
            }
        } else if (value instanceof List) {
            @SuppressWarnings("unchecked")
            List<Object> in = (List<Object>) value;
            if (in.size() == 0)
                return in;
            List<Object> out = new ArrayList<Object>();
            for (Object v : in)
                out.add(transform(v));
            return out;
        } else if (value instanceof Map) {
            @SuppressWarnings("unchecked")
            Map<String, Object> in = (Map<String, Object>) value;
            if (in.size() == 0)
                return in;
            Map<String, Object> out = new LinkedHashMap<String, Object>(in.size());
            for (Map.Entry<String, Object> e : in.entrySet())
                out.put(e.getKey(), transform(e.getValue()));
            return out;
        } else {
            throw new UnsupportedOperationException("value type: "
                    + value.getClass());
        }
    }
1149525
@Override
    public ValidationResult validate(@Nullable final Object value) {
        if (value instanceof ObjectId) {
            return new ValidationResult.ValidationPassed();
        } else {
            return new ValidationResult.ValidationFailed(String.valueOf(value) + " is not a valid ObjectId!");
        }
    }
913737
@Override
	public String initValues(final FieldCase ca) {
		boolean found = false;
		buffer.setLength(0);
		for (Constraint c : constraints) {
			String cV = c.initValues(ca);
			if (cV != null) {
				found = true;
				buffer.append(cV);
			}
		}
		if (found) {
			return buffer.toString();
		}
		return null;
	}
747275
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		if (!(value instanceof Interval)) {
			throw new SuperCsvCellProcessorException(Interval.class, value,
					context, this);
		}
		final Interval interval = (Interval) value;
		final String result = interval.toString();
		return next.execute(result, context);
	}
517665
public void setValueFromObject(Object valueAsJava) {
 	if ((valueAsJava!=null) && (value==null)) {
 	    if (valueAsJava instanceof QualifiedName) { 
 		this.value=valueAsJava;
 	    } else if (valueAsJava instanceof LangString) { 
 		this.value=valueAsJava;
 	    } else if (valueAsJava instanceof byte[]) {
 		setValueAsJava((byte[]) valueAsJava);
 	    } else if (valueAsJava instanceof org.w3c.dom.Node) {
 		setValueAsJava((org.w3c.dom.Node)valueAsJava);
 	    } else {
 		this.value = valueAsJava.toString();
 	    }
 	}
417947
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		if( !(value instanceof String) ) {
			throw new SuperCsvCellProcessorException(String.class, value, context, this);
		}
		
		try {
			if( locale == null ) {
				formatter = new SimpleDateFormat(dateFormat);
			} else {
				formatter = new SimpleDateFormat(dateFormat, locale);
			}
			formatter.setLenient(lenient);
			Object result = parseValue(value);
			return next.execute(result, context);
		}
		catch(final ParseException e) {
			throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Date", value),
				context, this, e);
		}
	}
1008555
static public function subclassOf($value, $className, $message = null, $propertyPath = null)
        {
            if (!is_subclass_of($value, $className)) {
                $message = $message ?: sprintf(
                    'Class "%s" was expected to be subclass of "%s".',
                    static::stringify($value),
                    $className
                );

                throw static::createException($value, $message, static::INVALID_SUBCLASS_OF, $propertyPath, array('class' => $className));
            }
        }
637146
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		if( !(value instanceof String) ) {
			throw new SuperCsvCellProcessorException(String.class, value, context, this);
		}
		
		final String stringValue = (String) value;
		final Boolean result;
		if( contains(trueValues, stringValue, ignoreCase) ) {
			result = Boolean.TRUE;
		} else if( contains(falseValues, stringValue, ignoreCase) ) {
			result = Boolean.FALSE;
		} else {
			throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Boolean", value),
				context, this);
		}
		
		return next.execute(result, context);
	}
914758
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		final BigDecimal result;
		if( value instanceof String ) {
			final String s = (String) value;
			try {
				if( symbols == null ) {
					result = new BigDecimal(s);
				} else {
					result = new BigDecimal(fixSymbols(s, symbols));
				}
			}
			catch(final NumberFormatException e) {
				throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a BigDecimal",
					value), context, this, e);
			}
		} else {
			throw new SuperCsvCellProcessorException(String.class, value, context, this);
		}
		
		return next.execute(result, context);
	}
807385
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		final Character result;
		if( value instanceof Character ) {
			result = (Character) value;
		} else if( value instanceof String ) {
			final String stringValue = (String) value;
			if( stringValue.length() == 1 ) {
				result = Character.valueOf(stringValue.charAt(0));
			} else {
				throw new SuperCsvCellProcessorException(String.format(
					"'%s' cannot be parsed as a char as it is a String longer than 1 character", stringValue), context,
					this);
			}
		} else {
			final String actualClassName = value.getClass().getName();
			throw new SuperCsvCellProcessorException(String.format(
				"the input value should be of type Character or String but is of type %s", actualClassName), context,
				this);
		}
		
		return next.execute(result, context);
	}
835089
@Override
	public final void setObjectProperty(String name, Object value) throws JMSException
    {
        if (value == null)
            throw new MessageFormatException("A property value cannot be null");
            
        // Check type
        if (!(value instanceof Boolean ||
              value instanceof Byte ||
              value instanceof Short ||
              value instanceof Integer ||
              value instanceof Long ||
              value instanceof Float ||
              value instanceof Double ||
              value instanceof String))
            throw new MessageFormatException("Unsupported property value type : "+value.getClass().getName());
        
        setProperty(name,value);
    }
220362
public void writeNullableByteArray( byte[] value )
    {
        if (value == null)
            write(NULL_VALUE);
        else
        {
            write(NOT_NULL_VALUE);
            writeInt(value.length);
            write(value);
        }
    }