@Test public void testActionSort() { List<Action> actions; Action a1 = new Action("id1", null); Action a2 = new Action("id2", null); actions = new ArrayList<Action>(Arrays.asList(a1, a2)); Collections.sort(actions); assertEquals("id1", actions.get(0).getId()); assertEquals("id2", actions.get(1).getId()); actions = new ArrayList<Action>(Arrays.asList(a2, a1)); Collections.sort(actions); assertEquals("id1", actions.get(0).getId()); assertEquals("id2", actions.get(1).getId()); }
public String getId() { return id; }
Action implements Serializable, Cloneable, Comparable<Action> { public String getId() { return id; } }
Action implements Serializable, Cloneable, Comparable<Action> { public String getId() { return id; } Action();  Action(String id, String[] categories); }
Action implements Serializable, Cloneable, Comparable<Action> { public String getId() { return id; } Action();  Action(String id, String[] categories); boolean isEnableSet(); boolean isEnabled(); void setEnabled(boolean enabled); String getLabel(); void setLabel(String label); String getIcon(); void setIcon(String icon); String getLink(); @XNode("@link") void setLink(String link); String[] getCategories(); String getId(); @Override String toString(); int getOrder(); void setOrder(int order); int compareTo(Action anotherAction); List<String> getFilterIds(); void setFilterIds(List<String> filterIds); ActionFilter[] getFilters(); void setFilters(ActionFilter[] filters); void setCategories(String[] categories); @Deprecated @SuppressWarnings("rawtypes") Class[] getLinkParams(); @Deprecated void setLinkParams(Class<?>[] linkParams); String getConfirm(); void setConfirm(String confirm); boolean getAvailable(); void setAvailable(boolean available); String getHelp(); void setHelp(String title); boolean isImmediate(); void setImmediate(boolean immediate); String getType(); void setType(String type); ActionPropertiesDescriptor getPropertiesDescriptor(); void setPropertiesDescriptor(ActionPropertiesDescriptor properties); void setProperties(Map<String, Serializable> localProperties); Map<String, Serializable> getProperties(); void setAccessKey(String accessKey); String getAccessKey(); @Override boolean equals(Object other); @Override int hashCode(); @Override Action clone(); }
Action implements Serializable, Cloneable, Comparable<Action> { public String getId() { return id; } Action();  Action(String id, String[] categories); boolean isEnableSet(); boolean isEnabled(); void setEnabled(boolean enabled); String getLabel(); void setLabel(String label); String getIcon(); void setIcon(String icon); String getLink(); @XNode("@link") void setLink(String link); String[] getCategories(); String getId(); @Override String toString(); int getOrder(); void setOrder(int order); int compareTo(Action anotherAction); List<String> getFilterIds(); void setFilterIds(List<String> filterIds); ActionFilter[] getFilters(); void setFilters(ActionFilter[] filters); void setCategories(String[] categories); @Deprecated @SuppressWarnings("rawtypes") Class[] getLinkParams(); @Deprecated void setLinkParams(Class<?>[] linkParams); String getConfirm(); void setConfirm(String confirm); boolean getAvailable(); void setAvailable(boolean available); String getHelp(); void setHelp(String title); boolean isImmediate(); void setImmediate(boolean immediate); String getType(); void setType(String type); ActionPropertiesDescriptor getPropertiesDescriptor(); void setPropertiesDescriptor(ActionPropertiesDescriptor properties); void setProperties(Map<String, Serializable> localProperties); Map<String, Serializable> getProperties(); void setAccessKey(String accessKey); String getAccessKey(); @Override boolean equals(Object other); @Override int hashCode(); @Override Action clone(); static final String[] EMPTY_CATEGORIES; }