Codota Logo
org.netbeans.modules.cnd.utils.cache
Code IndexAdd Codota to your IDE (free)

How to use org.netbeans.modules.cnd.utils.cache

Best Java code snippets using org.netbeans.modules.cnd.utils.cache (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@SuppressWarnings("unchecked")
public static <K, V> Map<K, V> expandForNextKey(Map<K, V> orig, K newElem) {
  if (orig instanceof CompactMap<?, ?>) {
    return ((CompactMap<K, V>)orig).expandForNextKeyIfNeeded(newElem);
  } else if (orig == NO_CONTENT) {
    return createMap(1);
  } else {
    return orig;
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() < 16 || containsKey(newElem)) {
      return this;
    }
    return new TinyHashMap32<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() < 128 || containsKey(newElem)) {
      return this;
    }
    return new TinyHashMap<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

/** Set the token text for this node */
@Override
public void setText(String text_) {
  text = TextCache.getManager().getString(text_);
} 
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

/** Creates a new instance of APTFileNode */
public APTFileNode(FileSystem fileSystem, CharSequence path) {
  Parameters.notNull("null fileSystem", fileSystem); //NOI18N
  this.fileSystem = fileSystem;
  this.path = FilePathCache.getManager().getString(path);
  this.guard = TextCache.getManager().getString(guard);
  tokenized = true;
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-modelimpl

private static CharSequence getCanonicalKey(FileObject fileObject, CharSequence fileKey) {
  try {
    CharSequence res = CndFileUtils.getCanonicalPath(fileObject);
    res = FilePathCache.getManager().getString(res);
    if (fileKey.equals(res)) {
      return fileKey;
    }
    return res;
  } catch (IOException e) {
    // skip exception
    return fileKey;
  }
}

origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@Override
public final CharSequence getString(CharSequence text) {
  return getDelegate(text).getString(text);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

TinyArrayMap(TinyTwoValuesMap<K, V> twoValues, int capacity) {
  assert capacity >= 2;
  keyValues = new Object[capacity*2];
  this.size = twoValues.size();
  int index = 0;
  this.keyValues[index++] = twoValues.getFirstKey();
  this.keyValues[index++] = twoValues.getFirstValue();
  this.keyValues[index++] = twoValues.getSecondKey();
  this.keyValues[index] = twoValues.getSecondValue();
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@SuppressWarnings("unchecked")
private void freeze() {
  if (storage instanceof Map<?,?>) {
    if (storage != EMPTY) {
      Object[] arr = compact((Map<CharSequence,Object>)storage);
      storage = cacheHolder(new Holder(arr));
    }
  }
}

origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() <= 3 || containsKey(newElem)) {
      return this;
    }
    return new TinyMap6<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() <= 5 || containsKey(newElem)) {
      return this;
    }
    return new TinyMap8<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() < 64 || containsKey(newElem)) {
      return this;
    }
    return new TinyHashMap128<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() <= 7 || containsKey(newElem)) {
      return this;
    }
    return new TinyMap16<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  @Override
  public Map<K, V> expandForNextKeyIfNeeded(K newElem) {
    if (size() < 32 || containsKey(newElem)) {
      return this;
    }
    return new TinyHashMap64<K, V>(this);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

protected MapSnapshot(MapSnapshot<V> parent) {
  storage = EMPTY;
  assert (parent == null || parent.parent == null || !parent.parent.isEmpty()) : "how grand father could be empty " + parent;
  // optimization to prevent chaining of empty snapshots
  while (parent != null && parent.isEmpty()) {
    parent = parent.parent;
  }
  this.parent = parent;
  if (this.parent != null) {
    this.parent.freeze();
  }
}

origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

@Override
public V get(Object aKey) {
  assert aKey != null;
  int index = indexForKey(aKey);
  if (index >= 0) {
    @SuppressWarnings("unchecked")
    V val = (V) keyValues[index+1];
    return val;
  }
  return null;
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

@Override
public final void setText(String t) {
  text = TextCache.getManager().getString(t);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

@Override
public final void setTextID(CharSequence textID) {
  this.text = TextCache.getManager().getString(textID);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

@Override
public final void setTextID(CharSequence textID) {
  this.text = TextCache.getManager().getString(textID);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

@Override
public final void setText(String t) {
  text = TextCache.getManager().getString(t);
}
org.netbeans.modules.cnd.utils.cache

Most used classes

  • CndFileUtils
    some file utilities used by CND modules due to performance reasons or other
  • CharSequenceUtils
    Utility methods related to character sequences.
  • APTStringManager
    APT string table manager Responsibility: - only one instance per String object - based on weak refer
  • FilePathCache
    cache entry
  • TextCache
    cache entry
  • MapSnapshot,
  • TinyMaps,
  • APTStringManager$APTCompoundStringManager,
  • APTStringManager$APTSingleStringManager,
  • CharSequenceUtils$1,
  • CharSequenceUtils$2,
  • CharSequenceUtils$3,
  • CharSequenceUtils$4,
  • CharSequenceUtils$5,
  • CharSequenceUtils$6,
  • CndFileUtils$FSListener,
  • CndFileUtils$Flags,
  • CndFileUtils$L1Cache,
  • MapSnapshot$SingleItemIterator
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now