MetaDone
|
Static Public Member Functions | |
static boolean | equal (Object a, Object b) |
static int | hashCode (Object...objs) |
static int | hashCodeIter (Iterator<?> objs) |
static final< T > T | cast (Class< T > cla, Object value) |
static final< T > T | cast (Class< T > cla, Object value, T def) |
static< T > T | castUnsafe (Class<?> cla, Object value, T def) |
Private Member Functions | |
Objects () |
Collection of methods often used with any object.
It includes functions to:
Partially copied from another project.
metadone.util.Objects.Objects | ( | ) | [private] |
static final<T> T metadone.util.Objects.cast | ( | Class< T > | cla, |
Object | value | ||
) | [static] |
Casts a value to the given type and returns null
instead of throwing an exception.
<T> | The expected type |
cla | The class |
value | The value to cast |
null
NullPointerException | when cla is null |
References metadone.util.Objects.castUnsafe().
Referenced by metadone.client.grasyla2.value.UpdaterEngine.abortEvaluate(), metadone.client.grasyla2.swing.JMenuValueAdaptor.adapt(), metadone.client.grasyla2.swing.JAdaptValue.adapt(), metadone.client.grasyla2.swing.JAdaptString.adapt(), metadone.publish_subscribe.EventTowerEq< M >.NodeEq.add(), metadone.client.grasyla2.BaseGrasylaFactoryConfig.addComponentValueUnBuilder(), metadone.metabusiness.impl.MetaObject_impl.addSuperType(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyGraphVizLayout.clearControlPoints(), metadone.metabusiness.impl.MetaObject_impl.compareTo(), metadone.metabusiness.impl.ConcreteObject_impl.compareTo(), metadone.util.Pair< A, B >.equals(), metadone.util.MapFcts.Compose< A, C >.equals(), metadone.util.MapFcts.Equal.equals(), metadone.util.ImmutableList< E >.equals(), metadone.metabusiness.syntax.grasyla.GrasylaPhenomenon.equals(), metadone.metabusiness.syntax.grasyla.GrasylaEquationHeader.equals(), metadone.metabusiness.syntax.grasyla.GrasylaEquation.equals(), metadone.metabusiness.syntax.AbstractView.equals(), metadone.metabusiness.script.ScriptEvaluator.ScriptResult.Abstract.equals(), metadone.metabusiness.impl.MetaObject_impl.equals(), metadone.metabusiness.impl.ConcreteObject_impl.equals(), metadone.metabusiness.impl.ConcreteDef_impl.equals(), metadone.metabusiness.annex.User.equals(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateDependency.equals(), metadone.client.grasyla2.visuallibrary.AnchorKey.equals(), metadone.client.grasyla2.visuallibrary.AnchorDefinition.equals(), metadone.client.grasyla2.value.Value.equals(), metadone.client.grasyla2.swing.TableRow.equals(), metadone.client.grasyla2.SelectorBestEquation.PartialHeader.equals(), metadone.client.grasyla2.ref.SidedMetaObject.equals(), metadone.client.grasyla2.GrasylaEngineFactory.CacheKey.equals(), metadone.client.grasyla2.GrasylaEngine.HasType.equals(), metadone.client.grasyla2.base.GrasylaComponent< C >.equals(), metadone.client.display.ConcreteObjectGroup.equals(), metadone.client.dialog.swing.genConcreteObject.Wmetaproperty.equals(), metadone.client.grasyla2.swing.JTreeEngine.evaluateComponent(), metadone.client.grasyla2.swing.TreeNode.eventWillCollapse(), metadone.client.grasyla2.swing.TreeNode.eventWillExpand(), metadone.client.grasyla2.actions.GAction.execute(), metadone.client.grasyla2.actions.GAction.getContext(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyGraphVizLayout.getEdges(), metadone.client.grasyla2.swing.TreeNode.getModel(), metadone.client.grasyla2.visuallibrary.widgets.backgrounds.AbstractWidgetShape.getParentStrategy(), metadone.client.grasyla2.value.Value.getValueAsException(), metadone.client.grasyla2.GrasylaEngine.isAdapted(), metadone.metabusiness.impl.ConcreteModel_impl.isOrdered(), metadone.client.grasyla2.visuallibrary.GraphEngine.makeContextMenu(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyControlAddRemoveAction.mouseClicked(), metadone.client.grasyla2.GrasylaFactoryConfig.newBuilder(), metadone.client.grasyla2.visuallibrary.VLRotateEngine.notifyChildChanged(), metadone.client.grasyla2.visuallibrary.VLEdgeEngine.notifyChildChanged(), metadone.client.grasyla2.visuallibrary.VLBoxEngine.notifyChildChanged(), metadone.client.grasyla2.swing.JBoxEngine.notifyChildChanged(), metadone.publish_subscribe.EventTowerEq< M >.NodeEq.remove(), metadone_bundle_repository.RepositoryTracker.removedService(), metadone.client.grasyla2.visuallibrary.widgets.W_Box.setLayout(), metadone.client.grasyla2.visuallibrary.GraphEngine.trigger(), metadone.client.grasyla2.GrasylaEngine.trigger(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MakeFreeWidget.update(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyGraphVizLayout.updateControlPoints(), metadone.client.MetadoneDesktopPane.updateModelMenuItems(), metadone.client.grasyla2.value.UpdaterEngine.updateValue(), and metadone.client.grasyla2.actions.GrasylaActionAttributeHandler.valueChanged().
static final<T> T metadone.util.Objects.cast | ( | Class< T > | cla, |
Object | value, | ||
T | def | ||
) | [static] |
Casts a value to the given type and returns a default value instead of throwing an exception.
<T> | The expected type |
cla | The class |
value | The value to cast |
def | The default value |
NullPointerException | when cla is null |
References metadone.util.Objects.castUnsafe().
static <T> T metadone.util.Objects.castUnsafe | ( | Class<?> | cla, |
Object | value, | ||
T | def | ||
) | [static] |
Casts a value to the given type and returns a default value instead of throwing an exception.
<T> | The expected type |
cla | The class |
value | The value to cast |
def | The default value |
NullPointerException | when cla is null |
Referenced by metadone.util.Objects.cast().
static boolean metadone.util.Objects.equal | ( | Object | a, |
Object | b | ||
) | [static] |
Tests if two objects are equal (null
is permitted).
a | The first object or null |
b | The second object or null |
Referenced by metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.createScript(), metadone.util.IteratorUtil.equal(), metadone.util.Pair< A, B >.equals(), metadone.util.MapFcts.Compose< A, C >.equals(), metadone.util.MapFcts.Equal.equals(), metadone.util.ImmutableList< E >.equals(), metadone.metabusiness.syntax.grasyla.GrasylaEquationHeader.equals(), metadone.metabusiness.script.ScriptEvaluator.ScriptResult.Abstract.equals(), metadone.metabusiness.impl.ConcreteDef_impl.equals(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.RotateDependency.equals(), metadone.client.grasyla2.visuallibrary.RootWidget.equals(), metadone.client.grasyla2.visuallibrary.AnchorKey.equals(), metadone.client.grasyla2.visuallibrary.AnchorDefinition.equals(), metadone.client.grasyla2.value.Value.equals(), metadone.client.grasyla2.SelectorBestEquation.PartialHeader.equals(), metadone.client.grasyla2.base.GrasylaComponent< C >.equals(), metadone.client.dialog.swing.genConcreteObject.Wmetaproperty.equals(), metadone.client.grasyla2.GrasylaEngineFactory.equivalentContext(), metadone.client.grasyla2.bool.MatchEngine.evaluate(), metadone.metabusiness.impl.ConcreteProperty_impl< T >.findEnumeratedValue(), metadone.metabusiness.script.groovy.GroovyProxyCO.findMetaProperty(), metadone.metabusiness.syntax.AbstractView.getElement(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getExpressionValue(), metadone.metabusiness.syntax.grasyla.GrasylaScript.hasFeatureOption(), metadone.client.grasyla2.actions.UserEvent.hasName(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyGraphVizLayout.ignoreChild(), metadone.util.ImmutableList< E >.indexOf(), metadone.client.grasyla2.GrasylaEngine.isAdapted(), metadone.util.ImmutableList< E >.lastIndexOf(), metadone.util.MapFcts.Equal.map(), metadone.client.grasyla2.visuallibrary.widgets.RotateWidget.registerRotateDependency(), metadone.client.grasyla2.swing.JOptionGroupEngine.reselect(), metadone.client.grasyla2.visuallibrary.VLEdgeEngine.setAnchorKey(), metadone.client.grasyla2.GrasylaContext.setPhenomenonValue(), metadone.metabusiness.impl.ConcreteProperty_impl< T >.setValue(), metadone.client.grasyla2.GrasylaFactoryStore.setWorkspace(), metadone.metabusiness.events.Question< T >.toString(), metadone.client.grasyla2.GrasylaEngine.unregisterSubscriber(), metadone.client.grasyla2.GrasylaEngine.updateComponent(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyGraphVizLayout.updateControlPoints(), and metadone.client.grasyla2.swing.JBorderBoxEngine.ChildComponentAttributeHandler.valueChanged().
static int metadone.util.Objects.hashCode | ( | Object... | objs | ) | [static] |
Produces a hash code for a sequence of objects.
The hash code is independent from the order of the elements.
hxor = XOR { i.hashCode() | i in objs } hplus = SUM { i.hashCode() | i in objs } result = hxor xor Integer.rotateLeft(hplus, 0x10)
objs | The objects |
Referenced by metadone.util.Pair< A, B >.hashCode(), metadone.util.MapFcts.Compose< A, C >.hashCode(), metadone.util.MapFcts.Equal.hashCode(), metadone.metabusiness.syntax.grasyla.GrasylaEquationHeader.hashCode(), metadone.metabusiness.impl.ConcreteDef_impl.hashCode(), metadone.client.grasyla2.visuallibrary.RootWidget.hashCode(), metadone.client.grasyla2.visuallibrary.AnchorKey.hashCode(), metadone.client.grasyla2.visuallibrary.AnchorDefinition.hashCode(), metadone.client.grasyla2.value.Value.hashCode(), metadone.client.grasyla2.swing.TableRow.hashCode(), metadone.client.grasyla2.SelectorBestEquation.PartialHeader.hashCode(), metadone.client.grasyla2.ref.SidedMetaObject.hashCode(), metadone.client.grasyla2.GrasylaEngineFactory.CacheKey.hashCode(), metadone.client.grasyla2.GrasylaEngine.HasType.hashCode(), metadone.client.grasyla2.base.GrasylaComponent< C >.hashCode(), and metadone.client.dialog.swing.genConcreteObject.Wmetaproperty.hashCode().
static int metadone.util.Objects.hashCodeIter | ( | Iterator<?> | objs | ) | [static] |
Produces a hash code for a sequence of objects.
objs | The object sequence |
NullPointerException | when objs is null |
Referenced by metadone.util.ImmutableList< E >.hashCode(), and metadone.client.grasyla2.base.GrasylaComponent< C >.hashCode().