@Override public Metadata getParent() { return equals(ALL) ? null : ALL; }
@Override public Metadata getParent() { return equals(ALL) ? null : ALL; }
/** * Indicates if a given character set is included in the current one. The * test is true if both character sets are equal or if the given character * set is within the range of the current one. For example, ALL includes all * character sets. A null character set is considered as included into the * current one. * <p> * Examples: * <ul> * <li>ALL.includes(UTF_16) -> true</li> * <li>UTF_16.includes(ALL) -> false</li> * </ul> * * @param included * The character set to test for inclusion. * @return True if the given character set is included in the current one. * @see #isCompatible(Metadata) */ public boolean includes(Metadata included) { return equals(ALL) || (included == null) || equals(included); }
/** * Indicates if a given character set is included in the current one. The * test is true if both character sets are equal or if the given character * set is within the range of the current one. For example, ALL includes all * character sets. A null character set is considered as included into the * current one. * <p> * Examples: * <ul> * <li>ALL.includes(UTF_16) -> true</li> * <li>UTF_16.includes(ALL) -> false</li> * </ul> * * @param included * The character set to test for inclusion. * @return True if the given character set is included in the current one. * @see #isCompatible(Metadata) */ public boolean includes(Metadata included) { return equals(ALL) || (included == null) || equals(included); }
CharacterSet characterSet) { if (Edition.CURRENT == Edition.GWT) { if (!CharacterSet.UTF_8.equals(characterSet)) { throw new IllegalArgumentException( "Only UTF-8 URL encoding is supported under GWT");
if (!CharacterSet.UTF_8.equals(characterSet)) { throw new IllegalArgumentException( "Only UTF-8 URL encoding is supported under GWT");
CharacterSet characterSet) { if (!CharacterSet.UTF_8.equals(characterSet)) { throw new IllegalArgumentException( "Only UTF-8 URL encoding is supported under GWT");
&& !defaultCharacterSet.equals(CharacterSet.ALL)) { variant.setCharacterSet(defaultCharacterSet);
} else if (metadata instanceof CharacterSet) { CharacterSet characterSet = (CharacterSet) metadata; defaultMetadata = characterSet.equals(getMetadataService() .getDefaultCharacterSet()); } else if (metadata instanceof Encoding) {
result = ((getCharacterSet() == null) && (otherVariant.getCharacterSet() == null) || (getCharacterSet() != null) && getCharacterSet().equals( otherVariant.getCharacterSet()));