net.ajaest.jdk.data.kanji
Class Radical

java.lang.Object
  extended by net.ajaest.jdk.data.kanji.RadicalTag
      extended by net.ajaest.jdk.data.kanji.Radical
All Implemented Interfaces:
java.lang.Comparable<RadicalTag>

public class Radical
extends RadicalTag

Mutable class that stores information about a radical and provides methods to build radical information objects. Because the only attribute shared between radical's variants are the radical number, further information about the radical must be searched in the specific variant.

Author:
Luis Alfonso Arce González

Field Summary
 
Fields inherited from class net.ajaest.jdk.data.kanji.RadicalTag
radicalNumber, radsTypes, radsVars
 
Constructor Summary
Radical(java.lang.Integer number)
           
 
Method Summary
 void addRadicalVariant(RadicalVariant rvt)
          Adds the specified variant to this radical variant list.
 void addRadicalVariants(java.util.Collection<RadicalVariant> rads)
          Adds the specified variants stored in a collection to this radical variant list.
 
Methods inherited from class net.ajaest.jdk.data.kanji.RadicalTag
compareTo, getNumber, getRadicalVariant, getRadicalVariant, getVariants, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Radical

public Radical(java.lang.Integer number)
Method Detail

addRadicalVariant

public void addRadicalVariant(RadicalVariant rvt)
Adds the specified variant to this radical variant list. Only radical variants in which main number equals this radical's main number or in which main number is null will be added, otherwise and exception will be throw.

Parameters:
rvt - the radical variant to be added
Throws:
java.lang.IllegalArgumentException - if the variant's main number is not null and it's main number differs from this radical main number
See Also:
RadicalVariantTag.getAuxNumber(), RadicalVariantTag.getNumber()

addRadicalVariants

public void addRadicalVariants(java.util.Collection<RadicalVariant> rads)
Adds the specified variants stored in a collection to this radical variant list. Only radical variants in which main number equals this radical's main number or in which main number is null will be added, otherwise and exception will be throw.

Parameters:
rads - a collection containing the radical variants to be added
Throws:
java.lang.IllegalArgumentException - if any of the variant's main number is not null and it's main number differs from this radical main number
See Also:
RadicalVariantTag.getAuxNumber(), RadicalVariantTag.getNumber()