Class RelWert

All Implemented Interfaces:
Invertible<RelWert>, RelWertFolge, Translet.Parseable<RelWert>

public class RelWert extends Entity<RelWert> implements Invertible<RelWert>, RelWertFolge
The three relative values to make up the "haken"("hkn"/"hook") motif. It is an "agebraic" type, i.e. immutable and all instances are constructed once for ever.
     praseable catalog name in languge...
      .."de"    .."symbolic"
     /                   \     numeric value
    /                     \    \
    O  "oben"="top"        ^    +1
    M  "mittig"="middle"   -     0
    U  "unten"="bottom"    v    -1
  
  • Field Details

    • catalog

      public static final EntityCatalog<RelWert> catalog
      Catalog for RelWert by names.
    • U

      public static final RelWert U
    • M

      public static final RelWert M
    • O

      public static final RelWert O
    • numericValue

      protected int numericValue
      The numeric value -1/0/1 for U/M/O.
  • Method Details

    • getNumericValue

      public int getNumericValue()
      Returns -1/0/1 for U/M/O.
    • getArrayIndex

      public int getArrayIndex()
      Returns 0/1/2 for U/M/O.
    • neither

      public RelWert neither(RelWert other)
      Return the third value, which is neither this, nor the other.
    • toString

      public String toString()
      Returns the Geman name, "O", "M", or "U".
      Overrides:
      toString in class Entity<RelWert>
    • inv

      public RelWert inv()
      Return the inverse of the RelWert. That is
             M   U   O
             M   O   U
        
      Specified by:
      inv in interface Invertible<RelWert>
    • length

      public int length()
      Seen as a RelWertFolge, a single RelWert has the length==1.
      Specified by:
      length in interface RelWertFolge
    • firstRelWert

      public RelWert firstRelWert()
      Any RelWertFolge is its own "first value" if it is seen as a RelWertFolge.
      Specified by:
      firstRelWert in interface RelWertFolge
    • lastRelWert

      public RelWert lastRelWert()
      Any RelWertFolge is its own "last value" if it is seen as a RelWertFolge.
      Specified by:
      lastRelWert in interface RelWertFolge