All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xtendm3-sdk.0.15.0.source-code.ReadOnlyMap Maven / Gradle / Ivy

There is a newer version: 0.18.3
Show newest version
import java.util.Collection;
import java.util.Map;
import java.util.Set;

class ReadOnlyMap implements Map {
  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public int size() {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public boolean isEmpty() {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public boolean containsKey(Object key) {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public boolean containsValue(Object value) {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  @Override
  public V get(Object key) {
    return null;
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public V put(K key, V value) {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public V remove(Object key) {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public void putAll(Map m) {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public void clear() {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public Set keySet() {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public Collection values() {
    throw new UnsupportedOperationException("Operation not permitted");
  }

  /**
   * This API only supports {@link #get(Object)}, no other operation is supported
   * @return nothing, throws instead
   * @throws UnsupportedOperationException all the time
   */
  @Override
  public Set> entrySet() {
    throw new UnsupportedOperationException("Operation not permitted");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy