List of usage examples for org.springframework.util Assert state
@Deprecated public static void state(boolean expression)
From source file:org.arrow.model.event.endevent.AbstractEndEvent.java
private boolean join(@SuppressWarnings("unused") Execution execution) { Assert.notNull(getIncomingFlows(), "no incoming flows for " + getId()); Assert.state(!getIncomingFlows().isEmpty()); for (Flow flow : getIncomingFlows()) { if (!flow.isEnabled()) { warn("flow with id " + flow.getId() + " is disabled"); } else if (!flow.isFinished()) { return false; }/*w ww.j a v a 2s.c o m*/ } return true; }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(String asString) { Assert.state(type == Type.STRING); this.asString = asString; }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(Double asDouble) { Assert.state(type == Type.DOUBLE); this.asNumber = asDouble; }
From source file:org.LexGrid.LexBIG.Impl.helpers.DefaultCodeToReturnResolver.java
public ResolvedConceptReference buildResolvedConceptReference(CodeToReturn codeToReturn, LocalNameList restrictToProperties, PropertyType[] restrictToPropertyTypes, Filter[] filters, boolean resolve) throws LBInvocationException { ResolvedConceptReferenceList returnList = this.buildResolvedConceptReference( DaoUtility.createNonTypedList(codeToReturn), restrictToProperties, restrictToPropertyTypes, filters, resolve); Assert.state(returnList.getResolvedConceptReferenceCount() <= 1); if (returnList.getResolvedConceptReferenceCount() == 1) { return returnList.getResolvedConceptReference(0); } else {/*from w ww . j ava2 s .c om*/ return null; } }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(Integer asInteger) { Assert.state(type == Type.INTEGER); this.asNumber = Double.valueOf(asInteger.doubleValue()); }
From source file:org.eclipse.swordfish.core.configuration.xml.XmlToPropertiesTransformerImpl.java
private Map<String, String> flattenProperties(Map<String, List<String>> props) { Map<String, String> ret = new HashMap<String, String>(props.size()); for (String key : props.keySet()) { List<String> values = props.get(key); Assert.state(values.size() > 0); //remove root element if (key.contains(".")) { key = key.substring(key.indexOf(".") + 1); }//from w w w . ja v a2 s . c o m if (values.size() == 1) { ret.put(key, values.get(0)); } else { for (int i = 0; i < values.size(); i++) { ret.put(key + "{" + (i + 1) + "}", values.get(i)); } } } return ret; }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(double asDouble) { Assert.state(type == Type.DOUBLE); this.asNumber = Double.valueOf(asDouble); }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(Boolean asBoolean) { Assert.state(type == Type.BOOLEAN); this.asBoolean = asBoolean; }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(boolean asBoolean) { Assert.state(type == Type.BOOLEAN); this.asBoolean = Boolean.valueOf(asBoolean); }
From source file:com.autentia.wuija.widget.property.Variant.java
public void setValue(Date asDate) { Assert.state(type == Type.DATE); this.asDate = asDate; }