Package org.yaml.snakeyaml.nodes
Class Tag
- java.lang.Object
-
- org.yaml.snakeyaml.nodes.Tag
-
public final class Tag extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static TagBINARYstatic TagBOOLstatic java.util.Map<Tag,java.util.Set<java.lang.Class<?>>>COMPATIBILITY_MAPstatic TagFLOATstatic TagINTstatic TagMAPstatic TagMERGEstatic TagNULLstatic TagOMAPstatic TagPAIRSstatic java.lang.StringPREFIXstatic TagSEQstatic TagSETstatic TagSTRstatic TagTIMESTAMPstatic TagYAML
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetClassName()java.lang.StringgetValue()inthashCode()booleanisCompatible(java.lang.Class<?> clazz)Java has more then 1 class compatible with a language-independent tag (!!int, !!float, !!timestamp etc)booleanisSecondary()booleanmatches(java.lang.Class<? extends java.lang.Object> clazz)Check whether this tag matches the global tag for the ClassbooleanstartsWith(java.lang.String prefix)java.lang.StringtoString()
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
YAML
public static final Tag YAML
-
MERGE
public static final Tag MERGE
-
SET
public static final Tag SET
-
PAIRS
public static final Tag PAIRS
-
OMAP
public static final Tag OMAP
-
BINARY
public static final Tag BINARY
-
INT
public static final Tag INT
-
FLOAT
public static final Tag FLOAT
-
TIMESTAMP
public static final Tag TIMESTAMP
-
BOOL
public static final Tag BOOL
-
NULL
public static final Tag NULL
-
STR
public static final Tag STR
-
SEQ
public static final Tag SEQ
-
MAP
public static final Tag MAP
-
COMPATIBILITY_MAP
public static final java.util.Map<Tag,java.util.Set<java.lang.Class<?>>> COMPATIBILITY_MAP
-
-
Method Detail
-
isSecondary
public boolean isSecondary()
-
getValue
public java.lang.String getValue()
-
startsWith
public boolean startsWith(java.lang.String prefix)
-
getClassName
public java.lang.String getClassName()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isCompatible
public boolean isCompatible(java.lang.Class<?> clazz)
Java has more then 1 class compatible with a language-independent tag (!!int, !!float, !!timestamp etc)- Parameters:
clazz- - Class to check compatibility- Returns:
- true when the Class can be represented by this language-independent tag
-
matches
public boolean matches(java.lang.Class<? extends java.lang.Object> clazz)
Check whether this tag matches the global tag for the Class- Parameters:
clazz- - Class to check- Returns:
- true when the this tag can be used as a global tag for the Class
-
-