Codota Logo
com.twelvemonkeys.util
Code IndexAdd Codota to your IDE (free)

How to use com.twelvemonkeys.util

Best Java code snippets using com.twelvemonkeys.util (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: haraldk/TwelveMonkeys

public Collection<V> values() {
  removeExpiredEntries();
  return super.values();
}
origin: haraldk/TwelveMonkeys

protected Entry<K, V> removeEntry(Entry<K, V> pEntry) {
  Entry<K, V> entry = super.removeEntry(pEntry);
  processRemoved(pEntry);
  return entry;
}
origin: haraldk/TwelveMonkeys

  @Override
  public void removeLRU() {
    while (maxSize <= currentSize) { // NOTE: maxSize here is mem size
      super.removeLRU();
    }
  }
}
origin: haraldk/TwelveMonkeys

public Set<Entry<K, V>> entrySet() {
  removeExpiredEntries();
  return super.entrySet();
}
origin: haraldk/TwelveMonkeys

public Set<K> keySet() {
  removeExpiredEntries();
  return super.keySet();
}
origin: haraldk/TwelveMonkeys

/**
 * Creates an LRUMap with initial mappings from the given map,
 * and the given max size.
 *
 * @param pContents the map whose mappings are to be placed in this map.
 * May be {@code null}.
 * @param pMaxSize size limit
 */
public LRUMap(Map<? extends K, ? extends V> pContents, int pMaxSize) {
  super(pContents, true);
  setMaxSize(pMaxSize);
}
origin: haraldk/TwelveMonkeys

public boolean addAll(Collection<? extends E> pCollection) {
  boolean changed = false;
  for (E value : pCollection) {
    if (add(value) && !changed) {
      changed = true;
    }
  }
  return changed;
}
origin: haraldk/TwelveMonkeys

/**
 * Sets the minutes part of the time.
 *
 * @param pMinutes an integer
 */
public void setMinutes(int pMinutes) {
  time = pMinutes * SECONDS_IN_MINUTE + getSeconds();
}
origin: haraldk/TwelveMonkeys

/**
 * Creates a StringTokenIterator
 *
 * @param pString the string to be parsed.
 * @param pDelimiters the delimiters.
 * @param pDirection iteration direction.
 */
public StringTokenIterator(String pString, String pDelimiters, int pDirection) {
  this(pString, toCharArray(pDelimiters), pDirection, false, false);
}
origin: haraldk/TwelveMonkeys

/**
 * Returns {@code true} if the iteration has more elements. (In other
 * words, returns {@code true} if {@code next} would return an element
 * rather than throwing an exception.)
 *
 * @return {@code true} if the iterator has more elements.
 */
public boolean hasNext() {
  return (next != null || fetchNext() != null);
}
origin: haraldk/TwelveMonkeys

/**
 * This implementation simply returns {@code hasNext()}.
 * @see #hasNext()
 */
public final boolean hasMoreElements() {
  return hasNext();
}
origin: haraldk/TwelveMonkeys

/**
 * Creates a new time with the given time (in seconds).
 */
public Time(int pTime) {
  setTime(pTime);
}
origin: haraldk/TwelveMonkeys

private Object readResolve() throws IntrospectionException {
  // Initialize the property descriptors
  descriptors = initDescriptors(bean);
  return this;
}
origin: haraldk/TwelveMonkeys

/**
 * Returns the next element in the iteration as a {@code String}.
 * This implementation simply returns {@code (String) next()}.
 *
 * @return the next element in the iteration.
 * @exception java.util.NoSuchElementException iteration has no more elements.
 * @see #next()
 */
public final String nextToken() {
  return next();
}
origin: haraldk/TwelveMonkeys

  public void verifyAll() {
    super.verifyAll();
    MapAbstractTest.this.verifyAll();
  }
}
origin: haraldk/TwelveMonkeys

public Object[] getOtherElements() {
  Object[] k = getOtherKeys();
  Object[] v = getOtherValues();
  return makeEntryArray(k, v);
}
origin: haraldk/TwelveMonkeys

public void verifyAll() {
  super.verifyAll();
  MapAbstractTest.this.verifyAll();
}
origin: haraldk/TwelveMonkeys

/**
 *  Returns an array of elements that are <I>not</I> contained in a
 *  full collection.  Every element in the returned array must
 *  not exist in a collection returned by {@link #makeFullCollection()}.
 *  The default implementation returns a heterogenous array of elements
 *  without null.  Note that some of the tests add these elements
 *  to an empty or full collection, so if your collection restricts
 *  certain kinds of elements, you should override this method.
 */
public Object[] getOtherElements() {
  return getOtherNonNullElements();
}
origin: haraldk/TwelveMonkeys

/**
 * Implements the superclass method to return the map to be tested.
 *
 * @return the map to be tested
 */
public Object makeObject() {
  return makeEmptyMap();
}
origin: haraldk/TwelveMonkeys

  public void verifyAll() {
    super.verifyAll();
    MapAbstractTest.this.verifyAll();
  }
}
com.twelvemonkeys.util

Most used classes

  • CollectionUtil
    A utility class with some useful collection-related functions.
  • StringTokenIterator
    StringTokenIterator, a drop-in replacement for StringTokenizer. StringTokenIterator has the followin
  • BeanMap
    A Map adapter for a Java Bean. Ruthlessly stolen from
  • FilterIterator
    Wraps (decorates) an Iterator with extra functionality, to allow element filtering. Each element is
  • LRUMap
    Map implementation with size limit, that keeps its entries in LRU (least recently used) order, also
  • TimeoutMap,
  • DateConverter,
  • DefaultConverter,
  • NumberConverter,
  • PropertyConverter,
  • TimeConverter,
  • RegExTokenIterator,
  • ServiceRegistry,
  • WildcardStringParser,
  • LRUHashMap,
  • NullMap,
  • TimeFormatter,
  • ConversionException,
  • Converter
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