de.espirit.firstspirit.common.text
Class Designator

java.lang.Object
  extended by de.espirit.firstspirit.common.text.AbstractTextType<Designator>
      extended by de.espirit.firstspirit.common.text.Designator
All Implemented Interfaces:
ValueOfContractor, Serializable, CharSequence, Comparable<Designator>

public final class Designator
extends AbstractTextType<Designator>

String type replacement for designators.

Since:
4.0.17
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.espirit.common.text.ValueOfContractor
ValueOfContractor.Invoke
 
Field Summary
 
Fields inherited from class de.espirit.firstspirit.common.text.AbstractTextType
_text
 
Method Summary
static Pattern getPattern()
          Get the pattern for a designator.
static boolean isStrict()
          Indicates the designator to work in strict mode.
static void setStrict(boolean strict)
          Set the designator to be strict, i.e., an InvalidDesignatorException will be thrown in case of designators not matching the pattern.
static Designator valueOf(String string)
          Create an instance from String.
 
Methods inherited from class de.espirit.firstspirit.common.text.AbstractTextType
charAt, codePointAt, codePointBefore, codePointCount, compareTo, compareTo, compareToIgnoreCase, concat, contains, contentEquals, contentEquals, correlatesTo, endsWith, equals, equalsIgnoreCase, getBytes, getBytes, getBytes, getChars, hashCode, indexOf, indexOf, indexOf, indexOf, intern, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, length, matches, offsetByCodePoints, regionMatches, regionMatches, replace, replace, replaceAll, replaceFirst, split, split, startsWith, startsWith, subSequence, substring, substring, toCharArray, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, trim
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getPattern

public static Pattern getPattern()
Get the pattern for a designator.

Returns:
The designator pattern.
Since:
4.0.17

valueOf

public static Designator valueOf(String string)
Create an instance from String.

Fulfills the ValueOfContractor marker.

Parameters:
string - The string to create from.
Returns:
The created instance or null, iff the given string is null.
Throws:
InvalidDesignatorException - If the given string does not match basic critera for being a language abbreviation.
Since:
4.0.17

setStrict

public static void setStrict(boolean strict)
Set the designator to be strict, i.e., an InvalidDesignatorException will be thrown in case of designators not matching the pattern.

Note: Strict settings only are local to the current thread!

Parameters:
strict - The strict mode to set.
Since:
4.0.17

isStrict

public static boolean isStrict()
Indicates the designator to work in strict mode. If not set, will default to false.

Returns:
true, if working in strict mode.
Since:
4.0.17


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480