📄 comparisonmeasure.java
字号:
{
this._objSquaredEuclidean = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objChebychev = null;
_objCityBlock = null;
_objMinkowski = null;
_objSimpleMatching = null;
_objJaccard = null;
_objTanimoto = null;
_objBinarySimilarity = null;
}
/**
* Gets Chebychev object.
*/
public Chebychev getChebychev()
{
return _objChebychev;
}
/**
* Replaces the existing Chebychev object with a new object.
* If you pass in a null value to this method, the Chebychev object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setChebychev(Chebychev obj)
{
this._objChebychev = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objCityBlock = null;
_objMinkowski = null;
_objSimpleMatching = null;
_objJaccard = null;
_objTanimoto = null;
_objBinarySimilarity = null;
}
/**
* Gets CityBlock object.
*/
public CityBlock getCityBlock()
{
return _objCityBlock;
}
/**
* Replaces the existing CityBlock object with a new object.
* If you pass in a null value to this method, the CityBlock object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setCityBlock(CityBlock obj)
{
this._objCityBlock = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objChebychev = null;
_objMinkowski = null;
_objSimpleMatching = null;
_objJaccard = null;
_objTanimoto = null;
_objBinarySimilarity = null;
}
/**
* Gets Minkowski object.
*/
public Minkowski getMinkowski()
{
return _objMinkowski;
}
/**
* Replaces the existing Minkowski object with a new object.
* If you pass in a null value to this method, the Minkowski object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setMinkowski(Minkowski obj)
{
this._objMinkowski = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objChebychev = null;
_objCityBlock = null;
_objSimpleMatching = null;
_objJaccard = null;
_objTanimoto = null;
_objBinarySimilarity = null;
}
/**
* Gets SimpleMatching object.
*/
public SimpleMatching getSimpleMatching()
{
return _objSimpleMatching;
}
/**
* Replaces the existing SimpleMatching object with a new object.
* If you pass in a null value to this method, the SimpleMatching object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setSimpleMatching(SimpleMatching obj)
{
this._objSimpleMatching = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objChebychev = null;
_objCityBlock = null;
_objMinkowski = null;
_objJaccard = null;
_objTanimoto = null;
_objBinarySimilarity = null;
}
/**
* Gets Jaccard object.
*/
public Jaccard getJaccard()
{
return _objJaccard;
}
/**
* Replaces the existing Jaccard object with a new object.
* If you pass in a null value to this method, the Jaccard object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setJaccard(Jaccard obj)
{
this._objJaccard = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objChebychev = null;
_objCityBlock = null;
_objMinkowski = null;
_objSimpleMatching = null;
_objTanimoto = null;
_objBinarySimilarity = null;
}
/**
* Gets Tanimoto object.
*/
public Tanimoto getTanimoto()
{
return _objTanimoto;
}
/**
* Replaces the existing Tanimoto object with a new object.
* If you pass in a null value to this method, the Tanimoto object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setTanimoto(Tanimoto obj)
{
this._objTanimoto = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objChebychev = null;
_objCityBlock = null;
_objMinkowski = null;
_objSimpleMatching = null;
_objJaccard = null;
_objBinarySimilarity = null;
}
/**
* Gets BinarySimilarity object.
*/
public BinarySimilarity getBinarySimilarity()
{
return _objBinarySimilarity;
}
/**
* Replaces the existing BinarySimilarity object with a new object.
* If you pass in a null value to this method, the BinarySimilarity object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setBinarySimilarity(BinarySimilarity obj)
{
this._objBinarySimilarity = obj;
if( obj == null )
return;
obj._setParent(this);
_objEuclidean = null;
_objSquaredEuclidean = null;
_objChebychev = null;
_objCityBlock = null;
_objMinkowski = null;
_objSimpleMatching = null;
_objJaccard = null;
_objTanimoto = null;
}
/**
* Marshals this object to an element.
*/
public com.borland.xml.toolkit.Element marshal()
{
com.borland.xml.toolkit.Element elem = new com.borland.xml.toolkit.Element(get_TagName());
/** Marshals "compareFunction" attribute */
elem.addAttribute(compareFunction.marshal());
/** Marshals "kind" attribute */
elem.addAttribute(kind.marshal());
/** Marshals "minimum" attribute */
elem.addAttribute(minimum.marshal());
/** Marshals "maximum" attribute */
elem.addAttribute(maximum.marshal());
/** Marshals a list of Extension objects to elements */
Iterator it1 = _objExtension.iterator();
while( it1.hasNext() )
{
Extension obj = (Extension)it1.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a Euclidean object to an element */
if( _objEuclidean != null )
elem.addContent(_objEuclidean.marshal());
/** Marshals a SquaredEuclidean object to an element */
if( _objSquaredEuclidean != null )
elem.addContent(_objSquaredEuclidean.marshal());
/** Marshals a Chebychev object to an element */
if( _objChebychev != null )
elem.addContent(_objChebychev.marshal());
/** Marshals a CityBlock object to an element */
if( _objCityBlock != null )
elem.addContent(_objCityBlock.marshal());
/** Marshals a Minkowski object to an element */
if( _objMinkowski != null )
elem.addContent(_objMinkowski.marshal());
/** Marshals a SimpleMatching object to an element */
if( _objSimpleMatching != null )
elem.addContent(_objSimpleMatching.marshal());
/** Marshals a Jaccard object to an element */
if( _objJaccard != null )
elem.addContent(_objJaccard.marshal());
/** Marshals a Tanimoto object to an element */
if( _objTanimoto != null )
elem.addContent(_objTanimoto.marshal());
/** Marshals a BinarySimilarity object to an element */
if( _objBinarySimilarity != null )
elem.addContent(_objBinarySimilarity.marshal());
return elem;
}
/**
* Unmarshals the specified "ComparisonMeasure" element back to a ComparisonMeasure object.
*/
public static ComparisonMeasure unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
ComparisonMeasure __objComparisonMeasure = new ComparisonMeasure();
if( __objComparisonMeasure != null ) //found the element?
{
/** Unmarshals "compareFunction" attribute */
__objComparisonMeasure.compareFunction.setValue(elem.getAttribute("compareFunction"));
/** Unmarshals "kind" attribute */
__objComparisonMeasure.kind.setValue(elem.getAttribute("kind"));
/** Unmarshals "minimum" attribute */
__objComparisonMeasure.minimum.setValue(elem.getAttribute("minimum"));
/** Unmarshals "maximum" attribute */
__objComparisonMeasure.maximum.setValue(elem.getAttribute("maximum"));
}
/** Unmarshals a list of "<<_tagName_>>" elements back to Extension objects. */
Iterator it1 = elem.getChildren(Extension._tagName).iterator();
while( it1.hasNext() )
__objComparisonMeasure.addExtension(Extension.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
/** Unmarshals an element back to a Euclidean object */
__objComparisonMeasure.setEuclidean(Euclidean.unmarshal(elem.getChild(Euclidean._tagName)));
/** Unmarshals an element back to a SquaredEuclidean object */
__objComparisonMeasure.setSquaredEuclidean(SquaredEuclidean.unmarshal(elem.getChild(SquaredEuclidean._tagName)));
/** Unmarshals an element back to a Chebychev object */
__objComparisonMeasure.setChebychev(Chebychev.unmarshal(elem.getChild(Chebychev._tagName)));
/** Unmarshals an element back to a CityBlock object */
__objComparisonMeasure.setCityBlock(CityBlock.unmarshal(elem.getChild(CityBlock._tagName)));
/** Unmarshals an element back to a Minkowski object */
__objComparisonMeasure.setMinkowski(Minkowski.unmarshal(elem.getChild(Minkowski._tagName)));
/** Unmarshals an element back to a SimpleMatching object */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -