/** * Returns the red component of this color. * * @return See above. */ public int getRed() { return (getValue() >> 24) & 0xff; }
public Resolution(int index, int x, int y) { this.index = index; this.sizeX = new PositiveInteger(x); this.sizeY = new PositiveInteger(y); }
/** * Wraps the specified integer into a Non negative integer. * * @param r The value to wrap. * @return See above. */ private static NonNegativeInteger unwrap(int r) { return new NonNegativeInteger(r); }
private Color getChannelColor(int colorCode) { switch (colorCode) { case 0: // red return new Color(255, 0, 0, 255); case 1: // green return new Color(0, 255, 0, 255); case 2: // blue return new Color(0, 0, 255, 255); case 3: // cyan return new Color(0, 255, 255, 255); case 4: // magenta return new Color(255, 0, 255, 255); case 5: // yellow return new Color(255, 255, 0, 255); } return new Color(255, 255, 255, 255); }
/** * Returns an <code>NonNegativeLong</code> object holding the value of * the specified string. * @param s The string to be parsed. * @return See above. */ public static NonNegativeLong valueOf(String s) { return new NonNegativeLong(Long.valueOf(s)); } }
/** * Returns an <code>PositiveLong</code> object holding the value of * the specified string. * @param s The string to be parsed. * @return See above. */ public static PositiveLong valueOf(String s) { return new PositiveLong(Long.valueOf(s)); } }
public static <T extends PrimitiveNumber> Angle createAngle(T value, Unit<Angle> valueUnit) { if (value == null) { return null; } return new Angle(value.getNumberValue(), valueUnit); }
public Resolution(int index, int x, int y) { this.index = index; this.sizeX = new PositiveInteger(x); this.sizeY = new PositiveInteger(y); }
/** * Returns the red component of this color. * * @return See above. */ public int getRed() { return (getValue() >> 24) & 0xff; }
/** * Wraps the specified integer into a Non negative integer. * * @param r The value to wrap. * @return See above. */ private static NonNegativeInteger unwrap(int r) { return new NonNegativeInteger(r); }
public static <T extends PrimitiveNumber> Frequency createFrequency(T value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value.getNumberValue(), valueUnit); }
@Override public PositiveInteger getChannelSamplesPerPixel(int imageIndex, int channelIndex) { return new PositiveInteger(1); }
/** * Returns the alpha component of this color. * * @return See above. */ public int getAlpha() { return getValue() & 0xff; }
/** * Returns the alpha component of this color. * * @return See above. */ public int getAlpha() { return getValue() & 0xff; }
/** * Returns the green component of this color. * * @return See above. */ public int getGreen() { return (getValue() >> 16) & 0xff; }
/** * Returns the blue component of this color. * * @return See above. */ public int getBlue() { return (getValue() >> 8) & 0xff; }
/** * Returns the blue component of this color. * * @return See above. */ public int getBlue() { return (getValue() >> 8) & 0xff; }
/** * Returns the green component of this color. * * @return See above. */ public int getGreen() { return (getValue() >> 16) & 0xff; }