Class Format
- Author:
- Werner Randelshofer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new format which contains all properties from this format and additional properties listed.Creates a new format which contains all properties from this format and additional properties from that format.booleancontainsKey(FormatKey<?> key) containsKeys(FormatKey<?>... keys) Returns true if the format has the specified keys.<T> T<T> TgetKeys()Gets the keys of the format as an unmodifiable set.Gets the properties of the format as an unmodifiable map.intersectKeys(FormatKey<?>... keys) Creates a new format which only has the specified keys (or less).booleanReturns true if that format matches this format.booleanmatchesWithout(Format that, FormatKey<?>... without) Creates a new format which contains all specified properties and additional properties from this format.Creates a new format which contains all properties from the specified format and additional properties from this format.removeKeys(FormatKey<?>... keys) Creates a new format without the specified keys.toString()
-
Constructor Details
-
Format
-
Format
Creates a new format onlyWith the specified properties. The properties must be given as key value pairs.
-
-
Method Details
-
get
-
get
-
containsKey
-
getProperties
-
getKeys
-
matches
Returns true if that format matches this format. That is iff all properties defined in both format objects are identical. Properties which are only defined in one of the format objects are not considered.- Parameters:
that- Another format.- Returns:
- True if the other format matches this format.
-
matchesWithout
-
append
Creates a new format which contains all properties from this format and additional properties from that format.If a property is specified in both formats, then the property value from this format is used. It overwrites that format.
If one of the format has more properties than the other, then the new format is more specific than this format.
- Parameters:
that-- Returns:
- That format with properties overwritten by this format.
-
append
Creates a new format which contains all properties from this format and additional properties listed.If a property is specified in both formats, then the property value from this format is used. It overwrites that format.
If one of the format has more properties than the other, then the new format is more specific than this format.
- Parameters:
p- The properties must be given as key value pairs.- Returns:
- That format with properties overwritten by this format.
-
prepend
Creates a new format which contains all properties from the specified format and additional properties from this format.If a property is specified in both formats, then the property value from that format is used. It overwrites this format.
If one of the format has more properties than the other, then the new format is more specific than this format.
- Parameters:
that-- Returns:
- That format with properties overwritten by this format.
-
prepend
Creates a new format which contains all specified properties and additional properties from this format.If a property is specified in both formats, then the property value from this format is used. It overwrites that format.
If one of the format has more properties than the other, then the new format is more specific than this format.
- Parameters:
p- The properties must be given as key value pairs.- Returns:
- That format with properties overwritten by this format.
-
intersectKeys
-
removeKeys
-
containsKeys
-
toString
-