congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CharInfo$CharKey
Code IndexAdd Tabnine to your IDE (free)

How to use
CharInfo$CharKey
in
org.apache.xml.serializer

Best Java code snippets using org.apache.xml.serializer.CharInfo$CharKey (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Call this method to register a char to String mapping, for example
 * to map '<' to "&lt;".
 * @param outputString The String to map to.
 * @param inputChar The char to map from.
 * @return true if the mapping is not one of:
 * <ul>
 * <li> '<' to "&lt;"
 * <li> '>' to "&gt;"
 * <li> '&' to "&amp;"
 * <li> '"' to "&quot;"
 * </ul>
 */
boolean defineChar2StringMapping(String outputString, char inputChar) 
{
  CharKey character = new CharKey(inputChar);
  m_charToString.put(character, outputString);
  set(inputChar);  // mark the character has having a mapping to a String
  
  boolean extraMapping = extraEntity(outputString, inputChar);
  return extraMapping;
    
}
origin: robovm/robovm

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: FlexoVM/flexovm

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: com.gluonhq/robovm-rt

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: org.apache.xalan/serializer

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: xalan/serializer

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}
 
origin: ibinti/bugvm

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}
 
origin: org.apache.xalan/com.springsource.org.apache.xml.serializer

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}
 
origin: MobiVM/robovm

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}
 
origin: com.bugvm/bugvm-rt

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: com.mobidevelop.robovm/robovm-rt

/**
 * Map a character to a String. For example given
 * the character '>' this method would return the fully decorated
 * entity name "&lt;".
 * Strings for entity references are loaded from a properties file,
 * but additional mappings defined through calls to defineChar2String()
 * are possible. Such entity reference mappings could be over-ridden.
 *
 * This is reusing a stored key object, in an effort to avoid
 * heap activity. Unfortunately, that introduces a threading risk.
 * Simplest fix for now is to make it a synchronized method, or to give
 * up the reuse; I see very little performance difference between them.
 * Long-term solution would be to replace the hashtable with a sparse array
 * keyed directly from the character's integer value; see DTM's
 * string pool for a related solution.
 *
 * @param value The character that should be resolved to
 * a String, e.g. resolve '>' to  "&lt;".
 *
 * @return The String that the character is mapped to, or null if not found.
 * @xsl.usage internal
 */
String getOutputStringForChar(char value)
{
  // CharKey m_charKey = new CharKey(); //Alternative to synchronized
  m_charKey.setChar(value);
  return (String) m_charToString.get(m_charKey);
}

origin: org.apache.xalan/com.springsource.org.apache.xml.serializer

/**
 * A base constructor just to explicitly create the fields,
 * with the exception of m_charToString which is handled
 * by the constructor that delegates base construction to this one.
 * <p>
 * m_charToString is not created here only for performance reasons,
 * to avoid creating a Hashtable that will be replaced when
 * making a mutable copy, {@link #mutableCopyOf(CharInfo)}. 
 *
 */
private CharInfo() 
{
  this.array_of_bits = createEmptySetOfIntegers(65535);
  this.firstWordNotUsed = 0;
  this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX];
  this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX];
  this.m_charKey = new CharKey();
  
  // Not set here, but in a constructor that uses this one
  // this.m_charToString =  new Hashtable();  
  
  this.onlyQuotAmpLtGt = true;
  
  return;
}
 
origin: FlexoVM/flexovm

/**
 * Call this method to register a char to String mapping, for example
 * to map '<' to "&lt;".
 * @param outputString The String to map to.
 * @param inputChar The char to map from.
 * @return true if the mapping is not one of:
 * <ul>
 * <li> '<' to "&lt;"
 * <li> '>' to "&gt;"
 * <li> '&' to "&amp;"
 * <li> '"' to "&quot;"
 * </ul>
 */
boolean defineChar2StringMapping(String outputString, char inputChar) 
{
  CharKey character = new CharKey(inputChar);
  m_charToString.put(character, outputString);
  set(inputChar);  // mark the character has having a mapping to a String
  
  boolean extraMapping = extraEntity(outputString, inputChar);
  return extraMapping;
    
}
origin: org.apache.xalan/serializer

