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

How to use
StringTo$Many
in
xapi.collect.api

Best Java code snippets using xapi.collect.api.StringTo$Many (Showing top 20 results out of 315)

origin: net.wetheinter/xapi-core-collect

private void updateMax() {
 while (map.containsKey(Integer.toString(max++))) {
  ;
 }
}
origin: net.wetheinter/xapi-core-collect

@Override
@SuppressWarnings({
  "rawtypes", "unchecked"
})
public Collection<IntTo<X>> toCollection(Collection<IntTo<X>> into) {
 if (into == null) {
  into = newList();
 }
 if (map instanceof StringToAbstract) {
  into.addAll(((StringToAbstract) map).valueSet());
 } else {
  final String[] keys = map.keyArray();
  Arrays.sort(keys);
  for (final String key : keys) {
   into.add(map.get(key));
  }
 }
 return into;
}
origin: net.wetheinter/xapi-core-collect

@Override
@SuppressWarnings("unchecked")
public boolean addAll(final IntTo<X>... items) {
 updateMax();
 for (final IntTo<X> item : items) {
  map.put(Integer.toString(max++), item);
 }
 return true;
}
origin: net.wetheinter/xapi-core-collect

@Override
public boolean findRemove(final IntTo<X> value, final boolean all) {
 if (value == null) {
  return false;
 }
 boolean success = false;
 final String[] keys = map.keyArray();
 main:
 for (int i = keys.length; i-->0;) {
  final String key = keys[i];
  final IntTo<X> item = map.get(key);
  if (item.size() == value.size()) {
   for (int j = item.size(); j-->0;) {
    if (!equals(item.get(j), value.get(j))) {
     continue main;
    }
   }
   if (!all) {
    return true;
   }
   success = true;
  }
 }
 return success;
}
origin: net.wetheinter/xapi-core-collect

@Override
public int indexOf(final IntTo<X> value) {
 if (value == null) {
  return -1;
 }
 final String[] keys = map.keyArray();
 main:
 for (int i = keys.length; i-->0;) {
  final String key = keys[i];
  final IntTo<X> item = map.get(key);
  if (item.size() == value.size()) {
   for (int j = item.size(); j-->0;) {
    if (!equals(item.get(j), value.get(j))) {
     continue main;
    }
   }
   return Integer.parseInt(key);
  }
 }
 return -1;
}
origin: net.wetheinter/xapi-core-collect

@Override
public boolean contains(final IntTo<X> value) {
 if (value == null) {
  return false;
 }
 main:
 for (final IntTo<X> item : map.values()) {
  if (item.size() == value.size()) {
   for (int i = item.size(); i-->0;) {
    if (!equals(item.get(i), value.get(i))) {
     continue main;
    }
   }
   return true;
  }
 }
 return false;
}
origin: net.wetheinter/xapi-core-collect

@Override
public void add(final int key, final X item) {
 map.get(Integer.toString(key)).add(item);
}
origin: net.wetheinter/xapi-core-collect

@Override
public boolean isEmpty() {
 return map.isEmpty();
}
origin: net.wetheinter/xapi-core-collect

@Override
public int size() {
 return map.size();
}
origin: net.wetheinter/xapi-core-collect

@Override
public IntTo<X> at(final int index) {
 return map.get(Integer.toString(index));
}
origin: net.wetheinter/xapi-core-collect

@Override
public Iterable<IntTo<X>> forEach() {
 return map.values();
}
origin: net.wetheinter/xapi-core-collect

@Override
@SuppressWarnings("unchecked")
public Set<IntTo<X>> asSet() {
 final Set<IntTo<X>> set = newSet();
 if (map instanceof StringToAbstract) {
  set.addAll(((StringToAbstract<IntTo<X>>)map).valueSet());
 } else {
  for (final IntTo<X> value : map.values()) {
   set.add(value);
  }
 }
 return set;
}
origin: net.wetheinter/xapi-core-collect

@Override
public IntTo<X> get(final Object key) {
 assertValid(key);
 return map.get(String.valueOf(key));
}
origin: net.wetheinter/xapi-core-collect

 @Override
 public IntTo<X> setValue(final IntTo<X> value) {
  return map.put(asString, value);
 }
};
origin: net.wetheinter/xapi-core-collect

@Override
public IntTo<X> pop() {
 updateMax();
 max--;
 final IntTo<X> items = map.remove(Integer.toString(max));
 if (items != null) {
  return items;
 }
 final String[] keys = map.keyArray();
 Arrays.sort(keys);
 return map.remove(keys[keys.length-1]);
}
origin: net.wetheinter/xapi-core-collect

@Override
@SuppressWarnings("unchecked")
public void setValue(final Object key, final Object value) {
 assertValid(key);
 if ((Integer)key > max) {
  max = (Integer)key;
 }
 map.put(String.valueOf(key), (IntTo<X>)value);
}
origin: net.wetheinter/xapi-core-collect

@Override
public boolean add(final IntTo<X> item) {
 updateMax();
 map.put(Integer.toString(max++), item);
 return true;
}
origin: net.wetheinter/xapi-core-collect

@Override
public boolean remove(final int index) {
 return map.remove(Integer.toString(index)) != null;
}
origin: net.wetheinter/xapi-core-collect

@Override
public IntTo<X> getValue() {
 return map.get(asString);
}
origin: net.wetheinter/xapi-core-collect

@Override
public IntTo<X> put(final Entry<Integer, IntTo<X>> item) {
 return map.put(Integer.toString(item.getKey()), item.getValue());
}
xapi.collect.apiStringTo$Many

Most used methods

  • clear
  • containsKey
  • get
  • isEmpty
  • keyArray
  • put
  • remove
  • size
  • values

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • 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