org.apache.mahout.clustering.dirichlet
Class JsonClusterAdapter

java.lang.Object
  extended by org.apache.mahout.clustering.dirichlet.JsonClusterAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<DirichletCluster<?>>, com.google.gson.JsonSerializer<DirichletCluster<?>>

public class JsonClusterAdapter
extends java.lang.Object
implements com.google.gson.JsonSerializer<DirichletCluster<?>>, com.google.gson.JsonDeserializer<DirichletCluster<?>>


Constructor Summary
JsonClusterAdapter()
           
 
Method Summary
 DirichletCluster<?> deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
           
 com.google.gson.JsonElement serialize(DirichletCluster<?> 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
 

Constructor Detail

JsonClusterAdapter

public JsonClusterAdapter()
Method Detail

serialize

public com.google.gson.JsonElement serialize(DirichletCluster<?> src,
                                             java.lang.reflect.Type typeOfSrc,
                                             com.google.gson.JsonSerializationContext context)
Specified by:
serialize in interface com.google.gson.JsonSerializer<DirichletCluster<?>>

deserialize

public DirichletCluster<?> 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<DirichletCluster<?>>
Throws:
com.google.gson.JsonParseException


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.