vec_math
Class NVector.IComp

java.lang.Object
  extended by vec_math.NVector.IComp
All Implemented Interfaces:
Comparator<NVector>
Enclosing class:
NVector

private static class NVector.IComp
extends Object
implements Comparator<NVector>

Special index comparator.


Field Summary
private  int index
          Index in the NVector to compare.
 
Constructor Summary
private NVector.IComp(int i)
           
 
Method Summary
 int compare(NVector n1, NVector n2)
          Compares two NVector using the specified index.
 
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

index

private int index
Index in the NVector to compare.

Constructor Detail

NVector.IComp

private NVector.IComp(int i)
Method Detail

compare

public int compare(NVector n1,
                   NVector n2)
Compares two NVector using the specified index. Throws a class cast exception, if they cannot be compared.

Specified by:
compare in interface Comparator<NVector>