Class PerspectiveFont
- java.lang.Object
 - 
- org.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,PerspectiveFontType>
 - 
- com.inductiveautomation.perspective.common.fonts.PerspectiveFont
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,java.lang.Comparable<org.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,PerspectiveFontType>>
public class PerspectiveFont extends org.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,PerspectiveFontType>
A PerspectiveFont is aTripleof a font name (i.e. "Roboto" or "merriweather"), a font style (i.e. "Bold" or "v19-latin-300"), and asupported font type(i.e. "ttf" or "woff").We do not override
Triple.equals(Object)andTriple.hashCode()since those implementations use the left, middle, and right values from the respective getters overridden in this derived class.- See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description java.lang.Stringnamejava.lang.StringstylePerspectiveFontTypetype 
- 
Constructor Summary
Constructors Constructor Description PerspectiveFont(java.lang.String name, java.lang.String style, PerspectiveFontType type) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetLeft()java.lang.StringgetMiddle()PerspectiveFontTypegetRight()static java.util.Optional<PerspectiveFont>parse(java.lang.String fileName)Parse a file name into a PerspectiveFont. 
 - 
 
- 
- 
Field Detail
- 
name
public final java.lang.String name
 
- 
style
public final java.lang.String style
 
- 
type
public final PerspectiveFontType type
 
 - 
 
- 
Constructor Detail
- 
PerspectiveFont
public PerspectiveFont(java.lang.String name, java.lang.String style, PerspectiveFontType type) 
 - 
 
- 
Method Detail
- 
getLeft
public java.lang.String getLeft()
- Specified by:
 getLeftin classorg.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,PerspectiveFontType>
 
- 
getMiddle
public java.lang.String getMiddle()
- Specified by:
 getMiddlein classorg.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,PerspectiveFontType>
 
- 
getRight
public PerspectiveFontType getRight()
- Specified by:
 getRightin classorg.apache.commons.lang3.tuple.Triple<java.lang.String,java.lang.String,PerspectiveFontType>
 
- 
parse
public static java.util.Optional<PerspectiveFont> parse(java.lang.String fileName)
Parse a file name into a PerspectiveFont. For example: "merriweather-v19-latin-300.eot" would parse into a PerspectiveFont with font name "merriweather", font style "v19-latin-300", and font type "eot"- Parameters:
 fileName- The file name to parse- Returns:
 - An 
Optionalcontaining the parsed PerspectiveFont, or an empty Optional if the file name could not be parsed 
 
 - 
 
 -