/**
 * A base constructor just to explicitly create the fields,
 * with the exception of m_charToString which is handled
 * by the constructor that delegates base construction to this one.
 * <p>
 * m_charToString is not created here only for performance reasons,
 * to avoid creating a Hashtable that will be replaced when
 * making a mutable copy, {@link #mutableCopyOf(CharInfo)}. 
 *
 */
private CharInfo() 
{
  this.array_of_bits = createEmptySetOfIntegers(65535);
  this.firstWordNotUsed = 0;
  this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX];
  this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX];
  this.m_charKey = new CharKey();
  
  // Not set here, but in a constructor that uses this one
  // this.m_charToString =  new Hashtable();  
  
  this.onlyQuotAmpLtGt = true;
  
  return;
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

/**
 * A base constructor just to explicitly create the fields,
 * with the exception of m_charToString which is handled
 * by the constructor that delegates base construction to this one.
 * <p>
 * m_charToString is not created here only for performance reasons,
 * to avoid creating a Hashtable that will be replaced when
 * making a mutable copy, {@link #mutableCopyOf(CharInfo)}. 
 *
 */
private CharInfo() 
{
  this.array_of_bits = createEmptySetOfIntegers(65535);
  this.firstWordNotUsed = 0;
  this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX];
  this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX];
  this.m_charKey = new CharKey();
  
  // Not set here, but in a constructor that uses this one
  // this.m_charToString =  new Hashtable();  
  
  this.onlyQuotAmpLtGt = true;
  
  return;
}
 
origin: com.bugvm/bugvm-rt

/**
 * A base constructor just to explicitly create the fields,
 * with the exception of m_charToString which is handled
 * by the constructor that delegates base construction to this one.
 * <p>
 * m_charToString is not created here only for performance reasons,
 * to avoid creating a Hashtable that will be replaced when
 * making a mutable copy, {@link #mutableCopyOf(CharInfo)}. 
 *
 */
private CharInfo() 
{
  this.array_of_bits = createEmptySetOfIntegers(65535);
  this.firstWordNotUsed = 0;
  this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX];
  this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX];
  this.m_charKey = new CharKey();
  
  // Not set here, but in a constructor that uses this one
  // this.m_charToString =  new Hashtable();  
  
  this.onlyQuotAmpLtGt = true;
  
  return;
}

origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * Call this method to register a char to String mapping, for example
 * to map '<' to "&lt;".
 * @param outputString The String to map to.
 * @param inputChar The char to map from.
 * @return true if the mapping is not one of:
 * <ul>
 * <li> '<' to "&lt;"
 * <li> '>' to "&gt;"
 * <li> '&' to "&amp;"
 * <li> '"' to "&quot;"
 * </ul>
 */
boolean defineChar2StringMapping(String outputString, char inputChar) 
{
  CharKey character = new CharKey(inputChar);
  m_charToString.put(character, outputString);
  set(inputChar);  // mark the character has having a mapping to a String
  
  boolean extraMapping = extraEntity(outputString, inputChar);
  return extraMapping;
    
}
origin: org.apache.xalan/com.springsource.org.apache.xml.serializer

/**
 * Call this method to register a char to String mapping, for example
 * to map '<' to "&lt;".
 * @param outputString The String to map to.
 * @param inputChar The char to map from.
 * @return true if the mapping is not one of:
 * <ul>
 * <li> '<' to "&lt;"
 * <li> '>' to "&gt;"
 * <li> '&' to "&amp;"
 * <li> '"' to "&quot;"
 * </ul>
 */
boolean defineChar2StringMapping(String outputString, char inputChar) 
{
  CharKey character = new CharKey(inputChar);
  m_charToString.put(character, outputString);
  set(inputChar);  // mark the character has having a mapping to a String
  
  boolean extraMapping = extraEntity(outputString, inputChar);
  return extraMapping;
    
}
org.apache.xml.serializerCharInfo$CharKey

Javadoc

Simple class for fast lookup of char values, when used with hashtables. You can set the char, then use it as a key.

Most used methods

  • <init>
    Constructor CharKey
  • setChar
    Get the hash value of the character.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now