Package xcat.exceptions

Examples of xcat.exceptions.XCATTypeMismatchException


    if (map.containsKey(key)) {
      Object value = map.get(key);
      if (value instanceof Integer)
  return ((Integer)value).intValue();
      else
  throw new XCATTypeMismatchException(Type.Int,
              TypeUtil.getType(value));
    } else {
      return dflt;
    }
  }
View Full Code Here


    if (map.containsKey(key)) {
      Object value = map.get(key);
      if (value instanceof Long)
  return ((Long)value).longValue();
      else
  throw new XCATTypeMismatchException(Type.Long,
              TypeUtil.getType(value));
    } else {
      return dflt;
    }
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value = map.get(key);
      if (value instanceof Float)
  return ((Float)value).floatValue();
      else
  throw new XCATTypeMismatchException(Type.Float,
              TypeUtil.getType(value));
    } else {
      return dflt;
    }
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value = map.get(key);
      if (value instanceof Double)
  return ((Double)value).doubleValue();
      else
  throw new XCATTypeMismatchException(Type.Double,
              TypeUtil.getType(value));
    } else {
      return dflt;
    }
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value = map.get(key);
      if (value instanceof String)
  return (String) value;
      else
  throw new XCATTypeMismatchException(Type.String,
              TypeUtil.getType(value));
    } else {
      return dflt;
    }
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value = map.get(key);
      if (value instanceof Boolean)
  return ((Boolean)value).booleanValue();
      else
  throw new XCATTypeMismatchException(Type.Bool,
              TypeUtil.getType(value));
    } else {
      return dflt;
    }
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value_ = map.get(key);
      if (value_ instanceof Integer)
  map.put(key, new Integer(value));
      else
  throw new XCATTypeMismatchException(TypeUtil.getType(value_),
              Type.Int);
    } else
      map.put(key, new Integer(value));
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value_ = map.get(key);
      if (value_ instanceof Long)
  map.put(key, new Long(value));
      else
  throw new XCATTypeMismatchException(TypeUtil.getType(value_),
              Type.Long);
    } else
      map.put(key, new Long(value));
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value_ = map.get(key);
      if (value_ instanceof Float)
  map.put(key, new Float(value));
      else
  throw new XCATTypeMismatchException(TypeUtil.getType(value_),
              Type.Float);
    } else
      map.put(key, new Float(value));
  }
View Full Code Here

    if (map.containsKey(key)) {
      Object value_ = map.get(key);
      if (value_ instanceof Double)
  map.put(key, new Double(value));
      else
  throw new XCATTypeMismatchException(TypeUtil.getType(value_),
              Type.Double);
    } else
      map.put(key, new Double(value));
  }
View Full Code Here

TOP

Related Classes of xcat.exceptions.XCATTypeMismatchException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.