/** * {@inheritDoc} */ @Override public Number getFlagValue() { return chemobj.getFlagValue(); }
/** * {@inheritDoc} */ @Override public Number getFlagValue() { return chemobj.getFlagValue(); }
/** * Constructs a new IChemObject by copying the flags, and the * identifier. It does not copy the listeners and properties. * * @param chemObject the object to copy */ public ChemObject(IChemObject chemObject) { // copy the flags flags = chemObject.getFlagValue().shortValue(); // copy the identifier identifier = chemObject.getID(); }
/** * Constructs a new IChemObject by copying the flags, and the * identifier. It does not copy the listeners and properties. * * @param chemObject the object to copy */ public ChemObject(IChemObject chemObject) { // copy the flags flags = chemObject.getFlagValue().shortValue(); // copy the identifier identifier = chemObject.getID(); }
/** * Constructs a new IChemObject by copying the flags, and the * identifier. It does not copy the listeners and properties. * * @param chemObject the object to copy */ public ChemObject(IChemObject chemObject) { // copy the flags flags = chemObject.getFlagValue().shortValue(); // copy the identifier identifier = chemObject.getID(); }
/** * Constructs a new IChemObject by copying the flags, and the * identifier. It does not copy the listeners and properties. * * @param chemObject the object to copy */ public ChemObject(IChemObject chemObject) { // copy the flags flags = chemObject.getFlagValue().shortValue(); // copy the identifier identifier = chemObject.getID(); }
/** * Different flags are reflected by different numbers. */ @Test public void testGetFlagValueDifferentFlags() { IChemObject chemObject = newChemObject(); chemObject.setFlag(CDKConstants.ISALIPHATIC, true); IChemObject chemObject2 = newChemObject(); chemObject2.setFlag(CDKConstants.VISITED, true); Assert.assertNotSame(chemObject.getFlagValue(), chemObject2.getFlagValue()); }
@Test public void testGetFlagValueZeroDefault() { IChemObject chemObject = new NaturalElement("C", 12); Assert.assertEquals((short) 0, chemObject.getFlagValue()); }
/** * The number is always the same for the same flag. */ @Test public void testGetFlagValueSameFlag() { IChemObject chemObject = newChemObject(); chemObject.setFlag(CDKConstants.ISPLACED, true); IChemObject chemObject2 = newChemObject(); chemObject2.setFlag(CDKConstants.ISPLACED, true); Assert.assertEquals(chemObject.getFlagValue(), chemObject2.getFlagValue()); }
@Test public void testGetFlagValueZeroDefault() { IChemObject chemObject = newChemObject(); Assert.assertEquals((short) 0, chemObject.getFlagValue()); }
@Test public void testGetFlagValue() { IChemObject chemObject = newChemObject(); chemObject.setFlag(CDKConstants.ISALIPHATIC, true); Assert.assertNotSame((short) 0, chemObject.getFlagValue()); }