You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SerialX-core/src/main/java/org/ugp/serialx/GenericScope.java
+96-19Lines changed: 96 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@
22
22
23
23
24
24
/**
25
-
* This is some kind of hybrid between {@link List} and {@link Map} which allow you to have both variables and independent values managed by one Object. <br>
25
+
* This collection is some sort of hybrid between {@link List} and {@link Map} which allow you to have both variables and independent values managed by one Object. <br>
26
26
* Note: Variables are managed and accessed classically via {@link Map} methods such as <code>put(KeyT key, Object)</code> and array of independent values is accessed by via {@link List} methods such as <code>add(Object)</code> and <code>get(int)</code><br>
27
27
* Also this is java representation of JUSS GenericScope group such as:
28
28
* <pre>
@@ -35,12 +35,12 @@
35
35
*
36
36
* @author PETO
37
37
*
38
-
* @since 1.2.0
38
+
* @since 1.3.5
39
39
*
40
40
* @param <KeyT> generic type of variables key.
41
41
* @param <ValT> generic type of variables value and independent value.
* @return Total number of variables and independent values of this scope! (<code>vvaluesCount() + variablesCount()</code>)
839
+
*
840
+
* @since 1.3.7 (before 1.3.7 known as totalSize)
768
841
*/
769
-
publicinttotalSize()
842
+
@Override
843
+
publicintsize()
770
844
{
771
845
returnvaluesCount() + variablesCount();
772
846
}
@@ -776,9 +850,10 @@ public int totalSize()
776
850
*
777
851
* @since 1.2.0
778
852
*/
853
+
@Override
779
854
publicbooleanisEmpty()
780
855
{
781
-
returntotalSize() <= 0;
856
+
returnsize() <= 0;
782
857
}
783
858
784
859
/**
@@ -838,22 +913,24 @@ public List<? extends ValT> toValList()
838
913
* @return Primitive array with independent values of this {@link GenericScope}. These values have nothing to do with values of variables, they are independent!
839
914
* Modifying this list will not affect this {@link GenericScope} object!
840
915
*
841
-
* @since 1.2.0
916
+
* @since 1.3.7 (before 1.3.7 known as toValArray)
842
917
*/
843
-
publicObject[] toValArray()
918
+
@Override
919
+
publicObject[] toArray()
844
920
{
845
921
returnvalues().toArray();
846
922
}
847
-
923
+
848
924
/**
849
925
* @param vals | Array to store independent values into!
850
926
*
851
927
* @return Primitive array with independent values of this {@link GenericScope}. These values have nothing to do with values of variables, they are independent!
852
928
* Modifying this list will not affect this {@link GenericScope} object!
853
929
*
854
-
* @since 1.3.5
930
+
* @since 1.3.7 (before 1.3.7 known as toValArray)
855
931
*/
856
-
public <VextendsValT> V[] toValArray(V[] vals)
932
+
@Override
933
+
public <T> T[] toArray(T[] vals)
857
934
{
858
935
returnvalues().toArray(vals);
859
936
}
@@ -874,7 +951,7 @@ public List<Object> toUnifiedList()
874
951
}
875
952
876
953
/**
877
-
* @return Values of this scope. These are not the values of keys these are values that have no key. You can access them via {@link GenericScope#get(int)}!
954
+
* @return Independent values of this scope. These are not the values of keys these are values that have no key. You can access them via {@link GenericScope#get(int)}!
Copy file name to clipboardExpand all lines: SerialX-core/src/main/java/org/ugp/serialx/Scope.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@
22
22
23
23
24
24
/**
25
-
* This is some kind of hybrid between {@link List} and {@link Map} which allow you to have both variables and independent values managed by one Object. <br>
25
+
* This collection is some sort of hybrid between {@link List} and {@link Map} which allow you to have both variables and independent values managed by one Object. <br>
26
26
* Note: Variables are managed and accessed classically via {@link Map} methods such as <code>put(String key, Object)</code> and array of independent values is accessed by via {@link List} methods such as <code>add(Object)</code> and <code>get(int)</code><br>
27
27
* Also this is java representation of JUSS Scope group such as:
28
28
* <pre>
@@ -1082,7 +1082,7 @@ public static <T> T intoNew(Class<T> objCls, GenericScope<? super String, ?> fro
* {@link org.ugp.serialx.Serializer} is powerful utility class that allows you to serialize any object in Java using custom data format compiled by recursive descent parser consisting of {@link DataParser}s.
38
+
* {@link org.ugp.serialx.Serializer} is powerful abstract class that allows you to serialize any object in Java using custom data format compiled by recursive descent parser consisting of {@link DataParser}s.
39
39
* This class itself is responsible for formating and managing input-output (IO) of content obtained from parsers and protocols as well as their management of their usage!
40
40
* It is instance of {@link Scope} so we can say that this is scope that can serialize itself using system of already mentioned {@link DataParser} and {@link SerializationProtocol}!
0 commit comments