|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectReflector
public class Reflector
A Reflector is a device of an enigma machine that is used
to swap the values between pairs of letters according to the way
its wires are setup.
This implementation provides 2 types of reflectors B and C
representing the possible reflectors used in the enigma M3 machine.
It is called reflector because letters are permuted in pairs (for example,
in reflector type B you noticed that an entering letter 'A' gets changed
to letter 'Y' and an entering letter 'Y' gets changed to letter 'A')
| Constructor Summary | |
|---|---|
Reflector(int typeReflector)
A constructor of arity 1 that specifies the reflector type. |
|
| Method Summary | |
|---|---|
char |
getType()
Method getType returns the type of this reflector. |
java.lang.String |
getWiring()
Method getWiring returns a string representing
the wiring of this reflector. |
char |
outLetter(char inputLetter)
Method outLetter produces the output letter obtained
after the given letter enters the reflector. |
java.lang.String |
toString()
This method overrides java.lang.Object.toString() and returns a string representation of this Reflector. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Reflector(int typeReflector)
rotorType - is an integer 1 or 2 specifying types B and C,
respectively.| Method Detail |
|---|
public char outLetter(char inputLetter)
outLetter produces the output letter obtained
after the given letter enters the reflector.
inputLetter - is the letter entering the reflector
public char getType()
getType returns the type of this reflector.
public java.lang.String getWiring()
getWiring returns a string representing
the wiring of this reflector.
public java.lang.String toString()
Reflector.
toString in class java.lang.ObjectReflector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||