cds.astro
Class Mtype

java.lang.Object
  extended by cds.astro.Mtype
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Mtype
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Constructor Summary
Mtype()
          Empty constructor.
Mtype(java.lang.String str)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Copy values parameters
 boolean equals(java.lang.Object o)
          Compares two Mtype objects
 int get()
          Get the binary type
 int hashCode()
          Compute the hashcode
 boolean isUnknown()
          Check if the morph. type is unknown
 int parse(java.lang.String str)
          Parses a string representing a morphological type
 int parse(java.lang.String str, int offset)
          Parses a string representing a morphological type
 void reset()
          Resets the morph. type to unknown
 void set(java.lang.String str)
          Sets a morpholical type from a string
 java.lang.String toString()
          Edits a coded morphological type
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mtype

public Mtype()
Empty constructor. Sets the morph. type to Unknown type


Mtype

public Mtype(java.lang.String str)
Constructor. Parses the string to build the morph. type

Parameters:
str - string containing the morph. type to parse
Method Detail

set

public void set(java.lang.String str)
Sets a morpholical type from a string

Parameters:
str - string to parse

reset

public void reset()
Resets the morph. type to unknown


isUnknown

public boolean isUnknown()
Check if the morph. type is unknown

Returns:
true if it is unknown, false otherwise

parse

public int parse(java.lang.String str)
Parses a string representing a morphological type

Parameters:
str - string containing the morph. type to parse
Returns:
the first char not used in the parsing

parse

public int parse(java.lang.String str,
                 int offset)
Parses a string representing a morphological type

Parameters:
str - string containing the morph. type to parse
offset - first char to use for parsing the morphological type
Returns:
the first char not used in the parsing

get

public int get()
Get the binary type

Returns:
the binary coding of the morphological type

toString

public java.lang.String toString()
Edits a coded morphological type

Overrides:
toString in class java.lang.Object
Returns:
the edited morphological type

equals

public boolean equals(java.lang.Object o)
Compares two Mtype objects

Overrides:
equals in class java.lang.Object
Parameters:
o - object to compare
Returns:
true if the objects are identical (same value), false otherwise

hashCode

public int hashCode()
Compute the hashcode

Overrides:
hashCode in class java.lang.Object
Returns:
the hascode value

clone

public java.lang.Object clone()
Copy values parameters

Overrides:
clone in class java.lang.Object
Returns:
a copy of the object