com.cc.framework.ui.painter.html
Class LiteralOptionsComparator

java.lang.Object
  extended bycom.cc.framework.ui.painter.html.LiteralOptionsComparator
All Implemented Interfaces:
OptionsComparator

public class LiteralOptionsComparator
extends java.lang.Object
implements OptionsComparator

Options Comparator for String literals

Version:
$Revision: 1.11 $
Author:
Harald Schulz

Field Summary
private  java.lang.Object[] match
          String Literals for comparison
 
Constructor Summary
LiteralOptionsComparator(java.lang.Object value)
          Constructor
LiteralOptionsComparator(java.lang.Object[] values)
          Constructor
 
Method Summary
 int indexOf(java.lang.Object value)
          returns the index of the element that matches the given value
 boolean match(java.lang.Object value)
          Checks if the specified Option is selected
private static boolean match(java.lang.Object obj1, java.lang.Object obj2)
          Compares two option values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

match

private java.lang.Object[] match
String Literals for comparison

Constructor Detail

LiteralOptionsComparator

public LiteralOptionsComparator(java.lang.Object value)
Constructor

Parameters:
value - The Literal

LiteralOptionsComparator

public LiteralOptionsComparator(java.lang.Object[] values)
Constructor

Parameters:
values - The Literal array
Method Detail

match

public boolean match(java.lang.Object value)
Description copied from interface: OptionsComparator
Checks if the specified Option is selected

Specified by:
match in interface OptionsComparator
Parameters:
value - The option to test
Returns:
true if the option is selected; false otherwise.
See Also:
OptionsComparator.match(java.lang.Object)

indexOf

public int indexOf(java.lang.Object value)
Description copied from interface: OptionsComparator
returns the index of the element that matches the given value

Specified by:
indexOf in interface OptionsComparator
Parameters:
value - The option to test
Returns:
>= 0 if the option is selected; -1 otherwise.
See Also:
OptionsComparator.indexOf(java.lang.Object)

match

private static boolean match(java.lang.Object obj1,
                             java.lang.Object obj2)
Compares two option values

Parameters:
obj1 - first object to compare
obj2 - second object to compare
Returns:
returns true when both option values are equal


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.