org.apache.mahout.math
Class JsonVectorAdapter
java.lang.Object
org.apache.mahout.math.JsonVectorAdapter
- All Implemented Interfaces:
- com.google.gson.JsonDeserializer<Vector>, com.google.gson.JsonSerializer<Vector>
public class JsonVectorAdapter
- extends java.lang.Object
- implements com.google.gson.JsonSerializer<Vector>, com.google.gson.JsonDeserializer<Vector>
Field Summary |
static java.lang.String |
VECTOR
|
Method Summary |
Vector |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
|
com.google.gson.JsonElement |
serialize(Vector src,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VECTOR
public static final java.lang.String VECTOR
- See Also:
- Constant Field Values
JsonVectorAdapter
public JsonVectorAdapter()
serialize
public com.google.gson.JsonElement serialize(Vector src,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context)
- Specified by:
serialize
in interface com.google.gson.JsonSerializer<Vector>
deserialize
public Vector deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
throws com.google.gson.JsonParseException
- Specified by:
deserialize
in interface com.google.gson.JsonDeserializer<Vector>
- Throws:
com.google.gson.JsonParseException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.