FileFontSource

遗产: java.lang.Object, com.aspose.pdf.FontSource

public final class FileFontSource extends FontSource

表示单个字体文件源。

构造函数

构造函数描述
FileFontSource(String filePath)初始化 FileFontSource 类的新实例。

方法

方法描述
equals(Object obj)检查字体文件源对象是否相等。
getClass()
getFilePath()字体文件的路径。
hashCode()返回对象的哈希码值。
notify()
notifyAll()
setFilePath(String value)字体文件的路径。
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

FileFontSource(String filePath)

public FileFontSource(String filePath)

初始化 FileFontSource 类的新实例。

参数:

范围类型描述
filePathjava.lang.String字体文件的路径。

equals(Object obj)

public boolean equals(Object obj)

检查字体文件源对象是否相等。

参数:

范围类型描述
objjava.lang.Object将进行比较的字体文件源对象。

退货: boolean - 如果两个对象都是针对同一文件的字体文件源,则为真。

getClass()

public final native Class<?> getClass()

退货: java.lang.Class

getFilePath()

public String getFilePath()

字体文件的路径。

退货: java.lang.String - 字符串值

hashCode()

public int hashCode()

返回对象的哈希码值。支持此方法是为了散列表的好处,例如 java.util.HashMap 提供的散列表。

hashCode的一般契约是:

  • 每当在 Java 应用程序的执行期间对同一对象多次调用它时,hashCode 方法必须一致地返回相同的整数,前提是在对象的 equals 比较中使用的信息没有被修改。从一个应用程序的一次执行到同一应用程序的另一次执行,该整数不需要保持一致。
  • 如果根据 equals(Object) 方法两个对象相等,则对这两个对象中的每一个调用 hashCode 方法必须产生相同的整数结果。
  • 这是not要求如果两个对象根据 java.lang.Object 不相等#equals(java.lang.Object).equals(java.lang.Object) 方法,然后在两个对象中的每一个上调用 hashCode 方法必须产生不同的整数结果。但是,程序员应该知道,为不相等的对象生成不同的整数结果可能会提高哈希表的性能。

在相当实用的情况下,类 Object 定义的 hashCode 方法确实会为不同的对象返回不同的整数。 (这通常是通过将对象的内部地址转换为整数来实现的,但 Java TM 编程语言不需要这种实现技术。)

退货: int - 此对象的哈希码值。

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setFilePath(String value)

public void setFilePath(String value)

字体文件的路径。

参数:

范围类型描述
valuejava.lang.String字符串值

toString()

public String toString()

退货: java.lang.字符串

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

参数:

范围类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

参数:

范围类型描述
arg0long
arg1int