This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package challenge;
import basic.Shape;
/**
* 图形转换接口,定义图形之间的转换行为
*/
public interface ShapeConverter {
* 将源图形转换为目标图形
* @param sourceShape 源图形
* @return 转换后的目标图形,如果转换不支持则返回null
Shape convert(Shape sourceShape);
* 检查是否支持从源图形类型转换到目标图形类型
* @return 如果支持转换则返回true,否则返回false
boolean canConvert(Shape sourceShape);
* 获取转换的描述信息
* @return 转换描述
String getConversionDescription();
}