Package dev.gothickit.zenkit.fnt
Record Class CachedFont
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.fnt.CachedFont
- All Implemented Interfaces:
CacheableObject<CachedFont>,Font
-
Constructor Summary
ConstructorsConstructorDescriptionCachedFont(@NotNull String name, int height, @NotNull List<@NotNull FontGlyph> glyphs) Creates an instance of aCachedFontrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedFontcache()final booleanIndicates whether some other object is "equal to" this one.@Nullable FontGlyphglyph(long i) longglyphs()Returns the value of theglyphsrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanisCached()@NotNull Stringname()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedFont
public CachedFont(@NotNull @NotNull String name, int height, @NotNull @NotNull List<@NotNull FontGlyph> glyphs) Creates an instance of aCachedFontrecord class.- Parameters:
name- the value for thenamerecord componentheight- the value for theheightrecord componentglyphs- the value for theglyphsrecord component
-
-
Method Details
-
glyphCount
public long glyphCount()- Specified by:
glyphCountin interfaceFont
-
glyph
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedFont>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedFont>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component. -
height
public int height()Returns the value of theheightrecord component. -
glyphs
Returns the value of theglyphsrecord component.
-