public ColorTransitioner(final List<ColorPoint> colorPoints){
  if (colorPoints == null) {
    throw new NullPointerException("Colors can't be null");
  }
  if (colorPoints.size() == 0) {
    throw new IllegalArgumentException("ColorTransitioner must have at least one column");
  }
  colorPoints.sort(null);
  if (colorPoints.get(0).point != 0 || colorPoints.get(colorPoints.size() - 1).point != 1) {
    throw new IllegalArgumentException("The first and the last color must be at point 0 and point 1.");
  }
  this.colors=colorPoints;
}

public ColorTransitioner ( final List < ColorPoint > colorPoints ) { if ( colorPoints == null ) { throw new NullPointerException ( "Colors can't be null" ) ; } if ( colorPoints . size ( ) == 0 ) { throw new IllegalArgumentException ( "ColorTransitioner must have at least one column" ) ; } colorPoints . sort ( null ) ; if ( colorPoints . get ( 0 ) . point != 0 || colorPoints . get ( colorPoints . size ( ) - 1 ) . point != 1 ) { throw new IllegalArgumentException ( "The first and the last color must be at point 0 and point 1." ) ; } this . colors = colorPoints ; }
creates a colortransitioner from a list of color points .
