Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.group.impl
Class FaceComparator

    java.lang.Object
      com.pietschy.command.group.impl.FaceComparator

All Implemented Interfaces:
  java.util.Comparator<CommandGroup>

    public class FaceComparator

extends java.lang.Object
implements java.util.Comparator<CommandGroup>

Comparator for comparing face instances based on their text value. The comparator compares faces based on a specified context.

Field Summary
`(package private) java.lang.String` | `context`

Constructor Summary
`FaceComparator(java.lang.String context)` Creates a new instance.

Method Summary
`int` | `compare(CommandGroup target, CommandGroup embedded)` Compares the two faces based on the context specified in the constructor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Comparator
`equals`

Field Detail

### context

    java.lang.String context

Constructor Detail

### FaceComparator

    public FaceComparator(java.lang.String context)

  Creates a new instance.

  Parameters:
    `context` - the context to compare.

Method Detail

### compare

    public int compare(CommandGroup target,
                       CommandGroup embedded)

  Compares the two faces based on the context specified in the constructor.

  Specified by:
    `compare` in interface `java.util.Comparator<CommandGroup>`
  Parameters:
    `target` - the face of the group that will accept the contribution.
    `embedded` - the face of the command to be embedded.
  Returns:
    0 if the faces match, -1 otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch