Package org.eclipse.m2m.atl.emftvm.util
Class Tuple
- java.lang.Object
-
- org.eclipse.m2m.atl.emftvm.util.Tuple
-
public final class Tuple extends java.lang.ObjectReflective, immutable implementation of OCL Tuples.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,? extends java.lang.Object>asMap()Returns thisTuple's value map.booleanequals(java.lang.Object o)static TuplefromCalendar(java.util.Calendar cal)Returns a newTuplefromcal.static TuplefromMap(java.util.Map<java.lang.String,? extends java.lang.Object> map)Creates a newTuplefrommap.java.lang.Objectget(java.lang.Object name)Returns the value forname.inthashCode()java.util.DatetoDate()Returns aDateinstance using the fields of this tuple.
-
-
-
Method Detail
-
fromMap
public static Tuple fromMap(java.util.Map<java.lang.String,? extends java.lang.Object> map)
Creates a newTuplefrommap.- Parameters:
map- theMapwith tuple data- Returns:
- a new
Tuplefrommap
-
fromCalendar
public static Tuple fromCalendar(java.util.Calendar cal)
Returns a newTuplefromcal. Supported fields: timezone, year, month, day_of_month, day_of_week, day_of_week_in_month, day_of_year, era, hour, hour_of_day, minute, second, millisecond, am_pm, week_of_month, week_of_year.- Parameters:
cal- the inputCalendar- Returns:
- a new
Tuplefromcal
-
get
public java.lang.Object get(java.lang.Object name)
Returns the value forname.- Parameters:
name- the element name- Returns:
- the value for
name
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
asMap
public java.util.Map<java.lang.String,? extends java.lang.Object> asMap()
Returns thisTuple's value map.- Returns:
- this
Tuple's value map
-
toDate
public java.util.Date toDate()
Returns aDateinstance using the fields of this tuple. Supported fields: timezone, locale, year, month, day_of_month, day_of_week, day_of_week_in_month, day_of_year, era, hour, hour_of_day, minute, second, millisecond, am_pm, week_of_month, week_of_year.- Returns:
- a
Dateinstance using the fields of this tuple - See Also:
Calendar
-
-