net.ajaest.jdk.data.kanji
Class Radical
java.lang.Object
net.ajaest.jdk.data.kanji.RadicalTag
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
Constructor Summary |
Radical(java.lang.Integer number)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Radical
public Radical(java.lang.Integer number)
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()