/** * Checks if an {@link AtlasObject} is a building or building:part that is valid for this check. * * @param object * {@link AtlasObject} to check * @return true if {@code object} has a {@code building:part=yes} tag */ private boolean isBuildingOrPart(final AtlasObject object) { return (BuildingTag.isBuilding(object) // Ignore roofs, as the are often used for items that have supports that are too // small to effectively map (such as a carport) && Validators.isNotOfType(object, BuildingTag.class, BuildingTag.ROOF)) || Validators.isNotOfType(object, BuildingPartTag.class, BuildingPartTag.NO); }
/** * Given an object, returns true if that object has a building tag or building part tag * indicating that it is either a building or a building part. * * @param object * any AtlasObject * @return true if object is a building or a building part, false otherwise */ private boolean isBuildingOrPart(final AtlasObject object) { return BuildingTag.isBuilding(object) || Validators.isNotOfType(object, BuildingPartTag.class, BuildingPartTag.NO); }
private static boolean validEdge(final Edge edge) { return Validators.isNotOfType(edge, HighwayTag.class, HighwayTag.NO) && Validators.isOfType(edge, AreaTag.class, AreaTag.YES) && edge.isMasterEdge(); }
@Test public void testIsNotOfType() { Assert.assertTrue(Validators.isNotOfType(new TestTaggable(NaturalTag.BEACH), NaturalTag.class, NaturalTag.BAY)); }